Skip to content

Commit

Permalink
ejs form changes
Browse files Browse the repository at this point in the history
  • Loading branch information
GitVivekHub committed Oct 16, 2024
1 parent c70c2a8 commit ea1fcd3
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 32 deletions.
12 changes: 6 additions & 6 deletions src/app.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -954,11 +954,11 @@ export class AppService {
last_name: customerData?.data?.data?.[0]?.last_name || "NA",
father_name: customerData?.data?.data?.[0]?.father_name || "NA",
samagra_id: customerData?.data?.data?.[0]?.samagra_id || "NA",
class: parseInt(customerData?.data?.data?.[0]?.class) || 0,
class: customerData?.data?.data?.[0]?.class || 0,
resident_type: customerData?.data?.data?.[0]?.resident_type || "NA",
aadhaar: customerData?.data?.data?.[0]?.aadhaar || "NA",
marks_previous_class:
parseInt(customerData?.data?.data?.[0]?.marks_previous_class) || 0,
customerData?.data?.data?.[0]?.marks_previous_class || 0,
caste: customerData?.data?.data?.[0]?.caste || "NA",
application_status:
customerData?.data?.data?.[0]?.application_status || "NA",
Expand All @@ -977,6 +977,8 @@ export class AppService {
},
};

console.log("updateCustomerPayload--->>", updateCustomerPayload);

// Axios POST call
const orderDetails = await axios.put(
`${this.strapi_base_url}/api/applications/${document_id}`,
Expand Down Expand Up @@ -1048,16 +1050,14 @@ export class AppService {
last_name: body?.last_name || "NA",
father_name: body?.father_name || "NA",
samagra_id: body?.samagra_id || "NA",
class: parseInt(body?.class) || 0,
class: body?.class || 0,
resident_type: body?.resident_type || "NA",
aadhaar: body?.aadhaar || "NA",
marks_previous_class: parseInt(body?.marks_previous_class) || 0,
marks_previous_class: body?.marks_previous_class || 0,
caste: body?.caste || "NA",
application_status: body?.application_status || "NA",
current_school_name: body?.current_school_name || "NA",
current_school_address: body?.current_school_address || "NA",
application_date: formattedDate,
email: body?.email || "NA",
phone: body?.phone || "NA",
gender: body?.gender || "NA",
order_id: body?.order_id || "NA",
Expand Down
41 changes: 15 additions & 26 deletions src/views/submit.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@
<style>
body {
font-family: Calibri, Helvetica, sans-serif;
background-color: rgb(245, 242, 242);
background-color: #fff;
}
.container {
padding: 20px;
background-color: rgb(245, 242, 242);
background-color: #fff;
}
input[type="text"],
input,
textarea {
width: 100%;
padding: 15px;
margin: 5px 0 22px 0;
display: inline-block;
border: none;
border: 1px solid #d5d5d5;
background: #ffff;
}
input[type="text"]:focus {
input:focus {
background-color: #ffff;
outline: none;
}
Expand All @@ -44,16 +44,19 @@
opacity: 1;
}
button {
background-color: #777977;
background-color: #3c5fdd; /* Set the background color to #3C5FDD */
color: #fff;
padding: 10px 15px;
border: none;
border-radius: 4px;
border-radius: 25px; /* Make the button rounded */
cursor: pointer;
font-size: 16px;
width: 100%;
margin-top: 20px;
}
button:hover {
background-color: #747373;
background-color: #3451c9; /* A slightly darker shade for hover effect */
}
</style>
</head>
Expand Down Expand Up @@ -97,7 +100,7 @@
required="true"
/>
<label>Class:</label>
<input type="text" name="class" placeholder="Class" required="true" />
<input type="number" name="class" placeholder="Class" required="true" />
<label>Resident Type:</label>
<input
type="text"
Expand All @@ -114,20 +117,14 @@
/>
<label>Marks of Previous Class:</label>
<input
type="text"
type="number"
name="marks_previous_class"
placeholder="Marks of Previous Class"
required="true"
/>
<label>Caste:</label>
<input type="text" name="caste" placeholder="Caste" required="true" />
<label>Application Status:</label>
<input
type="text"
name="application_status"
placeholder="Application Status"
required="true"
/>

<label>Current School Name:</label>
<input
type="text"
Expand All @@ -142,15 +139,7 @@
placeholder="Current School Address"
required="true"
/>
<label>Application Date:</label>
<input
type="text"
name="application_date"
placeholder="Application Date"
required="true"
/>
<label>Email:</label>
<input type="text" name="email" placeholder="Email Id" required />

<label>Phone:</label>
<input
type="text"
Expand Down

0 comments on commit ea1fcd3

Please sign in to comment.