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L,gBAAgB,iBAAkB,CAC5C9H,GAAIxG,KAAK8F,OAAOU,GAChB+H,SAAUvO,KAAK8F,OAAOkE,eACtBoF,gBAAiB,EACjBV,aAAc1O,KAAK8F,OAAO4I,aAC1BC,UAAW3O,KAAK8F,OAAO6I,WAG7B,EAEM,YAAAU,oBAAN,W,0EACErP,KAAKmD,MAAMY,SAAW,G,WAGxB,sBACI,oCAAqB,C,IADzB,WASE,IAAIvC,GAAS,EAed,OAbIxB,KAAKmD,MAAMgB,qBACTnE,KAAK4G,OAAO0I,uBAAyBtP,KAAK4G,OAAO2I,wBAClD/N,GAAUxB,KAAK4G,OAAO4I,yBAKtBxP,KAAKmD,MAAMgB,qBACVnE,KAAK4G,OAAO0I,uBAAyBtP,KAAK4G,OAAO2I,wBAClD/N,GAAUxB,KAAK4G,OAAO6I,yBAIpBjO,CAER,E,gCA1BA,IAAC,IAAAkO,cAAa,4BAA6B,+BAA+B,+BAAgC,iCAAkC,iCAAkC,mC,6FAxyB9J,IADjB,IAAAvN,c,uBAuEqB,mB,OAAA,IAAHC,GAAAA,GAAG,SACE,mBADF,OACE,IAAJ,EAAAuN,MAAA,EAAAA,MAAI,SACO,mBADP,OACO,IAAT,YAAS,SACuC,mBADvC,OACuC,IAA3B,EAAAC,6BAAA,EAAAA,6BAA2B,SACxB,mBADwB,OACxB,IAAjB,UAAiB,SACX,mBADW,OACX,IAAd,YAAc,SACD,mBADC,OACD,IAAT,EAAAC,WAAA,EAAAA,WAAS,SACD,mBADC,OACD,IAAf,EAAAC,iBAAA,EAAAA,iBAAe,SACS,mBADT,OACS,IAAb,EAAAC,eAAA,EAAAA,eAAa,SACjB,mBADiB,OACjB,IAAN,EAAAC,QAAA,EAAAA,QAAM,YA/EZC,E,CAAb,E","sources":["webpack://iadviser/./src/routes/app-adviser/client/wizard/steps/quote/general-details/general-details.html","webpack://iadviser/./src/routes/app-adviser/client/wizard/steps/quote/general-details/api.ts","webpack://iadviser/./src/routes/app-adviser/client/wizard/steps/quote/general-details/general-details.css","webpack://iadviser/./src/routes/app-adviser/client/wizard/steps/quote/general-details/general-details.ts"],"sourcesContent":["// Module\nvar code = \"\\r\\n\";\n// Exports\nexport default code;","import { autoinject } from 'aurelia-framework';\r\nimport { HttpClient, json } from 'aurelia-fetch-client';\r\nimport {\r\n ClientQuote, CopyQuote, Comment\r\n} from 'resources/models/client';\r\nimport { environment } from 'environment';\r\nimport { EntityActionType, EntityType, EntityMode } from 'routes/app-adviser/client/quotes/interfaces';\r\n\r\n@autoinject()\r\nexport class Api {\r\n constructor(\r\n public http: HttpClient\r\n ) { }\r\n\r\n async load(clientId: number): Promise {\r\n const endpoint = environment.clientEndpoints.quotes.load;\r\n const uri = endpoint.uri([clientId]);\r\n\r\n const result = await this.http.fetch(uri);\r\n\r\n const urls = await result.json();\r\n\r\n return urls.map(w => Object.assign(new ClientQuote(), w));\r\n }\r\n\r\n async copy(clientId: number, quoteId: number): Promise {\r\n const endpoint = environment.clientEndpoints.quotes.copy;\r\n const uri = endpoint.uri([clientId, quoteId]);\r\n\r\n const result = await this.http.fetch(uri, {\r\n body: '',\r\n method: endpoint.method\r\n });\r\n\r\n return result.json();\r\n }\r\n\r\n async addEditComment(clientId: number, quoteId: number, comment: Comment): Promise {\r\n const endpoint = environment.clientEndpoints.quotes.addEditComment;\r\n const uri = endpoint.uri([clientId, quoteId]);\r\n\r\n const result = await this.http.fetch(uri, {\r\n body: json(comment),\r\n method: endpoint.method\r\n });\r\n\r\n return result.json();\r\n }\r\n\r\n async newEntityConfig(clientId: number, actionType: EntityActionType, entityType: EntityType, newActionType: EntityActionType, mode: EntityMode, isNewTakeUp: boolean): Promise {\r\n const endpoint = environment.clientEndpoints.wizard.initialDetails.config.new;\r\n const uri = endpoint.uri([clientId, actionType, entityType, newActionType, mode, isNewTakeUp]);\r\n\r\n const result = await this.http.fetch(uri);\r\n\r\n return result.json();\r\n }\r\n\r\n async newEntityConfigWithEntityId(clientId: number, entityId: string, actionType: EntityActionType, entityType: EntityType, newActionType: EntityActionType, mode: EntityMode, isModifyPolicyPeriod = false): Promise {\r\n const endpoint = environment.clientEndpoints.wizard.initialDetails.config.newEntity;\r\n const uri = endpoint.uri([clientId, entityId, actionType, entityType, newActionType, mode, isModifyPolicyPeriod]);\r\n\r\n const result = await this.http.fetch(uri);\r\n\r\n return result.json();\r\n }\r\n\r\n async getEntityConfig(\r\n clientId: number, entityId: string, actionType: EntityActionType, entityType: EntityType, mode: EntityMode, editTakeUp = false): Promise {\r\n const endpoint = environment.clientEndpoints.wizard.initialDetails.config.detail;\r\n const uri = endpoint.uri([clientId, actionType, entityType, entityId, mode, editTakeUp]);\r\n\r\n const result = await this.http.fetch(uri, {\r\n method: endpoint.method\r\n });\r\n\r\n return result.ok ? result.json() : null;\r\n }\r\n\r\n async newEntity(clientId: number, actionType: EntityActionType, entityType: EntityType, body: any): Promise {\r\n const endpoint = environment.clientEndpoints.wizard.initialDetails.post;\r\n const uri = endpoint.uri([clientId, actionType, entityType]);\r\n\r\n const result = await this.http.fetch(uri, {\r\n method: endpoint.method,\r\n body: json(body)\r\n });\r\n\r\n return result.json();\r\n }\r\n\r\n async updateInitialDetails(\r\n clientId: number, actionType: EntityActionType, entityType: EntityType, entityId: number, body: any\r\n ): Promise {\r\n const endpoint = environment.clientEndpoints.wizard.initialDetails.put;\r\n const uri = endpoint.uri([clientId, actionType, entityType, entityId]);\r\n\r\n const response = await this.http.fetch(uri, {\r\n method: endpoint.method,\r\n body: json(body)\r\n });\r\n\r\n const result = await response.json();\r\n\r\n return result;\r\n }\r\n\r\n async getEntity(clientId: number, entityId: string, actionType: EntityActionType, entityType: EntityType,\r\n mode: EntityMode, questionsResponsesOnly = undefined, riskClassTypeId = undefined, newActionType = undefined, isModifyPolicyPeriod = false, includeValidationIssues = false): Promise {\r\n const endpoint = environment.clientEndpoints.wizard.initialDetails.get;\r\n\r\n const uri = endpoint.uri([clientId, actionType, entityType, entityId, mode, questionsResponsesOnly, riskClassTypeId, newActionType, isModifyPolicyPeriod, includeValidationIssues]);\r\n\r\n const result = await this.http.fetch(uri, {\r\n method: endpoint.method\r\n });\r\n\r\n return result.json();\r\n }\r\n\r\n async getNewEntity(clientId: number, actionType: EntityActionType, entityType: EntityType,\r\n mode: EntityMode, questionsResponsesOnly = undefined, riskClassTypeId = undefined): Promise {\r\n const endpoint = environment.clientEndpoints.wizard.initialDetails.getNew;\r\n\r\n const uri = endpoint.uri([clientId, actionType, entityType, mode, questionsResponsesOnly, riskClassTypeId]);\r\n\r\n const result = await this.http.fetch(uri, {\r\n method: endpoint.method\r\n });\r\n\r\n return result.json();\r\n }\r\n\r\n async patchQuoteToRecalcGst(clientId: number, entityId: string, actionType: EntityActionType, entityType: EntityType): Promise {\r\n const endpoint = environment.clientEndpoints.wizard.initialDetails.patch;\r\n const uri = endpoint.uri([clientId, actionType, entityType, entityId]);\r\n\r\n const result = await this.http.fetch(uri, {\r\n body: json([{ 'op': 'replace', 'path': '/gstRecalculationRequired', 'value': false }]),\r\n method: endpoint.method\r\n });\r\n\r\n return result;\r\n }\r\n\r\n async validationQuestions(clientId: number, actionType: EntityActionType, entityType: EntityType, entityId: number): Promise {\r\n const endpoint = environment.clientEndpoints.wizard.validationQuestions;\r\n const uri = endpoint.uri([clientId, actionType, entityType, entityId]);\r\n\r\n return this.http.fetch(uri, { method: endpoint.method });\r\n }\r\n}\r\n","// extracted by mini-css-extract-plugin\nexport default {\"screen-container\":\"screen-container____goZ5R\",\"screen-container--client\":\"screen-container--client____vRmTL screen-container____goZ5R\",\"screen-container--dashboard\":\"screen-container--dashboard____sPI9n screen-container--client____vRmTL screen-container____goZ5R\",\"screen-container--home\":\"screen-container--home____O7eQJ screen-container____goZ5R\",\"screen-container--menu\":\"screen-container--menu____sSY_D screen-container____goZ5R\",\"screen-container--accounts-override\":\"screen-container--accounts-override____hGqUe screen-container____goZ5R\",\"screen-container--accounts-override-xxl\":\"screen-container--accounts-override-xxl____ZGwTP screen-container____goZ5R\",\"empty-state\":\"empty-state____tZ4c4\",\"empty-state--icon\":\"empty-state--icon____G10jn\",\"empty-heading\":\"empty-heading____Pj6gQ\",\"empty-subheading\":\"empty-subheading____UaB1g\",\"kyc\":\"kyc____Geg3t\",\"advice\":\"advice____VRawN\",\"insured\":\"insured____ejIIf\",\"quotes\":\"quotes____SBktc\",\"policies\":\"policies____yonSW\",\"claims\":\"claims____RA2wm\",\"tasks\":\"tasks____Llypa\",\"documents\":\"documents____xCKyr\",\"forms\":\"forms____dOn_j\",\"btn\":\"btn____jS4FM\",\"btn--flat\":\"btn--flat____Xo5MP btn____jS4FM\",\"btn--submit\":\"btn--submit____pC66q btn____jS4FM\",\"btn--delete\":\"btn--delete____tTsz3 btn____jS4FM\",\"btn--link\":\"btn--link____dFyQ0 btn____jS4FM\",\"btn--inline-text-link\":\"btn--inline-text-link____X_vbL btn--link____dFyQ0 btn____jS4FM\",\"btn--footer\":\"btn--footer____kKOd7 btn____jS4FM\",\"btn--footer-submit\":\"btn--footer-submit____RJamr btn--submit____pC66q btn____jS4FM btn--footer____kKOd7 btn____jS4FM\",\"btn--footer-cancel\":\"btn--footer-cancel____Afaez\",\"btn--footer---cancel\":\"btn--footer---cancel____l0IqN\",\"btn--footer-delete\":\"btn--footer-delete____b1Vlc btn--delete____tTsz3 btn____jS4FM btn--footer____kKOd7 btn____jS4FM\",\"btn--qce-dropdown\":\"btn--qce-dropdown____qdGOL btn--footer-submit____RJamr btn--submit____pC66q btn____jS4FM btn--footer____kKOd7 btn____jS4FM\",\"btn--footer-combo\":\"btn--footer-combo____sgkR0 btn--footer____kKOd7 btn____jS4FM\",\"btn--lmi-bicalc\":\"btn--lmi-bicalc____zfanH btn____jS4FM\",\"btn--lmi-risk\":\"btn--lmi-risk____ZsrmE btn____jS4FM\",\"btn--lmi-policy-comparison\":\"btn--lmi-policy-comparison____QzXi9 btn____jS4FM\",\"btn--lmi-policy-coach\":\"btn--lmi-policy-coach____t_c2Z btn____jS4FM\",\"btn--andrew-nock\":\"btn--andrew-nock____kU2TI btn____jS4FM\",\"btn--construction-cost-consultants\":\"btn--construction-cost-consultants____YQu6B btn____jS4FM\",\"btn--5-star\":\"btn--5-star____iACql btn____jS4FM\",\"btn--thermoscan\":\"btn--thermoscan____Eh3XZ btn____jS4FM\",\"btn--risk-survey-services\":\"btn--risk-survey-services____shYFS btn____jS4FM\",\"btn--risk-management\":\"btn--risk-management____qabTI btn____jS4FM\",\"btn--lmi-bicalc--disabled\":\"btn--lmi-bicalc--disabled____CHGB0 btn--lmi-bicalc____zfanH btn____jS4FM\",\"btn--lmi-risk--disabled\":\"btn--lmi-risk--disabled____GF9u_ btn--lmi-risk____ZsrmE btn____jS4FM\",\"btn--lmi-policy-comparison--disabled\":\"btn--lmi-policy-comparison--disabled____T_WKM btn--lmi-policy-comparison____QzXi9 btn____jS4FM\",\"btn--initial-insured-location-risk\":\"btn--initial-insured-location-risk____uyG3G btn--flat____Xo5MP btn____jS4FM btn____jS4FM\",\"btn--icon\":\"btn--icon____Paqe_ btn____jS4FM\",\"btn--icon-no-border\":\"btn--icon-no-border____Ls_jg\",\"btn--icon-add\":\"btn--icon-add____wpeo2 btn--icon____Paqe_ btn____jS4FM\",\"btn--add-risk\":\"btn--add-risk____KhOP3 btn--icon____Paqe_ btn____jS4FM\",\"btn--icon-close\":\"btn--icon-close____YSqTi\",\"task-access-modal__close\":\"task-access-modal__close____pRrGV\",\"btn--icon-delete\":\"btn--icon-delete____rfcZA btn--icon____Paqe_ btn____jS4FM\",\"btn--icon-download\":\"btn--icon-download____bgNqm btn--icon____Paqe_ btn____jS4FM\",\"btn--icon-edit\":\"btn--icon-edit____f7iUm btn--icon____Paqe_ btn____jS4FM\",\"btn--icon-email\":\"btn--icon-email____olmGr btn--icon____Paqe_ btn____jS4FM\",\"btn--icon-download-email\":\"btn--icon-download-email____zWPav btn--icon____Paqe_ btn____jS4FM\",\"btn--icon-folder\":\"btn--icon-folder____YHA6g btn--icon____Paqe_ btn____jS4FM\",\"btn--icon-folder-locked\":\"btn--icon-folder-locked____q0pcN btn--icon____Paqe_ btn____jS4FM\",\"btn--icon-folder-locked-active\":\"btn--icon-folder-locked-active____D2Y69 btn--icon____Paqe_ btn____jS4FM\",\"btn--icon-history\":\"btn--icon-history____mUirG btn--icon____Paqe_ btn____jS4FM\",\"btn--icon-info\":\"btn--icon-info____kQx9V btn--icon____Paqe_ btn____jS4FM\",\"btn--icon-task\":\"btn--icon-task____EQEre btn--icon____Paqe_ btn____jS4FM\",\"btn--icon-link\":\"btn--icon-link____YJDIw btn--icon____Paqe_ btn____jS4FM\",\"btn--icon-unlink\":\"btn--icon-unlink____op8zW btn--icon-delete____rfcZA btn--icon____Paqe_ btn____jS4FM\",\"btn--icon-map\":\"btn--icon-map____l6uY2 btn--icon____Paqe_ btn____jS4FM\",\"btn--icon-more\":\"btn--icon-more____ZjQ6Q btn--icon____Paqe_ btn____jS4FM\",\"btn--icon-open-in-new-window\":\"btn--icon-open-in-new-window____Hktre btn--icon____Paqe_ btn____jS4FM\",\"btn--icon-favourite--selected\":\"btn--icon-favourite--selected____TP10h btn--icon____Paqe_ btn____jS4FM\",\"btn--icon-favourite--deselected\":\"btn--icon-favourite--deselected____YOJr_ btn--icon____Paqe_ btn____jS4FM\",\"btn--icon-preview\":\"btn--icon-preview____O4iEu btn--icon____Paqe_ btn____jS4FM\",\"btn--icon-pre-printed\":\"btn--icon-pre-printed____mwlZG btn--icon____Paqe_ btn____jS4FM\",\"btn--icon-print\":\"btn--icon-print____uoQMg btn--icon____Paqe_ btn____jS4FM\",\"btn--icon-save\":\"btn--icon-save_____OxtD btn--icon____Paqe_ btn____jS4FM\",\"btn--icon-settings\":\"btn--icon-settings____ah7pf btn--icon____Paqe_ btn____jS4FM\",\"btn--icon-show-details\":\"btn--icon-show-details____K4YRp btn--icon____Paqe_ btn____jS4FM\",\"btn--icon-show-details--alert\":\"btn--icon-show-details--alert____eLvjZ btn--icon____Paqe_ btn____jS4FM\",\"btn--icon-show-summary\":\"btn--icon-show-summary____yKyM3 btn--icon____Paqe_ btn____jS4FM\",\"btn--icon-attachment\":\"btn--icon-attachment____Sxih9 btn--icon____Paqe_ btn____jS4FM\",\"btn--icon-tag\":\"btn--icon-tag____s1hHH btn--icon____Paqe_ btn____jS4FM\",\"btn--icon-undo\":\"btn--icon-undo____oJYtU btn--icon____Paqe_ btn____jS4FM\",\"btn--icon-sync\":\"btn--icon-sync_____mJ1s btn--icon____Paqe_ btn____jS4FM\",\"btn--icon-arrow-forward\":\"btn--icon-arrow-forward____UKX2p btn--icon____Paqe_ btn____jS4FM\",\"btn--aside-collapse\":\"btn--aside-collapse____RXXrv btn--icon____Paqe_ btn____jS4FM\",\"btn--icon-expand-more\":\"btn--icon-expand-more____rg4E1 btn--icon____Paqe_ btn____jS4FM\",\"btn--icon-expand-less\":\"btn--icon-expand-less____HBSbm btn--icon____Paqe_ btn____jS4FM\",\"btn--icon-general\":\"btn--icon-general____MBfx_ btn--icon____Paqe_ btn____jS4FM\",\"btn--icon-sales\":\"btn--icon-sales____BJymd btn--icon____Paqe_ btn____jS4FM\",\"btn--icon-branch\":\"btn--icon-branch____Ezp57 btn--icon____Paqe_ btn____jS4FM\",\"btn--icon-contact\":\"btn--icon-contact____YeVyY btn--icon____Paqe_ btn____jS4FM\",\"btn--icon-consent\":\"btn--icon-consent____p3c0u btn--icon____Paqe_ btn____jS4FM\",\"btn--icon-questions\":\"btn--icon-questions____BlD9O btn--icon____Paqe_ btn____jS4FM\",\"btn--icon-associated\":\"btn--icon-associated____cu8lU btn--icon____Paqe_ btn____jS4FM\",\"btn--icon-notes\":\"btn--icon-notes____RYYjV btn--icon____Paqe_ btn____jS4FM\",\"btn--back\":\"btn--back____yQoz3\",\"btn--back-to-sign-in\":\"btn--back-to-sign-in____BbCR1 btn--back____yQoz3\",\"btn--icon-advanced-search\":\"btn--icon-advanced-search____bUyfP btn--icon____Paqe_ btn____jS4FM\",\"btn--wizard\":\"btn--wizard____aDeNR btn____jS4FM\",\"btn--wizard-back\":\"btn--wizard-back____zVhNd btn--wizard____aDeNR btn____jS4FM\",\"btn--wizard-next\":\"btn--wizard-next____Mo1TW btn--wizard____aDeNR btn____jS4FM\",\"task-delete-confirm-modal__delete\":\"task-delete-confirm-modal__delete____ZKllY\",\"task-delete-confirm-modal__cancel\":\"task-delete-confirm-modal__cancel____SXqct\",\"button-options\":\"button-options____K8Dda\",\"cancel\":\"cancel____csF_g\",\"tasksubmit\":\"tasksubmit____MUalU\",\"forgotPasswordBtn\":\"forgotPasswordBtn____i5cGg\",\"show-complet-tasks\":\"show-complet-tasks____RUzlI\",\"fieldset\":\"fieldset____ZTqBx\",\"fieldset-instruction\":\"fieldset-instruction____IIWoh\",\"fieldset--no-padding\":\"fieldset--no-padding____U4yVe fieldset____ZTqBx\",\"fieldset--alt\":\"fieldset--alt_____Z7Iv fieldset____ZTqBx\",\"input-search\":\"input-search____Fn003\",\"view-password\":\"view-password____OorOy\",\"ia-currency-input\":\"ia-currency-input_____BpS5\",\"ia-currency-negative\":\"ia-currency-negative____I6TeJ\",\"select--mini\":\"select--mini____OUNcj\",\"required-label\":\"required-label____pse2x\",\"alert\":\"alert____sdamR\",\"alert--important\":\"alert--important____h3_Sd\",\"input-label\":\"input-label____Ombj_\",\"w-100\":\"w-100____hmsGu\",\"search-input-wrapper\":\"search-input-wrapper____Qn_rP\",\"search-input--results\":\"search-input--results____VBlFc\",\"search-input--result\":\"search-input--result____OFKJ4\",\"search-input--result--highlighted\":\"search-input--result--highlighted____B6EzH\",\"date-range-selections\":\"date-range-selections____pZTO6\",\"date-arrow-forward\":\"date-arrow-forward____MPphQ\",\"qce-dropdown\":\"qce-dropdown____DIwWi\",\"qce-or\":\"qce-or____uYl5D\",\"qce-dropdown-with-dropdown\":\"qce-dropdown-with-dropdown____GjHaO\",\"qce-vehicle-registration-search\":\"qce-vehicle-registration-search____ujnXD\",\"row-gap\":\"row-gap____ei2D8\",\"row-group\":\"row-group____j9sbY\",\"row-group--three\":\"row-group--three____biUh7 row-group____j9sbY\",\"grid-14\":\"grid-14____kU7ae\",\"row-group--auto\":\"row-group--auto____gUyvq row-group____j9sbY\",\"space\":\"space____ONwnt\",\"display-none--lg\":\"display-none--lg____UIpGF\",\"display-none--md\":\"display-none--md____ILFsO\",\"tab-navigation\":\"tab-navigation____NmhEE\",\"has-warnings\":\"has-warnings____zjRMf\",\"tab-selected\":\"tab-selected____xytIP tab____oEQyk\",\"disabled\":\"disabled____rtuyK\",\"tab\":\"tab____oEQyk\",\"btn--tab-overflow\":\"btn--tab-overflow____kNiIO\",\"btn--tab-overflow-left\":\"btn--tab-overflow-left____qTc1i btn--tab-overflow____kNiIO\",\"btn--tab-overflow-left-disabled\":\"btn--tab-overflow-left-disabled____DBZ66 btn--tab-overflow-left____qTc1i btn--tab-overflow____kNiIO\",\"btn--tab-overflow-right\":\"btn--tab-overflow-right____qwp9y btn--tab-overflow____kNiIO\",\"btn--tab-overflow-right-disabled\":\"btn--tab-overflow-right-disabled____TRsQK btn--tab-overflow-right____qwp9y btn--tab-overflow____kNiIO\",\"constrained-width\":\"constrained-width____N_NxO\",\"constrained-width--tab\":\"constrained-width--tab____cZ6t7 constrained-width____N_NxO\",\"card\":\"card____IraOX\",\"card-content\":\"card-content____mMYVt\",\"card-heading\":\"card-heading____y8Xls\",\"control-group\":\"control-group____xv5Ro\",\"label-group\":\"label-group____xaFzG\",\"label-group-item\":\"label-group-item____mh6St\",\"button-group\":\"button-group____ZhIc2\",\"card--alert\":\"card--alert____idxPq card____IraOX\",\"card-heading--alert\":\"card-heading--alert____VkaT7 card-heading____y8Xls\",\"card--status-message\":\"card--status-message____Qv27O\",\"card--status-message--left\":\"card--status-message--left____orK_w card--status-message____Qv27O\",\"card-heading--sticky-header\":\"card-heading--sticky-header____IXUUI\",\"card-heading--no-icon\":\"card-heading--no-icon____NX931 card-heading____y8Xls\",\"card-heading--bold-title\":\"card-heading--bold-title____d8ih5\",\"bg-blue-sky\":\"bg-blue-sky____pcw_6\",\"card-heading--advanced-search-results\":\"card-heading--advanced-search-results____ndd2J\",\"table\":\"table____S6RRc\",\"table-heading-row\":\"table-heading-row____sCZLH\",\"table-row\":\"table-row____j2hPC\",\"table-result-row\":\"table-result-row____blHUK\",\"break-word\":\"break-word____cROw2\",\"no-wrap\":\"no-wrap____vuAcJ\",\"table-result-row--disabled\":\"table-result-row--disabled____fuQSi\",\"table-modal\":\"table-modal____msMhy table____S6RRc\",\"table-enhanced\":\"table-enhanced____H8ylg\",\"table--no-border-bottom\":\"table--no-border-bottom____U0kVV table____S6RRc\",\"height-45\":\"height-45____e54VG\",\"edit-column\":\"edit-column____Z6Fwh\",\"delete-column\":\"delete-column____Hhihv\",\"date-table-heading\":\"date-table-heading____sTBBT\",\"button-edit\":\"button-edit____FKhyc\",\"button-delete\":\"button-delete____ufEc9\",\"table-row-selected\":\"table-row-selected____O16rh\",\"table-row-alert\":\"table-row-alert____PHkGj\",\"table-filter-row\":\"table-filter-row____oAB2f\",\"table-filter-row--endcap\":\"table-filter-row--endcap____dbRfZ\",\"filter-column\":\"filter-column____RIGsZ\",\"table-pagination\":\"table-pagination____uuwYZ\",\"table-pagination-with-filter\":\"table-pagination-with-filter____KkOwm table-pagination____uuwYZ\",\"table-button-group\":\"table-button-group____WtZ9M\",\"table-child-container\":\"table-child-container____ipuu7\",\"table-child-card\":\"table-child-card____B2TzR\",\"child-table--selected-row\":\"child-table--selected-row____Oi35W\",\"child-table\":\"child-table____d6j5w table____S6RRc\",\"custom-pagination\":\"custom-pagination____r1Pmg\",\"pagination-count\":\"pagination-count____Oyzye\",\"pagination-button\":\"pagination-button____ZHGBh btn____jS4FM\",\"pagination-prev\":\"pagination-prev____tXQgc pagination-button____ZHGBh btn____jS4FM\",\"pagination-next\":\"pagination-next____h1omJ pagination-button____ZHGBh btn____jS4FM\",\"pagination-disabled\":\"pagination-disabled____v9kAL pagination-button____ZHGBh btn____jS4FM\",\"pagination-prev-disabled\":\"pagination-prev-disabled____Vf6ft pagination-disabled____v9kAL pagination-button____ZHGBh btn____jS4FM\",\"pagination-next-disabled\":\"pagination-next-disabled____CAw0R pagination-disabled____v9kAL pagination-button____ZHGBh btn____jS4FM\",\"pagination\":\"pagination____xeGpd\",\"pagination-top\":\"pagination-top____nU5Yp pagination____xeGpd\",\"pagination-bottom\":\"pagination-bottom____GLmrk pagination____xeGpd\",\"pagination-bottom--documents\":\"pagination-bottom--documents____rksDm pagination-bottom____GLmrk pagination____xeGpd\",\"table-cell-btn-icon\":\"table-cell-btn-icon____ieuZ2\",\"folder-table\":\"folder-table____AyQgo table--no-border-bottom____U0kVV table____S6RRc\",\"doc-table-group--heading\":\"doc-table-group--heading____Dtag9\",\"doc-table-group--heading-open\":\"doc-table-group--heading-open____C3ZiO doc-table-group--heading____Dtag9\",\"doc-table-group--heading-with-options\":\"doc-table-group--heading-with-options____xFVIq\",\"constrained-width--folder-name\":\"constrained-width--folder-name____y2BFM constrained-width____N_NxO\",\"disable-entity\":\"disable-entity____spMcB\",\"button-options--add\":\"button-options--add____XvEiL button-options____K8Dda\",\"information-icon\":\"information-icon____wlEIq\",\"deleted-icon\":\"deleted-icon____gee0s\",\"exclamation-icon\":\"exclamation-icon____NR5b6\",\"success-icon\":\"success-icon____c7iJb\",\"text-align-center\":\"text-align-center____MOIPL\",\"word-break\":\"word-break____PK0Td\",\"btn-group\":\"btn-group____dP6NV\",\"accordion-content\":\"accordion-content____NAcrk\",\"toggle-collapse\":\"toggle-collapse____wtP1i\",\"toggle-collapse--disabled\":\"toggle-collapse--disabled____aadhY toggle-collapse____wtP1i\",\"toggle-expand\":\"toggle-expand____fJnV7 toggle-collapse____wtP1i\",\"folder\":\"folder____fGXIt\",\"folder-locked\":\"folder-locked____CKEMH folder____fGXIt\",\"yesNo-filter-width\":\"yesNo-filter-width____r9xyr\",\"w-5\":\"w-5____NfPMH\",\"w-10\":\"w-10____Zy3s6\",\"w-15\":\"w-15____qoT8Q\",\"w-20\":\"w-20____sQwnQ\",\"w-25\":\"w-25____IJcmD\",\"w-30\":\"w-30____adqvn\",\"w-35\":\"w-35____chW0d\",\"w-40\":\"w-40____jlf65\",\"w-45\":\"w-45____w_O1u\",\"w-50\":\"w-50____hmPqY\",\"w-60\":\"w-60____a5BW2\",\"table--sticky-header\":\"table--sticky-header____MjNri\",\"table--sticky-footer\":\"table--sticky-footer____eIfpC\",\"table--sticky-column\":\"table--sticky-column_____j1iB\",\"table--sticky-column2\":\"table--sticky-column2____ZgZhS table--sticky-column_____j1iB\",\"table--sticky-column-right\":\"table--sticky-column-right____ORW4v table--sticky-column_____j1iB\",\"scrollable-table-container\":\"scrollable-table-container____VF0LQ\",\"task-options-modal\":\"task-options-modal____UDul5\",\"recent-link-name\":\"recent-link-name____BFOIU\",\"view-block\":\"view-block____Ie22e\",\"view-block--heading\":\"view-block--heading____WfEw0\",\"view-block--white\":\"view-block--white____lbw5e view-block____Ie22e\",\"view-block--alert\":\"view-block--alert____aFv6c view-block____Ie22e view-block--alert____aFv6c view-block____Ie22e\",\"view-block--success\":\"view-block--success____pPrUL view-block____Ie22e\",\"view-block--info\":\"view-block--info____qiFYA view-block____Ie22e\",\"view-block--warning\":\"view-block--warning____jKLgf view-block____Ie22e\",\"view-block--alt\":\"view-block--alt____VxHUV view-block____Ie22e\",\"view-block--with-icon\":\"view-block--with-icon____Nkssx view-block____Ie22e\",\"view-block-icon\":\"view-block-icon____iAQxO\",\"view-block--warning--with-icon\":\"view-block--warning--with-icon____MlJWJ view-block--warning____jKLgf view-block____Ie22e\",\"view-block-checkbox\":\"view-block-checkbox____wtXiw view-block____Ie22e\",\"view-block-checkbox--alert\":\"view-block-checkbox--alert____dsokn view-block--alert____aFv6c view-block____Ie22e view-block-checkbox____wtXiw view-block____Ie22e\",\"text-view-content\":\"text-view-content____n4RnO\",\"ia-modal\":\"ia-modal____EITxr\",\"ia-modal-inner\":\"ia-modal-inner____gpjUG\",\"ia-modal-inner--context-menu\":\"ia-modal-inner--context-menu____mstFw ia-modal-inner____gpjUG\",\"ia-modal-inner--wide-lg\":\"ia-modal-inner--wide-lg____RqZS3 ia-modal-inner____gpjUG\",\"ia-modal-inner--wide-xxl\":\"ia-modal-inner--wide-xxl____lhF4g ia-modal-inner____gpjUG\",\"ia-modal-inner--take-over\":\"ia-modal-inner--take-over____JixrR ia-modal-inner____gpjUG\",\"fixed-height\":\"fixed-height____l_3Gz\",\"takeover-header\":\"takeover-header____ymivJ\",\"logo\":\"logo____MJRgh\",\"logo--broker\":\"logo--broker____sai0M logo____MJRgh logo____MJRgh\",\"close-search\":\"close-search____Y9OWJ\",\"ia-modal-content\":\"ia-modal-content____EshRS\",\"ia-modal-overlay--transparent\":\"ia-modal-overlay--transparent____urf5E ia-modal____EITxr\",\"ia-modal-overlay--light-white\":\"ia-modal-overlay--light-white____Or8OT ia-modal____EITxr\",\"ia-modal-overlay--transparent--light-white-client-nav\":\"ia-modal-overlay--transparent--light-white-client-nav____Ng7Yu ia-modal-overlay--light-white____Or8OT ia-modal____EITxr\",\"modal-header\":\"modal-header____N6BLr\",\"modal-footer\":\"modal-footer____wQf9h modal-header____N6BLr\",\"modal-footer--space-between\":\"modal-footer--space-between____uJdjA modal-footer____wQf9h modal-header____N6BLr\",\"footer-btn-group\":\"footer-btn-group____qMzZ4\",\"header-label\":\"header-label____T3czS\",\"header-label-icon\":\"header-label-icon____kpr8U header-label____T3czS\",\"header-label--alert\":\"header-label--alert____r1_Cq header-label-icon____kpr8U header-label____T3czS\",\"header-label--info\":\"header-label--info____ge20w header-label-icon____kpr8U header-label____T3czS\",\"header-label--settings\":\"header-label--settings____BUMAk header-label-icon____kpr8U header-label____T3czS\",\"header-label--accounts\":\"header-label--accounts____og84l header-label-icon____kpr8U header-label____T3czS\",\"header-label--edit\":\"header-label--edit____HVloq header-label-icon____kpr8U header-label____T3czS\",\"header-label--download\":\"header-label--download____q2dZC header-label-icon____kpr8U header-label____T3czS\",\"header-label--delete\":\"header-label--delete____J8gf9 header-label-icon____kpr8U header-label____T3czS\",\"header-label--history\":\"header-label--history____NBwRm header-label-icon____kpr8U header-label____T3czS\",\"header-label--tag\":\"header-label--tag____gqw2I header-label-icon____kpr8U header-label____T3czS\",\"header-label--search\":\"header-label--search____VOzSH header-label-icon____kpr8U header-label____T3czS\",\"header-label--kyc\":\"header-label--kyc____YkdaZ header-label-icon____kpr8U header-label____T3czS\",\"header-label--advice\":\"header-label--advice____zpIZl header-label-icon____kpr8U header-label____T3czS\",\"header-label--generate-advice\":\"header-label--generate-advice____UyMXF header-label-icon____kpr8U header-label____T3czS\",\"header-label--form\":\"header-label--form____SsjkG header-label-icon____kpr8U header-label____T3czS\",\"header-label--insured\":\"header-label--insured____T5l3w header-label-icon____kpr8U header-label____T3czS\",\"header-label--quote\":\"header-label--quote____w8dnA header-label-icon____kpr8U header-label____T3czS\",\"header-label--policy\":\"header-label--policy____EhyON header-label-icon____kpr8U header-label____T3czS\",\"header-label--claim\":\"header-label--claim____M0kA9 header-label-icon____kpr8U header-label____T3czS\",\"header-label--fsg\":\"header-label--fsg____8sg3J header-label-icon____kpr8U header-label____T3czS\",\"header-label--mandatory-document\":\"header-label--mandatory-document____oeOIk header-label-icon____kpr8U header-label____T3czS\",\"header-label--notification\":\"header-label--notification____D4UpJ header-label-icon____kpr8U header-label____T3czS\",\"header-label--task\":\"header-label--task____lNa3X header-label-icon____kpr8U header-label____T3czS\",\"header-label--contact\":\"header-label--contact____WIcMH header-label-icon____kpr8U header-label____T3czS\",\"header-label--note\":\"header-label--note____x0M4L header-label-icon____kpr8U header-label____T3czS\",\"header-label--document\":\"header-label--document____OdwUz header-label-icon____kpr8U header-label____T3czS\",\"header-label--email\":\"header-label--email____mpfEc header-label-icon____kpr8U header-label____T3czS\",\"header-label--template\":\"header-label--template_____V13g header-label-icon____kpr8U header-label____T3czS\",\"header-details\":\"header-details____Tjj63\",\"header-detail-item\":\"header-detail-item____nMzV5\",\"header-label--context-menu\":\"header-label--context-menu____ErWuF header-label-icon____kpr8U header-label____T3czS\",\"context-menu-sep\":\"context-menu-sep____Qnr3z\",\"context-menu--one-col\":\"context-menu--one-col____rsFp7\",\"context-menu-disabled\":\"context-menu-disabled____rZZHB\",\"context-menu--two-col\":\"context-menu--two-col____xJ0tl context-menu--one-col____rsFp7\",\"context-menu--three-col\":\"context-menu--three-col____PJUou context-menu--two-col____xJ0tl context-menu--one-col____rsFp7\",\"modal-content-copy\":\"modal-content-copy____pabyv\",\"processing-step\":\"processing-step____TMV2A\",\"processing-step--failed\":\"processing-step--failed____DO0VF processing-step____TMV2A\",\"document--processing\":\"document--processing____jzwQr\",\"eclipse-loader\":\"eclipse-loader____EzmAC\",\"confirmation-content\":\"confirmation-content____PcQ9M\",\"ia-modal--search\":\"ia-modal--search____fSe1p\",\"view-block--alert--progress-modal\":\"view-block--alert--progress-modal____IJmNo view-block--alert____aFv6c view-block____Ie22e\",\"btn--footer--cancel\":\"btn--footer--cancel____FnZYL\",\"modal--header\":\"modal--header____OiUA7\",\"client-footer--right\":\"client-footer--right____DAsqd\",\"wizard-button-group\":\"wizard-button-group____TGWvv\",\"wizard-nav-group\":\"wizard-nav-group____sTFfC\",\"wizard-nav-group--form\":\"wizard-nav-group--form____DvzTF wizard-nav-group____sTFfC\",\"footer-combo-selections\":\"footer-combo-selections____bVm3a\",\"btn--combo-option\":\"btn--combo-option_____A7_i\",\"footer-combo-container\":\"footer-combo-container____G_Pno\",\"right\":\"right____pSqm7\",\"pdf-selection\":\"pdf-selection____ixXyI\",\"ia-file-upload\":\"ia-file-upload____VxyEt btn____jS4FM\",\"ia-file-upload--disabled\":\"ia-file-upload--disabled____MsVJv\",\"ia-file-info\":\"ia-file-info____w7vJj\",\"delete-pdf\":\"delete-pdf____slokA btn--icon-delete____rfcZA btn--icon____Paqe_ btn____jS4FM\",\"pdf-section\":\"pdf-section____bHWtZ\",\"margin-top\":\"margin-top____luEEO\",\"new-pdf-action-buttons\":\"new-pdf-action-buttons____mC4oB\",\"page-pdf-controls\":\"page-pdf-controls____jstkO\",\"step-message\":\"step-message____UCnG5\",\"fsg-actions\":\"fsg-actions____PXhhp\",\"fsg-step-card\":\"fsg-step-card____OPGwq\",\"risk-group-heading\":\"risk-group-heading____Ob0qS\",\"risk-group-selections\":\"risk-group-selections____lTR5a\",\"scheme-control-group\":\"scheme-control-group____MMyKw\",\"group-container\":\"group-container____C4l2M\",\"qce-container\":\"qce-container____yvs7X\",\"qce-wrapper\":\"qce-wrapper____IBqHS\",\"client-disclosure-group\":\"client-disclosure-group____yvJXP\"};","import { EventAggregator } from 'aurelia-event-aggregator';\r\nimport { EntityActionType, EntityType } from 'routes/app-adviser/client/quotes/interfaces';\r\n/* eslint-disable no-prototype-builtins */\r\nimport { AppRouter } from 'aurelia-router';\r\nimport { FormValidationRenderer } from 'resources/form-validation-renderer';\r\nimport { I18N } from 'aurelia-i18n';\r\nimport { Api } from './api';\r\nimport { autoinject, TaskQueue, BindingEngine, computedFrom } from 'aurelia-framework';\r\nimport styles from './general-details.css';\r\n\r\nimport {\r\n ValidationControllerFactory,\r\n ValidationController,\r\n ValidationRules\r\n} from 'aurelia-validation';\r\n\r\nimport { LookupDataService } from 'resources/services/lookup-data';\r\nimport { IaToastService } from 'resources/services/ia-toast-service';\r\nimport { IQceResponse } from 'components/qce/qce-typings';\r\nimport { cleanQceModel } from 'resources/clean-qce-model';\r\nimport { EntityMode } from 'routes/app-adviser/client/quotes/interfaces';\r\nimport { mapActionTypeToEntityActionType, EntityActionTypeToActionTypeLabel } from 'resources/map-entity-type';\r\n\r\nimport { momentToISOString, createUTCMoment, momentToString } from 'resources/moment-helpers';\r\nimport { GeneralDetails, GeneralDetailsConfig, GeneralDetailsApi } from 'routes/app-adviser/client/wizard/models/general-details';\r\nimport { handleQceIssues, validateQce } from 'routes/app-adviser/client/wizard/functions';\r\nimport moment from 'moment';\r\nimport { Wizard } from '../../../wizard';\r\nimport { pageScroll } from 'resources/page-scroll';\r\nimport { getAppClientType } from 'resources/parse-jwt';\r\nimport { isEqual } from 'lodash';\r\n\r\n@autoinject()\r\nexport class Step1 {\r\n protected styles = styles;\r\n public validationController: ValidationController;\r\n public config: GeneralDetailsConfig;\r\n public params: IStepModel;\r\n public isDirty = false; // The QCE itself sets this value to false on init and to true when any question changes\r\n private classIsDirty = false;\r\n private showQce = true;\r\n private selectedRiskClass;\r\n private clientDisclosureType;\r\n private appClientType;\r\n private riskMigrationOption: 'true' | 'false';\r\n\r\n public model: GeneralDetails = {\r\n quoteOrPolicyVersionId: null,\r\n effectiveDate: '',\r\n expiryDate: '',\r\n clientInsuredPartyId: null,\r\n clientDisclosureTypeId: null,\r\n clientDisclosureType: null,\r\n riskClassTypeId: null,\r\n class: '',\r\n schemeFlag: false,\r\n schemeId: null,\r\n availableSchemes: [],\r\n gstRecalculationRequired: null,\r\n warnings: [],\r\n questionsAndResponses: {\r\n groups: [],\r\n guid: ''\r\n } as IQceResponse,\r\n isMultiplePayeeFlag: null\r\n };\r\n\r\n // Validation is only one way a step can proceed\r\n // this variable needs to be true to allow movement\r\n private stepCanProceed = true;\r\n private showPolicyPeriodWarning = false;\r\n private showExpiryDateGreaterThanEffectiveWarning = false;\r\n private hasErrorConditionError = false;\r\n private policyPeriodWarningAcknowledged = false;\r\n private expiryDateGreaterThanEffectiveAcknowledged = false;\r\n private policyWarningText;\r\n private errorText;\r\n private errorTexts: string[] = [];\r\n private policyWarningTexts: string[] = [];\r\n protected lmiRiskCoachLink: string;\r\n protected clientDisclosureTypes;\r\n private isClientDisclosureTypeEditible;\r\n\r\n private expiryDateGreaterThanEffectiveText = 'Expiry date is 12 months greater than the Effective date. Acknowledge?';\r\n public effectiveOptions;\r\n private expiryOptions;\r\n private subscriptionEffectiveDate;\r\n private subscriptionExpiryDate;\r\n private subscriptionClientInsuredPartyId;\r\n private subscriptionRiskClassTypeId;\r\n private subscriptionquestionsAndResponses;\r\n private mappedActionType;\r\n private actionTypeLabel;\r\n private showSchemeMustBeRemovedWarning = false;\r\n private schemeMustBeRemovedWarningText = 'This scheme is no longer valid and must be removed.';\r\n private policyWarnings = [];\r\n private isModifyPolicyPeriod = false;\r\n private focusEffectiveDate = false;\r\n\r\n private isProcessing = false;\r\n private stepMessage = 'Validating group questions...'\r\n\r\n constructor(\r\n protected api: Api,\r\n protected i18n: I18N,\r\n protected router: AppRouter,\r\n protected validationControllerFactory: ValidationControllerFactory,\r\n protected lookupService: LookupDataService,\r\n protected toast: IaToastService,\r\n protected taskQueue: TaskQueue,\r\n protected ea: EventAggregator,\r\n protected bindingEngine: BindingEngine,\r\n public wizard: Wizard,\r\n ) {\r\n this.validationController = this.validationControllerFactory.createForCurrentScope();\r\n this.validationController.addRenderer(new FormValidationRenderer());\r\n }\r\n\r\n initializeValidation() {\r\n ValidationRules.off(this);\r\n\r\n ValidationRules.customRule(\r\n 'checkEffectiveDate',\r\n (value, obj) => value !== null && value !== '' &&\r\n (obj.effectiveDate.includes('/') || obj.effectiveDate.includes('T')),\r\n ''\r\n );\r\n\r\n ValidationRules.customRule(\r\n 'checkExpityDate',\r\n (value, obj) => value !== null && value !== '' &&\r\n (obj.expiryDate.includes('/') || obj.expiryDate.includes('T')),\r\n ''\r\n );\r\n\r\n ValidationRules\r\n .ensure((e: any) => e.clientInsuredPartyId)\r\n .required()\r\n .when((e) => this.params.isTakeUp !== 'true')\r\n .ensure((e: any) => e.clientDisclosureTypeId)\r\n .required()\r\n .when((e) => this.appClientType === 'AU')\r\n .ensure((e: any) => e.effectiveDate)\r\n .satisfiesRule('checkEffectiveDate')\r\n .ensure((e: any) => e.expiryDate)\r\n .satisfiesRule('checkExpityDate')\r\n .ensure((e: any) => e.riskClassTypeId)\r\n .required()\r\n .ensure((e: any) => e.class)\r\n .required()\r\n .ensure((e: any) => e.schemeId)\r\n .required()\r\n .when((e) => e.schemeFlag === true)\r\n .on(this.model);\r\n }\r\n\r\n async activate(model: IStepModel) {\r\n try {\r\n this.appClientType = getAppClientType();\r\n this.params = model;\r\n\r\n if(this.params.entityType === EntityType.Form){\r\n this.params.entityType = EntityType.Quote;\r\n }\r\n\r\n // ModifyPolicyPeriodEndorsement? Update newActionType back to Endorsement and set isModifyPolicyPeriod\r\n // This is only needed when creating a new ModifyPolicyPeriodEndorsement\r\n if(parseInt(this.params.newActionType) === EntityActionType.ModifyPolicyPeriodEndorsement){\r\n this.params.newActionType = EntityActionType.Endorsement;\r\n this.isModifyPolicyPeriod = true;\r\n }\r\n\r\n this.mappedActionType = mapActionTypeToEntityActionType(this.params.actionType);\r\n this.actionTypeLabel = EntityActionTypeToActionTypeLabel(this.params.actionType);\r\n\r\n if (this.params.entityType === EntityType.Quote) {\r\n this.api.validationQuestions(model.id, this.mappedActionType, this.params.entityType, +this.params.entityId);\r\n }\r\n\r\n this.clientDisclosureTypes = await this.lookupService.clientDisclosureType();\r\n\r\n if (this.params.entityId && !this.params.newActionType) {\r\n // get config and model for edit\r\n this.config = await this.api.getEntityConfig(model.id, model.entityId, this.mappedActionType, this.params.entityType, this.params.entityMode, this.params.isEditTakeUpAction === 'true');\r\n\r\n this.model = this.createPageModel(await this.api.getEntity(model.id, this.params.entityId, this.mappedActionType, this.params.entityType, this.params.entityMode, undefined, undefined, undefined, this.isModifyPolicyPeriod, true ));\r\n } else {\r\n\r\n // New must always save\r\n this.isDirty = true;\r\n\r\n let isNewTakeUp = false;\r\n if (this.params.entityType === EntityType.Quote) {\r\n this.mappedActionType = EntityActionType.NewBusiness;\r\n this.params.entityMode = EntityMode.New;\r\n isNewTakeUp = this.params.isTakeUp === 'true';\r\n }\r\n\r\n if (!this.params.entityId) {\r\n this.config = await this.api.newEntityConfig(model.id, this.mappedActionType, this.params.entityType, this.mappedActionType, this.params.entityMode, isNewTakeUp);\r\n } else {\r\n // get config and model for new\r\n this.config = await this.api.newEntityConfigWithEntityId(model.id, model.entityId, this.mappedActionType, this.params.entityType, this.params.newActionType, this.params.entityMode, this.isModifyPolicyPeriod);\r\n }\r\n\r\n if (this.params.newActionType) {\r\n this.model = this.createPageModel(await this.api.getEntity(model.id, this.params.entityId, this.mappedActionType, this.params.entityType, this.params.entityMode, undefined, undefined, this.params.newActionType, this.isModifyPolicyPeriod));\r\n } else {\r\n this.model = this.createPageModel(null);\r\n\r\n if (this.config.availableInsuredNames.length === 1) {\r\n this.model.clientInsuredPartyId = this.config.availableInsuredNames[0].clientInsuredPartyId;\r\n }\r\n }\r\n\r\n if (this.config.schemeRemovalAllowed && this.config.schemeRemovalRequired) {\r\n this.showSchemeMustBeRemovedWarning = true;\r\n }\r\n\r\n this.model.effectiveDate = this.config.defaultEffectiveDate;\r\n this.model.expiryDate = this.config.defaultExpiryDate;\r\n }\r\n\r\n this.setExpiryDateOption(this.model.effectiveDate);\r\n\r\n if(typeof this.params.newActionType !== 'undefined' && this.params.newActionType !== null){\r\n this.mappedActionType = mapActionTypeToEntityActionType(this.params.newActionType);\r\n }\r\n\r\n if (this.config.effectiveDateValidRange) {\r\n this.effectiveOptions = {\r\n minDate: this.config.effectiveDateValidRange.minAllowedDate,\r\n maxDate: this.config.effectiveDateValidRange.maxAllowedDate\r\n };\r\n\r\n if(!this.effectiveOptions.minDate){\r\n delete this.effectiveOptions.minDate\r\n }\r\n\r\n if(!this.effectiveOptions.maxDate){\r\n delete this.effectiveOptions.maxDate\r\n }\r\n }\r\n\r\n if (this.config.availableRiskGroups && this.model.riskClassTypeId) {\r\n this.selectedRiskClass = this.config.availableRiskGroups.find(x => x.riskClassTypeId === this.model.riskClassTypeId);\r\n }\r\n\r\n if (this.config.lmiRiskCoachAvailable && this.wizard.entityType !== EntityType.Form) {\r\n this.lmiRiskCoachLink = await this.lookupService.lmiRiskCoachLink();\r\n }\r\n\r\n if (this.selectedRiskClass && this.model.class != this.selectedRiskClass.riskClassName) {\r\n this.classIsDirty = true;\r\n }\r\n\r\n // Check & translate warnings\r\n this.config.warnings.forEach(warning => {\r\n const options: any = {};\r\n if (warning.placeHolderVals && warning.placeHolderVals.length) {\r\n warning.placeHolderVals.forEach(placeholder => {\r\n Object.defineProperty(options, placeholder.varName, { value: placeholder.val, enumerable: true, writable: true, configurable: true });\r\n });\r\n }\r\n\r\n options.interpolation = { escapeValue: false };\r\n this.policyWarnings.push(this.i18n.tr(`errors:${warning.errorKey}` as string, options));\r\n });\r\n\r\n if(this.params.entityMode !== EntityMode.View && !this.config.isReadOnly && !this.model.clientDisclosureTypeId){\r\n this.getClientDisclosureTypeIdFromInsuredName();\r\n }\r\n\r\n if(this.params.entityMode === 'view' || this.wizard.entityType === EntityType.Form){\r\n this.stepMessage = 'Loading...'\r\n }\r\n\r\n this.ea.publish('stepRendered', this.stepMessage);\r\n } catch (e) {\r\n this.ea.publish('stepRendered', this.stepMessage);\r\n }\r\n }\r\n\r\n getClientDisclosureTypeIdFromInsuredName(){\r\n // time out needed so code runs after qce init - otherwise isDirty is set back to false\r\n setTimeout(() => {\r\n const insured = this.config.availableInsuredNames.find((x) => x.clientInsuredPartyId === this.model.clientInsuredPartyId);\r\n if(insured){\r\n this.model.clientDisclosureTypeId = insured.clientDisclosureTypeId;\r\n this.model.clientDisclosureType = insured.clientDisclosureType;\r\n\r\n this.isClientDisclosureTypeEditible = !this.model.clientDisclosureTypeId && this.appClientType === 'AU';\r\n this.isDirty = true;\r\n }\r\n }, 0);\r\n }\r\n\r\n bind() {\r\n this.initializeValidation();\r\n\r\n this.subscriptionEffectiveDate = this.bindingEngine.propertyObserver(this.model, 'effectiveDate').subscribe((newVal, oldVal) => {\r\n this.taskQueue.queueMicroTask(() => {\r\n this.isDirty = true;\r\n\r\n const actionType = mapActionTypeToEntityActionType(this.mappedActionType);\r\n\r\n // Only update for new & edit quotes\r\n if(typeof this.params.parentEntityId === 'undefined' || this.params.parentEntityId === '0'){\r\n if((newVal.includes('T') || newVal.includes('/')) && !createUTCMoment(newVal).isSame(createUTCMoment(oldVal))){\r\n if (this.model.effectiveDate !== '' && this.config.moveExpiryDateToMonthEnd && this.config.commonRenewalDate === null) {\r\n\r\n const effectiveDay = parseInt(momentToString(this.model.effectiveDate, 'D'));\r\n\r\n if(!isNaN(effectiveDay)){\r\n let newExpiryDate;\r\n\r\n if (effectiveDay <= 14) {\r\n newExpiryDate = createUTCMoment(this.model.effectiveDate).subtract('1', 'M').endOf('month').add('1', 'year');\r\n } else if (effectiveDay >= 15) {\r\n newExpiryDate = createUTCMoment(this.model.effectiveDate).endOf('month').add('1', 'year');\r\n }\r\n\r\n this.model.expiryDate = momentToString(newExpiryDate);\r\n }\r\n\r\n } else {\r\n\r\n let newExpiryDate;\r\n\r\n if(this.config.commonRenewalDate === null){\r\n\r\n newExpiryDate = createUTCMoment(this.model.effectiveDate).add('1', 'year');\r\n\r\n }else{\r\n\r\n const commonRenewalDay = parseInt(createUTCMoment(this.config.commonRenewalDate).format('D'));\r\n const commonRenewalMonth = parseInt(createUTCMoment(this.config.commonRenewalDate).format('M'));\r\n const commonRenewalYear = parseInt(createUTCMoment(this.config.commonRenewalDate).format('YYYY'));\r\n\r\n const effectiveDateYear = parseInt(createUTCMoment(this.model.effectiveDate).format('YYYY'));\r\n\r\n // default to common renewal date\r\n newExpiryDate = momentToString(this.config.defaultExpiryDate);\r\n\r\n // create new commomRenewalDate\r\n if(effectiveDateYear >= commonRenewalYear){\r\n newExpiryDate = moment([effectiveDateYear + 1, commonRenewalMonth - 1, commonRenewalDay]).format('DD/MM/YYYY');\r\n }\r\n }\r\n\r\n this.model.expiryDate = momentToString(newExpiryDate);\r\n }\r\n\r\n this.setExpiryDateOption(this.model.effectiveDate);\r\n }\r\n } else if (actionType === EntityActionType.Cancellation) {\r\n const momentEffectiveDate = createUTCMoment(this.model.effectiveDate);\r\n if (typeof momentEffectiveDate === 'object' && !momentEffectiveDate.isSame(createUTCMoment(this.model.expiryDate))) {\r\n this.model.expiryDate = momentToString(momentEffectiveDate);\r\n }\r\n }\r\n\r\n this.isPolicyPeriodValid();\r\n\r\n });\r\n });\r\n\r\n this.subscriptionExpiryDate = this.bindingEngine.propertyObserver(this.model, 'expiryDate').subscribe((newVal, oldVal) => {\r\n this.taskQueue.queueMicroTask(() => {\r\n this.isDirty = true;\r\n if ((newVal.includes('T') || newVal.includes('/')) && !createUTCMoment(newVal).isSame(createUTCMoment(oldVal))) {\r\n this.isPolicyPeriodValid();\r\n }\r\n });\r\n });\r\n\r\n this.subscriptionClientInsuredPartyId = this.bindingEngine.propertyObserver(this.model, 'clientInsuredPartyId').subscribe((newVal, oldVal) => {\r\n this.taskQueue.queueMicroTask(() => {\r\n this.isDirty = true;\r\n this.getClientDisclosureTypeIdFromInsuredName();\r\n });\r\n });\r\n\r\n this.subscriptionRiskClassTypeId = this.bindingEngine.propertyObserver(this.model, 'riskClassTypeId').subscribe((newVal, oldVal) => {\r\n this.taskQueue.queueMicroTask(() => {\r\n this.isDirty = true;\r\n this.selectedRiskClass = this.config.availableRiskGroups.find(x =>\r\n x.riskClassTypeId === this.model.riskClassTypeId);\r\n\r\n if (this.selectedRiskClass.availableSchemes.length) {\r\n\r\n this.model.availableSchemes = this.selectedRiskClass.availableSchemes;\r\n\r\n const defaultScheme = this.model.availableSchemes.filter(x => x.isDefaultScheme === true);\r\n\r\n if (defaultScheme.length === 1) {\r\n this.model.schemeFlag = true;\r\n this.model.schemeId = defaultScheme[0].schemeId;\r\n }\r\n\r\n } else {\r\n this.model.availableSchemes = [];\r\n this.model.schemeFlag = false;\r\n this.model.schemeId = null;\r\n }\r\n\r\n if (!this.classIsDirty && this.config.defaultRiskGroupToClassFlag) {\r\n this.model.class = this.selectedRiskClass.riskClassName;\r\n }\r\n\r\n this.setupRiskQuestions();\r\n\r\n });\r\n });\r\n\r\n this.subscriptionquestionsAndResponses = this.bindingEngine.propertyObserver(this.model, 'questionsAndResponses').subscribe((newVal, oldVal) => {\r\n this.taskQueue.queueMicroTask(() => {\r\n this.isDirty = true;\r\n });\r\n });\r\n\r\n pageScroll('client-content-container');\r\n\r\n if(this.params.entityMode !== EntityMode.View){\r\n this.isPolicyPeriodValid();\r\n }\r\n\r\n this.focusEffectiveDate = true;\r\n }\r\n\r\n unbind() {\r\n this.subscriptionEffectiveDate.dispose();\r\n this.subscriptionExpiryDate.dispose();\r\n this.subscriptionClientInsuredPartyId.dispose();\r\n this.subscriptionRiskClassTypeId.dispose();\r\n this.subscriptionquestionsAndResponses.dispose();\r\n }\r\n\r\n setExpiryDateOption(minDate?, maxDate?) {\r\n this.expiryOptions = {\r\n minDate: minDate,\r\n maxDate: maxDate\r\n };\r\n\r\n if(!this.expiryOptions.minDate) {\r\n delete this.expiryOptions.minDate\r\n }\r\n\r\n if(!this.expiryOptions.maxDate) {\r\n delete this.expiryOptions.maxDate\r\n }\r\n }\r\n\r\n async setupRiskQuestions() {\r\n this.showQce = false;\r\n let response;\r\n\r\n if (this.params.entityId) {\r\n response = await this.api.getEntity(this.params.id, this.params.entityId,\r\n this.mappedActionType, this.params.entityType, this.params.entityMode, true, this.model.riskClassTypeId, this.params.newActionType, this.isModifyPolicyPeriod, true);\r\n } else {\r\n response = await this.api.getNewEntity(this.params.id, this.mappedActionType,\r\n this.params.entityType, this.params.entityMode, true, this.model.riskClassTypeId);\r\n }\r\n\r\n if (!isEqual(this.model.questionsAndResponses, response.questionsAndResponses)) {\r\n this.model.questionsAndResponses = response.questionsAndResponses;\r\n }\r\n\r\n pageScroll('client-content-container');\r\n this.showQce = true;\r\n }\r\n\r\n fieldChanged() {\r\n this.isDirty = true;\r\n }\r\n\r\n classChanged() {\r\n this.classIsDirty = true;\r\n this.fieldChanged();\r\n }\r\n\r\n schemeCheckboxChanged() {\r\n if (!this.model.schemeFlag) {\r\n this.model.schemeId = null;\r\n this.showSchemeMustBeRemovedWarning = false;\r\n }\r\n\r\n this.isDirty = true;\r\n }\r\n\r\n createEntityModel() {\r\n // use clean model to reset any questions disabled by flow\r\n const cleanedModel = cleanQceModel(this.model.questionsAndResponses, true);\r\n\r\n // endorsementType only needed for new endorsments\r\n let endorsementType = \"\";\r\n if(typeof this.params.newActionType !== 'undefined' && parseInt(this.params.newActionType) === EntityActionType.Endorsement){\r\n endorsementType = this.isModifyPolicyPeriod ? \"ModifyPolicyPeriod\": \"FullPolicyPeriod\"\r\n }\r\n\r\n return {\r\n quoteOrPolicyVersionId: this.model.quoteOrPolicyVersionId,\r\n clientInsuredPartyId: this.model.clientInsuredPartyId,\r\n clientDisclosureTypeId: this.model.clientDisclosureTypeId,\r\n previousPolicyVersionId: parseInt(this.params.entityId) ?? null,\r\n endorsementType: endorsementType,\r\n policyPeriod: {\r\n effectiveDate: momentToISOString(this.model.effectiveDate),\r\n expiryDate: momentToISOString(this.model.expiryDate)\r\n },\r\n riskClassTypeDetails: {\r\n riskClassTypeId: this.model.riskClassTypeId,\r\n class: this.model.class,\r\n schemeFlag: this.model.schemeFlag,\r\n schemeId: this.model.schemeId\r\n },\r\n questionsAndResponses: cleanedModel,\r\n migrateToBotRisks: this.riskMigrationOption === 'true' ? true : false,\r\n isTakeUp: this.params.isTakeUp === 'true',\r\n isMultiplePayeeFlag: this.model.isMultiplePayeeFlag ?? false\r\n };\r\n }\r\n\r\n createPageModel(apiModel: GeneralDetailsApi) {\r\n\r\n if (apiModel === null) {\r\n return {\r\n quoteOrPolicyVersionId: null,\r\n effectiveDate: '',\r\n expiryDate: '',\r\n clientInsuredPartyId: null,\r\n clientDisclosureTypeId: null,\r\n clientDisclosureType: null,\r\n riskClassTypeId: null,\r\n class: '',\r\n schemeFlag: false,\r\n schemeId: null,\r\n availableSchemes: [],\r\n gstRecalculationRequired: null,\r\n warnings: [],\r\n questionsAndResponses: {\r\n groups: [],\r\n guid: ''\r\n } as IQceResponse,\r\n isMultiplePayeeFlag: null\r\n };\r\n }\r\n\r\n const selectedRiskClass = this.config.availableRiskGroups.find(x =>\r\n x.riskClassTypeId === apiModel.riskClassTypeDetails.riskClassTypeId);\r\n\r\n return {\r\n quoteOrPolicyVersionId: apiModel.quoteOrPolicyVersionId,\r\n effectiveDate: apiModel.policyPeriod.effectiveDate,\r\n expiryDate: apiModel.policyPeriod.expiryDate,\r\n clientInsuredPartyId: apiModel.clientInsuredPartyId,\r\n clientDisclosureTypeId: apiModel.clientDisclosureTypeId,\r\n clientDisclosureType: apiModel.clientDisclosureType,\r\n riskClassTypeId: apiModel.riskClassTypeDetails.riskClassTypeId,\r\n class: apiModel.riskClassTypeDetails.class,\r\n schemeFlag: apiModel.riskClassTypeDetails.schemeFlag,\r\n schemeId: apiModel.riskClassTypeDetails.schemeId,\r\n availableSchemes: selectedRiskClass.availableSchemes,\r\n gstRecalculationRequired: apiModel.gstRecalculationRequired,\r\n warnings: [],\r\n questionsAndResponses: apiModel.questionsAndResponses,\r\n isMultiplePayeeFlag: apiModel.isMultiplePayeeFlag\r\n };\r\n }\r\n\r\n mapConditions(conditions) {\r\n return conditions.map((condition) => {\r\n const { compareType, compareValue, fieldName, messageKey, placeHolderVals } = condition;\r\n const sourcedKey = messageKey.includes('ERR_') ? `errors:${messageKey}` : messageKey;\r\n\r\n // If we do not have placeholders\r\n if (!placeHolderVals) {\r\n return {\r\n compareType,\r\n compareValue,\r\n fieldName,\r\n messageKey: this.i18n.tr(sourcedKey),\r\n placeHolderVals\r\n };\r\n } else {\r\n const flattenedPlaceholderValues = placeHolderVals.reduce((result, value) => {\r\n const { varName, val } = value;\r\n\r\n Object.assign(result, { [varName]: val });\r\n return result;\r\n }, {});\r\n\r\n return {\r\n compareType,\r\n compareValue,\r\n fieldName,\r\n messageKey: this.i18n.tr(sourcedKey, flattenedPlaceholderValues)\r\n };\r\n }\r\n });\r\n }\r\n\r\n isPolicyPeriodValid() {\r\n const momentEffectiveDate = createUTCMoment(this.model.effectiveDate);\r\n const momentExpiryDate = createUTCMoment(this.model.expiryDate);\r\n\r\n this.showExpiryDateGreaterThanEffectiveWarning = false;\r\n this.expiryDateGreaterThanEffectiveAcknowledged = false;\r\n this.showPolicyPeriodWarning = false;\r\n this.hasErrorConditionError = false;\r\n this.errorTexts = [];\r\n this.policyWarningText = '';\r\n\r\n // Error: Expiry date must not be prior to Effective Date\r\n if (typeof momentExpiryDate === 'object' && momentExpiryDate?.isBefore(momentEffectiveDate)) {\r\n this.hasErrorConditionError = true;\r\n this.errorTexts.push(this.i18n.tr('ERR_EXPIRY_DATE_BEFORE_EFFECTIVE_DATE'));\r\n }\r\n\r\n if (this?.config?.warningConditions) {\r\n this.mapConditions(this.config.warningConditions).map((condition) => {\r\n const { compareType, compareValue, fieldName, messageKey } = condition;\r\n\r\n const momentCompareValue = createUTCMoment(compareValue);\r\n\r\n if (fieldName === 'EffectiveDate') {\r\n if (compareType === 'LessThan') {\r\n if (typeof momentEffectiveDate === 'object' && momentEffectiveDate?.isBefore(momentCompareValue)) {\r\n this.showPolicyPeriodWarning = true;\r\n this.policyWarningText = (this.i18n.tr(`errors:${messageKey}`));\r\n }\r\n } else if (compareType === 'GreaterThan') {\r\n if (typeof momentEffectiveDate === 'object' && momentEffectiveDate?.isAfter(momentCompareValue)) {\r\n this.showPolicyPeriodWarning = true;\r\n this.policyWarningText = (this.i18n.tr(`errors:${messageKey}`));\r\n }\r\n }\r\n }\r\n });\r\n }\r\n\r\n const actionType = mapActionTypeToEntityActionType(this.mappedActionType);\r\n\r\n if (actionType === EntityActionType.NewBusiness\r\n || actionType === EntityActionType.Reinstatement\r\n || actionType === EntityActionType.Renewal\r\n || actionType === EntityActionType.Endorsement) {\r\n\r\n if (momentExpiryDate && momentExpiryDate.diff(momentEffectiveDate, 'days') > 382) {\r\n this.showExpiryDateGreaterThanEffectiveWarning = true;\r\n }\r\n }\r\n }\r\n\r\n async validate(redirectAfterCreation = true) {\r\n if (this.params.entityType === EntityType.Policy && this.params.entityMode === EntityMode.New) {\r\n this.isDirty = true;\r\n if(this.params.newActionType !== null){\r\n this.mappedActionType = mapActionTypeToEntityActionType(this.params.newActionType);\r\n }\r\n this.params.entityType = EntityType.Incomplete;\r\n }\r\n\r\n if(!this.isDirty && this.config.botRiskMigrationAvailable){\r\n this.isDirty = true\r\n }\r\n\r\n if (!this.isDirty && this.model.clientInsuredPartyId === null && this.wizard.entityType !== EntityType.Form) {\r\n this.isDirty = true;\r\n }\r\n\r\n if (this.isDirty) {\r\n // validate form\r\n const result = await this.validationController.validate();\r\n\r\n if(this.wizard.entityType !== EntityType.Form) {\r\n if (this.showPolicyPeriodWarning && !this.policyPeriodWarningAcknowledged) {\r\n result.valid = false;\r\n }\r\n\r\n if (this.showExpiryDateGreaterThanEffectiveWarning && !this.expiryDateGreaterThanEffectiveAcknowledged) {\r\n result.valid = false;\r\n }\r\n\r\n if (this.hasErrorConditionError) {\r\n result.valid = false;\r\n }\r\n\r\n if (this.showSchemeMustBeRemovedWarning) {\r\n result.valid = false;\r\n }\r\n\r\n if (this.config.botRiskMigrationAvailable && this.riskMigrationOption === undefined) {\r\n result.valid = false;\r\n }\r\n\r\n if (this.config.riskGroupQuestionsEnabled && this.params.isTakeUp === 'false' && !validateQce(this.model)) {\r\n result.valid = false;\r\n };\r\n }\r\n\r\n if (result.valid) {\r\n\r\n const entityModel = this.createEntityModel();\r\n\r\n // If we don't have a entityId, we're creating a new entity item, not editing one\r\n if (!entityModel.quoteOrPolicyVersionId) {\r\n try {\r\n const response = await this.api.newEntity(this.params.id, this.mappedActionType, this.params.entityType, entityModel);\r\n\r\n // Handle QCE issues and mark questions as errored if needbe\r\n // Only show errors when save failed\r\n if(Array.isArray(response)) {\r\n handleQceIssues(response, this);\r\n }\r\n\r\n if (!response.hasOwnProperty('entityId')) {\r\n throw new Error('save failed');\r\n }\r\n\r\n if (redirectAfterCreation) {\r\n this.router.navigateToRoute('wizard', {\r\n id: this.params.id,\r\n parentEntityId: response.policyId ? response.policyId : 0,\r\n entityId: response.entityId,\r\n actionType: this.mappedActionType,\r\n entityType: this.params.entityType,\r\n entityMode: EntityMode.Edit,\r\n step: this.wizard.stepClickedValue ? this.wizard.stepClickedValue : '2',\r\n statusTypeId: this.wizard.statusTypeId,\r\n versionNo: this.wizard.versionNo,\r\n isTakeUp: this.params.isTakeUp,\r\n isEditTakeUpAction: false,\r\n });\r\n } else {\r\n return true;\r\n }\r\n } catch (e) {\r\n return false;\r\n }\r\n } else {\r\n try {\r\n if (this.config.isReadOnly) {\r\n return true;\r\n }\r\n\r\n const response = await this.api.updateInitialDetails(\r\n this.params.id, this.mappedActionType, this.params.entityType, entityModel.quoteOrPolicyVersionId, entityModel);\r\n\r\n // Handle QCE issues and mark questions as errored if needbe\r\n // Only show errors when save failed\r\n if(Array.isArray(response)) {\r\n handleQceIssues(response, this);\r\n }\r\n\r\n // update failed\r\n if (!response.hasOwnProperty('entityId')) {\r\n throw new Error('update failed');\r\n }\r\n\r\n // check for warnings\r\n if (response.hasOwnProperty('warnings') && response?.warnings?.length) {\r\n this.model.warnings = response.warnings;\r\n this.isDirty = false;\r\n return false;\r\n }\r\n\r\n return result.valid\r\n } catch (e) {\r\n return false;\r\n }\r\n }\r\n }\r\n } else {\r\n\r\n let valid = true;\r\n\r\n if(this.wizard.entityType !== EntityType.Form) {\r\n if (this.showPolicyPeriodWarning && !this.policyPeriodWarningAcknowledged) {\r\n valid = false;\r\n }\r\n\r\n if (this.showExpiryDateGreaterThanEffectiveWarning && !this.expiryDateGreaterThanEffectiveAcknowledged) {\r\n valid = false;\r\n }\r\n }\r\n\r\n return valid;\r\n }\r\n }\r\n\r\n getQuestionIds(errors): number[] {\r\n if (!errors) {\r\n return [];\r\n }\r\n\r\n return errors.reduce((result, value) => {\r\n if (value.errors) {\r\n value.errors.reduce((result2, value2) => {\r\n if (value2.errorKey.includes('ERR_') && value2.placeHolderVals) {\r\n value2.placeHolderVals.reduce((result3, value3) => {\r\n const { varName, val } = value3;\r\n\r\n if (varName === 'QuestionId') {\r\n result.push(parseInt(val));\r\n }\r\n }, []);\r\n }\r\n }, []);\r\n }\r\n\r\n return result;\r\n }, []);\r\n }\r\n\r\n async recalcGst() {\r\n this.isProcessing = true;\r\n await this.api.patchQuoteToRecalcGst(this.params.id, this.params.entityId, this.mappedActionType, this.params.entityType);\r\n this.isProcessing = false;\r\n this.model.gstRecalculationRequired = false;\r\n }\r\n\r\n closeQuote() {\r\n if (this.params.entityType === EntityType.Quote) {\r\n this.router.navigateToRoute('clientQuotes', { id: this.params.id, quoteId: this.params.entityId });\r\n } else if (this.params.entityType === EntityType.Incomplete) {\r\n this.router.navigateToRoute('clientPolicies', {\r\n id: this.params.id,\r\n policyId: this.params.parentEntityId,\r\n policyVersionId: 0,\r\n statusTypeId: this.params.statusTypeId,\r\n versionNo: this.params.versionNo\r\n });\r\n }\r\n }\r\n\r\n async acknowledgeWarnings() {\r\n this.model.warnings = [];\r\n }\r\n\r\n @computedFrom('model.isMultiplePayeeFlag', 'config.multiPayeeFlagEnabled','config.displayMultiPayeeFlag', 'config.selectMultiPayeeAllowed', 'config.removeMultiPayeeAllowed', 'config.removeMultiPayeeRequired')\r\n get isMultiPayeesDisabled() {\r\n\r\n // multiPayeeFlagEnabled - the checkbox should only be enabled where this property is true\r\n // displayMultiPayeeFlag - the checkbox should only be visible where this property is true\r\n // selectMultiPayeeAllowed - the checkbox may only be checked where this property is true\r\n // removeMultiPayeeAllowed - the checkbox may only be unchecked where this property is true\r\n // removeMultiPayeeRequired - the checkbox must be unchecked where this property is true\r\n\r\n let result = true;\r\n // Checked, but cannot be unchecked\r\n if(this.model.isMultiplePayeeFlag) {\r\n if(this.config.multiPayeeFlagEnabled && this.config.displayMultiPayeeFlag){\r\n result = !this.config.removeMultiPayeeAllowed;\r\n }\r\n }\r\n\r\n // Not checked, but can be\r\n if(!this.model.isMultiplePayeeFlag) {\r\n if(this.config.multiPayeeFlagEnabled && this.config.displayMultiPayeeFlag){\r\n result = !this.config.selectMultiPayeeAllowed;\r\n }\r\n }\r\n\r\n return result;\r\n\r\n }\r\n}\r\n"],"names":["http","load","clientId","Promise","endpoint","environment","uri","this","fetch","json","map","w","Object","assign","copy","quoteId","body","method","addEditComment","comment","newEntityConfig","actionType","entityType","newActionType","mode","isNewTakeUp","newEntityConfigWithEntityId","entityId","isModifyPolicyPeriod","getEntityConfig","editTakeUp","result","ok","newEntity","updateInitialDetails","getEntity","questionsResponsesOnly","riskClassTypeId","includeValidationIssues","getNewEntity","patchQuoteToRecalcGst","validationQuestions","autoinject","Api","api","i18n","router","validationControllerFactory","lookupService","toast","taskQueue","ea","bindingEngine","wizard","styles","isDirty","classIsDirty","showQce","model","quoteOrPolicyVersionId","effectiveDate","expiryDate","clientInsuredPartyId","clientDisclosureTypeId","clientDisclosureType","class","schemeFlag","schemeId","availableSchemes","gstRecalculationRequired","warnings","questionsAndResponses","groups","guid","isMultiplePayeeFlag","stepCanProceed","showPolicyPeriodWarning","showExpiryDateGreaterThanEffectiveWarning","hasErrorConditionError","policyPeriodWarningAcknowledged","expiryDateGreaterThanEffectiveAcknowledged","errorTexts","policyWarningTexts","expiryDateGreaterThanEffectiveText","showSchemeMustBeRemovedWarning","schemeMustBeRemovedWarningText","policyWarnings","focusEffectiveDate","isProcessing","stepMessage","validationController","createForCurrentScope","addRenderer","initializeValidation","ValidationRules","value","obj","includes","e","required","when","params","isTakeUp","ensure","appClientType","satisfiesRule","on","activate","parseInt","mappedActionType","actionTypeLabel","id","clientDisclosureTypes","entityMode","isEditTakeUpAction","config","createPageModel","undefined","availableInsuredNames","length","schemeRemovalAllowed","schemeRemovalRequired","defaultEffectiveDate","defaultExpiryDate","setExpiryDateOption","effectiveDateValidRange","effectiveOptions","minDate","minAllowedDate","maxDate","maxAllowedDate","availableRiskGroups","selectedRiskClass","find","x","lmiRiskCoachAvailable","lmiRiskCoachLink","riskClassName","forEach","warning","options","placeHolderVals","placeholder","defineProperty","varName","val","enumerable","writable","configurable","interpolation","escapeValue","push","tr","errorKey","isReadOnly","getClientDisclosureTypeIdFromInsuredName","publish","setTimeout","insured","isClientDisclosureTypeEditible","bind","subscriptionEffectiveDate","propertyObserver","subscribe","newVal","oldVal","queueMicroTask","parentEntityId","isSame","moveExpiryDateToMonthEnd","commonRenewalDate","effectiveDay","isNaN","newExpiryDate","subtract","endOf","add","commonRenewalDay","format","commonRenewalMonth","commonRenewalYear","effectiveDateYear","momentEffectiveDate","isPolicyPeriodValid","subscriptionExpiryDate","subscriptionClientInsuredPartyId","subscriptionRiskClassTypeId","defaultScheme","filter","isDefaultScheme","defaultRiskGroupToClassFlag","setupRiskQuestions","subscriptionquestionsAndResponses","unbind","dispose","expiryOptions","response","isEqual","fieldChanged","classChanged","schemeCheckboxChanged","createEntityModel","cleanedModel","endorsementType","previousPolicyVersionId","policyPeriod","riskClassTypeDetails","migrateToBotRisks","riskMigrationOption","apiModel","mapConditions","conditions","condition","compareType","compareValue","fieldName","messageKey","sourcedKey","flattenedPlaceholderValues","reduce","momentExpiryDate","policyWarningText","isBefore","warningConditions","momentCompareValue","isAfter","diff","validate","redirectAfterCreation","botRiskMigrationAvailable","valid","riskGroupQuestionsEnabled","entityModel","Array","isArray","hasOwnProperty","Error","navigateToRoute","policyId","step","stepClickedValue","statusTypeId","versionNo","getQuestionIds","errors","result2","value2","result3","value3","recalcGst","closeQuote","policyVersionId","acknowledgeWarnings","multiPayeeFlagEnabled","displayMultiPayeeFlag","removeMultiPayeeAllowed","selectMultiPayeeAllowed","computedFrom","I18N","ValidationControllerFactory","TaskQueue","EventAggregator","BindingEngine","Wizard","Step1"],"sourceRoot":""}