Skip to content

Commit

Permalink
Added CPI Cutoff
Browse files Browse the repository at this point in the history
  • Loading branch information
Abhimanyu-dev committed Sep 11, 2024
1 parent 7834fd9 commit c3876d1
Show file tree
Hide file tree
Showing 7 changed files with 142 additions and 35 deletions.
1 change: 1 addition & 0 deletions callbacks/admin/rc/adminproforma.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export interface AdminProformaType {
accommodation: string;
ppo_confirming_date: string;
internship_period: string;
cpi_cutoff: number;
}

export interface ProformaResponse {
Expand Down
1 change: 1 addition & 0 deletions callbacks/company/proforma.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export interface ProformaType {
accommodation: string;
ppo_confirming_date: string;
internship_period: string;
cpi_cutoff: number;
}
export interface ProformaEvent {
ID: number;
Expand Down
1 change: 1 addition & 0 deletions callbacks/student/rc/proforma.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export interface ProformaParams {
profile: string;
set_deadline: number;
resume: string;
cpi_cutoff: number;
}

const instance = axios.create({
Expand Down
14 changes: 14 additions & 0 deletions pages/admin/rc/[rcid]/proforma/[proformaid]/step3.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,20 @@ function Step3() {
{...register("cpi_criteria", { required: true })}
/>
</FormControl>
<FormControl sx={{ m: 1 }}>
<p style={{ fontWeight: 300 }}>CPI Cutoff</p>
<TextField
id="CPI_Cutoff"
required
sx={{ marginLeft: "5 rem" }}
fullWidth
multiline
variant="standard"
error={!!errors.cpi_cutoff}
helperText={errors.cpi_cutoff && "This field is required"}
{...register("cpi_cutoff", { required: true })}
/>
</FormControl>
<FormControl sx={{ m: 1 }}>
<p style={{ fontWeight: 300 }}>
Is the position also open for PwD/DAP (If no, specify the nature
Expand Down
26 changes: 26 additions & 0 deletions pages/admin/rc/[rcid]/proforma/[proformaid]/view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,19 @@ function View() {
sx={textFieldSX}
/>
</Grid>
<Grid item xs={12} md={6} key="cpi" padding={0}>
<h4>CPI Cutoff</h4>
<TextField
multiline
fullWidth
value={row.cpi_cutoff}
InputProps={{
style: { textAlign: "center" },
readOnly: true,
}}
sx={textFieldSX}
/>
</Grid>
<Grid item xs={12} md={6} key="pwd" padding={0}>
<h4>Availability for PWD/DAP</h4>
<TextField
Expand Down Expand Up @@ -724,6 +737,19 @@ function View() {
sx={textFieldSX}
/>
</Grid>
<Grid item xs={12} md={6} key="cpi" padding={0}>
<h4>CPI Cutoff</h4>
<TextField
multiline
fullWidth
value={row.cpi_cutoff}
InputProps={{
style: { textAlign: "center" },
readOnly: true,
}}
sx={textFieldSX}
/>
</Grid>
<Grid item xs={12} md={6} key="int-per" padding={0}>
<h4>Preferred period of Internship</h4>
<TextField
Expand Down
14 changes: 14 additions & 0 deletions pages/company/rc/[rcid]/proforma/[proformaid]/step2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,20 @@ function Step2() {
{...register("cpi_criteria", { required: true })}
/>
</FormControl>
<FormControl sx={{ m: 1 }}>
<p style={{ fontWeight: 300 }}>CPI Cutoff</p>
<TextField
id="CPI_Cutoff"
required
sx={{ marginLeft: "5 rem" }}
fullWidth
multiline
variant="standard"
error={!!errors.cpi_cutoff}
helperText={errors.cpi_cutoff && "This field is required"}
{...register("cpi_cutoff", { required: true })}
/>
</FormControl>
<FormControl sx={{ m: 1 }}>
<p style={{ fontWeight: 300 }}>
Is the position also open for PwD/DAP (If no, specify the nature
Expand Down
120 changes: 85 additions & 35 deletions pages/student/rc/[rcid]/proforma/[proformaId]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ function Index() {
>
<Stack spacing={2}>
<Grid container spacing={2}>
<Grid item xs={12} md={12} key="bnature">
<Grid item xs={12} md={12} key="company-deets">
<h2 style={{ textAlign: "center" }}>Company Details</h2>
</Grid>
<Grid item xs={12} md={12} key="name">
<h3>Company Name</h3>
<TextField
multiline
Expand All @@ -77,20 +80,22 @@ function Index() {
sx={textFieldSX}
/>
</Grid>
<Grid item xs={12} md={6} key="bnature">
<Grid item xs={12} md={12} key="bnature">
<h3>Nature of Business</h3>
<TextField
multiline
fullWidth
minRows={4}
value={row.role}
InputProps={{
readOnly: true,
}}
sx={textFieldSX}
/>
</Grid>
<Grid item xs={12} md={6} key="bnature">
<Grid item xs={12} md={12} key="internship-deets">
<h2 style={{ textAlign: "center" }}>Internship Details</h2>
</Grid>
<Grid item xs={12} md={6} key="profile">
<h3>Profile</h3>
<TextField
multiline
Expand All @@ -103,6 +108,19 @@ function Index() {
sx={textFieldSX}
/>
</Grid>
<Grid item xs={12} md={6} key="cpi_criteria">
<h3>CPI Criteria</h3>
<TextField
multiline
fullWidth
minRows={4}
value={row.cpi_criteria}
InputProps={{
readOnly: true,
}}
sx={textFieldSX}
/>
</Grid>
<Grid item xs={12} md={6} key="tjobloc">
<h3>Tentative Job Location/Online</h3>
<TextField
Expand All @@ -116,7 +134,7 @@ function Index() {
sx={textFieldSX}
/>
</Grid>
<Grid item xs={12} md={6} key="tjobloc">
<Grid item xs={12} md={6} key="skill">
<h3>Required Skill Set</h3>
<TextField
multiline
Expand All @@ -129,50 +147,53 @@ function Index() {
sx={textFieldSX}
/>
</Grid>
<Grid item xs={12} md={6} key="tjobloc">
<h3>Accomodation Provided / Trip Fare</h3>
<Grid item xs={12} md={12} key="stipend-deets">
<h2 style={{ textAlign: "center" }}>Stipend Details</h2>
</Grid>
<Grid item xs={12} md={6} key="inr">
<h3>Stipend (INR)</h3>
<TextField
multiline
fullWidth
minRows={4}
value={row.accommodation}
value={row.ctc_inr}
InputProps={{
readOnly: true,
}}
sx={textFieldSX}
/>
</Grid>
<Grid item xs={12} md={6} key="tjobloc">
<h3>Preferred Period of Internship</h3>
<Grid item xs={12} md={6} key="foreig">
<h3>Stipend (Foreign Currency)</h3>
<TextField
multiline
fullWidth
minRows={4}
value={row.internship_period}
value={row.ctc_fr}
InputProps={{
readOnly: true,
}}
sx={textFieldSX}
/>
</Grid>
<Grid item xs={12} md={6} key="bnature">
<h3>Stipend (INR)</h3>
<Grid item xs={12} md={6} key="accom">
<h3>Accomodation Provided / Trip Fare</h3>
<TextField
multiline
fullWidth
value={row.ctc_inr}
minRows={4}
value={row.accommodation}
InputProps={{
readOnly: true,
}}
sx={textFieldSX}
/>
</Grid>
<Grid item xs={12} md={6} key="bnature">
<h3>Stipend (Foreign Currency)</h3>
<Grid item xs={12} md={6} key="period">
<h3>Preferred Period of Internship</h3>
<TextField
multiline
fullWidth
value={row.ctc_fr}
minRows={4}
value={row.internship_period}
InputProps={{
readOnly: true,
}}
Expand Down Expand Up @@ -241,7 +262,10 @@ function Index() {
>
<Stack spacing={2}>
<Grid container spacing={2}>
<Grid item xs={12} md={12} key="bnature">
<Grid item xs={12} md={12} key="company-deets" padding={0}>
<h2 style={{ textAlign: "center" }}>Company Details</h2>
</Grid>
<Grid item xs={12} md={12} key="name">
<h3>Company Name</h3>
<TextField
multiline
Expand All @@ -254,20 +278,22 @@ function Index() {
sx={textFieldSX}
/>
</Grid>
<Grid item xs={12} md={6} key="bnature">
<Grid item xs={12} md={12} key="bnature">
<h3>Nature of Business</h3>
<TextField
multiline
fullWidth
minRows={4}
value={row.role}
InputProps={{
readOnly: true,
}}
sx={textFieldSX}
/>
</Grid>
<Grid item xs={12} md={6} key="bnature">
<Grid item xs={12} md={12} key="job-deets" padding={0}>
<h2 style={{ textAlign: "center" }}>Job Details</h2>
</Grid>
<Grid item xs={12} md={6} key="profile">
<h3>Profile</h3>
<TextField
multiline
Expand All @@ -280,39 +306,66 @@ function Index() {
sx={textFieldSX}
/>
</Grid>
<Grid item xs={12} md={6} key="tjobloc">
<h3>Tentative Job Location/Online</h3>
<Grid item xs={12} md={6} key="skill">
<h3>Required Skill Set</h3>
<TextField
multiline
fullWidth
minRows={4}
value={row.tentative_job_location}
value={row.skill_set}
InputProps={{
readOnly: true,
}}
sx={textFieldSX}
/>
</Grid>
<Grid item xs={12} md={6} key="tjobloc">
<h3>Required Skill Set</h3>
<Grid item xs={12} md={6} key="cpi_criteria">
<h3>CPI Criteria</h3>
<TextField
multiline
fullWidth
minRows={4}
value={row.skill_set}
value={row.cpi_criteria}
InputProps={{
readOnly: true,
}}
sx={textFieldSX}
/>
</Grid>
<Grid item xs={12} md={6} key="tjobloc">
<h3>Accomodation Provided / Trip Fare</h3>
<h3>Tentative Job Location/Online</h3>
<TextField
multiline
fullWidth
minRows={4}
value={row.accommodation}
value={row.tentative_job_location}
InputProps={{
readOnly: true,
}}
sx={textFieldSX}
/>
</Grid>
<Grid item xs={12} md={12} key="package-deets" padding={0}>
<h2 style={{ textAlign: "center" }}>Package Details</h2>
</Grid>
<Grid item xs={12} md={6} key="inr">
<h3>Stipend (INR)</h3>
<TextField
multiline
fullWidth
value={row.ctc_inr}
InputProps={{
readOnly: true,
}}
sx={textFieldSX}
/>
</Grid>
<Grid item xs={12} md={6} key="foreign">
<h3>Stipend (Foreign Currency)</h3>
<TextField
multiline
fullWidth
value={row.ctc_fr}
InputProps={{
readOnly: true,
}}
Expand All @@ -323,10 +376,6 @@ function Index() {
<h3>Job Description</h3>
{isFetched && <RichText onChange={setJd} readOnly value={jd} />}
</Grid>
<Grid item xs={12} md={12} key="jd">
<h3>Package Details</h3>
{isFetched && <RichText onChange={setJd} readOnly value={pd} />}
</Grid>
<Grid item xs={12} md={6} key="bond">
<h3>Bond Details</h3>
<TextField
Expand Down Expand Up @@ -366,6 +415,7 @@ function Index() {
</Card>
);
}
console.log(content);
return (
<div style={{ padding: "0 2rem", marginBottom: 20 }}>
<Meta title="RC - Company - Proforma" />
Expand Down

0 comments on commit c3876d1

Please sign in to comment.