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,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?e4d8","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--flat____Xo5MP btn____jS4FM btn--footer____kKOd7 btn____jS4FM\",\"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\",\"badge-pop\":\"badge-pop____aibnw\",\"btn--icon-no-border\":\"btn--icon-no-border____Ls_jg\",\"btn--icon-task\":\"btn--icon-task____EQEre btn--icon____Paqe_ btn____jS4FM\",\"btn--icon-document\":\"btn--icon-document____h_FAT btn--icon____Paqe_ btn____jS4FM\",\"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 btn--icon____Paqe_ btn____jS4FM\",\"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-eye\":\"btn--icon-eye____fBUkD btn--icon____Paqe_ btn____jS4FM\",\"btn--icon-eye-slash\":\"btn--icon-eye-slash____IuHJP btn--icon-eye____fBUkD 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-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____jS4FM\",\"btn--back-to-sign-in\":\"btn--back-to-sign-in____BbCR1 btn--back____yQoz3 btn____jS4FM\",\"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\",\"fieldset\":\"fieldset____ZTqBx\",\"fieldset-instruction\":\"fieldset-instruction____IIWoh\",\"fieldset--no-padding\":\"fieldset--no-padding____U4yVe fieldset____ZTqBx\",\"fieldset--alt\":\"fieldset--alt_____Z7Iv fieldset____ZTqBx\",\"view-password\":\"view-password____OorOy\",\"input-search\":\"input-search____Fn003\",\"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_\",\"input-toggle\":\"input-toggle____cmCOl\",\"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\",\"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\":\"button-options____K8Dda\",\"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\",\"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\",\"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\",\"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\",\"view-block-checkbox--alert--referrer-fee\":\"view-block-checkbox--alert--referrer-fee____Vi2gl view-block-checkbox--alert____dsokn view-block--alert____aFv6c view-block____Ie22e view-block-checkbox____wtXiw view-block____Ie22e\",\"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.FormQuote){\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.FormQuote) {\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.FormQuote){\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.FormQuote) {\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.FormQuote) {\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.FormQuote) {\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","clientEndpoints","quotes","uri","this","fetch","json","map","w","Object","assign","copy","quoteId","body","method","addEditComment","comment","newEntityConfig","actionType","entityType","newActionType","mode","isNewTakeUp","wizard","initialDetails","config","new","newEntityConfigWithEntityId","entityId","isModifyPolicyPeriod","newEntity","getEntityConfig","editTakeUp","detail","result","ok","post","updateInitialDetails","put","getEntity","questionsResponsesOnly","riskClassTypeId","includeValidationIssues","get","getNewEntity","getNew","patchQuoteToRecalcGst","patch","validationQuestions","autoinject","Api","api","i18n","router","validationControllerFactory","lookupService","toast","taskQueue","ea","bindingEngine","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","off","customRule","value","obj","includes","ensure","e","required","when","params","isTakeUp","appClientType","satisfiesRule","on","activate","FormQuote","Quote","parseInt","ModifyPolicyPeriodEndorsement","Endorsement","mappedActionType","actionTypeLabel","id","clientDisclosureTypes","entityMode","isEditTakeUpAction","createPageModel","undefined","NewBusiness","New","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","View","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","Cancellation","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","Reinstatement","Renewal","diff","validate","redirectAfterCreation","Policy","Incomplete","botRiskMigrationAvailable","valid","riskGroupQuestionsEnabled","entityModel","Array","isArray","hasOwnProperty","Error","navigateToRoute","policyId","Edit","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":""}