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N,KACF,EAAAG,mBArCHuH,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/insured-locations-risks/insured-locations-risks.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?00b3","webpack://iadviser/./src/routes/app-adviser/client/wizard/steps/quote/general-details/general-details.ts","webpack://iadviser/./src/routes/app-adviser/client/wizard/steps/quote/insured-locations-risks/api.ts","webpack://iadviser/./src/routes/app-adviser/client/wizard/steps/quote/insured-locations-risks/insured-locations-risks.css?46c8","webpack://iadviser/./src/routes/app-adviser/client/wizard/steps/quote/insured-locations-risks/insured-locations-risks.ts"],"sourcesContent":["// Module\nvar code = \"\\r\\n\";\n// Exports\nexport default code;","// 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 private 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): Promise {\r\n const endpoint = environment.clientEndpoints.wizard.initialDetails.config.new;\r\n const uri = endpoint.uri([clientId, actionType, entityType, newActionType, mode]);\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): Promise {\r\n const endpoint = environment.clientEndpoints.wizard.initialDetails.config.detail;\r\n const uri = endpoint.uri([clientId, actionType, entityType, entityId, mode]);\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): 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]);\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\",\"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--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 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-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-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--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\",\"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-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\",\"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\",\"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--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\",\"confirmation-content--alert\":\"confirmation-content--alert____G1zGV 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-button-group--with-distribute\":\"wizard-button-group--with-distribute____l9MaB wizard-button-group____TGWvv\",\"wizard-nav-group\":\"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\",\"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\",\"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 } 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 { getAppClient } from 'resources/parse-jwt';\r\n\r\n@autoinject()\r\nexport class Step1 {\r\n private styles = styles;\r\n public validationController: ValidationController;\r\n public config: GeneralDetailsConfig;\r\n private params: IStepModel;\r\n private 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 appClient;\r\n private riskMigrationOption: 'true' | 'false';\r\n\r\n private 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 };\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 riskClassTypesByInsuredName = [];\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 systemParameters;\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 private 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 private api: Api,\r\n private i18n: I18N,\r\n private router: AppRouter,\r\n private validationControllerFactory: ValidationControllerFactory,\r\n private lookupService: LookupDataService,\r\n private toast: IaToastService,\r\n private taskQueue: TaskQueue,\r\n private ea: EventAggregator,\r\n private bindingEngine: BindingEngine,\r\n private 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 .ensure((e: any) => e.clientDisclosureTypeId)\r\n .required()\r\n .when((e) => this.appClient === '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 .when((e) => e.clientInsuredPartyId > 0)\r\n .ensure((e: any) => e.class)\r\n .required()\r\n .when((e) => e.clientInsuredPartyId > 0)\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.appClient = getAppClient();\r\n this.params = model;\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.systemParameters = await this.lookupService.systemParameters();\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);\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, this.isModifyPolicyPeriod));\r\n\r\n this.getRiskClassTypesByInsuredName();\r\n } else {\r\n\r\n // New must always save\r\n this.isDirty = true;\r\n\r\n if (this.params.entityType === EntityType.Quote) {\r\n this.mappedActionType = EntityActionType.NewBusiness;\r\n this.params.entityMode = EntityMode.New;\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);\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 this.getRiskClassTypesByInsuredName();\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) {\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'){\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.appClient === '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.systemParameters.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.getRiskClassTypesByInsuredName();\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.systemParameters.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 getRiskClassTypesByInsuredName() {\r\n this.riskClassTypesByInsuredName = [];\r\n\r\n if (this.model.clientInsuredPartyId > 0) {\r\n const selectedInsuredName = this.config.availableInsuredNames.find(x =>\r\n x.clientInsuredPartyId === this.model.clientInsuredPartyId);\r\n\r\n selectedInsuredName.compatibleRiskClassTypeIds.forEach(x => {\r\n const riskClassType = this.config.availableRiskGroups.find(\r\n a => a.riskClassTypeId === x\r\n );\r\n\r\n this.riskClassTypesByInsuredName.push(riskClassType);\r\n });\r\n\r\n this.riskClassTypesByInsuredName.sort((a, b) => a.riskClassTypeId - b.riskClassTypeId);\r\n\r\n const index = this.riskClassTypesByInsuredName.findIndex((x) => x.riskClassTypeId === this.model.riskClassTypeId);\r\n if(index < 0){\r\n this.model.riskClassTypeId = null;\r\n this.isDirty = true;\r\n }\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);\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 (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 };\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 };\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 };\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) {\r\n // validate form\r\n const result = await this.validationController.validate();\r\n\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 (!validateQce(this.model)) {\r\n result.valid = false;\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 handleQceIssues(response, this);\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 });\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 handleQceIssues(response, this);\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 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 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","import { RequestMethod } from '../../../../../../../resources/endpoints/endpoints';\r\nimport { EntityActionType, EntityType, EntityMode } from 'routes/app-adviser/client/quotes/interfaces';\r\nimport { autoinject } from 'aurelia-framework';\r\nimport { HttpClient, json } from 'aurelia-fetch-client';\r\nimport { InsuredLocationsRisksConfig, InsuredLocation, Risk, InsuredRisk } from 'resources/models/client';\r\nimport { environment } from 'environment';\r\nimport { OperationModel } from 'resources/models/operation';\r\nimport { entityWizardErrorHandler } from 'resources/utilities/api-error-handler';\r\n\r\n@autoinject()\r\nexport class Api {\r\n constructor(private http: HttpClient) { }\r\n\r\n async getInsuredLocationsRisksConfig(\r\n clientId: number, entityActionType: EntityActionType,\r\n entityType: EntityType, entityId: number, mode: EntityMode\r\n ): Promise {\r\n const endpoint = environment.clientEndpoints.wizard.insuredLocationsRisks.config;\r\n const uri = endpoint.uri([clientId, entityActionType, entityType, entityId, mode]);\r\n\r\n const result = await this.http.fetch(uri, { method: endpoint.method });\r\n\r\n if (result.ok) {\r\n return result.json();\r\n }\r\n\r\n entityWizardErrorHandler({\r\n methodName: 'getInsuredLocationsRisksConfig', clientId, entityActionType, entityType, entityId, mode\r\n });\r\n }\r\n\r\n async getInsuredLocations(\r\n clientId: number, entityActionType: EntityActionType,\r\n entityType: EntityType, entityId: number, includeRisks: boolean\r\n ): Promise {\r\n const endpoint = environment.clientEndpoints.wizard.insuredLocationsRisks.getLocations;\r\n const uri = endpoint.uri([clientId, entityActionType, entityType, entityId, includeRisks]);\r\n\r\n const result = await this.http.fetch(uri, { method: endpoint.method });\r\n\r\n if (result.ok) {\r\n return result.json();\r\n }\r\n\r\n entityWizardErrorHandler({ methodName: 'getInsuredLocations', clientId, entityActionType, entityType, entityId });\r\n }\r\n\r\n async getAvailableRisks(\r\n clientId: number, entityActionType: EntityActionType,\r\n entityType: EntityType, entityId: number\r\n ): Promise {\r\n const endpoint = environment.clientEndpoints.wizard.insuredLocationsRisks.getAvailableRisks;\r\n const uri = endpoint.uri([clientId, entityActionType, entityType, entityId]);\r\n\r\n const result = await this.http.fetch(uri, { method: endpoint.method });\r\n\r\n if (result.ok) {\r\n return result.json();\r\n }\r\n\r\n entityWizardErrorHandler({ methodName: 'getAvailableRisks', clientId, entityActionType, entityType, entityId });\r\n }\r\n\r\n async getInsuredRisksForLocation(\r\n clientId: number, entityActionType: EntityActionType, entityType: EntityType,\r\n entityId: number, quoteOrVersionSituationId: number\r\n ): Promise {\r\n const endpoint = environment.clientEndpoints.wizard.insuredLocationsRisks.getRisksForLocation;\r\n const uri = endpoint.uri([clientId, entityActionType, entityType, entityId, quoteOrVersionSituationId]);\r\n\r\n const result = await this.http.fetch(uri, { method: endpoint.method });\r\n\r\n if (result.ok) {\r\n return result.json();\r\n }\r\n\r\n entityWizardErrorHandler({\r\n methodName: 'getInsuredRisksForLocation', clientId, entityActionType, entityType, entityId, quoteOrVersionSituationId\r\n });\r\n }\r\n\r\n async createInsuredLocation(\r\n clientId: number, entityActionType: EntityActionType,\r\n entityType: EntityType, entityId: number, location: InsuredLocation\r\n ): Promise {\r\n const endpoint = environment.clientEndpoints.wizard.insuredLocationsRisks.createLocation;\r\n const uri = endpoint.uri([clientId, entityActionType, entityType, entityId]);\r\n location.entityId = location.entityId || entityId;\r\n\r\n const result = await this.http.fetch(uri, {\r\n method: endpoint.method,\r\n body: json(location)\r\n });\r\n\r\n if (result.ok) {\r\n return result.json();\r\n }\r\n\r\n entityWizardErrorHandler({ methodName: 'createInsuredLocation', clientId, entityActionType, entityType, entityId, location });\r\n }\r\n\r\n async updateInsuredLocation(\r\n clientId: number, entityActionType: EntityActionType, entityType: EntityType,\r\n entityId: number, quoteOrVersionSituationId: number, location: InsuredLocation\r\n ): Promise {\r\n const endpoint = environment.clientEndpoints.wizard.insuredLocationsRisks.updateLocation;\r\n const uri = endpoint.uri([clientId, entityActionType, entityType, entityId, quoteOrVersionSituationId]);\r\n location.entityId = location.entityId || entityId;\r\n location.situationId = location.situationId || quoteOrVersionSituationId;\r\n\r\n const result = await this.http.fetch(uri, {\r\n method: endpoint.method,\r\n body: json(location)\r\n });\r\n\r\n if (result.ok) {\r\n return result.json();\r\n }\r\n\r\n entityWizardErrorHandler({\r\n methodName: 'updateInsuredLocation', clientId, entityActionType, entityType, entityId, quoteOrVersionSituationId, location\r\n });\r\n }\r\n\r\n async updateInsuredLocationActiveFlag(\r\n clientId: number, entityActionType: EntityActionType.Endorsement, entityType: EntityType,\r\n entityId: number, quoteOrVersionSituationId: number, isActive: boolean\r\n ): Promise {\r\n const endpoint = environment.clientEndpoints.wizard.insuredLocationsRisks.updateLocationActiveFlag;\r\n const uri = endpoint.uri([clientId, entityActionType, entityType, entityId, quoteOrVersionSituationId]);\r\n\r\n const result = await this.http.fetch(uri, {\r\n method: endpoint.method,\r\n body: json(new OperationModel('replace', '/activeFlag', isActive))\r\n });\r\n\r\n return result.ok;\r\n }\r\n\r\n async deleteInsuredLocation(\r\n clientId: number, entityActionType: EntityActionType, entityType: EntityType,\r\n entityId: number, quoteOrVersionSituationId: number\r\n ): Promise {\r\n const endpoint = environment.clientEndpoints.wizard.insuredLocationsRisks.deleteLocation;\r\n const uri = endpoint.uri([clientId, entityActionType, entityType, entityId, quoteOrVersionSituationId]);\r\n\r\n const result = await this.http.fetch(uri, { method: endpoint.method });\r\n\r\n return result.ok;\r\n }\r\n\r\n async activateInsuredLocation(\r\n clientId: number, entityActionType: EntityActionType, entityType: EntityType,\r\n entityId: number, quoteOrVersionSituationId: number\r\n ): Promise {\r\n const endpoint = environment.clientEndpoints.wizard.insuredLocationsRisks.deleteLocation;\r\n const uri = endpoint.uri([clientId, entityActionType, entityType, entityId, quoteOrVersionSituationId]);\r\n\r\n const result = await this.http.fetch(uri, {\r\n method: RequestMethod.patch,\r\n body: json([{ 'op': 'replace', 'path': '/activeFlag', 'value': true }])\r\n });\r\n\r\n return result.ok;\r\n }\r\n\r\n async deactivateInsuredLocation(\r\n clientId: number, entityActionType: EntityActionType, entityType: EntityType,\r\n entityId: number, quoteOrVersionSituationId: number\r\n ): Promise {\r\n const endpoint = environment.clientEndpoints.wizard.insuredLocationsRisks.deleteLocation;\r\n const uri = endpoint.uri([clientId, entityActionType, entityType, entityId, quoteOrVersionSituationId]);\r\n\r\n const result = await this.http.fetch(uri, {\r\n method: RequestMethod.patch,\r\n body: json([{ 'op': 'replace', 'path': '/activeFlag', 'value': false }])\r\n });\r\n\r\n return result.ok;\r\n }\r\n\r\n async createInsuredRisk(\r\n clientId: number, entityActionType: EntityActionType, entityType: EntityType,\r\n entityId: number, quoteOrVersionSituationId: number, riskArray: any[]\r\n ): Promise {\r\n const endpoint = environment.clientEndpoints.wizard.insuredLocationsRisks.createRisk;\r\n const uri = endpoint.uri([clientId, entityActionType, entityType, entityId, quoteOrVersionSituationId]);\r\n\r\n const result = await this.http.fetch(uri, {\r\n method: endpoint.method,\r\n body: json(riskArray)\r\n });\r\n\r\n if (result.ok) {\r\n return result.json();\r\n }\r\n\r\n entityWizardErrorHandler({\r\n methodName: 'createInsuredRisk', clientId, entityActionType, entityType, entityId, quoteOrVersionSituationId, riskArray\r\n });\r\n }\r\n\r\n async updateInsuredRiskActiveFlag(\r\n clientId: number, entityActionType: EntityActionType.Endorsement, entityType: EntityType,\r\n entityId: number, quoteOrVersionSituationId: number, situationRiskId: number, isActive: boolean\r\n ): Promise {\r\n const endpoint = environment.clientEndpoints.wizard.insuredLocationsRisks.updateRiskActiveFlag;\r\n const uri = endpoint.uri([\r\n clientId, entityActionType, entityType, entityId, quoteOrVersionSituationId, situationRiskId\r\n ]);\r\n\r\n const result = await this.http.fetch(uri, {\r\n method: endpoint.method,\r\n body: json(new OperationModel('replace', '/activeFlag', isActive))\r\n });\r\n\r\n return result.ok;\r\n }\r\n\r\n async deleteInsuredRisk(\r\n clientId: number, entityActionType: EntityActionType, entityType: EntityType,\r\n entityId: number, quoteOrVersionSituationId: number, situationRiskId: number\r\n ): Promise {\r\n const endpoint = environment.clientEndpoints.wizard.insuredLocationsRisks.deleteRisk;\r\n const uri = endpoint.uri([\r\n clientId, entityActionType, entityType, entityId, quoteOrVersionSituationId, situationRiskId\r\n ]);\r\n\r\n const result = await this.http.fetch(uri, { method: endpoint.method });\r\n\r\n return result.ok;\r\n }\r\n\r\n async activateInsuredRisk(\r\n clientId: number, entityActionType: EntityActionType, entityType: EntityType,\r\n entityId: number, quoteOrVersionSituationId: number, situationRiskId: number\r\n ): Promise {\r\n const endpoint = environment.clientEndpoints.wizard.insuredLocationsRisks.deleteRisk;\r\n const uri = endpoint.uri([\r\n clientId, entityActionType, entityType, entityId, quoteOrVersionSituationId, situationRiskId\r\n ]);\r\n\r\n const result = await this.http.fetch(uri, {\r\n method: RequestMethod.patch,\r\n body: json([{ 'op': 'replace', 'path': '/activeFlag', 'value': true }])\r\n });\r\n\r\n return result.ok;\r\n }\r\n async deactivateInsuredRisk(\r\n clientId: number, entityActionType: EntityActionType, entityType: EntityType,\r\n entityId: number, quoteOrVersionSituationId: number, situationRiskId: number\r\n ): Promise {\r\n const endpoint = environment.clientEndpoints.wizard.insuredLocationsRisks.deleteRisk;\r\n const uri = endpoint.uri([\r\n clientId, entityActionType, entityType, entityId, quoteOrVersionSituationId, situationRiskId\r\n ]);\r\n\r\n const result = await this.http.fetch(uri, {\r\n method: RequestMethod.patch,\r\n body: json([{ 'op': 'replace', 'path': '/activeFlag', 'value': false }])\r\n });\r\n\r\n return result.ok;\r\n }\r\n}\r\n","// extracted by mini-css-extract-plugin\nexport default {\"screen-container\":\"screen-container____sAs9s\",\"screen-container--client\":\"screen-container--client____uM6Lg screen-container____sAs9s\",\"screen-container--dashboard\":\"screen-container--dashboard____uwaLT screen-container--client____uM6Lg screen-container____sAs9s\",\"screen-container--home\":\"screen-container--home_____5wgB screen-container____sAs9s\",\"screen-container--menu\":\"screen-container--menu____gnMEF screen-container____sAs9s\",\"screen-container--accounts-override\":\"screen-container--accounts-override____gMblA screen-container____sAs9s\",\"screen-container--accounts-override-xxl\":\"screen-container--accounts-override-xxl____fV1LM screen-container____sAs9s\",\"empty-state\":\"empty-state____v1RTL\",\"empty-state--icon\":\"empty-state--icon____cZFDu\",\"empty-heading\":\"empty-heading____ntI2w\",\"empty-subheading\":\"empty-subheading____bUX6c\",\"kyc\":\"kyc____X59M9\",\"advice\":\"advice____GwaWe\",\"insured\":\"insured____mJnFf\",\"quotes\":\"quotes____oky5m\",\"policies\":\"policies____KDQZB\",\"claims\":\"claims____xpkF4\",\"tasks\":\"tasks____HpUJR\",\"documents\":\"documents____sm92n\",\"btn\":\"btn____O4epw\",\"btn--flat\":\"btn--flat____a5SRx btn____O4epw\",\"btn--submit\":\"btn--submit____KByLl btn____O4epw\",\"btn--delete\":\"btn--delete____NbuBQ btn____O4epw\",\"btn--link\":\"btn--link____eBZ7i btn____O4epw\",\"btn--inline-text-link\":\"btn--inline-text-link____rl7we btn--link____eBZ7i btn____O4epw\",\"btn--footer\":\"btn--footer____ccJog btn____O4epw\",\"btn--footer-submit\":\"btn--footer-submit____yiCs9 btn--submit____KByLl btn____O4epw btn--footer____ccJog btn____O4epw\",\"btn--footer-cancel\":\"btn--footer-cancel____A9l8V btn--flat____a5SRx btn____O4epw btn--footer____ccJog btn____O4epw\",\"btn--footer-delete\":\"btn--footer-delete____uymkJ btn--delete____NbuBQ btn____O4epw btn--footer____ccJog btn____O4epw\",\"btn--footer-combo\":\"btn--footer-combo____v1xcx btn--footer____ccJog btn____O4epw\",\"btn--lmi-bicalc\":\"btn--lmi-bicalc____TOuit btn____O4epw\",\"btn--lmi-risk\":\"btn--lmi-risk____EGQws btn____O4epw\",\"btn--lmi-policy-comparison\":\"btn--lmi-policy-comparison____JedLy btn____O4epw\",\"btn--lmi-policy-coach\":\"btn--lmi-policy-coach____eqCmM btn____O4epw\",\"btn--andrew-nock\":\"btn--andrew-nock____aa3WL btn____O4epw\",\"btn--construction-cost-consultants\":\"btn--construction-cost-consultants____f_k1U btn____O4epw\",\"btn--5-star\":\"btn--5-star____024MJ btn____O4epw\",\"btn--thermoscan\":\"btn--thermoscan____j6CLm btn____O4epw\",\"btn--risk-survey-services\":\"btn--risk-survey-services____VC4jc btn____O4epw\",\"btn--risk-management\":\"btn--risk-management____CV1s2 btn____O4epw\",\"btn--lmi-bicalc--disabled\":\"btn--lmi-bicalc--disabled____SR_lt btn--lmi-bicalc____TOuit btn____O4epw\",\"btn--lmi-risk--disabled\":\"btn--lmi-risk--disabled____xYIGg btn--lmi-risk____EGQws btn____O4epw\",\"btn--lmi-policy-comparison--disabled\":\"btn--lmi-policy-comparison--disabled____IU9ml btn--lmi-policy-comparison____JedLy btn____O4epw\",\"btn--initial-insured-location-risk\":\"btn--initial-insured-location-risk____xsZ8J btn--flat____a5SRx btn____O4epw btn____O4epw\",\"btn--icon\":\"btn--icon____lkt5G btn____O4epw\",\"btn--icon-no-border\":\"btn--icon-no-border____iNbu2\",\"btn--icon-add\":\"btn--icon-add____1ygjU btn--icon____lkt5G btn____O4epw\",\"btn--add-risk\":\"btn--add-risk____hvZtu btn--icon____lkt5G btn____O4epw\",\"btn--icon-close\":\"btn--icon-close____F0Iwe btn--icon____lkt5G btn____O4epw\",\"btn--icon-delete\":\"btn--icon-delete____vlCSZ btn--icon____lkt5G btn____O4epw\",\"btn--icon-download\":\"btn--icon-download____lSySG btn--icon____lkt5G btn____O4epw\",\"btn--icon-edit\":\"btn--icon-edit____chwl2 btn--icon____lkt5G btn____O4epw\",\"btn--icon-email\":\"btn--icon-email____Dxndz btn--icon____lkt5G btn____O4epw\",\"btn--icon-download-email\":\"btn--icon-download-email____UHaPm btn--icon____lkt5G btn____O4epw\",\"btn--icon-folder\":\"btn--icon-folder____awtb0 btn--icon____lkt5G btn____O4epw\",\"btn--icon-folder-locked\":\"btn--icon-folder-locked____mvJlB btn--icon____lkt5G btn____O4epw\",\"btn--icon-folder-locked-active\":\"btn--icon-folder-locked-active____k6Dhb btn--icon____lkt5G btn____O4epw\",\"btn--icon-history\":\"btn--icon-history____Ec9MG btn--icon____lkt5G btn____O4epw\",\"btn--icon-info\":\"btn--icon-info____wykUd btn--icon____lkt5G btn____O4epw\",\"btn--icon-link\":\"btn--icon-link____SFDcd btn--icon____lkt5G btn____O4epw\",\"btn--icon-unlink\":\"btn--icon-unlink____RlpPq btn--icon-delete____vlCSZ btn--icon____lkt5G btn____O4epw\",\"btn--icon-map\":\"btn--icon-map____a5CtI btn--icon____lkt5G btn____O4epw\",\"btn--icon-more\":\"btn--icon-more____iFs2d btn--icon____lkt5G btn____O4epw\",\"btn--icon-open-in-new-window\":\"btn--icon-open-in-new-window____BS8dQ btn--icon____lkt5G btn____O4epw\",\"btn--icon-favourite--selected\":\"btn--icon-favourite--selected____Z_IrG btn--icon____lkt5G btn____O4epw\",\"btn--icon-favourite--deselected\":\"btn--icon-favourite--deselected____bpuKA btn--icon____lkt5G btn____O4epw\",\"btn--icon-preview\":\"btn--icon-preview____uliWP btn--icon____lkt5G btn____O4epw\",\"btn--icon-pre-printed\":\"btn--icon-pre-printed____VacXG btn--icon____lkt5G btn____O4epw\",\"btn--icon-print\":\"btn--icon-print____dpTbD btn--icon____lkt5G btn____O4epw\",\"btn--icon-save\":\"btn--icon-save____a3cg7 btn--icon____lkt5G btn____O4epw\",\"btn--icon-settings\":\"btn--icon-settings____xj4ms btn--icon____lkt5G btn____O4epw\",\"btn--icon-show-details\":\"btn--icon-show-details____x7_6E btn--icon____lkt5G btn____O4epw\",\"btn--icon-show-details--alert\":\"btn--icon-show-details--alert____yEuAe btn--icon____lkt5G btn____O4epw\",\"btn--icon-show-summary\":\"btn--icon-show-summary____hLVoA btn--icon____lkt5G btn____O4epw\",\"btn--icon-attachment\":\"btn--icon-attachment____ilKv4 btn--icon____lkt5G btn____O4epw\",\"btn--icon-tag\":\"btn--icon-tag____yyOhg btn--icon____lkt5G btn____O4epw\",\"btn--icon-undo\":\"btn--icon-undo____MTz2q btn--icon____lkt5G btn____O4epw\",\"btn--icon-arrow-forward\":\"btn--icon-arrow-forward____QaERo btn--icon____lkt5G btn____O4epw\",\"btn--aside-collapse\":\"btn--aside-collapse____n0sIG btn--icon____lkt5G btn____O4epw\",\"btn--icon-expand-more\":\"btn--icon-expand-more____Xcadr btn--icon____lkt5G btn____O4epw\",\"btn--icon-expand-less\":\"btn--icon-expand-less____J1bD7 btn--icon____lkt5G btn____O4epw\",\"btn--back\":\"btn--back____sk371 btn____O4epw\",\"btn--back-to-sign-in\":\"btn--back-to-sign-in____KU7Bk btn--back____sk371 btn____O4epw\",\"btn--icon-advanced-search\":\"btn--icon-advanced-search____bUJFy btn--icon____lkt5G btn____O4epw\",\"btn--wizard\":\"btn--wizard____r9Nse btn____O4epw\",\"btn--wizard-back\":\"btn--wizard-back____usixf btn--wizard____r9Nse btn____O4epw\",\"btn--wizard-next\":\"btn--wizard-next____DA2rc btn--wizard____r9Nse btn____O4epw\",\"fieldset\":\"fieldset____LGbLU\",\"fieldset-instruction\":\"fieldset-instruction____K6Cjq\",\"fieldset--no-padding\":\"fieldset--no-padding____NAKtL fieldset____LGbLU\",\"fieldset--alt\":\"fieldset--alt____ZWFXj fieldset____LGbLU\",\"input-search\":\"input-search____X9OaE\",\"view-password\":\"view-password____kkI_8\",\"ia-currency-input\":\"ia-currency-input____ooayJ\",\"ia-currency-negative\":\"ia-currency-negative____hcZqg\",\"select--mini\":\"select--mini____M8ONv\",\"required-label\":\"required-label____eIB5M\",\"alert\":\"alert____XdaTD\",\"alert--important\":\"alert--important____tyFwT\",\"input-label\":\"input-label____XhwJx\",\"w-100\":\"w-100____HxMzA\",\"search-input-wrapper\":\"search-input-wrapper____CIAwO\",\"search-input--results\":\"search-input--results____pFpFp\",\"search-input--result\":\"search-input--result____EhLK_\",\"search-input--result--highlighted\":\"search-input--result--highlighted____g8Zmy\",\"date-range-selections\":\"date-range-selections____txNqj\",\"date-arrow-forward\":\"date-arrow-forward____l8nYb\",\"qce-dropdown\":\"qce-dropdown____jnU6v\",\"qce-or\":\"qce-or____NLyfu\",\"qce-dropdown-with-dropdown\":\"qce-dropdown-with-dropdown____AqzEQ\",\"qce-vehicle-registration-search\":\"qce-vehicle-registration-search____fneAu\",\"row-gap\":\"row-gap____NWnMk\",\"row-group\":\"row-group____costa\",\"row-group--three\":\"row-group--three____LIShf row-group____costa\",\"grid-14\":\"grid-14____F1wIm\",\"row-group--auto\":\"row-group--auto____uweTK row-group____costa\",\"space\":\"space____Qri6S\",\"display-none--lg\":\"display-none--lg____zADTv\",\"display-none--md\":\"display-none--md____Dfuxq\",\"tab-navigation\":\"tab-navigation____ba07k\",\"has-warnings\":\"has-warnings____S7EyS\",\"tab-selected\":\"tab-selected____YOQgx tab____MfM0Q\",\"disabled\":\"disabled____yfBNm\",\"tab\":\"tab____MfM0Q\",\"btn--tab-overflow\":\"btn--tab-overflow____DhYJa\",\"btn--tab-overflow-left\":\"btn--tab-overflow-left____ilm2S btn--tab-overflow____DhYJa\",\"btn--tab-overflow-left-disabled\":\"btn--tab-overflow-left-disabled____NvjMr btn--tab-overflow-left____ilm2S btn--tab-overflow____DhYJa\",\"btn--tab-overflow-right\":\"btn--tab-overflow-right____CV9ba btn--tab-overflow____DhYJa\",\"btn--tab-overflow-right-disabled\":\"btn--tab-overflow-right-disabled____TLFWH btn--tab-overflow-right____CV9ba btn--tab-overflow____DhYJa\",\"constrained-width\":\"constrained-width____Uig4M\",\"constrained-width--tab\":\"constrained-width--tab____i5yJs constrained-width____Uig4M\",\"card\":\"card____gHq5P\",\"card-content\":\"card-content____BqvU3\",\"card-heading\":\"card-heading____yb7wz\",\"control-group\":\"control-group____zroKN\",\"label-group\":\"label-group____sjq3Q\",\"label-group-item\":\"label-group-item____Mic5N\",\"button-group\":\"button-group____RAxV3\",\"card--alert\":\"card--alert____BaBuF card____gHq5P\",\"card-heading--alert\":\"card-heading--alert____QN3Ce card-heading____yb7wz\",\"card--status-message\":\"card--status-message____OkikA\",\"card-heading--sticky-header\":\"card-heading--sticky-header____GgRJb\",\"card-heading--no-icon\":\"card-heading--no-icon____bRyAr card-heading____yb7wz\",\"card-heading--bold-title\":\"card-heading--bold-title____sFBzJ\",\"table\":\"table____fiKWD\",\"table-heading-row\":\"table-heading-row____rhQO3\",\"table-row\":\"table-row____y5byI\",\"table-result-row\":\"table-result-row____E5C97\",\"break-word\":\"break-word____ayhbR\",\"no-wrap\":\"no-wrap____W7uML\",\"table-result-row--disabled\":\"table-result-row--disabled____gZfU9\",\"table-modal\":\"table-modal____nsVW8 table____fiKWD\",\"table-enhanced\":\"table-enhanced____i5aUx\",\"table--no-border-bottom\":\"table--no-border-bottom____vB6VG table____fiKWD\",\"height-45\":\"height-45____ZaYPc\",\"edit-column\":\"edit-column____qTxUy\",\"delete-column\":\"delete-column____FgiVE\",\"date-table-heading\":\"date-table-heading____NoadY\",\"button-edit\":\"button-edit____de29Z\",\"button-delete\":\"button-delete____PTMsu\",\"table-row-selected\":\"table-row-selected____f0q6P\",\"table-row-alert\":\"table-row-alert____B9M_y\",\"table-filter-row\":\"table-filter-row____es2cV\",\"table-filter-row--endcap\":\"table-filter-row--endcap____WkKT9\",\"filter-column\":\"filter-column____YQobe\",\"table-pagination\":\"table-pagination____Pji4T\",\"table-pagination-with-filter\":\"table-pagination-with-filter____a9Pg4 table-pagination____Pji4T\",\"table-button-group\":\"table-button-group____x1tal\",\"table-child-container\":\"table-child-container____Sgj_a\",\"table-child-card\":\"table-child-card____sZYup\",\"child-table--selected-row\":\"child-table--selected-row____q1_Bn\",\"child-table\":\"child-table____oeRPY table____fiKWD\",\"custom-pagination\":\"custom-pagination____Bx1I3\",\"pagination-count\":\"pagination-count____TWUf5\",\"pagination-button\":\"pagination-button____cSt5R btn____O4epw\",\"pagination-prev\":\"pagination-prev____HrhgV pagination-button____cSt5R btn____O4epw\",\"pagination-next\":\"pagination-next____Q44hL pagination-button____cSt5R btn____O4epw\",\"pagination-disabled\":\"pagination-disabled____fjrT3 pagination-button____cSt5R btn____O4epw\",\"pagination-prev-disabled\":\"pagination-prev-disabled____xE9Gh pagination-disabled____fjrT3 pagination-button____cSt5R btn____O4epw\",\"pagination-next-disabled\":\"pagination-next-disabled____Bsmhj pagination-disabled____fjrT3 pagination-button____cSt5R btn____O4epw\",\"pagination\":\"pagination____xe0Fi\",\"pagination-top\":\"pagination-top____BKkYD pagination____xe0Fi\",\"pagination-bottom\":\"pagination-bottom____cGzRE pagination____xe0Fi\",\"pagination-bottom--documents\":\"pagination-bottom--documents_____WP0l pagination-bottom____cGzRE pagination____xe0Fi\",\"table-cell-btn-icon\":\"table-cell-btn-icon____KdnWS\",\"folder-table\":\"folder-table____QobQf table--no-border-bottom____vB6VG table____fiKWD\",\"doc-table-group--heading\":\"doc-table-group--heading____ablJj\",\"doc-table-group--heading-open\":\"doc-table-group--heading-open____PE8b_ doc-table-group--heading____ablJj\",\"doc-table-group--heading-with-options\":\"doc-table-group--heading-with-options____G7qEz\",\"constrained-width--folder-name\":\"constrained-width--folder-name____kaRJa constrained-width____Uig4M\",\"disable-entity\":\"disable-entity____s91iM\",\"button-options\":\"button-options____d4BIp\",\"button-options--add\":\"button-options--add____r58cx button-options____d4BIp\",\"information-icon\":\"information-icon____WEwIK\",\"deleted-icon\":\"deleted-icon____uE_qo\",\"exclamation-icon\":\"exclamation-icon____caiUo\",\"success-icon\":\"success-icon____lmCjk\",\"text-align-center\":\"text-align-center____B_Oyb\",\"word-break\":\"word-break____k2t6x\",\"btn-group\":\"btn-group____Rv7r2\",\"accordion-content\":\"accordion-content____ka79S\",\"toggle-collapse\":\"toggle-collapse____ep4yL\",\"toggle-collapse--disabled\":\"toggle-collapse--disabled____l3T_U toggle-collapse____ep4yL\",\"toggle-expand\":\"toggle-expand____spn_o toggle-collapse____ep4yL\",\"folder\":\"folder____LVGKs\",\"folder-locked\":\"folder-locked____zbVbN folder____LVGKs\",\"yesNo-filter-width\":\"yesNo-filter-width____glvaB\",\"w-5\":\"w-5____QDIOM\",\"w-10\":\"w-10____AUwPA\",\"w-15\":\"w-15____YkAhq\",\"w-20\":\"w-20____kFniU\",\"w-25\":\"w-25____du5Ux\",\"w-30\":\"w-30____U79g_\",\"w-35\":\"w-35____IW8Ln\",\"w-40\":\"w-40____hzCgo\",\"w-45\":\"w-45____NU5GZ\",\"w-50\":\"w-50____xQDs3\",\"w-60\":\"w-60____EoxVC\",\"view-block\":\"view-block____hL2C1\",\"view-block--heading\":\"view-block--heading____jVtg4\",\"view-block--white\":\"view-block--white____laxmq view-block____hL2C1\",\"view-block--alert\":\"view-block--alert____rZCzH view-block____hL2C1\",\"view-block--success\":\"view-block--success____j_i1m view-block____hL2C1\",\"view-block--info\":\"view-block--info____zsFPv view-block____hL2C1\",\"view-block--warning\":\"view-block--warning____LiPfj view-block____hL2C1\",\"view-block--alt\":\"view-block--alt____QWAyT view-block____hL2C1\",\"view-block--with-icon\":\"view-block--with-icon____A8YXl view-block____hL2C1\",\"view-block-icon\":\"view-block-icon____YJ8Is\",\"view-block--warning--with-icon\":\"view-block--warning--with-icon____lruc9 view-block--warning____LiPfj view-block____hL2C1\",\"view-block-checkbox\":\"view-block-checkbox____lvf5m view-block____hL2C1\",\"view-block-checkbox--alert\":\"view-block-checkbox--alert____LZ3EI view-block--alert____rZCzH view-block____hL2C1 view-block-checkbox____lvf5m view-block____hL2C1\",\"text-view-content\":\"text-view-content____uRLNv\",\"ia-modal\":\"ia-modal____MBw4o\",\"ia-modal-inner\":\"ia-modal-inner____hSxkq\",\"ia-modal-inner--context-menu\":\"ia-modal-inner--context-menu____iajeU ia-modal-inner____hSxkq\",\"ia-modal-inner--wide-lg\":\"ia-modal-inner--wide-lg____VBBbi ia-modal-inner____hSxkq\",\"ia-modal-inner--wide-xxl\":\"ia-modal-inner--wide-xxl____y0F3v ia-modal-inner____hSxkq\",\"ia-modal-inner--take-over\":\"ia-modal-inner--take-over____nryp5 ia-modal-inner____hSxkq\",\"fixed-height\":\"fixed-height____MQTj6\",\"takeover-header\":\"takeover-header____mLjUh\",\"logo\":\"logo____DGha6\",\"logo--broker\":\"logo--broker____oGAf_ logo____DGha6\",\"close-search\":\"close-search____atV12\",\"ia-modal-content\":\"ia-modal-content____KQhmr\",\"ia-modal-overlay--transparent\":\"ia-modal-overlay--transparent____H0vN6 ia-modal____MBw4o\",\"ia-modal-overlay--light-white\":\"ia-modal-overlay--light-white____ahPnQ ia-modal____MBw4o\",\"ia-modal-overlay--transparent--light-white-client-nav\":\"ia-modal-overlay--transparent--light-white-client-nav____CPMLj ia-modal-overlay--light-white____ahPnQ ia-modal____MBw4o\",\"modal-header\":\"modal-header____RigGp\",\"modal-footer\":\"modal-footer____xmN3c modal-header____RigGp\",\"header-label\":\"header-label____GS55w\",\"header-label-icon\":\"header-label-icon____FaiWv header-label____GS55w\",\"header-label--alert\":\"header-label--alert____WfLli header-label-icon____FaiWv header-label____GS55w\",\"header-label--info\":\"header-label--info____G4xHc header-label-icon____FaiWv header-label____GS55w\",\"header-label--settings\":\"header-label--settings____C7Pnv header-label-icon____FaiWv header-label____GS55w\",\"header-label--accounts\":\"header-label--accounts____aRF1y header-label-icon____FaiWv header-label____GS55w\",\"header-label--edit\":\"header-label--edit____JNAbW header-label-icon____FaiWv header-label____GS55w\",\"header-label--download\":\"header-label--download____yI9ID header-label-icon____FaiWv header-label____GS55w\",\"header-label--delete\":\"header-label--delete____aAa8X header-label-icon____FaiWv header-label____GS55w\",\"header-label--history\":\"header-label--history____Vtn7B header-label-icon____FaiWv header-label____GS55w\",\"header-label--tag\":\"header-label--tag____Jf19Y header-label-icon____FaiWv header-label____GS55w\",\"header-label--search\":\"header-label--search____pRdmn header-label-icon____FaiWv header-label____GS55w\",\"header-label--kyc\":\"header-label--kyc____AuNmO header-label-icon____FaiWv header-label____GS55w\",\"header-label--advice\":\"header-label--advice____uXp0d header-label-icon____FaiWv header-label____GS55w\",\"header-label--insured\":\"header-label--insured____zJUYX header-label-icon____FaiWv header-label____GS55w\",\"header-label--quote\":\"header-label--quote____e9abb header-label-icon____FaiWv header-label____GS55w\",\"header-label--policy\":\"header-label--policy____Z6VZX header-label-icon____FaiWv header-label____GS55w\",\"header-label--claim\":\"header-label--claim____yOUb7 header-label-icon____FaiWv header-label____GS55w\",\"header-label--fsg\":\"header-label--fsg____ZtFRq header-label-icon____FaiWv header-label____GS55w\",\"header-label--mandatory-document\":\"header-label--mandatory-document____wDv5d header-label-icon____FaiWv header-label____GS55w\",\"header-label--notification\":\"header-label--notification____ECCIb header-label-icon____FaiWv header-label____GS55w\",\"header-label--task\":\"header-label--task____a2TkJ header-label-icon____FaiWv header-label____GS55w\",\"header-label--contact\":\"header-label--contact____Bl7JA header-label-icon____FaiWv header-label____GS55w\",\"header-label--note\":\"header-label--note____vnPCO header-label-icon____FaiWv header-label____GS55w\",\"header-label--document\":\"header-label--document____P9DaH header-label-icon____FaiWv header-label____GS55w\",\"header-label--email\":\"header-label--email____z5YaD header-label-icon____FaiWv header-label____GS55w\",\"header-label--template\":\"header-label--template____nPdIR header-label-icon____FaiWv header-label____GS55w\",\"header-details\":\"header-details____AxCFr\",\"header-detail-item\":\"header-detail-item____Adxt5\",\"header-label--context-menu\":\"header-label--context-menu____OKHhM header-label-icon____FaiWv header-label____GS55w\",\"context-menu-sep\":\"context-menu-sep____oO8cX\",\"context-menu--one-col\":\"context-menu--one-col____YwYSv\",\"context-menu-disabled\":\"context-menu-disabled____uDP0w\",\"context-menu--two-col\":\"context-menu--two-col____yHq8f context-menu--one-col____YwYSv\",\"context-menu--three-col\":\"context-menu--three-col____hnGWw context-menu--two-col____yHq8f context-menu--one-col____YwYSv\",\"modal-content-copy\":\"modal-content-copy____hiKfn\",\"processing-step\":\"processing-step____kuzSG\",\"processing-step--failed\":\"processing-step--failed____cFHS2 processing-step____kuzSG\",\"document--processing\":\"document--processing____Hv1Z7\",\"eclipse-loader\":\"eclipse-loader____XHBDW\",\"confirmation-content\":\"confirmation-content____Lbbtu\",\"confirmation-content--alert\":\"confirmation-content--alert____hhWgD confirmation-content____Lbbtu\",\"ia-modal--search\":\"ia-modal--search____GLMcP\",\"view-block--alert--progress-modal\":\"view-block--alert--progress-modal____C39iv view-block--alert____rZCzH view-block____hL2C1\",\"client-footer--right\":\"client-footer--right____AbdWe\",\"wizard-button-group\":\"wizard-button-group____Dj5m1\",\"wizard-button-group--with-distribute\":\"wizard-button-group--with-distribute____Rwvgk wizard-button-group____Dj5m1\",\"wizard-nav-group\":\"wizard-nav-group____qum09\",\"footer-combo-selections\":\"footer-combo-selections____UEV96\",\"btn--combo-option\":\"btn--combo-option____MfSdo\",\"footer-combo-container\":\"footer-combo-container_____t8Nn\",\"right\":\"right____MwSDS\",\"pdf-selection\":\"pdf-selection____CxsCv\",\"ia-file-upload\":\"ia-file-upload____VcYsh btn____O4epw\",\"ia-file-upload--disabled\":\"ia-file-upload--disabled____yJ4vd\",\"ia-file-info\":\"ia-file-info____UjPtR\",\"delete-pdf\":\"delete-pdf____Xw_ov btn--icon-delete____vlCSZ btn--icon____lkt5G btn____O4epw\",\"pdf-section\":\"pdf-section____MGvnI\",\"margin-top\":\"margin-top____Zlox5\",\"new-pdf-action-buttons\":\"new-pdf-action-buttons____rvFfg\",\"page-pdf-controls\":\"page-pdf-controls____BC7aU\",\"post-state-group\":\"post-state-group____SjoRs\",\"post-state-group-nz\":\"post-state-group-nz____ZlpcF post-state-group____SjoRs\",\"manual-finder-group\":\"manual-finder-group____VNDOB\",\"ia-address-group\":\"ia-address-group____J_AZG\",\"ia-address-group--lat-lon\":\"ia-address-group--lat-lon____wwcop\",\"modal-display-group\":\"modal-display-group____UW3aF\",\"risk-type\":\"risk-type____Ij3Jj\",\"risk-label\":\"risk-label____aGa8u\",\"risk-help-label\":\"risk-help-label____bGgXN\",\"scheme-help-label\":\"scheme-help-label____eVvrk\",\"manual-address\":\"manual-address____AvAs0\",\"no-risks\":\"no-risks____A0Dgh\",\"label-button-group\":\"label-button-group____D9xdh\",\"button-group--location\":\"button-group--location____OXqXd\",\"row-group--location\":\"row-group--location____ltcUo\"};","import { EventAggregator } from 'aurelia-event-aggregator';\r\nimport { log } from '../../../../../../../resources/services/log-service';\r\nimport { autoinject, computedFrom, observable } from 'aurelia-framework';\r\nimport { I18N } from 'aurelia-i18n';\r\nimport { ConfirmModalActions } from 'components/ia-modal/ia-modal';\r\nimport { CountryCode } from 'libphonenumber-js';\r\nimport { IaToastService, IaToastMessage } from 'resources/services/ia-toast-service';\r\nimport { AddressFetchedEventDto, IaAddressAutocomplete } from 'components/ia-address-autocomplete/ia-address-autocomplete';\r\nimport { Api } from './api';\r\nimport { InsuredLocationsRisksConfig, InsuredLocation, InsuredRisk, Risk } from 'resources/models/client';\r\nimport styles from './insured-locations-risks.css';\r\nimport { LookupDataService } from 'resources/services/lookup-data';\r\nimport { getAppClient } from 'resources/parse-jwt';\r\nimport { IFieldValueDefiniton } from 'interfaces/lookups/i-field-value-definition';\r\nimport { InsuredAction } from 'enums/insured-action';\r\n\r\n@autoinject()\r\nexport class InsuredLocationsRisks {\r\n @observable private insuredAction: InsuredAction = InsuredAction.NoAction;\r\n private availableRisks: Risk[];\r\n private unavailableRisks: Risk[];\r\n private insuredLocations: InsuredLocation[] = [];\r\n private loader: IaToastMessage;\r\n private tweet: IaToastMessage;\r\n private params: IStepModel;\r\n private currentLocation: InsuredLocation;\r\n private editingLocation: InsuredLocation;\r\n private addressFinderVM: IaAddressAutocomplete;\r\n private selectedRiskByClassId: number;\r\n private selectedRiskByClassIdArray: number[] = [];\r\n private currentRisk: InsuredRisk;\r\n private selectedUnavailableRisk: Risk;\r\n private appClient: CountryCode;\r\n private config: InsuredLocationsRisksConfig;\r\n private alertText: string;\r\n private alertTextName = '';\r\n\r\n @observable private manuallyAddInsuredLocation = false;\r\n protected showAddressFinderModal = false;\r\n protected showAddRisksModal = false;\r\n protected showDeleteConfirmationModal = false;\r\n protected showAlertTextModal = false;\r\n protected lmiBiCalculatorLink: string;\r\n protected modalHeaderName = '';\r\n protected styles = styles;\r\n\r\n // The QCE itself sets this when anything changes, we don't maintain this state\r\n private isDirty = false;\r\n\r\n constructor(\r\n private api: Api,\r\n private lookupService: LookupDataService,\r\n private toast: IaToastService,\r\n private i18n: I18N,\r\n private ea: EventAggregator\r\n ) { }\r\n\r\n manuallyAddInsuredLocationChanged(newVal, oldVal) {\r\n // only clear address fields when manuallyAddLocation is uncheck\r\n // this forces user to use the addressFinder which will repopulate lat/lon\r\n if (!newVal && oldVal) {\r\n this.currentLocation.insuredLocation = null;\r\n this.currentLocation.suburb = null;\r\n this.currentLocation.stateCode = null;\r\n this.currentLocation.region = null;\r\n this.currentLocation.postCode = null;\r\n this.currentLocation.longitude = null;\r\n this.currentLocation.latitude = null;\r\n\r\n setTimeout(() => {\r\n if (this?.addressFinderVM?.iaAddressInput) {\r\n this.addressFinderVM.iaAddressInput.focus();\r\n }\r\n }, 120);\r\n }\r\n\r\n // clear lat/lon when user checks add address manully\r\n if (newVal) {\r\n this.addressFinderVM.clearInput();\r\n this.currentLocation.longitude = null;\r\n this.currentLocation.latitude = null;\r\n }\r\n }\r\n\r\n async validate() {\r\n return this.insuredLocations && !this.insuredLocations.some(location => this.isActiveLocationWithNoActiveRisks(location)) && this.activeLocations;\r\n }\r\n\r\n async activate(model: IStepModel) {\r\n try {\r\n this.params = model;\r\n this.appClient = getAppClient();\r\n this.lmiBiCalculatorLink = await this.lookupService.lmiBiCalculatorLink();\r\n\r\n this.initToastr();\r\n await this.loadInitialData();\r\n\r\n this.ea.publish('stepRendered');\r\n } catch (e) {\r\n this.ea.publish('stepRendered');\r\n }\r\n }\r\n\r\n attached() {\r\n if (this.insuredLocations.length === 0) {\r\n this.addInsuredLocation();\r\n }\r\n }\r\n\r\n @computedFrom('insuredLocations')\r\n get activeLocations(): boolean {\r\n return this.insuredLocations.some(x => x.activeFlag === true);\r\n }\r\n\r\n isActiveLocationWithNoActiveRisks(location) {\r\n return location.activeFlag === true && !location.risks.some(x => x.activeFlag === true);\r\n }\r\n\r\n @computedFrom('selectedRiskByClassId', 'unavailableRisks')\r\n get disableAddRisk(): boolean {\r\n if (!this.selectedRiskByClassId || this.selectedRiskByClassId <= 0) return true;\r\n\r\n this.selectedUnavailableRisk = this.unavailableRisks.find(ur => ur.riskByClassId === this.selectedRiskByClassId);\r\n\r\n return !!this.selectedUnavailableRisk;\r\n }\r\n\r\n @computedFrom('config.addRiskAllowed')\r\n get disableAddRiskButton(): boolean {\r\n return !this.config.addRiskAllowed;\r\n }\r\n\r\n @computedFrom('availableRisks', 'currentLocation.risks')\r\n get availableRisksForLocation(): IFieldValueDefiniton[] {\r\n if (!this.availableRisks.length || !this.currentLocation) return;\r\n let existingRiskByClassIds = [];\r\n\r\n if (this.currentLocation.risks && this.currentLocation.risks.length) {\r\n existingRiskByClassIds = this.currentLocation.risks.map(r => r.riskByClassId);\r\n }\r\n\r\n const availableRisks = this.availableRisks\r\n .filter(ar => !existingRiskByClassIds.includes(ar.riskByClassId))\r\n .map(ar => ({\r\n id: ar.riskByClassId, label: `${ar.riskByClassName} - ${ar.risk} ${ar.unavailableInsurers &&\r\n ar.unavailableInsurers.length ? '[ ** Insurer Warning ** ]' : ''}`\r\n }));\r\n\r\n return availableRisks;\r\n }\r\n\r\n get allRisksAddedToLocation() {\r\n return !this.availableRisks?.length;\r\n }\r\n\r\n @computedFrom('insuredAction')\r\n get confirmButtonLabel() {\r\n return this.i18n.tr(this.insuredAction);\r\n }\r\n\r\n @computedFrom('insuredAction')\r\n get confirmDeleteModalText() {\r\n return this.i18n.tr('confirmDeleteEntity', {\r\n entity: this.insuredAction === InsuredAction.DeleteLocation ? 'location' : 'risk'\r\n });\r\n }\r\n\r\n @computedFrom('config.addLocationAllowed', 'insuredLocations')\r\n get disableAddLocation() {\r\n return !this?.config?.addLocationAllowed || !this.areInsuredLocationsAndRisksValid();\r\n }\r\n\r\n @computedFrom(\r\n 'currentLocation.insuredLocation', 'currentLocation.postCode', 'currentLocation.suburb',\r\n 'currentLocation.stateCode', 'currentLocation.region', 'appClient', 'insuredAction', 'selectedRiskByClassIdArray.length'\r\n )\r\n get disableUpdateLocation(): boolean {\r\n if (!this.currentLocation || !this.appClient) return false;\r\n\r\n const userIsEditingLocation = this.insuredAction === InsuredAction.UpdateLocation;\r\n const insuredLocation = this.currentLocation.insuredLocation ?\r\n this.currentLocation.insuredLocation.trim() :\r\n this.currentLocation.insuredLocation;\r\n\r\n let requiredDataIsInvalid = !insuredLocation;\r\n\r\n if (!this.config.isScheme && !this.config.isWebScheme && !userIsEditingLocation) {\r\n if (insuredLocation) {\r\n requiredDataIsInvalid = insuredLocation.length === 0 || this.selectedRiskByClassIdArray.length === 0;\r\n }\r\n }\r\n\r\n let editDataIsInvalid = true;\r\n switch (this.appClient) {\r\n case 'AU':\r\n\r\n if (userIsEditingLocation) {\r\n editDataIsInvalid = editDataIsInvalid &&\r\n this.currentLocation.insuredLocation === this.editingLocation.insuredLocation &&\r\n this.currentLocation.suburb === this.editingLocation.suburb &&\r\n this.currentLocation.stateCode === this.editingLocation.stateCode &&\r\n this.currentLocation.postCode === this.editingLocation.postCode\r\n }\r\n\r\n break;\r\n\r\n case 'NZ':\r\n\r\n if (userIsEditingLocation) {\r\n editDataIsInvalid = editDataIsInvalid &&\r\n this.currentLocation.insuredLocation === this.editingLocation.insuredLocation &&\r\n this.currentLocation.suburb === this.editingLocation.suburb &&\r\n this.currentLocation.region === this.editingLocation.region &&\r\n this.currentLocation.postCode === this.editingLocation.postCode\r\n }\r\n break;\r\n }\r\n\r\n if (userIsEditingLocation) return requiredDataIsInvalid || editDataIsInvalid;\r\n return requiredDataIsInvalid;\r\n }\r\n\r\n async loadInitialData() {\r\n await this.getInsuredLocationsRisksConfig();\r\n await this.getInsuredLocationsAndRisks();\r\n await this.getAvailableRisks();\r\n }\r\n\r\n async getInsuredLocationsRisksConfig() {\r\n this.config = await this.api.getInsuredLocationsRisksConfig(\r\n this.params.id, this.params.actionType, this.params.entityType, +this.params.entityId, this.params.entityMode\r\n );\r\n }\r\n\r\n async getInsuredLocationsAndRisks() {\r\n this.insuredLocations = await this.api.getInsuredLocations(\r\n this.params.id, this.params.actionType, this.params.entityType, +this.params.entityId, true\r\n );\r\n }\r\n\r\n async getAvailableRisks() {\r\n this.availableRisks = await this.api.getAvailableRisks(\r\n this.params.id, this.params.actionType, this.params.entityType, +this.params.entityId\r\n );\r\n this.unavailableRisks = this.availableRisks.filter(ar => !ar.availableForSelection);\r\n }\r\n\r\n googleMapsLink(latitude: number | string, longitude: number | string): string {\r\n if (!latitude || !longitude) return '';\r\n return `https://www.google.com/maps/place/${latitude}+${longitude}/@${latitude},${longitude},18z`;\r\n }\r\n\r\n addInsuredLocation() {\r\n this.insuredAction = InsuredAction.AddLocation;\r\n this.currentLocation = new InsuredLocation(+this.params.entityId);\r\n this.addressFinderVM.clearInput();\r\n this.manuallyAddInsuredLocation = false;\r\n this.showAddressFinderModal = true;\r\n\r\n setTimeout(() => {\r\n this.addressFinderVM.iaAddressInput.focus();\r\n }, 120);\r\n\r\n if (this.config.isScheme) {\r\n this.selectedRiskByClassIdArray = this.availableRisksForLocation.map((x) => x.id);\r\n }\r\n }\r\n\r\n addInsuredRisk(location: InsuredLocation) {\r\n this.insuredAction = InsuredAction.AddRisk;\r\n this.currentLocation = location;\r\n this.selectedRiskByClassId = null;\r\n this.selectedUnavailableRisk = null;\r\n this.showAddRisksModal = true;\r\n }\r\n\r\n async addRiskToInsuredLocation(action: ConfirmModalActions) {\r\n if (action === 'cancel') {\r\n this.selectedRiskByClassIdArray = [];\r\n this.showAddRisksModal = false;\r\n return;\r\n }\r\n\r\n if (action === 'confirm') {\r\n\r\n const riskArray = [];\r\n this.selectedRiskByClassIdArray.forEach(x => {\r\n riskArray.push({ situationId: this.currentLocation.situationId, riskByClassId: x });\r\n });\r\n\r\n const addInsuredRisk = await this.api.createInsuredRisk(this.params.id, this.params.actionType, this.params.entityType,\r\n +this.params.entityId, this.currentLocation.situationId, riskArray);\r\n\r\n this.selectedRiskByClassIdArray = [];\r\n\r\n const addedInsuredRisk = !!(addInsuredRisk);\r\n\r\n if (addedInsuredRisk) { await this.getInsuredLocationsAndRisks(); }\r\n this.showAddRisksModal = false;\r\n }\r\n }\r\n\r\n editInsuredLocation(location: InsuredLocation) {\r\n this.insuredAction = InsuredAction.UpdateLocation;\r\n this.editingLocation = location;\r\n this.editingLocation.insuredLocation = this.editingLocation.insuredLocation.trim();\r\n this.addressFinderVM.clearInput();\r\n this.manuallyAddInsuredLocation = false;\r\n this.currentLocation = { ...location };\r\n this.showAddressFinderModal = true;\r\n\r\n setTimeout(() => {\r\n if (this?.addressFinderVM?.iaAddressInput) {\r\n this.addressFinderVM.iaAddressInput.focus();\r\n }\r\n }, 120);\r\n }\r\n\r\n confirmDeleteForInsuredRisk(risk: InsuredRisk) {\r\n this.insuredAction = InsuredAction.DeleteRisk;\r\n this.currentRisk = risk;\r\n this.modalHeaderName = `${risk.riskByClassName} - ${risk.risk}`;\r\n this.showDeleteConfirmationModal = true;\r\n }\r\n\r\n async undoInsuredRisk(risk: InsuredRisk, location: InsuredLocation) {\r\n await this.api.activateInsuredRisk(this.params.id, this.params.actionType, this.params.entityType, +this.params.entityId, risk.situationId, risk.entityRiskId);\r\n await this.getInsuredLocationsAndRisks();\r\n }\r\n\r\n confirmDeleteForInsuredLocation(location: InsuredLocation) {\r\n this.insuredAction = InsuredAction.DeleteLocation;\r\n this.currentLocation = location;\r\n this.modalHeaderName = location.insuredLocation;\r\n this.showDeleteConfirmationModal = true;\r\n }\r\n\r\n async undoInsuredLocation(location: InsuredLocation) {\r\n await this.api.activateInsuredLocation(this.params.id, this.params.actionType, this.params.entityType, +this.params.entityId, location.situationId);\r\n await this.getInsuredLocationsAndRisks();\r\n }\r\n\r\n deleteLocationOrRisk(action: ConfirmModalActions) {\r\n if (action === 'cancel') {\r\n this.showDeleteConfirmationModal = false;\r\n return;\r\n }\r\n\r\n if (action === 'confirm') {\r\n switch (this.insuredAction) {\r\n case InsuredAction.DeleteRisk:\r\n this.deleteInsuredRisk(this.currentRisk);\r\n break;\r\n\r\n case InsuredAction.DeleteLocation:\r\n this.deleteInsuredLocation(this.currentLocation);\r\n break;\r\n\r\n default:\r\n log.error(`Insured Action: ${this.insuredAction} is not supported for ${this.deleteLocationOrRisk.name}`);\r\n }\r\n this.showDeleteConfirmationModal = false;\r\n }\r\n }\r\n\r\n async deleteInsuredLocation(location: InsuredLocation) {\r\n if (this.params.entityType === 'incomplete' && this.params.actionType === '3') {\r\n if (location.isPreExistingInsuredLocation) {\r\n const deactivate = await this.api.deactivateInsuredLocation(this.params.id, this.params.actionType, this.params.entityType, +this.params.entityId, location.situationId);\r\n } else {\r\n const deleteLocation = await this.api.deleteInsuredLocation(this.params.id, this.params.actionType, this.params.entityType, +this.params.entityId, location.situationId);\r\n }\r\n } else {\r\n const deleteLocation = await this.api.deleteInsuredLocation(this.params.id, this.params.actionType, this.params.entityType, +this.params.entityId, location.situationId);\r\n }\r\n\r\n await this.getInsuredLocationsAndRisks();\r\n }\r\n\r\n async deleteInsuredRisk(risk: InsuredRisk) {\r\n if (this.params.entityType === 'incomplete' && this.params.actionType === '3') {\r\n if (risk.isPreExistingInsuredRisk) {\r\n const deactivate = await this.api.deactivateInsuredRisk(this.params.id, this.params.actionType, this.params.entityType, +this.params.entityId, risk.situationId, risk.entityRiskId);\r\n } else {\r\n const deleteRisk = await this.api.deleteInsuredRisk(this.params.id, this.params.actionType, this.params.entityType, +this.params.entityId, risk.situationId, risk.entityRiskId);\r\n }\r\n } else {\r\n const deleteRisk = await this.api.deleteInsuredRisk(this.params.id, this.params.actionType, this.params.entityType, +this.params.entityId, risk.situationId, risk.entityRiskId);\r\n }\r\n\r\n await this.getInsuredLocationsAndRisks();\r\n }\r\n\r\n locationAddressFetched(location: AddressFetchedEventDto) {\r\n this.manuallyAddInsuredLocation = false;\r\n this.currentLocation.insuredLocation = location.address.addressLine1;\r\n this.currentLocation.insuredLocation += location.address.addressLine2 ? `, ${location.address.addressLine2}` : '';\r\n this.currentLocation.insuredLocation += location.address.addressLine3 ? `, ${location.address.addressLine3}` : '';\r\n this.currentLocation.suburb = location.address.suburb;\r\n\r\n if (this.appClient === 'AU') {\r\n this.currentLocation.stateCode = location.address.state;\r\n } else if (this.appClient === 'NZ') {\r\n this.currentLocation.region = location.address.region;\r\n }\r\n\r\n this.currentLocation.postCode = location.address.postCode;\r\n this.currentLocation.countryCode = location.address.countryCode;\r\n this.currentLocation.latitude = location.address.latitude.toString();\r\n this.currentLocation.longitude = location.address.longitude.toString();\r\n\r\n if (this?.addressFinderVM?.iaAddressInput) {\r\n this.addressFinderVM.iaAddressInput.focus();\r\n }\r\n }\r\n\r\n async addOrUpdateLocation(action: ConfirmModalActions) {\r\n if (action === 'cancel') {\r\n this.selectedRiskByClassIdArray = [];\r\n this.showAddressFinderModal = false;\r\n return;\r\n }\r\n\r\n if (action === 'confirm') {\r\n this.currentLocation.insuredLocation = this.currentLocation.insuredLocation.trim();\r\n\r\n let addOrUpdateLocation: InsuredLocation;\r\n\r\n if (this.insuredAction === InsuredAction.AddLocation) {\r\n addOrUpdateLocation = await this.api.createInsuredLocation(\r\n this.params.id, this.params.actionType, this.params.entityType,\r\n +this.params.entityId, this.currentLocation);\r\n\r\n // only allow one location to be added if isWebScheme\r\n if (this.config.isWebScheme && this.insuredLocations.length === 0) {\r\n this.config.addLocationAllowed = false;\r\n }\r\n\r\n if (this.selectedRiskByClassIdArray && addOrUpdateLocation) {\r\n const riskArray = [];\r\n\r\n if (!this.config.isScheme) {\r\n this.selectedRiskByClassIdArray.forEach(x => {\r\n riskArray.push({ situationId: addOrUpdateLocation.situationId, riskByClassId: x });\r\n });\r\n }\r\n\r\n await this.api.createInsuredRisk(this.params.id, this.params.actionType, this.params.entityType,\r\n +this.params.entityId, addOrUpdateLocation.situationId, riskArray);\r\n\r\n this.selectedRiskByClassIdArray = [];\r\n }\r\n }\r\n else {\r\n addOrUpdateLocation = await this.api.updateInsuredLocation(\r\n this.params.id, this.params.actionType, this.params.entityType,\r\n +this.params.entityId, this.currentLocation.situationId, this.currentLocation\r\n );\r\n }\r\n\r\n const addedOrUpdatedLocation = !!(addOrUpdateLocation && addOrUpdateLocation.insuredLocation);\r\n\r\n if (addedOrUpdatedLocation) { await this.getInsuredLocationsAndRisks(); }\r\n this.showAddressFinderModal = false;\r\n }\r\n }\r\n\r\n showAlertText(risk) {\r\n this.showAlertTextModal = true;\r\n this.alertTextName = `${risk.riskByClassName} - ${risk.risk}`;\r\n this.alertText = risk.alertText;\r\n }\r\n\r\n private areInsuredLocationsAndRisksValid(): boolean {\r\n return this.insuredLocations && !this.insuredLocations.some(location => location.activeFlag && location.risks && !location.risks.length);\r\n }\r\n\r\n private initToastr() {\r\n this.tweet = new IaToastMessage();\r\n this.tweet.title = this.i18n.tr('quoteComment', { quoteNumber: this.params.entityId });\r\n }\r\n}\r\n"],"names":["http","load","clientId","endpoint","environment","uri","this","fetch","json","map","w","Object","assign","copy","quoteId","body","method","addEditComment","comment","newEntityConfig","actionType","entityType","newActionType","mode","newEntityConfigWithEntityId","entityId","isModifyPolicyPeriod","getEntityConfig","result","ok","newEntity","updateInitialDetails","getEntity","questionsResponsesOnly","riskClassTypeId","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","stepCanProceed","riskClassTypesByInsuredName","showPolicyPeriodWarning","showExpiryDateGreaterThanEffectiveWarning","hasErrorConditionError","policyPeriodWarningAcknowledged","expiryDateGreaterThanEffectiveAcknowledged","errorTexts","policyWarningTexts","expiryDateGreaterThanEffectiveText","showSchemeMustBeRemovedWarning","schemeMustBeRemovedWarningText","policyWarnings","focusEffectiveDate","isProcessing","stepMessage","validationController","createForCurrentScope","addRenderer","initializeValidation","ValidationRules","value","obj","includes","e","required","ensure","when","appClient","satisfiesRule","on","activate","params","parseInt","mappedActionType","actionTypeLabel","id","systemParameters","clientDisclosureTypes","entityMode","config","createPageModel","getRiskClassTypesByInsuredName","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","compatibleRiskClassTypeIds","riskClassType","a","sort","b","findIndex","response","fieldChanged","classChanged","schemeCheckboxChanged","createEntityModel","cleanedModel","endorsementType","previousPolicyVersionId","policyPeriod","riskClassTypeDetails","migrateToBotRisks","riskMigrationOption","isTakeUp","apiModel","mapConditions","conditions","condition","compareType","compareValue","fieldName","messageKey","sourcedKey","flattenedPlaceholderValues","reduce","momentExpiryDate","policyWarningText","isBefore","warningConditions","momentCompareValue","isAfter","diff","validate","redirectAfterCreation","botRiskMigrationAvailable","valid","entityModel","hasOwnProperty","Error","navigateToRoute","policyId","step","stepClickedValue","statusTypeId","versionNo","getQuestionIds","errors","result2","value2","result3","value3","recalcGst","closeQuote","policyVersionId","acknowledgeWarnings","I18N","ValidationControllerFactory","TaskQueue","EventAggregator","BindingEngine","Wizard","Step1","getInsuredLocationsRisksConfig","entityActionType","methodName","getInsuredLocations","includeRisks","getAvailableRisks","getInsuredRisksForLocation","quoteOrVersionSituationId","createInsuredLocation","location","updateInsuredLocation","situationId","updateInsuredLocationActiveFlag","isActive","deleteInsuredLocation","activateInsuredLocation","deactivateInsuredLocation","createInsuredRisk","riskArray","updateInsuredRiskActiveFlag","situationRiskId","deleteInsuredRisk","activateInsuredRisk","deactivateInsuredRisk","insuredAction","insuredLocations","selectedRiskByClassIdArray","alertTextName","manuallyAddInsuredLocation","showAddressFinderModal","showAddRisksModal","showDeleteConfirmationModal","showAlertTextModal","modalHeaderName","manuallyAddInsuredLocationChanged","currentLocation","insuredLocation","suburb","stateCode","region","postCode","longitude","latitude","addressFinderVM","iaAddressInput","focus","clearInput","some","isActiveLocationWithNoActiveRisks","activeLocations","lmiBiCalculatorLink","initToastr","loadInitialData","attached","addInsuredLocation","activeFlag","risks","selectedRiskByClassId","selectedUnavailableRisk","unavailableRisks","ur","riskByClassId","addRiskAllowed","availableRisks","existingRiskByClassIds","r","ar","label","riskByClassName","risk","unavailableInsurers","entity","addLocationAllowed","areInsuredLocationsAndRisksValid","userIsEditingLocation","trim","requiredDataIsInvalid","isScheme","isWebScheme","editDataIsInvalid","editingLocation","getInsuredLocationsAndRisks","availableForSelection","googleMapsLink","availableRisksForLocation","addInsuredRisk","addRiskToInsuredLocation","action","editInsuredLocation","confirmDeleteForInsuredRisk","currentRisk","undoInsuredRisk","entityRiskId","confirmDeleteForInsuredLocation","undoInsuredLocation","deleteLocationOrRisk","name","isPreExistingInsuredLocation","isPreExistingInsuredRisk","locationAddressFetched","address","addressLine1","addressLine2","addressLine3","state","countryCode","toString","addOrUpdateLocation","showAlertText","alertText","tweet","title","quoteNumber","observable","computedFrom","InsuredLocationsRisks"],"sourceRoot":""}