|  |  | @ -2,6 +2,7 @@ import { Component, ElementRef, OnInit, ViewChild } from "@angular/core"; | 
			
		
	
		
			
				
					|  |  |  | import { FormBuilder, FormGroup, Validators } from "@angular/forms"; | 
			
		
	
		
			
				
					|  |  |  | import { Router } from "@angular/router"; | 
			
		
	
		
			
				
					|  |  |  | import { GENDER_LIST, SCHEDULE_APPOINTMENT } from "src/constants/constants"; | 
			
		
	
		
			
				
					|  |  |  | import { ScheduleAppointmentService } from "../schedule-appointment/schedule-appointment.service"; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | @Component({ | 
			
		
	
		
			
				
					|  |  |  |   selector: "app-add-dependants", | 
			
		
	
	
		
			
				
					|  |  | @ -9,7 +10,7 @@ import { GENDER_LIST, SCHEDULE_APPOINTMENT } from "src/constants/constants"; | 
			
		
	
		
			
				
					|  |  |  |   styleUrls: ["./add-dependants.component.scss"], | 
			
		
	
		
			
				
					|  |  |  | }) | 
			
		
	
		
			
				
					|  |  |  | export class AddDependantsComponent implements OnInit { | 
			
		
	
		
			
				
					|  |  |  |   generateLetterForm!: FormGroup; | 
			
		
	
		
			
				
					|  |  |  |   addDependantForm!: FormGroup; | 
			
		
	
		
			
				
					|  |  |  |   name = "Angular Html To Pdf "; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |   @ViewChild("pdfTable", { static: false }) pdfTable: ElementRef | undefined; | 
			
		
	
	
		
			
				
					|  |  | @ -20,14 +21,14 @@ export class AddDependantsComponent implements OnInit { | 
			
		
	
		
			
				
					|  |  |  |   isMaxCount: boolean = false; | 
			
		
	
		
			
				
					|  |  |  |   genderList = GENDER_LIST; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |   constructor(private formBuilder: FormBuilder, private router:Router) { | 
			
		
	
		
			
				
					|  |  |  |   constructor(private formBuilder: FormBuilder, private router:Router, private scheduleAppointmentService:ScheduleAppointmentService) { | 
			
		
	
		
			
				
					|  |  |  |     this.createNewForm(); | 
			
		
	
		
			
				
					|  |  |  |   } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |   ngOnInit(): void {} | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |   createNewForm(): void { | 
			
		
	
		
			
				
					|  |  |  |     this.generateLetterForm = this.formBuilder.group({ | 
			
		
	
		
			
				
					|  |  |  |     this.addDependantForm = this.formBuilder.group({ | 
			
		
	
		
			
				
					|  |  |  |       nameOfDependant: ["John"], | 
			
		
	
		
			
				
					|  |  |  |       employeeRelation: ["Brother"], | 
			
		
	
		
			
				
					|  |  |  |       age: ["34"], | 
			
		
	
	
		
			
				
					|  |  | @ -49,6 +50,9 @@ export class AddDependantsComponent implements OnInit { | 
			
		
	
		
			
				
					|  |  |  |   } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |   navigateToPrevious(){ | 
			
		
	
		
			
				
					|  |  |  |     console.log(JSON.stringify(this.addDependantForm.value)); | 
			
		
	
		
			
				
					|  |  |  |     let responseObject = this.addDependantForm.value; | 
			
		
	
		
			
				
					|  |  |  |     this.scheduleAppointmentService.saveAdditionalDependentDetails(responseObject); | 
			
		
	
		
			
				
					|  |  |  |     this.router.navigate([SCHEDULE_APPOINTMENT]); | 
			
		
	
		
			
				
					|  |  |  |   } | 
			
		
	
		
			
				
					|  |  |  | } |