You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
2.0 KiB
56 lines
2.0 KiB
// 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>`;
|
|
}
|
|
}
|