\r\n
\r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n Cancel {{selectedEmployee['firstName']}}'s resignaton process below\r\n
\r\n
\r\n\r\n
\r\n
\r\n {{selectedEmployee['initials'].length > 1 ? selectedEmployee['initials'].substring(0,1) : selectedEmployee['initials']}}
\r\n
{{selectedEmployee['firstName']}} {{selectedEmployee['surname']}}
\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n\r\n
\r\n
\r\n\r\n
\r\n
\r\n {{selectedEmployee['initials'].substring(0,1)}}
\r\n
{{selectedEmployee['firstName']}} {{selectedEmployee['surname']}}
\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n You have successfully cancelled {{selectedEmployee['firstName']}}'s resignaton process\r\n
\r\n\r\n
\r\n\r\n
\r\n\r\n
\r\n
\r\n \r\n
\r\n \r\n\r\n
\r\n
\r\n
\r\n 1 \r\n
\r\n
\r\n of \r\n
\r\n
\r\n 1 \r\n
\r\n
\r\n Steps \r\n
\r\n
\r\n
\r\n\r\n \r\n\r\n
\r\n\r\n
\r\n\r\n\r\n \r\n
\r\n","import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';\r\nimport { FormGroup, FormBuilder, FormControl, Validators } from '@angular/forms';\r\nimport { Employee } from '../../../../models/employees.model';\r\n\r\n@Component({\r\n selector: 'app-any-debt-step-two',\r\n templateUrl: './any-debt.step-two.component.html',\r\n styleUrls: ['./any-debt.step-two.component.scss']\r\n})\r\nexport class StepTwoComponent implements OnInit {\r\n\r\n @Input() selectedEmployee: Employee;\r\n @Input() step: number;\r\n @Input() numberOfSteps: number;\r\n @Output() close = new EventEmitter();\r\n @Output() next = new EventEmitter();\r\n @Output() prev = new EventEmitter();\r\n \r\n anyDebtForm: FormGroup;\r\n isChecked: Boolean = false;\r\n showAmount: Boolean = false;\r\n checkBoxId: string;\r\n showPrev: Boolean;\r\n\r\n constructor(private formBuilder: FormBuilder) { }\r\n\r\n ngOnInit() {\r\n this.checkBoxId = this.selectedEmployee.employeeNumber + 2;\r\n this.showPrev = this.step >= 2;\r\n this.anyDebtForm = this.formBuilder.group({\r\n\r\n });\r\n\r\n }\r\n\r\n onCreateAnyDebtForm() {\r\n this.anyDebtForm = this.formBuilder.group({\r\n amount: new FormControl('', [Validators.required]),\r\n });\r\n\r\n }\r\n\r\n toggle() {\r\n const el = document.getElementById(this.checkBoxId)!;\r\n if (!this.isChecked) {\r\n el.classList.add('bg-orange-600');\r\n el.classList.remove('border-2');\r\n el.classList.remove('border-gray-500');\r\n } else {\r\n el.classList.add('border-gray-500');\r\n el.classList.add('border-2');\r\n el.classList.remove('bg-orange-600');\r\n }\r\n this.isChecked = !this.isChecked;\r\n this.showAmount = this.isChecked;\r\n }\r\n\r\n onClose() {\r\n this.close.emit();\r\n }\r\n onPrev() {\r\n this.prev.emit();\r\n }\r\n onNext() {\r\n this.next.emit();\r\n }\r\n\r\n}\r\n","
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
Does {{selectedEmployee['firstName']}} owe any debt to
\r\n
You may know this as 37D
\r\n
\r\n
\r\n
{{(selectedEmployee['initials'] && selectedEmployee['initials'].length > 1) ? selectedEmployee['initials'].substring(0,1) : selectedEmployee['initials']}}
\r\n
{{selectedEmployee['firstName']}} {{selectedEmployee['surname']}}
\r\n
\r\n
\r\n
\r\n\r\n
\r\n\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n {{step}} \r\n
\r\n
\r\n of \r\n
\r\n
\r\n {{numberOfSteps}} \r\n
\r\n
\r\n Steps \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n Prev \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
","import { Component, OnInit, Input } from '@angular/core';\r\nimport { WizardHelperService } from 'src/app/services/wizard-helper.service';\r\nimport { Employee } from '../../models/employees.model';\r\n@Component({\r\n selector: 'app-wizard',\r\n templateUrl: './wizard.component.html',\r\n styleUrls: ['./wizard.component.css']\r\n})\r\nexport class WizardComponent implements OnInit {\r\n\r\n @Input() selectedEmployees: Employee[];\r\n @Input() corpName: string;\r\n @Input() option: number;\r\n @Input() status: number;\r\n @Input() isBulkExit: boolean;\r\n @Input() exitID: any;\r\n @Input() showPrev: boolean;\r\n\r\n step: number = 1;\r\n showWizard: boolean;\r\n numberOfSteps: number;\r\n count: number = 0;\r\n selectedEmployee: Employee;\r\n showWizardStep1: Boolean;\r\n showLastStep: Boolean;\r\n continue: Boolean;\r\n selectedBulkExits: any[]= [];\r\n\r\n constructor(public wizardHelperService: WizardHelperService) {\r\n this.selectedEmployee = new Employee();\r\n }\r\n\r\n ngOnInit() {\r\n this.workoutNumberOfSteps();\r\n this.showWizardStep1 = this.wizardHelperService.wizardIntroShow;\r\n console.log(\"Show wizard step 1: \", this.showWizardStep1)\r\n }\r\n\r\n workoutNumberOfSteps() {\r\n if (this.selectedEmployees) {\r\n this.count = 0;\r\n this.numberOfSteps = (this.selectedEmployees.length) + 1;\r\n this.selectedEmployee = this.selectedEmployees[this.count];\r\n }\r\n }\r\n\r\n onPreviousStep(){\r\n this.step = this.step - 1;\r\n this.showPrev = this.step > 1;\r\n if (this.isBulkExit){\r\n this.count = this.count - 1;\r\n }\r\n this.selectedEmployee = this.selectedEmployees[this.count];\r\n if (this.step <= (this.numberOfSteps - 1)) {\r\n this.showLastStep = false;\r\n this.showWizardStep1 = true;\r\n }\r\n }\r\n\r\n onNextStep(){\r\n this.step = this.step + 1;\r\n this.showPrev = this.step > 1;\r\n if (this.isBulkExit){\r\n this.count = this.count + 1;\r\n }\r\n this.selectedEmployee = this.selectedEmployees[this.count];\r\n if (this.step <= (this.numberOfSteps - 1)) {\r\n this.showWizardStep1 = true;\r\n } else {\r\n this.showWizardStep1 = false;\r\n this.showLastStep = true;\r\n }\r\n }\r\n\r\n onSaveData(data: any) {\r\n this.selectedEmployees[this.count] = data;\r\n this.onNextStep();\r\n }\r\n\r\n onHideWizard() {\r\n this.wizardHelperService.wizardIntroShow = false;\r\n }\r\n\r\n\r\n}\r\n","\r\n
\r\n \r\n
\r\n \r\n\r\n \r\n\r\n\r\n
\r\n \r\n\r\n
\r\n","export class Employee {\r\n employeeId: string;\r\n fundId: string;\r\n membershipNumber: string;\r\n employeeNumber: string;\r\n employerName: string;\r\n exitDate: Date | null;\r\n exitNoticeDate: Date;\r\n identityValue: string;\r\n identityTypeId: string;\r\n employeeUserName: string;\r\n initials: string;\r\n firstName: string;\r\n surname: string;\r\n dateOfBirth: Date;\r\n telephoneNumber: string;\r\n mobileNumber: string;\r\n personalEmail: string;\r\n workEmail: string;\r\n primaryEmail: string;\r\n isHrEmailAddress: Boolean;\r\n indebtedToEmployer: Boolean;\r\n amountOfDeduction: number;\r\n //hrRepresentative: {\r\n hrRepresentativeId: string;\r\n userName: string;\r\n emailAddress: string;\r\n contactNumber: string;\r\n //}\r\n optionId: number;\r\n fkPersonId: string;\r\n statusId: number;\r\n address1: string;\r\n address2: string;\r\n address3: string;\r\n postalCode: string;\r\n Country: string;\r\n}\r\n\r\n","export class SavingCalculations{\r\n currentAge: number;\r\n salary: number;\r\n contributionPercentage: number;\r\n currentFundCredit: number;\r\n gender: string;\r\n existingSavings: number;\r\n}\r\n","import { Component, OnInit } from \"@angular/core\";\r\nimport { HttpClient, HttpHeaders } from \"@angular/common/http\";\r\nimport { Observable } from \"rxjs\";\r\nimport { FormGroup, FormControl, Validators, FormArray } from \"@angular/forms\";\r\nimport { UtilitiesService } from \"src/app/services/utilities.service\";\r\nimport { LoaderService } from \"src/app/services/loader.service\";\r\nimport { ContentService } from \"src/app/services/content.service\";\r\nimport { RoutingService } from \"src/app/services/routing.service\";\r\nimport { ErrorService } from \"src/app/services/error.service\";\r\nimport { AuthenticationService } from \"src/app/services/authentication.service\";\r\nimport { Constants } from \"src/app/constants/constants\";\r\nimport appsettings from \"../../../../../assets/appsettings.json\"\r\nimport { getErrorMessage } from \"src/app/shared/common-functions\";\r\n\r\n@Component({\r\n selector: \"app-confirm-details\",\r\n templateUrl: \"./confirm-details.component.html\",\r\n styleUrls: [\"./confirm-details.component.scss\"],\r\n})\r\nexport class ConfirmDetailsComponent implements OnInit {\r\n popIaDisclosurePath: String = \"\";\r\n infoIconDamPath: String = \"\";\r\n employee: any;\r\n member: any;\r\n claimId: any = \"\";\r\n email: any;\r\n countries: any;\r\n claimSuccess = false;\r\n showPopi = false;\r\n showBlock: boolean = false;\r\n memberValues: any;\r\n lastContributionDate: string;\r\n employeeForm: FormGroup;\r\n titles: any;\r\n idTypes: any;\r\n genders: any;\r\n country: any;\r\n selectedIdType: number = 0;\r\n formSubmitted: boolean = false;\r\n dateOfBirth: Date;\r\n route: string = \"summary\";\r\n showTabs: boolean = false;\r\n isDialogOpen: boolean;\r\n\r\n constructor(\r\n private utils: UtilitiesService,\r\n private httpClient: HttpClient,\r\n private loader: LoaderService,\r\n private contentService: ContentService,\r\n private routingService: RoutingService,\r\n private errorService: ErrorService,\r\n private auth: AuthenticationService\r\n ) {\r\n this.loader.start();\r\n this.employeeForm = new FormGroup({\r\n fundId: new FormControl(\"\"),\r\n membershipNumber: new FormControl(\"\"),\r\n employeeId: new FormControl(\"\"),\r\n employeeNumber: new FormControl(\"\"),\r\n employerName: new FormControl(\"\"),\r\n exitDate: new FormControl(\"\"),\r\n identityValue: new FormControl(\"\", [\r\n Validators.required,\r\n Validators.minLength(13),\r\n ]),\r\n identityTypeId: new FormControl(\"\", Validators.required),\r\n employeeUserName: new FormControl(\"\"),\r\n initials: new FormControl(\"\"),\r\n firstName: new FormControl(\"\", Validators.required),\r\n surname: new FormControl(\"\", Validators.required),\r\n dateOfBirth: new FormControl(\"\", Validators.required),\r\n telephoneNumber: new FormControl(\"\"),\r\n mobileNumber: new FormControl(\"\", [Validators.required]),\r\n personalEmail: new FormControl(\"\", [\r\n Validators.required,\r\n Validators.pattern(\r\n \"^\\\\w+([\\\\.-]?\\\\w+)*@\\\\w+([\\\\.-]?\\\\w+)*(\\\\.\\\\w{2,4})+$\"\r\n ),\r\n ]),\r\n workEmail: new FormControl(),\r\n primaryEmail: new FormControl(\"\"),\r\n isHrEmailAddress: new FormControl(\"\"),\r\n indebtedToEmployer: new FormControl(\"\"),\r\n amountOfDeduction: new FormControl(\"\"),\r\n poBox: new FormControl(\"\"),\r\n address1: new FormControl(\"\", Validators.required),\r\n address2: new FormControl(\"\", Validators.required),\r\n address3: new FormControl(\"\", Validators.required),\r\n unitNumber: new FormControl(\"\"),\r\n complex: new FormControl(\"\"),\r\n streetNumber: new FormControl(\"\"),\r\n streetOrFarmName: new FormControl(\"\"),\r\n suburbOrDistrict: new FormControl(\"\"),\r\n cityOrTown: new FormControl(\"\"),\r\n country: new FormControl(\"\"),\r\n postalCode: new FormControl(\"\", Validators.required),\r\n titleId: new FormControl(\"\"),\r\n genderId: new FormControl(\"\"),\r\n hrRepresentative: new FormGroup({\r\n hrRepresentativeId: new FormControl(\"\"),\r\n userName: new FormControl(\"\"),\r\n emailAddress: new FormControl(\"\"),\r\n firstName: new FormControl(\"\"),\r\n lastName: new FormControl(\"\"),\r\n }),\r\n membership: new FormArray([\r\n new FormGroup({\r\n employeeMembershipId: new FormControl(\"\"),\r\n employeeId: new FormControl(\"\"),\r\n fundId: new FormControl(\"\"),\r\n fundName: new FormControl(\"\"),\r\n integrationSystem: new FormControl(\"\"),\r\n subscriptionNumber: new FormControl(\"\"),\r\n isHybrid: new FormControl(\"\"),\r\n modifiedBy: new FormControl(\"\"),\r\n }),\r\n ]),\r\n exit: new FormGroup({\r\n exitId: new FormControl(\"\"),\r\n employeeId: new FormControl(\"\"),\r\n kickoffDate: new FormControl(\"\"),\r\n actionId: new FormControl(\"\"),\r\n statusId: new FormControl(\"\"),\r\n opportunityId: new FormControl(\"\"),\r\n claimId: new FormControl(\"\"),\r\n }),\r\n });\r\n }\r\n\r\n ngOnInit() {\r\n this.popIaDisclosurePath = Constants.popia_clause_form;\r\n this.infoIconDamPath = Constants.infoIconDamPath;\r\n if (localStorage.getItem(\"showBlock\")) {\r\n this.showBlock = true;\r\n } else {\r\n this.showBlock = false;\r\n }\r\n this.getMemberInfo();\r\n\r\n var firstPoint:any;\r\n let zoom;\r\n\r\n window.addEventListener(\r\n \"mousemove\",\r\n function (event) {\r\n if (!firstPoint) {\r\n firstPoint = createPoint(event);\r\n } else if (getDistance(event, firstPoint, \"client\") >= 100) {\r\n var secondPoint = event;\r\n var clientDistance = getDistance(event, firstPoint, \"client\");\r\n var screenDistance = getDistance(event, firstPoint, \"screen\");\r\n zoom = clientDistance - screenDistance;\r\n if (zoom > 18) {\r\n var bb = document.getElementsByClassName(\r\n \"black-box\"\r\n ) as HTMLCollectionOf
;\r\n for (var i = 0; i < bb.length; i++) {\r\n bb[i].style.marginLeft = \"945px\";\r\n bb[i].style.marginTop = \"330px\";\r\n }\r\n } else if (zoom < 18) {\r\n var bb = document.getElementsByClassName(\r\n \"black-box\"\r\n ) as HTMLCollectionOf;\r\n for (var i = 0; i < bb.length; i++) {\r\n bb[i].style.marginLeft = \"753px\";\r\n bb[i].style.marginTop = \"328px\";\r\n }\r\n }\r\n firstPoint = null;\r\n }\r\n },\r\n {\r\n passive: true,\r\n }\r\n );\r\n\r\n function createPoint(event: MouseEvent) {\r\n return {\r\n clientX: event.clientX,\r\n clientY: event.clientY,\r\n screenX: event.screenX,\r\n screenY: event.screenY,\r\n };\r\n }\r\n\r\n function getDistance(pointA:any, pointB:any, property:any) {\r\n var x = pointA[property + \"X\"] - pointB[property + \"X\"];\r\n var y = pointA[property + \"Y\"] - pointB[property + \"Y\"];\r\n return Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2));\r\n }\r\n }\r\n\r\n getMemberInfo() {\r\n const headers = new HttpHeaders().set(\r\n \"Authorization\",\r\n this.auth.getAuthorizationHeaderValue()\r\n );\r\n const options = { headers: headers };\r\n this.httpClient\r\n .get(\r\n `${appsettings.digitalHRAssisServicesUrl}${appsettings.endPoints.memberDetails}`,\r\n options\r\n )\r\n .subscribe(\r\n (resp:any) => {\r\n this.member = resp[\"member\"][0];\r\n this.httpClient\r\n .get(\r\n `${appsettings.digitalHRAssisServicesUrl}${appsettings.endPoints.updateMemberUrl}/${resp[\"member\"][0][\"employeeId\"]}`,\r\n options\r\n )\r\n .subscribe(\r\n (resp:any) => {\r\n this.dateOfBirth = new Date(resp[\"employee\"].dateOfBirth);\r\n this.employee = resp[\"employee\"];\r\n this.employeeForm.patchValue(this.employee);\r\n\r\n if (this.employee.identityTypeId === 1) {\r\n this.selectedIdType = 4;\r\n }\r\n this.checkMemberValues();\r\n this.loader.stop();\r\n },\r\n (err) => {\r\n let errorMessage = getErrorMessage(err);\r\n this.errorService.openErrorPopup(\r\n \"Error occurred while updating member details: \" +\r\n errorMessage.substring(0, 40)\r\n );\r\n this.loader.stop();\r\n }\r\n );\r\n },\r\n (err) => {\r\n let errorMessage = getErrorMessage(err);\r\n this.errorService.openErrorPopup(\r\n \"Error occurred while getting member information: \" +\r\n errorMessage.substring(0, 40)\r\n );\r\n this.loader.stop();\r\n }\r\n );\r\n } \r\n\r\n checkMemberValues() {\r\n this.getMemberValues().subscribe(\r\n (val) => {\r\n this.loader.stop();\r\n this.memberValues = val;\r\n },\r\n (error) => {\r\n this.loader.stop();\r\n this.errorService.openErrorPopup('An error occurred while getting the member values.' );\r\n }\r\n );\r\n }\r\n\r\n getMemberValues(): Observable {\r\n const headers = new HttpHeaders().set(\r\n \"Authorization\",\r\n this.auth.getAuthorizationHeaderValue()\r\n );\r\n const options = { headers: headers };\r\n const url = `${appsettings.digitalMemberServicesUrl}${appsettings.endPoints.memberFundValues}?MembershipNumber=${this.member.membership[0].subscriptionNumber}&FundId=${this.member.membership[0].fundId}`;\r\n return this.httpClient.get(url, options);\r\n }\r\n\r\n goToRoute() {\r\n this.claimSuccess = false;\r\n this.routingService.savingsSummary();\r\n }\r\n\r\n claimSaved(args: { id: string; status: boolean; isSubmittedSuccessfully: boolean; responseMessage: string }) {\r\n this.claimId = args.id;\r\n this.claimSuccess = args.status;\r\n }\r\n\r\n toggle() {\r\n this.showBlock = !this.showBlock;\r\n localStorage.removeItem(\"showBlock\");\r\n }\r\n logout() {\r\n //this.authService.logout(false);\r\n this.auth.logout(false);\r\n }\r\n\r\n profileLandingPage() {\r\n this.routingService.profileLandingPage();\r\n }\r\n};\r\n","\r\n\r\n\r\n\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n {{ employee.firstName }} {{ employee.surname }}\r\n
\r\n
\r\n \r\n Log out\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n Find out \r\n how we protect your personal information, privacy and security.\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n Grow my savings \r\n
\r\n Please confirm we have the correct details to reach you and keep\r\n \r\n you updated on important changes or updates about your \r\n retirement savings.\r\n \r\n
\r\n
\r\n\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n\r\n\r\n\r\n
\r\n
\r\n
\r\n \r\n \r\n
Protecting your information
\r\n
\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n Alexforbes will protect your personal information and only use it for\r\n the intended purpose.\r\n
\r\n
\r\n
\r\n \r\n We will use your personal information to act on your request or for any\r\n other valid or legal purpose.\r\n \r\n We will share your personal information with third parties: \r\n \r\n so that we can provide products and services to you \r\n if a law requires us to share this information \r\n \r\n We will keep your personal information \r\n \r\n \r\n for as long as we or the fund needs it to act on your instruction\r\n \r\n if a law requires us to share this information \r\n \r\n \r\n Once we are no longer allowed to keep your personal information, we will\r\n decide if it needs to be destroyed, deleted or de-identified (no\r\n longer linked to you).\r\n \r\n \r\n
\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n \r\n \r\n\r\n\r\n\r\n\r\n
\r\n \r\n \r\n
\r\n We need your personal details\r\n
\r\n
\r\n Because you are leaving your employer, please check and update your contact\r\n details and postal address.\r\n
\r\n
\r\n \r\n got it\r\n \r\n
\r\n
\r\n \r\n","export class MemberRetirementProjection {\r\n private _montlyIncomeProjection: number //5422.32\r\n private _ageWhenSORRI: number //89\r\n private _retirementAge: number //65\r\n private _valueAtRetirement: number\r\n\r\n get valueAtRetirement(): number {\r\n return this._valueAtRetirement;\r\n }\r\n\r\n set valueAtRetirement(value: number) {\r\n this._valueAtRetirement = value;\r\n }\r\n\r\n get montlyIncomeProjection(): number {\r\n return this._montlyIncomeProjection;\r\n }\r\n\r\n set montlyIncomeProjection(value: number) {\r\n this._montlyIncomeProjection = value;\r\n }\r\n\r\n get ageWhenSORRI(): number {\r\n return this._ageWhenSORRI;\r\n }\r\n\r\n set ageWhenSORRI(value: number) {\r\n this._ageWhenSORRI = value;\r\n }\r\n\r\n get retirementAge(): number {\r\n return this._retirementAge;\r\n }\r\n\r\n set retirementAge(value: number) {\r\n this._retirementAge = value;\r\n }\r\n}\r\n","export class ProjectionPayload {\r\n\r\n private CurrentAge: number//45\r\n private Salary: number//4255.67\r\n private ContributionPercentage: number//0\r\n private CurrentFundCredit: number//500000\r\n private Gender: string // \"Female\"\r\n\r\n get _CurrentAge(): number {\r\n return this.CurrentAge;\r\n }\r\n\r\n set _CurrentAge(value: number) {\r\n this.CurrentAge = value;\r\n }\r\n\r\n get _Salary(): number {\r\n return this.Salary;\r\n }\r\n\r\n set _Salary(value: number) {\r\n this.Salary = value;\r\n }\r\n\r\n get _ContributionPercentage(): number {\r\n return this.ContributionPercentage;\r\n }\r\n\r\n set _ContributionPercentage(value: number) {\r\n this.ContributionPercentage = value;\r\n }\r\n\r\n get _CurrentFundCredit(): number {\r\n return this.CurrentFundCredit;\r\n }\r\n\r\n set _CurrentFundCredit(value: number) {\r\n this.CurrentFundCredit = value;\r\n }\r\n\r\n get _Gender(): string {\r\n return this.Gender;\r\n }\r\n\r\n set _Gender(value: string) {\r\n this.Gender = value;\r\n }\r\n\r\n\r\n}\r\n","import { Component, OnInit, OnDestroy } from \"@angular/core\";\r\nimport { RoutingService } from \"../../../../../../src/app/services/routing.service\";\r\nimport { ActivatedRoute, Router } from \"@angular/router\";\r\nimport {\r\n RetirementSavings,\r\n Calculations,\r\n MemberDetails,\r\n} from \"../../store/retirement-savings/retirementsavings\";\r\nimport { ErrorService } from \"../../../../../../src/app/services/error.service\";\r\nimport { WithdrawalAmountProjectionServiceService } from \"../withdrawal-amount-projection-service.service\";\r\nimport { ClaimService } from \"../../store/retirement-savings/service/claimService.service\";\r\nimport { CurrencyPipe } from \"@angular/common\";\r\nimport { MemberRetirementProjection } from \"./MemberRetirementProjection\";\r\nimport { ProjectionPayload } from \"./ProjectionPayload\";\r\nimport { AuthenticationService } from \"../../../../services/authentication.service\";\r\nimport { User } from \"oidc-client\";\r\nimport { Constants } from \"../../../../constants/constants\";\r\n\r\n@Component({\r\n selector: \"app-move-withdraw\",\r\n templateUrl: \"./move-withdraw.component.html\",\r\n styleUrls: [\"./move-withdraw.component.scss\"],\r\n})\r\nexport class MoveWithdrawComponent implements OnInit, OnDestroy {\r\n popIaDisclosurePath: string = \"\";\r\n infoIconDamPath: string = \"\";\r\n firstName: String;\r\n surname: String;\r\n showMove: boolean;\r\n percentage: number;\r\n showWithdraw: boolean;\r\n protected _routeParams: any;\r\n moveWithDrawFlag: number;\r\n showFullPartFlag: number;\r\n stay: boolean;\r\n partSave: boolean;\r\n totalSavings: number;\r\n memberAction: string;\r\n showConnect: boolean = false;\r\n retirementSavings: RetirementSavings;\r\n memberDetails: MemberDetails;\r\n showMessage: boolean = false;\r\n tax: number = 0;\r\n payout: number = 0;\r\n estimatedTaxNotification: boolean = true;\r\n savingsTip: boolean = false;\r\n stayInvestedTip: boolean = false;\r\n calculations: Calculations;\r\n calculateTaxAmount: number;\r\n taxNumberInfoTip: boolean = false;\r\n memberRetirementProject: MemberRetirementProjection =\r\n new MemberRetirementProjection();\r\n amountToMove: any = 0;\r\n projectionPayload: ProjectionPayload = new ProjectionPayload();\r\n defaultAmount: any;\r\n totalDefaultAmount: any;\r\n showProjectionsDisclaimer: boolean;\r\n showTaxDisclaimer: boolean;\r\n member: User | null = null;\r\n // zoom: any;\r\n marginLeft: any;\r\n isDialogOpen: boolean;\r\n\r\n constructor(\r\n private auth: AuthenticationService,\r\n private routingService: RoutingService,\r\n protected _route: ActivatedRoute,\r\n private router: Router,\r\n private errorService: ErrorService,\r\n public currencyPipe: CurrencyPipe,\r\n private withdrawalAmountProjectionService: WithdrawalAmountProjectionServiceService,\r\n public claimService: ClaimService\r\n ) {}\r\n\r\n ngOnInit() {\r\n this.popIaDisclosurePath = Constants.popia_clause_form;\r\n this.infoIconDamPath = Constants.infoIconDamPath;\r\n this.auth\r\n .getClaims()\r\n .then((member:any) => {\r\n this.member = member;\r\n this.firstName = this.member?.profile.given_name!;\r\n this.surname = this.member?.profile.family_name!;\r\n this.memberDetails = this.claimService.getMemberDetails();\r\n if (this.claimService) {\r\n this.retirementSavings = this.claimService.getRetirementSavings();\r\n this._route.queryParams.subscribe((parameters) => {\r\n this.moveWithDrawFlag = parameters[\"flag\"];\r\n this.totalSavings = parameters[\"sv\"].replace(/\\s/g, \"\");\r\n this.memberAction =\r\n this.moveWithDrawFlag == 1 ? \"move\" : \"withdraw\";\r\n this.percentage = this.moveWithDrawFlag == 1 ? 100 : 0;\r\n this.defaultAmount =\r\n this.moveWithDrawFlag == 1\r\n ? (this.totalDefaultAmount = this.currencyPipe\r\n .transform(this.totalSavings, \"R\")\r\n ?.split(\",\")\r\n .join(\" \")\r\n .substring(\r\n 0,\r\n this.currencyPipe\r\n .transform(this.totalSavings, \"R\")\r\n ?.split(\",\")\r\n .join(\" \").length - 3\r\n ))\r\n : (this.totalDefaultAmount = 0);\r\n this.amountToMove = this.defaultAmount;\r\n this.calculate();\r\n this.withdrawalAmountProjectionService\r\n .getFundCreditProjection(this.buildProjectionPayload())\r\n .subscribe((resp) => {\r\n this.memberRetirementProject.valueAtRetirement = resp;\r\n });\r\n this.withdrawalAmountProjectionService\r\n .getMemberRetirementProjection(this.buildProjectionPayload())\r\n .subscribe((resp) => {\r\n this.memberRetirementProject.retirementAge = resp.retirementAge;\r\n this.memberRetirementProject.ageWhenSORRI = resp.ageWhenSORRI;\r\n this.memberRetirementProject.montlyIncomeProjection =\r\n resp.montlyIncomeProjection;\r\n });\r\n });\r\n }\r\n\r\n if (localStorage.getItem(\"estimatedTaxNotificationDismissed\") != null) {\r\n this.estimatedTaxNotification = false;\r\n }\r\n if (localStorage.getItem(\"savingsTipDismissed\") != null) {\r\n this.savingsTip = false;\r\n }\r\n if (localStorage.getItem(\"stayInvestedTipDismissed\") != null) {\r\n this.stayInvestedTip = false;\r\n }\r\n })\r\n .catch((reason:any) => {\r\n console.log(\"could not get user\");\r\n });\r\n\r\n var firstPoint: { clientX: any; clientY: any; screenX: any; screenY: any; } | null;\r\n let zoom;\r\n\r\n window.addEventListener(\r\n \"mousemove\",\r\n function (event:any) {\r\n if (!firstPoint) {\r\n firstPoint = createPoint(event);\r\n } else if (getDistance(event, firstPoint, \"client\") >= 100) {\r\n var secondPoint = event;\r\n var clientDistance = getDistance(event, firstPoint, \"client\");\r\n var screenDistance = getDistance(event, firstPoint, \"screen\");\r\n zoom = clientDistance - screenDistance;\r\n if (zoom > 18) {\r\n var tt = document.getElementsByClassName(\r\n \"tax-tip\"\r\n ) as HTMLCollectionOf;\r\n for (var i = 0; i < tt.length; i++) {\r\n tt[i].style.height = \"200px\";\r\n }\r\n var ttw = document.getElementsByClassName(\r\n \"tax-tip-withdraw\"\r\n ) as HTMLCollectionOf;\r\n for (var i = 0; i < ttw.length; i++) {\r\n ttw[i].style.height = \"225px\";\r\n }\r\n var st = document.getElementsByClassName(\r\n \"savings-tip\"\r\n ) as HTMLCollectionOf;\r\n for (var i = 0; i < st.length; i++) {\r\n st[i].style.right = \"38%\";\r\n st[i].style.height = \"230px\";\r\n }\r\n var si = document.getElementsByClassName(\r\n \"stay-invested-tip\"\r\n ) as HTMLCollectionOf;\r\n for (var i = 0; i < si.length; i++) {\r\n si[i].style.right = \"35%\";\r\n si[i].style.height = \"235px\";\r\n }\r\n } else if (zoom < 18) {\r\n var tt = document.getElementsByClassName(\r\n \"tax-tip\"\r\n ) as HTMLCollectionOf;\r\n for (var i = 0; i < tt.length; i++) {\r\n tt[i].style.height = \"225px\";\r\n }\r\n var ttw = document.getElementsByClassName(\r\n \"tax-tip-withdraw\"\r\n ) as HTMLCollectionOf;\r\n for (var i = 0; i < ttw.length; i++) {\r\n ttw[i].style.height = \"225px\";\r\n }\r\n var st = document.getElementsByClassName(\r\n \"savings-tip\"\r\n ) as HTMLCollectionOf;\r\n for (var i = 0; i < st.length; i++) {\r\n st[i].style.right = \"35%\";\r\n st[i].style.height = \"220px\";\r\n }\r\n var si = document.getElementsByClassName(\r\n \"stay-invested-tip\"\r\n ) as HTMLCollectionOf;\r\n for (var i = 0; i < si.length; i++) {\r\n si[i].style.right = \"31%\";\r\n si[i].style.height = \"255px\";\r\n }\r\n }\r\n firstPoint = null;\r\n }\r\n },\r\n {\r\n passive: true,\r\n }\r\n );\r\n\r\n function createPoint(event:any) {\r\n return {\r\n clientX: event.clientX,\r\n clientY: event.clientY,\r\n screenX: event.screenX,\r\n screenY: event.screenY,\r\n };\r\n }\r\n\r\n function getDistance(pointA: { [x: string]: number; clientX?: any; clientY?: any; screenX?: any; screenY?: any; }, pointB: { [x: string]: number; clientX?: any; clientY?: any; screenX?: any; screenY?: any; }, property: string) {\r\n var x = pointA[property + \"X\"] - pointB[property + \"X\"];\r\n var y = pointA[property + \"Y\"] - pointB[property + \"Y\"];\r\n return Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2));\r\n }\r\n }\r\n buildProjectionPayload(): ProjectionPayload {\r\n this.projectionPayload._CurrentAge =\r\n new Date().getFullYear() - \r\n new Date(this.claimService.getMemberDetails().dateOfBirth).getFullYear();\r\n this.projectionPayload._CurrentFundCredit =\r\n this.memberAction === \"move\"\r\n ? parseFloat(this.calculations.amountToMove)\r\n : parseFloat(String(this.totalSavings)) -\r\n parseFloat(this.calculations.amountToMove);\r\n this.projectionPayload._Salary =\r\n this.claimService.getMemberValues().AnnualPensionableSalary / 12;\r\n this.projectionPayload._Gender =\r\n this.claimService.getMemberDetails().genderId == 1 ? \"Male\" : \"Female\";\r\n this.projectionPayload._ContributionPercentage =\r\n this.claimService.getMemberValues().RetirementContributionRate / 100;\r\n return this.projectionPayload;\r\n }\r\n\r\n logout() {\r\n this.auth.logout(false);\r\n }\r\n\r\n profileLandingPage() {\r\n this.routingService.profileLandingPage();\r\n }\r\n\r\n onClose() {\r\n this.showWithdraw = false;\r\n this.showMove = false;\r\n this.stay = false;\r\n this.partSave = false;\r\n }\r\n\r\n calculate(event = null) {\r\n this.calculations = this.claimService.getCalculations(\r\n this.percentage,\r\n this.totalSavings\r\n );\r\n if (this.moveWithDrawFlag == 1) {\r\n if (this.percentage == 0) {\r\n this.showFullPartFlag = 2;\r\n this.calculateTaxAmount = this.calculations.savingsLeft;\r\n } else {\r\n if (this.percentage < 100) {\r\n this.calculateTaxAmount = this.calculations.savingsLeft;\r\n this.showFullPartFlag = 2;\r\n } else {\r\n this.calculateTaxAmount = this.calculations.amountToMove;\r\n this.showFullPartFlag = 1;\r\n }\r\n }\r\n } else {\r\n if (this.percentage == 0) {\r\n this.showFullPartFlag = 1;\r\n this.calculateTaxAmount = this.calculations.amountToMove;\r\n } else {\r\n if (this.percentage < 100) {\r\n this.calculateTaxAmount = this.calculations.amountToMove;\r\n this.showFullPartFlag = 2;\r\n } else {\r\n this.calculateTaxAmount = this.calculations.amountToMove;\r\n this.showFullPartFlag = 1;\r\n }\r\n }\r\n }\r\n }\r\n\r\n showPopup() {\r\n if (this.moveWithDrawFlag == 1) {\r\n this.showMove = true;\r\n } else {\r\n if (this.moveWithDrawFlag == 2) {\r\n this.showWithdraw = true;\r\n }\r\n }\r\n }\r\n\r\n goToSavings() {\r\n //this.router.navigate([\"digital/resignations/connect-adviser.html\"], {\r\n this.router.navigate(['connect-adviser'], {\r\n queryParams: {\r\n flag: this.moveWithDrawFlag,\r\n sv: this.totalSavings,\r\n pt: this.percentage,\r\n amt:\r\n this.memberAction === \"withdraw\"\r\n ? this.calculations.amountToMove\r\n : this.totalSavings - this.calculations.amountToMove,\r\n prompt: \"save\",\r\n },\r\n });\r\n }\r\n\r\n stayInvested() {\r\n this.stay = true;\r\n }\r\n\r\n onPartMove() {\r\n this.showWithdraw = false;\r\n this.stay = false;\r\n this.showMove = true;\r\n }\r\n\r\n onSave() {\r\n this.showWithdraw = false;\r\n this.stay = false;\r\n this.showMove = false;\r\n this.partSave = true;\r\n }\r\n\r\n toggleView() {\r\n this.showConnect = !this.showConnect;\r\n }\r\n goToSavingsDetails() {\r\n this.routingService.savingsDetails(\r\n this.moveWithDrawFlag,\r\n this.totalSavings,\r\n this.percentage\r\n );\r\n }\r\n connect() {\r\n document.getElementById(\"connect-button\")?.click();\r\n }\r\n\r\n goToGrowSavings() {\r\n this.routingService.confirmDetails();\r\n }\r\n\r\n closeEstimatedTaxNotification() {\r\n this.estimatedTaxNotification = false;\r\n localStorage.setItem(\"estimatedTaxNotificationDismissed\", \"yes\");\r\n this.savingsTip = true;\r\n }\r\n\r\n closeSavingsTip() {\r\n this.savingsTip = false;\r\n localStorage.setItem(\"savingsTipDismissed\", \"yes\");\r\n this.stayInvestedTip = true;\r\n }\r\n\r\n closeStayInvestedTip() {\r\n this.stayInvestedTip = false;\r\n localStorage.setItem(\"stayInvestedTipDismissed\", \"yes\");\r\n }\r\n\r\n ngOnDestroy() {\r\n if (this.claimService) {\r\n if (!this.retirementSavings) {\r\n this.retirementSavings = new RetirementSavings();\r\n }\r\n this.retirementSavings.percentage = this.percentage;\r\n this.retirementSavings.fullPartFlag = this.showFullPartFlag;\r\n this.retirementSavings.amountToMove = this.calculations.amountToMove;\r\n this.retirementSavings.moveWithDrawFlag = this.moveWithDrawFlag;\r\n this.retirementSavings.savingsLeft = this.calculations.savingsLeft;\r\n this.retirementSavings.totalSavings = this.totalSavings;\r\n this.retirementSavings.tax = this.tax;\r\n this.retirementSavings.payout = this.payout;\r\n this.claimService.setRetirementSavings(this.retirementSavings);\r\n }\r\n }\r\n transformAmount($event: FocusEvent) {\r\n console.log($event);\r\n switch (typeof $event) {\r\n case \"number\":\r\n //this.calculations.amountToMove = this.currencyPipe.transform(parseInt($event), 'R');\r\n this.calculations = this.claimService.getCalculations(\r\n this.percentage,\r\n this.totalSavings\r\n );\r\n let amount = this.currencyPipe\r\n .transform(this.calculations.amountToMove, \"R\")\r\n ?.split(\",\")\r\n .join(\" \");\r\n let element : any = document.getElementById(\"amount\");\r\n if(element){\r\n element = amount?.substr(\r\n 0,\r\n amount.length - 3\r\n );\r\n }\r\n this.amountToMove = amount?.substr(0, amount.length - 3);\r\n\r\n if (this.moveWithDrawFlag == 1) {\r\n if (this.percentage == 0) {\r\n this.showFullPartFlag = 2;\r\n this.calculateTaxAmount = this.calculations.savingsLeft;\r\n } else {\r\n if (this.percentage < 100) {\r\n this.calculateTaxAmount = this.calculations.savingsLeft;\r\n this.showFullPartFlag = 2;\r\n } else {\r\n this.calculateTaxAmount = this.calculations.amountToMove;\r\n this.showFullPartFlag = 1;\r\n }\r\n }\r\n } else {\r\n if (this.percentage == 0) {\r\n this.showFullPartFlag = 1;\r\n this.calculateTaxAmount = this.calculations.amountToMove;\r\n } else {\r\n if (this.percentage < 100) {\r\n this.calculateTaxAmount = this.calculations.amountToMove;\r\n this.showFullPartFlag = 2;\r\n } else {\r\n this.calculateTaxAmount = this.calculations.amountToMove;\r\n this.showFullPartFlag = 1;\r\n }\r\n }\r\n }\r\n this.withdrawalAmountProjectionService\r\n .getFundCreditProjection(this.buildProjectionPayload())\r\n .subscribe((resp:any) => {\r\n this.memberRetirementProject.valueAtRetirement = resp;\r\n });\r\n this.withdrawalAmountProjectionService\r\n .getMemberRetirementProjection(this.buildProjectionPayload())\r\n .subscribe((resp:any) => {\r\n this.memberRetirementProject.retirementAge = resp.retirementAge;\r\n this.memberRetirementProject.ageWhenSORRI = resp.ageWhenSORRI;\r\n this.memberRetirementProject.montlyIncomeProjection =\r\n resp.montlyIncomeProjection;\r\n });\r\n this.withdrawalAmountProjectionService\r\n .getTaxPayout(\r\n this.memberAction === \"move\"\r\n ? this.totalSavings - this.calculations.amountToMove\r\n : this.calculations.amountToMove\r\n )\r\n .subscribe(\r\n (resp:any) => {\r\n if (\r\n (this.showFullPartFlag == 1 && this.moveWithDrawFlag == 1) ||\r\n (this.percentage == 0 && this.moveWithDrawFlag == 2)\r\n ) {\r\n this.tax = 0;\r\n this.payout = 0;\r\n } else {\r\n this.tax = resp.taxPayable;\r\n this.payout = resp.netOfTax;\r\n this.showMessage = true;\r\n }\r\n },\r\n (error:any) => {\r\n this.errorService.openErrorPopup(\r\n \"An error occurred while getting the tax details.\"\r\n );\r\n }\r\n );\r\n break;\r\n default:\r\n if ($event &&\r\n parseInt($event.target[\"value\"].toString().replace(\" \", \"\").replace(\"R\", \"\")) >\r\n this.totalSavings\r\n ) {\r\n this.calculations = this.claimService.getCalculations(\r\n this.percentage,\r\n this.totalSavings,\r\n this.totalSavings\r\n );\r\n let amount = this.currencyPipe\r\n .transform(this.calculations.amountToMove, \"R\")\r\n ?.split(\",\")\r\n .join(\" \");\r\n this.calculations.amountToMove = amount\r\n ?.substr(0, amount.length - 3)\r\n .replace(\"R\", \"\")\r\n .replace(\" \", \"\");\r\n let element : any = document.getElementById(\"amount\");\r\n if(element){\r\n element = amount?.substr(\r\n 0,\r\n amount.length - 3\r\n );\r\n }\r\n } else {\r\n this.calculations = this.claimService.getCalculations(\r\n this.percentage,\r\n this.totalSavings,\r\n parseInt($event.target[\"value\"].replace(\" \", \"\").replace(\"R\", \"\"))\r\n );\r\n let amount : any = this.currencyPipe\r\n .transform(this.calculations.amountToMove, \"R\")\r\n ?.split(\",\")\r\n .join(\" \");\r\n let element : any = document.getElementById(\"amount\");\r\n if(element){\r\n element = amount?.substr(\r\n 0,\r\n amount.length - 3\r\n );\r\n }\r\n this.amountToMove = amount?.substr(0, amount?.length - 3);\r\n this.withdrawalAmountProjectionService\r\n .getFundCreditProjection(this.buildProjectionPayload())\r\n .subscribe((resp) => {\r\n this.memberRetirementProject.valueAtRetirement = resp;\r\n });\r\n this.withdrawalAmountProjectionService\r\n .getMemberRetirementProjection(this.buildProjectionPayload())\r\n .subscribe((resp) => {\r\n this.memberRetirementProject.retirementAge = resp.retirementAge;\r\n this.memberRetirementProject.ageWhenSORRI = resp.ageWhenSORRI;\r\n this.memberRetirementProject.montlyIncomeProjection =\r\n resp.montlyIncomeProjection;\r\n });\r\n }\r\n this.percentage = this.calculations.percentageToMove;\r\n if (this.moveWithDrawFlag == 1) {\r\n if (this.percentage == 0) {\r\n this.showFullPartFlag = 2;\r\n this.calculateTaxAmount = this.calculations.savingsLeft;\r\n } else {\r\n if (this.percentage < 100) {\r\n this.calculateTaxAmount = this.calculations.savingsLeft;\r\n this.showFullPartFlag = 2;\r\n } else {\r\n this.calculateTaxAmount = this.calculations.amountToMove;\r\n this.showFullPartFlag = 1;\r\n }\r\n }\r\n } else {\r\n if (this.percentage == 0) {\r\n this.showFullPartFlag = 1;\r\n this.calculateTaxAmount = this.calculations.amountToMove;\r\n } else {\r\n if (this.percentage < 100) {\r\n this.calculateTaxAmount = this.calculations.amountToMove;\r\n this.showFullPartFlag = 2;\r\n } else {\r\n this.calculateTaxAmount = this.calculations.amountToMove;\r\n this.showFullPartFlag = 1;\r\n }\r\n }\r\n }\r\n this.withdrawalAmountProjectionService\r\n .getTaxPayout(\r\n this.memberAction === \"move\"\r\n ? this.totalSavings - this.calculations.amountToMove\r\n : this.calculations.amountToMove\r\n )\r\n .subscribe(\r\n (resp) => {\r\n if (\r\n (this.showFullPartFlag == 1 && this.moveWithDrawFlag == 1) ||\r\n (this.percentage == 0 && this.moveWithDrawFlag == 2)\r\n ) {\r\n this.tax = 0;\r\n this.payout = 0;\r\n } else {\r\n this.tax = resp.taxPayable;\r\n this.payout = resp.netOfTax;\r\n this.showMessage = true;\r\n }\r\n },\r\n (error) => {\r\n this.errorService.openErrorPopup(\r\n \"An error occurred while getting the tax details.\"\r\n );\r\n }\r\n );\r\n //this.calculations.amountToMove = this.currencyPipe.transform(parseInt(this.calculations.amountToMove.replace(',','').replace('R','')), 'R');\r\n break;\r\n }\r\n }\r\n onlyNumberKey(evt: KeyboardEvent) {\r\n const pattern = /[0-9]/;\r\n const inputChar = String.fromCharCode(evt.which);\r\n if (!pattern.test(inputChar)) {\r\n evt.preventDefault();\r\n }\r\n }\r\n\r\n taxDisclaimer() {\r\n this.showTaxDisclaimer = true;\r\n }\r\n\r\n format(valueAtRetirement: number) {\r\n if (valueAtRetirement) {\r\n return Math.floor(valueAtRetirement);\r\n }\r\n }\r\n\r\n toInt(totalSavings: number) {\r\n return parseInt(totalSavings.toString());\r\n }\r\n}\r\n","\r\n\r\n\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
{{ firstName }} {{ surname }}
\r\n
\r\n \r\n Log out\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n Find out \r\n how we protect your personal information, privacy and security.\r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n You currently have\r\n R{{ totalSavings | number: \"1.0-0\":\"fr-FR\" }} saved \r\n in your {{ memberDetails.membership[0].fundName }}\r\n \r\n
How much do you want to {{ memberAction }}? \r\n
\r\n
\r\n
\r\n
{{ percentage }}% \r\n
\r\n
\r\n
\r\n Amount to {{ memberAction }} \r\n
\r\n
\r\n
\r\n
\r\n\r\n
= 1\" class=\"mt-4 flex\">\r\n
\r\n
\r\n
\r\n \r\n R{{ tax | number: \"1.0-0\":\"fr-FR\" }}\r\n
\r\n \r\n
\r\n
My payout after tax will be \r\n
\r\n \r\n R{{ payout | number: \"1.0-0\":\"fr-FR\" }}\r\n
\r\n \r\n
\r\n
\r\n
\r\n If you don't move your savings, you'll withdraw the rest as\r\n cash.\r\n
\r\n
\r\n
\r\n
\r\n
\r\n Tax Disclaimer\r\n
\r\n
\r\n \r\n This is assumed to be your first withdrawal from a retirement\r\n fund. Any previous withdrawals are not taken into account in\r\n this calculation. Previous withdrawals will change the outcome\r\n of your calculation.\r\n \r\n \r\n This estimation serves as a guideline only and does not negate\r\n from your actual deduction of tax issued by the South African\r\n Revenue Service (SARS).\r\n \r\n \r\n These figures are an estimate only and may change upon your\r\n true calculation.\r\n \r\n \r\n Alexforbes has made an effort to ensure that the data\r\n contained herein is accurate, based on the information you\r\n have supplied. No warranties are attached in any form.\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n View \r\n
\r\n
\r\n Have you withdrawn from your retirement savings before?\r\n
\r\n
\r\n
\r\n
\r\n If you have previously withdrawn from your retirement savings or\r\n been retrenched,\r\n
\r\n
\r\n estimated tax calculations are more complex and may not be\r\n accurate.\r\n
\r\n
\r\n It is very important to consult a licensed financial adviser\r\n before you make any decisions.\r\n
\r\n
\r\n connect to advice\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
Current Savings
\r\n
\r\n R{{ totalSavings | number: \"1.0-0\":\"fr-FR\" }}\r\n
\r\n
\r\n
\r\n
Amount to move
\r\n
{{ amountToMove }}
\r\n
\r\n
\r\n
Amount to withdraw
\r\n
{{ amountToMove }}
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n ? \r\n \r\n \r\n \r\n
\r\n
\r\n
Amount Saved
\r\n
\r\n {{\r\n currencyPipe\r\n .transform(\r\n toInt(totalSavings) - calculations.amountToMove,\r\n \"R\"\r\n )\r\n .split(\",\")\r\n .join(\" \")\r\n .substring(\r\n 0,\r\n currencyPipe\r\n .transform(\r\n toInt(totalSavings) - calculations.amountToMove,\r\n \"R\"\r\n )\r\n .split(\",\")\r\n .join(\" \").length - 3\r\n )\r\n }}\r\n
\r\n
\r\n {{ amountToMove }}\r\n
\r\n
\r\n
\r\n
Value at Retirement
\r\n
\r\n R{{ memberRetirementProject.valueAtRetirement | number: \"1.0-0\":\"fr-FR\" }}\r\n \r\n
\r\n
\r\n
\r\n
Monthly pension after retirement
\r\n
\r\n R{{ memberRetirementProject.montlyIncomeProjection | number: \"1.0-0\":\"fr-FR\" }}\r\n \r\n
\r\n
\r\n
\r\n \r\n stay invested\r\n \r\n continue \r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n
\r\n \r\n\r\n \r\n
\r\n \r\n\r\n \r\n
\r\n \r\n\r\n \r\n
\r\n \r\n\r\n
\r\n \r\n\r\n \r\n
\r\n \r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n Here's how you can explore moving your retirement savings\r\n
\r\n
\r\n Explore the impact withdrawing could have on your retirement savings\r\n
\r\n
\r\n Use the impact slider to decide how much of your savings you'd like to\r\n move and see the estimated tax penalty.\r\n
\r\n
\r\n Use the impact slider to decide how much of your savings you'd like to\r\n withdraw and see the estimated tax penalty.\r\n
\r\n
\r\n
\r\n \r\n got it\r\n \r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n Here's how you can explore withdrawing all or some of your retirement\r\n savings in cash.\r\n
\r\n
\r\n Here's how you can explore withdrawing all or some of your retirement\r\n savings in cash.\r\n
\r\n
\r\n Use the impact slider to decide how much of your savings you'd like to\r\n withdraw and see the estimated tax penalty.\r\n
\r\n
\r\n
\r\n \r\n got it\r\n \r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n At any time during your exploration you can decide to stay invested or\r\n get connected to advice.\r\n
\r\n
\r\n The most important thing is to make sure you have enough money to live\r\n on when you retire. Please make sure you consider your future self.\r\n
\r\n
\r\n
\r\n \r\n got it\r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n
\r\n
\r\n These projections are for illustrative purposes only. They don’t\r\n constitute advice nor imply or guarantee any particular outcome. The\r\n projections are mathematical calculations of your expected retirement\r\n income and savings using your current personal information available and\r\n various assumptions about your personal circumstances, future salary\r\n increases and future investment returns.\r\n
\r\n
\r\n We advise that you contact a financial adviser to get a detailed\r\n projection.\r\n
\r\n
\r\n By using this information you acknowledge that you understand these notes\r\n and their implications for the projections provided. Alexforbes, the\r\n fund, the trustees or any of their employees or agents cannot accept any\r\n responsibility for losses arising from, or damages caused by, or expenses\r\n incurred by members as a result of using the information contained in this\r\n statement.\r\n
\r\n
\r\n \r\n\r\n \r\n","import { Component, OnInit } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'app-contact-details',\r\n templateUrl: './contact-details.component.html',\r\n styleUrls: ['./contact-details.component.scss']\r\n})\r\nexport class ContactDetailsComponent implements OnInit {\r\n\r\n constructor() { }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n}\r\n","\r\n
Contact details
\r\n
\r\n
\r\n","import { Component, OnInit } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'app-postal-address',\r\n templateUrl: './postal-address.component.html',\r\n styleUrls: ['./postal-address.component.scss']\r\n})\r\nexport class PostalAddressComponent implements OnInit {\r\n\r\n constructor() { }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n}\r\n","\r\n
Postal address
\r\n
\r\n
\r\n","import { Component, OnInit, HostListener } from \"@angular/core\";\r\nimport { RoutingService } from \"./../../../../services/routing.service\";\r\nimport { LoaderService } from \"./../../../../services/loader.service\";\r\nimport { ErrorService } from \"./../../../../services/error.service\";\r\nimport { Observable } from \"rxjs\";\r\nimport { HttpHeaders, HttpClient } from \"@angular/common/http\";\r\nimport { ContentService } from \"../../../../../../src/app/services/content.service\";\r\nimport { SavingCalculations } from \"../../models/savings-calculations.model\";\r\nimport { ClaimService } from \"../../store/retirement-savings/service/claimService.service\";\r\nimport { MemberDetails } from \"../../store/retirement-savings/model/retirement-savings.model\";\r\nimport { Constants } from \"../../../../../app/constants/constants\";\r\nimport { AuthenticationService } from \"src/app/services/authentication.service\";\r\nimport appsettings from \"../../../../../assets/appsettings.json\"\r\n\r\nexport class MemDetails {\r\n cellNo: string;\r\n email: string;\r\n}\r\n@Component({\r\n selector: \"app-profile-landing-page\",\r\n templateUrl: \"./profile-landing-page.component.html\",\r\n styleUrls: [\"./profile-landing-page.component.scss\"],\r\n})\r\nexport class ProfileLandingPageComponent implements OnInit {\r\n popIaDisclosurePath: string = \"\";\r\n scrolled = 0;\r\n infoIconDamPath: string = \"\";\r\n userName: string;\r\n profileUser: any;\r\n corporateId: string;\r\n corporate: any;\r\n memberDetails: MemberDetails;\r\n memberStatus: any;\r\n moveWithdrawFlag: number;\r\n page: string = \"profile\";\r\n currentStep: number = 1;\r\n showPopup: unknown = false;\r\n showError = false;\r\n retirementProjectionValues: any;\r\n savingsCalculations: SavingCalculations;\r\n savingsMemberValues: any;\r\n showRequiredInfo = false;\r\n memberValues: any;\r\n showValuesBlock: boolean;\r\n showRetirementDisclaimerPopup = false;\r\n calculationsCache: any;\r\n isDialogOpen: boolean;\r\n\r\n constructor(\r\n private routingService: RoutingService,\r\n private loader: LoaderService,\r\n private errorService: ErrorService,\r\n private httpClient: HttpClient,\r\n private contentService: ContentService,\r\n private auth: AuthenticationService,\r\n public claimService: ClaimService\r\n ) {}\r\n\r\n ngOnInit() {\r\n this.popIaDisclosurePath = Constants.popia_clause_form;\r\n this.infoIconDamPath = Constants.infoIconDamPath;\r\n this.loader.start();\r\n if (this.claimService.getMemberDetails() != null) {\r\n this.memberDetails = this.claimService.getMemberDetails();\r\n this.memberValues = this.claimService.getMemberValues();\r\n this.memberStatus = this.claimService.getMemberStatus();\r\n this.retirementProjectionValues = this.claimService.getProjections();\r\n this.showValuesBlock = true;\r\n this.loader.stop();\r\n } else {\r\n this.contentService.cacheDropdownOptions();\r\n this.getMemberDetails().subscribe(\r\n (resp: any) => {\r\n this.memberDetails = resp.member[0];\r\n this.claimService.setMemberDetails(this.memberDetails);\r\n this.getMemberStatus().subscribe(\r\n (val: any) => {\r\n this.memberStatus = val;\r\n this.claimService.setMemberStatus(this.memberStatus);\r\n this.getMemberValues().subscribe(\r\n (values) => {\r\n this.memberValues = values;\r\n this.showValuesBlock = true;\r\n this.claimService.setMemberValues(this.memberValues);\r\n this.loader.stop();\r\n if (this.memberStatus.CanClaim) {\r\n } else {\r\n this.loader.stop();\r\n this.goToSummaryPage();\r\n }\r\n },\r\n (error) => {\r\n this.loader.stop();\r\n this.errorService.openErrorPopup(\r\n \"An error occurred while getting the member details.\"\r\n );\r\n }\r\n );\r\n },\r\n (error) => {\r\n this.loader.stop();\r\n this.errorService.openErrorPopup(\r\n \"An error occurred while getting the member status.\"\r\n );\r\n }\r\n ); \r\n },\r\n (error) => {\r\n this.loader.stop();\r\n this.errorService.openErrorPopup(\r\n \"Sorry, but there are no active claims available linked to your details. Please speak to your HR team for assistance.\"\r\n );\r\n document.addEventListener((\"logoutAfterClose\"), (event) => {\r\n this.logout();\r\n });\r\n }\r\n );\r\n }\r\n // this.errorService.openErrorPopup('Please access the system from a desktop/laptop for the best user experience');\r\n }\r\n\r\n @HostListener('window:scroll', ['$event'])\r\n onWindowScroll($event: any) {\r\n const numb = window.scrollY;\r\n if (numb >= 400){\r\n this.scrolled = 1;\r\n }\r\n else {\r\n this.scrolled = 0;\r\n }\r\n }\r\n\r\n getMemberDetails(): Observable {\r\n const headers = new HttpHeaders().set(\r\n \"Authorization\",\r\n this.auth.getAuthorizationHeaderValue()\r\n );\r\n const options = { headers: headers };\r\n const url = `${appsettings.digitalHRAssisServicesUrl}${appsettings.endPoints.memberDetails}`;\r\n return this.httpClient.get(url, options);\r\n }\r\n\r\n getMemberStatus(): Observable {\r\n const headers = new HttpHeaders().set(\r\n \"Authorization\",\r\n this.auth.getAuthorizationHeaderValue()\r\n );\r\n const options = { headers: headers };\r\n const url = `${appsettings.digitalClaimsService}${appsettings.endPoints.claimStatus}?MembershipNumber=${this.memberDetails.membership[0].subscriptionNumber}&FundId=${this.memberDetails.membership[0].fundId}`;\r\n return this.httpClient.get(url, options);\r\n }\r\n\r\n getMemberValues(): Observable {\r\n const headers = new HttpHeaders().set(\r\n \"Authorization\",\r\n this.auth.getAuthorizationHeaderValue()\r\n );\r\n const options = { headers: headers };\r\n const url = `${appsettings.digitalMemberServicesUrl}${appsettings.endPoints.memberFundValues}?MembershipNumber=${this.memberDetails.membership[0].subscriptionNumber}&FundId=${this.memberDetails.membership[0].fundId}`;\r\n return this.httpClient.get(url, options);\r\n }\r\n\r\n goToSummaryPage() {\r\n this.routingService.savingsSummary();\r\n }\r\n\r\n scrollTo() {\r\n document.getElementById('#information-be-aware')!.scrollIntoView();\r\n }\r\n\r\n growSavings() {\r\n this.routingService.confirmDetails();\r\n }\r\n\r\n logout() {\r\n this.auth.logout(false);\r\n }\r\n\r\n next(step: any) {\r\n if (step === \"done\") {\r\n const savings = Math.floor(this.memberValues.FundCredit);\r\n this.routingService.moveSavings(this.moveWithdrawFlag, savings);\r\n } else {\r\n this.currentStep = step;\r\n }\r\n }\r\n prev(step: any) {\r\n this.currentStep = step;\r\n }\r\n\r\n projectionsCacheInitialized(cache: any) {\r\n this.claimService.setProjections(cache);\r\n }\r\n\r\n resetProjections() {\r\n this.claimService.setProjections(this.retirementProjectionValues);\r\n }\r\n}\r\n\r\n","\r\n\r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n {{ memberDetails.firstName }} {{ memberDetails.surname }} \r\n
\r\n
\r\n \r\n Log out\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n Find out \r\n how we protect your personal information, privacy and security.\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n {{ memberDetails.firstName }} {{ memberDetails.surname }} \r\n
\r\n
\r\n
\r\n Here are your retirement savings from your \r\n time at {{ memberDetails.employerName }}\r\n \r\n
\r\n
\r\n
\r\n \r\n\r\n
\r\n
\r\n
\r\n
\r\n Your retirement savings are currently invested \r\n
\r\n
\r\n
\r\n Your retirement savings will remain safely in-fund and can\r\n continue to grow even though you are no longer contributing\r\n towards it. Here are a few benefits of keeping your retirement\r\n savings invested: \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
Save \r\n
\r\n
\r\n \r\n This is the easiest option. Leave your money where is and your\r\n retirement savings can continue to grow. You can decide what to do\r\n with your savings at a later date or just leave them where they\r\n are until you retire. \r\n
\r\n
\r\n \r\n EXPLORE THIS OPTION\r\n \r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
Move \r\n
\r\n
\r\n You can move some or all of your retirement savings to another\r\n fund. The savings you move to another fund can continue to\r\n grow. \r\n
\r\n
\r\n \r\n EXPLORE THIS OPTION\r\n \r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
Withdraw \r\n
\r\n
\r\n Withdraw all or some of your savings in cash. You could pay up to\r\n 36% tax on the withdrawal of the amount. \r\n
\r\n
\r\n \r\n EXPLORE THIS OPTION\r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n Submit\r\n \r\n \r\n\r\n
\r\n\r\n \r\n
\r\n \r\n\r\n
\r\n \r\n
\r\n Decisions about your retirement savings are very important.\r\n \r\n
\r\n Please think about what we're going to say next to help you get ready to\r\n make your decision.\r\n
\r\n
\r\n \r\n
\r\n Here's some information to help you get ready\r\n \r\n
\r\n Your retirement savings need to last you for the rest of your life after\r\n you retire\r\n \r\n
\r\n It is estimated that you will live 20 years longer than your\r\n grandparents. Think about how long you might live. \r\n Do you think you will have enough money to last you that long?\r\n
\r\n
\r\n You need to save enough to live on when you retire\r\n \r\n
\r\n If you had saved 1 million Rand in today's money when you retire, you\r\n could get a pension of approximately R5 000 a month. \r\n Do you think you will have enough to live on when you retire?\r\n
\r\n
\r\n \r\n\r\n
\r\n \r\n
\r\n
\r\n These projections are for illustrative purposes only. They don’t\r\n constitute advice nor imply or guarantee any particular outcome. The\r\n projections are mathematical calculations of your expected retirement\r\n income and savings using your current personal information available and\r\n various assumptions about your personal circumstances, future salary\r\n increases and future investment returns.\r\n
\r\n
\r\n We advise that you contact a financial adviser to get a detailed\r\n projection.\r\n
\r\n
\r\n By using this information you acknowledge that you understand these\r\n notes and their implications for the projections provided. Alexander\r\n Forbes, the fund, the trustees or any of their employees or agents\r\n cannot accept any responsibility for losses arising from, or damages\r\n caused by, or expenses incurred by members as a result of using the\r\n information contained in this statement.\r\n
\r\n
\r\n \r\n\r\n
\r\n
\r\n","import { Component, OnInit, Input, Output, EventEmitter } from \"@angular/core\";\r\nimport { FormGroup, FormControl, Validators } from \"@angular/forms\";\r\nimport {\r\n RetirementSavings,\r\n BankingDetails,\r\n Calculations,\r\n} from \"../../../store/retirement-savings/retirementsavings\";\r\nimport { ErrorService } from \"./../../../../../services/error.service\";\r\nimport { HttpHeaders, HttpClient } from \"@angular/common/http\";\r\nimport { WithdrawalAmountProjectionServiceService } from \"../../withdrawal-amount-projection-service.service\";\r\nimport { ActivatedRoute } from \"@angular/router\";\r\nimport { ActiveTab } from \"../shared/enum\";\r\nimport { ClaimService } from \"../../../store/retirement-savings/service/claimService.service\";\r\nimport { LoaderService } from \"./../../../../../services/loader.service\";\r\nimport { StoreService } from \"./../../../../../services/storeService\";\r\nimport { banks } from \"./../../../../../constants/banks\";\r\nimport { AuthenticationService } from \"../../../../../services/authentication.service\";\r\nimport { getErrorMessage } from \"../../../../../shared/common-functions\";\r\nimport appsettings from \"../../../../../../assets/appsettings.json\"\r\n\r\n@Component({\r\n selector: \"app-banking-details\",\r\n templateUrl: \"./banking-details.component.html\",\r\n styleUrls: [\"./banking-details.component.scss\"],\r\n})\r\nexport class BankingDetailsComponent implements OnInit {\r\n bankingDetailsForm: FormGroup;\r\n retirementSavings: RetirementSavings;\r\n bankingDetails: BankingDetails;\r\n bankingFormInvalid: boolean = false;\r\n private _headers: HttpHeaders;\r\n memberAction: string;\r\n amountToMove: any;\r\n savingsLeft: any;\r\n taxTobePaid: number = 0;\r\n payout: number = 0;\r\n moveWithDrawFlag: number;\r\n totalSavings: number;\r\n percentage: number;\r\n calculations: Calculations;\r\n calculateTaxAmount: number;\r\n @Input() fullTransfer: boolean;\r\n @Input() fullWithdrawal: boolean;\r\n @Input() fullCash: boolean;\r\n @Input() partTransfer: boolean;\r\n @Input() activeTab: ActiveTab;\r\n @Output() continue = new EventEmitter();\r\n @Output() next = new EventEmitter();\r\n banksResp: any;\r\n banks: {\r\n bankName: string;\r\n defaultBranchCode: string;\r\n id: number;\r\n isActive: boolean;\r\n }[] = [];\r\n\r\n constructor(\r\n private errorService: ErrorService,\r\n protected _route: ActivatedRoute,\r\n public claimService: ClaimService,\r\n private loader: LoaderService,\r\n private auth: AuthenticationService,\r\n private withdrawalAmountProjectionService: WithdrawalAmountProjectionServiceService,\r\n private httpClient: HttpClient\r\n ) {\r\n this.bankingDetails = new BankingDetails();\r\n this.retirementSavings = this.claimService.getRetirementSavings();\r\n this.bankingDetails = this.claimService.getBankingDetails();\r\n }\r\n\r\n ngOnInit() {\r\n this.getBankNames();\r\n if (this.retirementSavings) {\r\n this.memberAction =\r\n this.retirementSavings.moveWithDrawFlag == 1 ? \"Move\" : \"Withdraw\";\r\n this.amountToMove = this.retirementSavings.amountToMove;\r\n this.moveWithDrawFlag = this.retirementSavings.moveWithDrawFlag;\r\n this.totalSavings = this.retirementSavings.totalSavings;\r\n this.amountToMove = this.retirementSavings.amountToMove;\r\n this.savingsLeft = this.retirementSavings.savingsLeft;\r\n this.taxTobePaid = this.retirementSavings.tax;\r\n this.payout = this.retirementSavings.payout;\r\n this.percentage = this.retirementSavings.percentage;\r\n } else {\r\n this.retirementSavings = this.claimService.getRetirementSavings();\r\n if (!this.retirementSavings) {\r\n this.retirementSavings = new RetirementSavings();\r\n this._route.queryParams.subscribe((parameters) => {\r\n this.moveWithDrawFlag = parameters[\"flag\"];\r\n this.memberAction = this.moveWithDrawFlag == 1 ? \"Move\" : \"Withdraw\";\r\n this.totalSavings = parameters[\"sv\"].replace(/\\s/g, \"\");\r\n this.percentage = parameters[\"pt\"];\r\n this.calculations = this.claimService.getCalculations(\r\n this.percentage,\r\n this.totalSavings\r\n );\r\n this.retirementSavings.amountToMove = this.calculations.amountToMove;\r\n this.retirementSavings.savingsLeft = this.calculations.savingsLeft;\r\n if (this.percentage < 100) {\r\n this.calculateTaxAmount = this.calculations.savingsLeft;\r\n } else {\r\n this.calculateTaxAmount = this.calculations.amountToMove;\r\n }\r\n this.retirementSavings.percentage = this.percentage;\r\n this.retirementSavings.fullPartFlag = this.percentage < 100 ? 2 : 1;\r\n this.retirementSavings.moveWithDrawFlag = this.moveWithDrawFlag;\r\n this.retirementSavings.totalSavings = this.totalSavings;\r\n if (this.fullTransfer) {\r\n this.taxTobePaid = 0;\r\n this.payout = 0;\r\n this.retirementSavings.tax = 0;\r\n this.retirementSavings.payout = 0;\r\n this.claimService.setRetirementSavings(this.retirementSavings);\r\n } else {\r\n this.withdrawalAmountProjectionService\r\n .getTaxPayout(this.calculateTaxAmount)\r\n .subscribe(\r\n (resp) => {\r\n this.taxTobePaid = resp.taxPayable;\r\n this.payout = resp.netOfTax;\r\n this.retirementSavings.tax = this.taxTobePaid;\r\n this.retirementSavings.payout = this.payout;\r\n this.claimService.setRetirementSavings(\r\n this.retirementSavings\r\n );\r\n },\r\n (error) => {\r\n this.errorService.openErrorPopup(\r\n \"An error occurred while getting the tax details.\"\r\n );\r\n }\r\n );\r\n }\r\n });\r\n }\r\n }\r\n if (this.claimService) {\r\n this.bankingDetails = this.claimService.getBankingDetails();\r\n if (!this.bankingDetails) {\r\n this.bankingDetails = new BankingDetails();\r\n }\r\n }\r\n this.onCreateBankingDetailsForm();\r\n }\r\n\r\n getBankNames() {\r\n this.banks = banks;\r\n }\r\n\r\n onCreateBankingDetailsForm() {\r\n this.bankingDetailsForm = new FormGroup({\r\n accHolderName: new FormControl(null, [\r\n Validators.required,\r\n Validators.pattern(\"^[a-zA-Z\\- ]*$\"),\r\n ]),\r\n accountNumber: new FormControl(null, [\r\n Validators.required,\r\n Validators.pattern(\"^$|^[0-9]*$\"),\r\n ]),\r\n bankName: new FormControl(null, [Validators.required]),\r\n branchCode: new FormControl(null, [\r\n Validators.required,\r\n Validators.pattern(\"^$|^[0-9]*$\"),\r\n ]),\r\n accountType: new FormControl(null, [Validators.required]),\r\n });\r\n }\r\n\r\n public getBankingData(): void {\r\n if (!this.bankingDetails) {\r\n this.bankingDetails = new BankingDetails();\r\n }\r\n this.bankingDetails.accHolderName = \r\n this.bankingDetailsForm.get(\"accHolderName\")?.value;\r\n this.bankingDetails.accountNumber =\r\n this.bankingDetailsForm.get(\"accountNumber\")?.value;\r\n this.bankingDetails.bankName =\r\n this.bankingDetailsForm.get(\"bankName\")?.value;\r\n this.bankingDetails.branchCode =\r\n this.bankingDetailsForm.get(\"branchCode\")?.value;\r\n this.bankingDetails.accountType =\r\n this.bankingDetailsForm.get(\"accountType\")?.value;\r\n }\r\n\r\n validateBankingDetails(option: string, tab: string): boolean {\r\n this.loader.start();\r\n this.validateBankDetails().subscribe(\r\n (val) => {\r\n if (val.IsValid) {\r\n this.loader.stop();\r\n this.getBankingData();\r\n this.continue.emit(this.bankingDetails);\r\n if (option == \"2\") {\r\n this.next.emit(tab);\r\n }\r\n } else {\r\n this.loader.stop();\r\n this.errorService.openErrorPopup(\r\n \"Please enter valid banking details.\"\r\n );\r\n this.bankingFormInvalid = true;\r\n }\r\n return true;\r\n },\r\n (error) => {\r\n this.loader.stop();\r\n let errorMessage = getErrorMessage(error);\r\n this.errorService.openErrorPopup(\r\n \"Error while validating Bank details: \" + errorMessage\r\n );\r\n return false;\r\n }\r\n );\r\n return false;\r\n }\r\n\r\n validateBankDetails() {\r\n const data = {\r\n accountNumber: this.bankingDetails.accountNumber,\r\n accountType: this.bankingDetails.accountType,\r\n branchCode: this.bankingDetails.branchCode,\r\n };\r\n const headers = new HttpHeaders().set(\r\n \"Authorization\",\r\n this.auth.getAuthorizationHeaderValue()\r\n );\r\n const url = `${appsettings.digitalMemberServicesUrl}${appsettings.endPoints.validateBankingDetails}`;\r\n const options = { headers: headers };\r\n return this.httpClient.post(url, data, options);\r\n }\r\n\r\n continueTab() {\r\n if (this.bankingDetailsForm.invalid) {\r\n this.bankingFormInvalid = true;\r\n this.errorService.openErrorPopup(\r\n \"Please fill in all the required banking details, in the correct format.\"\r\n );\r\n } else {\r\n this.validateBankingDetails(\"1\", \"\");\r\n }\r\n }\r\n\r\n nextTab(tab: string) {\r\n if (this.bankingDetailsForm.invalid) {\r\n this.bankingFormInvalid = true;\r\n this.errorService.openErrorPopup(\r\n \"Please fill in all the required banking details, in the correct format.\"\r\n );\r\n } else {\r\n this.validateBankingDetails(\"2\", tab);\r\n }\r\n }\r\n\r\n ondropDownChange(event:any) {\r\n this.bankingDetailsForm.controls[\"bankName\"].patchValue(event.target.value);\r\n const bank = this.banks.filter((x) => x.id == event.target.value)[0];\r\n this.bankingDetails.branchCode = bank.defaultBranchCode;\r\n }\r\n}\r\n","\r\n \r\n\r\n\r\n
\r\n
\r\n
\r\n
\r\n Please provide your own personal banking details and\r\n
\r\n
\r\n not someone else's (such as a spouse or family member)\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
Amount to withdraw
\r\n
R{{ (memberAction === 'Move' ? this.retirementSavings.totalSavings - this.retirementSavings.amountToMove: this.retirementSavings.amountToMove) | number:'':'fr-FR' }}
\r\n
\r\n
\r\n
Estimated tax
\r\n
R{{retirementSavings.tax | number:'1.0-0':'fr-FR'}}
\r\n
\r\n
\r\n
Payout after tax
\r\n
R{{retirementSavings.payout | number:'1.0-0':'fr-FR'}}
\r\n
\r\n
\r\n
Savings left
\r\n
R{{ (memberAction === 'Move' ? retirementSavings.amountToMove: retirementSavings.totalSavings - retirementSavings.amountToMove) | number:'':'fr-FR' }}
\r\n
\r\n
\r\n\r\n
\r\n continue \r\n
\r\n
\r\n\r\n
\r\n\r\n\r\n","import {\r\n Component,\r\n OnInit,\r\n OnDestroy,\r\n Output,\r\n EventEmitter,\r\n Input,\r\n} from \"@angular/core\";\r\nimport { FormGroup, FormControl, Validators } from \"@angular/forms\";\r\nimport {\r\n RetirementSavings,\r\n RetirementSavingsStore,\r\n BrokerDetails,\r\n Calculations,\r\n} from \"../../../store/retirement-savings/retirementsavings\";\r\nimport { ErrorService } from \"./../../../../../services/error.service\";\r\nimport { WithdrawalAmountProjectionServiceService } from \"../../withdrawal-amount-projection-service.service\";\r\nimport { ActivatedRoute } from \"@angular/router\";\r\nimport { ActiveTab } from \"../shared/enum\";\r\nimport { ClaimService } from \"../../../store/retirement-savings/service/claimService.service\";\r\nimport { StoreService } from \"../../../../../../../src/app/services/storeService\";\r\nimport { HttpHeaders, HttpClient } from \"@angular/common/http\";\r\nimport { Subscription } from \"rxjs\";\r\nimport { LoaderService } from \"../../../../../../../src/app/services/loader.service\";\r\nimport { messages } from \"../../../../../constants/warningAndErrorMessages\";\r\nimport { getErrorMessage } from \"../../../../../shared/common-functions\";\r\nimport appsettings from \"../../../../../../assets/appsettings.json\"\r\n\r\n@Component({\r\n selector: \"app-broker-details\",\r\n templateUrl: \"./broker-details.component.html\",\r\n styleUrls: [\"./broker-details.component.scss\"],\r\n})\r\nexport class BrokerDetailsComponent implements OnInit, OnDestroy {\r\n brokerDetailsForm: FormGroup;\r\n retirementSavings: RetirementSavings;\r\n brokerDetails: BrokerDetails;\r\n memberAction: string;\r\n amountToMove: any;\r\n savingsLeft: any;\r\n stay: boolean = false;\r\n taxTobePaid: number = 0;\r\n payout: number = 0;\r\n moveWithDrawFlag: number;\r\n totalSavings: number;\r\n percentage: number;\r\n calculations: Calculations;\r\n brokerFormInvalid: boolean = false;\r\n calculateTaxAmount: number;\r\n afrisProducts: any;\r\n productsDetailsVisible: boolean;\r\n products: { id: number; name: string }[] = [];\r\n otherProduct: boolean = false;\r\n selectedProduct: number;\r\n selectedProductName: string;\r\n prompt: string;\r\n public sendToBroker: boolean;\r\n protected _subscriptions = new Array();\r\n messages = messages;\r\n cellPhoneNumberError: boolean = false;\r\n workPhoneNumberError: boolean = false;\r\n emailFormatError: boolean = false;\r\n @Input() fullTransfer: boolean;\r\n @Input() fullWithdrawal: boolean;\r\n @Input() activeTab: ActiveTab;\r\n @Input() showTaxPayout: boolean;\r\n @Input() fullCash: boolean;\r\n @Input() partTransfer: boolean;\r\n @Output() continue = new EventEmitter();\r\n @Output() next = new EventEmitter();\r\n @Output() connectToAdvice = new EventEmitter();\r\n\r\n constructor(\r\n private withdrawalAmountProjectionService: WithdrawalAmountProjectionServiceService,\r\n public claimService: ClaimService,\r\n protected _route: ActivatedRoute,\r\n private storeService: StoreService,\r\n private httpClient: HttpClient,\r\n protected route: ActivatedRoute,\r\n private errorService: ErrorService,\r\n private loader: LoaderService\r\n ) {\r\n this.brokerDetails = new BrokerDetails();\r\n this.retirementSavings = this.claimService.getRetirementSavings();\r\n this.brokerDetails = this.claimService.getBrokerDetails();\r\n }\r\n\r\n ngOnInit() {\r\n this.getProductsTypesList();\r\n\r\n if (this.retirementSavings) {\r\n this.memberAction =\r\n this.retirementSavings.moveWithDrawFlag == 1 ? \"Move\" : \"Withdraw\";\r\n this.moveWithDrawFlag = this.retirementSavings.moveWithDrawFlag;\r\n this.totalSavings = this.retirementSavings.totalSavings;\r\n this.amountToMove = this.retirementSavings.amountToMove;\r\n this.savingsLeft = this.retirementSavings.savingsLeft;\r\n this.taxTobePaid = this.retirementSavings.tax;\r\n this.payout = this.retirementSavings.payout;\r\n this.percentage = this.retirementSavings.percentage;\r\n } else {\r\n this.retirementSavings = new RetirementSavings();\r\n this._route.queryParams.subscribe((parameters) => {\r\n this.moveWithDrawFlag = parameters[\"flag\"];\r\n this.totalSavings = parameters[\"sv\"].replace(/\\s/g, \"\");\r\n this.percentage = parameters[\"pt\"];\r\n this.calculations = this.claimService.getCalculations(\r\n this.percentage,\r\n this.totalSavings\r\n );\r\n this.retirementSavings.amountToMove = this.calculations.amountToMove;\r\n this.retirementSavings.savingsLeft = this.calculations.savingsLeft;\r\n this.memberAction = this.moveWithDrawFlag == 1 ? \"Move\" : \"Withdraw\";\r\n if (this.percentage < 100) {\r\n this.calculateTaxAmount = this.calculations.savingsLeft;\r\n } else {\r\n this.calculateTaxAmount = this.calculations.amountToMove;\r\n }\r\n this.retirementSavings.percentage = this.percentage;\r\n this.retirementSavings.fullPartFlag = this.percentage < 100 ? 2 : 1;\r\n this.retirementSavings.moveWithDrawFlag = this.moveWithDrawFlag;\r\n this.retirementSavings.totalSavings = this.totalSavings;\r\n if (this.fullTransfer) {\r\n this.taxTobePaid = 0;\r\n this.payout = 0;\r\n this.retirementSavings.tax = 0;\r\n this.retirementSavings.payout = 0;\r\n this.claimService.setRetirementSavings(this.retirementSavings);\r\n } else {\r\n this.withdrawalAmountProjectionService\r\n .getTaxPayout(this.calculateTaxAmount)\r\n .subscribe(\r\n (resp) => {\r\n this.taxTobePaid = resp.taxPayable;\r\n this.payout = resp.netOfTax;\r\n this.retirementSavings.tax = this.taxTobePaid;\r\n this.retirementSavings.payout = this.payout;\r\n this.claimService.setRetirementSavings(this.retirementSavings);\r\n },\r\n (error) => {\r\n this.errorService.openErrorPopup(\r\n \"An error occurred while getting the tax details.\"\r\n );\r\n }\r\n );\r\n }\r\n });\r\n }\r\n if (this.claimService) {\r\n this.brokerDetails = this.claimService.getBrokerDetails();\r\n if (!this.brokerDetails) {\r\n this.brokerDetails = new BrokerDetails();\r\n }\r\n }\r\n this.onCreateBrokerDetailsForm();\r\n\r\n this._subscriptions.push(\r\n this.route.queryParams.subscribe((params) => {\r\n this.prompt = params[\"prompt\"];\r\n })\r\n );\r\n }\r\n\r\n getProductsTypesList() {\r\n this.loader.start();\r\n this.products.push({\r\n id: 0,\r\n name: \"\",\r\n });\r\n\r\n this.getProducTypes().subscribe(\r\n (resp) => {\r\n this.afrisProducts = resp;\r\n this.loader.stop();\r\n this.afrisProducts.forEach((product:any) => {\r\n this.products.push({\r\n id: product.id,\r\n name: product.name,\r\n });\r\n });\r\n },\r\n (error) => {\r\n this.loader.stop();\r\n let errorMessage = getErrorMessage(error);\r\n this.errorService.openErrorPopup(\r\n \"Error while getting Product Types: \" + errorMessage\r\n );\r\n }\r\n );\r\n }\r\n getProducTypes() {\r\n const token = this.storeService.getStoredData().access_token;\r\n const headers = new HttpHeaders().set(\"Authorization\", `Bearer ${token}`);\r\n const options = { headers: headers };\r\n const url = `${appsettings.digitalHRAssisServicesUrl}${appsettings.endPoints.productTypeLookup}`;\r\n return this.httpClient.get(url, options);\r\n }\r\n\r\n onProductChange($event: { target: { selectedOptions: { text: string; }[]; }; }, productId: number) {\r\n if (productId == 4) {\r\n this.otherProduct = true;\r\n } else {\r\n this.otherProduct = false;\r\n this.selectedProductName = $event.target.selectedOptions[0].text;\r\n }\r\n }\r\n\r\n onWorkNumberChange() {\r\n if (this.brokerDetailsForm.controls[\"brokerNumber\"].invalid) {\r\n this.workPhoneNumberError = true;\r\n } else {\r\n this.workPhoneNumberError = false;\r\n }\r\n }\r\n\r\n onEmailChange() {\r\n if (this.brokerDetailsForm.controls[\"brokerEmail\"].invalid) {\r\n this.emailFormatError = true;\r\n } else {\r\n this.emailFormatError = false;\r\n }\r\n }\r\n\r\n onCellNumberChange() {\r\n if (this.brokerDetailsForm.controls[\"brokerCell\"].invalid) {\r\n this.cellPhoneNumberError = true;\r\n } else {\r\n this.cellPhoneNumberError = false;\r\n }\r\n }\r\n\r\n onCreateBrokerDetailsForm() {\r\n this.brokerDetailsForm = new FormGroup({\r\n newFundName: new FormControl(null, [Validators.pattern(\"^[a-zA-Z- ]*$\")]),\r\n brokerCell: new FormControl(null, [\r\n Validators.required,\r\n Validators.pattern(\"^([0|+[0-9]{1,5})?([1-9][0-9]{8}|[1-9][0-9]{9})$\"),\r\n ]),\r\n brokerName: new FormControl(null, [\r\n Validators.required,\r\n Validators.pattern(\"^[a-zA-Z-,]+(\\s{0,1}[a-zA-Z-, ])*$\"),\r\n ]),\r\n brokerEmail: new FormControl(null, [\r\n Validators.required,\r\n Validators.pattern(\r\n \"^\\\\w+([\\\\.-]?\\\\w+)*@\\\\w+([\\\\.-]?\\\\w+)*(\\\\.\\\\w{2,4})+$\"\r\n ),\r\n ]),\r\n brokerNumber: new FormControl(null, [\r\n Validators.required,\r\n Validators.pattern(\"^([0|+[0-9]{1,5})?([1-9][0-9]{8}|[1-9][0-9]{9})$\"),\r\n ]),\r\n productName: new FormControl(null, [Validators.pattern(\"^[a-zA-Z- ]*$\")]),\r\n sendToBroker: new FormControl(\"\"),\r\n productsDetailsVisible: new FormControl(\"\"),\r\n });\r\n }\r\n\r\n continueTab(data: string) {\r\n if (this.brokerDetailsForm.invalid) {\r\n this.brokerFormInvalid = true;\r\n this.errorService.openErrorPopup(\r\n \"Please fill in all the required broker details, in the correct format.\"\r\n );\r\n } else {\r\n this.getBrokerData();\r\n this.continue.emit(this.brokerDetails);\r\n }\r\n }\r\n nextTab(tab: string) {\r\n if (this.brokerDetailsForm.invalid) {\r\n this.brokerFormInvalid = true;\r\n this.errorService.openErrorPopup(\r\n \"Please fill in all the required broker details, in the correct format.\"\r\n );\r\n } else {\r\n this.getBrokerData();\r\n this.continue.emit(this.brokerDetails);\r\n this.next.emit(tab);\r\n }\r\n }\r\n\r\n getBrokerData(): void {\r\n if (!this.brokerDetails) {\r\n this.brokerDetails = new BrokerDetails();\r\n }\r\n if (this.prompt === \"save\") {\r\n this.brokerDetails.newFundName =\r\n this.brokerDetailsForm.get(\"productName\")?.value != null\r\n ? this.brokerDetailsForm.get(\"productName\")?.value\r\n : this.selectedProductName;\r\n } else {\r\n this.brokerDetails.newFundName =\r\n this.brokerDetailsForm.get(\"newFundName\")?.value;\r\n }\r\n this.brokerDetails.brokerCell =\r\n this.brokerDetailsForm.get(\"brokerCell\")?.value;\r\n this.brokerDetails.brokerName =\r\n this.brokerDetailsForm.get(\"brokerName\")?.value;\r\n this.brokerDetails.brokerEmail =\r\n this.brokerDetailsForm.get(\"brokerEmail\")?.value;\r\n this.brokerDetails.brokerNumber =\r\n this.brokerDetailsForm.get(\"brokerNumber\")?.value;\r\n this.brokerDetails.isAdvised = this.brokerDetailsForm.get(\"productsDetailsVisible\")?.value;\r\n this.brokerDetails.sendtoBroker =\r\n this.brokerDetailsForm.get(\"sendToBroker\")?.value;\r\n }\r\n\r\n toggleDisplay() {\r\n if (this.productsDetailsVisible) {\r\n this.productsDetailsVisible = false;\r\n document.getElementById(\"toggleBG\")?.classList.remove(\"bg-orange-600\");\r\n document.getElementById(\"toggleBG\")?.classList.add(\"bg-gray-400\");\r\n } else {\r\n this.productsDetailsVisible = true;\r\n document.getElementById(\"toggleBG\")?.classList.remove(\"bg-gray-400\");\r\n document.getElementById(\"toggleBG\")?.classList.add(\"bg-orange-600\");\r\n }\r\n }\r\n\r\n ngOnDestroy() {}\r\n\r\n toggleTaxPopUp() {\r\n this.showTaxPayout = false;\r\n localStorage.removeItem(\"showTaxInfo\");\r\n }\r\n\r\n onConnectToAdvice() {\r\n this.connectToAdvice.emit();\r\n }\r\n}\r\n","\r\n \r\n\r\n\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
Amount to withdraw
\r\n
\r\n R{{ (memberAction === 'Move' ? retirementSavings.totalSavings - retirementSavings.amountToMove:\r\n retirementSavings.amountToMove) | number:'':'fr-FR' }}\r\n
\r\n
\r\n
\r\n
Estimated tax
\r\n
\r\n R{{retirementSavings.tax | number:'1.0-0':'fr-FR'}}
\r\n\r\n
\r\n
\r\n
Payout after tax
\r\n
\r\n R{{retirementSavings.payout | number:'1.0-0':'fr-FR'}}
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
Payout after tax estimation \r\n
\r\n The 'Payout after tax' amount may not be the total amount\r\n paid to you, depending on withdrawals you have made when leaving\r\n jobs previously. If you would like help working out tax of your savings,\r\n please contact an adviser.\r\n
\r\n
\r\n
Got\r\n it \r\n
\r\n Connect to\r\n advice \r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
Savings left
\r\n
Savings to move
\r\n
\r\n R{{ (memberAction === 'Move' ? retirementSavings.amountToMove: retirementSavings.totalSavings -\r\n retirementSavings.amountToMove) | number:'':'fr-FR' }}\r\n
\r\n
\r\n
\r\n\r\n
\r\n continue \r\n
\r\n
\r\n
","import { Component, OnInit } from \"@angular/core\";\r\nimport { RoutingService } from \"../../../../services/routing.service\";\r\nimport { ActiveTab } from \"./shared/enum\";\r\nimport {\r\n RetirementSavings,\r\n MemberContactDetails,\r\n Calculations,\r\n MemberDetails,\r\n MemberValues,\r\n} from \"../../store/retirement-savings/retirementsavings\";\r\nimport { Constants } from \"../../../../../app/constants/constants\";\r\n\r\nimport { ErrorService } from \"../../../../services/error.service\";\r\nimport { ClaimService } from \"../../store/retirement-savings/service/claimService.service\";\r\nimport { HttpClient, HttpHeaders } from \"@angular/common/http\";\r\nimport { LoaderService } from \"../../../../services/loader.service\";\r\nimport { ActivatedRoute } from \"@angular/router\";\r\nimport { WithdrawalAmountProjectionServiceService } from \"../withdrawal-amount-projection-service.service\";\r\nimport { UtilitiesService } from \"../../../../services/utilities.service\";\r\nimport { eWithdrawalOption } from \"../../store/retirement-savings/service/enum\";\r\nimport { AuthenticationService } from \"../../../../services/authentication.service\";\r\nimport { User } from \"oidc-client\";\r\nimport { getErrorMessage } from \"../../../../shared/common-functions\";\r\nimport appsettings from \"../../../../../assets/appsettings.json\"\r\n\r\n@Component({\r\n selector: \"app-savings-details\",\r\n templateUrl: \"./savings-details.component.html\",\r\n styleUrls: [\"./savings-details.component.scss\"],\r\n})\r\nexport class SavingsDetailsComponent implements OnInit {\r\n popIaDisclosurePath: String = \"\";\r\n infoIconDamPath: String = \"\";\r\n firstName: String;\r\n surname: String;\r\n active = ActiveTab;\r\n showToolTip: boolean = true;\r\n retirementsavings: RetirementSavings;\r\n memberAction: string;\r\n memberDetails: MemberDetails;\r\n activeTab: ActiveTab = ActiveTab.BROKER_DETAILS;\r\n formInvalid: boolean = false;\r\n brokerFormInvalid: boolean = false;\r\n bankingFormInvalid: boolean = false;\r\n incomeTaxNumber: string = \"\";\r\n amountToMove: any;\r\n claimSuccess: boolean = false;\r\n route: string = \"summary\";\r\n taxTobePaid: number = 0;\r\n savingsLeft: number;\r\n payout: number = 0;\r\n claimId: string;\r\n empEmail: string;\r\n private validateTaxRef: boolean = false;\r\n moveWithDrawFlag: number;\r\n totalSavings: number;\r\n percentage: number;\r\n calculations: Calculations;\r\n memberValues: MemberValues;\r\n fullTransfer: boolean = false;\r\n fullWithdrawal: boolean = false;\r\n partTransfer: boolean = false;\r\n fullCash: boolean = false;\r\n calculateTaxAmount: number;\r\n employeeId: any;\r\n showTaxPopUp: boolean;\r\n connect: boolean = false;\r\n afris: boolean;\r\n memberPersonalDetails: any;\r\n member: User | null = null;\r\n claimErrorMsg: string = \"An error occurred while submitting the claim.\";\r\n isDialogOpen: boolean;\r\n\r\n constructor(\r\n private auth: AuthenticationService,\r\n private routingService: RoutingService,\r\n private errorService: ErrorService,\r\n public claimService: ClaimService,\r\n private httpClient: HttpClient,\r\n private loader: LoaderService,\r\n protected _route: ActivatedRoute,\r\n private utils: UtilitiesService,\r\n private withdrawalAmountProjectionService: WithdrawalAmountProjectionServiceService\r\n ) {\r\n this.retirementsavings = this.claimService.getRetirementSavings();\r\n this.memberDetails = this.claimService.getMemberDetails();\r\n this.memberValues = this.claimService.getMemberValues();\r\n }\r\n\r\n ngOnInit() {\r\n this.popIaDisclosurePath = Constants.popia_clause_form;\r\n this.infoIconDamPath = Constants.infoIconDamPath;\r\n this.auth\r\n .getClaims()\r\n .then((member) => {\r\n this.member = member;\r\n this.firstName = this.member?.profile.given_name!;\r\n this.surname = this.member?.profile.family_name!;\r\n this.memberDetails = this.claimService.getMemberDetails();\r\n this.memberValues = this.claimService.getMemberValues();\r\n if (this.retirementsavings) {\r\n this.memberAction =\r\n this.retirementsavings.moveWithDrawFlag == 1 ? \"Move\" : \"Withdraw\";\r\n this.moveWithDrawFlag = this.retirementsavings.moveWithDrawFlag;\r\n this.totalSavings = this.retirementsavings.totalSavings;\r\n this.amountToMove = this.retirementsavings.amountToMove;\r\n this.savingsLeft = this.retirementsavings.savingsLeft;\r\n this.taxTobePaid = this.retirementsavings.tax;\r\n this.payout = this.retirementsavings.payout;\r\n this.percentage = this.retirementsavings.percentage;\r\n } else {\r\n if (this.claimService) {\r\n this.retirementsavings = this.claimService.getRetirementSavings();\r\n if (!this.retirementsavings) {\r\n this.retirementsavings = new RetirementSavings();\r\n this._route.queryParams.subscribe((parameters) => {\r\n this.moveWithDrawFlag = parameters[\"flag\"];\r\n this.memberAction =\r\n this.moveWithDrawFlag == 1 ? \"Move\" : \"Withdraw\";\r\n this.totalSavings = parameters[\"sv\"].replace(/\\s/g, \"\");\r\n this.percentage = parameters[\"pt\"];\r\n this.afris = parameters[\"af\"];\r\n this.calculations = this.claimService.getCalculations(\r\n this.percentage,\r\n this.totalSavings\r\n );\r\n this.retirementsavings.amountToMove =\r\n this.calculations.amountToMove;\r\n this.retirementsavings.savingsLeft =\r\n this.calculations.savingsLeft;\r\n if (this.percentage < 100) {\r\n this.calculateTaxAmount = this.retirementsavings.savingsLeft;\r\n } else {\r\n this.calculateTaxAmount = this.retirementsavings.amountToMove;\r\n }\r\n this.retirementsavings.percentage = this.percentage;\r\n this.retirementsavings.fullPartFlag =\r\n this.percentage < 100 ? 2 : 1;\r\n this.retirementsavings.moveWithDrawFlag = this.moveWithDrawFlag;\r\n this.retirementsavings.totalSavings = this.totalSavings;\r\n if (this.fullTransfer) {\r\n this.taxTobePaid = 0;\r\n this.payout = 0;\r\n this.retirementsavings.tax = 0;\r\n this.retirementsavings.payout = 0;\r\n this.claimService.setRetirementSavings(\r\n this.retirementsavings\r\n );\r\n } else {\r\n this.withdrawalAmountProjectionService\r\n .getTaxPayout(this.calculateTaxAmount)\r\n .subscribe(\r\n (resp) => {\r\n this.taxTobePaid = resp.taxPayable;\r\n this.payout = resp.netOfTax;\r\n this.retirementsavings.tax = this.taxTobePaid;\r\n this.retirementsavings.payout = this.payout;\r\n this.claimService.setRetirementSavings(\r\n this.retirementsavings\r\n );\r\n },\r\n (error) => {\r\n this.errorService.openErrorPopup(\r\n \"An error occurred while getting the tax details.\"\r\n );\r\n }\r\n );\r\n }\r\n });\r\n }\r\n }\r\n }\r\n // if (this.moveWithDrawFlag == 1 && this.percentage == 100 ){\r\n // this.fullTransfer = true;\r\n // } else if(this.moveWithDrawFlag == 2 && this.percentage == 100){\r\n // this.fullWithdrawal = true;\r\n // this.activeTab = ActiveTab.BANKING_DETAILS;\r\n // this.showToolTip = false;\r\n // }\r\n switch (this.moveWithDrawFlag.toString()) {\r\n case \"1\":\r\n if (this.percentage > 0 && this.percentage < 100) {\r\n this.partTransfer = true;\r\n } else if (this.percentage == 100) {\r\n this.fullTransfer = true;\r\n } else if (this.percentage == 0) {\r\n this.activeTab = ActiveTab.BANKING_DETAILS;\r\n this.showToolTip = false;\r\n this.fullCash = true;\r\n }\r\n break;\r\n case \"2\":\r\n if (\r\n this.retirementsavings.percentage > 0 &&\r\n this.percentage < 100\r\n ) {\r\n this.partTransfer = true;\r\n } else if (this.percentage == 100) {\r\n this.fullCash = true;\r\n this.activeTab = ActiveTab.BANKING_DETAILS;\r\n this.showToolTip = false;\r\n this.fullWithdrawal = true;\r\n } else if (this.percentage == 0) {\r\n this.fullTransfer = true;\r\n }\r\n break;\r\n default:\r\n console.error(\r\n `Could not determine user path: ${this.moveWithDrawFlag}`\r\n );\r\n }\r\n const headers = new HttpHeaders().set(\r\n \"Authorization\",\r\n this.auth.getAuthorizationHeaderValue()\r\n );\r\n const options = { headers: headers };\r\n this.httpClient\r\n .get(\r\n `${appsettings.digitalHRAssisServicesUrl}${\r\n appsettings.endPoints.updateMemberUrl\r\n }/${this.claimService.getMemberDetails().employeeId}`,\r\n options\r\n )\r\n .subscribe(\r\n (resp:any) => {\r\n this.memberPersonalDetails = resp[\"employee\"];\r\n },\r\n (err) => {\r\n this.errorService.openErrorPopup(\r\n \"An error occurred while updating the member details.\"\r\n );\r\n }\r\n );\r\n this.showTaxPopUp = !!localStorage.getItem(\"showTaxInfo\");\r\n })\r\n .catch((reason) => {});\r\n }\r\n\r\n next(data: string) {\r\n switch (data) {\r\n case \"broker\":\r\n this.activeTab = ActiveTab.BROKER_DETAILS;\r\n break;\r\n case \"banking\":\r\n this.activeTab = ActiveTab.BANKING_DETAILS;\r\n this.showToolTip = false;\r\n break;\r\n case \"personal-details\":\r\n this.activeTab = ActiveTab.PERSONAL_DETAILS;\r\n this.showToolTip = false;\r\n break;\r\n case \"tax-details\":\r\n this.activeTab = ActiveTab.TAX_DETAILS;\r\n this.showToolTip = false;\r\n break;\r\n case \"summary\":\r\n this.activeTab = ActiveTab.SUMMARY;\r\n this.showToolTip = false;\r\n break;\r\n default:\r\n this.activeTab = ActiveTab.BROKER_DETAILS;\r\n }\r\n }\r\n\r\n updateMemberContactDetails(member:any) {\r\n let memberContactDetails = new MemberContactDetails();\r\n memberContactDetails.useResidentialAsPostal = member.useResidentialAsPostal;\r\n memberContactDetails.complex = member.complex;\r\n memberContactDetails.unitNumber = member.unitNumber;\r\n memberContactDetails.streetNumber = member.streetNumber;\r\n memberContactDetails.streetOrFarmName = member.streetOrFarmName;\r\n memberContactDetails.cityOrTown = member.cityOrTown;\r\n memberContactDetails.country = member.country;\r\n memberContactDetails.suburbOrDistrict = member.suburbOrDistrict;\r\n memberContactDetails.residentialCode = member.residentialCode;\r\n memberContactDetails.eMail = member.primaryEmail\r\n ? member.primaryEmail\r\n : member.eMail;\r\n memberContactDetails.address1 = member.address1;\r\n memberContactDetails.address2 = member.address2;\r\n memberContactDetails.address3 = member.address3;\r\n memberContactDetails.postalCode = member.postalCode\r\n ? member.postalCode\r\n : member.residentialCode;\r\n memberContactDetails.country = member.country;\r\n memberContactDetails.telNumber = member.telNumber;\r\n memberContactDetails.mobileNumber = member.mobileNumber;\r\n this.claimService.setMemberContactDetails = memberContactDetails;\r\n }\r\n\r\n continue(claimData:any) {\r\n this.showToolTip = false;\r\n switch (this.activeTab) {\r\n case ActiveTab.BROKER_DETAILS:\r\n this.claimService.setBrokerDetails(claimData);\r\n this.claimService.updateMemberBrokerDetails(claimData);\r\n if (this.fullTransfer) {\r\n this.activeTab = ActiveTab.PERSONAL_DETAILS;\r\n } else {\r\n this.activeTab = ActiveTab.BANKING_DETAILS;\r\n }\r\n break;\r\n case ActiveTab.BANKING_DETAILS:\r\n this.claimService.setBankingDetails(claimData);\r\n this.claimService.updateMemberBankingDetails(claimData);\r\n this.activeTab = ActiveTab.PERSONAL_DETAILS;\r\n break;\r\n case ActiveTab.PERSONAL_DETAILS:\r\n this.updateMemberPersonalDetails(claimData);\r\n this.activeTab = ActiveTab.TAX_DETAILS;\r\n break;\r\n case ActiveTab.TAX_DETAILS:\r\n if (\r\n this.incomeTaxNumber === \"\" ||\r\n this.incomeTaxNumber == undefined ||\r\n this.claimService.getCountryOfResidence === \"\" ||\r\n this.claimService.getCountryOfResidence == undefined\r\n ) {\r\n this.errorService.openErrorPopup(\r\n \"Please enter your income tax number and country of tax residence.\"\r\n );\r\n break;\r\n }\r\n if (this.validateTaxRef) {\r\n this.validateTaxNumber(claimData);\r\n } else {\r\n this.claimService.setIncomeTaxNumber = this.incomeTaxNumber;\r\n this.updateMemberContactDetails(claimData);\r\n this.activeTab = ActiveTab.SUMMARY;\r\n }\r\n break;\r\n\r\n case ActiveTab.SUMMARY:\r\n this.confirm();\r\n break;\r\n default:\r\n this.activeTab = ActiveTab.BROKER_DETAILS;\r\n }\r\n }\r\n\r\n validateTaxNumber(claimData:any) {\r\n this.loader.start();\r\n const headers = new HttpHeaders().set(\r\n \"Authorization\",\r\n this.auth.getAuthorizationHeaderValue()\r\n );\r\n const options = { headers: headers };\r\n this.httpClient\r\n .post(\r\n `${appsettings.commonServicesUrl}${appsettings.endPoints.validateTaxNumber}`,\r\n { trn: this.incomeTaxNumber },\r\n options\r\n )\r\n .subscribe(\r\n (resp:any) => {\r\n this.loader.stop();\r\n if (resp[\"valid\"] == true) {\r\n this.claimService.setIncomeTaxNumber = this.incomeTaxNumber;\r\n this.updateMemberContactDetails(claimData);\r\n this.activeTab = ActiveTab.SUMMARY;\r\n } else {\r\n this.errorService.openErrorPopup(\"Invalid Income Tax Number\");\r\n }\r\n },\r\n (err) => {\r\n let errorMessage = getErrorMessage(err);\r\n this.errorService.openErrorPopup(\r\n \"Error validating Income Tax Number: \" + errorMessage\r\n );\r\n window.scroll(0, 0);\r\n this.loader.stop();\r\n }\r\n );\r\n }\r\n\r\n goBack(data: string) {\r\n this.formInvalid = true;\r\n switch (data) {\r\n case \"broker\":\r\n this.brokerFormInvalid = true;\r\n this.activeTab = ActiveTab.BROKER_DETAILS;\r\n break;\r\n case \"banking\":\r\n this.bankingFormInvalid = true;\r\n this.activeTab = ActiveTab.BANKING_DETAILS;\r\n break;\r\n default:\r\n this.activeTab = ActiveTab.BROKER_DETAILS;\r\n }\r\n }\r\n\r\n logout() {\r\n //this.authService.logout(false);\r\n this.auth.logout(false);\r\n }\r\n\r\n moveDetails() {\r\n this.routingService.moveSavings(\r\n this.retirementsavings.moveWithDrawFlag,\r\n this.retirementsavings.totalSavings\r\n );\r\n }\r\n\r\n goToGrowSavings() {\r\n this.routingService.confirmDetails();\r\n }\r\n\r\n // TODO: submit claimService to api instead of manual mapping of objects and properties, but make sure the claim service is stable first.\r\n confirm() {\r\n const idType = localStorage.getItem(\"idType\");\r\n this.loader.start();\r\n let claimObject:any = {\r\n claim: {\r\n incomeTaxNumber: null,\r\n indebtedToEmployer: true,\r\n amountOfDeduction: 0,\r\n employeeNumber: null,\r\n employerName: null,\r\n bulkClaimsBatchId: 0,\r\n nonSaTaxpayer: true,\r\n annualTaxableSalary: 0,\r\n sarsCountryCode: null,\r\n dateLastContrib: \"2020-06-19T08:46:32.308Z\",\r\n continuation: true,\r\n countryOfResidence: null,\r\n userEmail: null,\r\n membership: [\r\n {\r\n fundId: 0,\r\n subscriptionNumber: null,\r\n withdrawalPaymentInstruction: {\r\n fkWithdrawalTypeID: 1,\r\n fkWithdrawalOptionId: 2,\r\n cashAmount: 0,\r\n amountIsPostTax: true,\r\n transferToFundName: null,\r\n transferToPolicyRef: \"n/a\",\r\n withdrawalDate: \"2020-06-19T08:46:32.308Z\",\r\n broker: {\r\n brokerName: null,\r\n email: null,\r\n telNumber: null,\r\n mobileNumber: null,\r\n },\r\n },\r\n },\r\n ],\r\n member: {\r\n firstName: null,\r\n middleName: null,\r\n surname: null,\r\n maidenName: null,\r\n initials: null,\r\n dateOfBirth: null,\r\n identity: {\r\n fkOfficialIdentityTypeID: idType,\r\n fkCountryOfIssueID: 1,\r\n identityValue: null,\r\n },\r\n },\r\n memberContactDetails: {\r\n unitNumber: null,\r\n complex: null,\r\n streetNumber: null,\r\n streetOrFarmName: null,\r\n suburbOrDistrict: null,\r\n cityOrTown: null,\r\n country: null,\r\n postalCode: null,\r\n residentialCode: null,\r\n useResidentialAsPostal: null,\r\n telNumber: null,\r\n mobileNumber: null,\r\n eMail: null,\r\n address1: null,\r\n address2: null,\r\n address3: null,\r\n },\r\n memberBankingDetail: {\r\n accountNumber: null,\r\n accountType: 1,\r\n accountHolder: null,\r\n branchNumber: null,\r\n bankName: null,\r\n },\r\n },\r\n rbc: null,\r\n isAdvised: false,\r\n sendToBroker: false,\r\n };\r\n\r\n claimObject.claim.countryOfResidence =\r\n this.claimService.getCountryOfResidence;\r\n claimObject.claim.sarsCountryCode = this.claimService.getCountryOfResidence;\r\n claimObject.claim.incomeTaxNumber = this.claimService.getIncomeTaxNumber;\r\n claimObject.claim.indebtedToEmployer =\r\n this.claimService.getIndebtedToEmployer;\r\n claimObject.claim.amountOfDeduction = this.memberDetails.amountOfDeduction;\r\n claimObject.claim.employeeNumber = this.claimService.getEmployeeNumber;\r\n claimObject.claim.employerName = this.claimService.getEmployerName;\r\n claimObject.claim.annualTaxableSalary =\r\n this.memberValues.AnnualPensionableSalary;\r\n if (this.memberValues) {\r\n if (!this.memberValues.LastContributionDate) {\r\n claimObject.claim.dateLastContrib = new Date().toString();\r\n } else {\r\n claimObject.claim.dateLastContrib =\r\n this.memberValues.LastContributionDate;\r\n }\r\n } else {\r\n claimObject.claim.dateLastContrib = new Date().toString();\r\n }\r\n claimObject.claim.dateLastContrib = this.utils.convertDateShortDash(\r\n claimObject.claim.dateLastContrib\r\n );\r\n claimObject.claim.userEmail = this.claimService.getUserEmail;\r\n\r\n claimObject.claim.membership[0].fundId =\r\n this.memberDetails.membership[0].fundId;\r\n claimObject.claim.membership[0].subscriptionNumber =\r\n this.memberDetails.membership[0].subscriptionNumber;\r\n claimObject.claim.membership[0].withdrawalPaymentInstruction.fkWithdrawalOptionId =\r\n this.setWithdrawalOption();\r\n claimObject.claim.membership[0].withdrawalPaymentInstruction.fkWithdrawalTypeID = 1;\r\n claimObject.claim.membership[0].withdrawalPaymentInstruction.cashAmount =\r\n this.memberAction.toUpperCase() === \"MOVE\"\r\n ? this.retirementsavings.totalSavings -\r\n this.retirementsavings.amountToMove\r\n : this.retirementsavings.amountToMove;\r\n if (this.fullTransfer || this.partTransfer) {\r\n claimObject.claim.membership[0].withdrawalPaymentInstruction.transferToFundName =\r\n this.claimService.getBrokerDetails().newFundName;\r\n claimObject.claim.membership[0].withdrawalPaymentInstruction.broker.brokerName =\r\n this.claimService.getBrokerDetails().brokerName;\r\n claimObject.claim.membership[0].withdrawalPaymentInstruction.broker.email =\r\n this.claimService.getBrokerDetails().brokerEmail;\r\n claimObject.claim.membership[0].withdrawalPaymentInstruction.broker.mobileNumber =\r\n this.claimService.getBrokerDetails().brokerCell;\r\n claimObject.claim.membership[0].withdrawalPaymentInstruction.broker.telNumber =\r\n this.claimService.getBrokerDetails().brokerNumber;\r\n } else {\r\n claimObject.claim.membership[0].withdrawalPaymentInstruction.transferToFundName =\r\n null;\r\n claimObject.claim.membership[0].withdrawalPaymentInstruction.broker =\r\n null;\r\n }\r\n\r\n claimObject.claim.membership[0].withdrawalPaymentInstruction.withdrawalDate =\r\n this.utils.convertDateShortDash(this.memberDetails.exitDate);\r\n\r\n claimObject.claim.member.firstName = this.claimService.getMember.firstName;\r\n claimObject.claim.member.middleName =\r\n this.claimService.getMember.middleName;\r\n claimObject.claim.member.surname = this.claimService.getMember.surname;\r\n claimObject.claim.member.initials = this.claimService.getMember.initials;\r\n claimObject.claim.member.dateOfBirth =\r\n this.claimService.getMember.dateOfBirth;\r\n claimObject.claim.member.identity.identityValue =\r\n this.claimService.getMember.identity.identityValue;\r\n\r\n // TODO: collapse this into claimObject.claim.memberContactDetails = this.claimService.getMemberContactDetails\r\n claimObject.claim.memberContactDetails.unitNumber =\r\n this.claimService.getMemberContactDetails.unitNumber;\r\n claimObject.claim.memberContactDetails.complex =\r\n this.claimService.getMemberContactDetails.complex;\r\n claimObject.claim.memberContactDetails.streetNumber =\r\n this.claimService.getMemberContactDetails.streetNumber;\r\n claimObject.claim.memberContactDetails.streetOrFarmName =\r\n this.claimService.getMemberContactDetails.streetOrFarmName;\r\n claimObject.claim.memberContactDetails.cityOrTown =\r\n this.claimService.getMemberContactDetails.cityOrTown;\r\n claimObject.claim.memberContactDetails.country =\r\n this.claimService.getMemberContactDetails.country;\r\n claimObject.claim.memberContactDetails.address1 =\r\n this.claimService.getMemberContactDetails.address1;\r\n claimObject.claim.memberContactDetails.address2 =\r\n this.claimService.getMemberContactDetails.address2;\r\n claimObject.claim.memberContactDetails.address3 =\r\n this.claimService.getMemberContactDetails.address3;\r\n claimObject.claim.memberContactDetails.postalCode =\r\n this.claimService.getMemberContactDetails.postalCode;\r\n claimObject.claim.memberContactDetails.residentialCode =\r\n this.claimService.getMemberContactDetails.residentialCode;\r\n claimObject.claim.memberContactDetails.country =\r\n this.claimService.getMemberContactDetails.country;\r\n claimObject.claim.memberContactDetails.telNumber =\r\n this.claimService.getMemberContactDetails.telNumber;\r\n claimObject.claim.memberContactDetails.mobileNumber =\r\n this.claimService.getMemberContactDetails.mobileNumber;\r\n claimObject.claim.memberContactDetails.eMail =\r\n this.claimService.getMemberContactDetails.eMail;\r\n claimObject.claim.memberContactDetails.suburbOrDistrict =\r\n this.claimService.getMemberContactDetails.suburbOrDistrict;\r\n claimObject.claim.memberContactDetails.useResidentialAsPostal =\r\n this.claimService.getMemberContactDetails.useResidentialAsPostal;\r\n\r\n if (!this.fullTransfer) {\r\n claimObject.claim.memberBankingDetail.bankName =\r\n this.claimService.getBankingDetails().bankName;\r\n claimObject.claim.memberBankingDetail.accountHolder =\r\n this.claimService.getBankingDetails().accHolderName;\r\n claimObject.claim.memberBankingDetail.accountNumber =\r\n this.claimService.getBankingDetails().accountNumber;\r\n claimObject.claim.memberBankingDetail.accountType =\r\n this.claimService.getBankingDetails().accountType == \"Cheque\" ? 1 : 2;\r\n claimObject.claim.memberBankingDetail.branchNumber =\r\n this.claimService.getBankingDetails().branchCode;\r\n } else {\r\n claimObject.claim.memberBankingDetail = null;\r\n }\r\n claimObject.rbc = true;\r\n claimObject.isAdvised =\r\n this.claimService.getBrokerDetails() &&\r\n this.claimService.getBrokerDetails().isAdvised\r\n ? this.claimService.getBrokerDetails().isAdvised\r\n : false;\r\n claimObject.sendToBroker =\r\n this.claimService.getBrokerDetails() &&\r\n this.claimService.getBrokerDetails().sendtoBroker\r\n ? this.claimService.getBrokerDetails().sendtoBroker\r\n : false;\r\n\r\n const headers = new HttpHeaders().set(\r\n \"Authorization\",\r\n this.auth.getAuthorizationHeaderValue()\r\n );\r\n const options = { headers: headers };\r\n this.httpClient\r\n .post(\r\n `${appsettings.digitalClaimsService}${appsettings.endPoints.claimWidthrawal}`,\r\n claimObject,\r\n options\r\n )\r\n .subscribe(\r\n (resp:any) => {\r\n if(resp[\"SubmittedSuccessfully\"]) {\r\n this.claimId = resp[\"ClaimId\"];\r\n this.empEmail = this.claimService.getUserEmail;\r\n this.claimSuccess = true;\r\n this.loader.stop();\r\n } else {\r\n this.loader.stop();\r\n this.errorService.openErrorPopup(\r\n resp[\"Message\"] ? resp[\"Message\"] : this.claimErrorMsg\r\n ); \r\n }\r\n },\r\n (err) => {\r\n this.errorService.openErrorPopup(\r\n this.claimErrorMsg\r\n );\r\n this.loader.stop();\r\n }\r\n );\r\n }\r\n\r\n setWithdrawalOption(): eWithdrawalOption {\r\n switch (this.retirementsavings.moveWithDrawFlag.toString()) {\r\n case \"1\":\r\n if (\r\n this.retirementsavings.percentage > 0 &&\r\n this.retirementsavings.percentage < 100\r\n ) {\r\n return eWithdrawalOption.PartTransfer;\r\n } else if (this.retirementsavings.percentage == 100) {\r\n return eWithdrawalOption.FullTransfer;\r\n } else if (this.retirementsavings.percentage == 0) {\r\n return eWithdrawalOption.FullCash;\r\n }\r\n break;\r\n case \"2\":\r\n if (\r\n this.retirementsavings.percentage > 0 &&\r\n this.retirementsavings.percentage < 100\r\n ) {\r\n return eWithdrawalOption.PartTransfer;\r\n } else if (this.retirementsavings.percentage == 100) {\r\n return eWithdrawalOption.FullCash;\r\n } else if (this.retirementsavings.percentage == 0) {\r\n return eWithdrawalOption.FullTransfer;\r\n }\r\n break;\r\n default:\r\n return eWithdrawalOption.FullTransfer;\r\n }\r\n return eWithdrawalOption.FullTransfer;\r\n }\r\n\r\n goToRoute() {\r\n this.claimSuccess = false;\r\n this.routingService.savingsSummary();\r\n }\r\n\r\n closePopUp() {\r\n this.claimSuccess = false;\r\n }\r\n\r\n updateMemberPersonalDetails(memberData: any) {\r\n let claimProperties = {\r\n indebtedToEmployer: memberData.indebtedToEmployer,\r\n employeeNumber: memberData.employeeNumber,\r\n employerName: memberData.employerName,\r\n userEmail: memberData.memberContactDetails.eMail,\r\n dateLastContrib: memberData.dateLastContrib,\r\n withdrawalDate: memberData.withdrawalDate,\r\n amountToMove: this.amountToMove,\r\n };\r\n this.claimService.updateClaim(claimProperties);\r\n this.claimService.updateClaimPersonalDetails(memberData.member);\r\n this.claimService.updateClaimAddressDetails(\r\n memberData.memberContactDetails\r\n );\r\n }\r\n\r\n toggleTaxValidation(data:any) {\r\n this.incomeTaxNumber = data.taxRef;\r\n this.claimService.setCountryOfResidence = data.country;\r\n switch (data.country) {\r\n case \"ZA\":\r\n this.validateTaxRef = true;\r\n break;\r\n default:\r\n this.validateTaxRef = false;\r\n }\r\n }\r\n\r\n connectToAdvice() {\r\n this.showTaxPopUp = false;\r\n setTimeout(function () {\r\n document.getElementById(\"connect-button\")?.click();\r\n }, 500);\r\n }\r\n\r\n toggleTaxPopUp() {\r\n this.showTaxPopUp = false;\r\n localStorage.removeItem(\"showTaxInfo\");\r\n }\r\n}\r\n","\r\n\r\n\r\n\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
{{ firstName }} {{ surname }}
\r\n
\r\n \r\n Log out\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n Find out \r\n how we protect your personal information, privacy and security.\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
Amount to withdraw
\r\n
\r\n R{{\r\n (memberAction === \"Move\"\r\n ? retirementsavings.totalSavings -\r\n retirementsavings.amountToMove\r\n : retirementsavings.amountToMove\r\n ) | number: \"\":\"fr-FR\"\r\n }}\r\n
\r\n
\r\n
\r\n
Estimated tax
\r\n
\r\n R{{ taxTobePaid | number: \"1.0-0\":\"fr-FR\" }}\r\n
\r\n
\r\n
\r\n
Payout after tax
\r\n
\r\n R{{ payout | number: \"1.0-0\":\"fr-FR\" }}\r\n
\r\n
\r\n
\r\n
Savings left
\r\n
\r\n R{{\r\n (memberAction === \"Move\"\r\n ? retirementsavings.amountToMove\r\n : retirementsavings.totalSavings -\r\n retirementsavings.amountToMove\r\n ) | number: \"\":\"fr-FR\"\r\n }}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n\r\n\r\n \r\n \r\n","export enum ActiveTab {\r\n BROKER_DETAILS = 'broker-details',\r\n BANKING_DETAILS = 'banking-details',\r\n PERSONAL_DETAILS = 'personal-details',\r\n TAX_DETAILS = 'tax-details',\r\n SUMMARY = 'summary',\r\n}\r\n","export * from './active-tab.enum';\r\n","export * from './tabs/tabs.component';\r\n","import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';\r\nimport { ActiveTab } from '../enum';\r\nimport { Router } from '@angular/router';\r\n\r\n@Component({\r\n selector: 'app-tabs',\r\n templateUrl: './tabs.component.html',\r\n styleUrls: ['./tabs.component.scss']\r\n})\r\nexport class TabsComponent implements OnInit {\r\n @Input() activeTab: ActiveTab;\r\n @Input() fullTransfer: boolean;\r\n @Input() fullWithdrawal: boolean;\r\n @Input() fullCash: boolean;\r\n @Input() partTransfer: boolean;\r\n @Input() percentageMoved: number;\r\n @Input() action: String;\r\n @Output() back = new EventEmitter();\r\n @Output() selectedFunction = new EventEmitter();\r\n active = ActiveTab\r\n\r\n constructor(private router: Router) { }\r\n\r\n ngOnInit() {\r\n\r\n }\r\n\r\n onClick() {\r\n this.back.emit();\r\n }\r\n\r\n selectTab(data: string){\r\n this.selectedFunction.emit(data);\r\n }\r\n gotoCorporateBasics() {\r\n this.router.navigateByUrl(\"/digital/onboarding/hr-operations/company-basics.html\");\r\n }\r\n\r\n gotoCorporateBenefits() {\r\n this.router.navigateByUrl(\"/digital/onboarding/hr-operations/company.html\");\r\n }\r\n\r\n}\r\n","\r\n
Broker details
\r\n
Banking details
\r\n
Personal details
\r\n
Tax details
\r\n
Summary
\r\n
\r\n","import { Component, OnInit, Output, EventEmitter, Input } from '@angular/core';\r\nimport { RetirementSavings, Calculations } from '../../../store/retirement-savings/retirementsavings';\r\nimport { ActivatedRoute } from '@angular/router';\r\nimport { ErrorService } from '../../../../../services/error.service';\r\nimport { WithdrawalAmountProjectionServiceService } from '../../withdrawal-amount-projection-service.service';\r\nimport { ActiveTab } from '../shared/enum';\r\nimport { ClaimService } from '../../../store/retirement-savings/service/claimService.service';\r\n\r\n@Component({\r\n selector: 'app-summary',\r\n templateUrl: './summary.component.html',\r\n styleUrls: ['./summary.component.scss']\r\n})\r\nexport class SummaryComponent implements OnInit {\r\n\r\n retirementSavings: RetirementSavings;\r\n moveWithDrawFlag: number;\r\n showFullPartFlag: number;\r\n stay: boolean;\r\n partSave: boolean;\r\n showDeclaration: Boolean = false;\r\n totalSavings: number;\r\n memberAction: string;\r\n amountToMove: any;\r\n savingsLeft: number;\r\n taxTobePaid: number = 0;\r\n payout: number = 0;\r\n percentage: number;\r\n calculations: Calculations;\r\n calculateTaxAmount: number;\r\n @Input() fullTransfer: boolean;\r\n @Input() fullWithdrawal: boolean;\r\n @Input() partTransfer: boolean;\r\n @Input() fullCash: boolean;\r\n @Output() continue = new EventEmitter();\r\n @Input() activeTab:ActiveTab;\r\n @Output() next = new EventEmitter();\r\n afris: boolean;\r\n\r\n constructor(private withdrawalAmountProjectionService: WithdrawalAmountProjectionServiceService,\r\n protected _route: ActivatedRoute,\r\n private errorService: ErrorService,\r\n public claimService: ClaimService) {\r\n this.retirementSavings = this.claimService.getRetirementSavings();\r\n }\r\n\r\n ngOnInit() {\r\n if (this.retirementSavings) {\r\n this.moveWithDrawFlag = this.retirementSavings.moveWithDrawFlag;\r\n this.showFullPartFlag = this.retirementSavings.fullPartFlag;\r\n this.totalSavings = this.retirementSavings.totalSavings;\r\n this.memberAction = this.retirementSavings.moveWithDrawFlag == 1 ? 'Move' : 'Withdraw'\r\n this.amountToMove = this.retirementSavings.amountToMove;\r\n this.savingsLeft = this.retirementSavings.savingsLeft;\r\n this.taxTobePaid = this.retirementSavings.tax;\r\n this.payout = this.retirementSavings.payout;\r\n this.percentage = this.retirementSavings.percentage;\r\n\r\n this._route.queryParams\r\n .subscribe(parameters => {\r\n this.afris = parameters['af'];\r\n });\r\n }\r\n else {\r\n this.retirementSavings = new RetirementSavings();\r\n this._route.queryParams\r\n .subscribe(parameters => {\r\n this.moveWithDrawFlag = parameters['flag'];\r\n this.totalSavings = parameters['sv'].replace(/\\s/g, '');\r\n this.percentage = parameters['pt'];\r\n this.afris = parameters['af'];\r\n this.calculations = this.claimService.getCalculations(this.percentage,this.totalSavings);\r\n this.retirementSavings.amountToMove = this.calculations.amountToMove;\r\n this.retirementSavings.savingsLeft = this.calculations.savingsLeft;\r\n this.memberAction = this.moveWithDrawFlag == 1 ? 'Move' : 'Withdraw'\r\n if (this.percentage < 100) {\r\n this.showFullPartFlag = 2;\r\n this.calculateTaxAmount = this.calculations.savingsLeft;\r\n } else {\r\n this.showFullPartFlag = 1;\r\n this.calculateTaxAmount = this.calculations.amountToMove;\r\n }\r\n this.retirementSavings.percentage = this.percentage;\r\n this.retirementSavings.fullPartFlag = this.percentage < 100 ? 2: 1;\r\n this.retirementSavings.moveWithDrawFlag = this.moveWithDrawFlag;\r\n this.retirementSavings.totalSavings = this.totalSavings;\r\n if(this.fullTransfer){\r\n this.taxTobePaid = 0;\r\n this.payout = 0;\r\n this.retirementSavings.tax = 0;\r\n this.retirementSavings.payout = 0;\r\n this.claimService.setRetirementSavings(this.retirementSavings);\r\n } else {\r\n this.withdrawalAmountProjectionService.getTaxPayout(this.calculateTaxAmount).subscribe((resp) => {\r\n this.taxTobePaid = resp.taxPayable;\r\n this.payout = resp.netOfTax;\r\n this.retirementSavings.tax = this.taxTobePaid;\r\n this.retirementSavings.payout = this.payout;\r\n this.claimService.setRetirementSavings(this.retirementSavings);\r\n },(error) => {\r\n this.errorService.openErrorPopup('An error occurred while getting the tax details.');\r\n });\r\n }\r\n });\r\n }\r\n }\r\n\r\n confirmChoice(){\r\n if(this.validateModel()) {\r\n this.continue.emit();\r\n this.showDeclaration = false;\r\n }\r\n }\r\n\r\n validateModel(): boolean{\r\n const broker = this.claimService.getBrokerDetails();\r\n const banking = this.claimService.getBankingDetails();\r\n if (!this.claimService.getMembership){\r\n this.errorService.openErrorPopup('Please fill in all required details before continuing.');\r\n return false;\r\n } else {\r\n if (this.fullTransfer || this.partTransfer) {\r\n if (!broker) {\r\n this.errorService.openErrorPopup('Please fill in the broker details before continuing.');\r\n this.next.emit('broker');\r\n return false;\r\n }\r\n } else {\r\n if (!this.fullTransfer) {\r\n if (!banking) {\r\n this.errorService.openErrorPopup('Please fill in valid banking details before continuing.');\r\n this.next.emit('banking');\r\n return false;\r\n }\r\n } else {\r\n if (!this.claimService.getMemberContactDetails) {\r\n this.errorService.openErrorPopup('Please fill in the personal details before continuing.');\r\n this.next.emit('tax-details');\r\n return false;\r\n }\r\n }\r\n }\r\n }\r\n return true;\r\n }\r\n\r\n nextTab(data: string){\r\n this.next.emit(data);\r\n }\r\n\r\n}\r\n"," \r\n\r\n\r\n\r\n
\r\n\r\n
\r\n
\r\n
Withdraw
\r\n
Withdrawing R{{ (memberAction === 'Move' ? totalSavings - amountToMove : amountToMove) | number:'':'fr-FR' }} of existing
\r\n
retirement savings.
\r\n
Withdrawing all your existing
\r\n
retirement savings.
\r\n
\r\n\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
Save
\r\n
Saving the remaining R{{ totalSavings - amountToMove | number:'':'fr-FR' }}
\r\n
with Alexforbes.
\r\n
Move
\r\n
Moving the total R{{ totalSavings - amountToMove | number:'':'fr-FR' }}
\r\n
your retirement savings.
\r\n
You have selected to withdraw all your retirement savings.
\r\n
We will request to contact you in the
\r\n
future to see if you would be able to
\r\n
save again towards your retirement.
\r\n
\r\n\r\n
\r\n
\r\n
Move
\r\n
Moving the remaining R{{ amountToMove | number:'':'fr-FR' }}
\r\n
your retirement savings.
\r\n
\r\n
\r\n
\r\n
Save
\r\n
Saving the remaining R{{ amountToMove | number:'':'fr-FR' }}
\r\n
with Alexforbes.
\r\n
\r\n\r\n
\r\n
\r\n
Move for full transfer
\r\n
Moving the total R{{ amountToMove | number:'':'fr-FR' }}
\r\n
your retirement savings.
\r\n
\r\n
\r\n
\r\n
Save
\r\n
Saving the remaining R{{ amountToMove | number:'':'fr-FR' }}
\r\n
with Alexforbes.
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
Amount to withdraw
\r\n
R{{ (memberAction === 'Move' ? retirementSavings.totalSavings - retirementSavings.amountToMove: retirementSavings.amountToMove) | number:'':'fr-FR' }}
\r\n
\r\n
\r\n
Estimated tax
\r\n
R{{ taxTobePaid | number:'1.0-0':'fr-FR'}}
\r\n
\r\n
\r\n
Payout after tax
\r\n
R{{payout | number:'1.0-0':'fr-FR'}}
\r\n
\r\n
\r\n
Savings left
\r\n
Savings to move
\r\n
R{{ (memberAction === 'Move' ? retirementSavings.amountToMove: retirementSavings.totalSavings - retirementSavings.amountToMove) | number:'':'fr-FR' }}
\r\n
\r\n
\r\n\r\n
\r\n confirm choice \r\n
\r\n
\r\n\r\n
\r\n
\r\n\r\n\r\n\r\n\r\n
\r\n
\r\n
Complete your claim by agreeing to the following declaration:
\r\n
\r\n
\r\n\r\n
\r\n
\r\n You understand your options, including the tax implications. \r\n If there is any loss suffered as a result of incorrect information given by yourself, neither Alexforbes nor the fund are responsible for the losses. \r\n You made your own decision or were assisted by an adviser. \r\n When all your information has been received, we will process your decision according to the fund rules and the withdrawal process. \r\n If you are in debt to your employer, your savings will be used to pay the debt in terms of section 37D of the Pension Funds Act. \r\n Once you have chosen an option and SARS has issued a directive, the directive cannot be cancelled. \r\n You acknowledge that Retirement Benefit Counselling has been offered to you throughout this exit journey. If you chose not to get in touch with us we accept that you have declined this offering. \r\n You acknowledge that this claim form will be sent to your HR representative for record purposes. \r\n \r\n
\r\n
\r\n \r\n Cancel\r\n \r\n \r\n Agree\r\n \r\n
\r\n\r\n\r\n
\r\n\r\n\r\n\r\n\r\n","import {Component, EventEmitter, OnInit, Output, Input} from '@angular/core';\r\nimport { ActiveTab } from '../shared/enum';\r\nimport { RetirementSavings } from '../../../store/retirement-savings/retirementsavings';\r\nimport { ClaimService } from '../../../store/retirement-savings/service/claimService.service';\r\nimport { ActivatedRoute } from '@angular/router';\r\n\r\n@Component({\r\n selector: 'app-tax-details',\r\n templateUrl: './tax-details.component.html',\r\n styleUrls: ['./tax-details.component.scss']\r\n})\r\nexport class TaxDetailsComponent implements OnInit {\r\n\r\n @Input() activeTab:ActiveTab;\r\n @Output() next = new EventEmitter();\r\n @Input() fullTransfer: boolean;\r\n @Input() fullWithdrawal: boolean;\r\n @Input() partTransfer: boolean;\r\n @Input() fullCash: boolean;\r\n\r\n constructor() {\r\n }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n continueTab(data: string){\r\n this.next.emit(data);\r\n }\r\n\r\n}\r\n","\r\n \r\n\r\n\r\n \r\n
\r\n\r\n","import { NgModule } from '@angular/core';\r\nimport { RouterModule, Routes } from '@angular/router';\r\nimport { AuthGuard } from 'src/app/services/auth-guard.service';\r\nimport { MoveWithdrawComponent } from './move-withdraw/move-withdraw.component';\r\nimport { ProfileLandingPageComponent } from './profile-landing-page/profile-landing-page.component';\r\nimport { ContactDetailsComponent } from './profile-landing-page/contact-details/contact-details.component';\r\n//import { PostalAddressComponent } from './profile-landing-page/postal-address/postal-address.component';\r\nimport { SavingsDetailsComponent } from './savings-details/savings-details.component';\r\nimport { BankingDetailsComponent } from './savings-details/banking-details/banking-details.component';\r\nimport { BrokerDetailsComponent } from './savings-details/broker-details/broker-details.component';\r\nimport { TaxDetailsComponent } from './savings-details/tax-details/tax-details.component';\r\nimport { ConfirmDetailsComponent } from './confirm-details/confirm-details.component';\r\nimport { SavingsSummaryComponent } from './savings-summary/savings-summary/savings-summary.component';\r\n\r\nconst routes: Routes = [\r\n {\r\n path: '',\r\n canActivate: [AuthGuard],\r\n component: ProfileLandingPageComponent\r\n },\r\n {\r\n path: 'confirm-details',\r\n canActivate: [AuthGuard],\r\n component: ConfirmDetailsComponent\r\n },\r\n {\r\n path: 'move-withdraw',\r\n canActivate: [AuthGuard],\r\n component: MoveWithdrawComponent\r\n },\r\n {\r\n path: 'profile-landing/contact-details',\r\n canActivate: [AuthGuard],\r\n component: ContactDetailsComponent\r\n },\r\n // {\r\n // path: 'profile-landing/postal-address',\r\n // canActivate: [AuthGuard],\r\n // component: PostalAddressComponent\r\n // },\r\n {\r\n path: 'savings-details',\r\n canActivate: [AuthGuard],\r\n component: SavingsDetailsComponent\r\n },\r\n {\r\n path: 'savings-details/banking-details',\r\n canActivate: [AuthGuard],\r\n component: BankingDetailsComponent\r\n },\r\n {\r\n path: 'savings-details/broker-details',\r\n canActivate: [AuthGuard],\r\n component: BrokerDetailsComponent\r\n },\r\n {\r\n path: 'savings-details/tax-details',\r\n canActivate: [AuthGuard],\r\n component: TaxDetailsComponent\r\n },\r\n {\r\n path: 'savings-summary',\r\n canActivate: [AuthGuard],\r\n component: SavingsSummaryComponent\r\n },\r\n ];\r\n\r\n @NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n })\r\n\r\nexport class SavingsRoutingModule { }\r\n","import { Component, OnInit, HostListener } from \"@angular/core\";\r\nimport { StoreService } from \"../../../../../../../src/app/services/storeService\";\r\nimport { HttpHeaders, HttpClient } from \"@angular/common/http\";\r\nimport { environment } from \"../../../../../../environments/environment\";\r\nimport { LoaderService } from \"../../../../../../../src/app/services/loader.service\";\r\nimport { Observable } from \"rxjs\";\r\nimport { ErrorService } from \"../../../../../../../src/app/services/error.service\";\r\nimport { AuthService } from \"../../../../../services/auth.service\";\r\nimport {\r\n RetirementSavings,\r\n MemberDetails,\r\n} from \"../../../store/retirement-savings/retirementsavings\";\r\nimport { ActivatedRoute } from \"@angular/router\";\r\nimport { InfoPopupService } from \"../../../../../../../src/app/services/info-popup-service.service\";\r\nimport { AuthenticationService } from \"../../../../../services/authentication.service\";\r\nimport { User } from \"oidc-client\";\r\nimport { ClaimService } from \"../../../store/retirement-savings/service/claimService.service\";\r\nimport { Constants } from \"../../../../../constants/constants\";\r\n\r\n@Component({\r\n selector: \"app-savings-summary\",\r\n templateUrl: \"./savings-summary.component.html\",\r\n styleUrls: [\"./savings-summary.component.scss\"],\r\n})\r\nexport class SavingsSummaryComponent implements OnInit {\r\n popIaDisclosurePath: string = \"\";\r\n scrolled = 0;\r\n infoIconDamPath: string = \"\";\r\n firstName: String;\r\n surname: String;\r\n companyName: String;\r\n step = 1;\r\n currentStep: number = 1;\r\n page: string = \"summary\";\r\n showPopUp = false;\r\n memberDetails: MemberDetails;\r\n retirementProjectionValues: any;\r\n additionalCover = {\r\n incomeProtection: false,\r\n lifeCover: false,\r\n taxFreeSavingsAccount: false,\r\n medicalAid: false,\r\n };\r\n claimNumber: string;\r\n retirementSavings: RetirementSavings;\r\n claimDetails: any;\r\n paymentOption: string;\r\n memberValues: any;\r\n showValuesBlock: boolean;\r\n cover: boolean;\r\n showRetirementDisclaimerPopup: boolean = false;\r\n member: User = null;\r\n\r\n constructor(\r\n private auth: AuthenticationService,\r\n protected _route: ActivatedRoute,\r\n private httpClient: HttpClient,\r\n private loader: LoaderService,\r\n private errorService: ErrorService,\r\n private claimService: ClaimService,\r\n private infoPopupService: InfoPopupService\r\n ) {}\r\n\r\n ngOnInit() {\r\n this.popIaDisclosurePath = Constants.popia_clause_form;\r\n this.infoIconDamPath = Constants.infoIconDamPath;\r\n this.auth\r\n .getClaims()\r\n .then((member) => {\r\n this.member = member;\r\n this.firstName = this.member.profile[\"given_name\"];\r\n this.surname = this.member.profile[\"family_name\"];\r\n })\r\n .catch((reason) => {});\r\n if (this.claimService.getMemberValues() == null) {\r\n this.getCompanyName();\r\n } else {\r\n this.memberDetails = this.claimService.getMemberDetails();\r\n this.memberValues = this.claimService.getMemberValues();\r\n this.showValuesBlock = true;\r\n this.companyName = this.memberDetails.employerName;\r\n }\r\n // this.errorService.openErrorPopup('Please access the system from a desktop/laptop for the best user experience');\r\n setTimeout(() => {\r\n this.showPopUp = true;\r\n }, 5000);\r\n }\r\n\r\n @HostListener('window:scroll', ['$event'])\r\n onWindowScroll($event) {\r\n const numb = window.scrollY;\r\n if (numb >= 400){\r\n this.scrolled = 1;\r\n }\r\n else {\r\n this.scrolled = 0;\r\n }\r\n }\r\n\r\n getClaimDetails() {\r\n const headers = new HttpHeaders().set(\r\n \"Authorization\",\r\n this.auth.getAuthorizationHeaderValue()\r\n );\r\n const options = { headers: headers };\r\n const url = `${environment.digitalClaimsService}${environment.endPoints.claimdetails}?claimid=${this.memberDetails.exit.claimId}`;\r\n return this.httpClient.get(url, options);\r\n }\r\n\r\n getClaim() {\r\n this.getClaimDetails().subscribe(\r\n (values) => {\r\n if (values) {\r\n this.claimDetails = values;\r\n this.paymentOption = this.claimDetails.Memberships[0].PaymentOption;\r\n this.claimNumber = this.claimDetails.ClaimNumber;\r\n this.paymentOption =\r\n this.paymentOption == \"Withdraw all your savings (Full cash)\"\r\n ? \"Full Cash\"\r\n : this.paymentOption;\r\n this.loader.stop();\r\n } else {\r\n this.loader.stop();\r\n this.errorService.openErrorPopup(\r\n \"An error occurred while getting the claim details.\"\r\n );\r\n }\r\n },\r\n (error) => {\r\n this.loader.stop();\r\n this.errorService.openErrorPopup(\r\n \"An error occurred while getting the claim details.\"\r\n );\r\n }\r\n );\r\n }\r\n\r\n getCompanyName() {\r\n this.loader.start();\r\n this.getMemberDetails().subscribe(\r\n (val) => {\r\n this.companyName = val[\"member\"][0][\"employerName\"];\r\n this.memberDetails = val.member[0];\r\n this.getClaim();\r\n this.getValues();\r\n },\r\n (error) => {\r\n this.loader.stop();\r\n this.errorService.openErrorPopup(\r\n \"An error occurred while getting the member values.\"\r\n );\r\n }\r\n );\r\n }\r\n getValues() {\r\n this.loader.start();\r\n this.getMemberValues().subscribe(\r\n (values) => {\r\n this.memberValues = values;\r\n this.showValuesBlock = true;\r\n this.loader.stop();\r\n },\r\n (error) => {\r\n this.loader.stop();\r\n this.errorService.openErrorPopup(\r\n \"An error occurred while getting the member values.\"\r\n );\r\n }\r\n );\r\n }\r\n\r\n getMemberValues(): Observable {\r\n const headers = new HttpHeaders().set(\r\n \"Authorization\",\r\n this.auth.getAuthorizationHeaderValue()\r\n );\r\n const options = { headers: headers };\r\n const url = `${environment.digitalMemberServicesUrl}${environment.endPoints.memberFundValues}?MembershipNumber=${this.memberDetails.membership[0].subscriptionNumber}&FundId=${this.memberDetails.membership[0].fundId}`;\r\n return this.httpClient.get(url, options);\r\n }\r\n\r\n getMemberDetails(): Observable {\r\n const headers = new HttpHeaders().set(\r\n \"Authorization\",\r\n this.auth.getAuthorizationHeaderValue()\r\n );\r\n const options = { headers: headers };\r\n const url = `${environment.digitalHRAssisServicesUrl}${environment.endPoints.memberDetails}`;\r\n return this.httpClient.get(url, options);\r\n }\r\n\r\n logout() {\r\n this.auth.logout(false);\r\n }\r\n\r\n scrollTo() {\r\n document.getElementById('#information-be-aware').scrollIntoView();\r\n }\r\n\r\n addCover() {\r\n const headers = new HttpHeaders().set(\r\n \"Authorization\",\r\n this.auth.getAuthorizationHeaderValue()\r\n );\r\n const options = { headers: headers };\r\n this.httpClient\r\n .post(\r\n `${environment.digitalHRAssisServicesUrl}${environment.endPoints.additionalCover}`,\r\n this.additionalCover,\r\n options\r\n )\r\n .subscribe(\r\n (resp) => {\r\n this.infoPopupService.openInfoPopup(\r\n \"Request submitted successfully. One of our consultants will contact you within the next 2 business days.\"\r\n );\r\n },\r\n (err) => {}\r\n );\r\n }\r\n\r\n addCovers(): boolean {\r\n if (this.additionalCover.incomeProtection) {\r\n this.cover = true;\r\n } else {\r\n if (this.additionalCover.lifeCover) {\r\n this.cover = true;\r\n } else {\r\n if (this.additionalCover.medicalAid) {\r\n this.cover = true;\r\n } else {\r\n if (this.additionalCover.taxFreeSavingsAccount) {\r\n this.cover = true;\r\n }\r\n }\r\n }\r\n }\r\n return this.cover;\r\n }\r\n\r\n next(step) {\r\n if (step === \"done\") {\r\n if (this.addCovers()) {\r\n this.addCover();\r\n }\r\n this.showPopUp = false;\r\n } else {\r\n this.currentStep = step;\r\n }\r\n }\r\n prev(step) {\r\n this.currentStep = step;\r\n }\r\n\r\n projectionsCacheInitialized($event: any) {}\r\n\r\n resetProjections() {}\r\n}\r\n","\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
{{ firstName }} {{ surname }}
\r\n
\r\n \r\n Log out\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n Find out \r\n how we protect your personal information, privacy and security.\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n {{ firstName }} {{ surname }} \r\n
\r\n
\r\n
\r\n Here are your retirement savings from your \r\n time at {{ companyName }}\r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n Selected grow my savings\r\n \r\n
\r\n You'll receive a member certificate by email shortly, once your\r\n request has been processed.\r\n
\r\n
\r\n You've made a wise financial decision, share it with your friends and\r\n family #BeRetirementWise\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n Selected withdrawing and moving\r\n \r\n
\r\n We’ll also contact your broker and action your request to move your\r\n savings.\r\n
\r\n
\r\n You can expect your cash withdrawal to be processed in the next five\r\n business days. Your claim tracking number is #{{ claimNumber }}\r\n
\r\n \r\n
\r\n
\r\n
\r\n Selected move my savings\r\n \r\n
\r\n We'll be in touch with your broker to action your request.\r\n Your claim tracking number is #{{ claimNumber }} \r\n
\r\n \r\n
\r\n
\r\n
\r\n Selected withdraw my savings\r\n \r\n
\r\n You can expect your cash to be processed in the next five business\r\n days.\r\n Your claim tracking number is #{{ claimNumber }} \r\n
\r\n \r\n
\r\n
\r\n\r\n
\r\n \r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n In future, if you opt to move your retirement savings to any other\r\n fund, be sure to ask about the impact that admin fees will have.\r\n
\r\n\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n A broker might suggest that you move your savings to a different\r\n retirement product. Be sure to ask whether brokerage fees will have\r\n a significant impact on the transfer.\r\n
\r\n\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n R- - \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n Submit\r\n \r\n \r\n
\r\n\r\n \r\n
\r\n Hello {{ firstName }}!\r\n \r\n
\r\n We want to look at one more thing before you go.\r\n
\r\n
\r\n Because you are leaving {{ companyName }} we'd like to make sure that you\r\n and your loved ones are covered for any of life's emergencies.\r\n
\r\n
\r\n Continue to look at some ways that you might need cover.\r\n
\r\n
\r\n \r\n
\r\n Financial protection\r\n \r\n
\r\n Income protection\r\n \r\n
\r\n You will have a guaranteed income for a period if you lose your current\r\n income.\r\n
\r\n
\r\n
\r\n Your loved ones will be covered in the unfortunate event of your passing.\r\n
\r\n\r\n
\r\n Tax-free savings account\r\n \r\n
\r\n Because you've withdrawn money from your retirement funds, why don't you\r\n consider opening a tax-free savings account? Its one of the most\r\n accessible and easy ways to save.\r\n
\r\n
\r\n \r\n
\r\n Health protection\r\n \r\n\r\n
\r\n
\r\n Medical aid provides peace of mind against unexpected medical bills.\r\n
\r\n
\r\n \r\n
\r\n Do you need help with any cover?\r\n \r\n
\r\n Please select below if you would like a consultant to call you back on any\r\n of the following:\r\n
\r\n
\r\n
\r\n \r\n\r\n\r\n \r\n
\r\n
\r\n These projections are for illustrative purposes only. They don’t\r\n constitute advice nor imply or guarantee any particular outcome. The\r\n projections are mathematical calculations of your expected retirement\r\n income and savings using your current personal information available and\r\n various assumptions about your personal circumstances, future salary\r\n increases and future investment returns.\r\n
\r\n
\r\n We advise that you contact a financial adviser to get a detailed\r\n projection.\r\n
\r\n
\r\n By using this information you acknowledge that you understand these notes\r\n and their implications for the projections provided. Alexforbes, the\r\n fund, the trustees or any of their employees or agents cannot accept any\r\n responsibility for losses arising from, or damages caused by, or expenses\r\n incurred by members as a result of using the information contained in this\r\n statement.\r\n
\r\n
\r\n \r\n\r\n\r\n","import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';\r\nimport {CommonModule, CurrencyPipe, DatePipe, DecimalPipe} from '@angular/common';\r\n// import { SavingsSummaryComponent } from './savings-summary/savings-summary/savings-summary.component'\r\nimport { AppHeaderModule } from '../../shared-ui/app-header/app-header.module';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { SavingsCalculationsModule } from '../../shared-ui/savings-calculations/savings-calculations.module';\r\nimport { SliderModule } from 'primeng/slider';\r\nimport { CheckboxModule } from 'primeng/checkbox';\r\nimport { AuthenticationService } from 'src/app/services/authentication.service';\r\n//import { ConnectAdviserModule } from '../connect-adviser';\r\n// import { DisclaimerPopUpComponent } from '../../shared-ui/disclaimer-popup/disclaimer-popup.component';\r\nimport { HelpTipsComponent } from '../../shared-ui/help-tips/help-tips.component';\r\nimport { ScrollingBannerComponent } from '../../shared-ui/scrolling-banner/scrolling-banner.component';\r\nimport { SavingsRoutingModule } from './savings-routing.module';\r\nimport { MoveWithdrawComponent } from './move-withdraw/move-withdraw.component';\r\nimport { SavingsDetailsComponent } from './savings-details/savings-details.component';\r\nimport { CalendarModule } from 'primeng/calendar';\r\nimport { ProfileLandingPageComponent } from './profile-landing-page/profile-landing-page.component';\r\nimport { BankingDetailsComponent } from './savings-details/banking-details/banking-details.component';\r\nimport { BrokerDetailsComponent } from './savings-details/broker-details/broker-details.component';\r\nimport { TaxDetailsComponent } from './savings-details/tax-details/tax-details.component';\r\n//import { PostalAddressComponent } from './profile-landing-page/postal-address/postal-address.component';\r\nimport { ContactDetailsComponent } from './profile-landing-page/contact-details/contact-details.component';\r\nimport { ConfirmDetailsComponent } from './confirm-details/confirm-details.component';\r\nimport { CustomSharedModule } from 'src/app/shared/custom-shared.module';\r\nimport { SummaryComponent } from './savings-details/summary/summary.component';\r\nimport { SharedUiModule } from '../../shared-ui/shared-ui.module';\r\nimport { SavingsSummaryComponent } from './savings-summary/savings-summary/savings-summary.component';\r\n\r\n\r\n@NgModule({\r\n declarations: [\r\n //PostalAddressComponent,\r\n // DisclaimerPopUpComponent,\r\n HelpTipsComponent,\r\n ScrollingBannerComponent,\r\n MoveWithdrawComponent,\r\n SavingsDetailsComponent,\r\n ProfileLandingPageComponent,\r\n BankingDetailsComponent,\r\n BrokerDetailsComponent,\r\n TaxDetailsComponent,\r\n ConfirmDetailsComponent,\r\n SummaryComponent,\r\n SavingsSummaryComponent,\r\n ],\r\n imports: [\r\n CommonModule, \r\n //ConnectAdviserModule,\r\n AppHeaderModule,\r\n FormsModule, \r\n ReactiveFormsModule, \r\n SliderModule, \r\n SavingsCalculationsModule, \r\n CheckboxModule, \r\n SavingsRoutingModule, \r\n CalendarModule,\r\n CustomSharedModule,\r\n SharedUiModule\r\n ],\r\n providers: [\r\n CurrencyPipe, \r\n AuthenticationService,\r\n DatePipe,\r\n DecimalPipe\r\n ],\r\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\r\n exports: [SavingsRoutingModule]\r\n})\r\n\r\nexport class SavingsModule { }\r\n","import { Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { HttpHeaders, HttpClient } from \"@angular/common/http\";\r\nimport { StoreService } from \"../../../../../src/app/services/storeService\";\r\nimport {ProjectionPayload} from \"./move-withdraw/ProjectionPayload\";\r\nimport appsettings from \"../../../../assets/appsettings.json\"\r\n\r\n@Injectable({\r\n providedIn: \"root\",\r\n})\r\nexport class WithdrawalAmountProjectionServiceService {\r\n constructor(\r\n private _storeService: StoreService,\r\n private httpClient: HttpClient\r\n ) {}\r\n\r\n getTaxPayout(amountToMove: any): Observable {\r\n const token = this._storeService.getStoredData().id_token;\r\n const headers = new HttpHeaders().set(\"Authorization\", `Bearer ${token}`);\r\n const options = { headers: headers };\r\n const url =`${appsettings.digitalHRAssisServicesUrl}${appsettings.endPoints.withdrawalAmountProjection}` +`/${amountToMove}`;\r\n return this.httpClient.get(url, options);\r\n }\r\n getFundCreditProjection(projectionPayload: ProjectionPayload): Observable{\r\n const token = this._storeService.getStoredData().id_token;\r\n const headers = new HttpHeaders().set(\"Authorization\", `Bearer ${token}`);\r\n const options = { headers: headers };\r\n const url =`${appsettings.calculatorServiceUrl}${appsettings.endPoints.fundCreditProjection}`;\r\n return this.httpClient.post(url,projectionPayload, options);\r\n }\r\n getMemberRetirementProjection(projectionPayload: ProjectionPayload): Observable{\r\n const token = this._storeService.getStoredData().id_token;\r\n const headers = new HttpHeaders().set(\"Authorization\", `Bearer ${token}`);\r\n const options = { headers: headers };\r\n const url =`${appsettings.calculatorServiceUrl}${appsettings.endPoints.memberRetirementProjection}`;\r\n return this.httpClient.post(url,projectionPayload, options);\r\n }\r\n}\r\n","\r\n// Import the core angular services.\r\nimport { BehaviorSubject } from 'rxjs';\r\nimport { distinctUntilChanged } from 'rxjs/operators';\r\nimport { Observable } from 'rxjs';\r\nimport { map } from 'rxjs/operators';\r\n\r\n// ----------------------------------------------------------------------------------- //\r\n// ----------------------------------------------------------------------------------- //\r\n\r\nexport class BaseStore {\r\n\r\n private stateSubject: BehaviorSubject;\r\n\r\n // I initialize the simple store with the givne initial state value.\r\n constructor( initialState: StateType ) {\r\n\r\n this.stateSubject = new BehaviorSubject( initialState );\r\n\r\n }\r\n\r\n // ---\r\n // PUBLIC METHODS.\r\n // ---\r\n\r\n // I get the current state as a stream (will always emit the current state value as\r\n // the first item in the stream).\r\n public getState(): Observable {\r\n\r\n return( this.stateSubject.pipe( distinctUntilChanged() ) );\r\n\r\n }\r\n\r\n\r\n // I get the current state snapshot.\r\n public getStateSnapshot() : StateType {\r\n\r\n return( this.stateSubject.getValue() );\r\n\r\n }\r\n\r\n\r\n // I return the given top-level state key as a stream (will always emit the current\r\n // key value as the first item in the stream).\r\n public select( key: K ): Observable {\r\n\r\n var selectStream = this.stateSubject.pipe(\r\n map(\r\n ( state: StateType ) => {\r\n\r\n return( state[ key ] );\r\n\r\n }\r\n ),\r\n distinctUntilChanged()\r\n );\r\n\r\n return( selectStream );\r\n\r\n }\r\n\r\n\r\n // I move the store to a new state by merging the given partial state into the\r\n // existing state (creating a new state object).\r\n // --\r\n // CAUTION: Partial does not currently project against \"undefined\" values. This is\r\n // a known type safety issue in TypeScript.\r\n public setState( partialState: Partial ): void {\r\n\r\n var currentState = this.getStateSnapshot();\r\n var nextState = Object.assign( {}, currentState, partialState );\r\n\r\n this.stateSubject.next( nextState );\r\n\r\n }\r\n\r\n public setCollectionState(newState: StateType): void{\r\n this.stateSubject.next(newState);\r\n }\r\n\r\n}\r\n","import { BaseStore } from '../base.store';\r\nimport { Employee } from '../../models/employees.model';\r\nimport { inject, Injectable } from '@angular/core';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class SelectedEmployeesStore extends BaseStore {\r\n constructor() {\r\n super([]);\r\n }\r\n\r\n //effect like in ngrx\r\n public loadStoreFromBackend() {\r\n\r\n // this._productService.fetchProductsFromServer().subscribe(products => {\r\n // this.setCollectionState(products);\r\n // });\r\n\r\n\r\n }\r\n}\r\n","export interface WithdrawalPaymentInstruction {\r\n fkWithdrawalTypeID: string;\r\n fkWithdrawalOptionId: string;\r\n cashAmount: number;\r\n amountIsPostTax: boolean;\r\n transferToFundName?: any;\r\n transferToPolicyRef?: any;\r\n withdrawalDate: string;\r\n broker?: Broker | null;\r\n}\r\n\r\nexport interface Membership {\r\n fundId?: any;\r\n subscriptionNumber?: any;\r\n withdrawalPaymentInstruction: WithdrawalPaymentInstruction;\r\n}\r\n\r\nexport interface Identity {\r\n fkOfficialIdentityTypeID: string;\r\n fkCountryOfIssueID: string;\r\n identityValue?: any;\r\n}\r\n\r\nexport interface Broker {\r\n brokerName: string;\r\n email: string;\r\n telNumber: string;\r\n mobileNumber: string;\r\n}\r\n\r\nexport interface Member {\r\n firstName?: any;\r\n middleName?: any;\r\n surname?: any;\r\n maidenName?: any;\r\n initials?: any;\r\n dateOfBirth?: any;\r\n identity: Identity;\r\n}\r\n\r\nexport interface MemberContactDetails {\r\n useResidentialAsPostal: boolean;\r\n unitNumber?: any;\r\n complex?: any;\r\n streetNumber?: any;\r\n streetOrFarmName?: any;\r\n suburbOrDistrict?: any;\r\n cityOrTown?: any;\r\n country: string;\r\n postalCode?: any;\r\n residentialCode?: any;\r\n telNumber?: any;\r\n mobileNumber?: any;\r\n eMail?: any;\r\n address1?: any;\r\n address2?: any;\r\n address3?: any;\r\n}\r\n\r\nexport interface Claim {\r\n getIncomeTaxNumber: any;\r\n setIncomeTaxNumber: any;\r\n\r\n getIndebtedToEmployer: boolean;\r\n setIndebtedToEmployer: boolean;\r\n\r\n getAmountOfDeduction?: any;\r\n setAmountOfDeduction?: any;\r\n\r\n getEmployeeNumber?: any;\r\n getEmployerName?: any;\r\n\r\n getBulkClaimsBatchId?: any;\r\n setBulkClaimsBatchId?: any;\r\n\r\n getNonSaTaxpayer: boolean;\r\n setNonSaTaxpayer: boolean;\r\n\r\n getAnnualTaxableSalary: number;\r\n setAnnualTaxableSalary: number;\r\n\r\n getSarsCountryCode: string;\r\n setSarsCountryCode: string;\r\n\r\n getDateLastContrib: string;\r\n setDateLastContrib: string;\r\n\r\n getContinuation: boolean;\r\n setContinuation: boolean;\r\n\r\n getCountryOfResidence: string;\r\n setCountryOfResidence: string;\r\n\r\n getUserEmail?: any;\r\n setUserEmail?: any;\r\n\r\n getMembership: Membership[];\r\n setMembership: Membership[];\r\n\r\n getMember: Member;\r\n setMember: Member;\r\n\r\n getMemberContactDetails: MemberContactDetails;\r\n setMemberContactDetails: MemberContactDetails;\r\n\r\n getMemberBankingDetail?: MemberBankingDetail;\r\n setMemberBankingDetail?: MemberBankingDetail;\r\n}\r\n\r\nexport interface MemberBankingDetail {\r\n accountNumber: string;\r\n accountType: number;\r\n accountHolder: string;\r\n branchNumber: string;\r\n bankName: string;\r\n}\r\n\r\nexport interface MemberClaim {\r\n claim: Claim;\r\n}\r\n\r\nexport interface RetirementSavings {\r\n fullPartFlag: number;\r\n moveWithDrawFlag: number;\r\n amountToMove: any;\r\n savingsLeft: any;\r\n totalSavings: any;\r\n percentage: number;\r\n tax: number;\r\n payout: number;\r\n}\r\n\r\nexport interface BrokerDetails {\r\n newFundName: string;\r\n brokerCell: string;\r\n brokerName: string;\r\n brokerEmail: string;\r\n brokerNumber: string;\r\n}\r\n","// Main interface\r\nexport class RetirementSavings {\r\n fullPartFlag: number;\r\n moveWithDrawFlag: number;\r\n amountToMove: any;\r\n savingsLeft: any\r\n totalSavings: any;\r\n percentage:number;\r\n tax: number;\r\n payout: number;\r\n}\r\n\r\nexport class BrokerDetails{\r\n newFundName: string;\r\n brokerCell: string;\r\n brokerName: string;\r\n brokerEmail: string;\r\n brokerNumber: string;\r\n productName: string;\r\n isAdvised: boolean;\r\n sendtoBroker: boolean;\r\n}\r\n\r\nexport class BankingDetails{\r\n accHolderName: string;\r\n accountNumber: string;\r\n bankName: string;\r\n branchCode: string;\r\n accountType:string;\r\n}\r\n\r\nexport class MemberContactDetails{\r\n useResidentialAsPostal: boolean;\r\n unitNumber?: any;\r\n complex?: any;\r\n streetNumber?: any;\r\n streetOrFarmName?: any;\r\n suburbOrDistrict?: any;\r\n cityOrTown?: any;\r\n country: string;\r\n postalCode?: any;\r\n telNumber?: any;\r\n mobileNumber?: any;\r\n eMail?: any;\r\n address1?: any;\r\n address2?: any;\r\n address3?: any;\r\n residentialCode?: any; \r\n}\r\n\r\nexport class Member {\r\n firstName: string\r\n middleName: string\r\n surname: string\r\n maidenName: string\r\n initials: string\r\n dateOfBirth: string\r\n identity: Identity\r\n}\r\n\r\nclass Identity{\r\n fkOfficialIdentityTypeID: string\r\n fkCountryOfIssueID: string\r\n identityValue: string\r\n}\r\n\r\n\r\nexport interface Calculations{\r\n amountToMove: any;\r\n savingsLeft:any;\r\n percentageToMove: any;\r\n}\r\n\r\nexport class MemberDetails {\r\n employeeId: string;\r\n hrRepresentativeId: string;\r\n employeeNumber: string;\r\n employerName: string;\r\n exitDate: string;\r\n exitNoticeDate?: any;\r\n identityValue: string;\r\n identityTypeId: number;\r\n employeeUserName: string;\r\n initials: string;\r\n firstName: string;\r\n surname: string;\r\n dateOfBirth: string;\r\n telephoneNumber: string;\r\n mobileNumber: string;\r\n personalEmail: string;\r\n workEmail: string;\r\n primaryEmail: string;\r\n isHrEmailAddress: boolean;\r\n indebtedToEmployer: boolean;\r\n amountOfDeduction: number;\r\n poBox?: any;\r\n address1: string;\r\n address2: string;\r\n address3: string;\r\n unitNumber?: any;\r\n complex?: any;\r\n streetNumber?: any;\r\n streetOrFarmName?: any;\r\n suburbOrDistrict?: any;\r\n cityOrTown?: any;\r\n country: string;\r\n postalCode: string;\r\n titleId: number;\r\n genderId: number;\r\n modifiedBy: string;\r\n hrRepresentative: HrRepresentative;\r\n membership: Membership[];\r\n exit: Exit;\r\n}\r\n\r\ninterface HrRepresentative {\r\n hrRepresentativeId: string;\r\n userName: string;\r\n emailAddress: string;\r\n modifiedBy: string;\r\n firstName: string;\r\n lastName: string;\r\n contactNumber: string,\r\n}\r\n\r\nexport class MemberValues{\r\n FundCredit: number;\r\n LastContribution:number;\r\n LastContributionDate:string;\r\n InvestmentPeriod: string;\r\n AnnualPensionableSalary:number;\r\n RetirementContributionRate:number;\r\n EmployerContributions:number;\r\n MemberContributions:number;\r\n IsSuccess:boolean;\r\n Message: string;\r\n}\r\n\r\ninterface Exit {\r\n exitId: string;\r\n employeeId: string;\r\n kickoffDate: string;\r\n actionId: number;\r\n statusId: number;\r\n statusDescription?: any;\r\n modifiedBy: string;\r\n opportunityId: string;\r\n claimId: number;\r\n}\r\n\r\ninterface Membership {\r\n employeeMembershipId: number;\r\n employeeId: string;\r\n fundId: number;\r\n fundName: string;\r\n integrationSystem: string;\r\n subscriptionNumber: string;\r\n isHybrid: boolean;\r\n modifiedBy: string;\r\n}\r\n","export * from './service/retirement-savings.store';\r\nexport * from './model/retirement-savings.model'\r\n","import {Injectable} from '@angular/core';\r\nimport {Claim, Member, MemberBankingDetail, MemberContactDetails, Membership, RetirementSavings} from \"../model/claim\";\r\nimport {BankingDetails, BrokerDetails, Calculations, MemberDetails, MemberValues} from \"../model/retirement-savings.model\";\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class ClaimService implements Claim{\r\n private amountOfDeduction: any;\r\n private annualTaxableSalary: number;\r\n private bulkClaimsBatchId: any;\r\n private continuation: boolean;\r\n private countryOfResidence: string;\r\n private dateLastContrib: string;\r\n private employeeNumber: any;\r\n private employerName: any;\r\n private incomeTaxNumber: any;\r\n private indebtedToEmployer: boolean;\r\n private member: Member;\r\n private memberBankingDetail: MemberBankingDetail;\r\n private memberContactDetails: MemberContactDetails;\r\n private membership: Membership[] = [];\r\n private nonSaTaxpayer: boolean;\r\n private sarsCountryCode: string;\r\n private userEmail: any;\r\n private retirementSavings: RetirementSavings;\r\n private brokerDetails: BrokerDetails;\r\n private bankingDetails: BankingDetails;\r\n private calculations: Calculations\r\n private memberDetails: MemberDetails;\r\n private memberValues: MemberValues;\r\n private memberStatus: any\r\n private projections: any\r\n\r\n updateClaimPersonalDetails(member: Member) {\r\n this.member = member;\r\n\r\n }\r\n\r\n updateClaimAddressDetails({address1,address2,address3,postalCode,country,telNumber,mobileNumber,eMail}: MemberContactDetails) {\r\n let memberContactDetails: MemberContactDetails = {\r\n cityOrTown: undefined,\r\n complex: \"\",\r\n streetNumber: \"\",\r\n streetOrFarmName: \"\",\r\n unitNumber: \"\",\r\n address1: address1, address2: address2 ,address3: address3 ,\r\n postalCode: postalCode ,country: country, telNumber: telNumber, mobileNumber:mobileNumber, eMail: eMail, useResidentialAsPostal:false};\r\n this.memberContactDetails = memberContactDetails;\r\n }\r\n\r\n updateClaim({ withdrawalDate, dateLastContrib, employerName, userEmail, indebtedToEmployer, employeeNumber,amountToMove } : any) {\r\n if (!this.membership[0]){\r\n let withDrawPayment = {\r\n \"fundId\": null,\r\n \"subscriptionNumber\": null,\r\n \"withdrawalPaymentInstruction\": {\r\n \"fkWithdrawalTypeID\": \"\",\r\n \"fkWithdrawalOptionId\": \"\",\r\n \"cashAmount\": 0,\r\n \"amountIsPostTax\": false,\r\n \"transferToFundName\": null,\r\n \"transferToPolicyRef\": null,\r\n \"withdrawalDate\": \"2021-01-29\",\r\n \"broker\": null\r\n }\r\n }\r\n this.membership.push(withDrawPayment);\r\n }\r\n this.membership[0].withdrawalPaymentInstruction.withdrawalDate = withdrawalDate\r\n this.membership[0].withdrawalPaymentInstruction.cashAmount = amountToMove\r\n this.dateLastContrib = dateLastContrib;\r\n this.employeeNumber = employeeNumber;\r\n this.employerName = employerName;\r\n this.userEmail = userEmail;\r\n }\r\n\r\n updateMemberBankingDetails(memberBankingDetail: MemberBankingDetail) {\r\n this.memberBankingDetail = memberBankingDetail;\r\n }\r\n updateMemberBrokerDetails({newFundName,brokerCell,brokerName,brokerEmail,brokerNumber}:BrokerDetails){\r\n\r\n let withDrawPayment = {\r\n \"fundId\": null,\r\n \"subscriptionNumber\": null,\r\n \"withdrawalPaymentInstruction\": {\r\n \"fkWithdrawalTypeID\": \"\",\r\n \"fkWithdrawalOptionId\": \"\",\r\n \"cashAmount\": 0,\r\n \"amountIsPostTax\": false,\r\n \"transferToFundName\": null,\r\n \"transferToPolicyRef\": null,\r\n \"withdrawalDate\": \"2021-01-29\",\r\n \"broker\": null\r\n }\r\n }\r\n\r\n if (!this.membership[0]){\r\n this.membership.push(withDrawPayment);\r\n } else {\r\n this.membership[0].withdrawalPaymentInstruction.broker = {\r\n brokerName: brokerName,\r\n email: brokerEmail,\r\n telNumber: brokerNumber,\r\n mobileNumber: brokerCell\r\n };\r\n this.membership[0].withdrawalPaymentInstruction.transferToFundName = newFundName;\r\n }\r\n\r\n }\r\n\r\n get getAmountOfDeduction(): any {\r\n return this.amountOfDeduction;\r\n }\r\n\r\n set setAmountOfDeduction(value: any) {\r\n this.amountOfDeduction = value;\r\n }\r\n\r\n get getAnnualTaxableSalary(): number {\r\n return this.annualTaxableSalary;\r\n }\r\n\r\n set setAnnualTaxableSalary(value: number) {\r\n this.annualTaxableSalary = value;\r\n }\r\n\r\n get getBulkClaimsBatchId(): any {\r\n return this.bulkClaimsBatchId;\r\n }\r\n\r\n set setBulkClaimsBatchId(value: any) {\r\n this.bulkClaimsBatchId = value;\r\n }\r\n\r\n get getContinuation(): boolean {\r\n return this.continuation;\r\n }\r\n\r\n set setContinuation(value: boolean) {\r\n this.continuation = value;\r\n }\r\n\r\n get getCountryOfResidence(): string {\r\n return this.countryOfResidence;\r\n }\r\n\r\n set setCountryOfResidence(value: string) {\r\n this.countryOfResidence = value;\r\n }\r\n\r\n get getDateLastContrib(): string {\r\n return this.dateLastContrib;\r\n }\r\n\r\n set setDateLastContrib(value: string) {\r\n this.dateLastContrib = value;\r\n }\r\n\r\n get getEmployeeNumber(): any {\r\n return this.employeeNumber;\r\n }\r\n\r\n set setEmployeeNumber(value: any) {\r\n this.employeeNumber = value;\r\n }\r\n\r\n get getEmployerName(): any {\r\n return this.employerName;\r\n }\r\n\r\n set setEmployerName(value: any) {\r\n this.employerName = value;\r\n }\r\n\r\n get getIncomeTaxNumber(): any {\r\n return this.incomeTaxNumber;\r\n }\r\n\r\n set setIncomeTaxNumber(value: any) {\r\n this.incomeTaxNumber = value;\r\n }\r\n\r\n get getIndebtedToEmployer(): boolean {\r\n return this.indebtedToEmployer;\r\n }\r\n\r\n set setIndebtedToEmployer(value: boolean) {\r\n this.indebtedToEmployer = value;\r\n }\r\n\r\n get getMember(): Member {\r\n return this.member;\r\n }\r\n\r\n set setMember(value: Member) {\r\n this.member = value;\r\n }\r\n\r\n get getMemberBankingDetail(): MemberBankingDetail {\r\n return this.memberBankingDetail;\r\n }\r\n\r\n set setMemberBankingDetail(value: MemberBankingDetail) {\r\n this.memberBankingDetail = value;\r\n }\r\n\r\n get getMemberContactDetails(): MemberContactDetails {\r\n return this.memberContactDetails;\r\n }\r\n\r\n set setMemberContactDetails(value: MemberContactDetails) {\r\n this.memberContactDetails = value;\r\n }\r\n\r\n get getMembership(): Membership[] {\r\n return this.membership;\r\n }\r\n\r\n set setMembership(value: Membership[]) {\r\n this.membership = value;\r\n }\r\n\r\n get getNonSaTaxpayer(): boolean {\r\n return this.nonSaTaxpayer;\r\n }\r\n\r\n set setNonSaTaxpayer(value: boolean) {\r\n this.nonSaTaxpayer = value;\r\n }\r\n\r\n get getSarsCountryCode(): string {\r\n return this.sarsCountryCode;\r\n }\r\n\r\n set setSarsCountryCode(value: string) {\r\n this.sarsCountryCode = value;\r\n }\r\n\r\n get getUserEmail(): any {\r\n return this.userEmail;\r\n }\r\n\r\n set setUserEmail(value: any) {\r\n this.userEmail = value;\r\n }\r\n\r\n getRetirementSavings(): RetirementSavings{\r\n return this.retirementSavings;\r\n }\r\n\r\n setRetirementSavings({fullPartFlag,moveWithDrawFlag,amountToMove,savingsLeft,totalSavings,percentage,tax,payout}: RetirementSavings) {\r\n let retirementSavings: RetirementSavings = { fullPartFlag: fullPartFlag, moveWithDrawFlag: moveWithDrawFlag,\r\n amountToMove: amountToMove,savingsLeft: savingsLeft ,totalSavings: totalSavings, percentage: percentage,tax:tax,payout:payout};\r\n this.retirementSavings = retirementSavings;\r\n }\r\n\r\n getBrokerDetails(): BrokerDetails{\r\n return this.brokerDetails;\r\n }\r\n\r\n setBrokerDetails({newFundName,brokerCell,brokerName,brokerEmail,brokerNumber, productName, isAdvised, sendtoBroker}: BrokerDetails) {\r\n let brokerDetails: BrokerDetails = { newFundName: newFundName, brokerCell: brokerCell,\r\n brokerName: brokerName,brokerEmail: brokerEmail ,brokerNumber: brokerNumber, productName: productName, isAdvised, sendtoBroker};\r\n this.brokerDetails = brokerDetails;\r\n }\r\n\r\n getBankingDetails(): BankingDetails{\r\n return this.bankingDetails;\r\n }\r\n\r\n setBankingDetails({accHolderName,accountNumber,bankName,branchCode,accountType}: BankingDetails) {\r\n let brokerDetails: BankingDetails = { accHolderName: accHolderName, accountNumber: accountNumber,\r\n bankName: bankName,branchCode: branchCode ,accountType: accountType};\r\n this.bankingDetails = brokerDetails;\r\n }\r\n\r\n getCalculations(percent: number, totalSavings: any, amountToMove: number | null = null): Calculations{\r\n if (amountToMove == null){\r\n let calcAmount = Math.round(((percent) /100) * totalSavings);\r\n let calcSavings = Math.round(totalSavings -((percent) /100) * totalSavings);\r\n let calcs: Calculations = {amountToMove: calcAmount, savingsLeft: calcSavings, percentageToMove: percent};\r\n this.calculations = calcs\r\n }else{\r\n\r\n let percent = Math.round(amountToMove/ parseFloat(totalSavings) * 100);\r\n // let calcAmount = Math.round(((percent) /100) * totalSavings);\r\n let calcSavings = Math.round(parseFloat(totalSavings) -((percent) /100) * parseFloat(totalSavings));\r\n let calcs: Calculations = {amountToMove: amountToMove, savingsLeft: calcSavings, percentageToMove: percent};\r\n this.calculations = calcs\r\n }\r\n return this.calculations;\r\n }\r\n\r\n getMemberDetails(): MemberDetails{\r\n return this.memberDetails;\r\n }\r\n\r\n setMemberDetails(memberDetails: MemberDetails) {\r\n this.memberDetails = memberDetails;\r\n }\r\n\r\n getMemberValues(): MemberValues{\r\n return this.memberValues;\r\n }\r\n\r\n setMemberValues(memberValues: MemberValues) {\r\n this.memberValues = memberValues;\r\n }\r\n\r\n getMemberStatus(){\r\n return this.memberStatus;\r\n }\r\n\r\n setMemberStatus(memberStatus: any){\r\n this.memberStatus = memberStatus;\r\n }\r\n\r\n getProjections(): any {\r\n return this.projections;\r\n }\r\n\r\n setProjections(value: any) {\r\n this.projections = value;\r\n }\r\n}\r\n","export enum eWithdrawalOption {\r\n FullBenefitToBeTransferred = 2,\r\n FullTransfer = 3,\r\n FullCash = 4,\r\n PartTransfer = 5,\r\n NoPaymentOption = 6,\r\n PartTransferToAlexanderForbesPreservationFund = 7,\r\n KeepYourSavingsWhereTheyAre = 8\r\n}\r\n","export enum eWithdrawalType {\r\n Resignation = 1,\r\n NonQualifyingRetrenchment = 2,\r\n Dismissal = 3,\r\n QualifyingRetrenchment = 9\r\n}\r\n","export * from './eWithdrawalOption.enum';\r\nexport * from './eWithdrawalType.enum';\r\n","\r\nimport { Injectable } from '@angular/core';\r\nimport { RetirementSavings } from '../model/retirement-savings.model';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class RetirementSavingsStore{\r\n private _retirement_savings: RetirementSavings;\r\n constructor() {\r\n }\r\n\r\n public get retirement_savings() : RetirementSavings {\r\n return this._retirement_savings\r\n }\r\n\r\n public set retirement_savings(rs : RetirementSavings) {\r\n this._retirement_savings = rs;\r\n }\r\n\r\n}\r\n","import { Component, OnInit } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'app-app-footer',\r\n templateUrl: './app-footer.component.html',\r\n styleUrls: ['./app-footer.component.scss']\r\n})\r\nexport class AppFooterComponent implements OnInit {\r\n\r\n currentYear = new Date().getFullYear();\r\n \r\n constructor() { }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n}\r\n","\r\n \r\n","import { Component, OnInit, Input, OnDestroy } from \"@angular/core\";\r\nimport { ContentService } from \"../../../services/content.service\";\r\nimport { RoutingService } from \"../../../services/routing.service\";\r\nimport { UserService } from \"../../../services/user.service\";\r\nimport { NotificationService } from \"../../../services/notification.service\";\r\nimport { LoaderService } from \"../../../services/loader.service\";\r\nimport { Subscription } from \"rxjs\";\r\nimport { DomSanitizer } from \"@angular/platform-browser\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { User } from \"oidc-client\";\r\nimport { Constants } from \"../../../constants/constants\";\r\nimport { AuthenticationService } from \"src/app/services/authentication.service\";\r\nimport appsettings from \"../../../../assets/appsettings.json\"\r\n\r\n@Component({\r\n selector: \"app-app-header\",\r\n templateUrl: \"./app-header.component.html\",\r\n styleUrls: [\"./app-header.component.scss\"],\r\n})\r\nexport class AppHeaderComponent implements OnInit, OnDestroy {\r\n protected _subscriptions = new Array();\r\n @Input() disabled: boolean;\r\n @Input() active: string;\r\n userFullName: string | undefined;\r\n userRole: string;\r\n isDialogOpen: boolean = false;\r\n popIaDisclosurePath: string = \"\";\r\n infoIconDamPath: string = \"\";\r\n\r\n appVersion: string = appsettings.appVersion;\r\n dataReady = false;\r\n corporate: any;\r\n corporateName: string;\r\n user: User | null = null;\r\n\r\n constructor(\r\n public auth: AuthenticationService,\r\n protected _routingService: RoutingService,\r\n public contentService: ContentService,\r\n protected _userService: UserService,\r\n public notificationService: NotificationService,\r\n protected _loader: LoaderService,\r\n public sanitizer: DomSanitizer,\r\n private _http: HttpClient\r\n ) {}\r\n\r\n ngOnInit() {\r\n this.popIaDisclosurePath = Constants.popia_clause_form;\r\n this.infoIconDamPath = Constants.infoIconDamPath;\r\n this.auth\r\n .getClaims()\r\n .then((member) => {\r\n this.user = member;\r\n this.contentService.cacheDropdownOptions();\r\n this.setUserDetails();\r\n })\r\n .catch((reason) => {});\r\n }\r\n\r\n protected setUserDetails() {\r\n this.userRole = this.user!.profile['role'];\r\n if (this.user!.profile['role'].toLowerCase() === \"user\") {\r\n this.userFullName = this.user!.profile.name;\r\n }\r\n\r\n if (!this.contentService.currentUser) {\r\n this._loader.start();\r\n\r\n this._subscriptions.push(\r\n this._userService.getCurrentUserProfileData().subscribe(\r\n (currentUser) => {\r\n this.contentService.currentUser = currentUser;\r\n this.userFullName =\r\n currentUser.firstname + \" \" + currentUser.lastname;\r\n sessionStorage.setItem('userProfileBillGroups', JSON.stringify(currentUser.billgroups));\r\n this._subscriptions.push(\r\n this.getUserCorp().subscribe(\r\n (resp) => {\r\n if (resp) {\r\n this.corporate = resp;\r\n this.contentService.corporateName = this.corporate.name;\r\n this.corporateName = this.corporate.name;\r\n this._loader.stop();\r\n } else {\r\n this._loader.stop();\r\n }\r\n },\r\n (error) => {\r\n this._loader.stop();\r\n }\r\n )\r\n );\r\n },\r\n (error) => {\r\n this._loader.stop();\r\n }\r\n )\r\n );\r\n } else {\r\n this.userFullName =\r\n this.contentService.currentUser.firstname +\r\n \" \" +\r\n this.contentService.currentUser.lastname;\r\n this.corporateName = this.contentService.corporateName;\r\n }\r\n }\r\n\r\n getUserCorp() {\r\n const url = `${appsettings.serverUrl}${appsettings.endPoints.corporateUrl}/${this.user!.profile['CorporateId']}`;\r\n return this._http.get(url);\r\n }\r\n\r\n resetToDefaultLogo() {\r\n this.contentService.resetLogo();\r\n }\r\n\r\n isDisabledJoiners(): boolean {\r\n return true;\r\n }\r\n\r\n isDisabledDashboard(): boolean {\r\n if (\r\n this.userRole === \"Candidate\" ||\r\n this.userRole === \"Operations administrator\" ||\r\n this.userRole === \"Internal Account Manager\" ||\r\n this.userRole === \"CAT Manager\" ||\r\n this.userRole === \"HR Operations\" ||\r\n this.userRole === \"System Admin\" ||\r\n this.userRole === \"HR Admin\"\r\n ) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n isDisabledTemplates(): boolean {\r\n if (\r\n this.userRole === \"HR Recruiter\" ||\r\n this.userRole === \"Candidate\" ||\r\n this.userRole === \"HR Manager\" ||\r\n this.userRole === \"Operations administrator\" ||\r\n this.userRole === \"Internal Account Manager\" ||\r\n this.userRole === \"CAT Manager\" ||\r\n this.userRole === \"HR Operations\" ||\r\n this.userRole === \"System Admin\" ||\r\n this.userRole === \"HR Admin\"\r\n ) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n isDisabledUsers(): boolean {\r\n if (\r\n this.userRole === \"HR Recruiter\" ||\r\n this.userRole === \"HR Manager\" ||\r\n this.userRole === \"HR Operations\" ||\r\n this.userRole === \"Candidate\" ||\r\n this.userRole === \"Operations administrator\" ||\r\n this.userRole === \"Internal Account Manager\" ||\r\n this.userRole === \"CAT Manager\" ||\r\n this.userRole === \"HR Admin\"\r\n ) {\r\n return true;\r\n }else {\r\n return false;\r\n }\r\n }\r\n\r\n isDisabledCorporates(): boolean {\r\n if (\r\n this.userRole === \"HR Admin\" ||\r\n this.userRole === \"HR Recruiter\" ||\r\n this.userRole === \"HR Operations\" ||\r\n this.userRole === \"HR Manager\" ||\r\n this.userRole === \"Candidate\" ||\r\n this.userRole === \"Operations administrator\" ||\r\n this.userRole === \"Internal Account Manager\" ||\r\n this.userRole === \"System Admin\" || \r\n this.userRole === \"HR Admin\"\r\n ) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n isDisabledArchive(): boolean {\r\n if (\r\n this.userRole === \"Candidate\" ||\r\n this.userRole === \"HR Operations\" ||\r\n this.userRole === \"Operations administrator\" ||\r\n this.userRole === \"Internal Account Manager\" ||\r\n this.userRole === \"CAT Manager\" ||\r\n this.userRole === \"HR Admin\"\r\n ) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n isDisabledLeavers(): boolean {\r\n if (\r\n this.userRole === \"Candidate\" ||\r\n this.userRole === \"HR Recruiter\" ||\r\n this.userRole === \"Operations administrator\" ||\r\n this.userRole === \"Internal Account Manager\" ||\r\n this.userRole === \"CAT Manager\" ||\r\n this.userRole === \"System Admin\"\r\n ) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n isDisabledCompany(): boolean {\r\n if (\r\n this.userRole === \"Candidate\" ||\r\n this.userRole === \"HR Recruiter\" ||\r\n this.userRole === \"HR Manager\" ||\r\n this.userRole === \"HR Operations\" ||\r\n this.userRole === \"Operations administrator\" ||\r\n this.userRole === \"Internal Account Manager\" ||\r\n this.userRole === \"CAT Manager\" ||\r\n this.userRole === \"System Admin\" ||\r\n this.userRole === \"HR Admin\"\r\n ) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n onSignOut() {\r\n this.isDialogOpen = false;\r\n this.auth.logout(false);\r\n }\r\n\r\n goToDashboard() {\r\n this._routingService.corporateDashboard();\r\n }\r\n\r\n ngOnDestroy() {\r\n if (this._subscriptions) {\r\n this._subscriptions.forEach((subscription) => subscription.unsubscribe());\r\n }\r\n }\r\n}\r\n","\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n {{ corporateName }}\r\n
\r\n
\r\n {{ appVersion }} \r\n \r\n Home\r\n \r\n \r\n Joiners\r\n \r\n \r\n Leavers\r\n \r\n \r\n \r\n Candidates\r\n \r\n \r\n \r\n Users\r\n \r\n \r\n Company\r\n \r\n \r\n Archive\r\n \r\n \r\n {{ userFullName }}\r\n \r\n \r\n Log out\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n Find out \r\n how we protect your personal information, privacy and security.\r\n \r\n
\r\n
\r\n
\r\n \r\n\r\n\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common'\r\nimport { AppHeaderComponent } from \"./app-header.component\";\r\nimport { AppLogoutDialogComponent } from \"./app-logout-dialog/app-logout-dialog.component\";\r\nimport { RouterModule } from '@angular/router';\r\nimport { AppFooterComponent} from './../app-footer/app-footer.component';\r\n\r\n\r\n@NgModule({\r\n declarations: [AppHeaderComponent,\r\n AppLogoutDialogComponent,\r\n AppFooterComponent],\r\n imports: [\r\n CommonModule,\r\n RouterModule\r\n ],\r\n exports: [\r\n AppHeaderComponent,\r\n AppLogoutDialogComponent,\r\n AppFooterComponent,\r\n RouterModule\r\n ]\r\n\r\n})\r\nexport class AppHeaderModule { }\r\n","\r\nimport { Component, EventEmitter, Output, OnInit} from '@angular/core';\r\n\r\n@Component({\r\n selector: 'app-app-logout-dialog',\r\n templateUrl: './app-logout-dialog.component.html',\r\n styleUrls: ['./app-logout-dialog.component.scss']\r\n})\r\nexport class AppLogoutDialogComponent {\r\n\r\n @Output() close = new EventEmitter();\r\n @Output() logout = new EventEmitter();\r\n\r\n constructor() {\r\n }\r\n\r\n onClose() {\r\n this.close.emit();\r\n }\r\n\r\n onLogout() {\r\n this.logout.emit();\r\n }\r\n\r\n\r\n}\r\n\r\n"," \r\n
\r\n
\r\n Are you sure you want to log out ?\r\n
\r\n\r\n
\r\n
\r\n YES \r\n
\r\n
\r\n NO \r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n","import { ChangeDetectorRef, Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'app-inputswitch',\r\n templateUrl: './app-inputswitch.component.html',\r\n styleUrls: ['./app-inputswitch.component.scss']\r\n})\r\nexport class InputswitchComponent implements OnInit {\r\n @Input() toggleValue: boolean;\r\n @Input() toggleLabel1: string;\r\n @Input() toggleLabel2: string;\r\n @Input() toggleWidth: number;\r\n @Output() toggleValueChange = new EventEmitter();\r\n\r\n @ViewChild('label1', {read: ElementRef})\r\n label1: ElementRef;\r\n\r\n @ViewChild('label2', {read: ElementRef})\r\n label2: ElementRef;\r\n\r\n constructor(private cdref: ChangeDetectorRef) { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n ngAfterViewInit() { //view children must be accessed at this hook or later\r\n let label1Width = this.label1.nativeElement.offsetWidth;\r\n let label2Width = this.label2.nativeElement.offsetWidth;\r\n\r\n let biggerWidth = Math.max(label1Width, label2Width)\r\n\r\n // Get the longer label and set that as the minium for both of the labels so it scales properly no matter the length\r\n this.toggleWidth = biggerWidth * 2;\r\n this.cdref.detectChanges();\r\n }\r\n\r\n toggle(){\r\n this.toggleValue = !this.toggleValue; \r\n this.toggleValueChange.emit(this.toggleValue);\r\n }\r\n\r\n}\r\n","\r\n
{{ toggleLabel1 }} \r\n
{{ toggleLabel1 }} \r\n
{{ toggleLabel2 }} \r\n
{{ toggleLabel2 }} \r\n
\r\n
","import { Component, OnInit, Input, Output, EventEmitter } from \"@angular/core\";\r\n\r\n@Component({\r\n selector: \"app-claim-confirm-popup\",\r\n templateUrl: \"./claim-confirm-popup.component.html\",\r\n styleUrls: [\"./claim-confirm-popup.component.scss\"],\r\n})\r\nexport class ClaimConfirmPopupComponent implements OnInit {\r\n @Input() claimSuccess: boolean;\r\n @Input() route: string;\r\n @Input() claimId: string;\r\n @Input() empEmail: string;\r\n @Output() routeSummary = new EventEmitter();\r\n @Input() header: string;\r\n @Input() subheader: string;\r\n\r\n constructor() {}\r\n\r\n ngOnInit() {}\r\n\r\n closePopUp() {\r\n this.claimSuccess = false;\r\n this.routeSummary.emit(this.route);\r\n }\r\n}\r\n","\r\n
Done!
\r\n
\r\n {{header}} \r\n
\r\n
\r\n {{subheader}} \r\n Your tracking number is #{{claimId}}, and has been emailed to this address:\r\n {{empEmail}}. \r\n
\r\n
Got it\r\n
\r\n
","import { Component, OnInit, Input, Injectable } from \"@angular/core\";\r\nimport { LoaderService } from \"./../../../services/loader.service\";\r\nimport { Observable, Subject } from \"rxjs\";\r\nimport { HttpHeaders, HttpClient } from \"@angular/common/http\";\r\nimport appsettings from \"../../../../assets/appsettings.json\"\r\nimport { AuthenticationService } from 'src/app/services/authentication.service';\r\n\r\nimport {\r\n FormGroup,\r\n FormBuilder,\r\n FormControl,\r\n Validators,\r\n} from \"@angular/forms\";\r\nimport { InfoPopupService } from \"./../../../services/info-popup-service.service\";\r\nimport {ClaimService} from \"../../resignations/store/retirement-savings/service/claimService.service\";\r\n\r\n@Component({\r\n selector: \"app-connect-advice\",\r\n templateUrl: \"./connect-advice.component.html\",\r\n styleUrls: [\"./connect-advice.component.scss\"],\r\n})\r\nexport class ConnectAdviceComponent implements OnInit {\r\n connectAdviceForm: FormGroup;\r\n @Input() showInfo: boolean;\r\n @Input() memberDetails: any;\r\n showConnectWindow: boolean = false;\r\n advice: any;\r\n private _headers: HttpHeaders;\r\n message: string;\r\n cellNo: string;\r\n\r\n constructor(\r\n private loader: LoaderService,\r\n private httpClient: HttpClient,\r\n private formBuilder: FormBuilder,\r\n private infoPopupService: InfoPopupService,\r\n private informService: InformService,\r\n private claimService: ClaimService,\r\n private auth: AuthenticationService,\r\n ) {}\r\n\r\n ngOnInit() {\r\n this.onCreateConnectAdviceForm();\r\n }\r\n\r\n public showContent() {\r\n this.showConnectWindow = true;\r\n this.informService.warnToTipComponent(this.showConnectWindow);\r\n }\r\n\r\n public hideContent() {\r\n this.showConnectWindow = false;\r\n this.informService.warnToTipComponent(this.showConnectWindow);\r\n }\r\n\r\n onCreateConnectAdviceForm() {\r\n this.connectAdviceForm = this.formBuilder.group({\r\n cellNo: new FormControl(\"\", [Validators.required]),\r\n message: new FormControl(\"\", [Validators.required]),\r\n });\r\n\r\n if (this.memberDetails.mobileNumber) {\r\n var phoneNumberFormat = require(\"awesome-phonenumber\");\r\n var pn = new phoneNumberFormat(this.memberDetails.mobileNumber, \"ZA\");\r\n this.cellNo = pn.getNumber();\r\n this.connectAdviceForm.get(\"cellNo\")!.setValue(this.cellNo);\r\n }\r\n }\r\n\r\n onGetAdvice() {\r\n this.loader.start();\r\n this.getAdvice().subscribe(\r\n (resp) => {\r\n this.loader.stop();\r\n this.infoPopupService.openInfoPopup(\r\n \"Message sent successfully. One of our consultants will contact you within the next 2 business days.\"\r\n );\r\n this.showConnectWindow = false;\r\n },\r\n (error) => {\r\n this.loader.stop();\r\n console.log(error.statusText);\r\n }\r\n );\r\n }\r\n\r\n getAdvice(): Observable {\r\n this.message = this.connectAdviceForm.get(\"message\")!.value;\r\n this.cellNo = this.connectAdviceForm.get(\"cellNo\")!.value;\r\n const data = {\r\n email: this.memberDetails.email,\r\n phoneNumber: this.cellNo,\r\n message: this.message,\r\n fundCredit: this.claimService.getMemberValues().FundCredit\r\n };\r\n\r\n this._headers = new HttpHeaders().set(\"Content-Type\", \"application/json\")\r\n .set(\"Access-Control-Allow-Origin\", \"*\")\r\n .set(\"Authorization\", this.auth.getAuthorizationHeaderValue());\r\n\r\n const url = `${appsettings.digitalHRAssisServicesUrl}${appsettings.endPoints.advisorRequest}`;\r\n const options = { headers: this._headers };\r\n return this.httpClient.post(url, data, options);\r\n }\r\n}\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class InformService {\r\n private informSource = new Subject();\r\n informStatus$ = this.informSource.asObservable();\r\n\r\n public warnToTipComponent(value: any) {\r\n this.informSource.next(value);\r\n }\r\n}\r\n","\r\n\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
CLOSE
\r\n
\r\n
Get guidance
\r\n
\r\n
\r\n
\r\n
\r\n","import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'app-continue-warning',\r\n templateUrl: './continue-warning.component.html',\r\n styleUrls: ['./continue-warning.component.scss']\r\n})\r\nexport class ContinueWarningComponent implements OnInit {\r\n\r\n @Input() showFullPartFlag: string | number;\r\n @Input() showMoveWithdraw: string;\r\n @Input() subtext: string;\r\n @Input() subtext1: string;\r\n @Input() header1: string;\r\n @Input() info1: string;\r\n @Input() header2: string;\r\n @Input() info2: string;\r\n @Input() buttonsFlag: string;\r\n @Output() close = new EventEmitter();\r\n @Output() move = new EventEmitter();\r\n @Output() save = new EventEmitter();\r\n @Output() savingsDetails = new EventEmitter();\r\n @Input() header3: string;\r\n @Input() header4: string;\r\n @Output() growSavings = new EventEmitter();\r\n @Input() bankingText: any;\r\n @Input() info3: string;\r\n @Output() exit = new EventEmitter();\r\n\r\n constructor() { }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n comeBackLater() {\r\n this.close.emit();\r\n }\r\n\r\n exitLater() {\r\n this.exit.emit();\r\n }\r\n\r\n onPartMove(){\r\n this.move.emit()\r\n }\r\n\r\n onSave(){\r\n this.save.emit()\r\n }\r\n\r\n onReady(){\r\n this.savingsDetails.emit();\r\n }\r\n\r\n growMySavings(){\r\n this.growSavings.emit();\r\n }\r\n\r\n}\r\n","\r\n
\r\n
\r\n
\r\n
\r\n
\r\n {{subtext}} \r\n
\r\n
\r\n {{subtext1}} \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n {{header1}} \r\n
\r\n
\r\n {{header3}} \r\n
\r\n
\r\n
\r\n
\r\n {{header2}} \r\n
\r\n
\r\n {{header4}} \r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n {{header1}} \r\n
\r\n
\r\n {{header3}} \r\n
\r\n
\r\n
\r\n
\r\n {{header2}} \r\n
\r\n
\r\n {{header4}} \r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n {{header1}} \r\n
\r\n
\r\n {{header3}} \r\n
\r\n
\r\n
\r\n
\r\n {{header2}} \r\n
\r\n
\r\n {{header4}} \r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n {{header1}} \r\n
\r\n
\r\n
{{bankingText}}
\r\n
{{info1}}
\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n i'm ready, continue \r\n come back later \r\n
\r\n\r\n
\r\n save \r\n move \r\n come back later \r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n {{subtext}} \r\n
\r\n
\r\n {{subtext1}} \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n {{header1}} \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n cancel \r\n grow savings, update details \r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n {{subtext}} \r\n
\r\n
\r\n {{subtext1}} \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n {{header1}} \r\n
\r\n
\r\n {{header2}} \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n cancel \r\n continue \r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n {{subtext}} \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n {{header1}} \r\n
\r\n
\r\n
\r\n
\r\n
\r\n cancel \r\n confirm \r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n {{subtext}} \r\n
\r\n
\r\n {{subtext1}} \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n {{header1}} \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n exit and come back later \r\n
\r\n
\r\n
\r\n
\r\n
\r\n","import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'disclaimer-popup',\r\n templateUrl: './disclaimer-popup.component.html',\r\n styleUrls: ['./disclaimer-popup.component.scss']\r\n})\r\nexport class DisclaimerPopUpComponent implements OnInit {\r\n\r\n @Output() disclaimerClosed = new EventEmitter();\r\n\r\n\r\n constructor() { }\r\n\r\n ngOnInit(): void {\r\n\r\n }\r\n\r\n\r\n close(){\r\n this.disclaimerClosed.emit('disclaimer-popup-closed')\r\n }\r\n}\r\n","\r\n","import { Component, OnInit, EventEmitter, Output } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'app-help-popup',\r\n templateUrl: './help-popup.component.html',\r\n styleUrls: ['./help-popup.component.scss']\r\n})\r\nexport class HelpPopupComponent implements OnInit {\r\n @Output() close = new EventEmitter();\r\n constructor() { }\r\n\r\n ngOnInit() {\r\n }\r\n \r\n closePopUp() {\r\n this.close.emit();\r\n }\r\n}\r\n\r\n\r\n","\r\n \r\n
\r\n
Got it\r\n
\r\n
\r\n","import { Component, OnInit, Input } from '@angular/core';\r\nimport { InformService } from '../connect-advice/connect-advice.component';\r\n\r\n@Component({\r\n selector: 'app-help-tips',\r\n templateUrl: './help-tips.component.html',\r\n styleUrls: ['./help-tips.component.scss'],\r\n})\r\nexport class HelpTipsComponent implements OnInit {\r\n\r\n @Input() subtext: string;\r\n @Input() subtext1: string;\r\n @Input() header1: string;\r\n @Input() header2: string;\r\n @Input() info1: string;\r\n @Input() info2: string;\r\n helpTip: boolean = true;\r\n connectToAdviceTip: boolean = false;\r\n isShowConnectClicked: any;\r\n\r\n constructor(private informService: InformService) { }\r\n\r\n ngOnInit() {\r\n\r\n if (localStorage.getItem(\"helpTipsShown\") != null) {\r\n this.helpTip = false;\r\n this.connectToAdviceTip = false;\r\n }\r\n\r\n this.informService.informStatus$.subscribe(res => {\r\n this.isShowConnectClicked = res;\r\n })\r\n }\r\n\r\n closeHelpTips() {\r\n this.helpTip = false;\r\n this.connectToAdviceTip = true;\r\n }\r\n\r\n closeConnectToAdviceTip() {\r\n this.connectToAdviceTip = false;\r\n localStorage.setItem(\"helpTipsShown\", \"yes\");\r\n }\r\n\r\n\r\n\r\n}\r\n","\r\n
\r\n
\r\n
\r\n
\r\n
\r\n {{subtext}} \r\n
\r\n
\r\n {{subtext1}} \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {{header1}} \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n {{header2}} \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n continue \r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n
\r\n
\r\n
\r\n
Get connected to advice here
\r\n
These are important decisions and we are here to answer any questions you might have during this time.
\r\n
\r\n
\r\n got it \r\n
\r\n
\r\n\r\n
\r\n","import { Component, OnInit, Input } from '@angular/core';\r\n\r\n\r\n@Component({\r\n selector: 'app-identification-details',\r\n templateUrl: './identification-details.component.html',\r\n styleUrls: ['./identification-details.component.scss']\r\n})\r\nexport class IdentificationDetailsComponent implements OnInit {\r\n\r\n @Input() emp;\r\n titles: any;\r\n idTypes:any\r\n genders: any;\r\n country;\r\n selectedIdType: number;\r\n\r\n constructor() { }\r\n\r\n ngOnInit() {\r\n this.titles = JSON.parse(localStorage.getItem(\"titles\"));\r\n this.idTypes = JSON.parse(localStorage.getItem(\"identityTypes\"));\r\n this.genders = JSON.parse(localStorage.getItem(\"genders\"));\r\n if (this.emp.identityTypeId === 1){\r\n this.selectedIdType = 4;\r\n }\r\n }\r\n ondropDownChange(event) {\r\n debugger\r\n switch (event.target.id) {\r\n case \"title\":\r\n this.emp.titleId = event.target.selectedIndex\r\n break;\r\n case \"gender\":\r\n this.emp.genderId = event.target.selectedIndex\r\n break;\r\n case \"idType\":\r\n this.emp.identityTypeId = event.target.selectedIndex\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n }\r\n\r\n}\r\n","\r\n \r\n
\r\n","import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';\r\nimport {FormArray, FormControl, FormGroup, Validators} from \"@angular/forms\";\r\nimport {UtilitiesService} from \"../../../services/utilities.service\";\r\nimport {HttpClient, HttpHeaders} from \"@angular/common/http\";\r\nimport {LoaderService} from \"../../../services/loader.service\";\r\nimport {ErrorService} from \"../../../services/error.service\";\r\nimport {environment} from \"../../../../environments/environment\";\r\nimport { MemberContactDetails } from '../../resignations/store/retirement-savings/model/retirement-savings.model';\r\nimport { ClaimService } from '../../resignations/store/retirement-savings/service/claimService.service';\r\nimport { countries } from \"./../../../constants/countries\";\r\nimport { AuthenticationService } from 'src/app/services/authentication.service';\r\n\r\n@Component({\r\n selector: 'app-member-address',\r\n templateUrl: './member-address.component.html',\r\n styleUrls: ['./member-address.component.scss']\r\n})\r\nexport class MemberAddressComponent implements OnInit {\r\n\r\n employeeForm: FormGroup;\r\n formSubmitted: boolean = false;\r\n countries: any;\r\n showPostalAddress = true;\r\n memberContactDetails: MemberContactDetails;\r\n countryInvalid: boolean = false;\r\n @Input() employee: any;\r\n @Output() continue = new EventEmitter();\r\n @Output() employeeId = new EventEmitter();\r\n\r\n constructor(private utils:UtilitiesService,\r\n private auth: AuthenticationService,\r\n private httpClient: HttpClient,\r\n private loader: LoaderService,\r\n private errorService: ErrorService,\r\n private claimService: ClaimService) {\r\n\r\n this.memberContactDetails = new MemberContactDetails();\r\n this.employeeForm = new FormGroup({\r\n fundId: new FormControl(''),\r\n membershipNumber: new FormControl(''),\r\n employeeId: new FormControl(''),\r\n employeeNumber: new FormControl(''),\r\n employerName: new FormControl(''),\r\n exitDate: new FormControl(''),\r\n identityValue: new FormControl('',[Validators.minLength(13)]),\r\n identityTypeId: new FormControl(''),\r\n employeeUserName: new FormControl(''),\r\n initials: new FormControl(''),\r\n firstName: new FormControl(''),\r\n surname: new FormControl(''),\r\n dateOfBirth: new FormControl(''),\r\n telephoneNumber: new FormControl(''),\r\n mobileNumber: new FormControl(''),\r\n personalEmail: new FormControl('',[Validators.pattern(\"^\\\\w+([\\\\.-]?\\\\w+)*@\\\\w+([\\\\.-]?\\\\w+)*(\\\\.\\\\w{2,4})+$\")]),\r\n workEmail: new FormControl(),\r\n primaryEmail: new FormControl(''),\r\n isHrEmailAddress: new FormControl(''),\r\n indebtedToEmployer: new FormControl(''),\r\n amountOfDeduction: new FormControl(''),\r\n poBox: new FormControl(''),\r\n address1: new FormControl(''),\r\n address2: new FormControl(''),\r\n address3: new FormControl(''),\r\n postalCode: new FormControl(''),\r\n unitNumber: new FormControl(''),\r\n useResidentialAsPostal: new FormControl(false),\r\n complex: new FormControl(''),\r\n streetNumber: new FormControl('', Validators.required),\r\n streetOrFarmName: new FormControl('', Validators.required),\r\n suburbOrDistrict: new FormControl('', Validators.required),\r\n cityOrTown: new FormControl(''),\r\n country: new FormControl('', Validators.required),\r\n residentialCode: new FormControl('',Validators.required),\r\n titleId: new FormControl(''),\r\n genderId: new FormControl(''),\r\n hrRepresentative: new FormGroup({\r\n hrRepresentativeId: new FormControl(''),\r\n userName: new FormControl(''),\r\n emailAddress: new FormControl(''),\r\n firstName: new FormControl(''),\r\n lastName: new FormControl(''),\r\n contactNumber: new FormControl(''),\r\n }),\r\n membership: new FormArray([\r\n new FormGroup({\r\n employeeMembershipId: new FormControl(''),\r\n employeeId: new FormControl(''),\r\n fundId:new FormControl(''),\r\n fundName: new FormControl(''),\r\n integrationSystem: new FormControl(''),\r\n subscriptionNumber: new FormControl(''),\r\n isHybrid: new FormControl(''),\r\n modifiedBy: new FormControl('')\r\n })\r\n ]),\r\n exit: new FormGroup({\r\n exitId: new FormControl(''),\r\n employeeId: new FormControl(''),\r\n kickoffDate: new FormControl(''),\r\n actionId: new FormControl(''),\r\n statusId: new FormControl(''),\r\n opportunityId: new FormControl(''),\r\n claimId: new FormControl('')\r\n })\r\n });\r\n\r\n }\r\n\r\n ngOnInit() {\r\n this.countries = countries;\r\n this.getMemberInfo();\r\n }\r\n ondropDownChange(event) {\r\n this.countryInvalid = false;\r\n if(event.target.value == \"\"){\r\n this.countryInvalid = true;\r\n }\r\n switch (event.target.id) {\r\n case \"country\":\r\n this.employeeForm.controls['country'].patchValue(event.target.value);\r\n break;\r\n case \"postal-country\":\r\n console.log(event.target.value)\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n getMemberInfo() {\r\n if (this.defaultCountryIfNoAddress(this.employee)){\r\n this.employee.country = 'ZA';\r\n }\r\n if (this.claimService.getMemberContactDetails) {\r\n this.memberContactDetails = this.claimService.getMemberContactDetails;\r\n if (this.defaultCountryIfNoAddress(this.memberContactDetails)){\r\n this.memberContactDetails.country ='ZA';\r\n }\r\n this.showPostalAddressSection(this.memberContactDetails.useResidentialAsPostal);\r\n }else{\r\n this.initData(this.employee);\r\n }\r\n }\r\n\r\n defaultCountryIfNoAddress(employee: any): boolean{\r\n if(!employee.address1 && !employee.address2 && !employee.postalCode && !employee.country){\r\n return true;\r\n }\r\n }\r\n\r\n initData(data){\r\n this.memberContactDetails.unitNumber = data.unitNumber;\r\n this.memberContactDetails.complex = data.complex;\r\n this.memberContactDetails.streetNumber = data.streetNumber;\r\n this.memberContactDetails.streetOrFarmName = data.streetOrFarmName;\r\n this.memberContactDetails.suburbOrDistrict = data.suburbOrDistrict;\r\n this.memberContactDetails.residentialCode = data.residentialCode;\r\n this.memberContactDetails.cityOrTown = data.cityOrTown;\r\n this.memberContactDetails.country = data.country;\r\n this.memberContactDetails.postalCode = data.residentialCode;\r\n this.memberContactDetails.address1 = data.address1;\r\n this.memberContactDetails.address2 = data.address2;\r\n this.memberContactDetails.address3 = data.address3;\r\n this.memberContactDetails.eMail = data.eMail;\r\n this.memberContactDetails.mobileNumber = data.mobileNumber;\r\n this.memberContactDetails.telNumber = data.telNumber;\r\n this.memberContactDetails.useResidentialAsPostal = data.useResidentialAsPostal;\r\n }\r\n\r\n showPostalAddressSection(event) {\r\n this.showPostalAddress = !event;\r\n //this.employeeForm.controls['useResidentialAsPostal'].patchValue(event);\r\n if (event) {\r\n this.employeeForm.controls[\"address1\"].clearValidators();\r\n this.employeeForm.controls[\"address1\"].updateValueAndValidity();\r\n this.employeeForm.controls[\"address2\"].clearValidators();\r\n this.employeeForm.controls[\"address2\"].updateValueAndValidity();\r\n this.employeeForm.controls[\"address3\"].clearValidators();\r\n this.employeeForm.controls[\"address3\"].updateValueAndValidity();\r\n this.employeeForm.controls[\"postalCode\"].clearValidators();\r\n this.employeeForm.controls[\"postalCode\"].updateValueAndValidity();\r\n } else {\r\n this.employeeForm.controls[\"address1\"].setValidators([Validators.required]);\r\n this.employeeForm.controls[\"address1\"].updateValueAndValidity();\r\n this.employeeForm.controls[\"address2\"].setValidators([Validators.required]);\r\n this.employeeForm.controls[\"address2\"].updateValueAndValidity();\r\n this.employeeForm.controls[\"address3\"].setValidators([Validators.required]);\r\n this.employeeForm.controls[\"address3\"].updateValueAndValidity();\r\n this.employeeForm.controls[\"postalCode\"].setValidators([Validators.required]);\r\n this.employeeForm.controls[\"postalCode\"].updateValueAndValidity();\r\n }\r\n }\r\n\r\n validate() {\r\n this.formSubmitted = true;\r\n const countryValue = this.employeeForm.get(\"country\").value;\r\n if (countryValue == \"\") {\r\n this.countryInvalid = true;\r\n this.errorService.openErrorPopup(\"Please complete required fields.\");\r\n } else {\r\n if (this.employeeForm.invalid) {\r\n this.errorService.openErrorPopup(\"Please complete required fields.\");\r\n }\r\n else {\r\n const chkValue = this.employeeForm.get(\"useResidentialAsPostal\").value;\r\n if (chkValue) {\r\n this.continue.emit(this.memberContactDetails);\r\n }\r\n if (!chkValue) {\r\n this.continue.emit(this.memberContactDetails);\r\n }\r\n\r\n }\r\n }\r\n }\r\n\r\n}\r\n","\r\n \r\n
\r\n
\r\n
Please confirm that we have your correct address as registered with SARS.
\r\n
\r\n
\r\n
\r\n Unit Number \r\n
\r\n
\r\n
\r\n
\r\n
\r\n Complex name \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n Street number \r\n
\r\n
\r\n
\r\n
\r\n
\r\n Street or farm name \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n Suburb \r\n
\r\n
\r\n
\r\n
\r\n
\r\n City or town \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n Code \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n Country \r\n
\r\n
\r\n
\r\n {{country.Name}} \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
Postal address same as Residential.
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n Address 1 \r\n
\r\n
\r\n
\r\n
\r\n
\r\n Address 2 \r\n
\r\n
\r\n
\r\n
\r\n
\r\n Address 3 \r\n
\r\n
\r\n
\r\n
\r\n
\r\n Postal code \r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n \r\n\r\n\r\n","import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';\r\nimport {HttpClient, HttpHeaders} from \"@angular/common/http\";\r\nimport {environment} from \"../../../../environments/environment\";\r\nimport {UtilitiesService} from \"../../../services/utilities.service\";\r\nimport {StoreService} from \"../../../services/storeService\";\r\nimport {LoaderService} from \"../../../services/loader.service\";\r\nimport {ErrorService} from \"../../../services/error.service\";\r\nimport {Observable} from \"rxjs\";\r\nimport { saveAs } from 'file-saver';\r\nimport { countries } from \"./../../../constants/countries\";\r\nimport { AuthenticationService } from 'src/app/services/authentication.service';\r\nimport appsettings from \"../../../../assets/appsettings.json\"\r\n\r\n@Component({\r\n selector: 'app-member-tax-details',\r\n templateUrl: './member-tax-details.component.html',\r\n styleUrls: ['./member-tax-details.component.scss']\r\n})\r\nexport class MemberTaxDetailsComponent implements OnInit {\r\n\r\n taxReference: any;\r\n @Output() countryChange = new EventEmitter();\r\n @Output() download = new EventEmitter();\r\n countries: any;\r\n fileName: string = null;\r\n file: File;\r\n private files: FileList;\r\n @Input() employeeId;\r\n taxResidence: string = '';\r\n\r\n constructor(private utils: UtilitiesService, private httpClient: HttpClient,\r\n private auth: AuthenticationService, private loader: LoaderService,\r\n private errorService: ErrorService) {\r\n\r\n }\r\n\r\n ngOnInit() {\r\n this.countries = countries;\r\n this.taxResidence = '';\r\n }\r\n\r\n ondropDownChange() {\r\n const data = {\r\n country: this.taxResidence,\r\n taxRef: this.taxReference\r\n }\r\n this.countryChange.emit(data);\r\n }\r\n\r\n onTaxDetailsUpdate(){\r\n const data = {\r\n country: this.taxResidence,\r\n taxRef: this.taxReference\r\n }\r\n this.countryChange.emit(data);\r\n }\r\n\r\n uploadFile(url: string, file: File): Observable {\r\n this.fileName = file.name\r\n let formData = new FormData();\r\n formData.append('formFile', file);\r\n const headers = new HttpHeaders().set('Authorization', this.auth.getAuthorizationHeaderValue());\r\n const options = {headers: headers};\r\n return this.httpClient.post(url, formData, options);\r\n }\r\n\r\n deleteFile(url: string) {\r\n const headers = new HttpHeaders().set('Authorization', this.auth.getAuthorizationHeaderValue());\r\n const options = {headers: headers};\r\n return this.httpClient.delete(url, options);\r\n }\r\n\r\n fileChange($event: Event) {\r\n this.files = $event.target['files'];\r\n if (this.files.length == 0)\r\n return;\r\n this.file = (this.files)[0];\r\n this.loader.start();\r\n let url = `${appsettings.digitalHRAssisServicesUrl}${appsettings.endPoints.memberDocuments}?employeeId=${this.employeeId}&fileType=WTI&overWriteIfExists=true`\r\n this.uploadFile(url, this.file).subscribe(resp => {\r\n this.loader.stop();\r\n this.errorService.openErrorPopup('Upload successful.')\r\n }, err => {\r\n console.log(err.status)\r\n switch (err.status) {\r\n case 404:\r\n this.loader.stop();\r\n this.errorService.openErrorPopup('No available documents.')\r\n break;\r\n case 500:\r\n this.loader.stop();\r\n if(err.error.error[0].includes('The document type you are trying to upload is not allowed.')){\r\n this.errorService.openErrorPopup('The document type you are trying to upload is not allowed.(Allowed type: .pdf)');\r\n }else {\r\n this.errorService.openErrorPopup('File size exceeds limit');\r\n }\r\n this.fileName = null;\r\n break;\r\n default:\r\n break;\r\n }\r\n });\r\n }\r\n deleteWTI() {\r\n this.loader.start();\r\n this.deleteFile(`${appsettings.digitalHRAssisServicesUrl}${environment.endPoints.memberDocuments}?employeeId=${this.employeeId}&fileType=WTI`).subscribe(resp => {\r\n this.fileName = null;\r\n document.getElementById('wti-form-upload')['value'] = '';\r\n this.loader.stop()\r\n }, err => {\r\n this.loader.stop()\r\n })\r\n }\r\n downloadWTI() {\r\n const url = `${appsettings.digitalHRAssisServicesUrl}${environment.endPoints.memberDocuments}?fileType=WTI&employeeId=${this.employeeId}`;\r\n const headers = new HttpHeaders().set('Authorization', this.auth.getAuthorizationHeaderValue());\r\n const options = {\r\n headers: headers,\r\n responseType: 'blob' as 'blob'\r\n }\r\n this.loader.start();\r\n this.httpClient.get(\"/content/dam/memberonboarding/wti1.pdf\", options).subscribe(resp => {\r\n let wtiForm = new Blob([resp], {type: 'application/pdf'});\r\n saveAs(wtiForm, \"WTID.pdf\");\r\n this.loader.stop();\r\n }, err => {\r\n switch (err.status) {\r\n case 404:\r\n this.errorService.openErrorPopup('No document available, Please upload document.')\r\n break;\r\n default:\r\n break;\r\n }\r\n window.scroll(0, 0);\r\n this.loader.stop();\r\n });\r\n return false;\r\n }\r\n}\r\n","\r\n \r\n
\r\n
Please provide your tax details as below.
\r\n
\r\n
\r\n \r\n Income tax number \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n Country of Tax Residence \r\n
\r\n
\r\n
\r\n {{country.Name}} \r\n \r\n
\r\n
\r\n
\r\n
\r\n Please complete a withholding tax on interest (WTI) form if your country of residence for tax purposes is not South Africa.\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{ fileName == null ? 'Completed WTI form' : (fileName.length >= 29 ? fileName.substring(0,29) + '...' : fileName) }}
\r\n
\r\n
\r\n
\r\n
\r\n\r\n","import { Component, EventEmitter, Input, OnInit, Output } from \"@angular/core\";\r\nimport { FormArray, FormControl, FormGroup, Validators } from \"@angular/forms\";\r\nimport { UtilitiesService } from \"../../../services/utilities.service\";\r\nimport { HttpClient, HttpHeaders } from \"@angular/common/http\";\r\nimport { StoreService } from \"../../../services/storeService\";\r\nimport { LoaderService } from \"../../../services/loader.service\";\r\nimport { ContentService } from \"../../../services/content.service\";\r\nimport { RoutingService } from \"../../../services/routing.service\";\r\nimport { ErrorService } from \"../../../services/error.service\";\r\nimport { countries } from \"./../../../constants/countries\";\r\nimport { Router } from \"@angular/router\";\r\nimport { messages } from \"../../../constants/warningAndErrorMessages\";\r\nimport { getErrorMessage } from \"../../../shared/common-functions\";\r\nimport { ActiveTab } from \"../../resignations/savings/savings-details/shared/enum\";\r\nimport { AuthenticationService } from \"src/app/services/authentication.service\";\r\nimport appsettings from \"../../../../assets/appsettings.json\"\r\n\r\n@Component({\r\n selector: \"app-personal-details\",\r\n templateUrl: \"./personal-details.component.html\",\r\n styleUrls: [\"./personal-details.component.scss\"],\r\n})\r\nexport class MemberPersonalDetailsComponent implements OnInit {\r\n @Input() page: any = \"confirm\";\r\n @Input() fullWithdrawal: boolean;\r\n @Input() fullTransfer: boolean;\r\n @Input() fullCash: boolean;\r\n @Input() partTransfer: boolean;\r\n @Input() activeTab: ActiveTab;\r\n @Input() showTabs: boolean = true;\r\n @Input() employee: any;\r\n @Input() memberValues: any;\r\n @Output() continue = new EventEmitter();\r\n @Output() claimsaved = new EventEmitter();\r\n\r\n @Output() next = new EventEmitter();\r\n savingsUrl: any;\r\n member: any;\r\n claimId: any = \"\";\r\n isSubmittedSuccessfully: any = \"\";\r\n responseMessage: any = \"\";\r\n email: any;\r\n countries: any;\r\n claimSuccess = false;\r\n showPopi = false;\r\n showDeclaration: Boolean = false;\r\n showBlock: boolean = false;\r\n lastContributionDate: string;\r\n employeeForm: FormGroup;\r\n titles: any;\r\n idTypes: any;\r\n genders: any;\r\n country: any;\r\n selectedIdType: number = 0;\r\n formSubmitted: boolean = false;\r\n dateOfBirth: Date;\r\n exitDate: Date;\r\n messages = messages;\r\n employeeFormInvalid: boolean = false;\r\n constructor(\r\n private utils: UtilitiesService,\r\n private httpClient: HttpClient,\r\n private loader: LoaderService,\r\n private contentService: ContentService,\r\n private routingService: RoutingService,\r\n private errorService: ErrorService,\r\n private auth: AuthenticationService,\r\n private router: Router\r\n ) {\r\n this.employeeForm = new FormGroup({\r\n fundId: new FormControl(\"\"),\r\n membershipNumber: new FormControl(\"\"),\r\n employeeId: new FormControl(\"\"),\r\n employeeNumber: new FormControl(\"\"),\r\n employerName: new FormControl(\"\"),\r\n exitDate: new FormControl(\"\"),\r\n identityValue: new FormControl(\"\", [\r\n Validators.required,\r\n Validators.minLength(13),\r\n ]),\r\n identityTypeId: new FormControl(\"\", Validators.required),\r\n employeeUserName: new FormControl(\"\"),\r\n initials: new FormControl(\"\"),\r\n firstName: new FormControl(\"\", Validators.required),\r\n surname: new FormControl(\"\", Validators.required),\r\n dateOfBirth: new FormControl(\"\", Validators.required),\r\n telephoneNumber: new FormControl(\"\", [\r\n Validators.pattern(\"^([0|+[0-9]{1,5})?([1-9][0-9]{8}|[1-9][0-9]{9})$\"),\r\n ]),\r\n mobileNumber: new FormControl(\"\", [\r\n Validators.required,\r\n Validators.pattern(\"^([0|+[0-9]{1,5})?([1-9][0-9]{8}|[1-9][0-9]{9})$\"),\r\n ]),\r\n personalEmail: new FormControl(null, [\r\n Validators.required,\r\n Validators.pattern(\r\n \"^\\\\w+([\\\\.-]?\\\\w+)*@\\\\w+([\\\\.-]?\\\\w+)*(\\\\.\\\\w{2,4})+$\"\r\n ),\r\n ]),\r\n workEmail: new FormControl(),\r\n primaryEmail: new FormControl(\"\"),\r\n isHrEmailAddress: new FormControl(\"\"),\r\n indebtedToEmployer: new FormControl(\"\"),\r\n amountOfDeduction: new FormControl(\"\"),\r\n poBox: new FormControl(\"\"),\r\n unitNumber: new FormControl(\"\"),\r\n complex: new FormControl(\"\"),\r\n streetNumber: new FormControl(\"\"),\r\n streetOrFarmName: new FormControl(\"\"),\r\n suburbOrDistrict: new FormControl(\"\"),\r\n cityOrTown: new FormControl(\"\"),\r\n country: new FormControl(\"\"),\r\n titleId: new FormControl(\"\"),\r\n genderId: new FormControl(\"\"),\r\n hrRepresentative: new FormGroup({\r\n hrRepresentativeId: new FormControl(\"\"),\r\n userName: new FormControl(\"\"),\r\n emailAddress: new FormControl(\"\"),\r\n firstName: new FormControl(\"\"),\r\n lastName: new FormControl(\"\"),\r\n contactNumber: new FormControl(\"\"),\r\n }),\r\n membership: new FormArray([\r\n new FormGroup({\r\n employeeMembershipId: new FormControl(\"\"),\r\n employeeId: new FormControl(\"\"),\r\n fundId: new FormControl(\"\"),\r\n fundName: new FormControl(\"\"),\r\n integrationSystem: new FormControl(\"\"),\r\n subscriptionNumber: new FormControl(\"\"),\r\n isHybrid: new FormControl(\"\"),\r\n modifiedBy: new FormControl(\"\"),\r\n }),\r\n ]),\r\n exit: new FormGroup({\r\n exitId: new FormControl(\"\"),\r\n employeeId: new FormControl(\"\"),\r\n kickoffDate: new FormControl(\"\"),\r\n actionId: new FormControl(\"\"),\r\n statusId: new FormControl(\"\"),\r\n opportunityId: new FormControl(\"\"),\r\n claimId: new FormControl(\"\"),\r\n }),\r\n });\r\n }\r\n\r\n ngOnInit() {\r\n this.titles = JSON.parse(localStorage.getItem(\"titles\"));\r\n this.idTypes = JSON.parse(localStorage.getItem(\"identityTypes\"));\r\n this.genders = JSON.parse(localStorage.getItem(\"genders\"));\r\n this.countries = countries;\r\n if (localStorage.getItem(\"showBlock\")) {\r\n this.showBlock = true;\r\n } else {\r\n this.showBlock = false;\r\n }\r\n this.savingsUrl = this.router.url.includes(\"confirm-details.html\");\r\n if (this.savingsUrl) {\r\n this.employeeForm.addControl(\r\n \"address1\",\r\n new FormControl(null, Validators.required)\r\n );\r\n this.employeeForm.addControl(\r\n \"address2\",\r\n new FormControl(null, Validators.required)\r\n );\r\n this.employeeForm.addControl(\r\n \"address3\",\r\n new FormControl(null, Validators.required)\r\n );\r\n this.employeeForm.addControl(\r\n \"postalCode\",\r\n new FormControl(null, Validators.required)\r\n );\r\n }\r\n this.getMemberInfo();\r\n }\r\n\r\n ondropDownChange(event: any) {\r\n switch (event.target.id) {\r\n case \"title\":\r\n this.employeeForm.controls[\"titleId\"].patchValue(\r\n event.target.selectedIndex\r\n );\r\n break;\r\n case \"gender\":\r\n this.employeeForm.controls[\"genderId\"].patchValue(\r\n event.target.selectedIndex\r\n );\r\n break;\r\n case \"idType\":\r\n this.employeeForm.controls[\"identityTypeId\"].patchValue(\r\n event.target.selectedIndex\r\n );\r\n break;\r\n case \"country\":\r\n this.employeeForm.controls[\"country\"].patchValue(event.target.value);\r\n \r\n break;\r\n }\r\n }\r\n\r\n // TODO: member info call should be made by the parent component, save it in the store/service and pass this object into this component\r\n getMemberInfo() {\r\n this.dateOfBirth = new Date(this.employee.dateOfBirth);\r\n this.exitDate = new Date(this.employee.exitDate);\r\n this.defaultCountryIfNoAddress(this.employee);\r\n this.employeeForm.patchValue(this.employee);\r\n if (this.employee.identityTypeId === 1) {\r\n localStorage.setItem(\"idType\", \"1\");\r\n this.selectedIdType = 4;\r\n } else if (this.employee.identityTypeId === 2) {\r\n localStorage.setItem(\"idType\", \"2\");\r\n this.selectedIdType = 5;\r\n this.employeeForm.get(\"identityValue\")!.clearValidators();\r\n this.employeeForm.get(\"identityValue\")!.updateValueAndValidity();\r\n }\r\n }\r\n\r\n defaultCountryIfNoAddress(employee: any) {\r\n if (\r\n !this.employee.address1 &&\r\n !this.employee.address2 &&\r\n !this.employee.postalCode &&\r\n !this.employee.country\r\n ) {\r\n this.employee.country = \"ZA\";\r\n }\r\n }\r\n\r\n submit(employeeForm: any) {\r\n if (this.employeeForm.invalid) {\r\n this.employeeFormInvalid = true;\r\n this.errorService.openErrorPopup(\r\n \"Please fill in all the required Personal details, in the correct format.\"\r\n );\r\n } else {\r\n this.employeeFormInvalid = false;\r\n if (\r\n this.employeeForm.value &&\r\n this.employeeForm.value.personalEmail &&\r\n this.employeeForm.value.personalEmail !== \"\"\r\n ) {\r\n this.employeeForm.value.primaryEmail =\r\n this.employeeForm.value.personalEmail;\r\n }\r\n this.employee.primaryEmail = this.employeeForm.value.primaryEmail;\r\n this.employee.personalEmail = this.employeeForm.value.personalEmail;\r\n this.employee.workEmail = this.employeeForm.value.workEmail;\r\n this.loader.start();\r\n const headers = new HttpHeaders().set(\r\n \"Authorization\",\r\n this.auth.getAuthorizationHeaderValue()\r\n );\r\n const options = { headers: headers };\r\n this.httpClient\r\n .post(\r\n `${appsettings.digitalHRAssisServicesUrl}${appsettings.endPoints.confirmDetailsUpdate}`,\r\n this.employeeForm.value,\r\n options\r\n )\r\n .subscribe(\r\n (resp:any) => {\r\n this.employee = resp[\"employee\"];\r\n this.loader.stop();\r\n this.makeClaim();\r\n this.showDeclaration = false;\r\n },\r\n (err) => {\r\n let errorMessage = getErrorMessage(err);\r\n this.errorService.openErrorPopup(\r\n \"Error while confirming details: \" + errorMessage\r\n );\r\n this.loader.stop();\r\n }\r\n );\r\n }\r\n }\r\n\r\n validateForm(employeeForm:any) {\r\n if (employeeForm.invalid) {\r\n this.formSubmitted = true;\r\n this.employeeFormInvalid = true;\r\n this.errorService.openErrorPopup(\r\n \"Please fill in all the required Personal details, in the correct format.\"\r\n );\r\n } else {\r\n this.showDeclaration = true;\r\n }\r\n }\r\n\r\n makeClaim() {\r\n // TODO: move claim model object\r\n let claimObject = {\r\n claim: {\r\n incomeTaxNumber: null,\r\n indebtedToEmployer: false,\r\n amountOfDeduction: null,\r\n employeeNumber: null,\r\n employerName: null,\r\n bulkClaimsBatchId: null,\r\n nonSaTaxpayer: false,\r\n annualTaxableSalary: 60000.0,\r\n sarsCountryCode: \"ZA\",\r\n dateLastContrib: \"2021-01-29\",\r\n continuation: false,\r\n countryOfResidence: \"ZA\",\r\n userEmail: null,\r\n membership: [\r\n {\r\n fundId: null,\r\n subscriptionNumber: null,\r\n withdrawalPaymentInstruction: {\r\n fkWithdrawalTypeID: \"Resignation\",\r\n fkWithdrawalOptionId: \"KeepYourSavingsWhereTheyAre\",\r\n cashAmount: 0,\r\n amountIsPostTax: false,\r\n transferToFundName: null,\r\n transferToPolicyRef: null,\r\n withdrawalDate: \"2021-01-29\",\r\n broker: null,\r\n },\r\n },\r\n ],\r\n member: {\r\n firstName: null,\r\n middleName: null,\r\n surname: null,\r\n maidenName: null,\r\n initials: null,\r\n dateOfBirth: null,\r\n identity: {\r\n fkOfficialIdentityTypeID: \"RSAID\",\r\n fkCountryOfIssueID: \"ZA\",\r\n identityValue: null,\r\n },\r\n },\r\n memberContactDetails: {\r\n unitNumber: null,\r\n complex: null,\r\n streetNumber: null,\r\n streetOrFarmName: null,\r\n suburbOrDistrict: null,\r\n cityOrTown: null,\r\n country: \"South Africa\",\r\n postalCode: null,\r\n useResidentialAsPostal: true,\r\n telNumber: null,\r\n mobileNumber: null,\r\n eMail: null,\r\n address1: null,\r\n address2: null,\r\n address3: null,\r\n },\r\n memberBankingDetail: null,\r\n },\r\n rbc: null,\r\n };\r\n\r\n claimObject.claim.indebtedToEmployer = this.employee.indebtedToEmployer;\r\n claimObject.claim.amountOfDeduction = this.employee.amountOfDeduction;\r\n claimObject.claim.employeeNumber = this.employee.employeeNumber;\r\n claimObject.claim.employerName = this.employee.employerName;\r\n claimObject.claim.userEmail = this.employee.personalEmail;\r\n\r\n claimObject.claim.membership[0].fundId = this.employee.fundId;\r\n claimObject.claim.membership[0].subscriptionNumber =\r\n this.employee.membership[0].subscriptionNumber;\r\n if (this.memberValues) {\r\n if (!this.memberValues.LastContributionDate) {\r\n claimObject.claim.dateLastContrib = new Date().toString();\r\n } else {\r\n claimObject.claim.dateLastContrib =\r\n this.memberValues.LastContributionDate;\r\n }\r\n } else {\r\n claimObject.claim.dateLastContrib = new Date().toString();\r\n }\r\n claimObject.claim.dateLastContrib = this.utils.convertDateShortDash(\r\n claimObject.claim.dateLastContrib\r\n );\r\n claimObject.claim.membership[0].withdrawalPaymentInstruction.withdrawalDate =\r\n this.utils.convertDateShortDash(this.employee.exitDate); \r\n\r\n claimObject.claim.member.firstName = this.employee.firstName;\r\n claimObject.claim.member.surname = this.employee.surname;\r\n claimObject.claim.member.initials = this.employee.initials;\r\n claimObject.claim.member.dateOfBirth = this.employee.dateOfBirth;\r\n claimObject.claim.member.identity.identityValue =\r\n this.employee.identityValue;\r\n\r\n claimObject.claim.memberContactDetails.address1 = this.employee.address1;\r\n claimObject.claim.memberContactDetails.address2 = this.employee.address2;\r\n claimObject.claim.memberContactDetails.address3 = this.employee.address3;\r\n claimObject.claim.memberContactDetails.postalCode =\r\n this.employee.postalCode;\r\n claimObject.claim.memberContactDetails.country = this.employee.country;\r\n claimObject.claim.memberContactDetails.telNumber =\r\n this.employee.telephoneNumber;\r\n claimObject.claim.memberContactDetails.mobileNumber =\r\n this.employee.mobileNumber;\r\n claimObject.claim.memberContactDetails.eMail = this.employee.personalEmail;\r\n claimObject.rbc = true;\r\n if (this.page !== \"confirm\") {\r\n this.continue.emit(claimObject.claim);\r\n } else {\r\n const headers = new HttpHeaders().set(\r\n \"Authorization\",\r\n this.auth.getAuthorizationHeaderValue()\r\n );\r\n const options = { headers: headers };\r\n this.httpClient\r\n .post(\r\n `${appsettings.digitalClaimsService}${appsettings.endPoints.claimWidthrawal}`,\r\n claimObject,\r\n options\r\n )\r\n .subscribe(\r\n (resp:any) => {\r\n this.isSubmittedSuccessfully = resp[\"SubmittedSuccessfully\"];\r\n this.responseMessage = resp[\"Message\"];\r\n if (this.isSubmittedSuccessfully) {\r\n this.claimId = resp[\"ClaimId\"];\r\n window.scroll(0, 0);\r\n this.claimSuccess = true;\r\n this.claimsaved.emit({\r\n id: this.claimId,\r\n status: this.claimSuccess,\r\n });\r\n } else {\r\n this.errorService.openErrorPopup(\r\n this.responseMessage\r\n ? this.responseMessage\r\n : \"An error occurred while confirming the member details.\"\r\n );\r\n }\r\n this.loader.stop();\r\n },\r\n (err) => {\r\n this.errorService.openErrorPopup(\r\n \"An error occurred while confirming the member details.\"\r\n );\r\n window.scroll(0, 0);\r\n this.loader.stop();\r\n }\r\n );\r\n }\r\n }\r\n\r\n closePopUp() {\r\n this.claimSuccess = false;\r\n this.routingService.savingsSummary();\r\n }\r\n\r\n toggle() {\r\n this.showBlock = !this.showBlock;\r\n localStorage.removeItem(\"showBlock\");\r\n }\r\n logout() {\r\n //this.authService.logout(false);\r\n }\r\n dobChanged(event: Date) {\r\n this.employeeForm.controls[\"dateOfBirth\"].patchValue(\r\n `${event.getFullYear()}${\"-\"}${\r\n event.getMonth() + 1\r\n }${\"-\"}${event.getDate()}${\"T00:00:00\"}`\r\n );\r\n }\r\n profileLandingPage() {\r\n this.routingService.profileLandingPage();\r\n }\r\n\r\n continueTab(data: string) {\r\n if (this.employeeForm.invalid) {\r\n this.formSubmitted = true;\r\n this.errorService.openErrorPopup(\"Please complete required fields.\");\r\n } else {\r\n this.makeClaim();\r\n }\r\n }\r\n\r\n nextTab(tab: string) {\r\n if (this.employeeForm.invalid) {\r\n this.formSubmitted = true;\r\n this.errorService.openErrorPopup(\"Please complete required fields.\");\r\n } else {\r\n this.next.emit(tab);\r\n }\r\n }\r\n}\r\n "," \r\n\r\n\r\n \r\n
\r\n Identification details
\r\n Your employer\r\n provided the details below. If you need to change any of these details, please contact your HR representative.\r\n
\r\n \r\n \r\n
\r\n
\r\n Name \r\n
\r\n
\r\n
\r\n
\r\n
\r\n Surname \r\n
\r\n
\r\n
\r\n
\r\n
\r\n Date of Birth \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n Identity document type \r\n
\r\n
\r\n \r\n {{type.label}}\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n Identity number \r\n
\r\n
\r\n
\r\n
\r\n
\r\n Gender \r\n
\r\n
\r\n \r\n \r\n {{gender.label}} \r\n \r\n
\r\n
\r\n
\r\n
\r\n Date of Exit \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n Personal email address \r\n
\r\n
\r\n
\r\n
\r\n
\r\n {{ messages.MANDATORY_MESSAGE }}\r\n
\r\n
\r\n {{ messages.EMAIL_FORMAT }}\r\n
\r\n
\r\n
\r\n
\r\n Personal cell number \r\n
\r\n
\r\n
\r\n
\r\n
\r\n {{ messages.MANDATORY_MESSAGE }}\r\n
\r\n
\r\n {{ messages.PHONE_FORMAT }}\r\n
\r\n
\r\n
\r\n
\r\n Home number \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n Address 1 \r\n
\r\n
\r\n
\r\n
\r\n
\r\n {{ messages.MANDATORY_MESSAGE }}\r\n
\r\n
\r\n
\r\n
\r\n Address 2 \r\n
\r\n
\r\n
\r\n
\r\n
\r\n {{ messages.MANDATORY_MESSAGE }}\r\n
\r\n
\r\n
\r\n
\r\n Address 3 \r\n
\r\n
\r\n
\r\n
\r\n
\r\n {{ messages.MANDATORY_MESSAGE }}\r\n
\r\n
\r\n
\r\n
\r\n Postal Code \r\n
\r\n
\r\n
\r\n
\r\n
\r\n {{ messages.MANDATORY_MESSAGE }}\r\n
\r\n
\r\n
\r\n
\r\n Postal Country \r\n
\r\n
\r\n \r\n {{country.Name}} \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n \r\n
\r\n
\r\n Keeping your beneficiary nominations up to date means that those who are dependent on you can receive\r\n financial support at a time when they'll need it most.\r\n
\r\n
\r\n Go to the\r\n Alexforbes Online portal to\r\n update your beneficiaries.\r\n
\r\n
\r\n \r\n
confirm\r\n detail \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n\r\n\r\n\r\n
\r\n
\r\n
\r\n \r\n \r\n
Protecting your information
\r\n
\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n Alexforbes will protect your personal information and only use it for the intended purpose.\r\n
\r\n
\r\n
\r\n We will use your personal information to act on your request or for any other valid or legal purpose. \r\n We will share your personal information with third parties: \r\n \r\n so that we can provide products and services to you \r\n if a law requires us to share this information \r\n \r\n We will keep your personal information \r\n \r\n for as long as we or the fund needs it to act on your instruction \r\n if a law requires us to share this information \r\n \r\n Once we are no longer allowed to keep your personal information, we will decide if it needs to be\r\n destroyed, deleted or de-identified (no longer linked to you).\r\n \r\n \r\n
\r\n
\r\n\r\n\r\n\r\n\r\n\r\n
\r\n
\r\n
Complete your claim by agreeing to the following declaration:
\r\n
\r\n
\r\n\r\n
\r\n
\r\n You understand your options, including the tax implications. \r\n If there is any loss suffered as a result of incorrect information given by yourself, neither Alexforbes\r\n nor the fund are responsible for the losses. \r\n You made your own decision or were assisted by an adviser. \r\n When all your information has been received, we will process your decision according to the fund rules and the\r\n withdrawal process. \r\n If you are in debt to your employer, your savings will be used to pay the debt in terms of section 37D of the\r\n Pension Funds Act. \r\n Once you have chosen an option and SARS has issued a directive, the directive cannot be cancelled. \r\n You acknowledge that Retirement Benefit Counselling has been offered to you throughout this exit journey. If\r\n you chose not to get in touch with us we accept that you have declined this offering. \r\n You acknowledge that this claim form will be sent to your HR representative for record purposes. \r\n \r\n
\r\n
\r\n \r\n Cancel\r\n \r\n \r\n Agree\r\n \r\n
\r\n\r\n\r\n
\r\n","import { Component, OnInit, Output, EventEmitter } from '@angular/core';\r\nimport { Constants } from 'src/app/constants/constants';\r\n\r\n@Component({\r\n selector: 'app-popi',\r\n templateUrl: './popi.component.html',\r\n styleUrls: ['./popi.component.scss']\r\n})\r\nexport class PopiComponent implements OnInit {\r\n\r\n @Output() open: EventEmitter = new EventEmitter();\r\n popIaDisclosurePath: string = \"\";\r\n constructor() { }\r\n\r\n ngOnInit() {\r\n this.popIaDisclosurePath = Constants.popia_clause_form;\r\n }\r\n\r\n showPopi(){\r\n window.scroll(0,0);\r\n this.open.emit('showPopiBlock');\r\n }\r\n\r\n}\r\n","import {Component, OnInit, Input, EventEmitter, Output} from '@angular/core';\r\nimport { SavingCalculations } from '../../resignations/models/savings-calculations.model';\r\nimport { StoreService } from './../../../../app/services/storeService';\r\nimport { ErrorService } from './../../../../app/services/error.service';\r\nimport { Observable } from 'rxjs';\r\nimport { HttpHeaders, HttpClient } from '@angular/common/http';\r\nimport appsettings from \"../../../../assets/appsettings.json\"\r\nimport { LoaderService } from './../../../../app/services/loader.service';\r\n\r\n@Component({\r\n selector: 'app-savings-calculations',\r\n templateUrl: './savings-calculations.component.html',\r\n styleUrls: ['./savings-calculations.component.scss']\r\n})\r\nexport class SavingsCalculationsComponent implements OnInit {\r\n\r\n savingsCalculations: SavingCalculations;\r\n @Input() memberValues: any;\r\n @Input() page: string;\r\n @Input() retirementProjectionValues: any;\r\n @Input() memberDetails: any;\r\n existingSavingsValue: number;\r\n cachedValues: any = null;\r\n @Output() showDisclaimer = new EventEmitter();\r\n @Output() cacheUpdated = new EventEmitter();\r\n @Output() cacheReset = new EventEmitter();\r\n @Output() cacheInitialized = new EventEmitter();\r\n\r\n constructor( private storeService: StoreService, private errorService: ErrorService,\r\n private httpClient: HttpClient, private loader: LoaderService) {\r\n this.savingsCalculations = new SavingCalculations();\r\n }\r\n\r\n ngOnInit() {\r\n if (this.memberValues && this.retirementProjectionValues){\r\n this.cachedValues = this.retirementProjectionValues;\r\n }else{\r\n this.getRetirementProjectionValues();\r\n }\r\n }\r\n\r\n calculateAge(birthday: any) {\r\n var ageDifMs = Date.now() - birthday.getTime();\r\n var ageDate = new Date(ageDifMs);\r\n return Math.abs(ageDate.getUTCFullYear() - 1970);\r\n }\r\n\r\n getRetirementProjectionValues(data: number = 0){\r\n this.savingsCalculations.existingSavings = data;\r\n this.createSavingsCalculationsData(this.savingsCalculations).subscribe((data) =>{\r\n this.retirementProjectionValues = data;\r\n if(this.cachedValues == null) {\r\n this.cachedValues = data;\r\n this.cacheInitialized.emit(data)\r\n }\r\n },\r\n (error) =>{\r\n this.errorService.openErrorPopup('An error occurred while getting the Retirement projection.' );\r\n })\r\n }\r\n\r\n createSavingsCalculationsData(data: SavingCalculations): Observable{\r\n const token = this.storeService.getStoredData().id_token;\r\n const headers = new HttpHeaders()\r\n .set('Authorization',`Bearer ${token}`)\r\n .set('Content-Type', 'application/json');\r\n const options = {headers: headers};\r\n this.savingsCalculations.currentAge = this.calculateAge(new Date(this.memberDetails.dateOfBirth));\r\n switch (this.memberDetails.genderId) {\r\n case 0:\r\n this.savingsCalculations.gender = \"* Select *\";\r\n break;\r\n case 1:\r\n this.savingsCalculations.gender = \"Male\";\r\n break;\r\n case 2:\r\n this.savingsCalculations.gender = \"Female\";\r\n break;\r\n case 3:\r\n this.savingsCalculations.gender = \"Other\";\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n if(this.savingsCalculations.existingSavings > 0) {\r\n this.savingsCalculations.currentFundCredit = this.memberValues.FundCredit + this.savingsCalculations.existingSavings;\r\n }else {\r\n this.savingsCalculations.currentFundCredit = this.memberValues.FundCredit;\r\n }\r\n this.savingsCalculations.contributionPercentage = this.memberValues.RetirementContributionRate/100;\r\n this.savingsCalculations.salary = this.memberValues.AnnualPensionableSalary/12;\r\n const url = `${appsettings.digitalHRAssisServicesUrl}${appsettings.endPoints.retirementProjection}`;\r\n return this.httpClient.post(url, data, options);\r\n }\r\n\r\n removeExistingSavings(){\r\n this.retirementProjectionValues = this.cachedValues;\r\n this.cacheReset.emit();\r\n }\r\n\r\n notifyParent($event: any) {\r\n this.showDisclaimer.emit()\r\n }\r\n}\r\n","\r\n \r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { SavingsMemberValuesComponent } from './savings-member-values/savings-member-values.component';\r\nimport { SavingsCalculationsComponent } from './savings-calculations.component';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\n\r\n\r\n@NgModule({\r\n declarations: [SavingsMemberValuesComponent, SavingsCalculationsComponent],\r\n imports: [\r\n CommonModule,\r\n ReactiveFormsModule,\r\n FormsModule\r\n ],\r\n exports: [\r\n SavingsMemberValuesComponent,\r\n SavingsCalculationsComponent\r\n ]\r\n})\r\nexport class SavingsCalculationsModule { }\r\n","import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';\r\nimport { SavingCalculations } from '../../../../../app/components/resignations/models/savings-calculations.model';\r\nimport { FormGroup, FormControl, Validators } from '@angular/forms';\r\n@Component({\r\n selector: 'app-savings-member-values',\r\n templateUrl: './savings-member-values.component.html',\r\n styleUrls: ['./savings-member-values.component.scss']\r\n})\r\nexport class SavingsMemberValuesComponent implements OnInit {\r\n\r\n @Input() memberValues: any;\r\n @Input() page: string;\r\n @Input() retirementProjectionValues: any;\r\n showUpdateProjection: boolean = false;\r\n showAddOtherSavings: boolean = true;\r\n @Output() buttonClicked = new EventEmitter();\r\n @Input() savingsCalculation: SavingCalculations;\r\n existingSavingsForm: FormGroup;\r\n @Output() remove = new EventEmitter();\r\n @Output() showDisclaimer = new EventEmitter();\r\n\r\n showMoreDetails : boolean = false;\r\n lastContribution : any;\r\n memberContributions : any;\r\n employerContributions : any;\r\n fundCredit : any;\r\n montlyIncomeProjection: any;\r\n toggleMoreDetails(){\r\n if(this.showMoreDetails){\r\n this.showMoreDetails = false;\r\n }else{\r\n this.showMoreDetails = true;\r\n }\r\n }\r\n constructor() {}\r\n\r\n ngOnInit() {\r\n this.onCreateExistingSavingsForm();\r\n this.lastContribution = this.removeDecimals(this.memberValues.LastContribution);\r\n this.memberContributions = this.removeDecimals(this.memberValues.MemberContributions);\r\n this.employerContributions = this.removeDecimals(this.memberValues.EmployerContributions);\r\n this.fundCredit = this.removeDecimals(this.memberValues.FundCredit);\r\n this.montlyIncomeProjection = this.removeDecimals(this.retirementProjectionValues.montlyIncomeProjection);\r\n }\r\n\r\n onAddOtherSavings(){\r\n this.showUpdateProjection = true;\r\n this.showAddOtherSavings= false;\r\n }\r\n\r\n onClick($event: any){\r\n const savingsValue = this.existingSavingsForm.get('existingSavings')!.value;\r\n this.buttonClicked.emit(savingsValue);\r\n }\r\n\r\n removeDecimals(amount: number){\r\n return Math.round(amount);\r\n }\r\n\r\n onCreateExistingSavingsForm() {\r\n this.existingSavingsForm = new FormGroup({\r\n existingSavings: new FormControl(null, [ Validators.required, Validators.pattern(\"^$|^[0-9]*$\")])\r\n });\r\n }\r\n\r\n OnRemove(){\r\n this.remove.emit();\r\n this.showAddOtherSavings = true;\r\n this.showUpdateProjection = false;\r\n }\r\n\r\n}\r\n","\r\n
\r\n
\r\n
Your last contribution was \r\n
\r\n
\r\n R{{lastContribution | number:'1.0-0':'fr-FR'}} \r\n
\r\n
\r\n
\r\n
You've been saving towards your retirement \r\n
\r\n
for the past {{memberValues.InvestmentPeriod}}
\r\n
\r\n
\r\n
\r\n
total of \r\n R{{fundCredit | number:'':'fr-FR'}} \r\n
\r\n
\r\n \r\n
\r\n SEE MORE DETAILS\r\n \r\n \r\n \r\n
\r\n
\r\n
Member contributions R{{memberContributions | number:'1.0-0':'fr-FR'}}
\r\n
Employer contributions R{{employerContributions | number:'1.0-0':'fr-FR'}}
\r\n
\r\n
\r\n\r\n
\r\n
What your total savings mean for your retirement: \r\n
\r\n If you keep saving the way you are, you would have R{{retirementProjectionValues.montlyIncomeProjection | number:'1.0-0':'fr-FR'}} a month to live on for retirement.\r\n
\r\n \r\n
\r\n R{{ retirementProjectionValues.montlyIncomeProjection | number:'1.0-0':'fr-FR'}} monthly pension \r\n \r\n
\r\n
\r\n
You can add in existing retirement savings if you have,
\r\n
and if you would like to see a more accurate projection
\r\n
ADD EXISTING RETIREMENT SAVINGS \r\n
\r\n\r\n
\r\n
Add in other retirement savings you have \r\n
How much do you estimate you have in other retirement savings?
\r\n
\r\n \r\n
\r\n Estimated value of your other retirement savings \r\n
\r\n
\r\n
\r\n \r\n
\r\n UPDATE PROJECTION \r\n REMOVE \r\n
\r\n
\r\n
\r\n
\r\n","import { Component, OnInit, OnDestroy } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'app-scrolling-banner',\r\n templateUrl: './scrolling-banner.component.html',\r\n styleUrls: ['./scrolling-banner.component.scss']\r\n})\r\nexport class ScrollingBannerComponent implements OnInit,OnDestroy {\r\n\r\n\r\n bannerStatus: number = 1;\r\n bannerTimer: number = 10000;\r\n startShowBanners: any;\r\n\r\n constructor() { }\r\n\r\n\r\n\r\n ngOnInit() {\r\n this.showBanners();\r\n\r\n this.startShowBanners = setInterval( () => {\r\n this.showBanners();\r\n }, this.bannerTimer);\r\n }\r\n\r\n clearInterval(){\r\n clearInterval(this.startShowBanners);\r\n }\r\n\r\n setInterval(){\r\n this.startShowBanners = setInterval( () => {\r\n this.showBanners();\r\n }, this.bannerTimer);\r\n\r\n }\r\n\r\n goNext(){\r\n this.showBanners();\r\n }\r\n\r\n goPrev(){\r\n if (this.bannerStatus === 1) {\r\n this.bannerStatus = 2;\r\n } else {\r\n if (this.bannerStatus === 2) {\r\n this.bannerStatus = 3;\r\n } else {\r\n if (this.bannerStatus === 3) {\r\n this.bannerStatus = 1;\r\n }\r\n }\r\n }\r\n this.hideBanners();\r\n }\r\n\r\n showBanners(){\r\n\r\n if (this.bannerStatus === 1) {\r\n if (document.getElementById('imgban3') && document.getElementById('imgban1') && document.getElementById('imgban2')) {\r\n document.getElementById('imgban2')!.style.opacity = '0';\r\n setTimeout(function() {\r\n document.getElementById('imgban1')!.style.right = '0px';\r\n document.getElementById('imgban1')!.style.zIndex = '1000';\r\n document.getElementById('imgban2')!.style.right = '-691px';\r\n document.getElementById('imgban2')!.style.zIndex = '1500';\r\n document.getElementById('imgban3')!.style.right = '691px';2\r\n document.getElementById('imgban3')!.style.zIndex = '500';\r\n\r\n }, 500);\r\n setTimeout(function() {\r\n document.getElementById('imgban2')!.style.opacity = '1';\r\n }, 1000);\r\n this.bannerStatus = 2;\r\n }\r\n } else {\r\n if (this.bannerStatus === 2) {\r\n if (document.getElementById('imgban3') && document.getElementById('imgban1') && document.getElementById('imgban2')) {\r\n document.getElementById('imgban3')!.style.opacity = '0';\r\n setTimeout(function() {\r\n document.getElementById('imgban2')!.style.right = '0px';\r\n document.getElementById('imgban2')!.style.zIndex = '1000';\r\n document.getElementById('imgban3')!.style.right = '-691px';\r\n document.getElementById('imgban3')!.style.zIndex = '1500';\r\n document.getElementById('imgban1')!.style.right = '691px';\r\n document.getElementById('imgban1')!.style.zIndex = '500';\r\n\r\n }, 500);\r\n setTimeout(function() {\r\n document.getElementById('imgban3')!.style.opacity = '1';\r\n }, 1000);\r\n this.bannerStatus = 3;\r\n }\r\n } else {\r\n if (this.bannerStatus === 3) {\r\n if (document.getElementById('imgban3') && document.getElementById('imgban1') && document.getElementById('imgban2')) {\r\n document.getElementById('imgban1')!.style.opacity = '0';\r\n setTimeout(function() {\r\n document.getElementById('imgban3')!.style.right = '0px';\r\n document.getElementById('imgban3')!.style.zIndex = '1000';\r\n document.getElementById('imgban1')!.style.right = '-691px';\r\n document.getElementById('imgban1')!.style.zIndex = '1500';\r\n document.getElementById('imgban2')!.style.right = '691px';\r\n document.getElementById('imgban2')!.style.zIndex = '500';\r\n\r\n }, 500);\r\n setTimeout(function() {\r\n document.getElementById('imgban1')!.style.opacity = '1';\r\n }, 1000);\r\n this.bannerStatus = 1;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n hideBanners(){\r\n\r\n if (this.bannerStatus === 1) {\r\n //document.getElementById('imgban2').style.opacity = '0';\r\n setTimeout(function() {\r\n document.getElementById('imgban1')!.style.right = '0px';\r\n document.getElementById('imgban1')!.style.zIndex = '1000';\r\n document.getElementById('imgban2')!.style.right = '-691px';\r\n document.getElementById('imgban2')!.style.zIndex = '1500';\r\n // document.getElementById('imgban3').style.right = '691px';\r\n // document.getElementById('imgban3').style.zIndex = '500';\r\n\r\n }, 500);\r\n setTimeout(function() {\r\n document.getElementById('imgban2')!.style.opacity = '1';\r\n }, 1000);\r\n this.bannerStatus = 2;\r\n } else {\r\n if (this.bannerStatus === 2) {\r\n //document.getElementById('imgban3').style.opacity = '0';\r\n setTimeout(function() {\r\n document.getElementById('imgban3')!.style.right = '-691px';\r\n document.getElementById('imgban3')!.style.zIndex = '1500';\r\n document.getElementById('imgban2')!.style.right = '0px';\r\n document.getElementById('imgban2')!.style.zIndex = '1000';\r\n\r\n\r\n // document.getElementById('imgban1').style.right = '691px';\r\n // document.getElementById('imgban1').style.zIndex = '500';\r\n\r\n }, 500);\r\n setTimeout(function() {\r\n document.getElementById('imgban3')!.style.opacity = '1';\r\n }, 1000);\r\n this.bannerStatus = 3;\r\n } else {\r\n if (this.bannerStatus === 3) {\r\n //document.getElementById('imgban1').style.opacity = '0';\r\n setTimeout(function() {\r\n document.getElementById('imgban3')!.style.right = '0px';\r\n document.getElementById('imgban3')!.style.zIndex = '1000';\r\n document.getElementById('imgban1')!.style.right = '-691px';\r\n document.getElementById('imgban1')!.style.zIndex = '1500';\r\n\r\n\r\n // document.getElementById('imgban2').style.right = '691px';\r\n // document.getElementById('imgban2').style.zIndex = '500';\r\n\r\n }, 500);\r\n setTimeout(function() {\r\n document.getElementById('imgban1')!.style.opacity = '1';\r\n }, 1000);\r\n this.bannerStatus = 1;\r\n }\r\n }\r\n }\r\n }\r\n\r\n ngOnDestroy(){\r\n this.clearInterval();\r\n }\r\n}\r\n","\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { InputswitchComponent } from './app-inputswitch/app-inputswitch.component';\r\nimport { InputSwitchModule } from 'primeng/inputswitch';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { DisclaimerPopUpComponent } from './disclaimer-popup/disclaimer-popup.component';\r\nimport { ConnectAdviceComponent } from './connect-advice/connect-advice.component';\r\n\r\n@NgModule({\r\n declarations: [InputswitchComponent,\r\n DisclaimerPopUpComponent,\r\n ConnectAdviceComponent],\r\n imports: [\r\n InputSwitchModule,\r\n CommonModule,\r\n FormsModule,\r\n ReactiveFormsModule\r\n ],\r\n exports: [\r\n InputswitchComponent,\r\n DisclaimerPopUpComponent,\r\n ConnectAdviceComponent\r\n ]\r\n})\r\nexport class SharedUiModule { }\r\n","import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'app-wizard-step',\r\n templateUrl: './wizard-step.component.html',\r\n styleUrls: ['./wizard-step.component.scss']\r\n})\r\nexport class WizardStepComponent implements OnInit {\r\n @Input() title: string;\r\n @Input('initialStep') currentStep: number = 0;\r\n @Input() steps: number;\r\n @Input() subtext: string;\r\n @Output() previousStepClicked = new EventEmitter();\r\n @Output() wizardClosed = new EventEmitter();\r\n @Output() nextStepClicked = new EventEmitter();\r\n @Input() showBackground = false;\r\n @Input() showNav: boolean;\r\n\r\n constructor() { }\r\n\r\n ngOnInit(): void {\r\n\r\n }\r\n\r\n goToPreviousStep() {\r\n this.currentStep--;\r\n this.previousStepClicked.emit(this.currentStep);\r\n }\r\n\r\n goToNextStep() {\r\n this.currentStep++;\r\n if(this.currentStep > this.steps){\r\n this.currentStep = this.steps;\r\n this.nextStepClicked.emit(\"done\");\r\n }\r\n this.nextStepClicked.emit(this.currentStep);\r\n }\r\n\r\n close(){\r\n this.wizardClosed.emit('wizard-step-closed')\r\n }\r\n}\r\n","\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
{{currentStep}} of {{steps}} {{subtext}}
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n Prev\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n Next\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n","export const assumptions = {\r\n RetirementAge: 65,\r\n SpouseAgeDifference: -4,\r\n Reversion: 0.75,\r\n Inflation: 0.055,\r\n LongBondYield: 0.0841,\r\n LongInflationYield: 0.0613,\r\n ProfitMargin: 0.1,\r\n RAAllowance: 3500,\r\n MinimumTaxableIncome: 350000,\r\n MinimumPercentageTaxableIncome: 0.275,\r\n UIF: {\r\n contribution: 0.01,\r\n max: 178464,\r\n isMonthly: false\r\n },\r\n MedicalAidCreditTaxMember: 310,\r\n MedicalAidTaxCreditFirstDependent: 310,\r\n MedicalAidTaxCreditAdditionalDependent: 209\r\n};\r\n","export const banks = [\r\n { id: 0,\r\n bankName: \"\",\r\n defaultBranchCode: \"\",\r\n isActive: false\r\n },\r\n {\r\n id: 1,\r\n bankName: \"Absa Bank\",\r\n defaultBranchCode: \"632005\",\r\n isActive: true,\r\n },\r\n {\r\n id: 2,\r\n bankName: \"African Bank\",\r\n defaultBranchCode: \"430000\",\r\n isActive: true,\r\n },\r\n {\r\n id: 3,\r\n bankName: \"Bank of Athens\",\r\n defaultBranchCode: \"410506\",\r\n isActive: true,\r\n },\r\n {\r\n id: 4,\r\n bankName: \"Bidvest Bank\",\r\n defaultBranchCode: \"462005\",\r\n isActive: true,\r\n },\r\n {\r\n id: 5,\r\n bankName: \"Capitec Bank\",\r\n defaultBranchCode: \"470010\",\r\n isActive: true,\r\n },\r\n {\r\n id: 6,\r\n bankName: \"Discovery Bank\",\r\n defaultBranchCode: \"679000\",\r\n isActive: true,\r\n },\r\n {\r\n id: 7,\r\n bankName: \"First National Bank\",\r\n defaultBranchCode: \"250655\",\r\n isActive: true,\r\n },\r\n {\r\n id: 8,\r\n bankName: \"Grindrod Bank\",\r\n defaultBranchCode: \"584000\",\r\n isActive: true,\r\n },\r\n {\r\n id: 9,\r\n bankName: \"Investec\",\r\n defaultBranchCode: \"580105\",\r\n isActive: true,\r\n },\r\n {\r\n id: 10,\r\n bankName: \"Nedbank\",\r\n defaultBranchCode: \"198765\",\r\n isActive: true,\r\n },\r\n {\r\n id: 11,\r\n bankName: \"SA Post Bank\",\r\n defaultBranchCode: \"460005\",\r\n isActive: true,\r\n },\r\n {\r\n id: 12,\r\n bankName: \"Sasfin Bank\",\r\n defaultBranchCode: \"683000\",\r\n isActive: true,\r\n },\r\n {\r\n id: 13,\r\n bankName: \"Standard Bank\",\r\n defaultBranchCode: \"051001\",\r\n isActive: true,\r\n },\r\n {\r\n id: 15,\r\n bankName: \"Tyme Bank\",\r\n defaultBranchCode: \"678910\",\r\n isActive: true,\r\n },\r\n {\r\n id: 14,\r\n bankName: \"UBank\",\r\n defaultBranchCode: \"431010\",\r\n isActive: true,\r\n },\r\n {\r\n id: 16,\r\n bankName: \"Albaraka Bank\",\r\n defaultBranchCode: \"800000\",\r\n isActive: true,\r\n },\r\n];\r\n","export const benefitRates = {\r\n providentGLA : 0.00980,\r\n spouseCoverRate: 0.00036,\r\n spouseCoverMax: 55,\r\n phiRate: 0.01150,\r\n statedBenefitRate: 0.00222,\r\n dreadDiseaseProvidentFundRate: 0.00200,\r\n funeralCost: 15\r\n};\r\n","import appsettings from \"../../assets/appsettings.json\"\r\n\r\nexport class Constants {\r\n public static apiRoot = `${appsettings.serverUrl}/api`;\r\n public static stsAuthority = appsettings.accessTokenApiUrl;\r\n public static clientId = appsettings.clientId;\r\n public static clientRoot = appsettings.clientRoot;\r\n public static clientScope = appsettings.clientScope;\r\n public static redirect_uri = `${appsettings.clientRoot}${appsettings.redirect_uri}`;\r\n public static post_logout_redirect_uri = `${appsettings.clientRoot}${appsettings.post_logout_redirect_uri}`;\r\n public static silent_redirect_uri = `${appsettings.clientRoot}${appsettings.silent_redirect_uri}`;\r\n public static popia_clause_form =\r\n \"https://www.alexanderforbes.co.za/popia-clause-forms\";\r\n public static infoIconDamPath =\r\n \"/assets/icons/info-icon.png\";\r\n}","export const countries = [\r\n {\r\n pkCountryOfIssueID: 0,\r\n Code: \"\",\r\n Name: \"\",\r\n },\r\n {\r\n pkCountryOfIssueID: 206,\r\n Code: \"ZA\",\r\n Name: \"South Africa\",\r\n },\r\n {\r\n pkCountryOfIssueID: 1,\r\n Code: \"AF\",\r\n Name: \"Afghanistan\",\r\n },\r\n {\r\n pkCountryOfIssueID: 2,\r\n Code: \"AX\",\r\n Name: \"Åland Islands\",\r\n },\r\n {\r\n pkCountryOfIssueID: 3,\r\n Code: \"AL\",\r\n Name: \"Albania\",\r\n },\r\n {\r\n pkCountryOfIssueID: 4,\r\n Code: \"DZ\",\r\n Name: \"Algeria\",\r\n },\r\n {\r\n pkCountryOfIssueID: 5,\r\n Code: \"AS\",\r\n Name: \"American Samoa\",\r\n },\r\n {\r\n pkCountryOfIssueID: 6,\r\n Code: \"AD\",\r\n Name: \"Andorra\",\r\n },\r\n {\r\n pkCountryOfIssueID: 7,\r\n Code: \"AO\",\r\n Name: \"Angola\",\r\n },\r\n {\r\n pkCountryOfIssueID: 8,\r\n Code: \"AI\",\r\n Name: \"Anguilla\",\r\n },\r\n {\r\n pkCountryOfIssueID: 9,\r\n Code: \"AQ\",\r\n Name: \"Antarctica\",\r\n },\r\n {\r\n pkCountryOfIssueID: 10,\r\n Code: \"AG\",\r\n Name: \"Antigua and Barbuda\",\r\n },\r\n {\r\n pkCountryOfIssueID: 11,\r\n Code: \"AR\",\r\n Name: \"Argentina\",\r\n },\r\n {\r\n pkCountryOfIssueID: 12,\r\n Code: \"AM\",\r\n Name: \"Armenia\",\r\n },\r\n {\r\n pkCountryOfIssueID: 13,\r\n Code: \"AW\",\r\n Name: \"Aruba\",\r\n },\r\n {\r\n pkCountryOfIssueID: 14,\r\n Code: \"AU\",\r\n Name: \"Australia\",\r\n },\r\n {\r\n pkCountryOfIssueID: 15,\r\n Code: \"AT\",\r\n Name: \"Austria\",\r\n },\r\n {\r\n pkCountryOfIssueID: 16,\r\n Code: \"AZ\",\r\n Name: \"Azerbaijan\",\r\n },\r\n {\r\n pkCountryOfIssueID: 17,\r\n Code: \"BS\",\r\n Name: \"Bahamas (the)\",\r\n },\r\n {\r\n pkCountryOfIssueID: 18,\r\n Code: \"BH\",\r\n Name: \"Bahrain\",\r\n },\r\n {\r\n pkCountryOfIssueID: 19,\r\n Code: \"BD\",\r\n Name: \"Bangladesh\",\r\n },\r\n {\r\n pkCountryOfIssueID: 20,\r\n Code: \"BB\",\r\n Name: \"Barbados\",\r\n },\r\n {\r\n pkCountryOfIssueID: 21,\r\n Code: \"BY\",\r\n Name: \"Belarus\",\r\n },\r\n {\r\n pkCountryOfIssueID: 22,\r\n Code: \"BE\",\r\n Name: \"Belgium\",\r\n },\r\n {\r\n pkCountryOfIssueID: 23,\r\n Code: \"BZ\",\r\n Name: \"Belize\",\r\n },\r\n {\r\n pkCountryOfIssueID: 24,\r\n Code: \"BJ\",\r\n Name: \"Benin\",\r\n },\r\n {\r\n pkCountryOfIssueID: 25,\r\n Code: \"BM\",\r\n Name: \"Bermuda\",\r\n },\r\n {\r\n pkCountryOfIssueID: 26,\r\n Code: \"BT\",\r\n Name: \"Bhutan\",\r\n },\r\n {\r\n pkCountryOfIssueID: 27,\r\n Code: \"BO\",\r\n Name: \"Bolivia, Plurinational State of\",\r\n },\r\n {\r\n pkCountryOfIssueID: 28,\r\n Code: \"BQ\",\r\n Name: \"Bonaire, Sint Eustatius and Saba\",\r\n },\r\n {\r\n pkCountryOfIssueID: 29,\r\n Code: \"BA\",\r\n Name: \"Bosnia and Herzegovina\",\r\n },\r\n {\r\n pkCountryOfIssueID: 30,\r\n Code: \"BW\",\r\n Name: \"Botswana\",\r\n },\r\n {\r\n pkCountryOfIssueID: 31,\r\n Code: \"BV\",\r\n Name: \"Bouvet Island\",\r\n },\r\n {\r\n pkCountryOfIssueID: 32,\r\n Code: \"BR\",\r\n Name: \"Brazil\",\r\n },\r\n {\r\n pkCountryOfIssueID: 33,\r\n Code: \"IO\",\r\n Name: \"British Indian Ocean Territory (the)\",\r\n },\r\n {\r\n pkCountryOfIssueID: 34,\r\n Code: \"BN\",\r\n Name: \"Brunei Darussalam\",\r\n },\r\n {\r\n pkCountryOfIssueID: 35,\r\n Code: \"BG\",\r\n Name: \"Bulgaria\",\r\n },\r\n {\r\n pkCountryOfIssueID: 36,\r\n Code: \"BF\",\r\n Name: \"Burkina Faso\",\r\n },\r\n {\r\n pkCountryOfIssueID: 37,\r\n Code: \"BI\",\r\n Name: \"Burundi\",\r\n },\r\n {\r\n pkCountryOfIssueID: 38,\r\n Code: \"CV\",\r\n Name: \"Cabo Verde\",\r\n },\r\n {\r\n pkCountryOfIssueID: 39,\r\n Code: \"KH\",\r\n Name: \"Cambodia\",\r\n },\r\n {\r\n pkCountryOfIssueID: 40,\r\n Code: \"CM\",\r\n Name: \"Cameroon\",\r\n },\r\n {\r\n pkCountryOfIssueID: 41,\r\n Code: \"CA\",\r\n Name: \"Canada\",\r\n },\r\n {\r\n pkCountryOfIssueID: 42,\r\n Code: \"KY\",\r\n Name: \"Cayman Islands (the)\",\r\n },\r\n {\r\n pkCountryOfIssueID: 43,\r\n Code: \"CF\",\r\n Name: \"Central African Republic (the)\",\r\n },\r\n {\r\n pkCountryOfIssueID: 44,\r\n Code: \"TD\",\r\n Name: \"Chad\",\r\n },\r\n {\r\n pkCountryOfIssueID: 45,\r\n Code: \"CL\",\r\n Name: \"Chile\",\r\n },\r\n {\r\n pkCountryOfIssueID: 46,\r\n Code: \"CN\",\r\n Name: \"China\",\r\n },\r\n {\r\n pkCountryOfIssueID: 47,\r\n Code: \"CX\",\r\n Name: \"Christmas Island\",\r\n },\r\n {\r\n pkCountryOfIssueID: 48,\r\n Code: \"CC\",\r\n Name: \"Cocos (Keeling) Islands (the)\",\r\n },\r\n {\r\n pkCountryOfIssueID: 49,\r\n Code: \"CO\",\r\n Name: \"Colombia\",\r\n },\r\n {\r\n pkCountryOfIssueID: 50,\r\n Code: \"KM\",\r\n Name: \"Comoros\",\r\n },\r\n {\r\n pkCountryOfIssueID: 51,\r\n Code: \"CG\",\r\n Name: \"Congo\",\r\n },\r\n {\r\n pkCountryOfIssueID: 52,\r\n Code: \"CD\",\r\n Name: \"Congo (the Democratic Republic of the)\",\r\n },\r\n {\r\n pkCountryOfIssueID: 53,\r\n Code: \"CK\",\r\n Name: \"Cook Islands (the)\",\r\n },\r\n {\r\n pkCountryOfIssueID: 54,\r\n Code: \"CR\",\r\n Name: \"Costa Rica\",\r\n },\r\n {\r\n pkCountryOfIssueID: 55,\r\n Code: \"CI\",\r\n Name: \"Côte d'Ivoire\",\r\n },\r\n {\r\n pkCountryOfIssueID: 56,\r\n Code: \"HR\",\r\n Name: \"Croatia\",\r\n },\r\n {\r\n pkCountryOfIssueID: 57,\r\n Code: \"CU\",\r\n Name: \"Cuba\",\r\n },\r\n {\r\n pkCountryOfIssueID: 58,\r\n Code: \"CW\",\r\n Name: \"Curaçao\",\r\n },\r\n {\r\n pkCountryOfIssueID: 59,\r\n Code: \"CY\",\r\n Name: \"Cyprus\",\r\n },\r\n {\r\n pkCountryOfIssueID: 60,\r\n Code: \"CZ\",\r\n Name: \"Czech Republic (the)\",\r\n },\r\n {\r\n pkCountryOfIssueID: 61,\r\n Code: \"DK\",\r\n Name: \"Denmark\",\r\n },\r\n {\r\n pkCountryOfIssueID: 62,\r\n Code: \"DJ\",\r\n Name: \"Djibouti\",\r\n },\r\n {\r\n pkCountryOfIssueID: 63,\r\n Code: \"DM\",\r\n Name: \"Dominica\",\r\n },\r\n {\r\n pkCountryOfIssueID: 64,\r\n Code: \"DO\",\r\n Name: \"Dominican Republic (the)\",\r\n },\r\n {\r\n pkCountryOfIssueID: 65,\r\n Code: \"EC\",\r\n Name: \"Ecuador\",\r\n },\r\n {\r\n pkCountryOfIssueID: 66,\r\n Code: \"EG\",\r\n Name: \"Egypt\",\r\n },\r\n {\r\n pkCountryOfIssueID: 67,\r\n Code: \"SV\",\r\n Name: \"El Salvador\",\r\n },\r\n {\r\n pkCountryOfIssueID: 68,\r\n Code: \"GQ\",\r\n Name: \"Equatorial Guinea\",\r\n },\r\n {\r\n pkCountryOfIssueID: 69,\r\n Code: \"ER\",\r\n Name: \"Eritrea\",\r\n },\r\n {\r\n pkCountryOfIssueID: 70,\r\n Code: \"EE\",\r\n Name: \"Estonia\",\r\n },\r\n {\r\n pkCountryOfIssueID: 71,\r\n Code: \"ET\",\r\n Name: \"Ethiopia\",\r\n },\r\n {\r\n pkCountryOfIssueID: 72,\r\n Code: \"FK\",\r\n Name: \"Falkland Islands (the) [Malvinas]\",\r\n },\r\n {\r\n pkCountryOfIssueID: 73,\r\n Code: \"FO\",\r\n Name: \"Faroe Islands (the)\",\r\n },\r\n {\r\n pkCountryOfIssueID: 74,\r\n Code: \"FJ\",\r\n Name: \"Fiji\",\r\n },\r\n {\r\n pkCountryOfIssueID: 75,\r\n Code: \"FI\",\r\n Name: \"Finland\",\r\n },\r\n {\r\n pkCountryOfIssueID: 76,\r\n Code: \"FR\",\r\n Name: \"France\",\r\n },\r\n {\r\n pkCountryOfIssueID: 77,\r\n Code: \"GF\",\r\n Name: \"French Guiana\",\r\n },\r\n {\r\n pkCountryOfIssueID: 78,\r\n Code: \"PF\",\r\n Name: \"French Polynesia\",\r\n },\r\n {\r\n pkCountryOfIssueID: 79,\r\n Code: \"TF\",\r\n Name: \"French Southern Territories (the)\",\r\n },\r\n {\r\n pkCountryOfIssueID: 80,\r\n Code: \"GA\",\r\n Name: \"Gabon\",\r\n },\r\n {\r\n pkCountryOfIssueID: 81,\r\n Code: \"GM\",\r\n Name: \"Gambia (The)\",\r\n },\r\n {\r\n pkCountryOfIssueID: 82,\r\n Code: \"GE\",\r\n Name: \"Georgia\",\r\n },\r\n {\r\n pkCountryOfIssueID: 83,\r\n Code: \"DE\",\r\n Name: \"Germany\",\r\n },\r\n {\r\n pkCountryOfIssueID: 84,\r\n Code: \"GH\",\r\n Name: \"Ghana\",\r\n },\r\n {\r\n pkCountryOfIssueID: 85,\r\n Code: \"GI\",\r\n Name: \"Gibraltar\",\r\n },\r\n {\r\n pkCountryOfIssueID: 86,\r\n Code: \"GR\",\r\n Name: \"Greece\",\r\n },\r\n {\r\n pkCountryOfIssueID: 87,\r\n Code: \"GL\",\r\n Name: \"Greenland\",\r\n },\r\n {\r\n pkCountryOfIssueID: 88,\r\n Code: \"GD\",\r\n Name: \"Grenada\",\r\n },\r\n {\r\n pkCountryOfIssueID: 89,\r\n Code: \"GP\",\r\n Name: \"Guadeloupe\",\r\n },\r\n {\r\n pkCountryOfIssueID: 90,\r\n Code: \"GU\",\r\n Name: \"Guam\",\r\n },\r\n {\r\n pkCountryOfIssueID: 91,\r\n Code: \"GT\",\r\n Name: \"Guatemala\",\r\n },\r\n {\r\n pkCountryOfIssueID: 92,\r\n Code: \"GG\",\r\n Name: \"Guernsey\",\r\n },\r\n {\r\n pkCountryOfIssueID: 93,\r\n Code: \"GN\",\r\n Name: \"Guinea\",\r\n },\r\n {\r\n pkCountryOfIssueID: 94,\r\n Code: \"GW\",\r\n Name: \"Guinea-Bissau\",\r\n },\r\n {\r\n pkCountryOfIssueID: 95,\r\n Code: \"GY\",\r\n Name: \"Guyana\",\r\n },\r\n {\r\n pkCountryOfIssueID: 96,\r\n Code: \"HT\",\r\n Name: \"Haiti\",\r\n },\r\n {\r\n pkCountryOfIssueID: 97,\r\n Code: \"HM\",\r\n Name: \"Heard Island and McDonald Islands\",\r\n },\r\n {\r\n pkCountryOfIssueID: 98,\r\n Code: \"VA\",\r\n Name: \"Holy See (the) [Vatican City State]\",\r\n },\r\n {\r\n pkCountryOfIssueID: 99,\r\n Code: \"HN\",\r\n Name: \"Honduras\",\r\n },\r\n {\r\n pkCountryOfIssueID: 100,\r\n Code: \"HK\",\r\n Name: \"Hong Kong\",\r\n },\r\n {\r\n pkCountryOfIssueID: 101,\r\n Code: \"HU\",\r\n Name: \"Hungary\",\r\n },\r\n {\r\n pkCountryOfIssueID: 102,\r\n Code: \"IS\",\r\n Name: \"Iceland\",\r\n },\r\n {\r\n pkCountryOfIssueID: 103,\r\n Code: \"IN\",\r\n Name: \"India\",\r\n },\r\n {\r\n pkCountryOfIssueID: 104,\r\n Code: \"ID\",\r\n Name: \"Indonesia\",\r\n },\r\n {\r\n pkCountryOfIssueID: 105,\r\n Code: \"IR\",\r\n Name: \"Iran (the Islamic Republic of)\",\r\n },\r\n {\r\n pkCountryOfIssueID: 106,\r\n Code: \"IQ\",\r\n Name: \"Iraq\",\r\n },\r\n {\r\n pkCountryOfIssueID: 107,\r\n Code: \"IE\",\r\n Name: \"Ireland\",\r\n },\r\n {\r\n pkCountryOfIssueID: 108,\r\n Code: \"IM\",\r\n Name: \"Isle of Man\",\r\n },\r\n {\r\n pkCountryOfIssueID: 109,\r\n Code: \"IL\",\r\n Name: \"Israel\",\r\n },\r\n {\r\n pkCountryOfIssueID: 110,\r\n Code: \"IT\",\r\n Name: \"Italy\",\r\n },\r\n {\r\n pkCountryOfIssueID: 111,\r\n Code: \"JM\",\r\n Name: \"Jamaica\",\r\n },\r\n {\r\n pkCountryOfIssueID: 112,\r\n Code: \"JP\",\r\n Name: \"Japan\",\r\n },\r\n {\r\n pkCountryOfIssueID: 113,\r\n Code: \"JE\",\r\n Name: \"Jersey\",\r\n },\r\n {\r\n pkCountryOfIssueID: 114,\r\n Code: \"JO\",\r\n Name: \"Jordan\",\r\n },\r\n {\r\n pkCountryOfIssueID: 115,\r\n Code: \"KZ\",\r\n Name: \"Kazakhstan\",\r\n },\r\n {\r\n pkCountryOfIssueID: 116,\r\n Code: \"KE\",\r\n Name: \"Kenya\",\r\n },\r\n {\r\n pkCountryOfIssueID: 117,\r\n Code: \"KI\",\r\n Name: \"Kiribati\",\r\n },\r\n {\r\n pkCountryOfIssueID: 118,\r\n Code: \"KP\",\r\n Name: \"Korea (the Democratic People's Republic of)\",\r\n },\r\n {\r\n pkCountryOfIssueID: 119,\r\n Code: \"KR\",\r\n Name: \"Korea (the Republic of)\",\r\n },\r\n {\r\n pkCountryOfIssueID: 120,\r\n Code: \"KW\",\r\n Name: \"Kuwait\",\r\n },\r\n {\r\n pkCountryOfIssueID: 121,\r\n Code: \"KG\",\r\n Name: \"Kyrgyzstan\",\r\n },\r\n {\r\n pkCountryOfIssueID: 122,\r\n Code: \"LA\",\r\n Name: \"Lao People's Democratic Republic (the)\",\r\n },\r\n {\r\n pkCountryOfIssueID: 123,\r\n Code: \"LV\",\r\n Name: \"Latvia\",\r\n },\r\n {\r\n pkCountryOfIssueID: 124,\r\n Code: \"LB\",\r\n Name: \"Lebanon\",\r\n },\r\n {\r\n pkCountryOfIssueID: 125,\r\n Code: \"LS\",\r\n Name: \"Lesotho\",\r\n },\r\n {\r\n pkCountryOfIssueID: 126,\r\n Code: \"LR\",\r\n Name: \"Liberia\",\r\n },\r\n {\r\n pkCountryOfIssueID: 127,\r\n Code: \"LY\",\r\n Name: \"Libya\",\r\n },\r\n {\r\n pkCountryOfIssueID: 128,\r\n Code: \"LI\",\r\n Name: \"Liechtenstein\",\r\n },\r\n {\r\n pkCountryOfIssueID: 129,\r\n Code: \"LT\",\r\n Name: \"Lithuania\",\r\n },\r\n {\r\n pkCountryOfIssueID: 130,\r\n Code: \"LU\",\r\n Name: \"Luxembourg\",\r\n },\r\n {\r\n pkCountryOfIssueID: 131,\r\n Code: \"MO\",\r\n Name: \"Macao\",\r\n },\r\n {\r\n pkCountryOfIssueID: 132,\r\n Code: \"MK\",\r\n Name: \"Macedonia (the former Yugoslav Republic of)\",\r\n },\r\n {\r\n pkCountryOfIssueID: 133,\r\n Code: \"MG\",\r\n Name: \"Madagascar\",\r\n },\r\n {\r\n pkCountryOfIssueID: 134,\r\n Code: \"MW\",\r\n Name: \"Malawi\",\r\n },\r\n {\r\n pkCountryOfIssueID: 135,\r\n Code: \"MY\",\r\n Name: \"Malaysia\",\r\n },\r\n {\r\n pkCountryOfIssueID: 136,\r\n Code: \"MV\",\r\n Name: \"Maldives\",\r\n },\r\n {\r\n pkCountryOfIssueID: 137,\r\n Code: \"ML\",\r\n Name: \"Mali\",\r\n },\r\n {\r\n pkCountryOfIssueID: 138,\r\n Code: \"MT\",\r\n Name: \"Malta\",\r\n },\r\n {\r\n pkCountryOfIssueID: 139,\r\n Code: \"MH\",\r\n Name: \"Marshall Islands (the)\",\r\n },\r\n {\r\n pkCountryOfIssueID: 140,\r\n Code: \"MQ\",\r\n Name: \"Martinique\",\r\n },\r\n {\r\n pkCountryOfIssueID: 141,\r\n Code: \"MR\",\r\n Name: \"Mauritania\",\r\n },\r\n {\r\n pkCountryOfIssueID: 142,\r\n Code: \"MU\",\r\n Name: \"Mauritius\",\r\n },\r\n {\r\n pkCountryOfIssueID: 143,\r\n Code: \"YT\",\r\n Name: \"Mayotte\",\r\n },\r\n {\r\n pkCountryOfIssueID: 144,\r\n Code: \"MX\",\r\n Name: \"Mexico\",\r\n },\r\n {\r\n pkCountryOfIssueID: 145,\r\n Code: \"FM\",\r\n Name: \"Micronesia (the Federated States of)\",\r\n },\r\n {\r\n pkCountryOfIssueID: 146,\r\n Code: \"MD\",\r\n Name: \"Moldova (the Republic of)\",\r\n },\r\n {\r\n pkCountryOfIssueID: 147,\r\n Code: \"MC\",\r\n Name: \"Monaco\",\r\n },\r\n {\r\n pkCountryOfIssueID: 148,\r\n Code: \"MN\",\r\n Name: \"Mongolia\",\r\n },\r\n {\r\n pkCountryOfIssueID: 149,\r\n Code: \"ME\",\r\n Name: \"Montenegro\",\r\n },\r\n {\r\n pkCountryOfIssueID: 150,\r\n Code: \"MS\",\r\n Name: \"Montserrat\",\r\n },\r\n {\r\n pkCountryOfIssueID: 151,\r\n Code: \"MA\",\r\n Name: \"Morocco\",\r\n },\r\n {\r\n pkCountryOfIssueID: 152,\r\n Code: \"MZ\",\r\n Name: \"Mozambique\",\r\n },\r\n {\r\n pkCountryOfIssueID: 153,\r\n Code: \"MM\",\r\n Name: \"Myanmar\",\r\n },\r\n {\r\n pkCountryOfIssueID: 154,\r\n Code: \"NA\",\r\n Name: \"Namibia\",\r\n },\r\n {\r\n pkCountryOfIssueID: 155,\r\n Code: \"NR\",\r\n Name: \"Nauru\",\r\n },\r\n {\r\n pkCountryOfIssueID: 156,\r\n Code: \"NP\",\r\n Name: \"Nepal\",\r\n },\r\n {\r\n pkCountryOfIssueID: 157,\r\n Code: \"NL\",\r\n Name: \"Netherlands (the)\",\r\n },\r\n {\r\n pkCountryOfIssueID: 158,\r\n Code: \"NC\",\r\n Name: \"New Caledonia\",\r\n },\r\n {\r\n pkCountryOfIssueID: 159,\r\n Code: \"NZ\",\r\n Name: \"New Zealand\",\r\n },\r\n {\r\n pkCountryOfIssueID: 160,\r\n Code: \"NI\",\r\n Name: \"Nicaragua\",\r\n },\r\n {\r\n pkCountryOfIssueID: 161,\r\n Code: \"NE\",\r\n Name: \"Niger (the)\",\r\n },\r\n {\r\n pkCountryOfIssueID: 162,\r\n Code: \"NG\",\r\n Name: \"Nigeria\",\r\n },\r\n {\r\n pkCountryOfIssueID: 163,\r\n Code: \"NU\",\r\n Name: \"Niue\",\r\n },\r\n {\r\n pkCountryOfIssueID: 164,\r\n Code: \"NF\",\r\n Name: \"Norfolk Island\",\r\n },\r\n {\r\n pkCountryOfIssueID: 165,\r\n Code: \"MP\",\r\n Name: \"Northern Mariana Islands (the)\",\r\n },\r\n {\r\n pkCountryOfIssueID: 166,\r\n Code: \"NO\",\r\n Name: \"Norway\",\r\n },\r\n {\r\n pkCountryOfIssueID: 167,\r\n Code: \"OM\",\r\n Name: \"Oman\",\r\n },\r\n {\r\n pkCountryOfIssueID: 168,\r\n Code: \"PK\",\r\n Name: \"Pakistan\",\r\n },\r\n {\r\n pkCountryOfIssueID: 169,\r\n Code: \"PW\",\r\n Name: \"Palau\",\r\n },\r\n {\r\n pkCountryOfIssueID: 170,\r\n Code: \"PS\",\r\n Name: \"Palestine, State of\",\r\n },\r\n {\r\n pkCountryOfIssueID: 171,\r\n Code: \"PA\",\r\n Name: \"Panama\",\r\n },\r\n {\r\n pkCountryOfIssueID: 172,\r\n Code: \"PG\",\r\n Name: \"Papua New Guinea\",\r\n },\r\n {\r\n pkCountryOfIssueID: 173,\r\n Code: \"PY\",\r\n Name: \"Paraguay\",\r\n },\r\n {\r\n pkCountryOfIssueID: 174,\r\n Code: \"PE\",\r\n Name: \"Peru\",\r\n },\r\n {\r\n pkCountryOfIssueID: 175,\r\n Code: \"PH\",\r\n Name: \"Philippines (the)\",\r\n },\r\n {\r\n pkCountryOfIssueID: 176,\r\n Code: \"PN\",\r\n Name: \"Pitcairn\",\r\n },\r\n {\r\n pkCountryOfIssueID: 177,\r\n Code: \"PL\",\r\n Name: \"Poland\",\r\n },\r\n {\r\n pkCountryOfIssueID: 178,\r\n Code: \"PT\",\r\n Name: \"Portugal\",\r\n },\r\n {\r\n pkCountryOfIssueID: 179,\r\n Code: \"PR\",\r\n Name: \"Puerto Rico\",\r\n },\r\n {\r\n pkCountryOfIssueID: 180,\r\n Code: \"QA\",\r\n Name: \"Qatar\",\r\n },\r\n {\r\n pkCountryOfIssueID: 181,\r\n Code: \"RE\",\r\n Name: \"Réunion\",\r\n },\r\n {\r\n pkCountryOfIssueID: 182,\r\n Code: \"RO\",\r\n Name: \"Romania\",\r\n },\r\n {\r\n pkCountryOfIssueID: 183,\r\n Code: \"RU\",\r\n Name: \"Russian Federation (the)\",\r\n },\r\n {\r\n pkCountryOfIssueID: 184,\r\n Code: \"RW\",\r\n Name: \"Rwanda\",\r\n },\r\n {\r\n pkCountryOfIssueID: 185,\r\n Code: \"BL\",\r\n Name: \"Saint Barthélemy\",\r\n },\r\n {\r\n pkCountryOfIssueID: 186,\r\n Code: \"SH\",\r\n Name: \"Saint Helena, Ascension and Tristan da Cunha\",\r\n },\r\n {\r\n pkCountryOfIssueID: 187,\r\n Code: \"KN\",\r\n Name: \"Saint Kitts and Nevis\",\r\n },\r\n {\r\n pkCountryOfIssueID: 188,\r\n Code: \"LC\",\r\n Name: \"Saint Lucia\",\r\n },\r\n {\r\n pkCountryOfIssueID: 189,\r\n Code: \"MF\",\r\n Name: \"Saint Martin (French part)\",\r\n },\r\n {\r\n pkCountryOfIssueID: 190,\r\n Code: \"PM\",\r\n Name: \"Saint Pierre and Miquelon\",\r\n },\r\n {\r\n pkCountryOfIssueID: 191,\r\n Code: \"VC\",\r\n Name: \"Saint Vincent and the Grenadines\",\r\n },\r\n {\r\n pkCountryOfIssueID: 192,\r\n Code: \"WS\",\r\n Name: \"Samoa\",\r\n },\r\n {\r\n pkCountryOfIssueID: 193,\r\n Code: \"SM\",\r\n Name: \"San Marino\",\r\n },\r\n {\r\n pkCountryOfIssueID: 194,\r\n Code: \"ST\",\r\n Name: \"Sao Tome and Principe\",\r\n },\r\n {\r\n pkCountryOfIssueID: 195,\r\n Code: \"SA\",\r\n Name: \"Saudi Arabia\",\r\n },\r\n {\r\n pkCountryOfIssueID: 196,\r\n Code: \"SN\",\r\n Name: \"Senegal\",\r\n },\r\n {\r\n pkCountryOfIssueID: 197,\r\n Code: \"RS\",\r\n Name: \"Serbia\",\r\n },\r\n {\r\n pkCountryOfIssueID: 198,\r\n Code: \"SC\",\r\n Name: \"Seychelles\",\r\n },\r\n {\r\n pkCountryOfIssueID: 199,\r\n Code: \"SL\",\r\n Name: \"Sierra Leone\",\r\n },\r\n {\r\n pkCountryOfIssueID: 200,\r\n Code: \"SG\",\r\n Name: \"Singapore\",\r\n },\r\n {\r\n pkCountryOfIssueID: 201,\r\n Code: \"SX\",\r\n Name: \"Sint Maarten (Dutch part)\",\r\n },\r\n {\r\n pkCountryOfIssueID: 202,\r\n Code: \"SK\",\r\n Name: \"Slovakia\",\r\n },\r\n {\r\n pkCountryOfIssueID: 203,\r\n Code: \"SI\",\r\n Name: \"Slovenia\",\r\n },\r\n {\r\n pkCountryOfIssueID: 204,\r\n Code: \"SB\",\r\n Name: \"Solomon Islands (the)\",\r\n },\r\n {\r\n pkCountryOfIssueID: 205,\r\n Code: \"SO\",\r\n Name: \"Somalia\",\r\n },\r\n {\r\n pkCountryOfIssueID: 207,\r\n Code: \"GS\",\r\n Name: \"South Georgia and the South Sandwich Islands\",\r\n },\r\n {\r\n pkCountryOfIssueID: 208,\r\n Code: \"SS\",\r\n Name: \"South Sudan \",\r\n },\r\n {\r\n pkCountryOfIssueID: 209,\r\n Code: \"ES\",\r\n Name: \"Spain\",\r\n },\r\n {\r\n pkCountryOfIssueID: 210,\r\n Code: \"LK\",\r\n Name: \"Sri Lanka\",\r\n },\r\n {\r\n pkCountryOfIssueID: 211,\r\n Code: \"SD\",\r\n Name: \"Sudan (the)\",\r\n },\r\n {\r\n pkCountryOfIssueID: 212,\r\n Code: \"SR\",\r\n Name: \"Suriname\",\r\n },\r\n {\r\n pkCountryOfIssueID: 213,\r\n Code: \"SJ\",\r\n Name: \"Svalbard and Jan Mayen\",\r\n },\r\n {\r\n pkCountryOfIssueID: 214,\r\n Code: \"SZ\",\r\n Name: \"Swaziland\",\r\n },\r\n {\r\n pkCountryOfIssueID: 215,\r\n Code: \"SE\",\r\n Name: \"Sweden\",\r\n },\r\n {\r\n pkCountryOfIssueID: 216,\r\n Code: \"CH\",\r\n Name: \"Switzerland\",\r\n },\r\n {\r\n pkCountryOfIssueID: 217,\r\n Code: \"SY\",\r\n Name: \"Syrian Arab Republic (the)\",\r\n },\r\n {\r\n pkCountryOfIssueID: 218,\r\n Code: \"TW\",\r\n Name: \"Taiwan (Province of China)\",\r\n },\r\n {\r\n pkCountryOfIssueID: 219,\r\n Code: \"TJ\",\r\n Name: \"Tajikistan\",\r\n },\r\n {\r\n pkCountryOfIssueID: 220,\r\n Code: \"TZ\",\r\n Name: \"Tanzania, United Republic of\",\r\n },\r\n {\r\n pkCountryOfIssueID: 221,\r\n Code: \"TH\",\r\n Name: \"Thailand\",\r\n },\r\n {\r\n pkCountryOfIssueID: 222,\r\n Code: \"TL\",\r\n Name: \"Timor-Leste\",\r\n },\r\n {\r\n pkCountryOfIssueID: 223,\r\n Code: \"TG\",\r\n Name: \"Togo\",\r\n },\r\n {\r\n pkCountryOfIssueID: 224,\r\n Code: \"TK\",\r\n Name: \"Tokelau\",\r\n },\r\n {\r\n pkCountryOfIssueID: 225,\r\n Code: \"TO\",\r\n Name: \"Tonga\",\r\n },\r\n {\r\n pkCountryOfIssueID: 226,\r\n Code: \"TT\",\r\n Name: \"Trinidad and Tobago\",\r\n },\r\n {\r\n pkCountryOfIssueID: 227,\r\n Code: \"TN\",\r\n Name: \"Tunisia\",\r\n },\r\n {\r\n pkCountryOfIssueID: 228,\r\n Code: \"TR\",\r\n Name: \"Turkey\",\r\n },\r\n {\r\n pkCountryOfIssueID: 229,\r\n Code: \"TM\",\r\n Name: \"Turkmenistan\",\r\n },\r\n {\r\n pkCountryOfIssueID: 230,\r\n Code: \"TC\",\r\n Name: \"Turks and Caicos Islands (the)\",\r\n },\r\n {\r\n pkCountryOfIssueID: 231,\r\n Code: \"TV\",\r\n Name: \"Tuvalu\",\r\n },\r\n {\r\n pkCountryOfIssueID: 232,\r\n Code: \"UG\",\r\n Name: \"Uganda\",\r\n },\r\n {\r\n pkCountryOfIssueID: 233,\r\n Code: \"UA\",\r\n Name: \"Ukraine\",\r\n },\r\n {\r\n pkCountryOfIssueID: 234,\r\n Code: \"AE\",\r\n Name: \"United Arab Emirates (the)\",\r\n },\r\n {\r\n pkCountryOfIssueID: 235,\r\n Code: \"GB\",\r\n Name: \"United Kingdom (the)\",\r\n },\r\n {\r\n pkCountryOfIssueID: 236,\r\n Code: \"US\",\r\n Name: \"United States (the)\",\r\n },\r\n {\r\n pkCountryOfIssueID: 237,\r\n Code: \"UM\",\r\n Name: \"United States Minor Outlying Islands (the)\",\r\n },\r\n {\r\n pkCountryOfIssueID: 238,\r\n Code: \"UY\",\r\n Name: \"Uruguay\",\r\n },\r\n {\r\n pkCountryOfIssueID: 239,\r\n Code: \"UZ\",\r\n Name: \"Uzbekistan\",\r\n },\r\n {\r\n pkCountryOfIssueID: 240,\r\n Code: \"VU\",\r\n Name: \"Vanuatu\",\r\n },\r\n {\r\n pkCountryOfIssueID: 241,\r\n Code: \"VE\",\r\n Name: \"Venezuela, Bolivarian Republic of \",\r\n },\r\n {\r\n pkCountryOfIssueID: 242,\r\n Code: \"VN\",\r\n Name: \"Viet Nam\",\r\n },\r\n {\r\n pkCountryOfIssueID: 243,\r\n Code: \"VG\",\r\n Name: \"Virgin Islands (British)\",\r\n },\r\n {\r\n pkCountryOfIssueID: 244,\r\n Code: \"VI\",\r\n Name: \"Virgin Islands (U.S.)\",\r\n },\r\n {\r\n pkCountryOfIssueID: 245,\r\n Code: \"WF\",\r\n Name: \"Wallis and Futuna\",\r\n },\r\n {\r\n pkCountryOfIssueID: 246,\r\n Code: \"EH\",\r\n Name: \"Western Sahara\",\r\n },\r\n {\r\n pkCountryOfIssueID: 247,\r\n Code: \"YE\",\r\n Name: \"Yemen\",\r\n },\r\n {\r\n pkCountryOfIssueID: 248,\r\n Code: \"ZM\",\r\n Name: \"Zambia\",\r\n },\r\n {\r\n pkCountryOfIssueID: 249,\r\n Code: \"ZW\",\r\n Name: \"Zimbabwe\",\r\n }\r\n];\r\n","export const gapCovers = \r\n[\r\n {\r\n \"gapCoverProviders\": [\r\n {\r\n \"name\": \"Default\",\r\n \"gapCoverOptions\": [\r\n {\r\n id: 1,\r\n isForMember: true,\r\n name: 'Primary Gap Cover',\r\n optionPrice: 125\r\n },\r\n {\r\n id: 2,\r\n isForMember: true,\r\n name: 'Supreme Gap Cover',\r\n optionPrice: 175\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n ];","export const insuranceOptions = [\r\n {\r\n id: 1,\r\n isForMember: true,\r\n name: 'Life Cover',\r\n monthlyAmount: null\r\n },\r\n {\r\n id: 2,\r\n isForMember: true,\r\n name: 'Dread Disease Cover',\r\n monthlyAmount: null\r\n },\r\n {\r\n id: 3,\r\n isForMember: true,\r\n name: 'Disability Lump Sum',\r\n monthlyAmount: null\r\n },\r\n {\r\n id: 4,\r\n isForMember: true,\r\n name: 'Disability Income Protection',\r\n monthlyAmount: null\r\n },\r\n {\r\n id: 5,\r\n isForMember: true,\r\n name: 'Temporary Total Disability',\r\n monthlyAmount: null\r\n },\r\n {\r\n id: 6,\r\n isForMember: true,\r\n name: 'Funeral',\r\n monthlyAmount: null\r\n },\r\n {\r\n id: 7,\r\n isForMember: false,\r\n name: 'Spousal Life Cover',\r\n monthlyAmount: null\r\n },\r\n {\r\n id: 8,\r\n isForMember: false,\r\n name: 'Spousal Dread Disease Cover',\r\n monthlyAmount: null\r\n },\r\n {\r\n id: 9,\r\n isForMember: false,\r\n name: 'Spousal Disability Lump Sum',\r\n monthlyAmount: null\r\n }\r\n];\r\n","export const medicalAidPlans = \r\n[\r\n {\r\n \"selectedMAP\": [\r\n {\r\n \"mapName\": \"Default\",\r\n \"options\": [\r\n {\r\n id: 1,\r\n optionName: 'Hospital Plan',\r\n memberAmount: 1850,\r\n adultDependantAmount: 900,\r\n childDependantAmount: 900\r\n },\r\n {\r\n id: 2,\r\n optionName: 'Savings Plan',\r\n memberAmount: 2200,\r\n adultDependantAmount: 1100,\r\n childDependantAmount: 1100\r\n },\r\n {\r\n id: 3,\r\n optionName: 'Elite Plan',\r\n memberAmount: 4900,\r\n adultDependantAmount: 2200,\r\n childDependantAmount: 2200\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n ];\r\n\r\n\r\n","export const mortalityTable = [{\r\n 'AGE': 16,\r\n 'MALE': 0.00103,\r\n 'FEMALE': 0.0003,\r\n 'MPX': 0.999131769,\r\n 'MNPX': 0.999131769,\r\n 'FPX': 0.999741982,\r\n 'FNPX': 0.999741982\r\n },\r\n {\r\n 'AGE': 17,\r\n 'MALE': 0.00103,\r\n 'FEMALE': 0.0003,\r\n 'MPX': 0.999140451,\r\n 'MNPX': 0.998272966,\r\n 'FPX': 0.999744563,\r\n 'FNPX': 0.999486611\r\n },\r\n {\r\n 'AGE': 18,\r\n 'MALE': 0.00103,\r\n 'FEMALE': 0.0003,\r\n 'MPX': 0.999149046,\r\n 'MNPX': 0.997423482,\r\n 'FPX': 0.999747117,\r\n 'FNPX': 0.999233858\r\n },\r\n {\r\n 'AGE': 19,\r\n 'MALE': 0.00103,\r\n 'FEMALE': 0.0003,\r\n 'MPX': 0.999157556,\r\n 'MNPX': 0.996583208,\r\n 'FPX': 0.999749646,\r\n 'FNPX': 0.998983696\r\n },\r\n {\r\n 'AGE': 20,\r\n 'MALE': 0.00103,\r\n 'FEMALE': 0.0003,\r\n 'MPX': 0.99916598,\r\n 'MNPX': 0.995752038,\r\n 'FPX': 0.999752149,\r\n 'FNPX': 0.998736097\r\n },\r\n {\r\n 'AGE': 21,\r\n 'MALE': 0.00101,\r\n 'FEMALE': 0.0003,\r\n 'MPX': 0.999190353,\r\n 'MNPX': 0.99494583,\r\n 'FPX': 0.999754628,\r\n 'FNPX': 0.998491035\r\n },\r\n {\r\n 'AGE': 22,\r\n 'MALE': 0.00097,\r\n 'FEMALE': 0.0003,\r\n 'MPX': 0.999230194,\r\n 'MNPX': 0.994179915,\r\n 'FPX': 0.999757082,\r\n 'FNPX': 0.998248483\r\n },\r\n {\r\n 'AGE': 23,\r\n 'MALE': 0.00091,\r\n 'FEMALE': 0.0003,\r\n 'MPX': 0.999285033,\r\n 'MNPX': 0.993469109,\r\n 'FPX': 0.999759511,\r\n 'FNPX': 0.998008415\r\n },\r\n {\r\n 'AGE': 24,\r\n 'MALE': 0.00083,\r\n 'FEMALE': 0.0003,\r\n 'MPX': 0.999354408,\r\n 'MNPX': 0.992827734,\r\n 'FPX': 0.999761916,\r\n 'FNPX': 0.997770805\r\n },\r\n {\r\n 'AGE': 25,\r\n 'MALE': 0.00075,\r\n 'FEMALE': 0.0003,\r\n 'MPX': 0.999422468,\r\n 'MNPX': 0.992254344,\r\n 'FPX': 0.999764297,\r\n 'FNPX': 0.997535627\r\n },\r\n {\r\n 'AGE': 26,\r\n 'MALE': 0.00069,\r\n 'FEMALE': 0.0003,\r\n 'MPX': 0.999473984,\r\n 'MNPX': 0.991732402,\r\n 'FPX': 0.999766654,\r\n 'FNPX': 0.997302856\r\n },\r\n {\r\n 'AGE': 27,\r\n 'MALE': 0.00064,\r\n 'FEMALE': 0.0003,\r\n 'MPX': 0.99951698,\r\n 'MNPX': 0.991253375,\r\n 'FPX': 0.999768987,\r\n 'FNPX': 0.997072466\r\n },\r\n {\r\n 'AGE': 28,\r\n 'MALE': 0.00061,\r\n 'FEMALE': 0.0003,\r\n 'MPX': 0.999544225,\r\n 'MNPX': 0.990801586,\r\n 'FPX': 0.999771297,\r\n 'FNPX': 0.996844433\r\n },\r\n {\r\n 'AGE': 29,\r\n 'MALE': 0.0006,\r\n 'FEMALE': 0.0003,\r\n 'MPX': 0.99955618,\r\n 'MNPX': 0.990361848,\r\n 'FPX': 0.999773584,\r\n 'FNPX': 0.996618731\r\n },\r\n {\r\n 'AGE': 30,\r\n 'MALE': 0.00058,\r\n 'FEMALE': 0.0003,\r\n 'MPX': 0.999575264,\r\n 'MNPX': 0.989941206,\r\n 'FPX': 0.999775848,\r\n 'FNPX': 0.996395338\r\n },\r\n {\r\n 'AGE': 31,\r\n 'MALE': 0.00057,\r\n 'FEMALE': 0.0003,\r\n 'MPX': 0.999586761,\r\n 'MNPX': 0.989532124,\r\n 'FPX': 0.99977809,\r\n 'FNPX': 0.996174227\r\n },\r\n {\r\n 'AGE': 32,\r\n 'MALE': 0.00061,\r\n 'FEMALE': 0.00033,\r\n 'MPX': 0.999562184,\r\n 'MNPX': 0.989098891,\r\n 'FPX': 0.99975834,\r\n 'FNPX': 0.995933492\r\n },\r\n {\r\n 'AGE': 33,\r\n 'MALE': 0.00067,\r\n 'FEMALE': 0.00037,\r\n 'MPX': 0.999523929,\r\n 'MNPX': 0.98862801,\r\n 'FPX': 0.999731757,\r\n 'FNPX': 0.99566634\r\n },\r\n {\r\n 'AGE': 34,\r\n 'MALE': 0.00073,\r\n 'FEMALE': 0.00041,\r\n 'MPX': 0.999486483,\r\n 'MNPX': 0.988120333,\r\n 'FPX': 0.99970573,\r\n 'FNPX': 0.995373346\r\n },\r\n {\r\n 'AGE': 35,\r\n 'MALE': 0.00079,\r\n 'FEMALE': 0.00046,\r\n 'MPX': 0.999449834,\r\n 'MNPX': 0.987576703,\r\n 'FPX': 0.999673146,\r\n 'FNPX': 0.995048003\r\n },\r\n {\r\n 'AGE': 36,\r\n 'MALE': 0.00086,\r\n 'FEMALE': 0.00051,\r\n 'MPX': 0.999407074,\r\n 'MNPX': 0.986991143,\r\n 'FPX': 0.999641242,\r\n 'FNPX': 0.994691022\r\n },\r\n {\r\n 'AGE': 37,\r\n 'MALE': 0.00095,\r\n 'FEMALE': 0.00057,\r\n 'MPX': 0.999351573,\r\n 'MNPX': 0.986351151,\r\n 'FPX': 0.999603044,\r\n 'FNPX': 0.994296173\r\n },\r\n {\r\n 'AGE': 38,\r\n 'MALE': 0.00104,\r\n 'FEMALE': 0.00064,\r\n 'MPX': 0.999297242,\r\n 'MNPX': 0.985657985,\r\n 'FPX': 0.999558753,\r\n 'FNPX': 0.993857443\r\n },\r\n {\r\n 'AGE': 39,\r\n 'MALE': 0.00115,\r\n 'FEMALE': 0.00071,\r\n 'MPX': 0.999230682,\r\n 'MNPX': 0.984899701,\r\n 'FPX': 0.999515386,\r\n 'FNPX': 0.993375806\r\n },\r\n {\r\n 'AGE': 40,\r\n 'MALE': 0.00127,\r\n 'FEMALE': 0.00079,\r\n 'MPX': 0.999158902,\r\n 'MNPX': 0.984071303,\r\n 'FPX': 0.999466174,\r\n 'FNPX': 0.992845516\r\n },\r\n {\r\n 'AGE': 41,\r\n 'MALE': 0.00142,\r\n 'FEMALE': 0.00089,\r\n 'MPX': 0.999068964,\r\n 'MNPX': 0.983155097,\r\n 'FPX': 0.999404615,\r\n 'FNPX': 0.992254391\r\n },\r\n {\r\n 'AGE': 42,\r\n 'MALE': 0.00159,\r\n 'FEMALE': 0.00099,\r\n 'MPX': 0.998967927,\r\n 'MNPX': 0.982140409,\r\n 'FPX': 0.999344341,\r\n 'FNPX': 0.99160381\r\n },\r\n {\r\n 'AGE': 43,\r\n 'MALE': 0.00179,\r\n 'FEMALE': 0.0011,\r\n 'MPX': 0.998849725,\r\n 'MNPX': 0.981010678,\r\n 'FPX': 0.999278775,\r\n 'FNPX': 0.990888641\r\n },\r\n {\r\n 'AGE': 44,\r\n 'MALE': 0.00202,\r\n 'FEMALE': 0.00123,\r\n 'MPX': 0.998714905,\r\n 'MNPX': 0.979749986,\r\n 'FPX': 0.999201604,\r\n 'FNPX': 0.990097519\r\n },\r\n {\r\n 'AGE': 45,\r\n 'MALE': 0.0023,\r\n 'FEMALE': 0.00137,\r\n 'MPX': 0.998551406,\r\n 'MNPX': 0.978330726,\r\n 'FPX': 0.999119622,\r\n 'FNPX': 0.989225859\r\n },\r\n {\r\n 'AGE': 46,\r\n 'MALE': 0.00262,\r\n 'FEMALE': 0.00152,\r\n 'MPX': 0.998366363,\r\n 'MNPX': 0.976732489,\r\n 'FPX': 0.999032998,\r\n 'FNPX': 0.988269276\r\n },\r\n {\r\n 'AGE': 47,\r\n 'MALE': 0.00301,\r\n 'FEMALE': 0.0017,\r\n 'MPX': 0.998141957,\r\n 'MNPX': 0.974917678,\r\n 'FPX': 0.9989293,\r\n 'FNPX': 0.987211135\r\n },\r\n {\r\n 'AGE': 48,\r\n 'MALE': 0.00346,\r\n 'FEMALE': 0.0019,\r\n 'MPX': 0.997885534,\r\n 'MNPX': 0.972856248,\r\n 'FPX': 0.998815302,\r\n 'FNPX': 0.986041588\r\n },\r\n {\r\n 'AGE': 49,\r\n 'MALE': 0.00398,\r\n 'FEMALE': 0.00211,\r\n 'MPX': 0.997592076,\r\n 'MNPX': 0.970513684,\r\n 'FPX': 0.998697518,\r\n 'FNPX': 0.984757287\r\n },\r\n {\r\n 'AGE': 50,\r\n 'MALE': 0.0046,\r\n 'FEMALE': 0.00235,\r\n 'MPX': 0.997244802,\r\n 'MNPX': 0.967839727,\r\n 'FPX': 0.998563874,\r\n 'FNPX': 0.983343051\r\n },\r\n {\r\n 'AGE': 51,\r\n 'MALE': 0.00532,\r\n 'FEMALE': 0.00262,\r\n 'MPX': 0.996845419,\r\n 'MNPX': 0.964786598,\r\n 'FPX': 0.998414884,\r\n 'FNPX': 0.981784339\r\n },\r\n {\r\n 'AGE': 52,\r\n 'MALE': 0.00615,\r\n 'FEMALE': 0.00293,\r\n 'MPX': 0.996389724,\r\n 'MNPX': 0.961303452,\r\n 'FPX': 0.998245059,\r\n 'FNPX': 0.980061365\r\n },\r\n {\r\n 'AGE': 53,\r\n 'MALE': 0.0071,\r\n 'FEMALE': 0.00326,\r\n 'MPX': 0.995873718,\r\n 'MNPX': 0.957336843,\r\n 'FPX': 0.998066929,\r\n 'FNPX': 0.978166837\r\n },\r\n {\r\n 'AGE': 54,\r\n 'MALE': 0.00818,\r\n 'FEMALE': 0.00363,\r\n 'MPX': 0.995293598,\r\n 'MNPX': 0.952831231,\r\n 'FPX': 0.997869056,\r\n 'FNPX': 0.976082419\r\n },\r\n {\r\n 'AGE': 55,\r\n 'MALE': 0.00941,\r\n 'FEMALE': 0.00405,\r\n 'MPX': 0.994640053,\r\n 'MNPX': 0.947724106,\r\n 'FPX': 0.997646276,\r\n 'FNPX': 0.97378499\r\n },\r\n {\r\n 'AGE': 56,\r\n 'MALE': 0.01079,\r\n 'FEMALE': 0.00452,\r\n 'MPX': 0.993915463,\r\n 'MNPX': 0.941957644,\r\n 'FPX': 0.997399397,\r\n 'FNPX': 0.971252562\r\n },\r\n {\r\n 'AGE': 57,\r\n 'MALE': 0.01232,\r\n 'FEMALE': 0.00503,\r\n 'MPX': 0.993122161,\r\n 'MNPX': 0.935479011,\r\n 'FPX': 0.997134906,\r\n 'FNPX': 0.968469832\r\n },\r\n {\r\n 'AGE': 58,\r\n 'MALE': 0.01352,\r\n 'FEMALE': 0.00561,\r\n 'MPX': 0.992527719,\r\n 'MNPX': 0.928488849,\r\n 'FPX': 0.996836492,\r\n 'FNPX': 0.96540607\r\n },\r\n {\r\n 'AGE': 59,\r\n 'MALE': 0.01477,\r\n 'FEMALE': 0.00625,\r\n 'MPX': 0.991918496,\r\n 'MNPX': 0.920985263,\r\n 'FPX': 0.996510837,\r\n 'FNPX': 0.96203761\r\n },\r\n {\r\n 'AGE': 60,\r\n 'MALE': 0.01613,\r\n 'FEMALE': 0.00696,\r\n 'MPX': 0.99126262,\r\n 'MNPX': 0.912938265,\r\n 'FPX': 0.996153323,\r\n 'FNPX': 0.958336962\r\n },\r\n {\r\n 'AGE': 61,\r\n 'MALE': 0.01761,\r\n 'FEMALE': 0.00776,\r\n 'MPX': 0.990556317,\r\n 'MNPX': 0.904316765,\r\n 'FPX': 0.995754064,\r\n 'FNPX': 0.954267925\r\n },\r\n {\r\n 'AGE': 62,\r\n 'MALE': 0.01923,\r\n 'FEMALE': 0.00864,\r\n 'MPX': 0.989790686,\r\n 'MNPX': 0.895084311,\r\n 'FPX': 0.995319841,\r\n 'FNPX': 0.9498018\r\n },\r\n {\r\n 'AGE': 63,\r\n 'MALE': 0.021,\r\n 'FEMALE': 0.00962,\r\n 'MPX': 0.988962474,\r\n 'MNPX': 0.885204795,\r\n 'FPX': 0.9948411,\r\n 'FNPX': 0.944901867\r\n },\r\n {\r\n 'AGE': 64,\r\n 'MALE': 0.02292,\r\n 'FEMALE': 0.01072,\r\n 'MPX': 0.988073795,\r\n 'MNPX': 0.874647661,\r\n 'FPX': 0.994308693,\r\n 'FNPX': 0.93952414\r\n },\r\n {\r\n 'AGE': 65,\r\n 'MALE': 0.02502,\r\n 'FEMALE': 0.01194,\r\n 'MPX': 0.987111269,\r\n 'MNPX': 0.863374563,\r\n 'FPX': 0.993724378,\r\n 'FNPX': 0.933628041\r\n },\r\n {\r\n 'AGE': 66,\r\n 'MALE': 0.0273,\r\n 'FEMALE': 0.01329,\r\n 'MPX': 0.986077389,\r\n 'MNPX': 0.851354135,\r\n 'FPX': 0.993084674,\r\n 'FNPX': 0.927171699\r\n },\r\n {\r\n 'AGE': 67,\r\n 'MALE': 0.02978,\r\n 'FEMALE': 0.0148,\r\n 'MPX': 0.984964498,\r\n 'MNPX': 0.838553598,\r\n 'FPX': 0.992375971,\r\n 'FNPX': 0.920102915\r\n },\r\n {\r\n 'AGE': 68,\r\n 'MALE': 0.03248,\r\n 'FEMALE': 0.01647,\r\n 'MPX': 0.983765293,\r\n 'MNPX': 0.824939926,\r\n 'FPX': 0.991600535,\r\n 'FNPX': 0.912374543\r\n },\r\n {\r\n 'AGE': 69,\r\n 'MALE': 0.03542,\r\n 'FEMALE': 0.01833,\r\n 'MPX': 0.982472815,\r\n 'MNPX': 0.810481051,\r\n 'FPX': 0.990745442,\r\n 'FNPX': 0.903930919\r\n },\r\n {\r\n 'AGE': 70,\r\n 'MALE': 0.03861,\r\n 'FEMALE': 0.0204,\r\n 'MPX': 0.981085337,\r\n 'MNPX': 0.795151075,\r\n 'FPX': 0.989803325,\r\n 'FNPX': 0.894713829\r\n },\r\n {\r\n 'AGE': 71,\r\n 'MALE': 0.04208,\r\n 'FEMALE': 0.02269,\r\n 'MPX': 0.979591563,\r\n 'MNPX': 0.778923285,\r\n 'FPX': 0.988772111,\r\n 'FNPX': 0.884668081\r\n },\r\n {\r\n 'AGE': 72,\r\n 'MALE': 0.04584,\r\n 'FEMALE': 0.02523,\r\n 'MPX': 0.977990316,\r\n 'MNPX': 0.761779429,\r\n 'FPX': 0.987640068,\r\n 'FNPX': 0.873733644\r\n },\r\n {\r\n 'AGE': 73,\r\n 'MALE': 0.04992,\r\n 'FEMALE': 0.02805,\r\n 'MPX': 0.976271025,\r\n 'MNPX': 0.743703184,\r\n 'FPX': 0.986395992,\r\n 'FNPX': 0.861847365\r\n },\r\n {\r\n 'AGE': 74,\r\n 'MALE': 0.05435,\r\n 'FEMALE': 0.03118,\r\n 'MPX': 0.974423616,\r\n 'MNPX': 0.724681946,\r\n 'FPX': 0.985029189,\r\n 'FNPX': 0.848944811\r\n },\r\n {\r\n 'AGE': 75,\r\n 'MALE': 0.05914,\r\n 'FEMALE': 0.03464,\r\n 'MPX': 0.972447811,\r\n 'MNPX': 0.704715372,\r\n 'FPX': 0.983534221,\r\n 'FNPX': 0.834966274\r\n },\r\n {\r\n 'AGE': 76,\r\n 'MALE': 0.06433,\r\n 'FEMALE': 0.03847,\r\n 'MPX': 0.970329591,\r\n 'MNPX': 0.683806178,\r\n 'FPX': 0.981896532,\r\n 'FNPX': 0.819850488\r\n },\r\n {\r\n 'AGE': 77,\r\n 'MALE': 0.06994,\r\n 'FEMALE': 0.04271,\r\n 'MPX': 0.968064714,\r\n 'MNPX': 0.661968633,\r\n 'FPX': 0.980102232,\r\n 'FNPX': 0.803537294\r\n },\r\n {\r\n 'AGE': 78,\r\n 'MALE': 0.07599,\r\n 'FEMALE': 0.04739,\r\n 'MPX': 0.965649203,\r\n 'MNPX': 0.639229483,\r\n 'FPX': 0.978142691,\r\n 'FNPX': 0.785974131\r\n },\r\n {\r\n 'AGE': 79,\r\n 'MALE': 0.08253,\r\n 'FEMALE': 0.05255,\r\n 'MPX': 0.963065909,\r\n 'MNPX': 0.615620123,\r\n 'FPX': 0.976005158,\r\n 'FNPX': 0.767114805\r\n },\r\n {\r\n 'AGE': 80,\r\n 'MALE': 0.08957,\r\n 'FEMALE': 0.05824,\r\n 'MPX': 0.960316192,\r\n 'MNPX': 0.591189972,\r\n 'FPX': 0.973672978,\r\n 'FNPX': 0.746918957\r\n },\r\n {\r\n 'AGE': 81,\r\n 'MALE': 0.09715,\r\n 'FEMALE': 0.06451,\r\n 'MPX': 0.95738831,\r\n 'MNPX': 0.565998368,\r\n 'FPX': 0.971130277,\r\n 'FNPX': 0.725355614\r\n },\r\n {\r\n 'AGE': 82,\r\n 'MALE': 0.1053,\r\n 'FEMALE': 0.0714,\r\n 'MPX': 0.954275441,\r\n 'MNPX': 0.540118343,\r\n 'FPX': 0.968366374,\r\n 'FNPX': 0.702409986\r\n },\r\n {\r\n 'AGE': 83,\r\n 'MALE': 0.11405,\r\n 'FEMALE': 0.07896,\r\n 'MPX': 0.950971158,\r\n 'MNPX': 0.513636966,\r\n 'FPX': 0.965366762,\r\n 'FNPX': 0.678083254\r\n },\r\n {\r\n 'AGE': 84,\r\n 'MALE': 0.12342,\r\n 'FEMALE': 0.08725,\r\n 'MPX': 0.947473667,\r\n 'MNPX': 0.486657499,\r\n 'FPX': 0.962113317,\r\n 'FNPX': 0.652392928\r\n },\r\n {\r\n 'AGE': 85,\r\n 'MALE': 0.13344,\r\n 'FEMALE': 0.09632,\r\n 'MPX': 0.943777161,\r\n 'MNPX': 0.459296233,\r\n 'FPX': 0.95859309,\r\n 'FNPX': 0.625379353\r\n },\r\n {\r\n 'AGE': 86,\r\n 'MALE': 0.14415,\r\n 'FEMALE': 0.10622,\r\n 'MPX': 0.939872025,\r\n 'MNPX': 0.431679681,\r\n 'FPX': 0.954793817,\r\n 'FNPX': 0.59710834\r\n },\r\n {\r\n 'AGE': 87,\r\n 'MALE': 0.15556,\r\n 'FEMALE': 0.11701,\r\n 'MPX': 0.935761549,\r\n 'MNPX': 0.403949247,\r\n 'FPX': 0.950699683,\r\n 'FNPX': 0.567670709\r\n },\r\n {\r\n 'AGE': 88,\r\n 'MALE': 0.1677,\r\n 'FEMALE': 0.12874,\r\n 'MPX': 0.931440857,\r\n 'MNPX': 0.376254833,\r\n 'FPX': 0.946299858,\r\n 'FNPX': 0.537186711\r\n },\r\n {\r\n 'AGE': 89,\r\n 'MALE': 0.18058,\r\n 'FEMALE': 0.14145,\r\n 'MPX': 0.9269135,\r\n 'MNPX': 0.348755684,\r\n 'FPX': 0.941588269,\r\n 'FNPX': 0.505808706\r\n },\r\n {\r\n 'AGE': 90,\r\n 'MALE': 0.19422,\r\n 'FEMALE': 0.15519,\r\n 'MPX': 0.922179027,\r\n 'MNPX': 0.321615177,\r\n 'FPX': 0.936555197,\r\n 'FNPX': 0.473717772\r\n },\r\n {\r\n 'AGE': 91,\r\n 'MALE': 0.20863,\r\n 'FEMALE': 0.17001,\r\n 'MPX': 0.917241109,\r\n 'MNPX': 0.294998662,\r\n 'FPX': 0.931191517,\r\n 'FNPX': 0.441121971\r\n },\r\n {\r\n 'AGE': 92,\r\n 'MALE': 0.22381,\r\n 'FEMALE': 0.18592,\r\n 'MPX': 0.912107345,\r\n 'MNPX': 0.269070446,\r\n 'FPX': 0.925504709,\r\n 'FNPX': 0.408260461\r\n },\r\n {\r\n 'AGE': 93,\r\n 'MALE': 0.23976,\r\n 'FEMALE': 0.20297,\r\n 'MPX': 0.906785168,\r\n 'MNPX': 0.24398909,\r\n 'FPX': 0.919486306,\r\n 'FNPX': 0.375389903\r\n },\r\n {\r\n 'AGE': 94,\r\n 'MALE': 0.25647,\r\n 'FEMALE': 0.22115,\r\n 'MPX': 0.901285703,\r\n 'MNPX': 0.219903878,\r\n 'FPX': 0.913151956,\r\n 'FNPX': 0.342788025\r\n },\r\n {\r\n 'AGE': 95,\r\n 'MALE': 0.27393,\r\n 'FEMALE': 0.24047,\r\n 'MPX': 0.895619763,\r\n 'MNPX': 0.196950259,\r\n 'FPX': 0.906509131,\r\n 'FNPX': 0.310740474\r\n },\r\n {\r\n 'AGE': 96,\r\n 'MALE': 0.29211,\r\n 'FEMALE': 0.26091,\r\n 'MPX': 0.889805403,\r\n 'MNPX': 0.175247405,\r\n 'FPX': 0.899576764,\r\n 'FNPX': 0.27953491\r\n },\r\n {\r\n 'AGE': 97,\r\n 'MALE': 0.31097,\r\n 'FEMALE': 0.28244,\r\n 'MPX': 0.883863813,\r\n 'MNPX': 0.154894839,\r\n 'FPX': 0.892377052,\r\n 'FNPX': 0.249450539\r\n },\r\n {\r\n 'AGE': 98,\r\n 'MALE': 0.33049,\r\n 'FEMALE': 0.30502,\r\n 'MPX': 0.877808052,\r\n 'MNPX': 0.135967937,\r\n 'FPX': 0.884935278,\r\n 'FNPX': 0.220747582\r\n },\r\n {\r\n 'AGE': 99,\r\n 'MALE': 0.35061,\r\n 'FEMALE': 0.32857,\r\n 'MPX': 0.871665401,\r\n 'MNPX': 0.118518547,\r\n 'FPX': 0.877290841,\r\n 'FNPX': 0.193659832\r\n },\r\n {\r\n 'AGE': 100,\r\n 'MALE': 0.37127,\r\n 'FEMALE': 0.35302,\r\n 'MPX': 0.865462141,\r\n 'MNPX': 0.102573315,\r\n 'FPX': 0.869478043,\r\n 'FNPX': 0.168382972\r\n },\r\n {\r\n 'AGE': 101,\r\n 'MALE': 0.39242,\r\n 'FEMALE': 0.37827,\r\n 'MPX': 0.859219993,\r\n 'MNPX': 0.088133043,\r\n 'FPX': 0.861540946,\r\n 'FNPX': 0.145068825\r\n },\r\n {\r\n 'AGE': 102,\r\n 'MALE': 0.41398,\r\n 'FEMALE': 0.40419,\r\n 'MPX': 0.852970526,\r\n 'MNPX': 0.075174888,\r\n 'FPX': 0.853532854,\r\n 'FNPX': 0.123821008\r\n },\r\n {\r\n 'AGE': 103,\r\n 'MALE': 0.43587,\r\n 'FEMALE': 0.43066,\r\n 'MPX': 0.846744095,\r\n 'MNPX': 0.063653893,\r\n 'FPX': 0.845501458,\r\n 'FNPX': 0.104690843\r\n },\r\n {\r\n 'AGE': 104,\r\n 'MALE': 0.45802,\r\n 'FEMALE': 0.45753,\r\n 'MPX': 0.840566392,\r\n 'MNPX': 0.053505323,\r\n 'FPX': 0.837503272,\r\n 'FNPX': 0.087678924\r\n },\r\n {\r\n 'AGE': 105,\r\n 'MALE': 0.48033,\r\n 'FEMALE': 0.48465,\r\n 'MPX': 0.83447243,\r\n 'MNPX': 0.044648717,\r\n 'FPX': 0.829592598,\r\n 'FNPX': 0.072737786\r\n }\r\n];\r\n","export const salaryScales = [\r\n { age: 18, increase: 0.135 },\r\n { age: 19, increase: 0.135 },\r\n { age: 20, increase: 0.135 },\r\n { age: 21, increase: 0.126 },\r\n { age: 22, increase: 0.117 },\r\n { age: 23, increase: 0.108 },\r\n { age: 24, increase: 0.099 },\r\n { age: 25, increase: 0.090 },\r\n { age: 26, increase: 0.083 },\r\n { age: 27, increase: 0.076 },\r\n { age: 28, increase: 0.069 },\r\n { age: 29, increase: 0.062 },\r\n { age: 30, increase: 0.055 },\r\n { age: 31, increase: 0.050 },\r\n { age: 32, increase: 0.045 },\r\n { age: 33, increase: 0.043 },\r\n { age: 34, increase: 0.041 },\r\n { age: 35, increase: 0.039 },\r\n { age: 36, increase: 0.037 },\r\n { age: 37, increase: 0.035 },\r\n { age: 38, increase: 0.033 },\r\n { age: 39, increase: 0.031 },\r\n { age: 40, increase: 0.029 },\r\n { age: 41, increase: 0.027 },\r\n { age: 42, increase: 0.025 },\r\n { age: 43, increase: 0.023 },\r\n { age: 44, increase: 0.021 },\r\n { age: 45, increase: 0.019 },\r\n { age: 46, increase: 0.017 },\r\n { age: 47, increase: 0.015 },\r\n { age: 48, increase: 0.015 },\r\n { age: 49, increase: 0.015 },\r\n { age: 50, increase: 0.015 },\r\n { age: 51, increase: 0.015 },\r\n { age: 52, increase: 0.015 },\r\n { age: 53, increase: 0.015 },\r\n { age: 54, increase: 0.015 },\r\n { age: 55, increase: 0.015 },\r\n { age: 56, increase: 0.015 },\r\n { age: 57, increase: 0.015 },\r\n { age: 58, increase: 0.015 },\r\n { age: 59, increase: 0.015 },\r\n { age: 60, increase: 0.015 },\r\n { age: 61, increase: 0.015 },\r\n { age: 62, increase: 0.015 },\r\n { age: 63, increase: 0.015 },\r\n { age: 64, increase: 0.015 },\r\n { age: 65, increase: 0.015 }\r\n];\r\n","export const taxRebates = {\r\n primary: {\r\n amount: 14220,\r\n age: 0\r\n },\r\n secondary: {\r\n amount: 7794,\r\n age: 65\r\n },\r\n tertiary: {\r\n amount: 2601,\r\n age: 75\r\n }\r\n};\r\n","export const messages: any = {\r\n MANDATORY_MESSAGE: \"This field is required\",\r\n PHONE_FORMAT:\r\n \"Please use one of the following formats: +27XXXXXXXXX or 0XXXXXXXXX\",\r\n CELLPHONE_FORMAT: \"Cellnumber should be in +27xxxxxx or 0xxxxxx format\",\r\n WORKPHONE_FORMAT: \"Work number should be in +27xxxxxxx or 0xxxxxxx format\",\r\n EMAIL_FORMAT: \"Invalid email format\",\r\n PERSONAL_WORK_SAMEEMAIL: \"Should not be same as work email\",\r\n};\r\n","import { Injectable } from '@angular/core';\r\nimport { HttpInterceptor, HttpHandler, HttpRequest, HttpHeaders, HttpEvent } from '@angular/common/http';\r\nimport { AuthenticationService } from '../services/authentication.service';\r\nimport { Observable } from 'rxjs';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class TokenInterceptorService implements HttpInterceptor {\r\n constructor(private authenticationService: AuthenticationService,) {\r\n }\r\n\r\n intercept(req: HttpRequest, next: HttpHandler): Observable> {\r\n if (!this.authenticationService.getAuthorizationHeaderValue()) {\r\n return next.handle(req);\r\n }\r\n\r\n const headers = new HttpHeaders({\r\n // 'Content-Type': 'application/json',\r\n Authorization: this.authenticationService.getAuthorizationHeaderValue()\r\n });\r\n\r\n const authReq = req.clone({ headers });\r\n return next.handle(authReq);\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { HttpHeaders, HttpClient } from '@angular/common/http';\r\nimport { Observable } from 'rxjs';\r\nimport { StoreService } from './storeService';\r\nimport appsettings from \"src/assets/appsettings.json\"\r\n\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class AdminService {\r\n\r\n private _templatesUrl: string;\r\n\r\n\r\n constructor(private _http: HttpClient, private _storeService: StoreService) {\r\n this._configureEndpoints();\r\n }\r\n\r\n createOfferTemplate(template: any): Observable {\r\n const token = this._storeService.getStoredData().id_token;\r\n const headers = new HttpHeaders()\r\n .set('Authorization', `Bearer ${token}`)\r\n .set('Content-Type', 'application/json');\r\n\r\n const options = { headers: headers };\r\n const url = `${this._templatesUrl}/offers/create`;\r\n const data = JSON.stringify(template);\r\n return this._http.post(url, data, options);\r\n }\r\n\r\n\r\n updateOfferTemplate(template: any): Observable {\r\n const token = this._storeService.getStoredData().id_token;\r\n const headers = new HttpHeaders()\r\n .set('Authorization', `Bearer ${token}`)\r\n .set('Content-Type', 'application/json');\r\n\r\n const options = { headers: headers };\r\n const url = `${this._templatesUrl}/offers/${template.id}/update`;\r\n const data = JSON.stringify(template);\r\n return this._http.put(url, data, options);\r\n }\r\n\r\n getOfferTemplates() {\r\n const corporateId = this._storeService.getStoredData().profile['CorporateId'];\r\n const token = this._storeService.getStoredData().id_token;\r\n const headers = new HttpHeaders().set('Authorization', `Bearer ${token}`);\r\n const options = { headers: headers };\r\n const url = `${this._templatesUrl}/offers/${corporateId}`;\r\n return this._http.get(url, options);\r\n }\r\n\r\n getOfferTemplateById(templateId: string): Observable {\r\n const url = `${this._templatesUrl}/offers/`;\r\n return this._http.get(url + templateId);\r\n }\r\n\r\n deleteOfferTemplate(id: any): Observable {\r\n const token = this._storeService.getStoredData().id_token;\r\n const headers = new HttpHeaders().set('Authorization', `Bearer ${token}`);\r\n const options = { headers: headers };\r\n const url = `${this._templatesUrl}/offers/${id}/delete`;\r\n return this._http.delete(url, options);\r\n }\r\n\r\n private _configureEndpoints(): void {\r\n const baseUrl = appsettings.serverUrl;\r\n const endPoint = appsettings.endPoints;\r\n this._templatesUrl = `${baseUrl}${endPoint.templatesUrl}`;\r\n }\r\n}\r\n","\r\nimport { Injectable } from \"@angular/core\";\r\nimport {\r\n ActivatedRouteSnapshot,\r\n CanActivate,\r\n Router,\r\n RouterStateSnapshot,\r\n UrlTree\r\n} from \"@angular/router\";\r\nimport { catchError, from, map, Observable, of } from \"rxjs\";\r\nimport { AuthService } from \"./auth.service\";\r\n \r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class AuthGuard implements CanActivate {\r\n constructor(\r\n private authService: AuthService,\r\n private router: Router) { }\r\n\r\n canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean | Observable {\r\n return this.authService.isLoggedInObs().pipe(\r\n map(e => {\r\n if (e) {\r\n return true;\r\n } else {\r\n return false\r\n }\r\n }),\r\n catchError((err) => {\r\n this.router.navigate(['/login']);\r\n return of(false);\r\n })\r\n );\r\n } \r\n //TODO: Extend to check role so that a memebr cant get to the hradmin landing page\r\n \r\n }","import { Injectable } from \"@angular/core\";\r\nimport { Observable, BehaviorSubject, from, map } from \"rxjs\";\r\nimport { UserManager, User, Log, UserManagerSettings, UserSettings } from \"oidc-client\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { Constants } from \"../constants/constants\";\r\nimport { AuthContext } from \"../models/auth-context\";\r\n\r\nimport { StoreService } from \"./storeService\";\r\nimport { ErrorService } from \"./error.service\";\r\nimport { RoutingService } from \"./routing.service\";\r\nimport appsettings from \"../../assets/appsettings.json\"\r\n\r\n// import { ApplicationInsightsService } from \"./insights/applicationinsights.service\";\r\n// Verbose logging in debug mode\r\n// Log.level = Log.DEBUG;\r\n// Log.logger = console;\r\n\r\nconst settings: UserManagerSettings = {\r\n authority: Constants.stsAuthority,\r\n client_id: Constants.clientId,\r\n redirect_uri: Constants.redirect_uri,\r\n post_logout_redirect_uri: Constants.post_logout_redirect_uri,\r\n response_type: \"id_token token\",\r\n scope: Constants.clientScope,\r\n silent_redirect_uri: Constants.silent_redirect_uri,\r\n automaticSilentRenew: true,\r\n accessTokenExpiringNotificationTime: 60,\r\n filterProtocolClaims: true,\r\n loadUserInfo: true,\r\n checkSessionInterval: 5000,\r\n monitorSession: true\r\n};\r\n\r\n@Injectable()\r\nexport class AuthService {\r\n [x: string]: any;\r\n mgr: UserManager = new UserManager(settings);\r\n userLoadeded = new BehaviorSubject(null);\r\n currentUser: User | null;\r\n loggedIn = false;\r\n authContext: AuthContext;\r\n authHeaders: Headers;\r\n private _user: User;\r\n public isLoggedIn = new BehaviorSubject(false);\r\n\r\n//logic for OIDC\r\n\r\n constructor(\r\n private _httpClient: HttpClient,\r\n private _storeService: StoreService,\r\n private _errorService: ErrorService,\r\n private _routingService: RoutingService\r\n ) {\r\n const location = window.location;\r\n this.mgr\r\n .getUser()\r\n .then(user => {\r\n if (user) {\r\n console.log(user)\r\n this.loggedIn = true;\r\n this.currentUser = user;\r\n this.userLoadeded.next(user);\r\n\r\n if (!user.profile) {\r\n this.loggedIn = false;\r\n }\r\n }\r\n })\r\n .catch(err => {\r\n console.log(err);\r\n this.loggedIn = false;\r\n });\r\n\r\n this.mgr.events.addUserLoaded(user => {\r\n this.currentUser = user;\r\n });\r\n\r\n this.mgr.events.addUserSignedOut(() => this.startSignoutMainWindow());\r\n\r\n this.mgr.events.addUserUnloaded(() => {\r\n this.loggedIn = false;\r\n });\r\n\r\n this.mgr.events.addAccessTokenExpiring(e => {\r\n console.log(\"Access token expiring.\" + e);\r\n });\r\n\r\n this.mgr.events.addAccessTokenExpired(e => {\r\n console.log(\"Access token expired.\");\r\n this._errorService.openErrorPopup(\"Your access token has expired.\");\r\n this.logout(true);\r\n });\r\n }\r\n\r\n\r\n\r\n logout(isTimeout?: boolean) {\r\n\r\n // try {\r\n // const accessTokenApiUrl = appsettings.accessTokenApiUrl;\r\n // const signoutCallback = appsettings.signoutCallback;\r\n // const storedData = this._storeService.getStoredData();\r\n // const idToken = storedData ? storedData.id_token : \"\";\r\n // const profileRole = storedData.profile['role'];\r\n // const clientRoot = encodeURI(appsettings.clientRoot);\r\n // const timeout = isTimeout ? \"Timeout\" : \"\";\r\n // const state = profileRole + timeout;\r\n\r\n // const redirectURL = `${accessTokenApiUrl}/connect/endsession?id_token_hint=${idToken}&post_logout_redirect_uri=${clientRoot}${signoutCallback}&state=${state}`;\r\n\r\n // // this._appInsightsService.clearUserId();\r\n // localStorage.clear();\r\n // sessionStorage.clear();\r\n // const cookies = document.cookie;\r\n\r\n // if (cookies != null || cookies != undefined) {\r\n // for (let i = 0; i < cookies.split(\";\").length; ++i) {\r\n // const myCookie = cookies[i];\r\n // if (myCookie != null || myCookie != undefined) {\r\n // const pos = myCookie.indexOf(\"=\");\r\n // const name = pos > -1 ? myCookie.substr(0, pos) : myCookie;\r\n // document.cookie = name + \"=;expires=Thu, 01 Jan 1970 00:00:00 GMT\";\r\n // }\r\n // }\r\n // }\r\n\r\n // // this._appInsightsService.flush();\r\n // window.location.href = redirectURL;\r\n // } catch (error) {\r\n // console.log(error);\r\n // }\r\n\r\n \r\n }\r\n\r\n public resendCredentials(userId: string): Observable {\r\n // TODO replace with backend call\r\n return new Observable(observer => {\r\n observer.next(userId);\r\n observer.complete();\r\n });\r\n }\r\n\r\n public getLoginHelp(userId: string): Observable {\r\n // TODO replace with backend call\r\n return new Observable(observer => {\r\n observer.next(userId);\r\n observer.complete();\r\n });\r\n }\r\n\r\n public resendCorporateMagicLink(\r\n userId: string,\r\n corporateId: string\r\n ): Observable {\r\n const data = {\r\n UserId: userId,\r\n CorporateId: corporateId\r\n };\r\n const url =\r\n appsettings.serverUrl +\r\n appsettings.endPoints.rolesUrl +\r\n \"/corporate/invitation\";\r\n return this._httpClient.post(url, data);\r\n }\r\n\r\n public resendAdminMagicLink(userId: string): Observable {\r\n const data = {\r\n UserId: userId\r\n };\r\n const url =\r\n appsettings.serverUrl +\r\n appsettings.endPoints.rolesUrl +\r\n \"/admin/invitation\";\r\n return this._httpClient.post(url, data);\r\n }\r\n\r\n public resendCandidateMagicLink(offerId: string): Observable {\r\n const url =\r\n appsettings.serverUrl +\r\n appsettings.endPoints.offersUrl +\r\n `/${offerId}/tryresendemail`;\r\n return this._httpClient.get(url);\r\n }\r\n\r\n isLoggedInObs(): Observable {\r\n return from(this.mgr.getUser()).pipe(map(\r\n user => {\r\n if (user) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n })\r\n );\r\n }\r\n isAuthenticated() {\r\n if (this._storeService.getStoredData()) {\r\n if (this._storeService.getStoredData().id_token && this._storeService.getStoredData().profile['role']) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n clearState() {\r\n this.mgr\r\n .clearStaleState()\r\n .then(function() {\r\n console.log(\"clearStateState success\");\r\n })\r\n .catch(function(e) {\r\n console.log(\"clearStateState error\", e.message);\r\n });\r\n }\r\n\r\n getUser() {\r\n this.mgr\r\n .getUser()\r\n .then(user => {\r\n this.currentUser = user;\r\n this.userLoadeded.next(user);\r\n })\r\n .catch(function(err) {\r\n console.log(err);\r\n });\r\n }\r\n\r\n removeUser() {\r\n this.mgr\r\n .removeUser()\r\n .then(() => {\r\n this.userLoadeded.next(null);\r\n console.log(\"user removed\");\r\n })\r\n .catch(function(err) {\r\n console.log(err);\r\n });\r\n }\r\n\r\n startProfileSigninMainWindow() {\r\n var queryParams:any = {};\r\n queryParams.p = \"exit\";\r\n queryParams.et = \"profile\";\r\n this.mgr\r\n .signinRedirect({ extraQueryParams: queryParams})\r\n .then(function() {\r\n console.log(\"signinRedirect done\");\r\n })\r\n .catch(function(err) {\r\n console.log(err);\r\n });\r\n }\r\n\r\n startSigninMainWindow() {\r\n this.mgr\r\n .signinRedirect({ data: \"some data\" })\r\n .then(function() {\r\n console.log(\"signinRedirect done\");\r\n })\r\n .catch(function(err) {\r\n console.log(err);\r\n });\r\n }\r\n\r\n endSigninMainWindow() {\r\n this.mgr\r\n .signinRedirectCallback()\r\n .then(function(user) {\r\n console.log(\"signed in\");\r\n })\r\n .catch(function(err) {\r\n console.log(err);\r\n });\r\n }\r\n\r\n signinRedirectCallbackHandler() {\r\n console.log(`signinRedirectCallbackHandler running`);\r\n\r\n return from(this.mgr.signinRedirectCallback()).pipe(map(\r\n user => {\r\n if (user) {\r\n this.isLoggedIn.next(true);\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n })\r\n );\r\n\r\n\r\n // this.mgr\r\n // .signinRedirectCallback()\r\n // .then(user => {\r\n // this.isLoggedIn.next(true);\r\n\r\n // // switch (user.profile.role) {\r\n // // case userRole.CAT_MANAGER:\r\n // // this._routingService.corporateDashboard();\r\n // // break;\r\n // // case userRole.HR_ADMIN:\r\n // // this._routingService.templatesDashboard();\r\n // // break;\r\n // // case userRole.SYS_ADMIN:\r\n // // this._routingService.rolesDashboard();\r\n // // break;\r\n // // case userRole.HR_MANAGER:\r\n // // this._routingService.dashboard();\r\n // // break;\r\n // // case userRole.HR_RECRUITER:\r\n // // this._routingService.dashboard();\r\n // // break;\r\n // // case userRole.CANDIDATE:\r\n // // this._routingService.candidateReviewOffer();\r\n // // break;\r\n // // case userRole.USER:\r\n // // this._routingService.transitionAssistAllTasks();\r\n // // break;\r\n // // case userRole.HR_OPERATIONS:\r\n // // this._routingService.opsDashboard(); // TODO this dashboard has not been developed yet\r\n // // break;\r\n // // default:\r\n // // window.location.href = \"/content/memberonboarding/spa/home.html\";\r\n // // }\r\n // })\r\n // .catch(err => {\r\n // this._routingService.home();\r\n // console.error(\"User error: \" + err);\r\n // });\r\n }\r\n\r\n startSignoutMainWindow() {\r\n this.mgr\r\n .signoutRedirect()\r\n .then(function(resp) {\r\n console.log(\"signed out\");\r\n })\r\n .catch(function(err) {\r\n console.log(err);\r\n });\r\n }\r\n\r\n endSignoutMainWindow() {\r\n this.mgr\r\n .signoutRedirectCallback()\r\n .then(function(resp) {\r\n console.log(\"signed out\");\r\n })\r\n .catch(function(err) {\r\n console.log(err);\r\n });\r\n }\r\n\r\n private _setAuthHeaders(user: any): void {\r\n this.authHeaders = new Headers();\r\n this.authHeaders.append(\r\n \"Authorization\",\r\n user.token_type + \" \" + user.access_token\r\n );\r\n if (this.authHeaders.get(\"Content-Type\")) {\r\n } else {\r\n this.authHeaders.append(\"Content-Type\", \"application/json\");\r\n }\r\n }\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\nimport { UserManager, User, UserManagerSettings } from \"oidc-client\";\r\nimport { Constants } from \"../constants/constants\";\r\nimport appsettings from \"../../assets/appsettings.json\"\r\nimport { HttpClient, HttpHeaders } from \"@angular/common/http\";\r\nimport { LoaderService } from \"./loader.service\";\r\nimport { LocalStorageService } from \"./local-storage.service\";\r\nimport { StoreService } from \"./storeService\";\r\nimport { AuthService } from 'src/app/services/auth.service';\r\n\r\nconst settings: UserManagerSettings = {\r\n authority: Constants.stsAuthority,\r\n client_id: Constants.clientId,\r\n redirect_uri: Constants.redirect_uri,\r\n post_logout_redirect_uri: Constants.post_logout_redirect_uri,\r\n response_type: \"id_token token\",\r\n scope: Constants.clientScope,\r\n silent_redirect_uri: Constants.silent_redirect_uri,\r\n automaticSilentRenew: true,\r\n accessTokenExpiringNotificationTime: 60,\r\n filterProtocolClaims: true,\r\n loadUserInfo: true,\r\n checkSessionInterval: 5000,\r\n monitorSession: true\r\n};\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class AuthenticationService {\r\n manager: UserManager = new UserManager(settings);\r\n user: any;\r\n\r\n constructor( \r\n private httpClient: HttpClient, \r\n private loader: LoaderService,\r\n private _localStorageService: LocalStorageService,\r\n private _storeService: StoreService,\r\n private authService: AuthService \r\n ) {\r\n\r\n this.manager.getUser().then(user => {\r\n console.log(\"USER: \",user)\r\n this.user = user;\r\n });\r\n this.manager.events.addUserLoaded(user => {\r\n console.log(`User loaded`)\r\n });\r\n this.manager.events.addAccessTokenExpiring(e => {\r\n console.log(\"Access token expiring.\" + e);\r\n });\r\n this.manager.events.addSilentRenewError(error => {\r\n console.log(\"Silent renew failed\")\r\n });\r\n this.manager.events.addUserSignedOut(() => {\r\n console.log(\"Signed out\")\r\n });\r\n //this.getToken();\r\n }\r\n\r\n // getToken(): string\r\n // {\r\n // if(this._localStorageService.get(\"rc-jwt\"))\r\n // {\r\n // return this._localStorageService.get(\"rc-jwt\")!;\r\n // }\r\n\r\n // this.loader.start();\r\n // const headers = new HttpHeaders().set(\r\n // \"Content-Type\",\r\n // \"application/x-www-form-urlencoded\"\r\n // );\r\n \r\n // const body = new URLSearchParams();\r\n\r\n // let user = \"Member\";\r\n \r\n // body.set(\"client_id\", \"urn:dev/af/afredcarpet\");\r\n // body.set(\"grant_type\", \"password\");\r\n\r\n // if(user == \"Member\")\r\n // {\r\n // body.set(\"username\", \"alexforbes\\\\ZwelinjaniDaniso\");\r\n // body.set(\"password\", \"Testing@1\");\r\n // }\r\n // if(user == \"HR\")\r\n // {\r\n // body.set(\"username\", \"alexforbes\\\\afrfprov3\");\r\n // body.set(\"password\", \"Password@01\");\r\n // }\r\n \r\n // body.set(\"scope\", \"email openid profile\");\r\n\r\n // const options = { headers: headers, responseType: \"json\" as const};\r\n \r\n // const url = `https://dev.secure.alexanderforbes.co.za/adfs/oauth2/token`;\r\n\r\n // this.httpClient.post(url, body, options).subscribe(\r\n // (resp: any) => {\r\n // this._localStorageService.set('rc-jwt', resp.access_token)\r\n // },\r\n // (err) => {\r\n // console.log(err);\r\n // }\r\n // );\r\n\r\n // this.loader.stop();\r\n // return this._localStorageService.get(\"rc-jwt\")!;\r\n // }\r\n\r\n getClaims(): Promise {\r\n return this.manager.getUser();\r\n }\r\n getUser(): User {\r\n return this.user;\r\n }\r\n getAuthorizationHeaderValue(): string {\r\n return `bearer ${this._storeService.getStoredData().id_token}`;\r\n }\r\n startAuthentication(): Promise {\r\n return this.manager.signinRedirect();\r\n }\r\n logout(isTimeout?: boolean) {\r\n try {\r\n\r\n this.user = this.authService.currentUser\r\n \r\n const accessTokenApiUrl = appsettings.accessTokenApiUrl;\r\n const signoutCallback = appsettings.signoutCallback;\r\n const idToken = this.user ? this.user.id_token : \"\";\r\n const profileRole = this.user.profile.role;\r\n const clientRoot = encodeURI(appsettings.clientRoot);\r\n const timeout = isTimeout ? \"Timeout\" : \"\";\r\n const state = profileRole + timeout;\r\n const redirectURL = `${accessTokenApiUrl}/connect/endsession?id_token_hint=${idToken}&post_logout_redirect_uri=${clientRoot}${signoutCallback}&state=${state}`;\r\n localStorage.clear();\r\n sessionStorage.clear();\r\n const cookies = document.cookie;\r\n if (cookies != null || cookies != undefined) {\r\n for (let i = 0; i < cookies.split(\";\").length; ++i) {\r\n const myCookie = cookies[i];\r\n if (myCookie != null || myCookie != undefined) {\r\n const pos = myCookie.indexOf(\"=\");\r\n const name = pos > -1 ? myCookie.substr(0, pos) : myCookie;\r\n document.cookie = name + \"=;expires=Thu, 01 Jan 1970 00:00:00 GMT\";\r\n }\r\n }\r\n }\r\n localStorage.setItem(\"return_login\", this.user.profile.return_page);\r\n window.location.href = redirectURL;\r\n\r\n } catch (error) {\r\n console.log(error);\r\n }\r\n }\r\n}\r\n","import { Observable, Subscription } from 'rxjs';\r\nimport appsettings from \"src/assets/appsettings.json\"\r\nimport { HttpClient, HttpHeaders } from '@angular/common/http';\r\nimport { Injectable, OnDestroy } from '@angular/core';\r\nimport { ErrorService } from './error.service';\r\nimport { CandidateModel, DocumentModel, userDocumentModel } from '../../../src/app/shared/models/candidate.model';\r\nimport { GetCandidateByIdModel } from './service_models/candidate-models/get-candidate-by-id.model';\r\nimport { CandidateMapper } from './model-mappers/candidate-mapper.service';\r\nimport { StoreService } from './storeService';\r\nimport { GetCandidateActivityByIdModel } from './service_models/candidate-models/get-candidate-activity.model';\r\nimport { PabeSelection } from '../shared/models/pabe-selection.model';\r\nimport { DecisionDetails } from '../components/onboarding/candidate/candidate-decision-details/models/decision-details.model';\r\n\r\n\r\n\r\nexport class SignedOffer {\r\n id: string;\r\n signedDocId: string;\r\n comment: string;\r\n}\r\n\r\n@Injectable()\r\nexport class CandidateService implements OnDestroy {\r\n\r\n private _subscriptions = new Array