8 changed files with 319 additions and 11 deletions
-
209src/app/annual-health-checkup/generate-letter/generate-letter.component.html
-
2src/app/annual-health-checkup/generate-letter/generate-letter.component.ts
-
5src/app/annual-health-checkup/generate-letter/generate-letter.service.ts
-
2src/app/annual-health-checkup/schedule-appointment/schedule-appointment.component.html
-
34src/app/annual-health-checkup/schedule-appointment/schedule-appointment.component.ts
-
56src/app/annual-health-checkup/schedule-appointment/schedule-appointment.service.ts
-
3src/app/app.module.ts
-
13src/constants/apiConstants.ts
@ -0,0 +1,56 @@ |
|||
// Angular imports
|
|||
import { Injectable } from "@angular/core"; |
|||
import { HttpClient } from "@angular/common/http"; |
|||
import { USER_DETAILS_API } from "src/constants/apiConstants"; |
|||
import { catchError } from "rxjs/operators"; |
|||
import { handleError } from "src/app/shared/utilities/utils"; |
|||
|
|||
@Injectable({ |
|||
providedIn: "root", |
|||
}) |
|||
export class ScheduleAppointmentService { |
|||
additionalDetailsArr:string[] = []; |
|||
constructor(private http: HttpClient) {} |
|||
|
|||
getUserDetails(body: any) { |
|||
let response; |
|||
try { |
|||
const saveURL = USER_DETAILS_API; |
|||
response = this.http |
|||
.post(saveURL, body) |
|||
.pipe(catchError(handleError<never>())); |
|||
} catch (error) { |
|||
response = error; |
|||
} |
|||
return response; |
|||
} |
|||
|
|||
saveAdditionalDetails(data:any){ |
|||
this.additionalDetailsArr.push(data); |
|||
} |
|||
|
|||
sendMail(res: any) { |
|||
let str = `<div>
|
|||
<p>Hi</p> |
|||
<p>I would like schedule an appointment for Annual Health Check-up. PFB my details and kindly confirm the appointment</p> |
|||
<p>Name : ${res.employeeName}</p> |
|||
<p>Ticket No : 98297</p> |
|||
<p>Level : ${res.level}</p> |
|||
<p>Package : ${res.eligiblePackage}</p> |
|||
<p>Date : ${res.preferredDate}</p> |
|||
<p>Age : </p> |
|||
<p>Hospital Name : ${res.hospitalName}</p> |
|||
<p>Additional Test Details : ${res.additonalTest}</p> |
|||
<p><b>Employee Contact details:</b></p> |
|||
<p>Email: pbpalwe@bajajauto.co.in</p> |
|||
<p>Mobile: ${res.contactNumber}</p> |
|||
<p><b>Additional Member</b></p> |
|||
<p>Name:</p> |
|||
<p>Relation:</p> |
|||
<p>Age:</p> |
|||
<p>Gender:</p> |
|||
<p>Kindly confirm the date and reporting time for visiting the hospital.</p> |
|||
<p>Thanks & Regards<br>PRADIP PALWE<br>Bajaj Auto Ltd.<br>VP (HR)</p |
|||
</div>`;
|
|||
} |
|||
} |
@ -0,0 +1,13 @@ |
|||
/* |
|||
This file maintains only the constant values which are exported |
|||
and used in the application where ever it is necessary. |
|||
Make sure that the constants are added as per alphabetical order |
|||
of the constant name and also the naming convention should be in |
|||
all caps. |
|||
*/ |
|||
export const USER_DETAILS_API= 'https://balhecmum.bajajauto.co.in:8004/sap/opu/odata/sap/ZHCM_GW_BUDDY_EMP_MASTER_SRV/es_employee_details(%27%27)?$format=json'; |
|||
|
|||
|
|||
|
|||
|
|||
|
Write
Preview
Loading…
Cancel
Save
Reference in new issue