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B;;wGAA5B,4BAA4B;yHAA5B,4BAA4B;6HAT9B;YACP,yDAAY;YACZ,+DAAmB;YACnB,0GAAmC;YACnC,+HAAsB;YACtB,2GAAoB;SACrB;mIAGU,4BAA4B,mBAVxB,iGAA+B,aAE5C,yDAAY;QACZ,+DAAmB;QACnB,0GAAmC;QACnC,+HAAsB;QACtB,2GAAoB,aAEZ,iGAA+B","sources":["./src/app/views/loan/co-applicant-rent-vehicle/co-applicant-rent-vehicle-routing.module.ts","./src/app/views/loan/co-applicant-rent-vehicle/co-applicant-rent-vehicle.component.ts","./src/app/views/loan/co-applicant-rent-vehicle/co-applicant-rent-vehicle.component.html","./src/app/views/loan/co-applicant-rent-vehicle/co-applicant-rent-vehicle.module.ts"],"sourcesContent":["import { NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\n\nimport { CoApplicantRentVehicleComponent } from './co-applicant-rent-vehicle.component';\n\nconst routes: Routes = [\n {\n path: '',\n component: CoApplicantRentVehicleComponent,\n },\n];\n\n@NgModule({\n declarations: [],\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule],\n})\nexport class CoApplicantRentVehicleRoutingModule {}\n","import { Component, OnDestroy, OnInit } from '@angular/core';\nimport { FormBuilder, FormGroup, Validators } from '@angular/forms';\nimport { Router } from '@angular/router';\nimport { NgbModal } from '@ng-bootstrap/ng-bootstrap';\nimport { Subscription } from 'rxjs';\nimport { Title } from '@angular/platform-browser';\n\nimport { BranchService } from 'src/app/services/branch/branch.service';\nimport { ModalFinishByPhoneComponent } from 'src/app/components/modals/modal-finish-by-phone/modal-finish-by-phone.component';\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 { phoneNumberValidator } from 'src/app/directives/phone-number/phone-number.directive';\nimport { DataLayerService } from 'src/app/services/analytics/data-layer.service';\nimport { RouteName } from '../loan-routing.module';\n\n@Component({\n selector: 'app-co-applicant-rent-vehicle',\n templateUrl: './co-applicant-rent-vehicle.component.html',\n styleUrls: ['./co-applicant-rent-vehicle.component.scss'],\n})\nexport class CoApplicantRentVehicleComponent implements OnInit, OnDestroy {\n coApplicantRentFormGroup: 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 | Co-Applicant Mortgage/Rent and Vehicles'\n );\n this.navService.setBackNav('Co-Applicant Info', RouteName.coApplicant);\n this.branchService.setShowInfoButton(true);\n\n // Disabled FormControls will be hidden in the UI.\n this.coApplicantRentFormGroup = 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 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.coApplicantRentFormGroup.statusChanges.subscribe(\n (status: string) => {\n if (status && status === 'VALID') {\n this.isDirtyAndMissingRequiredFields = false;\n }\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 | Co-Applicant Mortgage/Rent & Vehicles'\n );\n\n const modalRef = this.modalService.open(ModalFinishByPhoneComponent);\n\n modalRef.componentInstance.loan = this.loanService.setApplicantRent(\n this.coApplicantRentFormGroup.value,\n true\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.coApplicantRentFormGroup.invalid) {\n this.coApplicantRentFormGroup.markAllAsTouched();\n this.isDirtyAndMissingRequiredFields = true;\n return;\n }\n\n this.loanService.setApplicantRent(\n this.coApplicantRentFormGroup.value,\n true\n );\n\n this.router.navigateByUrl(RouteName.coApplicantEmployer);\n }\n}\n","
\n
\n

Co-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 { ReactiveFormsModule } from '@angular/forms';\n\nimport { CoApplicantRentVehicleComponent } from './co-applicant-rent-vehicle.component';\nimport { CoApplicantRentVehicleRoutingModule } from './co-applicant-rent-vehicle-routing.module';\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: [CoApplicantRentVehicleComponent],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n CoApplicantRentVehicleRoutingModule,\n RentVehicleGroupModule,\n ValidationTextModule,\n ],\n exports: [CoApplicantRentVehicleComponent],\n})\nexport class CoApplicantRentVehicleModule {}\n"],"names":["Validators","ModalFinishByPhoneComponent","phoneNumberValidator","RouteName","CoApplicantRentVehicleComponent","constructor","formBuilder","loanService","navService","branchService","router","modalService","titleService","dataLayerService","setTitle","setBackNav","coApplicant","setShowInfoButton","coApplicantRentFormGroup","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","coApplicantEmployer","i0","selectors","decls","vars","consts","template","ctx"],"sourceRoot":"webpack:///"}