{"version":3,"file":"src_app_pages_onboarding_financial-profile_financial-profile_module_ts.8ffad1258047d2ad.js","mappings":"giBAiCcA,2BAGEA,8BACFA,mCAbJA,kBAOC,YAEGA,qCAKFA,sCAJKA,iGCHV,IAAMC,EACX,MADI,MAAOA,UACHC,IAoBRC,YACUC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,GAERC,QATQC,aACAA,UACAA,UACAA,WACAA,UACAA,UACAA,mBACAA,aArBVA,kBAAe,kBAGfA,mBAAgC,GAChCA,mBAAgB,GAIhBA,6BAA0B,IAAIC,IAA6B,GAgB3D,CAEMC,WAAQ,qCACZC,EAAKC,cAAcC,KACjBF,EAAKZ,MAAMe,KAAKC,UAAS,yBAAC,UAAOD,GAC/B,MAAQE,eAAgBF,EAAKA,MACrBG,eAAgBH,EAAKA,KAC7BH,EAAKO,mBAAmBF,GACxBL,EAAKQ,oBAAoBF,GACzBN,EAAKS,qBAAqBN,EAAKO,cAC/BV,EAAKW,SAAWC,WAChB,MAAMC,EAAsBb,EAAKL,MAAMmB,OAAOC,MAC9Cf,EAAKC,cAAcC,KACjBW,EAAoBT,UAAWY,IAC7BhB,EAAKW,SAAWK,EAAMC,yBACtBjB,EAAKkB,uBAAyBF,EAAMG,oBAIxCnB,EAAKC,cAAcC,KACjBF,EAAKZ,MAAMgC,YAAYhB,UAAS,yBAAC,UAAOiB,GAEtC,GADArB,EAAKsB,YAAcD,EAAOE,QACtBvB,EAAKW,WAAaC,WACpBZ,EAAKT,IAAIiC,8BACPxB,EAAKsB,YACLtB,EAAKyB,UAAUC,SAAE,GAEV1B,EAAKW,WAAaC,cAAoC,CAC/DZ,EAAKT,IAAIoC,kCAAkC3B,EAAKsB,aAChD,MAAMM,QAAwB5B,EAAKX,GAAGwC,iBACpC7B,EAAKkB,wBAEPlB,EAAK8B,UAAYF,EACjB5B,EAAK+B,UAAYH,EAErB,GAAC,mDAf+B,KAiBlC5B,EAAKgC,wBAAwBC,WACrBjC,EAAKR,GAAG0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CAF7B,CAACiF,MAAkBC,SAFpBC,cAAsB5B,IACtB4B,eAGCH,CAA6B,KK7E1C,MAWMI,GAAU,CACdC,KACAL,GACAM,IACAC,IACAC,KAQK,IAAMC,GAAsB,MAA7B,MAAOA,EAAsBzF,kDAAtByF,EAAsB,sCAAtBA,IAAsBzF,wCAHpBoF,GATbC,KACAL,GACAM,IACAC,IACAC,cAQWC,CAAsB","names":["i0","ApStatementsComponent","AbstractOnboardingPageComponent","constructor","route","ps","cs","ees","fp","ds","formBuilder","store","super","this","BehaviorSubject","ngOnInit","_this","subscriptions","push","data","subscribe","transitions","contentDict","populatePageStates","populatePageContent","populateDocumnetType","documentType","fpStatus","OnboardingModuleStatuses","enrollmentExtended$","select","selectAllEnrollment","props","financialProfileStatusId","storedDashboardStateId","dashboardStateId","queryParams","params","pageStateID","stateId","updateFinancialProfileStateId","homeState","id","updateOnlyFinancialProfileStateId","storedDashboard","getPageStateById","nextState","skipState","documentBehaviorSubject","next","getDocumentByDocTypeId","documentTypeId","form","group","filesData","Validators","payload","getPayload","ngOnDestroy","destructSubscriptionArray","getPageStateByEventAndTransitions","EventTypes","backState","questionText","get","displayText","tooltipContent","PageContent","filter","documentTypeName","DocumentType","map","row","updateStatesAndContent","_this2","getPageTransitionsByStateId","toString","getContentDictByStateId","submit","localFiles","_this3","value","length","getValue","disabled","completeApAging","pageStateId","needToSaveInvoicePerMonth","needToSaveInvoiceTerm","needToUploadBankStatement","i","file","rawFile","Promise","allSettled","saveFinancialProfile","completeFiancialProfile","activateCustomerPortfolio","updateDashboardStateId","markAllAsTouched","skip","_this4","onDelete","docId","result","_this5","deleteDocumentById","onDownload","_this6","downloadEnrollmentDocument","handleOutput","outputValue","static","core","selectors","ctx","ArStatementsComponent","moduleStatus","fpStatusId$","selectFinancialProfileStatusId","fpStatusId","completeArAging","BalanceSheetsComponent","completeBalanceSheets","BankStatementsComponent","onSubmit","completeBankStatements","FinancialProfileGuard","canActivate","state","statusIds$","selectModuleStatuses","businessProfileStatusId","customerPortfolioStatusId","applicationReviewStatusId","unsubscribe","factory","DocumentTypeResolver","fps","resolve","loadDocumentType","InvoiceAmountResolver","loadInvoiceAmount","InvoiceTermResolver","loadInvoiceTerm","InvoiceAmountComponent","populateOptionStates","options","e","console","error","activateFinancialProfile","belowThresholdState","aboveThresholdState","selectedId","props$","selectInvoiceAmount","invoiceAmount","option","selected","clickedOption","invoicePerMonthId","dispatch","InvoiceAmountAction","clickEvent","isSuccess","CLientTier","routes","path","component","PageStateClientPersonalizedResolver","InvoiceTermComponent","router","log","selectInvoiceTerm","invoiceTerm","find","item","invoiceTermId","invoiceTermName","FinancialProfileActions","clientTier","buttonList","navigate","PlStatementsComponent","completePlStatements","SummaryComponent","selectAllFinancialProfile","buildDisplayPayload","fpStore","displayData","key","FinancialProfileRoutingModule","PageStateResolver","imports","RouterModule","modules","CommonModule","CommonSharedModule","KendoModule","OnboardingSharedModule","FinancialProfileModule"],"sourceRoot":"webpack:///","sources":["./src/app/pages/onboarding/financial-profile/ap-statements/ap-statements.component.html","./src/app/pages/onboarding/financial-profile/ap-statements/ap-statements.component.ts","./src/app/pages/onboarding/financial-profile/content-id.constants.ts","./src/app/pages/onboarding/financial-profile/ar-statements/ar-statements.component.html","./src/app/pages/onboarding/financial-profile/ar-statements/ar-statements.component.ts","./src/app/pages/onboarding/financial-profile/balance-sheets/balance-sheets.component.html","./src/app/pages/onboarding/financial-profile/balance-sheets/balance-sheets.component.ts","./src/app/pages/onboarding/financial-profile/bank-statements/bank-statements.component.html","./src/app/pages/onboarding/financial-profile/bank-statements/bank-statements.component.ts","./src/app/core/guards/onboarding/financial-profile.guard.ts","./src/app/core/resolvers/onboarding/financial-profile/document-type.resolver.ts","./src/app/core/resolvers/onboarding/financial-profile/invoice-amount.resolver.ts","./src/app/core/resolvers/onboarding/financial-profile/invoice-term.resolver.ts","./src/app/pages/onboarding/financial-profile/invoice-amount/invoice-amount.component.ts","./src/app/pages/onboarding/financial-profile/invoice-amount/invoice-amount.component.html","./src/app/core/enums/client-tier.enum.ts","./src/app/pages/onboarding/financial-profile/pl-statements/pl-statements.component.html","./src/app/pages/onboarding/financial-profile/summary/summary.component.html","./src/app/pages/onboarding/financial-profile/financial-profile-routing.module.ts","./src/app/pages/onboarding/financial-profile/invoice-term/invoice-term.component.ts","./src/app/pages/onboarding/financial-profile/invoice-term/invoice-term.component.html","./src/app/pages/onboarding/financial-profile/pl-statements/pl-statements.component.ts","./src/app/pages/onboarding/financial-profile/summary/summary.component.ts","./src/app/pages/onboarding/financial-profile/financial-profile.module.ts"],"sourcesContent":["
\r\n \r\n
\r\n
\r\n

{{ this.questionText }}

\r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n file is required\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 { Component, OnDestroy, OnInit } from '@angular/core';\r\nimport { FormBuilder, FormGroup, Validators } from '@angular/forms';\r\nimport { ActivatedRoute } from '@angular/router';\r\nimport { Store } from '@ngrx/store';\r\nimport { BehaviorSubject, Subscription } from 'rxjs';\r\nimport { AbstractOnboardingPageComponent } from 'src/app/core/abstracts/components/onboarding-page.abstract';\r\nimport { DocumentType } from 'src/app/core/enums/document-type.enum';\r\nimport { EventTypes } from 'src/app/core/enums/event.enum';\r\nimport { OnboardingModuleStatuses } from 'src/app/core/enums/onboarding-module-status.enum';\r\nimport { IPageContent } from 'src/app/core/interfaces/common/content/page-content.interface';\r\nimport { IDocumentType } from 'src/app/core/interfaces/common/document/document-type.interface';\r\nimport { IDocument } from 'src/app/core/interfaces/common/document/document.interface';\r\nimport { IFinancialProfile } from 'src/app/core/interfaces/onboarding/financial-profile/financial-profile.interface';\r\nimport { ITransition } from 'src/app/core/interfaces/onboarding/page-state/transition.interface';\r\nimport { PageContent } from 'src/app/core/models/common/page-content.model';\r\nimport { PageState } from 'src/app/core/models/page-state/page-state.model';\r\nimport { ContentService } from 'src/app/core/services/common/content.service';\r\nimport { DocumentService } from 'src/app/core/services/common/document.service';\r\nimport { EnrollmentExtendedService } from 'src/app/core/services/onboarding/enrollment-extended.service';\r\nimport { FinancialProfileService } from 'src/app/core/services/onboarding/finacial-profile.service';\r\nimport { PageStateService } from 'src/app/core/services/onboarding/page-state.service';\r\nimport { IAppState } from 'src/app/core/store/common/interfaces/app-state.interface';\r\nimport { selectAllEnrollment } from 'src/app/core/store/onboarding/reducers+selectors/enrollment.selector';\r\nimport { destructSubscriptionArray } from 'src/app/core/ui-helpers/functions/destruct-subscription-array';\r\nimport { ContentIDConstants } from '../content-id.constants';\r\n\r\n@Component({\r\n selector: 'app-ap-statements',\r\n templateUrl: './ap-statements.component.html',\r\n styleUrls: ['./ap-statements.component.scss'],\r\n})\r\nexport class ApStatementsComponent\r\n extends AbstractOnboardingPageComponent\r\n implements OnInit, OnDestroy\r\n{\r\n homeState: PageState;\r\n backState: PageState;\r\n skipState: PageState;\r\n nextState: PageState;\r\n questionText = 'Upload Document';\r\n tooltipContent: IPageContent;\r\n documentType: IDocumentType;\r\n subscriptions: Subscription[] = [];\r\n uploadSaveUrl = '';\r\n payload: IFinancialProfile;\r\n pageStateID: string;\r\n form: FormGroup;\r\n documentBehaviorSubject = new BehaviorSubject([]);\r\n\r\n fpStatus: OnboardingModuleStatuses;\r\n storedDashboardStateId: string;\r\n\r\n constructor(\r\n private route: ActivatedRoute,\r\n private ps: PageStateService,\r\n private cs: ContentService,\r\n private ees: EnrollmentExtendedService,\r\n private fp: FinancialProfileService,\r\n private ds: DocumentService,\r\n private formBuilder: FormBuilder,\r\n private store: Store\r\n ) {\r\n super();\r\n }\r\n\r\n async ngOnInit(): Promise {\r\n this.subscriptions.push(\r\n this.route.data.subscribe(async (data) => {\r\n const { transitions } = data['data'];\r\n const { contentDict } = data['data'];\r\n this.populatePageStates(transitions);\r\n this.populatePageContent(contentDict);\r\n this.populateDocumnetType(data['documentType']);\r\n this.fpStatus = OnboardingModuleStatuses.ACTIVE;\r\n const enrollmentExtended$ = this.store.select(selectAllEnrollment);\r\n this.subscriptions.push(\r\n enrollmentExtended$.subscribe((props) => {\r\n this.fpStatus = props.financialProfileStatusId;\r\n this.storedDashboardStateId = props.dashboardStateId;\r\n })\r\n );\r\n\r\n this.subscriptions.push(\r\n this.route.queryParams.subscribe(async (params) => {\r\n this.pageStateID = params['stateId'];\r\n if (this.fpStatus === OnboardingModuleStatuses.ACTIVE) {\r\n this.ees.updateFinancialProfileStateId(\r\n this.pageStateID,\r\n this.homeState.id\r\n );\r\n } else if (this.fpStatus === OnboardingModuleStatuses.COMPLETED) {\r\n this.ees.updateOnlyFinancialProfileStateId(this.pageStateID);\r\n const storedDashboard = await this.ps.getPageStateById(\r\n this.storedDashboardStateId\r\n );\r\n this.nextState = storedDashboard;\r\n this.skipState = storedDashboard;\r\n }\r\n })\r\n );\r\n this.documentBehaviorSubject.next(\r\n await this.fp.getDocumentByDocTypeId(this.documentType.documentTypeId)\r\n );\r\n })\r\n );\r\n\r\n this.form = this.formBuilder.group({\r\n filesData: [[], Validators.required],\r\n });\r\n\r\n this.payload = this.fp.getPayload();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n destructSubscriptionArray(this.subscriptions);\r\n }\r\n\r\n populatePageStates(transitions: ITransition[]): void {\r\n this.homeState = this.ps.getPageStateByEventAndTransitions(\r\n EventTypes.HOME,\r\n transitions\r\n );\r\n this.nextState = this.ps.getPageStateByEventAndTransitions(\r\n EventTypes.NEXT,\r\n transitions\r\n );\r\n this.backState = this.ps.getPageStateByEventAndTransitions(\r\n EventTypes.BACK,\r\n transitions\r\n );\r\n this.skipState = this.ps.getPageStateByEventAndTransitions(\r\n EventTypes.SKIP,\r\n transitions\r\n );\r\n }\r\n\r\n populatePageContent(contentDict: Map): void {\r\n this.questionText =\r\n contentDict.get(ContentIDConstants.question)?.displayText ??\r\n this.questionText;\r\n this.tooltipContent =\r\n contentDict.get(ContentIDConstants.tooltip) ?? new PageContent();\r\n }\r\n\r\n populateDocumnetType(documentType: IDocumentType[]) {\r\n documentType\r\n .filter(\r\n (documentType) => documentType.documentTypeName === DocumentType.APAging\r\n )\r\n .map((row) => (this.documentType = row));\r\n }\r\n\r\n private async updateStatesAndContent(stateId: string) {\r\n const transitions = await this.ps.getPageTransitionsByStateId(\r\n stateId.toString()\r\n );\r\n const contentDict = await this.cs.getContentDictByStateId(stateId);\r\n this.populatePageStates(transitions);\r\n this.populatePageContent(contentDict);\r\n }\r\n\r\n async submit() {\r\n const localFiles = this.form.get('filesData')?.value;\r\n\r\n if (\r\n localFiles.length === 0 &&\r\n this.documentBehaviorSubject.getValue().length === 0 &&\r\n this.skipState.disabled === true\r\n ) {\r\n return false;\r\n }\r\n\r\n if (\r\n localFiles.length === 0 &&\r\n (this.documentBehaviorSubject.getValue().length > 0 ||\r\n this.skipState.disabled === false)\r\n ) {\r\n await this.fp.completeApAging();\r\n return true;\r\n }\r\n\r\n if (localFiles.length > 0) {\r\n this.payload.documentTypeId = this.documentType.documentTypeId;\r\n this.payload.pageStateId = this.pageStateID;\r\n this.payload.needToSaveInvoicePerMonth = false;\r\n this.payload.needToSaveInvoiceTerm = false;\r\n this.payload.needToUploadBankStatement = false;\r\n\r\n for (let i = 0; i < localFiles.length; i++) {\r\n this.payload.file.push(localFiles[i].rawFile);\r\n }\r\n\r\n await Promise.allSettled([\r\n this.fp.saveFinancialProfile(this.payload),\r\n this.fp.completeApAging(),\r\n ]);\r\n\r\n if (this.fpStatus === OnboardingModuleStatuses.ACTIVE) {\r\n await Promise.allSettled([\r\n this.ees.completeFiancialProfile(),\r\n this.ees.activateCustomerPortfolio(),\r\n this.ees.updateDashboardStateId(this.nextState.id),\r\n ]);\r\n }\r\n return true;\r\n }\r\n // mark all controls as touched to trigger validation\r\n this.form.markAllAsTouched();\r\n return false;\r\n }\r\n\r\n async skip() {\r\n if (this.fpStatus === OnboardingModuleStatuses.ACTIVE) {\r\n await Promise.allSettled([\r\n this.fp.completeApAging(),\r\n this.ees.completeFiancialProfile(),\r\n this.ees.activateCustomerPortfolio(),\r\n this.ees.updateDashboardStateId(this.nextState.id),\r\n ]);\r\n } else {\r\n await Promise.allSettled([\r\n this.fp.completeApAging(),\r\n this.ees.updateOnlyFinancialProfileStateId(this.pageStateID),\r\n ]);\r\n }\r\n return true;\r\n }\r\n\r\n async onDelete(docId: number) {\r\n const result = this.ds.deleteDocumentById(docId);\r\n this.documentBehaviorSubject.next(\r\n await this.fp.getDocumentByDocTypeId(this.documentType.documentTypeId)\r\n );\r\n return result;\r\n }\r\n\r\n async onDownload(docId: number): Promise {\r\n return this.ds.downloadEnrollmentDocument(docId);\r\n }\r\n\r\n async handleOutput(outputValue: string) {}\r\n}\r\n","export const ContentIDConstants = {\r\n question: 0,\r\n tooltip: 1,\r\n};\r\n","
\r\n \r\n
\r\n
\r\n

{{ this.questionText }}

\r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n file is required\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 { Component, OnDestroy, OnInit } from '@angular/core';\r\nimport { FormBuilder, FormGroup, Validators } from '@angular/forms';\r\nimport { ActivatedRoute } from '@angular/router';\r\nimport { Store } from '@ngrx/store';\r\nimport { BehaviorSubject, Subscription } from 'rxjs';\r\nimport { AbstractOnboardingPageComponent } from 'src/app/core/abstracts/components/onboarding-page.abstract';\r\nimport { DocumentType } from 'src/app/core/enums/document-type.enum';\r\nimport { EventTypes } from 'src/app/core/enums/event.enum';\r\nimport { OnboardingModuleStatuses } from 'src/app/core/enums/onboarding-module-status.enum';\r\nimport { IPageContent } from 'src/app/core/interfaces/common/content/page-content.interface';\r\nimport { IDocumentType } from 'src/app/core/interfaces/common/document/document-type.interface';\r\nimport { IDocument } from 'src/app/core/interfaces/common/document/document.interface';\r\nimport { IFinancialProfile } from 'src/app/core/interfaces/onboarding/financial-profile/financial-profile.interface';\r\nimport { ITransition } from 'src/app/core/interfaces/onboarding/page-state/transition.interface';\r\nimport { PageContent } from 'src/app/core/models/common/page-content.model';\r\nimport { PageState } from 'src/app/core/models/page-state/page-state.model';\r\nimport { ContentService } from 'src/app/core/services/common/content.service';\r\nimport { DocumentService } from 'src/app/core/services/common/document.service';\r\nimport { EnrollmentExtendedService } from 'src/app/core/services/onboarding/enrollment-extended.service';\r\nimport { FinancialProfileService } from 'src/app/core/services/onboarding/finacial-profile.service';\r\nimport { IAppState } from 'src/app/core/store/common/interfaces/app-state.interface';\r\nimport { selectFinancialProfileStatusId } from 'src/app/core/store/onboarding/reducers+selectors/enrollment.selector';\r\nimport { destructSubscriptionArray } from 'src/app/core/ui-helpers/functions/destruct-subscription-array';\r\nimport { PageStateService } from '../../../../core/services/onboarding/page-state.service';\r\nimport { ContentIDConstants } from '../content-id.constants';\r\n\r\n@Component({\r\n selector: 'app-ar-statements',\r\n templateUrl: './ar-statements.component.html',\r\n styleUrls: ['./ar-statements.component.scss'],\r\n})\r\nexport class ArStatementsComponent\r\n extends AbstractOnboardingPageComponent\r\n implements OnInit, OnDestroy\r\n{\r\n homeState: PageState;\r\n backState: PageState;\r\n skipState: PageState;\r\n nextState: PageState;\r\n questionText = 'Upload Document';\r\n tooltipContent: IPageContent;\r\n documentType: IDocumentType;\r\n subscriptions: Subscription[] = [];\r\n uploadSaveUrl = '';\r\n payload: IFinancialProfile;\r\n pageStateID: string;\r\n form: FormGroup;\r\n documentBehaviorSubject = new BehaviorSubject([]);\r\n\r\n constructor(\r\n private route: ActivatedRoute,\r\n private ps: PageStateService,\r\n private cs: ContentService,\r\n private ees: EnrollmentExtendedService,\r\n private fp: FinancialProfileService,\r\n private ds: DocumentService,\r\n private formBuilder: FormBuilder,\r\n private store: Store\r\n ) {\r\n super();\r\n }\r\n\r\n ngOnInit(): void {\r\n this.subscriptions.push(\r\n this.route.data.subscribe(async (data) => {\r\n const { transitions } = data['data'];\r\n const { contentDict } = data['data'];\r\n this.populatePageStates(transitions);\r\n this.populatePageContent(contentDict);\r\n this.populateDocumnetType(data['documentType']);\r\n let moduleStatus = OnboardingModuleStatuses.ACTIVE;\r\n const fpStatusId$ = this.store.select(selectFinancialProfileStatusId);\r\n this.subscriptions.push(\r\n fpStatusId$.subscribe((fpStatusId) => {\r\n moduleStatus = fpStatusId;\r\n })\r\n );\r\n\r\n this.subscriptions.push(\r\n this.route.queryParams.subscribe((params) => {\r\n this.pageStateID = params['stateId'];\r\n if (moduleStatus === OnboardingModuleStatuses.ACTIVE) {\r\n this.ees.updateFinancialProfileStateId(\r\n this.pageStateID,\r\n this.homeState.id\r\n );\r\n } else {\r\n this.ees.updateOnlyFinancialProfileStateId(this.pageStateID);\r\n }\r\n })\r\n );\r\n this.documentBehaviorSubject.next(\r\n await this.fp.getDocumentByDocTypeId(this.documentType.documentTypeId)\r\n );\r\n })\r\n );\r\n\r\n this.form = this.formBuilder.group({\r\n filesData: [[], Validators.required],\r\n });\r\n\r\n this.payload = this.fp.getPayload();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n destructSubscriptionArray(this.subscriptions);\r\n }\r\n\r\n populatePageStates(transitions: ITransition[]): void {\r\n this.homeState = this.ps.getPageStateByEventAndTransitions(\r\n EventTypes.HOME,\r\n transitions\r\n );\r\n this.nextState = this.ps.getPageStateByEventAndTransitions(\r\n EventTypes.NEXT,\r\n transitions\r\n );\r\n this.backState = this.ps.getPageStateByEventAndTransitions(\r\n EventTypes.BACK,\r\n transitions\r\n );\r\n this.skipState = this.ps.getPageStateByEventAndTransitions(\r\n EventTypes.SKIP,\r\n transitions\r\n );\r\n }\r\n\r\n populatePageContent(contentDict: Map): void {\r\n this.questionText =\r\n contentDict.get(ContentIDConstants.question)?.displayText ??\r\n this.questionText;\r\n this.tooltipContent =\r\n contentDict.get(ContentIDConstants.tooltip) ?? new PageContent();\r\n }\r\n\r\n populateDocumnetType(documentType: IDocumentType[]) {\r\n documentType\r\n .filter(\r\n (documentType) => documentType.documentTypeName === DocumentType.ARAging\r\n )\r\n .map((row) => (this.documentType = row));\r\n }\r\n\r\n private async updateStatesAndContent(stateId: string) {\r\n const transitions = await this.ps.getPageTransitionsByStateId(\r\n stateId.toString()\r\n );\r\n const contentDict = await this.cs.getContentDictByStateId(stateId);\r\n this.populatePageStates(transitions);\r\n this.populatePageContent(contentDict);\r\n }\r\n\r\n async onDelete(docId: number) {\r\n const result = this.ds.deleteDocumentById(docId);\r\n this.documentBehaviorSubject.next(\r\n await this.fp.getDocumentByDocTypeId(this.documentType.documentTypeId)\r\n );\r\n return result;\r\n }\r\n\r\n async onDownload(docId: number): Promise {\r\n return this.ds.downloadEnrollmentDocument(docId);\r\n }\r\n\r\n async submit() {\r\n const localFiles = this.form.get('filesData')?.value;\r\n\r\n if (\r\n localFiles.length === 0 &&\r\n this.documentBehaviorSubject.getValue().length === 0 &&\r\n this.skipState.disabled === true\r\n ) {\r\n return false;\r\n }\r\n\r\n if (\r\n localFiles.length === 0 &&\r\n (this.documentBehaviorSubject.getValue().length > 0 ||\r\n this.skipState.disabled === false)\r\n ) {\r\n await this.fp.completeArAging();\r\n return true;\r\n }\r\n\r\n if (localFiles.length > 0) {\r\n this.payload.documentTypeId = this.documentType.documentTypeId;\r\n this.payload.pageStateId = this.pageStateID;\r\n this.payload.needToSaveInvoicePerMonth = false;\r\n this.payload.needToSaveInvoiceTerm = false;\r\n this.payload.needToUploadBankStatement = false;\r\n\r\n for (let i = 0; i < localFiles.length; i++) {\r\n this.payload.file.push(localFiles[i].rawFile);\r\n }\r\n\r\n await Promise.allSettled([\r\n this.fp.saveFinancialProfile(this.payload),\r\n this.fp.completeArAging(),\r\n ]);\r\n return true;\r\n }\r\n // mark all controls as touched to trigger validation\r\n this.form.markAllAsTouched();\r\n return false;\r\n }\r\n\r\n async skip() {\r\n await this.fp.completeArAging();\r\n return true;\r\n }\r\n}\r\n","
\r\n \r\n
\r\n
\r\n

{{ this.questionText }}

\r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n file is required\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 { Component, OnDestroy, OnInit } from '@angular/core';\r\nimport { FormBuilder, FormGroup, Validators } from '@angular/forms';\r\nimport { ActivatedRoute } from '@angular/router';\r\nimport { Store } from '@ngrx/store';\r\nimport { BehaviorSubject, Subscription } from 'rxjs';\r\nimport { AbstractOnboardingPageComponent } from 'src/app/core/abstracts/components/onboarding-page.abstract';\r\nimport { DocumentType } from 'src/app/core/enums/document-type.enum';\r\nimport { EventTypes } from 'src/app/core/enums/event.enum';\r\nimport { OnboardingModuleStatuses } from 'src/app/core/enums/onboarding-module-status.enum';\r\nimport { IPageContent } from 'src/app/core/interfaces/common/content/page-content.interface';\r\nimport { IDocumentType } from 'src/app/core/interfaces/common/document/document-type.interface';\r\nimport { IDocument } from 'src/app/core/interfaces/common/document/document.interface';\r\nimport { IFinancialProfile } from 'src/app/core/interfaces/onboarding/financial-profile/financial-profile.interface';\r\nimport { ITransition } from 'src/app/core/interfaces/onboarding/page-state/transition.interface';\r\nimport { PageContent } from 'src/app/core/models/common/page-content.model';\r\nimport { PageState } from 'src/app/core/models/page-state/page-state.model';\r\nimport { ContentService } from 'src/app/core/services/common/content.service';\r\nimport { DocumentService } from 'src/app/core/services/common/document.service';\r\nimport { EnrollmentExtendedService } from 'src/app/core/services/onboarding/enrollment-extended.service';\r\nimport { FinancialProfileService } from 'src/app/core/services/onboarding/finacial-profile.service';\r\nimport { PageStateService } from 'src/app/core/services/onboarding/page-state.service';\r\nimport { IAppState } from 'src/app/core/store/common/interfaces/app-state.interface';\r\nimport { selectFinancialProfileStatusId } from 'src/app/core/store/onboarding/reducers+selectors/enrollment.selector';\r\nimport { destructSubscriptionArray } from 'src/app/core/ui-helpers/functions/destruct-subscription-array';\r\nimport { ContentIDConstants } from '../content-id.constants';\r\n\r\n@Component({\r\n selector: 'app-balance-sheets',\r\n templateUrl: './balance-sheets.component.html',\r\n styleUrls: ['./balance-sheets.component.scss'],\r\n})\r\nexport class BalanceSheetsComponent\r\n extends AbstractOnboardingPageComponent\r\n implements OnInit, OnDestroy\r\n{\r\n homeState: PageState;\r\n backState: PageState;\r\n skipState: PageState;\r\n nextState: PageState;\r\n questionText = 'Upload Document';\r\n tooltipContent: IPageContent;\r\n documentType: IDocumentType;\r\n subscriptions: Subscription[] = [];\r\n uploadSaveUrl = '';\r\n payload: IFinancialProfile;\r\n pageStateID: string;\r\n form: FormGroup;\r\n documentBehaviorSubject = new BehaviorSubject([]);\r\n\r\n constructor(\r\n private route: ActivatedRoute,\r\n private ps: PageStateService,\r\n private cs: ContentService,\r\n private ees: EnrollmentExtendedService,\r\n private store: Store,\r\n private formBuilder: FormBuilder,\r\n private fp: FinancialProfileService,\r\n private ds: DocumentService\r\n ) {\r\n super();\r\n }\r\n\r\n ngOnInit(): void {\r\n this.subscriptions.push(\r\n this.route.data.subscribe(async (data) => {\r\n const { transitions } = data['data'];\r\n const { contentDict } = data['data'];\r\n this.populatePageStates(transitions);\r\n this.populatePageContent(contentDict);\r\n this.populateDocumnetType(data['documentType']);\r\n let moduleStatus = OnboardingModuleStatuses.ACTIVE;\r\n const fpStatusId$ = this.store.select(selectFinancialProfileStatusId);\r\n this.subscriptions.push(\r\n fpStatusId$.subscribe((fpStatusId) => {\r\n moduleStatus = fpStatusId;\r\n })\r\n );\r\n\r\n this.subscriptions.push(\r\n this.route.queryParams.subscribe((params) => {\r\n this.pageStateID = params['stateId'];\r\n if (moduleStatus === OnboardingModuleStatuses.ACTIVE) {\r\n this.ees.updateFinancialProfileStateId(\r\n this.pageStateID,\r\n this.homeState.id\r\n );\r\n } else {\r\n this.ees.updateOnlyFinancialProfileStateId(this.pageStateID);\r\n }\r\n })\r\n );\r\n this.documentBehaviorSubject.next(\r\n await this.fp.getDocumentByDocTypeId(this.documentType.documentTypeId)\r\n );\r\n })\r\n );\r\n\r\n this.form = this.formBuilder.group({\r\n filesData: [[], Validators.required],\r\n });\r\n this.payload = this.fp.getPayload();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n destructSubscriptionArray(this.subscriptions);\r\n }\r\n\r\n populatePageStates(transitions: ITransition[]): void {\r\n this.homeState = this.ps.getPageStateByEventAndTransitions(\r\n EventTypes.HOME,\r\n transitions\r\n );\r\n this.nextState = this.ps.getPageStateByEventAndTransitions(\r\n EventTypes.NEXT,\r\n transitions\r\n );\r\n this.backState = this.ps.getPageStateByEventAndTransitions(\r\n EventTypes.BACK,\r\n transitions\r\n );\r\n this.skipState = this.ps.getPageStateByEventAndTransitions(\r\n EventTypes.SKIP,\r\n transitions\r\n );\r\n }\r\n\r\n populatePageContent(contentDict: Map): void {\r\n this.questionText =\r\n contentDict.get(ContentIDConstants.question)?.displayText ??\r\n this.questionText;\r\n this.tooltipContent =\r\n contentDict.get(ContentIDConstants.tooltip) ?? new PageContent();\r\n }\r\n\r\n populateDocumnetType(documentType: IDocumentType[]) {\r\n documentType\r\n .filter(\r\n (documentType) =>\r\n documentType.documentTypeName === DocumentType.BalanceStatement\r\n )\r\n .map((row) => (this.documentType = row));\r\n }\r\n\r\n private async updateStatesAndContent(stateId: string) {\r\n const transitions = await this.ps.getPageTransitionsByStateId(\r\n stateId.toString()\r\n );\r\n const contentDict = await this.cs.getContentDictByStateId(stateId);\r\n this.populatePageStates(transitions);\r\n this.populatePageContent(contentDict);\r\n }\r\n\r\n async onDelete(docId: number) {\r\n const result = this.ds.deleteDocumentById(docId);\r\n this.documentBehaviorSubject.next(\r\n await this.fp.getDocumentByDocTypeId(this.documentType.documentTypeId)\r\n );\r\n return result;\r\n }\r\n\r\n async onDownload(docId: number): Promise {\r\n return this.ds.downloadEnrollmentDocument(docId);\r\n }\r\n\r\n async submit() {\r\n const localFiles = this.form.get('filesData')?.value;\r\n\r\n if (\r\n localFiles.length === 0 &&\r\n this.documentBehaviorSubject.getValue().length === 0 &&\r\n this.skipState.disabled === true\r\n ) {\r\n return false;\r\n }\r\n\r\n if (\r\n localFiles.length === 0 &&\r\n (this.documentBehaviorSubject.getValue().length > 0 ||\r\n this.skipState.disabled === false)\r\n ) {\r\n await this.fp.completeBalanceSheets();\r\n return true;\r\n }\r\n\r\n if (localFiles.length > 0) {\r\n this.payload.documentTypeId = this.documentType.documentTypeId;\r\n this.payload.pageStateId = this.pageStateID;\r\n this.payload.needToSaveInvoicePerMonth = false;\r\n this.payload.needToSaveInvoiceTerm = false;\r\n this.payload.needToUploadBankStatement = false;\r\n\r\n for (let i = 0; i < localFiles.length; i++) {\r\n this.payload.file.push(localFiles[i].rawFile);\r\n }\r\n\r\n await Promise.allSettled([\r\n this.fp.saveFinancialProfile(this.payload),\r\n this.fp.completeBalanceSheets(),\r\n ]);\r\n return true;\r\n }\r\n // mark all controls as touched to trigger validation\r\n this.form.markAllAsTouched();\r\n return false;\r\n }\r\n\r\n async skip() {\r\n await this.fp.completeBalanceSheets();\r\n return true;\r\n }\r\n}\r\n","
\r\n \r\n
\r\n
\r\n

{{ this.questionText }}

\r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n Last 6 months statements are required\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 { Component, OnDestroy, OnInit } from '@angular/core';\r\nimport { FormBuilder, FormGroup, Validators } from '@angular/forms';\r\nimport { ActivatedRoute } from '@angular/router';\r\nimport { Store } from '@ngrx/store';\r\nimport { BehaviorSubject, Subscription } from 'rxjs';\r\nimport { AbstractOnboardingPageComponent } from 'src/app/core/abstracts/components/onboarding-page.abstract';\r\nimport { DocumentType } from 'src/app/core/enums/document-type.enum';\r\nimport { EventTypes } from 'src/app/core/enums/event.enum';\r\nimport { OnboardingModuleStatuses } from 'src/app/core/enums/onboarding-module-status.enum';\r\nimport { IPageContent } from 'src/app/core/interfaces/common/content/page-content.interface';\r\nimport { IDocumentType } from 'src/app/core/interfaces/common/document/document-type.interface';\r\nimport { IDocument } from 'src/app/core/interfaces/common/document/document.interface';\r\nimport { IFinancialProfile } from 'src/app/core/interfaces/onboarding/financial-profile/financial-profile.interface';\r\nimport { ITransition } from 'src/app/core/interfaces/onboarding/page-state/transition.interface';\r\nimport { PageContent } from 'src/app/core/models/common/page-content.model';\r\nimport { PageState } from 'src/app/core/models/page-state/page-state.model';\r\nimport { ContentService } from 'src/app/core/services/common/content.service';\r\nimport { DocumentService } from 'src/app/core/services/common/document.service';\r\nimport { EnrollmentExtendedService } from 'src/app/core/services/onboarding/enrollment-extended.service';\r\nimport { FinancialProfileService } from 'src/app/core/services/onboarding/finacial-profile.service';\r\nimport { PageStateService } from 'src/app/core/services/onboarding/page-state.service';\r\nimport { IAppState } from 'src/app/core/store/common/interfaces/app-state.interface';\r\nimport { selectFinancialProfileStatusId } from 'src/app/core/store/onboarding/reducers+selectors/enrollment.selector';\r\nimport { destructSubscriptionArray } from 'src/app/core/ui-helpers/functions/destruct-subscription-array';\r\nimport { ContentIDConstants } from '../content-id.constants';\r\n\r\n@Component({\r\n selector: 'app-bank-statements',\r\n templateUrl: './bank-statements.component.html',\r\n styleUrls: ['./bank-statements.component.scss'],\r\n})\r\nexport class BankStatementsComponent\r\n extends AbstractOnboardingPageComponent\r\n implements OnInit, OnDestroy\r\n{\r\n homeState: PageState;\r\n backState: PageState;\r\n skipState: PageState;\r\n nextState: PageState;\r\n questionText = 'Upload Document';\r\n tooltipContent: IPageContent;\r\n documentType: IDocumentType;\r\n subscriptions: Subscription[] = [];\r\n uploadSaveUrl = '';\r\n payload: IFinancialProfile;\r\n pageStateID: string;\r\n form: FormGroup;\r\n documentBehaviorSubject = new BehaviorSubject([]);\r\n\r\n constructor(\r\n private route: ActivatedRoute,\r\n private ps: PageStateService,\r\n private cs: ContentService,\r\n private ees: EnrollmentExtendedService,\r\n private fp: FinancialProfileService,\r\n private ds: DocumentService,\r\n private formBuilder: FormBuilder,\r\n private store: Store\r\n ) {\r\n super();\r\n }\r\n\r\n ngOnInit(): void {\r\n this.subscriptions.push(\r\n this.route.data.subscribe(async (data) => {\r\n const { transitions } = data['data'];\r\n const { contentDict } = data['data'];\r\n this.populatePageStates(transitions);\r\n this.populatePageContent(contentDict);\r\n this.populateDocumnetType(data['documentType']);\r\n let moduleStatus = OnboardingModuleStatuses.ACTIVE;\r\n const fpStatusId$ = this.store.select(selectFinancialProfileStatusId);\r\n this.subscriptions.push(\r\n fpStatusId$.subscribe((fpStatusId) => {\r\n moduleStatus = fpStatusId;\r\n })\r\n );\r\n\r\n this.subscriptions.push(\r\n this.route.queryParams.subscribe((params) => {\r\n this.pageStateID = params['stateId'];\r\n if (moduleStatus === OnboardingModuleStatuses.ACTIVE) {\r\n this.ees.updateFinancialProfileStateId(\r\n this.pageStateID,\r\n this.homeState.id\r\n );\r\n } else {\r\n this.ees.updateOnlyFinancialProfileStateId(this.pageStateID);\r\n }\r\n })\r\n );\r\n this.documentBehaviorSubject.next(\r\n await this.fp.getDocumentByDocTypeId(this.documentType.documentTypeId)\r\n );\r\n })\r\n );\r\n\r\n this.form = this.formBuilder.group({\r\n filesData: [[], Validators.required],\r\n });\r\n\r\n this.payload = this.fp.getPayload();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n destructSubscriptionArray(this.subscriptions);\r\n }\r\n\r\n populatePageStates(transitions: ITransition[]): void {\r\n this.homeState = this.ps.getPageStateByEventAndTransitions(\r\n EventTypes.HOME,\r\n transitions\r\n );\r\n this.nextState = this.ps.getPageStateByEventAndTransitions(\r\n EventTypes.NEXT,\r\n transitions\r\n );\r\n this.backState = this.ps.getPageStateByEventAndTransitions(\r\n EventTypes.BACK,\r\n transitions\r\n );\r\n this.skipState = this.ps.getPageStateByEventAndTransitions(\r\n EventTypes.SKIP,\r\n transitions\r\n );\r\n }\r\n\r\n populatePageContent(contentDict: Map): void {\r\n this.questionText =\r\n contentDict.get(ContentIDConstants.question)?.displayText ??\r\n this.questionText;\r\n this.tooltipContent =\r\n contentDict.get(ContentIDConstants.tooltip) ?? new PageContent();\r\n }\r\n\r\n populateDocumnetType(documentType: IDocumentType[]) {\r\n documentType\r\n .filter(\r\n (documentType) =>\r\n documentType.documentTypeName === DocumentType.BankStatement\r\n )\r\n .map((row) => (this.documentType = row));\r\n }\r\n\r\n async onSubmit() {\r\n const localFiles = this.form.get('filesData')?.value;\r\n\r\n if (\r\n localFiles.length === 0 &&\r\n this.documentBehaviorSubject.getValue().length === 0 &&\r\n this.skipState.disabled === true\r\n ) {\r\n return false;\r\n }\r\n\r\n if (\r\n localFiles.length === 0 &&\r\n (this.documentBehaviorSubject.getValue().length > 0 ||\r\n this.skipState.disabled === false)\r\n ) {\r\n await this.fp.completeBankStatements();\r\n return true;\r\n }\r\n\r\n if (localFiles.length > 0) {\r\n this.payload.documentTypeId = this.documentType.documentTypeId;\r\n this.payload.pageStateId = this.pageStateID;\r\n this.payload.needToSaveInvoicePerMonth = false;\r\n this.payload.needToSaveInvoiceTerm = false;\r\n this.payload.needToUploadBankStatement = true;\r\n\r\n for (let i = 0; i < localFiles.length; i += 1) {\r\n this.payload.file.push(localFiles[i].rawFile);\r\n }\r\n\r\n await Promise.allSettled([\r\n this.fp.saveFinancialProfile(this.payload),\r\n this.fp.completeBankStatements(),\r\n ]);\r\n return true;\r\n }\r\n // mark all controls as touched to trigger validation\r\n this.form.markAllAsTouched();\r\n return false;\r\n }\r\n\r\n async onDelete(docId: number) {\r\n const result = this.ds.deleteDocumentById(docId);\r\n this.documentBehaviorSubject.next(\r\n await this.fp.getDocumentByDocTypeId(this.documentType.documentTypeId)\r\n );\r\n return result;\r\n }\r\n\r\n async onDownload(docId: number): Promise {\r\n return this.ds.downloadEnrollmentDocument(docId);\r\n }\r\n\r\n async skip() {\r\n await this.fp.completeBankStatements();\r\n return true;\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport {\r\n ActivatedRouteSnapshot,\r\n CanActivate,\r\n RouterStateSnapshot,\r\n UrlTree,\r\n} from '@angular/router';\r\nimport { Store } from '@ngrx/store';\r\nimport { OnboardingModuleStatuses } from '../../enums/onboarding-module-status.enum';\r\nimport { EnrollmentExtendedService } from '../../services/onboarding/enrollment-extended.service';\r\nimport { IAppState } from '../../store/common/interfaces/app-state.interface';\r\nimport { selectModuleStatuses } from '../../store/onboarding/reducers+selectors/enrollment.selector';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class FinancialProfileGuard implements CanActivate {\r\n constructor(\r\n private ees: EnrollmentExtendedService,\r\n private store: Store\r\n ) {}\r\n\r\n async canActivate(\r\n route: ActivatedRouteSnapshot,\r\n state: RouterStateSnapshot\r\n ): Promise {\r\n const statusIds$ = this.store.select(selectModuleStatuses);\r\n let businessProfileStatusId = 0;\r\n let financialProfileStatusId = 0;\r\n let customerPortfolioStatusId = 0;\r\n let applicationReviewStatusId = 0;\r\n const subscription = statusIds$.subscribe(async (props) => {\r\n businessProfileStatusId = props.businessProfileStatusId;\r\n financialProfileStatusId = props.financialProfileStatusId;\r\n customerPortfolioStatusId = props.customerPortfolioStatusId;\r\n applicationReviewStatusId = props.applicationReviewStatusId;\r\n });\r\n subscription.unsubscribe();\r\n if (\r\n businessProfileStatusId === OnboardingModuleStatuses.COMPLETED &&\r\n financialProfileStatusId === OnboardingModuleStatuses.COMPLETED &&\r\n customerPortfolioStatusId === OnboardingModuleStatuses.COMPLETED &&\r\n applicationReviewStatusId === OnboardingModuleStatuses.COMPLETED\r\n ) {\r\n return false;\r\n }\r\n\r\n return true;\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport {\r\n ActivatedRouteSnapshot,\r\n Resolve,\r\n RouterStateSnapshot,\r\n} from '@angular/router';\r\nimport { FinancialProfileService } from 'src/app/core/services/onboarding/finacial-profile.service';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class DocumentTypeResolver implements Resolve {\r\n constructor(private fps: FinancialProfileService) {}\r\n resolve(\r\n route: ActivatedRouteSnapshot,\r\n state: RouterStateSnapshot\r\n ): Promise {\r\n return this.fps.loadDocumentType();\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport {\r\n ActivatedRouteSnapshot,\r\n Resolve,\r\n RouterStateSnapshot,\r\n} from '@angular/router';\r\nimport { FinancialProfileService } from 'src/app/core/services/onboarding/finacial-profile.service';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class InvoiceAmountResolver implements Resolve {\r\n constructor(private fps: FinancialProfileService) {}\r\n resolve(\r\n route: ActivatedRouteSnapshot,\r\n state: RouterStateSnapshot\r\n ): Promise {\r\n return this.fps.loadInvoiceAmount();\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport {\r\n ActivatedRouteSnapshot,\r\n Resolve,\r\n RouterStateSnapshot,\r\n} from '@angular/router';\r\nimport { FinancialProfileService } from 'src/app/core/services/onboarding/finacial-profile.service';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class InvoiceTermResolver implements Resolve {\r\n constructor(private fps: FinancialProfileService) {}\r\n resolve(\r\n route: ActivatedRouteSnapshot,\r\n state: RouterStateSnapshot\r\n ): Promise {\r\n return this.fps.loadInvoiceTerm();\r\n }\r\n}\r\n","import { Component, OnDestroy, OnInit, ViewChild } from '@angular/core';\r\nimport { ActivatedRoute } from '@angular/router';\r\nimport { Store } from '@ngrx/store';\r\nimport { Subscription } from 'rxjs';\r\nimport { AbstractOnboardingPageComponent } from 'src/app/core/abstracts/components/onboarding-page.abstract';\r\nimport { EventTypes } from 'src/app/core/enums/event.enum';\r\nimport { OnboardingModuleStatuses } from 'src/app/core/enums/onboarding-module-status.enum';\r\nimport { IOptions } from 'src/app/core/interfaces/common/common/options.interface';\r\nimport { IPageContent } from 'src/app/core/interfaces/common/content/page-content.interface';\r\nimport { IFinancialProfile } from 'src/app/core/interfaces/onboarding/financial-profile/financial-profile.interface';\r\nimport { IStatefulOptions } from 'src/app/core/interfaces/onboarding/page-state/stateful-options.interface';\r\nimport { ITransition } from 'src/app/core/interfaces/onboarding/page-state/transition.interface';\r\nimport { PageContent } from 'src/app/core/models/common/page-content.model';\r\nimport { PageState } from 'src/app/core/models/page-state/page-state.model';\r\nimport { EnrollmentExtendedService } from 'src/app/core/services/onboarding/enrollment-extended.service';\r\nimport { FinancialProfileService } from 'src/app/core/services/onboarding/finacial-profile.service';\r\nimport { PageStateService } from 'src/app/core/services/onboarding/page-state.service';\r\nimport { IAppState } from 'src/app/core/store/common/interfaces/app-state.interface';\r\nimport { InvoiceAmountAction } from 'src/app/core/store/onboarding/actions/financial-profile.actions';\r\nimport { selectFinancialProfileStatusId } from 'src/app/core/store/onboarding/reducers+selectors/enrollment.selector';\r\nimport { selectInvoiceAmount } from 'src/app/core/store/onboarding/reducers+selectors/financial-profile.selector';\r\nimport { destructSubscriptionArray } from 'src/app/core/ui-helpers/functions/destruct-subscription-array';\r\nimport { StatefulAnswerButtonListComponent } from 'src/app/shared/onboarding/stateful-answer-button-list/stateful-answer-button-list.component';\r\nimport { ContentIDConstants } from '../content-id.constants';\r\n\r\n@Component({\r\n selector: 'app-invoice-amount',\r\n templateUrl: './invoice-amount.component.html',\r\n styleUrls: ['./invoice-amount.component.scss'],\r\n})\r\nexport class InvoiceAmountComponent\r\n extends AbstractOnboardingPageComponent\r\n implements OnInit, OnDestroy\r\n{\r\n @ViewChild('buttonList', { static: false })\r\n buttonList: StatefulAnswerButtonListComponent;\r\n belowThresholdState: PageState;\r\n aboveThresholdState: PageState;\r\n homeState: PageState;\r\n backState: PageState;\r\n skipState: PageState;\r\n questionText = 'How much do you invoice per month?';\r\n tooltipContent: IPageContent;\r\n options: IStatefulOptions[];\r\n payload: IFinancialProfile;\r\n subscriptions: Subscription[] = [];\r\n pageStateId: string;\r\n\r\n constructor(\r\n private route: ActivatedRoute,\r\n private ps: PageStateService,\r\n private fp: FinancialProfileService,\r\n private ees: EnrollmentExtendedService,\r\n private store: Store\r\n ) {\r\n super();\r\n }\r\n\r\n ngOnInit(): void {\r\n this.subscriptions.push(\r\n this.route.data.subscribe((data) => {\r\n const { transitions } = data['data'];\r\n const { contentDict } = data['data'];\r\n this.populatePageStates(transitions);\r\n this.populatePageContent(contentDict);\r\n try {\r\n this.populateOptionStates(data['options']);\r\n } catch (e) {\r\n console.error('options not returning properly');\r\n console.error('exception message', e);\r\n }\r\n let moduleStatus = OnboardingModuleStatuses.ACTIVE;\r\n const fpStatusId$ = this.store.select(selectFinancialProfileStatusId);\r\n this.subscriptions.push(\r\n fpStatusId$.subscribe((fpStatusId) => {\r\n moduleStatus = fpStatusId;\r\n })\r\n );\r\n\r\n this.subscriptions.push(\r\n this.route.queryParams.subscribe((params) => {\r\n this.pageStateId = params['stateId'];\r\n if (moduleStatus === OnboardingModuleStatuses.INACTIVE) {\r\n this.ees.activateFinancialProfile();\r\n }\r\n if (moduleStatus === OnboardingModuleStatuses.ACTIVE) {\r\n this.ees.updateFinancialProfileStateId(\r\n this.pageStateId,\r\n this.homeState.id\r\n );\r\n } else {\r\n this.ees.updateOnlyFinancialProfileStateId(this.pageStateId);\r\n }\r\n })\r\n );\r\n })\r\n );\r\n this.payload = this.fp.getPayload();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n destructSubscriptionArray(this.subscriptions);\r\n }\r\n\r\n populatePageStates(transitions: ITransition[]) {\r\n this.belowThresholdState = this.ps.getPageStateByEventAndTransitions(\r\n EventTypes.MONTHLY_BELOW_THRESHOLD,\r\n transitions\r\n );\r\n this.aboveThresholdState = this.ps.getPageStateByEventAndTransitions(\r\n EventTypes.MONTHLY_ABOVE_THRESHOLD,\r\n transitions\r\n );\r\n this.homeState = this.ps.getPageStateByEventAndTransitions(\r\n EventTypes.HOME,\r\n transitions\r\n );\r\n this.backState = this.ps.getPageStateByEventAndTransitions(\r\n EventTypes.BACK,\r\n transitions\r\n );\r\n this.skipState = this.ps.getPageStateByEventAndTransitions(\r\n EventTypes.SKIP,\r\n transitions\r\n );\r\n }\r\n\r\n populatePageContent(contentDict: Map) {\r\n this.questionText =\r\n contentDict.get(ContentIDConstants.question)?.displayText ??\r\n this.questionText;\r\n this.tooltipContent =\r\n contentDict.get(ContentIDConstants.tooltip) ?? new PageContent();\r\n }\r\n\r\n populateOptionStates(options: IOptions[]) {\r\n let selectedId = -10;\r\n const props$ = this.store.select(selectInvoiceAmount);\r\n this.subscriptions.push(\r\n props$.subscribe((props) => {\r\n selectedId = props.invoiceAmount.id as number;\r\n })\r\n );\r\n // We will need to do threshold filtering\r\n this.options = options.map((option) => ({\r\n ...option,\r\n state: this.belowThresholdState,\r\n selected: option.id === selectedId,\r\n }));\r\n }\r\n\r\n async handleOutput(outputValue: number) {\r\n const clickedOption: IStatefulOptions = this.options[outputValue];\r\n this.payload.invoicePerMonthId = clickedOption.id;\r\n this.payload.pageStateId = this.pageStateId;\r\n this.payload.needToSaveInvoicePerMonth = true;\r\n this.payload.needToSaveInvoiceTerm = false;\r\n this.payload.needToUploadBankStatement = false;\r\n await this.fp.saveFinancialProfile(this.payload);\r\n this.store.dispatch(\r\n InvoiceAmountAction({\r\n invoiceAmount: { id: clickedOption.id, value: clickedOption.value },\r\n })\r\n );\r\n }\r\n\r\n async clickEvent() {\r\n const data = await this.fp.saveFinancialProfile(this.payload);\r\n return data.isSuccess;\r\n }\r\n}\r\n","
\r\n \r\n
\r\n
\r\n

{{this.questionText}}

\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","// eslint-disable-next-line no-shadow\r\nexport enum CLientTier {\r\n OriginTier = 1,\r\n BasicTier = 2,\r\n}\r\n","
\r\n \r\n
\r\n
\r\n

{{ this.questionText }}

\r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n file is required\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

{{this.headerText}}

\r\n
\r\n \r\n
\r\n
\r\n {{ item.key }}:\r\n
\r\n {{ item.value }}\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 { FinancialProfileGuard } from 'src/app/core/guards/onboarding/financial-profile.guard';\r\nimport { DocumentTypeResolver } from 'src/app/core/resolvers/onboarding/financial-profile/document-type.resolver';\r\nimport { InvoiceAmountResolver } from 'src/app/core/resolvers/onboarding/financial-profile/invoice-amount.resolver';\r\nimport { InvoiceTermResolver } from 'src/app/core/resolvers/onboarding/financial-profile/invoice-term.resolver';\r\nimport { PageStateClientPersonalizedResolver } from 'src/app/core/resolvers/onboarding/navigation/page-state-client-personalized.resolver';\r\nimport { PageStateResolver } from 'src/app/core/resolvers/onboarding/navigation/page-state.resolver';\r\nimport { ApStatementsComponent } from './ap-statements/ap-statements.component';\r\nimport { ArStatementsComponent } from './ar-statements/ar-statements.component';\r\nimport { BalanceSheetsComponent } from './balance-sheets/balance-sheets.component';\r\nimport { BankStatementsComponent } from './bank-statements/bank-statements.component';\r\nimport { InvoiceAmountComponent } from './invoice-amount/invoice-amount.component';\r\nimport { InvoiceTermComponent } from './invoice-term/invoice-term.component';\r\nimport { PlStatementsComponent } from './pl-statements/pl-statements.component';\r\nimport { SummaryComponent } from './summary/summary.component';\r\n\r\nconst routes: Routes = [\r\n {\r\n path: 'invoice-amount',\r\n component: InvoiceAmountComponent,\r\n resolve: {\r\n data: PageStateClientPersonalizedResolver,\r\n options: InvoiceAmountResolver,\r\n },\r\n canActivate: [FinancialProfileGuard],\r\n },\r\n {\r\n path: 'invoice-term',\r\n component: InvoiceTermComponent,\r\n resolve: {\r\n data: PageStateClientPersonalizedResolver,\r\n options: InvoiceTermResolver,\r\n },\r\n canActivate: [FinancialProfileGuard],\r\n },\r\n {\r\n path: 'files',\r\n component: BalanceSheetsComponent,\r\n resolve: {\r\n data: PageStateClientPersonalizedResolver,\r\n documentType: DocumentTypeResolver,\r\n },\r\n canActivate: [FinancialProfileGuard],\r\n },\r\n {\r\n path: 'bank-statements',\r\n component: BankStatementsComponent,\r\n resolve: {\r\n data: PageStateClientPersonalizedResolver,\r\n documentType: DocumentTypeResolver,\r\n },\r\n canActivate: [FinancialProfileGuard],\r\n },\r\n {\r\n path: 'pl-statements',\r\n component: PlStatementsComponent,\r\n resolve: {\r\n data: PageStateClientPersonalizedResolver,\r\n documentType: DocumentTypeResolver,\r\n },\r\n canActivate: [FinancialProfileGuard],\r\n },\r\n {\r\n path: 'ar-statements',\r\n component: ArStatementsComponent,\r\n resolve: {\r\n data: PageStateClientPersonalizedResolver,\r\n documentType: DocumentTypeResolver,\r\n },\r\n canActivate: [FinancialProfileGuard],\r\n },\r\n {\r\n path: 'ap-statements',\r\n component: ApStatementsComponent,\r\n resolve: {\r\n data: PageStateClientPersonalizedResolver,\r\n documentType: DocumentTypeResolver,\r\n },\r\n canActivate: [FinancialProfileGuard],\r\n },\r\n {\r\n path: 'summary',\r\n component: SummaryComponent,\r\n resolve: { data: PageStateClientPersonalizedResolver },\r\n },\r\n];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule],\r\n providers: [PageStateResolver],\r\n})\r\nexport class FinancialProfileRoutingModule {}\r\n","import { Component, OnDestroy, OnInit, ViewChild } from '@angular/core';\r\nimport { ActivatedRoute, Router } from '@angular/router';\r\nimport { Store } from '@ngrx/store';\r\nimport { Subscription } from 'rxjs';\r\nimport { AbstractOnboardingPageComponent } from 'src/app/core/abstracts/components/onboarding-page.abstract';\r\nimport { CLientTier } from 'src/app/core/enums/client-tier.enum';\r\nimport { EventTypes } from 'src/app/core/enums/event.enum';\r\nimport { OnboardingModuleStatuses } from 'src/app/core/enums/onboarding-module-status.enum';\r\nimport { IOptions } from 'src/app/core/interfaces/common/common/options.interface';\r\nimport { IPageContent } from 'src/app/core/interfaces/common/content/page-content.interface';\r\nimport { IFinancialProfile } from 'src/app/core/interfaces/onboarding/financial-profile/financial-profile.interface';\r\nimport { IStatefulOptions } from 'src/app/core/interfaces/onboarding/page-state/stateful-options.interface';\r\nimport { ITransition } from 'src/app/core/interfaces/onboarding/page-state/transition.interface';\r\nimport { PageContent } from 'src/app/core/models/common/page-content.model';\r\nimport { PageState } from 'src/app/core/models/page-state/page-state.model';\r\nimport { EnrollmentExtendedService } from 'src/app/core/services/onboarding/enrollment-extended.service';\r\nimport { FinancialProfileService } from 'src/app/core/services/onboarding/finacial-profile.service';\r\nimport { PageStateService } from 'src/app/core/services/onboarding/page-state.service';\r\nimport { IAppState } from 'src/app/core/store/common/interfaces/app-state.interface';\r\nimport * as FinancialProfileActions from 'src/app/core/store/onboarding/actions/financial-profile.actions';\r\nimport { selectAllEnrollment } from 'src/app/core/store/onboarding/reducers+selectors/enrollment.selector';\r\nimport { selectInvoiceTerm } from 'src/app/core/store/onboarding/reducers+selectors/financial-profile.selector';\r\nimport { destructSubscriptionArray } from 'src/app/core/ui-helpers/functions/destruct-subscription-array';\r\nimport { StatefulAnswerButtonListComponent } from 'src/app/shared/onboarding/stateful-answer-button-list/stateful-answer-button-list.component';\r\nimport { ContentIDConstants } from '../content-id.constants';\r\n\r\n@Component({\r\n selector: 'app-invoice-term',\r\n templateUrl: './invoice-term.component.html',\r\n styleUrls: ['./invoice-term.component.scss'],\r\n})\r\nexport class InvoiceTermComponent\r\n extends AbstractOnboardingPageComponent\r\n implements OnInit, OnDestroy\r\n{\r\n @ViewChild('buttonList', { static: false })\r\n buttonList: StatefulAnswerButtonListComponent;\r\n belowThresholdState: PageState;\r\n aboveThresholdState: PageState;\r\n homeState: PageState;\r\n backState: PageState;\r\n skipState: PageState;\r\n questionText = 'What is your typical invoice term?';\r\n tooltipContent: IPageContent;\r\n options: IStatefulOptions[];\r\n payload: IFinancialProfile;\r\n subscriptions: Subscription[] = [];\r\n pageStateId: string;\r\n\r\n fpStatus: OnboardingModuleStatuses;\r\n storedDashboardStateId: string;\r\n\r\n constructor(\r\n private route: ActivatedRoute,\r\n private ps: PageStateService,\r\n private fp: FinancialProfileService,\r\n private ees: EnrollmentExtendedService,\r\n private store: Store,\r\n public router: Router\r\n ) {\r\n super();\r\n }\r\n\r\n ngOnInit(): void {\r\n this.subscriptions.push(\r\n this.route.data.subscribe((data) => {\r\n const { transitions } = data['data'];\r\n const { contentDict } = data['data'];\r\n this.populatePageStates(transitions);\r\n this.populatePageContent(contentDict);\r\n this.populateOptionStates(data['options']);\r\n this.fpStatus = OnboardingModuleStatuses.ACTIVE;\r\n const enrollmentExtended$ = this.store.select(selectAllEnrollment);\r\n this.subscriptions.push(\r\n enrollmentExtended$.subscribe((props) => {\r\n this.fpStatus = props.financialProfileStatusId;\r\n this.storedDashboardStateId = props.dashboardStateId;\r\n })\r\n );\r\n\r\n this.subscriptions.push(\r\n this.route.queryParams.subscribe(async (params) => {\r\n this.pageStateId = params['stateId'];\r\n if (this.fpStatus === OnboardingModuleStatuses.ACTIVE) {\r\n console.log('fp active');\r\n this.ees.updateFinancialProfileStateId(\r\n this.pageStateId,\r\n this.homeState.id\r\n );\r\n } else if (this.fpStatus === OnboardingModuleStatuses.COMPLETED) {\r\n console.log('fp completed');\r\n const storedDashboard = await this.ps.getPageStateById(\r\n this.storedDashboardStateId\r\n );\r\n this.ees.updateOnlyFinancialProfileStateId(this.pageStateId);\r\n this.aboveThresholdState = storedDashboard;\r\n }\r\n })\r\n );\r\n })\r\n );\r\n this.payload = this.fp.getPayload();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n destructSubscriptionArray(this.subscriptions);\r\n }\r\n\r\n populatePageStates(transitions: ITransition[]) {\r\n this.belowThresholdState = this.ps.getPageStateByEventAndTransitions(\r\n EventTypes.TERM_BELOW_THRESHOLD,\r\n transitions\r\n );\r\n this.aboveThresholdState = this.ps.getPageStateByEventAndTransitions(\r\n EventTypes.TERM_ABOVE_THRESHOLD,\r\n transitions\r\n );\r\n this.homeState = this.ps.getPageStateByEventAndTransitions(\r\n EventTypes.HOME,\r\n transitions\r\n );\r\n this.backState = this.ps.getPageStateByEventAndTransitions(\r\n EventTypes.BACK,\r\n transitions\r\n );\r\n this.skipState = this.ps.getPageStateByEventAndTransitions(\r\n EventTypes.SKIP,\r\n transitions\r\n );\r\n }\r\n\r\n populatePageContent(contentDict: Map) {\r\n this.questionText =\r\n contentDict.get(ContentIDConstants.question)?.displayText ??\r\n this.questionText;\r\n this.tooltipContent =\r\n contentDict.get(ContentIDConstants.tooltip) ?? new PageContent();\r\n }\r\n\r\n populateOptionStates(options: IOptions[]) {\r\n let selectedId = -10;\r\n const props$ = this.store.select(selectInvoiceTerm);\r\n this.subscriptions.push(\r\n props$.subscribe((props) => {\r\n selectedId = props.invoiceTerm.id as number;\r\n })\r\n );\r\n // We will need to do threshold filtering\r\n this.options = options.map((option) => ({\r\n ...option,\r\n state: this.belowThresholdState,\r\n selected: option.id === selectedId,\r\n }));\r\n }\r\n\r\n async handleOutput(outputValue: number) {\r\n const clickedOption: IStatefulOptions | undefined = this.options.find(\r\n (item, i) => i === outputValue\r\n );\r\n if (clickedOption) {\r\n this.payload.invoiceTermId = clickedOption.id;\r\n this.payload.invoiceTermName = clickedOption.value;\r\n this.payload.pageStateId = this.pageStateId;\r\n this.payload.needToSaveInvoicePerMonth = false;\r\n this.payload.needToSaveInvoiceTerm = true;\r\n this.payload.needToUploadBankStatement = false;\r\n } else {\r\n this.payload.invoiceTermId = -1;\r\n this.payload.invoiceTermName = '';\r\n this.payload.pageStateId = '-1';\r\n }\r\n await this.submit();\r\n }\r\n\r\n async submit() {\r\n this.store.dispatch(\r\n FinancialProfileActions.InvoiceTermAction({\r\n invoiceTerm: {\r\n id: this.payload.invoiceTermId,\r\n value: this.payload.invoiceTermName,\r\n },\r\n })\r\n );\r\n const data = await this.fp.saveFinancialProfile(this.payload);\r\n if (!data.isSuccess) return false;\r\n\r\n // redirect based on the client tier\r\n if (data.clientTier === (CLientTier.BasicTier as number)) {\r\n if (this.fpStatus === OnboardingModuleStatuses.ACTIVE) {\r\n await Promise.allSettled([\r\n this.ees.completeFiancialProfile(),\r\n this.ees.activateCustomerPortfolio(),\r\n this.ees.updateDashboardStateId(this.aboveThresholdState.id),\r\n ]);\r\n }\r\n await this.buttonList.navigate(this.aboveThresholdState);\r\n return true;\r\n }\r\n if (this.fpStatus === OnboardingModuleStatuses.ACTIVE) {\r\n await Promise.allSettled([\r\n this.ees.updateDashboardStateId(this.belowThresholdState.id),\r\n ]);\r\n }\r\n await this.buttonList.navigate(this.belowThresholdState);\r\n return true;\r\n }\r\n}\r\n","
\r\n \r\n
\r\n
\r\n

{{this.questionText}}

\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 { Component, OnDestroy, OnInit } from '@angular/core';\r\nimport { FormBuilder, FormGroup, Validators } from '@angular/forms';\r\nimport { ActivatedRoute } from '@angular/router';\r\nimport { Store } from '@ngrx/store';\r\nimport { BehaviorSubject, Subscription } from 'rxjs';\r\nimport { AbstractOnboardingPageComponent } from 'src/app/core/abstracts/components/onboarding-page.abstract';\r\nimport { DocumentType } from 'src/app/core/enums/document-type.enum';\r\nimport { EventTypes } from 'src/app/core/enums/event.enum';\r\nimport { OnboardingModuleStatuses } from 'src/app/core/enums/onboarding-module-status.enum';\r\nimport { IPageContent } from 'src/app/core/interfaces/common/content/page-content.interface';\r\nimport { IDocumentType } from 'src/app/core/interfaces/common/document/document-type.interface';\r\nimport { IDocument } from 'src/app/core/interfaces/common/document/document.interface';\r\nimport { IFinancialProfile } from 'src/app/core/interfaces/onboarding/financial-profile/financial-profile.interface';\r\nimport { ITransition } from 'src/app/core/interfaces/onboarding/page-state/transition.interface';\r\nimport { PageContent } from 'src/app/core/models/common/page-content.model';\r\nimport { PageState } from 'src/app/core/models/page-state/page-state.model';\r\nimport { ContentService } from 'src/app/core/services/common/content.service';\r\nimport { DocumentService } from 'src/app/core/services/common/document.service';\r\nimport { EnrollmentExtendedService } from 'src/app/core/services/onboarding/enrollment-extended.service';\r\nimport { FinancialProfileService } from 'src/app/core/services/onboarding/finacial-profile.service';\r\nimport { PageStateService } from 'src/app/core/services/onboarding/page-state.service';\r\nimport { IAppState } from 'src/app/core/store/common/interfaces/app-state.interface';\r\nimport { selectFinancialProfileStatusId } from 'src/app/core/store/onboarding/reducers+selectors/enrollment.selector';\r\nimport { destructSubscriptionArray } from 'src/app/core/ui-helpers/functions/destruct-subscription-array';\r\nimport { ContentIDConstants } from '../content-id.constants';\r\n\r\n@Component({\r\n selector: 'app-pl-statements',\r\n templateUrl: './pl-statements.component.html',\r\n styleUrls: ['./pl-statements.component.scss'],\r\n})\r\nexport class PlStatementsComponent\r\n extends AbstractOnboardingPageComponent\r\n implements OnInit, OnDestroy\r\n{\r\n homeState: PageState;\r\n backState: PageState;\r\n skipState: PageState;\r\n nextState: PageState;\r\n questionText = 'Upload Document';\r\n tooltipContent: IPageContent;\r\n documentType: IDocumentType;\r\n subscriptions: Subscription[] = [];\r\n uploadSaveUrl = '';\r\n payload: IFinancialProfile;\r\n pageStateID: string;\r\n form: FormGroup;\r\n documentBehaviorSubject = new BehaviorSubject([]);\r\n\r\n constructor(\r\n private route: ActivatedRoute,\r\n private ps: PageStateService,\r\n private cs: ContentService,\r\n private ees: EnrollmentExtendedService,\r\n private fp: FinancialProfileService,\r\n private ds: DocumentService,\r\n private formBuilder: FormBuilder,\r\n private store: Store\r\n ) {\r\n super();\r\n }\r\n\r\n ngOnInit(): void {\r\n this.subscriptions.push(\r\n this.route.data.subscribe(async (data) => {\r\n const { transitions } = data['data'];\r\n const { contentDict } = data['data'];\r\n this.populatePageStates(transitions);\r\n this.populatePageContent(contentDict);\r\n this.populateDocumnetType(data['documentType']);\r\n let moduleStatus = OnboardingModuleStatuses.ACTIVE;\r\n const fpStatusId$ = this.store.select(selectFinancialProfileStatusId);\r\n this.subscriptions.push(\r\n fpStatusId$.subscribe((fpStatusId) => {\r\n moduleStatus = fpStatusId;\r\n })\r\n );\r\n\r\n this.subscriptions.push(\r\n this.route.queryParams.subscribe((params) => {\r\n this.pageStateID = params['stateId'];\r\n if (moduleStatus === OnboardingModuleStatuses.ACTIVE) {\r\n this.ees.updateFinancialProfileStateId(\r\n this.pageStateID,\r\n this.homeState.id\r\n );\r\n } else {\r\n this.ees.updateOnlyFinancialProfileStateId(this.pageStateID);\r\n }\r\n })\r\n );\r\n this.documentBehaviorSubject.next(\r\n await this.fp.getDocumentByDocTypeId(this.documentType.documentTypeId)\r\n );\r\n })\r\n );\r\n\r\n this.form = this.formBuilder.group({\r\n filesData: [[], Validators.required],\r\n });\r\n\r\n this.payload = this.fp.getPayload();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n destructSubscriptionArray(this.subscriptions);\r\n }\r\n\r\n populatePageStates(transitions: ITransition[]): void {\r\n this.homeState = this.ps.getPageStateByEventAndTransitions(\r\n EventTypes.HOME,\r\n transitions\r\n );\r\n this.nextState = this.ps.getPageStateByEventAndTransitions(\r\n EventTypes.NEXT,\r\n transitions\r\n );\r\n this.backState = this.ps.getPageStateByEventAndTransitions(\r\n EventTypes.BACK,\r\n transitions\r\n );\r\n this.skipState = this.ps.getPageStateByEventAndTransitions(\r\n EventTypes.SKIP,\r\n transitions\r\n );\r\n }\r\n\r\n populatePageContent(contentDict: Map): void {\r\n this.questionText =\r\n contentDict.get(ContentIDConstants.question)?.displayText ??\r\n this.questionText;\r\n this.tooltipContent =\r\n contentDict.get(ContentIDConstants.tooltip) ?? new PageContent();\r\n }\r\n\r\n populateDocumnetType(documentType: IDocumentType[]) {\r\n documentType\r\n .filter(\r\n (documentType) =>\r\n documentType.documentTypeName === DocumentType.PLStatement\r\n )\r\n .map((row) => (this.documentType = row));\r\n }\r\n\r\n private async updateStatesAndContent(stateId: string) {\r\n const transitions = await this.ps.getPageTransitionsByStateId(\r\n stateId.toString()\r\n );\r\n const contentDict = await this.cs.getContentDictByStateId(stateId);\r\n this.populatePageStates(transitions);\r\n this.populatePageContent(contentDict);\r\n }\r\n\r\n async onDelete(docId: number) {\r\n const result = this.ds.deleteDocumentById(docId);\r\n this.documentBehaviorSubject.next(\r\n await this.fp.getDocumentByDocTypeId(this.documentType.documentTypeId)\r\n );\r\n return result;\r\n }\r\n\r\n async onDownload(docId: number): Promise {\r\n return this.ds.downloadEnrollmentDocument(docId);\r\n }\r\n\r\n async submit() {\r\n const localFiles = this.form.get('filesData')?.value;\r\n\r\n if (\r\n localFiles.length === 0 &&\r\n this.documentBehaviorSubject.getValue().length === 0 &&\r\n this.skipState.disabled === true\r\n ) {\r\n return false;\r\n }\r\n\r\n if (\r\n localFiles.length === 0 &&\r\n (this.documentBehaviorSubject.getValue().length > 0 ||\r\n this.skipState.disabled === false)\r\n ) {\r\n await this.fp.completePlStatements();\r\n return true;\r\n }\r\n\r\n if (localFiles.length > 0) {\r\n this.payload.documentTypeId = this.documentType.documentTypeId;\r\n this.payload.pageStateId = this.pageStateID;\r\n this.payload.needToSaveInvoicePerMonth = false;\r\n this.payload.needToSaveInvoiceTerm = false;\r\n this.payload.needToUploadBankStatement = false;\r\n\r\n for (let i = 0; i < localFiles.length; i += 1) {\r\n this.payload.file.push(localFiles[i].rawFile);\r\n }\r\n\r\n await Promise.allSettled([\r\n this.fp.saveFinancialProfile(this.payload),\r\n this.fp.completePlStatements(),\r\n ]);\r\n return true;\r\n }\r\n // mark all controls as touched to trigger validation\r\n this.form.markAllAsTouched();\r\n return false;\r\n }\r\n\r\n async skip() {\r\n await this.fp.completePlStatements();\r\n return true;\r\n }\r\n}\r\n","import { Component, OnDestroy, OnInit } from '@angular/core';\r\nimport { ActivatedRoute } from '@angular/router';\r\nimport { Store } from '@ngrx/store';\r\nimport { Subscription } from 'rxjs';\r\nimport { AbstractOnboardingPageComponent } from 'src/app/core/abstracts/components/onboarding-page.abstract';\r\nimport { IPageContent } from 'src/app/core/interfaces/common/content/page-content.interface';\r\nimport { ITransition } from 'src/app/core/interfaces/onboarding/page-state/transition.interface';\r\nimport { FinancialProfileService } from 'src/app/core/services/onboarding/finacial-profile.service';\r\nimport { IAppState } from 'src/app/core/store/common/interfaces/app-state.interface';\r\nimport { IFinancialProfileStore } from 'src/app/core/store/onboarding/interfaces/financial-profile-store.interface';\r\nimport { selectAllFinancialProfile } from 'src/app/core/store/onboarding/reducers+selectors/financial-profile.selector';\r\nimport { destructSubscriptionArray } from 'src/app/core/ui-helpers/functions/destruct-subscription-array';\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\r\n extends AbstractOnboardingPageComponent\r\n implements OnInit, OnDestroy\r\n{\r\n displayData: { key: string; value: string }[] = [];\r\n subscriptions: Subscription[] = [];\r\n headerText = 'Financial Profile Summary';\r\n\r\n constructor(\r\n private route: ActivatedRoute,\r\n private fps: FinancialProfileService,\r\n private store: Store\r\n ) {\r\n super();\r\n }\r\n\r\n async ngOnInit(): Promise {\r\n this.subscriptions.push(\r\n this.route.data.subscribe(async (data) => {\r\n const { transitions } = data['data'];\r\n const { contentDict } = data['data'];\r\n this.populatePageStates(transitions);\r\n this.populatePageContent(contentDict);\r\n const props$ = this.store.select(selectAllFinancialProfile);\r\n const sub = props$.subscribe(async (props) => {\r\n await this.buildDisplayPayload(props);\r\n });\r\n sub.unsubscribe();\r\n })\r\n );\r\n }\r\n\r\n ngOnDestroy(): void {\r\n destructSubscriptionArray(this.subscriptions);\r\n }\r\n\r\n async buildDisplayPayload(fpStore: IFinancialProfileStore) {\r\n const invoiceAmount = fpStore.invoiceAmount.value;\r\n const invoiceTerm = fpStore.invoiceTerm.value;\r\n\r\n this.displayData = [\r\n {\r\n key: 'Monthly Invoice Amount',\r\n value: invoiceAmount,\r\n },\r\n {\r\n key: 'Typical Invoice Term',\r\n value: invoiceTerm,\r\n },\r\n ];\r\n }\r\n\r\n populatePageStates(transitions: ITransition[]): void {}\r\n populatePageContent(contentDict: Map): void {}\r\n}\r\n","import { CommonModule } from '@angular/common';\r\nimport { NgModule } from '@angular/core';\r\n\r\nimport { CommonSharedModule } from 'src/app/shared/common/common-shared.module';\r\nimport { KendoModule } from 'src/app/shared/kendo/kendo.module';\r\nimport { OnboardingSharedModule } from 'src/app/shared/onboarding/onboarding-shared.module';\r\nimport { ApStatementsComponent } from './ap-statements/ap-statements.component';\r\nimport { ArStatementsComponent } from './ar-statements/ar-statements.component';\r\nimport { BalanceSheetsComponent } from './balance-sheets/balance-sheets.component';\r\nimport { BankStatementsComponent } from './bank-statements/bank-statements.component';\r\nimport { FinancialProfileRoutingModule } from './financial-profile-routing.module';\r\nimport { InvoiceAmountComponent } from './invoice-amount/invoice-amount.component';\r\nimport { InvoiceTermComponent } from './invoice-term/invoice-term.component';\r\nimport { PlStatementsComponent } from './pl-statements/pl-statements.component';\r\nimport { SummaryComponent } from './summary/summary.component';\r\n\r\nconst components = [\r\n InvoiceAmountComponent,\r\n InvoiceTermComponent,\r\n BalanceSheetsComponent,\r\n BankStatementsComponent,\r\n PlStatementsComponent,\r\n ArStatementsComponent,\r\n ApStatementsComponent,\r\n SummaryComponent,\r\n];\r\n\r\nconst modules = [\r\n CommonModule,\r\n FinancialProfileRoutingModule,\r\n CommonSharedModule,\r\n KendoModule,\r\n OnboardingSharedModule,\r\n];\r\n\r\n@NgModule({\r\n declarations: [...components],\r\n imports: [...modules],\r\n exports: [...components, ...modules],\r\n})\r\nexport class FinancialProfileModule {}\r\n"],"x_google_ignoreList":[]}