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,0BAA0B;2HAT5B;YACP,yDAAY;YACZ,uDAAW;YACX,+DAAmB;YACnB,qGAAiC;YACjC,+HAAsB;YACtB,2GAAoB;SACrB;mIAEU,0BAA0B,mBAVtB,4FAA6B,aAE1C,yDAAY;QACZ,uDAAW;QACX,+DAAmB;QACnB,qGAAiC;QACjC,+HAAsB;QACtB,2GAAoB","sources":["./src/app/views/loan/applicant-rent-vehicle/applicant-rent-vehicle-routing.module.ts","./src/app/views/loan/applicant-rent-vehicle/applicant-rent-vehicle.component.ts","./src/app/views/loan/applicant-rent-vehicle/applicant-rent-vehicle.component.html","./src/app/views/loan/applicant-rent-vehicle/applicant-rent-vehicle.module.ts"],"sourcesContent":["import { NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\n\nimport { ApplicantRentVehicleComponent } from './applicant-rent-vehicle.component';\n\nconst routes: Routes = [\n {\n path: '',\n component: ApplicantRentVehicleComponent,\n },\n];\n\n@NgModule({\n declarations: [],\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule],\n})\nexport class ApplicantRentVehicleRoutingModule {}\n","import { Component, OnDestroy, OnInit } from '@angular/core';\nimport { FormBuilder, FormGroup, Validators } from '@angular/forms';\nimport { Title } from '@angular/platform-browser';\nimport { Router } from '@angular/router';\nimport { NgbModal } from '@ng-bootstrap/ng-bootstrap';\nimport { Subscription } from 'rxjs';\n\nimport { ModalFinishByPhoneComponent } from 'src/app/components/modals/modal-finish-by-phone/modal-finish-by-phone.component';\nimport { phoneNumberValidator } from 'src/app/directives/phone-number/phone-number.directive';\nimport { DataLayerService } from 'src/app/services/analytics/data-layer.service';\nimport { BranchService } from 'src/app/services/branch/branch.service';\nimport {\n FinalLoanApplication,\n ApplicantOwnAnyVehicles,\n} from 'src/app/services/loan/loan.model';\nimport { LoanService } from 'src/app/services/loan/loan.service';\nimport { NavigationService } from 'src/app/services/navigation/navigation.service';\nimport { RouteName } from '../loan-routing.module';\n\n@Component({\n selector: 'app-applicant-rent-vehicle',\n templateUrl: './applicant-rent-vehicle.component.html',\n styleUrls: ['./applicant-rent-vehicle.component.scss'],\n})\nexport class ApplicantRentVehicleComponent implements OnInit, OnDestroy {\n rentFormGroup: FormGroup;\n loanApplication: FinalLoanApplication | null = null;\n vehiclesOwned: ApplicantOwnAnyVehicles | null = null;\n isDirtyAndMissingRequiredFields = false;\n\n private subscriptions: Array = [];\n\n constructor(\n private formBuilder: FormBuilder,\n private loanService: LoanService,\n private navService: NavigationService,\n private branchService: BranchService,\n private router: Router,\n private modalService: NgbModal,\n private titleService: Title,\n private dataLayerService: DataLayerService\n ) {\n this.titleService.setTitle(\n 'Eagle Loan | Applicant Mortgage/Rent and Vehicles'\n );\n this.navService.setBackNav('Applicant Info', RouteName.applicant);\n this.branchService.setShowInfoButton(true);\n\n // Disabled FormControls will be hidden in the UI.\n this.rentFormGroup = this.formBuilder.group({\n HousingContactName: [{ value: '', disabled: true }, Validators.required],\n HousingContactPhone: [\n { value: '', disabled: true },\n [Validators.required, phoneNumberValidator],\n ],\n MonthlyCost: [\n { value: '', disabled: true },\n [Validators.required, Validators.min(0)],\n ],\n MortgageBalance: [\n { value: '', disabled: true },\n [Validators.required, Validators.min(0)],\n ],\n Lienholder: [{ value: '', disabled: true }, Validators.required],\n MarketValue: [\n { value: '', disabled: true },\n [Validators.required, Validators.min(0)],\n ],\n // Array is built dynamically in class `RentVehicleGroupComponent`.\n ApplicantVehicles: this.formBuilder.array([]),\n });\n }\n\n ngOnInit(): void {\n this.subscriptions.push(\n this.loanService.finalLoanApplication.subscribe(\n (data: FinalLoanApplication | null) => {\n if (data) {\n this.loanApplication = { ...data };\n }\n }\n )\n );\n\n this.subscriptions.push(\n this.rentFormGroup.statusChanges.subscribe((status: string) => {\n if (status && status === 'VALID') {\n this.isDirtyAndMissingRequiredFields = false;\n }\n })\n );\n\n // On refresh of the page it will redirect to start of application.\n if (!this.loanApplication) {\n this.router.navigateByUrl(RouteName.default, { replaceUrl: true });\n }\n }\n\n ngOnDestroy(): void {\n if (this.subscriptions.length > 0) {\n this.subscriptions.forEach((sub) => {\n sub.unsubscribe();\n });\n }\n }\n\n async onFinishByPhone(): Promise {\n this.dataLayerService.logEvent(\n 'button_clicked',\n 'loan_application',\n 'click',\n 'Finish By Phone | Applicant Mortgage/Rent & Vehicles'\n );\n\n const modalRef = this.modalService.open(ModalFinishByPhoneComponent);\n\n modalRef.componentInstance.loan = this.loanService.setApplicantRent(\n this.rentFormGroup.value\n );\n\n const result = await modalRef.result;\n\n if (result && result.status === 'confirmed') {\n this.onConfirmed();\n }\n }\n\n onConfirmed() {\n this.loanService.clearApplication();\n this.router.navigateByUrl(RouteName.skippedConfirmation);\n }\n\n onNext() {\n this.isDirtyAndMissingRequiredFields = false;\n\n if (this.rentFormGroup.invalid) {\n this.rentFormGroup.markAllAsTouched();\n this.isDirtyAndMissingRequiredFields = true;\n return;\n }\n\n this.loanService.setApplicantRent(this.rentFormGroup.value);\n\n this.router.navigateByUrl(RouteName.applicantEmployer);\n }\n}\n","
\n
\n

Applicant Home

\n
\n
\n\n
\n \n\n\n
\n\n
\n
\n \n\n \n
\n
\n
\n \n
\n
\n
\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\n\nimport { ApplicantRentVehicleRoutingModule } from './applicant-rent-vehicle-routing.module';\nimport { ApplicantRentVehicleComponent } from './applicant-rent-vehicle.component';\nimport { RentVehicleGroupModule } from 'src/app/components/form-groups/rent-vehicle-group/rent-vehicle-group.module';\nimport { ValidationTextModule } from 'src/app/components/validation-text/validation-text.module';\n\n@NgModule({\n declarations: [ApplicantRentVehicleComponent],\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n ApplicantRentVehicleRoutingModule,\n RentVehicleGroupModule,\n ValidationTextModule,\n ],\n})\nexport class ApplicantRentVehicleModule {}\n"],"names":["Validators","ModalFinishByPhoneComponent","phoneNumberValidator","RouteName","ApplicantRentVehicleComponent","constructor","formBuilder","loanService","navService","branchService","router","modalService","titleService","dataLayerService","setTitle","setBackNav","applicant","setShowInfoButton","rentFormGroup","group","HousingContactName","value","disabled","required","HousingContactPhone","MonthlyCost","min","MortgageBalance","Lienholder","MarketValue","ApplicantVehicles","array","ngOnInit","subscriptions","push","finalLoanApplication","subscribe","data","loanApplication","Object","statusChanges","status","isDirtyAndMissingRequiredFields","navigateByUrl","default","replaceUrl","ngOnDestroy","length","forEach","sub","unsubscribe","onFinishByPhone","logEvent","modalRef","open","componentInstance","loan","setApplicantRent","result","onConfirmed","clearApplication","skippedConfirmation","onNext","invalid","markAllAsTouched","applicantEmployer","i0","selectors","decls","vars","consts","template","ctx"],"sourceRoot":"webpack:///"}