@hmcts/ccd-case-ui-toolkit 6.14.6-date-grey-bar → 6.14.6-exui-229
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/hmcts-ccd-case-ui-toolkit.umd.js +839 -791
- package/bundles/hmcts-ccd-case-ui-toolkit.umd.js.map +1 -1
- package/bundles/hmcts-ccd-case-ui-toolkit.umd.min.js +1 -1
- package/bundles/hmcts-ccd-case-ui-toolkit.umd.min.js.map +1 -1
- package/esm2015/lib/app.config.js +1 -1
- package/esm2015/lib/components/form/date-input/date-input.component.js +8 -8
- package/esm2015/lib/components/header/header-bar/header-bar.component.js +3 -2
- package/esm2015/lib/shared/commons/case-edit-data/case-edit-data.module.js +1 -1
- package/esm2015/lib/shared/commons/case-edit-data/case-edit-validation.model.js +1 -1
- package/esm2015/lib/shared/components/activity/activity.component.js +5 -5
- package/esm2015/lib/shared/components/case-editor/case-edit/case-edit.component.js +1 -1
- package/esm2015/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.js +4 -4
- package/esm2015/lib/shared/components/case-editor/case-edit-submit/case-edit-submit.component.js +4 -4
- package/esm2015/lib/shared/components/case-editor/case-editor.module.js +1 -1
- package/esm2015/lib/shared/components/case-editor/case-event-completion/case-event-completion.component.js +1 -2
- package/esm2015/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.js +3 -3
- package/esm2015/lib/shared/components/case-editor/domain/wizard-page-field-complex-override.model.js +1 -2
- package/esm2015/lib/shared/components/case-editor/domain/wizard-page-field.model.js +1 -1
- package/esm2015/lib/shared/components/case-editor/domain/wizard-page.model.js +1 -2
- package/esm2015/lib/shared/components/case-editor/services/cases.service.js +22 -11
- package/esm2015/lib/shared/components/case-editor/services/page-validation.service.js +2 -2
- package/esm2015/lib/shared/components/case-editor/services/wizard-page-field-to-case-field.mapper.js +12 -12
- package/esm2015/lib/shared/components/case-editor/services/work-allocation.service.js +1 -1
- package/esm2015/lib/shared/components/case-history/domain/case-history.model.js +1 -2
- package/esm2015/lib/shared/components/case-viewer/case-challenged-access-request/case-challenged-access-request.component.js +5 -5
- package/esm2015/lib/shared/components/case-viewer/case-event-trigger/case-event-trigger.component.js +2 -2
- package/esm2015/lib/shared/components/case-viewer/case-full-access-view/case-full-access-view.component.js +33 -20
- package/esm2015/lib/shared/components/case-viewer/case-specific-access-request/case-specific-access-request.component.js +4 -4
- package/esm2015/lib/shared/components/case-viewer/case-viewer.component.js +5 -5
- package/esm2015/lib/shared/components/case-viewer/printer/pipes/print-url.pipe.js +3 -3
- package/esm2015/lib/shared/components/case-viewer/services/case.resolver.js +2 -2
- package/esm2015/lib/shared/components/error/callback-errors.component.js +5 -5
- package/esm2015/lib/shared/components/error/domain/error-context.js +1 -1
- package/esm2015/lib/shared/components/event-start/event-guard/event-start.guard.js +2 -2
- package/esm2015/lib/shared/components/pagination/pagination.component.js +10 -10
- package/esm2015/lib/shared/components/palette/address/address-option.model.js +7 -4
- package/esm2015/lib/shared/components/palette/address/write-address-field.component.js +4 -4
- package/esm2015/lib/shared/components/palette/base-field/field-read-label.component.js +1 -1
- package/esm2015/lib/shared/components/palette/base-field/field-write.component.js +1 -1
- package/esm2015/lib/shared/components/palette/case-file-view/components/case-file-view-folder-selector/case-file-view-folder-selector.component.js +1 -1
- package/esm2015/lib/shared/components/palette/case-flag/components/case-flag-table/case-flag-table.component.js +1 -1
- package/esm2015/lib/shared/components/palette/case-flag/components/select-flag-location/select-flag-location.component.js +2 -2
- package/esm2015/lib/shared/components/palette/case-flag/enums/index.js +1 -1
- package/esm2015/lib/shared/components/palette/collection/collection-create-checker.service.js +5 -5
- package/esm2015/lib/shared/components/palette/collection/write-collection-field.component.js +7 -7
- package/esm2015/lib/shared/components/palette/complex/read-complex-field-collection-table.component.js +3 -4
- package/esm2015/lib/shared/components/palette/dynamic-multi-select-list/read-dynamic-multi-select-list-field.component.js +7 -11
- package/esm2015/lib/shared/components/palette/dynamic-multi-select-list/write-dynamic-multi-select-list-field.component.js +10 -8
- package/esm2015/lib/shared/components/palette/linked-cases/components/link-cases/link-cases.component.js +1 -1
- package/esm2015/lib/shared/components/palette/linked-cases/components/linked-cases-table/linked-cases-from-table.component.js +1 -1
- package/esm2015/lib/shared/components/palette/linked-cases/components/linked-cases-table/linked-cases-to-table.component.js +1 -1
- package/esm2015/lib/shared/components/palette/linked-cases/domain/linked-cases.model.js +1 -2
- package/esm2015/lib/shared/components/palette/linked-cases/read-linked-cases-field.component.js +2 -2
- package/esm2015/lib/shared/components/palette/linked-cases/services/linked-cases.service.js +3 -2
- package/esm2015/lib/shared/components/palette/linked-cases/write-linked-cases-field.component.js +4 -3
- package/esm2015/lib/shared/components/palette/order-summary/fee.model.js +1 -2
- package/esm2015/lib/shared/components/palette/order-summary/order-summary.model.js +1 -1
- package/esm2015/lib/shared/components/palette/palette.module.js +4 -4
- package/esm2015/lib/shared/components/palette/palette.service.js +2 -2
- package/esm2015/lib/shared/components/palette/text-area/write-text-area-field.component.js +2 -2
- package/esm2015/lib/shared/components/palette/utils/date.pipe.js +4 -4
- package/esm2015/lib/shared/components/palette/yes-no/yes-no.service.js +1 -3
- package/esm2015/lib/shared/components/search-filters/domain/search-input.model.js +1 -1
- package/esm2015/lib/shared/components/search-filters/search-filters.component.js +2 -2
- package/esm2015/lib/shared/components/search-result/search-result.component.js +5 -5
- package/esm2015/lib/shared/components/workbasket-filters/workbasket-filters.component.js +3 -3
- package/esm2015/lib/shared/directives/conditional-show/domain/conditional-show.model.js +3 -4
- package/esm2015/lib/shared/directives/conditional-show/services/condition-parser.service.js +8 -4
- package/esm2015/lib/shared/domain/addresses/address.model.js +1 -2
- package/esm2015/lib/shared/domain/case-details.model.js +1 -2
- package/esm2015/lib/shared/domain/case-event-data.model.js +1 -2
- package/esm2015/lib/shared/domain/case-file-view/case-file-view-category.model.js +1 -1
- package/esm2015/lib/shared/domain/case-file-view/case-file-view-document.model.js +1 -2
- package/esm2015/lib/shared/domain/case-file-view/categories-and-documents.model.js +1 -1
- package/esm2015/lib/shared/domain/case-file-view/document-tree-node/document-tree-node.model.js +1 -2
- package/esm2015/lib/shared/domain/case-flag/flag-type.model.js +1 -2
- package/esm2015/lib/shared/domain/case-flag/hmcts-service-detail.model.js +1 -2
- package/esm2015/lib/shared/domain/case-view/case-event-trigger.model.js +1 -2
- package/esm2015/lib/shared/domain/case-view/case-tab.model.js +1 -2
- package/esm2015/lib/shared/domain/case-view/case-view-event.model.js +1 -2
- package/esm2015/lib/shared/domain/case-view/case-view.model.js +1 -2
- package/esm2015/lib/shared/domain/case-view/role-assignment-response.model.js +1 -1
- package/esm2015/lib/shared/domain/case-view/role-request.model.js +1 -1
- package/esm2015/lib/shared/domain/definition/case-event.model.js +1 -1
- package/esm2015/lib/shared/domain/definition/case-field.model.js +1 -2
- package/esm2015/lib/shared/domain/definition/case-type.model.js +1 -2
- package/esm2015/lib/shared/domain/definition/event-case-field.model.js +1 -2
- package/esm2015/lib/shared/domain/definition/field-type.model.js +1 -2
- package/esm2015/lib/shared/domain/document/document-data.model.js +1 -2
- package/esm2015/lib/shared/domain/organisation/organisation-converter.js +8 -8
- package/esm2015/lib/shared/domain/pagination-metadata.model.js +1 -1
- package/esm2015/lib/shared/domain/search/field.model.js +1 -1
- package/esm2015/lib/shared/domain/search/search-result-view-column.model.js +1 -1
- package/esm2015/lib/shared/domain/search/search-result-view-item.model.js +1 -2
- package/esm2015/lib/shared/domain/search/search-result-view.model.js +1 -2
- package/esm2015/lib/shared/domain/user/user-info.model.js +1 -1
- package/esm2015/lib/shared/domain/workbasket/workbasket-input.model.js +8 -1
- package/esm2015/lib/shared/fixture/case-field-builder.js +13 -13
- package/esm2015/lib/shared/fixture/shared.test.fixture.js +27 -27
- package/esm2015/lib/shared/pipes/complex/{ccd-page-fields.pipe.js → cdd-page-fields.pipe.js} +3 -3
- package/esm2015/lib/shared/pipes/complex/index.js +2 -2
- package/esm2015/lib/shared/pipes/index.js +2 -1
- package/esm2015/lib/shared/services/activity/activity.polling.service.js +2 -2
- package/esm2015/lib/shared/services/activity/activity.service.js +18 -9
- package/esm2015/lib/shared/services/addresses/address-parser.js +5 -5
- package/esm2015/lib/shared/services/case-fields/format-translator.service.js +2 -2
- package/esm2015/lib/shared/services/case-flag/case-flag-refdata.service.js +2 -2
- package/esm2015/lib/shared/services/common-data-service/common-data-service.js +2 -2
- package/esm2015/lib/shared/services/definitions/definitions.service.js +8 -3
- package/esm2015/lib/shared/services/fields/fields.purger.js +15 -15
- package/esm2015/lib/shared/services/fields/fields.utils.js +4 -5
- package/esm2015/lib/shared/services/form/field-type-sanitiser.js +1 -2
- package/esm2015/lib/shared/services/form/form-value.service.js +2 -1
- package/esm2015/lib/shared/services/loading/loading.service.js +7 -2
- package/esm2015/lib/shared/services/search/search.service.js +10 -5
- package/esm2015/lib/shared/services/search-result/sorting/search-result-view-item-comparator-factory.js +5 -5
- package/esm2015/lib/shared/services/window/window.service.js +1 -1
- package/fesm2015/hmcts-ccd-case-ui-toolkit.js +870 -827
- package/fesm2015/hmcts-ccd-case-ui-toolkit.js.map +1 -1
- package/lib/app.config.d.ts.map +1 -1
- package/lib/components/header/header-bar/header-bar.component.d.ts.map +1 -1
- package/lib/shared/commons/case-edit-data/case-edit-data.module.d.ts.map +1 -1
- package/lib/shared/commons/case-edit-data/case-edit-validation.model.d.ts.map +1 -1
- package/lib/shared/components/case-editor/case-edit/case-edit.component.d.ts +3 -3
- package/lib/shared/components/case-editor/case-edit/case-edit.component.d.ts.map +1 -1
- package/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.d.ts.map +1 -1
- package/lib/shared/components/case-editor/case-event-completion/case-event-completion.component.d.ts.map +1 -1
- package/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.d.ts +2 -2
- package/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.d.ts.map +1 -1
- package/lib/shared/components/case-editor/domain/wizard-page-field-complex-override.model.d.ts.map +1 -1
- package/lib/shared/components/case-editor/domain/wizard-page-field.model.d.ts.map +1 -1
- package/lib/shared/components/case-editor/domain/wizard-page.model.d.ts.map +1 -1
- package/lib/shared/components/case-editor/services/cases.service.d.ts +3 -1
- package/lib/shared/components/case-editor/services/cases.service.d.ts.map +1 -1
- package/lib/shared/components/case-editor/services/wizard-page-field-to-case-field.mapper.d.ts.map +1 -1
- package/lib/shared/components/case-editor/services/work-allocation.service.d.ts.map +1 -1
- package/lib/shared/components/case-history/domain/case-history.model.d.ts.map +1 -1
- package/lib/shared/components/case-viewer/case-challenged-access-request/case-challenged-access-request.component.d.ts.map +1 -1
- package/lib/shared/components/case-viewer/case-full-access-view/case-full-access-view.component.d.ts +6 -2
- package/lib/shared/components/case-viewer/case-full-access-view/case-full-access-view.component.d.ts.map +1 -1
- package/lib/shared/components/case-viewer/case-viewer.component.d.ts.map +1 -1
- package/lib/shared/components/case-viewer/printer/pipes/print-url.pipe.d.ts.map +1 -1
- package/lib/shared/components/case-viewer/services/case.resolver.d.ts.map +1 -1
- package/lib/shared/components/error/domain/error-context.d.ts +2 -2
- package/lib/shared/components/error/domain/error-context.d.ts.map +1 -1
- package/lib/shared/components/event-start/event-guard/event-start.guard.d.ts +1 -1
- package/lib/shared/components/event-start/event-guard/event-start.guard.d.ts.map +1 -1
- package/lib/shared/components/pagination/pagination.component.d.ts +3 -3
- package/lib/shared/components/palette/address/address-option.model.d.ts.map +1 -1
- package/lib/shared/components/palette/address/write-address-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/case-flag/components/select-flag-location/select-flag-location.component.d.ts.map +1 -1
- package/lib/shared/components/palette/case-flag/enums/index.d.ts.map +1 -1
- package/lib/shared/components/palette/collection/collection-create-checker.service.d.ts.map +1 -1
- package/lib/shared/components/palette/collection/write-collection-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/complex/read-complex-field-collection-table.component.d.ts +1 -1
- package/lib/shared/components/palette/complex/read-complex-field-collection-table.component.d.ts.map +1 -1
- package/lib/shared/components/palette/dynamic-multi-select-list/read-dynamic-multi-select-list-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/dynamic-multi-select-list/write-dynamic-multi-select-list-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/linked-cases/components/linked-cases-table/linked-cases-from-table.component.d.ts.map +1 -1
- package/lib/shared/components/palette/linked-cases/domain/linked-cases.model.d.ts.map +1 -1
- package/lib/shared/components/palette/linked-cases/read-linked-cases-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/linked-cases/services/linked-cases.service.d.ts.map +1 -1
- package/lib/shared/components/palette/linked-cases/write-linked-cases-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/order-summary/fee.model.d.ts.map +1 -1
- package/lib/shared/components/palette/order-summary/order-summary.model.d.ts.map +1 -1
- package/lib/shared/components/palette/text-area/write-text-area-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/utils/date.pipe.d.ts.map +1 -1
- package/lib/shared/components/palette/yes-no/yes-no.service.d.ts.map +1 -1
- package/lib/shared/components/search-filters/domain/search-input.model.d.ts.map +1 -1
- package/lib/shared/components/workbasket-filters/workbasket-filters.component.d.ts.map +1 -1
- package/lib/shared/directives/conditional-show/domain/conditional-show.model.d.ts.map +1 -1
- package/lib/shared/directives/conditional-show/services/condition-parser.service.d.ts.map +1 -1
- package/lib/shared/domain/addresses/address.model.d.ts.map +1 -1
- package/lib/shared/domain/case-details.model.d.ts.map +1 -1
- package/lib/shared/domain/case-event-data.model.d.ts.map +1 -1
- package/lib/shared/domain/case-file-view/case-file-view-category.model.d.ts.map +1 -1
- package/lib/shared/domain/case-file-view/case-file-view-document.model.d.ts.map +1 -1
- package/lib/shared/domain/case-file-view/categories-and-documents.model.d.ts.map +1 -1
- package/lib/shared/domain/case-file-view/document-tree-node/document-tree-node.model.d.ts.map +1 -1
- package/lib/shared/domain/case-flag/flag-type.model.d.ts.map +1 -1
- package/lib/shared/domain/case-flag/hmcts-service-detail.model.d.ts.map +1 -1
- package/lib/shared/domain/case-view/case-event-trigger.model.d.ts.map +1 -1
- package/lib/shared/domain/case-view/case-tab.model.d.ts.map +1 -1
- package/lib/shared/domain/case-view/case-view-event.model.d.ts.map +1 -1
- package/lib/shared/domain/case-view/case-view.model.d.ts.map +1 -1
- package/lib/shared/domain/case-view/role-assignment-response.model.d.ts +2 -1
- package/lib/shared/domain/case-view/role-assignment-response.model.d.ts.map +1 -1
- package/lib/shared/domain/case-view/role-request.model.d.ts.map +1 -1
- package/lib/shared/domain/definition/case-event.model.d.ts.map +1 -1
- package/lib/shared/domain/definition/case-field.model.d.ts.map +1 -1
- package/lib/shared/domain/definition/case-type.model.d.ts.map +1 -1
- package/lib/shared/domain/definition/event-case-field.model.d.ts.map +1 -1
- package/lib/shared/domain/definition/field-type.model.d.ts.map +1 -1
- package/lib/shared/domain/document/document-data.model.d.ts.map +1 -1
- package/lib/shared/domain/organisation/organisation-converter.d.ts.map +1 -1
- package/lib/shared/domain/pagination-metadata.model.d.ts +2 -2
- package/lib/shared/domain/pagination-metadata.model.d.ts.map +1 -1
- package/lib/shared/domain/search/field.model.d.ts.map +1 -1
- package/lib/shared/domain/search/search-result-view-column.model.d.ts.map +1 -1
- package/lib/shared/domain/search/search-result-view-item.model.d.ts.map +1 -1
- package/lib/shared/domain/search/search-result-view.model.d.ts.map +1 -1
- package/lib/shared/domain/user/user-info.model.d.ts.map +1 -1
- package/lib/shared/domain/workbasket/workbasket-input.model.d.ts +1 -0
- package/lib/shared/domain/workbasket/workbasket-input.model.d.ts.map +1 -1
- package/lib/shared/fixture/case-field-builder.d.ts +6 -6
- package/lib/shared/fixture/case-field-builder.d.ts.map +1 -1
- package/lib/shared/fixture/shared.test.fixture.d.ts +6 -6
- package/lib/shared/fixture/shared.test.fixture.d.ts.map +1 -1
- package/lib/shared/pipes/complex/{ccd-page-fields.pipe.d.ts → cdd-page-fields.pipe.d.ts} +1 -1
- package/lib/shared/pipes/complex/cdd-page-fields.pipe.d.ts.map +1 -0
- package/lib/shared/pipes/complex/index.d.ts +1 -1
- package/lib/shared/pipes/index.d.ts +1 -0
- package/lib/shared/pipes/index.d.ts.map +1 -1
- package/lib/shared/pipes/pipes.module.d.ts +1 -1
- package/lib/shared/services/activity/activity.polling.service.d.ts.map +1 -1
- package/lib/shared/services/activity/activity.service.d.ts.map +1 -1
- package/lib/shared/services/addresses/address-parser.d.ts.map +1 -1
- package/lib/shared/services/common-data-service/common-data-service.d.ts.map +1 -1
- package/lib/shared/services/definitions/definitions.service.d.ts.map +1 -1
- package/lib/shared/services/fields/fields.purger.d.ts.map +1 -1
- package/lib/shared/services/fields/fields.utils.d.ts +1 -0
- package/lib/shared/services/fields/fields.utils.d.ts.map +1 -1
- package/lib/shared/services/form/field-type-sanitiser.d.ts.map +1 -1
- package/lib/shared/services/loading/loading.service.d.ts +4 -1
- package/lib/shared/services/loading/loading.service.d.ts.map +1 -1
- package/lib/shared/services/search/search.service.d.ts +2 -0
- package/lib/shared/services/search/search.service.d.ts.map +1 -1
- package/lib/shared/services/search-result/sorting/search-result-view-item-comparator-factory.d.ts.map +1 -1
- package/lib/shared/services/window/window.service.d.ts.map +1 -1
- package/package.json +2 -2
- package/lib/shared/pipes/complex/ccd-page-fields.pipe.d.ts.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/router'), require('@angular/forms'), require('rx-polling'), require('rxjs'), require('@angular/common/http'), require('rxjs/operators'), require('class-transformer'), require('moment'), require('underscore'), require('pegjs'), require('util'), require('@edium/fsm'), require('@angular/material/dialog'), require('@nicky-lenaers/ngx-scroll-to'), require('@angular/material/autocomplete'), require('@angular/material/core'), require('@hmcts/ccpay-web-component'), require('@angular/cdk/overlay'), require('@angular/cdk/tree'), require('@angular/material/input'), require('@angular-material-components/datetime-picker'), require('@angular-material-components/moment-adapter'), require('@angular/material/datepicker'), require('@angular/material/form-field'), require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@hmcts/ccd-case-ui-toolkit', ['exports', '@angular/core', '@angular/common', '@angular/router', '@angular/forms', 'rx-polling', 'rxjs', '@angular/common/http', 'rxjs/operators', 'class-transformer', 'moment', 'underscore', 'pegjs', 'util', '@edium/fsm', '@angular/material/dialog', '@nicky-lenaers/ngx-scroll-to', '@angular/material/autocomplete', '@angular/material/core', '@hmcts/ccpay-web-component', '@angular/cdk/overlay', '@angular/cdk/tree', '@angular/material/input', '@angular-material-components/datetime-picker', '@angular-material-components/moment-adapter', '@angular/material/datepicker', '@angular/material/form-field', '
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.hmcts = global.hmcts || {}, global.hmcts["ccd-case-ui-toolkit"] = {}), global.ng.core, global.ng.common, global.ng.router, global.ng.forms, global["rx-polling"], global.rxjs, global.ng.common.http, global.rxjs.operators, global["class-transformer"], global.moment, global.underscore, global.pegjs, global.util, global["@edium/fsm"], global.ng.material.dialog, global["@nicky-lenaers/ngx-scroll-to"], global.ng.material.autocomplete, global.ng.material.core, global["@hmcts/ccpay-web-component"], global.ng.cdk.overlay, global.ng.cdk.tree, global.ng.material.input, global["@angular-material-components/datetime-picker"], global["@angular-material-components/moment-adapter"], global.ng.material.datepicker, global.ng.material.formField, global
|
|
5
|
-
})(this, (function (exports, i0, i1, i1$1, i2, polling, rxjs, i1$2, operators, classTransformer, moment, _, pegjs, util, fsm, i1$3, i2$1, i5, i6, i3, i1$4, i7, i3$1, i4, momentAdapter, i5$1, i6$1,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/router'), require('@angular/forms'), require('rx-polling'), require('rxjs'), require('@angular/common/http'), require('rxjs/operators'), require('class-transformer'), require('moment'), require('underscore'), require('pegjs'), require('util'), require('@edium/fsm'), require('@angular/material/dialog'), require('@nicky-lenaers/ngx-scroll-to'), require('@angular/material/autocomplete'), require('@angular/material/core'), require('@hmcts/ccpay-web-component'), require('ngx-md'), require('@angular/cdk/overlay'), require('@angular/cdk/tree'), require('@angular/material/input'), require('@angular-material-components/datetime-picker'), require('@angular-material-components/moment-adapter'), require('@angular/material/datepicker'), require('@angular/material/form-field'), require('@hmcts/media-viewer'), require('@angular/cdk/portal'), require('ngx-pagination'), require('@angular/material/tabs')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@hmcts/ccd-case-ui-toolkit', ['exports', '@angular/core', '@angular/common', '@angular/router', '@angular/forms', 'rx-polling', 'rxjs', '@angular/common/http', 'rxjs/operators', 'class-transformer', 'moment', 'underscore', 'pegjs', 'util', '@edium/fsm', '@angular/material/dialog', '@nicky-lenaers/ngx-scroll-to', '@angular/material/autocomplete', '@angular/material/core', '@hmcts/ccpay-web-component', 'ngx-md', '@angular/cdk/overlay', '@angular/cdk/tree', '@angular/material/input', '@angular-material-components/datetime-picker', '@angular-material-components/moment-adapter', '@angular/material/datepicker', '@angular/material/form-field', '@hmcts/media-viewer', '@angular/cdk/portal', 'ngx-pagination', '@angular/material/tabs'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.hmcts = global.hmcts || {}, global.hmcts["ccd-case-ui-toolkit"] = {}), global.ng.core, global.ng.common, global.ng.router, global.ng.forms, global["rx-polling"], global.rxjs, global.ng.common.http, global.rxjs.operators, global["class-transformer"], global.moment, global.underscore, global.pegjs, global.util, global["@edium/fsm"], global.ng.material.dialog, global["@nicky-lenaers/ngx-scroll-to"], global.ng.material.autocomplete, global.ng.material.core, global["@hmcts/ccpay-web-component"], global["ngx-md"], global.ng.cdk.overlay, global.ng.cdk.tree, global.ng.material.input, global["@angular-material-components/datetime-picker"], global["@angular-material-components/moment-adapter"], global.ng.material.datepicker, global.ng.material.formField, global.i11, global.ng.cdk.portal, global["ngx-pagination"], global.ng.material.tabs));
|
|
5
|
+
})(this, (function (exports, i0, i1, i1$1, i2, polling, rxjs, i1$2, operators, classTransformer, moment, _, pegjs, util, fsm, i1$3, i2$1, i5, i6, i3, i1$4, i1$5, i7, i3$1, i4, momentAdapter, i5$1, i6$1, i11, i6$2, i1$6, i9) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -38,12 +38,12 @@
|
|
|
38
38
|
var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
|
|
39
39
|
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
|
|
40
40
|
var i1__namespace$4 = /*#__PURE__*/_interopNamespace(i1$4);
|
|
41
|
+
var i1__namespace$5 = /*#__PURE__*/_interopNamespace(i1$5);
|
|
41
42
|
var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
|
|
42
43
|
var i3__namespace$1 = /*#__PURE__*/_interopNamespace(i3$1);
|
|
43
44
|
var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
|
|
44
45
|
var i5__namespace$1 = /*#__PURE__*/_interopNamespace(i5$1);
|
|
45
46
|
var i6__namespace$1 = /*#__PURE__*/_interopNamespace(i6$1);
|
|
46
|
-
var i1__namespace$5 = /*#__PURE__*/_interopNamespace(i1$5);
|
|
47
47
|
var i11__namespace = /*#__PURE__*/_interopNamespace(i11);
|
|
48
48
|
var i6__namespace$2 = /*#__PURE__*/_interopNamespace(i6$2);
|
|
49
49
|
var i1__namespace$6 = /*#__PURE__*/_interopNamespace(i1$6);
|
|
@@ -1036,22 +1036,22 @@
|
|
|
1036
1036
|
}
|
|
1037
1037
|
};
|
|
1038
1038
|
DateInputComponent.prototype.dayId = function () {
|
|
1039
|
-
return this.id +
|
|
1039
|
+
return this.id + '-day';
|
|
1040
1040
|
};
|
|
1041
1041
|
DateInputComponent.prototype.monthId = function () {
|
|
1042
|
-
return this.id +
|
|
1042
|
+
return this.id + '-month';
|
|
1043
1043
|
};
|
|
1044
1044
|
DateInputComponent.prototype.yearId = function () {
|
|
1045
|
-
return this.id +
|
|
1045
|
+
return this.id + '-year';
|
|
1046
1046
|
};
|
|
1047
1047
|
DateInputComponent.prototype.hourId = function () {
|
|
1048
|
-
return this.id +
|
|
1048
|
+
return this.id + '-hour';
|
|
1049
1049
|
};
|
|
1050
1050
|
DateInputComponent.prototype.minuteId = function () {
|
|
1051
|
-
return this.id +
|
|
1051
|
+
return this.id + '-minute';
|
|
1052
1052
|
};
|
|
1053
1053
|
DateInputComponent.prototype.secondId = function () {
|
|
1054
|
-
return this.id +
|
|
1054
|
+
return this.id + '-second';
|
|
1055
1055
|
};
|
|
1056
1056
|
DateInputComponent.prototype.viewValue = function () {
|
|
1057
1057
|
if (this.day || this.month || this.year || this.hour || this.minute || this.second) {
|
|
@@ -1066,7 +1066,7 @@
|
|
|
1066
1066
|
this.minute ? this.pad(this.minute) : '',
|
|
1067
1067
|
this.second ? this.pad(this.second) : ''
|
|
1068
1068
|
].join(':');
|
|
1069
|
-
return date +
|
|
1069
|
+
return date + 'T' + time + '.000';
|
|
1070
1070
|
}
|
|
1071
1071
|
else {
|
|
1072
1072
|
return date;
|
|
@@ -2131,7 +2131,7 @@
|
|
|
2131
2131
|
});
|
|
2132
2132
|
ActivityService.handleHttpError = function (response) {
|
|
2133
2133
|
var error = HttpErrorService.convertToHttpError(response);
|
|
2134
|
-
if (
|
|
2134
|
+
if (response.status && response.status !== error.status) {
|
|
2135
2135
|
error.status = response.status;
|
|
2136
2136
|
}
|
|
2137
2137
|
return error;
|
|
@@ -2139,11 +2139,12 @@
|
|
|
2139
2139
|
ActivityService.prototype.getOptions = function () {
|
|
2140
2140
|
var userDetails = JSON.parse(this.sessionStorageService.getItem('userDetails'));
|
|
2141
2141
|
var headers = new i1$2.HttpHeaders().set('Content-Type', 'application/json').set('Authorization', userDetails.token);
|
|
2142
|
-
|
|
2142
|
+
var options = {
|
|
2143
2143
|
headers: headers,
|
|
2144
2144
|
withCredentials: true,
|
|
2145
2145
|
observe: 'body',
|
|
2146
2146
|
};
|
|
2147
|
+
return options;
|
|
2147
2148
|
};
|
|
2148
2149
|
ActivityService.prototype.getActivities = function () {
|
|
2149
2150
|
var caseId = [];
|
|
@@ -2152,33 +2153,41 @@
|
|
|
2152
2153
|
}
|
|
2153
2154
|
try {
|
|
2154
2155
|
var options = this.getOptions();
|
|
2155
|
-
var url = this.activityUrl() + "/cases/" + caseId.join(',') + "/activity";
|
|
2156
|
+
var url = this.activityUrl() + ("/cases/" + caseId.join(',') + "/activity");
|
|
2156
2157
|
return this.http
|
|
2157
2158
|
.get(url, options, false, ActivityService.handleHttpError)
|
|
2158
2159
|
.pipe(operators.map(function (response) { return response; }));
|
|
2159
2160
|
}
|
|
2160
2161
|
catch (error) {
|
|
2161
|
-
console.log(
|
|
2162
|
+
console.log('user may not be authenticated.' + error);
|
|
2162
2163
|
}
|
|
2163
2164
|
};
|
|
2164
2165
|
ActivityService.prototype.postActivity = function (caseId, activity) {
|
|
2165
2166
|
try {
|
|
2166
2167
|
var options = this.getOptions();
|
|
2167
|
-
var url = this.activityUrl() + "/cases/" + caseId + "/activity";
|
|
2168
|
+
var url = this.activityUrl() + ("/cases/" + caseId + "/activity");
|
|
2168
2169
|
var body = { activity: activity };
|
|
2169
2170
|
return this.http
|
|
2170
2171
|
.post(url, body, options, false)
|
|
2171
2172
|
.pipe(operators.map(function (response) { return response; }));
|
|
2172
2173
|
}
|
|
2173
2174
|
catch (error) {
|
|
2174
|
-
console.log(
|
|
2175
|
+
console.log('user may not be authenticated.' + error);
|
|
2175
2176
|
}
|
|
2176
2177
|
};
|
|
2177
2178
|
ActivityService.prototype.verifyUserIsAuthorized = function () {
|
|
2178
2179
|
var _this = this;
|
|
2179
|
-
if (this.sessionStorageService.getItem('userDetails')
|
|
2180
|
+
if (this.sessionStorageService.getItem('userDetails') === undefined) {
|
|
2181
|
+
return;
|
|
2182
|
+
}
|
|
2183
|
+
if (this.activityUrl() && this.userAuthorised === undefined) {
|
|
2180
2184
|
this.getActivities(ActivityService.DUMMY_CASE_REFERENCE).subscribe(function () { return _this.userAuthorised = true; }, function (error) {
|
|
2181
|
-
|
|
2185
|
+
if ([401, 403].indexOf(error.status) > -1) {
|
|
2186
|
+
_this.userAuthorised = false;
|
|
2187
|
+
}
|
|
2188
|
+
else {
|
|
2189
|
+
_this.userAuthorised = true;
|
|
2190
|
+
}
|
|
2182
2191
|
});
|
|
2183
2192
|
}
|
|
2184
2193
|
};
|
|
@@ -2291,7 +2300,7 @@
|
|
|
2291
2300
|
requests.get(activity.caseId).next(activity);
|
|
2292
2301
|
});
|
|
2293
2302
|
}, function (err) {
|
|
2294
|
-
console.log(
|
|
2303
|
+
console.log('error: ' + err);
|
|
2295
2304
|
Array.from(requests.values()).forEach(function (subject) { return subject.error(err); });
|
|
2296
2305
|
}); });
|
|
2297
2306
|
});
|
|
@@ -2431,9 +2440,9 @@
|
|
|
2431
2440
|
};
|
|
2432
2441
|
ActivityComponent.prototype.generateDescription = function (prefix, suffix, namesArray, unknownCount) {
|
|
2433
2442
|
var resultText = prefix;
|
|
2434
|
-
resultText += namesArray.map(function (activityInfo) { return activityInfo.forename +
|
|
2443
|
+
resultText += namesArray.map(function (activityInfo) { return activityInfo.forename + ' ' + activityInfo.surname; }).join(', ');
|
|
2435
2444
|
if (unknownCount > 0) {
|
|
2436
|
-
resultText += (namesArray.length > 0 ?
|
|
2445
|
+
resultText += (namesArray.length > 0 ? ' and ' + unknownCount + ' other' : unknownCount + ' user');
|
|
2437
2446
|
resultText += (unknownCount > 1 ? 's' : '');
|
|
2438
2447
|
}
|
|
2439
2448
|
else {
|
|
@@ -2441,10 +2450,10 @@
|
|
|
2441
2450
|
}
|
|
2442
2451
|
if (suffix.length > 0) {
|
|
2443
2452
|
if (namesArray.length + unknownCount > 1) {
|
|
2444
|
-
resultText +=
|
|
2453
|
+
resultText += ' are ' + suffix;
|
|
2445
2454
|
}
|
|
2446
2455
|
else {
|
|
2447
|
-
resultText +=
|
|
2456
|
+
resultText += ' is ' + suffix;
|
|
2448
2457
|
}
|
|
2449
2458
|
}
|
|
2450
2459
|
return resultText;
|
|
@@ -2783,7 +2792,7 @@
|
|
|
2783
2792
|
break;
|
|
2784
2793
|
case 'n':
|
|
2785
2794
|
case 'N':
|
|
2786
|
-
maybePush(result,
|
|
2795
|
+
maybePush(result, '***' + c + '***', inQuote); // No way to support A - millisec of day, n - nano of second, N - nano of Day
|
|
2787
2796
|
break;
|
|
2788
2797
|
case 'V':
|
|
2789
2798
|
case 'O':
|
|
@@ -2917,9 +2926,9 @@
|
|
|
2917
2926
|
resultDate = offsetDate.getDate() + " " + DatePipe.MONTHS[offsetDate.getMonth()] + " " + offsetDate.getFullYear();
|
|
2918
2927
|
if (match[4] && match[5] && match[6] && format !== 'short') {
|
|
2919
2928
|
resultDate += ', ';
|
|
2920
|
-
resultDate += this.getHour(offsetDate.getHours().toString()) +
|
|
2921
|
-
resultDate += this.pad(offsetDate.getMinutes()) +
|
|
2922
|
-
resultDate += this.pad(offsetDate.getSeconds()) +
|
|
2929
|
+
resultDate += this.getHour(offsetDate.getHours().toString()) + ':';
|
|
2930
|
+
resultDate += this.pad(offsetDate.getMinutes()) + ':';
|
|
2931
|
+
resultDate += this.pad(offsetDate.getSeconds()) + ' ';
|
|
2923
2932
|
resultDate += (this.toInt(offsetDate.getHours().toString()) >= 12) ? 'PM' : 'AM';
|
|
2924
2933
|
}
|
|
2925
2934
|
}
|
|
@@ -3294,7 +3303,6 @@
|
|
|
3294
3303
|
}], null, null);
|
|
3295
3304
|
})();
|
|
3296
3305
|
|
|
3297
|
-
// tslint:disable:variable-name
|
|
3298
3306
|
var AddressModel = /** @class */ (function () {
|
|
3299
3307
|
function AddressModel() {
|
|
3300
3308
|
this.AddressLine1 = '';
|
|
@@ -3605,7 +3613,6 @@
|
|
|
3605
3613
|
__metadata("design:type", Array)
|
|
3606
3614
|
], CaseEventTrigger.prototype, "wizard_pages", void 0);
|
|
3607
3615
|
|
|
3608
|
-
// tslint:disable:variable-name
|
|
3609
3616
|
var CaseViewEvent = /** @class */ (function () {
|
|
3610
3617
|
function CaseViewEvent() {
|
|
3611
3618
|
}
|
|
@@ -3650,7 +3657,6 @@
|
|
|
3650
3657
|
__metadata("design:type", Array)
|
|
3651
3658
|
], CaseType.prototype, "case_fields", void 0);
|
|
3652
3659
|
|
|
3653
|
-
// tslint:disable:variable-name
|
|
3654
3660
|
var EventCaseField = /** @class */ (function () {
|
|
3655
3661
|
function EventCaseField() {
|
|
3656
3662
|
}
|
|
@@ -3701,7 +3707,6 @@
|
|
|
3701
3707
|
return CasePrintDocument;
|
|
3702
3708
|
}());
|
|
3703
3709
|
|
|
3704
|
-
// tslint:disable:variable-name
|
|
3705
3710
|
var HRef = /** @class */ (function () {
|
|
3706
3711
|
function HRef() {
|
|
3707
3712
|
}
|
|
@@ -3739,25 +3744,25 @@
|
|
|
3739
3744
|
OrganisationConverter.toSimpleAddress = function (organisationModel) {
|
|
3740
3745
|
var simpleAddress = '';
|
|
3741
3746
|
if (organisationModel.addressLine1) {
|
|
3742
|
-
simpleAddress += organisationModel.addressLine1 +
|
|
3747
|
+
simpleAddress += organisationModel.addressLine1 + '<br>';
|
|
3743
3748
|
}
|
|
3744
3749
|
if (organisationModel.addressLine2) {
|
|
3745
|
-
simpleAddress += organisationModel.addressLine2 +
|
|
3750
|
+
simpleAddress += organisationModel.addressLine2 + '<br>';
|
|
3746
3751
|
}
|
|
3747
3752
|
if (organisationModel.addressLine3) {
|
|
3748
|
-
simpleAddress += organisationModel.addressLine3 +
|
|
3753
|
+
simpleAddress += organisationModel.addressLine3 + '<br>';
|
|
3749
3754
|
}
|
|
3750
3755
|
if (organisationModel.townCity) {
|
|
3751
|
-
simpleAddress += organisationModel.townCity +
|
|
3756
|
+
simpleAddress += organisationModel.townCity + '<br>';
|
|
3752
3757
|
}
|
|
3753
3758
|
if (organisationModel.county) {
|
|
3754
|
-
simpleAddress += organisationModel.county +
|
|
3759
|
+
simpleAddress += organisationModel.county + '<br>';
|
|
3755
3760
|
}
|
|
3756
3761
|
if (organisationModel.country) {
|
|
3757
|
-
simpleAddress += organisationModel.country +
|
|
3762
|
+
simpleAddress += organisationModel.country + '<br>';
|
|
3758
3763
|
}
|
|
3759
3764
|
if (organisationModel.postCode) {
|
|
3760
|
-
simpleAddress += organisationModel.postCode +
|
|
3765
|
+
simpleAddress += organisationModel.postCode + '<br>';
|
|
3761
3766
|
}
|
|
3762
3767
|
return simpleAddress;
|
|
3763
3768
|
};
|
|
@@ -3870,14 +3875,12 @@
|
|
|
3870
3875
|
__metadata("design:type", Array)
|
|
3871
3876
|
], SearchResultView.prototype, "results", void 0);
|
|
3872
3877
|
|
|
3873
|
-
// tslint:disable:variable-name
|
|
3874
3878
|
var CaseDetails = /** @class */ (function () {
|
|
3875
3879
|
function CaseDetails() {
|
|
3876
3880
|
}
|
|
3877
3881
|
return CaseDetails;
|
|
3878
3882
|
}());
|
|
3879
3883
|
|
|
3880
|
-
// tslint:disable:variable-name
|
|
3881
3884
|
var CaseEventData = /** @class */ (function () {
|
|
3882
3885
|
function CaseEventData() {
|
|
3883
3886
|
}
|
|
@@ -3885,7 +3888,12 @@
|
|
|
3885
3888
|
}());
|
|
3886
3889
|
|
|
3887
3890
|
var WorkbasketInputModel = /** @class */ (function () {
|
|
3888
|
-
function WorkbasketInputModel() {
|
|
3891
|
+
function WorkbasketInputModel(label, order, field, metadata, display_context_parameter) {
|
|
3892
|
+
this.label = label;
|
|
3893
|
+
this.order = order;
|
|
3894
|
+
this.field = field;
|
|
3895
|
+
this.metadata = metadata;
|
|
3896
|
+
this.display_context_parameter = display_context_parameter;
|
|
3889
3897
|
}
|
|
3890
3898
|
return WorkbasketInputModel;
|
|
3891
3899
|
}());
|
|
@@ -3933,9 +3941,9 @@
|
|
|
3933
3941
|
});
|
|
3934
3942
|
return valueMap;
|
|
3935
3943
|
};
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3944
|
+
FieldsUtils.getType = function (elem) {
|
|
3945
|
+
return Object.prototype.toString.call(elem).slice(8, -1);
|
|
3946
|
+
};
|
|
3939
3947
|
FieldsUtils.isObject = function (elem) {
|
|
3940
3948
|
return typeof elem === 'object' && elem !== null;
|
|
3941
3949
|
};
|
|
@@ -4444,7 +4452,6 @@
|
|
|
4444
4452
|
var elements = (result[field.id] || field.value);
|
|
4445
4453
|
if (elements) {
|
|
4446
4454
|
elements.forEach(function (elem) {
|
|
4447
|
-
// tslint:disable-next-line:switch-default
|
|
4448
4455
|
switch (field.field_type.collection_field_type.type) {
|
|
4449
4456
|
case 'MoneyGBP': {
|
|
4450
4457
|
elem.value = FieldsUtils.getMoneyGBP(elem.value);
|
|
@@ -4494,6 +4501,7 @@
|
|
|
4494
4501
|
if (!condition) {
|
|
4495
4502
|
return null;
|
|
4496
4503
|
}
|
|
4504
|
+
;
|
|
4497
4505
|
condition = condition.replace(/CONTAINS/g, ' CONTAINS');
|
|
4498
4506
|
return peg.parse(condition.trim(), {});
|
|
4499
4507
|
};
|
|
@@ -4507,12 +4515,14 @@
|
|
|
4507
4515
|
if (!conditions || conditions.length === 0) {
|
|
4508
4516
|
return true;
|
|
4509
4517
|
}
|
|
4518
|
+
;
|
|
4510
4519
|
var validJoinComparators = ['AND', 'OR'];
|
|
4511
|
-
|
|
4520
|
+
var result = conditions.reduce(function (accumulator, condition, index) {
|
|
4512
4521
|
var isJoinComparator = function (comparator) { return (typeof comparator === 'string' && validJoinComparators.indexOf(comparator) !== -1); };
|
|
4513
4522
|
if (isJoinComparator(condition)) {
|
|
4514
4523
|
return accumulator;
|
|
4515
4524
|
}
|
|
4525
|
+
;
|
|
4516
4526
|
var currentConditionResult = true;
|
|
4517
4527
|
if (Array.isArray(condition)) {
|
|
4518
4528
|
currentConditionResult = _this.evaluate(fields, condition);
|
|
@@ -4529,9 +4539,9 @@
|
|
|
4529
4539
|
}
|
|
4530
4540
|
return currentConditionResult;
|
|
4531
4541
|
}, true);
|
|
4542
|
+
return result;
|
|
4532
4543
|
};
|
|
4533
4544
|
ConditionParser.evaluateJoin = function (leftResult, comparator, rightResult) {
|
|
4534
|
-
// tslint:disable-next-line:switch-default
|
|
4535
4545
|
switch (comparator) {
|
|
4536
4546
|
case 'OR': return leftResult || rightResult;
|
|
4537
4547
|
case 'AND': return leftResult && rightResult;
|
|
@@ -4621,7 +4631,8 @@
|
|
|
4621
4631
|
}
|
|
4622
4632
|
};
|
|
4623
4633
|
ConditionParser.unquoted = function (str) {
|
|
4624
|
-
|
|
4634
|
+
var res = str.replace(/^"|"$/g, ''); // NOSONAR
|
|
4635
|
+
return res;
|
|
4625
4636
|
};
|
|
4626
4637
|
ConditionParser.findValueForComplexCondition = function (fields, head, tail, path) {
|
|
4627
4638
|
if (!fields) {
|
|
@@ -4735,8 +4746,8 @@
|
|
|
4735
4746
|
if (originalCondition.indexOf(condition.fieldReference) > -1) {
|
|
4736
4747
|
if (this.processedList && this.processedList.indexOf(condition.fieldReference) === -1) {
|
|
4737
4748
|
this.processedList.push(condition.fieldReference);
|
|
4738
|
-
var regularExp = new RegExp(
|
|
4739
|
-
return originalCondition.replace(regularExp, pathPrefix +
|
|
4749
|
+
var regularExp = new RegExp('(\\b)' + condition.fieldReference + '(?=[^"]*(?:"[^"]*"[^"]*)*$)(\\b)', 'g');
|
|
4750
|
+
return originalCondition.replace(regularExp, pathPrefix + '.' + condition.fieldReference);
|
|
4740
4751
|
}
|
|
4741
4752
|
else {
|
|
4742
4753
|
return originalCondition;
|
|
@@ -4815,7 +4826,6 @@
|
|
|
4815
4826
|
}
|
|
4816
4827
|
// Consider what type of field this is.
|
|
4817
4828
|
var ft = caseField.field_type;
|
|
4818
|
-
// tslint:disable-next-line:switch-default
|
|
4819
4829
|
switch (ft.type) {
|
|
4820
4830
|
case 'Collection':
|
|
4821
4831
|
if (ft.collection_field_type.type === 'Complex' && ft.collection_field_type.complex_fields) {
|
|
@@ -5306,14 +5316,14 @@
|
|
|
5306
5316
|
var formFields = form.getRawValue();
|
|
5307
5317
|
var currentPage = wizard.getPage(currentPageId, this.fieldsUtils.buildCanShowPredicate(eventTrigger, form));
|
|
5308
5318
|
currentPage.wizard_page_fields.forEach(function (wpf) {
|
|
5309
|
-
var
|
|
5310
|
-
if (_this.hasShowConditionField(
|
|
5311
|
-
var condition = new ShowCondition(
|
|
5312
|
-
if (_this.isHidden(condition, formFields.data) && !(_this.isReadonly(
|
|
5313
|
-
_this.resetField(form,
|
|
5319
|
+
var case_field = _this.findCaseFieldByWizardPageFieldId(currentPage, wpf);
|
|
5320
|
+
if (_this.hasShowConditionField(case_field, formFields)) {
|
|
5321
|
+
var condition = new ShowCondition(case_field.show_condition);
|
|
5322
|
+
if (_this.isHidden(condition, formFields.data) && !(_this.isReadonly(case_field))) {
|
|
5323
|
+
_this.resetField(form, case_field);
|
|
5314
5324
|
}
|
|
5315
5325
|
}
|
|
5316
|
-
_this.retainHiddenValueByFieldType(
|
|
5326
|
+
_this.retainHiddenValueByFieldType(case_field, form);
|
|
5317
5327
|
});
|
|
5318
5328
|
};
|
|
5319
5329
|
FieldsPurger.prototype.retainHiddenValueByFieldType = function (field, form) {
|
|
@@ -5344,13 +5354,13 @@
|
|
|
5344
5354
|
FieldsPurger.prototype.hasShowConditionPage = function (wizardPage, formFields) {
|
|
5345
5355
|
return wizardPage.show_condition && formFields[this.getShowConditionKey(wizardPage.show_condition)];
|
|
5346
5356
|
};
|
|
5347
|
-
FieldsPurger.prototype.hasShowConditionField = function (
|
|
5348
|
-
return
|
|
5357
|
+
FieldsPurger.prototype.hasShowConditionField = function (case_field, formFields) {
|
|
5358
|
+
return case_field.show_condition && formFields.data[this.getShowConditionKey(case_field.show_condition)];
|
|
5349
5359
|
};
|
|
5350
|
-
FieldsPurger.prototype.getShowConditionKey = function (
|
|
5360
|
+
FieldsPurger.prototype.getShowConditionKey = function (show_condition) {
|
|
5351
5361
|
// Need to allow for negated conditions, i.e. !=, as well as regular ones (=)
|
|
5352
5362
|
// Also need to allow for conditions specified using the "CONTAINS" keyword
|
|
5353
|
-
return
|
|
5363
|
+
return show_condition.split(/!=|=|CONTAINS/)[0];
|
|
5354
5364
|
};
|
|
5355
5365
|
FieldsPurger.prototype.resetField = function (form, field) {
|
|
5356
5366
|
var e_1, _a;
|
|
@@ -5446,8 +5456,8 @@
|
|
|
5446
5456
|
FieldsPurger.prototype.resetPage = function (form, wizardPage) {
|
|
5447
5457
|
var _this = this;
|
|
5448
5458
|
wizardPage.wizard_page_fields.forEach(function (wpf) {
|
|
5449
|
-
var
|
|
5450
|
-
_this.resetField(form,
|
|
5459
|
+
var case_field = _this.findCaseFieldByWizardPageFieldId(wizardPage, wpf);
|
|
5460
|
+
_this.resetField(form, case_field);
|
|
5451
5461
|
});
|
|
5452
5462
|
};
|
|
5453
5463
|
FieldsPurger.prototype.getType = function (elem) {
|
|
@@ -5457,8 +5467,8 @@
|
|
|
5457
5467
|
return this.getType(elem) === 'Object';
|
|
5458
5468
|
};
|
|
5459
5469
|
// TODO: call isReadOnly on CaseFields once we make it available
|
|
5460
|
-
FieldsPurger.prototype.isReadonly = function (
|
|
5461
|
-
return
|
|
5470
|
+
FieldsPurger.prototype.isReadonly = function (case_field) {
|
|
5471
|
+
return case_field.display_context.toUpperCase() === 'READONLY';
|
|
5462
5472
|
};
|
|
5463
5473
|
/**
|
|
5464
5474
|
* Deletes a field value by setting the value of the corresponding {@link FormControl} to null (or an empty array
|
|
@@ -5645,7 +5655,6 @@
|
|
|
5645
5655
|
return;
|
|
5646
5656
|
}
|
|
5647
5657
|
caseFields.forEach(function (caseField) {
|
|
5648
|
-
// tslint:disable-next-line:switch-default
|
|
5649
5658
|
switch (caseField.field_type.type) {
|
|
5650
5659
|
case FieldTypeSanitiser.FIELD_TYPE_DYNAMIC_MULTISELECT_LIST:
|
|
5651
5660
|
_this.convertArrayToDynamicListOutput(caseField, data);
|
|
@@ -6354,6 +6363,7 @@
|
|
|
6354
6363
|
});
|
|
6355
6364
|
}
|
|
6356
6365
|
}
|
|
6366
|
+
;
|
|
6357
6367
|
});
|
|
6358
6368
|
}
|
|
6359
6369
|
};
|
|
@@ -6792,7 +6802,7 @@
|
|
|
6792
6802
|
return addressModel;
|
|
6793
6803
|
};
|
|
6794
6804
|
AddressParser.prototype.parseAddressLine1 = function (classification, address) {
|
|
6795
|
-
var addressLine;
|
|
6805
|
+
var addressLine = '';
|
|
6796
6806
|
if (classification === AddressType.RD06) {
|
|
6797
6807
|
addressLine =
|
|
6798
6808
|
address.SUB_BUILDING_NAME + " " + address.ORGANISATION_NAME + " " + address.DEPARTMENT_NAME + " " + address.PO_BOX_NUMBER;
|
|
@@ -6805,7 +6815,7 @@
|
|
|
6805
6815
|
return this.removeNonAddressValues(addressLine);
|
|
6806
6816
|
};
|
|
6807
6817
|
AddressParser.prototype.parseAddressLine2 = function (classification, address) {
|
|
6808
|
-
var addressLine;
|
|
6818
|
+
var addressLine = '';
|
|
6809
6819
|
if (classification === AddressType.RD06) {
|
|
6810
6820
|
addressLine = address.BUILDING_NAME + " ";
|
|
6811
6821
|
}
|
|
@@ -6816,7 +6826,7 @@
|
|
|
6816
6826
|
return this.removeNonAddressValues(addressLine);
|
|
6817
6827
|
};
|
|
6818
6828
|
AddressParser.prototype.parseAddressLine3 = function (classification, address) {
|
|
6819
|
-
var addressLine;
|
|
6829
|
+
var addressLine = '';
|
|
6820
6830
|
if (classification === AddressType.RD06) {
|
|
6821
6831
|
addressLine =
|
|
6822
6832
|
address.BUILDING_NUMBER + " " + address.THOROUGHFARE_NAME;
|
|
@@ -6844,7 +6854,7 @@
|
|
|
6844
6854
|
return value.replace(new RegExp('^,', 'gi'), '');
|
|
6845
6855
|
};
|
|
6846
6856
|
AddressParser.prototype.prefixWithCommaIfPresent = function (value) {
|
|
6847
|
-
return value ?
|
|
6857
|
+
return value ? ', ' + value : value;
|
|
6848
6858
|
};
|
|
6849
6859
|
return AddressParser;
|
|
6850
6860
|
}());
|
|
@@ -7094,7 +7104,7 @@
|
|
|
7094
7104
|
if (flagType) {
|
|
7095
7105
|
url += "?flag-type=" + flagType;
|
|
7096
7106
|
}
|
|
7097
|
-
if (
|
|
7107
|
+
if (welshRequired != null) {
|
|
7098
7108
|
// Check if flag-type has been added to the query string; if so, append welsh-required with '&'
|
|
7099
7109
|
url.indexOf('?') > -1 ? url += '&' : url += '?';
|
|
7100
7110
|
welshRequired ? url += 'welsh-required=Y' : url += 'welsh-required=N';
|
|
@@ -7700,6 +7710,18 @@
|
|
|
7700
7710
|
}], null, null);
|
|
7701
7711
|
})();
|
|
7702
7712
|
|
|
7713
|
+
var HasLoadingState = /** @class */ (function () {
|
|
7714
|
+
function HasLoadingState() {
|
|
7715
|
+
}
|
|
7716
|
+
Object.defineProperty(HasLoadingState.prototype, "isLoading", {
|
|
7717
|
+
get: function () {
|
|
7718
|
+
return;
|
|
7719
|
+
},
|
|
7720
|
+
enumerable: false,
|
|
7721
|
+
configurable: true
|
|
7722
|
+
});
|
|
7723
|
+
return HasLoadingState;
|
|
7724
|
+
}());
|
|
7703
7725
|
var LoadingService = /** @class */ (function () {
|
|
7704
7726
|
function LoadingService() {
|
|
7705
7727
|
this.registered = new Map();
|
|
@@ -7724,7 +7746,7 @@
|
|
|
7724
7746
|
};
|
|
7725
7747
|
LoadingService.prototype.generateToken = function () {
|
|
7726
7748
|
var timestamp = window.performance.now();
|
|
7727
|
-
return
|
|
7749
|
+
return 'toolkit-loading-' + timestamp; // format: [source-library]-[unique incrementing number]
|
|
7728
7750
|
};
|
|
7729
7751
|
return LoadingService;
|
|
7730
7752
|
}());
|
|
@@ -7745,7 +7767,10 @@
|
|
|
7745
7767
|
}
|
|
7746
7768
|
SearchService.prototype.search = function (jurisdictionId, caseTypeId, metaCriteria, caseCriteria, view) {
|
|
7747
7769
|
var _this = this;
|
|
7748
|
-
var url = this.appConfig.getApiUrl() + "/caseworkers/:uid
|
|
7770
|
+
var url = this.appConfig.getApiUrl() + "/caseworkers/:uid"
|
|
7771
|
+
+ ("/jurisdictions/" + jurisdictionId)
|
|
7772
|
+
+ ("/case-types/" + caseTypeId)
|
|
7773
|
+
+ "/cases";
|
|
7749
7774
|
var options = this.requestOptionsBuilder.buildOptions(metaCriteria, caseCriteria, view);
|
|
7750
7775
|
var loadingToken = this.loadingService.register();
|
|
7751
7776
|
return this.httpService
|
|
@@ -7754,14 +7779,15 @@
|
|
|
7754
7779
|
};
|
|
7755
7780
|
SearchService.prototype.searchCasesByIds = function (caseTypeId, filter, view, sort) {
|
|
7756
7781
|
var _this = this;
|
|
7757
|
-
var url = this.appConfig.getCaseDataUrl() +
|
|
7782
|
+
var url = this.appConfig.getCaseDataUrl() +
|
|
7783
|
+
("/internal/searchCases?ctid=" + caseTypeId + "&use_case=" + view);
|
|
7758
7784
|
var body = Object.assign(Object.assign({ sort: sort }, filter), { size: this.appConfig.getPaginationPageSize() });
|
|
7759
7785
|
var loadingToken = this.loadingService.register();
|
|
7760
7786
|
return this.httpService.post(url, body).pipe(operators.map(function (response) { return response; }), operators.finalize(function () { return _this.loadingService.unregister(loadingToken); }));
|
|
7761
7787
|
};
|
|
7762
7788
|
SearchService.prototype.searchCases = function (caseTypeId, metaCriteria, caseCriteria, view, sort) {
|
|
7763
7789
|
var _this = this;
|
|
7764
|
-
var url = this.appConfig.getCaseDataUrl() + "/internal/searchCases?ctid=" + caseTypeId + "&use_case=" + view;
|
|
7790
|
+
var url = this.appConfig.getCaseDataUrl() + ("/internal/searchCases?ctid=" + caseTypeId + "&use_case=" + view);
|
|
7765
7791
|
var options = this.requestOptionsBuilder.buildOptions(metaCriteria, caseCriteria, view);
|
|
7766
7792
|
var body = {
|
|
7767
7793
|
sort: sort,
|
|
@@ -7806,8 +7832,9 @@
|
|
|
7806
7832
|
return SearchService;
|
|
7807
7833
|
}());
|
|
7808
7834
|
SearchService.V2_MEDIATYPE_SEARCH_INPUTS = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-search-input-details.v2+json;charset=UTF-8';
|
|
7809
|
-
|
|
7835
|
+
SearchService.VIEW_SEARCH = 'SEARCH';
|
|
7810
7836
|
SearchService.VIEW_WORKBASKET = 'WORKBASKET';
|
|
7837
|
+
SearchService.FIELD_PREFIX = 'case.';
|
|
7811
7838
|
SearchService.ɵfac = function SearchService_Factory(t) { return new (t || SearchService)(i0__namespace.ɵɵinject(AbstractAppConfig), i0__namespace.ɵɵinject(HttpService), i0__namespace.ɵɵinject(RequestOptionsBuilder), i0__namespace.ɵɵinject(LoadingService)); };
|
|
7812
7839
|
SearchService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: SearchService, factory: SearchService.ɵfac });
|
|
7813
7840
|
(function () {
|
|
@@ -7937,12 +7964,17 @@
|
|
|
7937
7964
|
this.appConfig = appConfig;
|
|
7938
7965
|
}
|
|
7939
7966
|
DefinitionsService.prototype.getCaseTypes = function (jurisdictionId, access) {
|
|
7940
|
-
var url = this.appConfig.getApiUrl()
|
|
7967
|
+
var url = this.appConfig.getApiUrl()
|
|
7968
|
+
+ "/caseworkers/:uid"
|
|
7969
|
+
+ ("/jurisdictions/" + jurisdictionId)
|
|
7970
|
+
+ ("/case-types?access=" + access);
|
|
7941
7971
|
return this.http
|
|
7942
7972
|
.get(url).pipe(operators.map(function (response) { return response; }));
|
|
7943
7973
|
};
|
|
7944
7974
|
DefinitionsService.prototype.getJurisdictions = function (access) {
|
|
7945
|
-
var url = this.appConfig.getApiUrl()
|
|
7975
|
+
var url = this.appConfig.getApiUrl()
|
|
7976
|
+
+ "/caseworkers/:uid"
|
|
7977
|
+
+ ("/jurisdictions?access=" + access);
|
|
7946
7978
|
return this.http
|
|
7947
7979
|
.get(url)
|
|
7948
7980
|
.pipe(operators.map(function (response) { return response; }));
|
|
@@ -8024,8 +8056,8 @@
|
|
|
8024
8056
|
compare: function (a, b) {
|
|
8025
8057
|
var fieldA = a.case_fields[fieldId];
|
|
8026
8058
|
var fieldB = b.case_fields[fieldId];
|
|
8027
|
-
fieldA = util.isUndefined(fieldA) || fieldA
|
|
8028
|
-
fieldB = util.isUndefined(fieldB) || fieldB
|
|
8059
|
+
fieldA = util.isUndefined(fieldA) || fieldA == null ? '' : fieldA.toLowerCase();
|
|
8060
|
+
fieldB = util.isUndefined(fieldB) || fieldB == null ? '' : fieldB.toLowerCase();
|
|
8029
8061
|
return fieldA === fieldB ? 0 : fieldA > fieldB ? 1 : -1;
|
|
8030
8062
|
}
|
|
8031
8063
|
};
|
|
@@ -8035,8 +8067,8 @@
|
|
|
8035
8067
|
compare: function (a, b) {
|
|
8036
8068
|
var fieldA = a.case_fields[fieldId];
|
|
8037
8069
|
var fieldB = b.case_fields[fieldId];
|
|
8038
|
-
fieldA = util.isUndefined(fieldA) || fieldA
|
|
8039
|
-
fieldB = util.isUndefined(fieldB) || fieldB
|
|
8070
|
+
fieldA = util.isUndefined(fieldA) || fieldA == null ? '' : fieldA.join().toLowerCase();
|
|
8071
|
+
fieldB = util.isUndefined(fieldB) || fieldB == null ? '' : fieldB.join().toLowerCase();
|
|
8040
8072
|
return fieldA === fieldB ? 0 : fieldA > fieldB ? 1 : -1;
|
|
8041
8073
|
}
|
|
8042
8074
|
};
|
|
@@ -8294,31 +8326,31 @@
|
|
|
8294
8326
|
};
|
|
8295
8327
|
WizardPageFieldToCaseFieldMapper.prototype.processComplexFieldOverride = function (override, caseField, caseFields) {
|
|
8296
8328
|
var caseFieldIds = override.complex_field_element_id.split('.');
|
|
8297
|
-
var
|
|
8329
|
+
var case_field_leaf;
|
|
8298
8330
|
var children = this.getCaseFieldChildren(caseField);
|
|
8299
8331
|
if (children.length > 0) {
|
|
8300
8332
|
var _a = __read(caseFieldIds), _ = _a[0], tail = _a.slice(1);
|
|
8301
|
-
|
|
8333
|
+
case_field_leaf = this.getCaseFieldLeaf(tail, children);
|
|
8302
8334
|
}
|
|
8303
8335
|
else {
|
|
8304
|
-
|
|
8336
|
+
case_field_leaf = this.getCaseFieldLeaf(caseFieldIds, caseFields);
|
|
8305
8337
|
}
|
|
8306
8338
|
if (override.display_context !== 'HIDDEN') {
|
|
8307
|
-
|
|
8308
|
-
|
|
8339
|
+
case_field_leaf.hidden = false;
|
|
8340
|
+
case_field_leaf.display_context = override.display_context;
|
|
8309
8341
|
if (override.label && override.label.length > 0) {
|
|
8310
|
-
|
|
8342
|
+
case_field_leaf.label = override.label;
|
|
8311
8343
|
}
|
|
8312
8344
|
if (override.hint_text && override.hint_text.length > 0) {
|
|
8313
|
-
|
|
8345
|
+
case_field_leaf.hint_text = override.hint_text;
|
|
8314
8346
|
}
|
|
8315
8347
|
if (override.show_condition && override.show_condition.length > 0) {
|
|
8316
|
-
|
|
8348
|
+
case_field_leaf.show_condition = override.show_condition;
|
|
8317
8349
|
}
|
|
8318
8350
|
}
|
|
8319
8351
|
else {
|
|
8320
|
-
|
|
8321
|
-
|
|
8352
|
+
case_field_leaf.hidden = true;
|
|
8353
|
+
case_field_leaf.display_context = override.display_context;
|
|
8322
8354
|
}
|
|
8323
8355
|
};
|
|
8324
8356
|
WizardPageFieldToCaseFieldMapper.prototype.fixShowConditionPath = function (caseField, pathPrefix) {
|
|
@@ -8332,7 +8364,7 @@
|
|
|
8332
8364
|
});
|
|
8333
8365
|
};
|
|
8334
8366
|
WizardPageFieldToCaseFieldMapper.prototype.preparePathPrefix = function (pathPrefix, caseField) {
|
|
8335
|
-
return pathPrefix.length === 0 ? caseField : pathPrefix +
|
|
8367
|
+
return pathPrefix.length === 0 ? caseField : pathPrefix + '.' + caseField;
|
|
8336
8368
|
};
|
|
8337
8369
|
WizardPageFieldToCaseFieldMapper.prototype.getCaseFieldLeaf = function (caseFieldId, caseFields) {
|
|
8338
8370
|
var _a = __read(caseFieldId), head = _a[0], tail = _a.slice(1);
|
|
@@ -8389,13 +8421,223 @@
|
|
|
8389
8421
|
}], null, null);
|
|
8390
8422
|
})();
|
|
8391
8423
|
|
|
8424
|
+
var MULTIPLE_TASKS_FOUND = 'More than one task found!';
|
|
8425
|
+
var WorkAllocationService = /** @class */ (function () {
|
|
8426
|
+
function WorkAllocationService(http, appConfig, errorService, alertService, sessionStorageService) {
|
|
8427
|
+
this.http = http;
|
|
8428
|
+
this.appConfig = appConfig;
|
|
8429
|
+
this.errorService = errorService;
|
|
8430
|
+
this.alertService = alertService;
|
|
8431
|
+
this.sessionStorageService = sessionStorageService;
|
|
8432
|
+
// Check to see if work allocation is enabled
|
|
8433
|
+
}
|
|
8434
|
+
/**
|
|
8435
|
+
* Call the API to get tasks matching the search criteria.
|
|
8436
|
+
* @param searchRequest The search parameters that specify which tasks to match.
|
|
8437
|
+
*/
|
|
8438
|
+
WorkAllocationService.prototype.searchTasks = function (searchRequest) {
|
|
8439
|
+
var _this = this;
|
|
8440
|
+
// Do not need to check if WA enabled as parent method will do that
|
|
8441
|
+
var url = this.appConfig.getWorkAllocationApiUrl() + "/searchForCompletable";
|
|
8442
|
+
return this.http
|
|
8443
|
+
.post(url, { searchRequest: searchRequest }, null, false)
|
|
8444
|
+
.pipe(operators.map(function (response) { return response; }), operators.catchError(function (error) {
|
|
8445
|
+
_this.errorService.setError(error);
|
|
8446
|
+
// explicitly eat away 401 error and 400 error
|
|
8447
|
+
if (error && error.status && (error.status === 401 || error.status === 400)) {
|
|
8448
|
+
// do nothing
|
|
8449
|
+
console.log('error status 401 or 400', error);
|
|
8450
|
+
}
|
|
8451
|
+
else {
|
|
8452
|
+
return rxjs.throwError(error);
|
|
8453
|
+
}
|
|
8454
|
+
}));
|
|
8455
|
+
};
|
|
8456
|
+
WorkAllocationService.prototype.isWAEnabled = function (jurisdiction, caseType) {
|
|
8457
|
+
this.features = this.appConfig.getWAServiceConfig();
|
|
8458
|
+
var enabled = false;
|
|
8459
|
+
if (!jurisdiction || !caseType) {
|
|
8460
|
+
var caseInfo = JSON.parse(this.sessionStorageService.getItem('caseInfo'));
|
|
8461
|
+
jurisdiction = caseInfo.jurisdiction;
|
|
8462
|
+
caseType = caseInfo.caseType;
|
|
8463
|
+
}
|
|
8464
|
+
if (!this.features || !this.features.configurations) {
|
|
8465
|
+
return false;
|
|
8466
|
+
}
|
|
8467
|
+
this.features.configurations.forEach(function (serviceConfig) {
|
|
8468
|
+
if (serviceConfig.serviceName === jurisdiction && (serviceConfig.caseTypes.indexOf(caseType) !== -1)) {
|
|
8469
|
+
enabled = true;
|
|
8470
|
+
}
|
|
8471
|
+
});
|
|
8472
|
+
return enabled;
|
|
8473
|
+
};
|
|
8474
|
+
/**
|
|
8475
|
+
* Call the API to assign a task.
|
|
8476
|
+
* @param taskId specifies which task should be assigned.
|
|
8477
|
+
* @param userId specifies the user the task should be assigned to.
|
|
8478
|
+
*/
|
|
8479
|
+
WorkAllocationService.prototype.assignTask = function (taskId, userId) {
|
|
8480
|
+
var _this = this;
|
|
8481
|
+
if (!this.isWAEnabled()) {
|
|
8482
|
+
return rxjs.of(null);
|
|
8483
|
+
}
|
|
8484
|
+
var url = this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId + "/assign";
|
|
8485
|
+
return this.http
|
|
8486
|
+
.post(url, { userId: userId })
|
|
8487
|
+
.pipe(operators.catchError(function (error) {
|
|
8488
|
+
_this.errorService.setError(error);
|
|
8489
|
+
return rxjs.throwError(error);
|
|
8490
|
+
}));
|
|
8491
|
+
};
|
|
8492
|
+
/**
|
|
8493
|
+
* Call the API to complete a task.
|
|
8494
|
+
* @param taskId specifies which task should be completed.
|
|
8495
|
+
*/
|
|
8496
|
+
WorkAllocationService.prototype.completeTask = function (taskId) {
|
|
8497
|
+
var _this = this;
|
|
8498
|
+
if (!this.isWAEnabled()) {
|
|
8499
|
+
return rxjs.of(null);
|
|
8500
|
+
}
|
|
8501
|
+
var url = this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId + "/complete";
|
|
8502
|
+
return this.http
|
|
8503
|
+
.post(url, {})
|
|
8504
|
+
.pipe(operators.catchError(function (error) {
|
|
8505
|
+
_this.errorService.setError(error);
|
|
8506
|
+
// this will subscribe to get the user details and decide whether to display an error message
|
|
8507
|
+
_this.http.get(_this.appConfig.getUserInfoApiUrl()).pipe(operators.map(function (response) { return response; })).subscribe(function (response) {
|
|
8508
|
+
_this.handleTaskCompletionError(response);
|
|
8509
|
+
});
|
|
8510
|
+
return rxjs.throwError(error);
|
|
8511
|
+
}));
|
|
8512
|
+
};
|
|
8513
|
+
/**
|
|
8514
|
+
* Call the API to assign and complete a task.
|
|
8515
|
+
* @param taskId specifies which task should be completed.
|
|
8516
|
+
*/
|
|
8517
|
+
WorkAllocationService.prototype.assignAndCompleteTask = function (taskId) {
|
|
8518
|
+
var _this = this;
|
|
8519
|
+
if (!this.isWAEnabled()) {
|
|
8520
|
+
return rxjs.of(null);
|
|
8521
|
+
}
|
|
8522
|
+
var url = this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId + "/complete";
|
|
8523
|
+
return this.http
|
|
8524
|
+
.post(url, {
|
|
8525
|
+
completion_options: {
|
|
8526
|
+
assign_and_complete: true
|
|
8527
|
+
}
|
|
8528
|
+
})
|
|
8529
|
+
.pipe(operators.catchError(function (error) {
|
|
8530
|
+
_this.errorService.setError(error);
|
|
8531
|
+
// this will subscribe to get the user details and decide whether to display an error message
|
|
8532
|
+
_this.http.get(_this.appConfig.getUserInfoApiUrl()).pipe(operators.map(function (response) { return response; })).subscribe(function (response) {
|
|
8533
|
+
_this.handleTaskCompletionError(response);
|
|
8534
|
+
});
|
|
8535
|
+
return rxjs.throwError(error);
|
|
8536
|
+
}));
|
|
8537
|
+
};
|
|
8538
|
+
/**
|
|
8539
|
+
* Handles the response from the observable to get the user details when task is completed.
|
|
8540
|
+
* @param response is the response given from the observable which contains the user detaild.
|
|
8541
|
+
*/
|
|
8542
|
+
WorkAllocationService.prototype.handleTaskCompletionError = function (response) {
|
|
8543
|
+
var userDetails = response;
|
|
8544
|
+
if (this.userIsCaseworker(userDetails.userInfo.roles)) {
|
|
8545
|
+
// when submitting the completion of task if not yet rendered cases/case confirm then preserve the alert for re-rendering
|
|
8546
|
+
this.alertService.setPreserveAlerts(true, ['cases/case', 'submit']);
|
|
8547
|
+
this.alertService.warning('A task could not be completed successfully. Please complete the task associated with the case manually.');
|
|
8548
|
+
}
|
|
8549
|
+
};
|
|
8550
|
+
/**
|
|
8551
|
+
* Returns true if the user's role is equivalent to a caseworker.
|
|
8552
|
+
* @param roles is the list of roles found from the current user.
|
|
8553
|
+
*/
|
|
8554
|
+
WorkAllocationService.prototype.userIsCaseworker = function (roles) {
|
|
8555
|
+
var lowerCaseRoles = roles.map(function (role) { return role.toLowerCase(); });
|
|
8556
|
+
// When/if lib & target permanently change to es2016, replace indexOf with includes
|
|
8557
|
+
return (lowerCaseRoles.indexOf(WorkAllocationService.iACCaseOfficer) !== -1)
|
|
8558
|
+
|| (lowerCaseRoles.indexOf(WorkAllocationService.iACAdmOfficer) !== -1);
|
|
8559
|
+
};
|
|
8560
|
+
/**
|
|
8561
|
+
* Look for open tasks for a case and event combination. There are 5 possible scenarios:
|
|
8562
|
+
* 1. No tasks found => Success.
|
|
8563
|
+
* 2. One task found => Mark as done => Success.
|
|
8564
|
+
* 3. One task found => Mark as done throws error => Failure.
|
|
8565
|
+
* 4. More than one task found => Failure.
|
|
8566
|
+
* 5. Search call throws an error => Failure.
|
|
8567
|
+
* @param ccdId The ID of the case to find tasks for.
|
|
8568
|
+
* @param eventId The ID of the event to find tasks for.
|
|
8569
|
+
*/
|
|
8570
|
+
WorkAllocationService.prototype.completeAppropriateTask = function (ccdId, eventId, jurisdiction, caseTypeId) {
|
|
8571
|
+
var _this = this;
|
|
8572
|
+
if (!this.isWAEnabled(jurisdiction, caseTypeId)) {
|
|
8573
|
+
return rxjs.of(null);
|
|
8574
|
+
}
|
|
8575
|
+
var taskSearchParameter = {
|
|
8576
|
+
ccdId: ccdId,
|
|
8577
|
+
eventId: eventId,
|
|
8578
|
+
jurisdiction: jurisdiction,
|
|
8579
|
+
caseTypeId: caseTypeId
|
|
8580
|
+
};
|
|
8581
|
+
return this.searchTasks(taskSearchParameter)
|
|
8582
|
+
.pipe(operators.map(function (response) {
|
|
8583
|
+
var tasks = response.tasks;
|
|
8584
|
+
if (tasks && tasks.length > 0) {
|
|
8585
|
+
if (tasks.length === 1) {
|
|
8586
|
+
_this.completeTask(tasks[0].id).subscribe();
|
|
8587
|
+
}
|
|
8588
|
+
else {
|
|
8589
|
+
// This is a problem. Throw an appropriate error.
|
|
8590
|
+
throw new Error(MULTIPLE_TASKS_FOUND);
|
|
8591
|
+
}
|
|
8592
|
+
}
|
|
8593
|
+
return true; // All good. Nothing to see here.
|
|
8594
|
+
}), operators.catchError(function (error) {
|
|
8595
|
+
// Simply rethrow it.
|
|
8596
|
+
return rxjs.throwError(error);
|
|
8597
|
+
}));
|
|
8598
|
+
};
|
|
8599
|
+
/**
|
|
8600
|
+
* Return tasks for case and event.
|
|
8601
|
+
*/
|
|
8602
|
+
WorkAllocationService.prototype.getTasksByCaseIdAndEventId = function (eventId, caseId, caseType, jurisdiction) {
|
|
8603
|
+
var defaultPayload = {
|
|
8604
|
+
task_required_for_event: false,
|
|
8605
|
+
tasks: []
|
|
8606
|
+
};
|
|
8607
|
+
if (!this.isWAEnabled()) {
|
|
8608
|
+
return rxjs.of(defaultPayload);
|
|
8609
|
+
}
|
|
8610
|
+
return this.http.get(this.appConfig.getWorkAllocationApiUrl() + "/case/tasks/" + caseId + "/event/" + eventId + "/caseType/" + caseType + "/jurisdiction/" + jurisdiction);
|
|
8611
|
+
};
|
|
8612
|
+
/**
|
|
8613
|
+
* Call the API to get a task
|
|
8614
|
+
*/
|
|
8615
|
+
WorkAllocationService.prototype.getTask = function (taskId) {
|
|
8616
|
+
if (!this.isWAEnabled()) {
|
|
8617
|
+
return rxjs.of({ task: null });
|
|
8618
|
+
}
|
|
8619
|
+
return this.http.get(this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId);
|
|
8620
|
+
};
|
|
8621
|
+
return WorkAllocationService;
|
|
8622
|
+
}());
|
|
8623
|
+
WorkAllocationService.iACCaseOfficer = 'caseworker-ia-caseofficer';
|
|
8624
|
+
WorkAllocationService.iACAdmOfficer = 'caseworker-ia-admofficer';
|
|
8625
|
+
WorkAllocationService.ɵfac = function WorkAllocationService_Factory(t) { return new (t || WorkAllocationService)(i0__namespace.ɵɵinject(HttpService), i0__namespace.ɵɵinject(AbstractAppConfig), i0__namespace.ɵɵinject(HttpErrorService), i0__namespace.ɵɵinject(AlertService), i0__namespace.ɵɵinject(SessionStorageService)); };
|
|
8626
|
+
WorkAllocationService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: WorkAllocationService, factory: WorkAllocationService.ɵfac });
|
|
8627
|
+
(function () {
|
|
8628
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(WorkAllocationService, [{
|
|
8629
|
+
type: i0.Injectable
|
|
8630
|
+
}], function () { return [{ type: HttpService }, { type: AbstractAppConfig }, { type: HttpErrorService }, { type: AlertService }, { type: SessionStorageService }]; }, null);
|
|
8631
|
+
})();
|
|
8632
|
+
|
|
8392
8633
|
var CasesService = /** @class */ (function () {
|
|
8393
|
-
function CasesService(http, appConfig, orderService, errorService, wizardPageFieldToCaseFieldMapper, loadingService, sessionStorageService) {
|
|
8634
|
+
function CasesService(http, appConfig, orderService, errorService, wizardPageFieldToCaseFieldMapper, workAllocationService, loadingService, sessionStorageService) {
|
|
8394
8635
|
this.http = http;
|
|
8395
8636
|
this.appConfig = appConfig;
|
|
8396
8637
|
this.orderService = orderService;
|
|
8397
8638
|
this.errorService = errorService;
|
|
8398
8639
|
this.wizardPageFieldToCaseFieldMapper = wizardPageFieldToCaseFieldMapper;
|
|
8640
|
+
this.workAllocationService = workAllocationService;
|
|
8399
8641
|
this.loadingService = loadingService;
|
|
8400
8642
|
this.sessionStorageService = sessionStorageService;
|
|
8401
8643
|
this.get = this.getCaseView;
|
|
@@ -8414,7 +8656,11 @@
|
|
|
8414
8656
|
};
|
|
8415
8657
|
CasesService.prototype.getCaseView = function (jurisdictionId, caseTypeId, caseId) {
|
|
8416
8658
|
var _this = this;
|
|
8417
|
-
var url = this.appConfig.getApiUrl()
|
|
8659
|
+
var url = this.appConfig.getApiUrl()
|
|
8660
|
+
+ "/caseworkers/:uid"
|
|
8661
|
+
+ ("/jurisdictions/" + jurisdictionId)
|
|
8662
|
+
+ ("/case-types/" + caseTypeId)
|
|
8663
|
+
+ ("/cases/" + caseId);
|
|
8418
8664
|
var loadingToken = this.loadingService.register();
|
|
8419
8665
|
return this.http
|
|
8420
8666
|
.get(url)
|
|
@@ -8466,7 +8712,7 @@
|
|
|
8466
8712
|
CasesService.prototype.createEvent = function (caseDetails, eventData) {
|
|
8467
8713
|
var _this = this;
|
|
8468
8714
|
var caseId = caseDetails.case_id;
|
|
8469
|
-
var url = this.appConfig.getCaseDataUrl() + "/cases/" + caseId + "/events";
|
|
8715
|
+
var url = this.appConfig.getCaseDataUrl() + ("/cases/" + caseId + "/events");
|
|
8470
8716
|
var headers = new i1$2.HttpHeaders()
|
|
8471
8717
|
.set('experimental', 'true')
|
|
8472
8718
|
.set('Accept', CasesService.V2_MEDIATYPE_CREATE_EVENT)
|
|
@@ -8480,8 +8726,9 @@
|
|
|
8480
8726
|
};
|
|
8481
8727
|
CasesService.prototype.validateCase = function (ctid, eventData, pageId) {
|
|
8482
8728
|
var _this = this;
|
|
8483
|
-
var pageIdString = pageId ?
|
|
8484
|
-
var url = this.appConfig.getCaseDataUrl()
|
|
8729
|
+
var pageIdString = pageId ? '?pageId=' + pageId : '';
|
|
8730
|
+
var url = this.appConfig.getCaseDataUrl()
|
|
8731
|
+
+ ("/case-types/" + ctid + "/validate" + pageIdString);
|
|
8485
8732
|
var headers = new i1$2.HttpHeaders()
|
|
8486
8733
|
.set('experimental', 'true')
|
|
8487
8734
|
.set('Accept', CasesService.V2_MEDIATYPE_CASE_DATA_VALIDATE)
|
|
@@ -8499,7 +8746,8 @@
|
|
|
8499
8746
|
if (eventData.ignore_warning) {
|
|
8500
8747
|
ignoreWarning = 'true';
|
|
8501
8748
|
}
|
|
8502
|
-
var url = this.appConfig.getCaseDataUrl()
|
|
8749
|
+
var url = this.appConfig.getCaseDataUrl()
|
|
8750
|
+
+ ("/case-types/" + ctid + "/cases?ignore-warning=" + ignoreWarning);
|
|
8503
8751
|
var headers = new i1$2.HttpHeaders()
|
|
8504
8752
|
.set('experimental', 'true')
|
|
8505
8753
|
.set('Accept', CasesService.V2_MEDIATYPE_CREATE_CASE)
|
|
@@ -8513,7 +8761,9 @@
|
|
|
8513
8761
|
};
|
|
8514
8762
|
CasesService.prototype.getPrintDocuments = function (caseId) {
|
|
8515
8763
|
var _this = this;
|
|
8516
|
-
var url = this.appConfig.getCaseDataUrl()
|
|
8764
|
+
var url = this.appConfig.getCaseDataUrl()
|
|
8765
|
+
+ ("/cases/" + caseId)
|
|
8766
|
+
+ "/documents";
|
|
8517
8767
|
var headers = new i1$2.HttpHeaders()
|
|
8518
8768
|
.set('experimental', 'true')
|
|
8519
8769
|
.set('Accept', CasesService.V2_MEDIATYPE_CASE_DOCUMENTS)
|
|
@@ -8622,12 +8872,12 @@
|
|
|
8622
8872
|
CasesService.V2_MEDIATYPE_CREATE_EVENT = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.create-event.v2+json;charset=UTF-8';
|
|
8623
8873
|
CasesService.V2_MEDIATYPE_CREATE_CASE = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.create-case.v2+json;charset=UTF-8';
|
|
8624
8874
|
CasesService.PUI_CASE_MANAGER = 'pui-case-manager';
|
|
8625
|
-
CasesService.ɵfac = function CasesService_Factory(t) { return new (t || CasesService)(i0__namespace.ɵɵinject(HttpService), i0__namespace.ɵɵinject(AbstractAppConfig), i0__namespace.ɵɵinject(OrderService), i0__namespace.ɵɵinject(HttpErrorService), i0__namespace.ɵɵinject(WizardPageFieldToCaseFieldMapper), i0__namespace.ɵɵinject(LoadingService), i0__namespace.ɵɵinject(SessionStorageService)); };
|
|
8875
|
+
CasesService.ɵfac = function CasesService_Factory(t) { return new (t || CasesService)(i0__namespace.ɵɵinject(HttpService), i0__namespace.ɵɵinject(AbstractAppConfig), i0__namespace.ɵɵinject(OrderService), i0__namespace.ɵɵinject(HttpErrorService), i0__namespace.ɵɵinject(WizardPageFieldToCaseFieldMapper), i0__namespace.ɵɵinject(WorkAllocationService), i0__namespace.ɵɵinject(LoadingService), i0__namespace.ɵɵinject(SessionStorageService)); };
|
|
8626
8876
|
CasesService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: CasesService, factory: CasesService.ɵfac });
|
|
8627
8877
|
(function () {
|
|
8628
8878
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(CasesService, [{
|
|
8629
8879
|
type: i0.Injectable
|
|
8630
|
-
}], function () { return [{ type: HttpService }, { type: AbstractAppConfig }, { type: OrderService }, { type: HttpErrorService }, { type: WizardPageFieldToCaseFieldMapper }, { type: LoadingService }, { type: SessionStorageService }]; }, null);
|
|
8880
|
+
}], function () { return [{ type: HttpService }, { type: AbstractAppConfig }, { type: OrderService }, { type: HttpErrorService }, { type: WizardPageFieldToCaseFieldMapper }, { type: WorkAllocationService }, { type: LoadingService }, { type: SessionStorageService }]; }, null);
|
|
8631
8881
|
})();
|
|
8632
8882
|
|
|
8633
8883
|
var EventTriggerService = /** @class */ (function () {
|
|
@@ -9249,7 +9499,7 @@
|
|
|
9249
9499
|
PageValidationService.prototype.isHidden = function (caseField, editForm, path) {
|
|
9250
9500
|
var formFields = editForm.getRawValue();
|
|
9251
9501
|
var condition = ShowCondition.getInstance(caseField.show_condition);
|
|
9252
|
-
if (path && path.indexOf(
|
|
9502
|
+
if (path && path.indexOf('_' + caseField.id + '_') === -1) {
|
|
9253
9503
|
path = "" + path + caseField.id;
|
|
9254
9504
|
}
|
|
9255
9505
|
return !condition.match(formFields.data, path);
|
|
@@ -9281,215 +9531,6 @@
|
|
|
9281
9531
|
}], function () { return [{ type: CaseFieldService }]; }, null);
|
|
9282
9532
|
})();
|
|
9283
9533
|
|
|
9284
|
-
var MULTIPLE_TASKS_FOUND = 'More than one task found!';
|
|
9285
|
-
var WorkAllocationService = /** @class */ (function () {
|
|
9286
|
-
function WorkAllocationService(http, appConfig, errorService, alertService, sessionStorageService) {
|
|
9287
|
-
this.http = http;
|
|
9288
|
-
this.appConfig = appConfig;
|
|
9289
|
-
this.errorService = errorService;
|
|
9290
|
-
this.alertService = alertService;
|
|
9291
|
-
this.sessionStorageService = sessionStorageService;
|
|
9292
|
-
// Check to see if work allocation is enabled
|
|
9293
|
-
}
|
|
9294
|
-
/**
|
|
9295
|
-
* Call the API to get tasks matching the search criteria.
|
|
9296
|
-
* @param searchRequest The search parameters that specify which tasks to match.
|
|
9297
|
-
*/
|
|
9298
|
-
WorkAllocationService.prototype.searchTasks = function (searchRequest) {
|
|
9299
|
-
var _this = this;
|
|
9300
|
-
// Do not need to check if WA enabled as parent method will do that
|
|
9301
|
-
var url = this.appConfig.getWorkAllocationApiUrl() + "/searchForCompletable";
|
|
9302
|
-
return this.http
|
|
9303
|
-
.post(url, { searchRequest: searchRequest }, null, false)
|
|
9304
|
-
.pipe(operators.map(function (response) { return response; }), operators.catchError(function (error) {
|
|
9305
|
-
_this.errorService.setError(error);
|
|
9306
|
-
// explicitly eat away 401 error and 400 error
|
|
9307
|
-
if (error && error.status && (error.status === 401 || error.status === 400)) {
|
|
9308
|
-
// do nothing
|
|
9309
|
-
console.log('error status 401 or 400', error);
|
|
9310
|
-
}
|
|
9311
|
-
else {
|
|
9312
|
-
return rxjs.throwError(error);
|
|
9313
|
-
}
|
|
9314
|
-
}));
|
|
9315
|
-
};
|
|
9316
|
-
WorkAllocationService.prototype.isWAEnabled = function (jurisdiction, caseType) {
|
|
9317
|
-
this.features = this.appConfig.getWAServiceConfig();
|
|
9318
|
-
var enabled = false;
|
|
9319
|
-
if (!jurisdiction || !caseType) {
|
|
9320
|
-
var caseInfo = JSON.parse(this.sessionStorageService.getItem('caseInfo'));
|
|
9321
|
-
jurisdiction = caseInfo.jurisdiction;
|
|
9322
|
-
caseType = caseInfo.caseType;
|
|
9323
|
-
}
|
|
9324
|
-
if (!this.features || !this.features.configurations) {
|
|
9325
|
-
return false;
|
|
9326
|
-
}
|
|
9327
|
-
this.features.configurations.forEach(function (serviceConfig) {
|
|
9328
|
-
if (serviceConfig.serviceName === jurisdiction && (serviceConfig.caseTypes.indexOf(caseType) !== -1)) {
|
|
9329
|
-
enabled = true;
|
|
9330
|
-
}
|
|
9331
|
-
});
|
|
9332
|
-
return enabled;
|
|
9333
|
-
};
|
|
9334
|
-
/**
|
|
9335
|
-
* Call the API to assign a task.
|
|
9336
|
-
* @param taskId specifies which task should be assigned.
|
|
9337
|
-
* @param userId specifies the user the task should be assigned to.
|
|
9338
|
-
*/
|
|
9339
|
-
WorkAllocationService.prototype.assignTask = function (taskId, userId) {
|
|
9340
|
-
var _this = this;
|
|
9341
|
-
if (!this.isWAEnabled()) {
|
|
9342
|
-
return rxjs.of(null);
|
|
9343
|
-
}
|
|
9344
|
-
var url = this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId + "/assign";
|
|
9345
|
-
return this.http
|
|
9346
|
-
.post(url, { userId: userId })
|
|
9347
|
-
.pipe(operators.catchError(function (error) {
|
|
9348
|
-
_this.errorService.setError(error);
|
|
9349
|
-
return rxjs.throwError(error);
|
|
9350
|
-
}));
|
|
9351
|
-
};
|
|
9352
|
-
/**
|
|
9353
|
-
* Call the API to complete a task.
|
|
9354
|
-
* @param taskId specifies which task should be completed.
|
|
9355
|
-
*/
|
|
9356
|
-
WorkAllocationService.prototype.completeTask = function (taskId) {
|
|
9357
|
-
var _this = this;
|
|
9358
|
-
if (!this.isWAEnabled()) {
|
|
9359
|
-
return rxjs.of(null);
|
|
9360
|
-
}
|
|
9361
|
-
var url = this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId + "/complete";
|
|
9362
|
-
return this.http
|
|
9363
|
-
.post(url, {})
|
|
9364
|
-
.pipe(operators.catchError(function (error) {
|
|
9365
|
-
_this.errorService.setError(error);
|
|
9366
|
-
// this will subscribe to get the user details and decide whether to display an error message
|
|
9367
|
-
_this.http.get(_this.appConfig.getUserInfoApiUrl()).pipe(operators.map(function (response) { return response; })).subscribe(function (response) {
|
|
9368
|
-
_this.handleTaskCompletionError(response);
|
|
9369
|
-
});
|
|
9370
|
-
return rxjs.throwError(error);
|
|
9371
|
-
}));
|
|
9372
|
-
};
|
|
9373
|
-
/**
|
|
9374
|
-
* Call the API to assign and complete a task.
|
|
9375
|
-
* @param taskId specifies which task should be completed.
|
|
9376
|
-
*/
|
|
9377
|
-
WorkAllocationService.prototype.assignAndCompleteTask = function (taskId) {
|
|
9378
|
-
var _this = this;
|
|
9379
|
-
if (!this.isWAEnabled()) {
|
|
9380
|
-
return rxjs.of(null);
|
|
9381
|
-
}
|
|
9382
|
-
var url = this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId + "/complete";
|
|
9383
|
-
return this.http
|
|
9384
|
-
.post(url, {
|
|
9385
|
-
completion_options: {
|
|
9386
|
-
assign_and_complete: true
|
|
9387
|
-
}
|
|
9388
|
-
})
|
|
9389
|
-
.pipe(operators.catchError(function (error) {
|
|
9390
|
-
_this.errorService.setError(error);
|
|
9391
|
-
// this will subscribe to get the user details and decide whether to display an error message
|
|
9392
|
-
_this.http.get(_this.appConfig.getUserInfoApiUrl()).pipe(operators.map(function (response) { return response; })).subscribe(function (response) {
|
|
9393
|
-
_this.handleTaskCompletionError(response);
|
|
9394
|
-
});
|
|
9395
|
-
return rxjs.throwError(error);
|
|
9396
|
-
}));
|
|
9397
|
-
};
|
|
9398
|
-
/**
|
|
9399
|
-
* Handles the response from the observable to get the user details when task is completed.
|
|
9400
|
-
* @param response is the response given from the observable which contains the user detaild.
|
|
9401
|
-
*/
|
|
9402
|
-
WorkAllocationService.prototype.handleTaskCompletionError = function (response) {
|
|
9403
|
-
var userDetails = response;
|
|
9404
|
-
if (this.userIsCaseworker(userDetails.userInfo.roles)) {
|
|
9405
|
-
// when submitting the completion of task if not yet rendered cases/case confirm then preserve the alert for re-rendering
|
|
9406
|
-
this.alertService.setPreserveAlerts(true, ['cases/case', 'submit']);
|
|
9407
|
-
this.alertService.warning('A task could not be completed successfully. Please complete the task associated with the case manually.');
|
|
9408
|
-
}
|
|
9409
|
-
};
|
|
9410
|
-
/**
|
|
9411
|
-
* Returns true if the user's role is equivalent to a caseworker.
|
|
9412
|
-
* @param roles is the list of roles found from the current user.
|
|
9413
|
-
*/
|
|
9414
|
-
WorkAllocationService.prototype.userIsCaseworker = function (roles) {
|
|
9415
|
-
var lowerCaseRoles = roles.map(function (role) { return role.toLowerCase(); });
|
|
9416
|
-
// When/if lib & target permanently change to es2016, replace indexOf with includes
|
|
9417
|
-
return (lowerCaseRoles.indexOf(WorkAllocationService.iACCaseOfficer) !== -1)
|
|
9418
|
-
|| (lowerCaseRoles.indexOf(WorkAllocationService.iACAdmOfficer) !== -1);
|
|
9419
|
-
};
|
|
9420
|
-
/**
|
|
9421
|
-
* Look for open tasks for a case and event combination. There are 5 possible scenarios:
|
|
9422
|
-
* 1. No tasks found => Success.
|
|
9423
|
-
* 2. One task found => Mark as done => Success.
|
|
9424
|
-
* 3. One task found => Mark as done throws error => Failure.
|
|
9425
|
-
* 4. More than one task found => Failure.
|
|
9426
|
-
* 5. Search call throws an error => Failure.
|
|
9427
|
-
* @param ccdId The ID of the case to find tasks for.
|
|
9428
|
-
* @param eventId The ID of the event to find tasks for.
|
|
9429
|
-
*/
|
|
9430
|
-
WorkAllocationService.prototype.completeAppropriateTask = function (ccdId, eventId, jurisdiction, caseTypeId) {
|
|
9431
|
-
var _this = this;
|
|
9432
|
-
if (!this.isWAEnabled(jurisdiction, caseTypeId)) {
|
|
9433
|
-
return rxjs.of(null);
|
|
9434
|
-
}
|
|
9435
|
-
var taskSearchParameter = {
|
|
9436
|
-
ccdId: ccdId,
|
|
9437
|
-
eventId: eventId,
|
|
9438
|
-
jurisdiction: jurisdiction,
|
|
9439
|
-
caseTypeId: caseTypeId
|
|
9440
|
-
};
|
|
9441
|
-
return this.searchTasks(taskSearchParameter)
|
|
9442
|
-
.pipe(operators.map(function (response) {
|
|
9443
|
-
var tasks = response.tasks;
|
|
9444
|
-
if (tasks && tasks.length > 0) {
|
|
9445
|
-
if (tasks.length === 1) {
|
|
9446
|
-
_this.completeTask(tasks[0].id).subscribe();
|
|
9447
|
-
}
|
|
9448
|
-
else {
|
|
9449
|
-
// This is a problem. Throw an appropriate error.
|
|
9450
|
-
throw new Error(MULTIPLE_TASKS_FOUND);
|
|
9451
|
-
}
|
|
9452
|
-
}
|
|
9453
|
-
return true; // All good. Nothing to see here.
|
|
9454
|
-
}), operators.catchError(function (error) {
|
|
9455
|
-
// Simply rethrow it.
|
|
9456
|
-
return rxjs.throwError(error);
|
|
9457
|
-
}));
|
|
9458
|
-
};
|
|
9459
|
-
/**
|
|
9460
|
-
* Return tasks for case and event.
|
|
9461
|
-
*/
|
|
9462
|
-
WorkAllocationService.prototype.getTasksByCaseIdAndEventId = function (eventId, caseId, caseType, jurisdiction) {
|
|
9463
|
-
var defaultPayload = {
|
|
9464
|
-
task_required_for_event: false,
|
|
9465
|
-
tasks: []
|
|
9466
|
-
};
|
|
9467
|
-
if (!this.isWAEnabled()) {
|
|
9468
|
-
return rxjs.of(defaultPayload);
|
|
9469
|
-
}
|
|
9470
|
-
return this.http.get(this.appConfig.getWorkAllocationApiUrl() + "/case/tasks/" + caseId + "/event/" + eventId + "/caseType/" + caseType + "/jurisdiction/" + jurisdiction);
|
|
9471
|
-
};
|
|
9472
|
-
/**
|
|
9473
|
-
* Call the API to get a task
|
|
9474
|
-
*/
|
|
9475
|
-
WorkAllocationService.prototype.getTask = function (taskId) {
|
|
9476
|
-
if (!this.isWAEnabled()) {
|
|
9477
|
-
return rxjs.of({ task: null });
|
|
9478
|
-
}
|
|
9479
|
-
return this.http.get(this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId);
|
|
9480
|
-
};
|
|
9481
|
-
return WorkAllocationService;
|
|
9482
|
-
}());
|
|
9483
|
-
WorkAllocationService.iACCaseOfficer = 'caseworker-ia-caseofficer';
|
|
9484
|
-
WorkAllocationService.iACAdmOfficer = 'caseworker-ia-admofficer';
|
|
9485
|
-
WorkAllocationService.ɵfac = function WorkAllocationService_Factory(t) { return new (t || WorkAllocationService)(i0__namespace.ɵɵinject(HttpService), i0__namespace.ɵɵinject(AbstractAppConfig), i0__namespace.ɵɵinject(HttpErrorService), i0__namespace.ɵɵinject(AlertService), i0__namespace.ɵɵinject(SessionStorageService)); };
|
|
9486
|
-
WorkAllocationService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: WorkAllocationService, factory: WorkAllocationService.ɵfac });
|
|
9487
|
-
(function () {
|
|
9488
|
-
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(WorkAllocationService, [{
|
|
9489
|
-
type: i0.Injectable
|
|
9490
|
-
}], function () { return [{ type: HttpService }, { type: AbstractAppConfig }, { type: HttpErrorService }, { type: AlertService }, { type: SessionStorageService }]; }, null);
|
|
9491
|
-
})();
|
|
9492
|
-
|
|
9493
9534
|
var CaseEditComponent = /** @class */ (function () {
|
|
9494
9535
|
function CaseEditComponent(fb, router, route, fieldsUtils, fieldsPurger, registrarService, wizardFactory, sessionStorageService, windowsService) {
|
|
9495
9536
|
this.fb = fb;
|
|
@@ -10428,7 +10469,7 @@
|
|
|
10428
10469
|
var label = casefield.label || 'Field';
|
|
10429
10470
|
var id_1 = casefield.id;
|
|
10430
10471
|
if (fieldElement['component'] && fieldElement['component'].parent) {
|
|
10431
|
-
if (fieldElement['component'].idPrefix.indexOf(
|
|
10472
|
+
if (fieldElement['component'].idPrefix.indexOf('_' + id_1 + '_') === -1) {
|
|
10432
10473
|
id_1 = "" + fieldElement['component'].idPrefix + id_1;
|
|
10433
10474
|
}
|
|
10434
10475
|
else {
|
|
@@ -10569,8 +10610,8 @@
|
|
|
10569
10610
|
}
|
|
10570
10611
|
};
|
|
10571
10612
|
CaseEditPageComponent.prototype.callbackErrorsNotify = function (errorContext) {
|
|
10572
|
-
this.ignoreWarning = errorContext.
|
|
10573
|
-
this.triggerText = errorContext.
|
|
10613
|
+
this.ignoreWarning = errorContext.ignore_warning;
|
|
10614
|
+
this.triggerText = errorContext.trigger_text;
|
|
10574
10615
|
};
|
|
10575
10616
|
CaseEditPageComponent.prototype.next = function () {
|
|
10576
10617
|
this.resetErrors();
|
|
@@ -10916,12 +10957,12 @@
|
|
|
10916
10957
|
CallbackErrorsComponent.prototype.buildCallbackErrorsContext = function () {
|
|
10917
10958
|
var errorContext = new CallbackErrorsContext();
|
|
10918
10959
|
if (this.hasWarnings() && !this.hasErrors() && !this.hasInvalidData()) {
|
|
10919
|
-
errorContext.
|
|
10920
|
-
errorContext.
|
|
10960
|
+
errorContext.ignore_warning = true;
|
|
10961
|
+
errorContext.trigger_text = this.triggerTextIgnore;
|
|
10921
10962
|
}
|
|
10922
10963
|
else {
|
|
10923
|
-
errorContext.
|
|
10924
|
-
errorContext.
|
|
10964
|
+
errorContext.ignore_warning = false;
|
|
10965
|
+
errorContext.trigger_text = this.triggerTextContinue;
|
|
10925
10966
|
}
|
|
10926
10967
|
return errorContext;
|
|
10927
10968
|
};
|
|
@@ -10966,7 +11007,7 @@
|
|
|
10966
11007
|
|
|
10967
11008
|
var AddressOption = /** @class */ (function () {
|
|
10968
11009
|
function AddressOption(addressModel, description) {
|
|
10969
|
-
if (description
|
|
11010
|
+
if (description == null) {
|
|
10970
11011
|
this.value = addressModel;
|
|
10971
11012
|
this.description = this.getDescription();
|
|
10972
11013
|
}
|
|
@@ -10975,10 +11016,13 @@
|
|
|
10975
11016
|
}
|
|
10976
11017
|
}
|
|
10977
11018
|
AddressOption.prototype.getDescription = function () {
|
|
10978
|
-
return this.removeInitialCommaIfPresent(
|
|
11019
|
+
return this.removeInitialCommaIfPresent((this.value.AddressLine1 === undefined ? '' : this.value.AddressLine1)
|
|
11020
|
+
+ this.prefixWithCommaIfPresent(this.value.AddressLine2)
|
|
11021
|
+
+ this.prefixWithCommaIfPresent(this.value.AddressLine3)
|
|
11022
|
+
+ ', ' + this.value.PostTown);
|
|
10979
11023
|
};
|
|
10980
11024
|
AddressOption.prototype.prefixWithCommaIfPresent = function (value) {
|
|
10981
|
-
return value ?
|
|
11025
|
+
return value ? ', ' + value : value;
|
|
10982
11026
|
};
|
|
10983
11027
|
AddressOption.prototype.removeInitialCommaIfPresent = function (value) {
|
|
10984
11028
|
return value.replace(new RegExp('^,', 'gi'), '');
|
|
@@ -11122,7 +11166,7 @@
|
|
|
11122
11166
|
this.missingPostcode = false;
|
|
11123
11167
|
var postcode_1 = this.postcode.value;
|
|
11124
11168
|
this.caseField.value = null;
|
|
11125
|
-
this.addressOptions =
|
|
11169
|
+
this.addressOptions = new Array();
|
|
11126
11170
|
this.addressesService.getAddressesForPostcode(postcode_1.replace(' ', '').toUpperCase()).subscribe(function (result) {
|
|
11127
11171
|
result.forEach(function (address) {
|
|
11128
11172
|
_this.addressOptions.push(new AddressOption(address, null));
|
|
@@ -11165,7 +11209,7 @@
|
|
|
11165
11209
|
var hasAddress = false;
|
|
11166
11210
|
if (address) {
|
|
11167
11211
|
Object.keys(address).forEach(function (key) {
|
|
11168
|
-
if (address[key]
|
|
11212
|
+
if (address[key] != null) {
|
|
11169
11213
|
hasAddress = true;
|
|
11170
11214
|
}
|
|
11171
11215
|
});
|
|
@@ -11188,7 +11232,7 @@
|
|
|
11188
11232
|
};
|
|
11189
11233
|
WriteAddressFieldComponent.prototype.defaultLabel = function (numberOfAddresses) {
|
|
11190
11234
|
return numberOfAddresses === 0 ? 'No address found'
|
|
11191
|
-
:
|
|
11235
|
+
: numberOfAddresses + (numberOfAddresses === 1 ? ' address ' : ' addresses ') + 'found';
|
|
11192
11236
|
};
|
|
11193
11237
|
WriteAddressFieldComponent.prototype.setFormValue = function () {
|
|
11194
11238
|
if (this.writeComplexFieldComponent.complexGroup) {
|
|
@@ -12746,7 +12790,7 @@
|
|
|
12746
12790
|
}
|
|
12747
12791
|
};
|
|
12748
12792
|
WriteCollectionFieldComponent.prototype.buildCaseField = function (item, index, isNew) {
|
|
12749
|
-
var e_1,
|
|
12793
|
+
var e_1, _a;
|
|
12750
12794
|
if (isNew === void 0) { isNew = false; }
|
|
12751
12795
|
/**
|
|
12752
12796
|
* What follow is code that makes me want to go jump in the shower!
|
|
@@ -12782,8 +12826,8 @@
|
|
|
12782
12826
|
if (!value) {
|
|
12783
12827
|
value = new i2.FormGroup({});
|
|
12784
12828
|
try {
|
|
12785
|
-
for (var
|
|
12786
|
-
var key =
|
|
12829
|
+
for (var _b = __values(Object.keys(group.controls)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
12830
|
+
var key = _c.value;
|
|
12787
12831
|
value.addControl(key, group.get(key));
|
|
12788
12832
|
// DON'T remove the control for this key from the outer group or it
|
|
12789
12833
|
// goes awry. So DON'T uncomment the below line!
|
|
@@ -12793,7 +12837,7 @@
|
|
|
12793
12837
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
12794
12838
|
finally {
|
|
12795
12839
|
try {
|
|
12796
|
-
if (
|
|
12840
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
12797
12841
|
}
|
|
12798
12842
|
finally { if (e_1) throw e_1.error; }
|
|
12799
12843
|
}
|
|
@@ -12924,7 +12968,6 @@
|
|
|
12924
12968
|
this.formArray.removeAt(index);
|
|
12925
12969
|
};
|
|
12926
12970
|
WriteCollectionFieldComponent.prototype.resetIds = function (index) {
|
|
12927
|
-
var _a, _b;
|
|
12928
12971
|
for (var i = index; i < this.collItems.length; i++) {
|
|
12929
12972
|
var counter = i + 1;
|
|
12930
12973
|
if (this.collItems[i].index && this.collItems[i].index === counter) {
|
|
@@ -12934,15 +12977,16 @@
|
|
|
12934
12977
|
&& this.collItems[i].caseField.id === counter.toString()) {
|
|
12935
12978
|
this.collItems[i].caseField.id = i.toString();
|
|
12936
12979
|
}
|
|
12937
|
-
var idPrefix1 = this.collItems[i].prefix ? this.collItems[i].prefix.replace(
|
|
12938
|
-
var idPrefix1Current = idPrefix1.replace(
|
|
12980
|
+
var idPrefix1 = this.collItems[i].prefix ? this.collItems[i].prefix.replace('_' + counter.toString(), '_' + i.toString()) : '';
|
|
12981
|
+
var idPrefix1Current = idPrefix1.replace('_' + i.toString(), '_' + counter.toString());
|
|
12939
12982
|
if (this.collItems[i].prefix && this.collItems[i].prefix === idPrefix1Current) {
|
|
12940
12983
|
this.collItems[i].prefix = idPrefix1;
|
|
12941
12984
|
}
|
|
12942
|
-
var idPrefixAvailable =
|
|
12985
|
+
var idPrefixAvailable = this.collItems[i].container && this.collItems[i].container['component']
|
|
12986
|
+
&& this.collItems[i].container['component'].idPrefix ? true : false;
|
|
12943
12987
|
var idPrefix2 = idPrefixAvailable ?
|
|
12944
|
-
this.collItems[i].container['component'].idPrefix.replace(
|
|
12945
|
-
var idPrefix2current = idPrefix2.replace(
|
|
12988
|
+
this.collItems[i].container['component'].idPrefix.replace('_' + counter.toString(), '_' + i.toString()) : '';
|
|
12989
|
+
var idPrefix2current = idPrefix2.replace('_' + i.toString(), '_' + counter.toString());
|
|
12946
12990
|
if (idPrefixAvailable && this.collItems[i].container['component'].idPrefix === idPrefix2current) {
|
|
12947
12991
|
this.collItems[i].container['component'].idPrefix = idPrefix2;
|
|
12948
12992
|
}
|
|
@@ -14298,257 +14342,6 @@
|
|
|
14298
14342
|
}], null, null);
|
|
14299
14343
|
})();
|
|
14300
14344
|
|
|
14301
|
-
var FixedListPipe = /** @class */ (function () {
|
|
14302
|
-
function FixedListPipe() {
|
|
14303
|
-
}
|
|
14304
|
-
FixedListPipe.prototype.transform = function (value, items) {
|
|
14305
|
-
if (!!items) {
|
|
14306
|
-
var item = items.find(function (i) { return i.code === value; });
|
|
14307
|
-
return item ? item.label : FixedListPipe.EMPTY;
|
|
14308
|
-
}
|
|
14309
|
-
else {
|
|
14310
|
-
return FixedListPipe.EMPTY;
|
|
14311
|
-
}
|
|
14312
|
-
};
|
|
14313
|
-
return FixedListPipe;
|
|
14314
|
-
}());
|
|
14315
|
-
FixedListPipe.EMPTY = '';
|
|
14316
|
-
FixedListPipe.ɵfac = function FixedListPipe_Factory(t) { return new (t || FixedListPipe)(); };
|
|
14317
|
-
FixedListPipe.ɵpipe = i0__namespace.ɵɵdefinePipe({ name: "ccdFixedList", type: FixedListPipe, pure: true });
|
|
14318
|
-
(function () {
|
|
14319
|
-
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(FixedListPipe, [{
|
|
14320
|
-
type: i0.Pipe,
|
|
14321
|
-
args: [{
|
|
14322
|
-
name: 'ccdFixedList'
|
|
14323
|
-
}]
|
|
14324
|
-
}], null, null);
|
|
14325
|
-
})();
|
|
14326
|
-
|
|
14327
|
-
function ReadDynamicMultiSelectListFieldComponent_div_0_Template(rf, ctx) {
|
|
14328
|
-
if (rf & 1) {
|
|
14329
|
-
i0__namespace.ɵɵelementStart(0, "div");
|
|
14330
|
-
i0__namespace.ɵɵtext(1);
|
|
14331
|
-
i0__namespace.ɵɵpipe(2, "ccdFixedList");
|
|
14332
|
-
i0__namespace.ɵɵelementEnd();
|
|
14333
|
-
}
|
|
14334
|
-
if (rf & 2) {
|
|
14335
|
-
var value_r1 = ctx.$implicit;
|
|
14336
|
-
var ctx_r0 = i0__namespace.ɵɵnextContext();
|
|
14337
|
-
i0__namespace.ɵɵadvance(1);
|
|
14338
|
-
i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind2(2, 1, value_r1.code, ctx_r0.caseField.list_items), "\n");
|
|
14339
|
-
}
|
|
14340
|
-
}
|
|
14341
|
-
var ReadDynamicMultiSelectListFieldComponent = /** @class */ (function (_super) {
|
|
14342
|
-
__extends(ReadDynamicMultiSelectListFieldComponent, _super);
|
|
14343
|
-
function ReadDynamicMultiSelectListFieldComponent() {
|
|
14344
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
14345
|
-
}
|
|
14346
|
-
ReadDynamicMultiSelectListFieldComponent.prototype.ngOnInit = function () {
|
|
14347
|
-
/**
|
|
14348
|
-
*
|
|
14349
|
-
* Reassigning list_items from formatted_list when list_items is empty
|
|
14350
|
-
*/
|
|
14351
|
-
if (!this.caseField.list_items && this.caseField.formatted_value && this.caseField.formatted_value.list_items) {
|
|
14352
|
-
this.caseField.list_items = this.caseField.formatted_value.list_items;
|
|
14353
|
-
}
|
|
14354
|
-
if (!this.caseField.value && this.caseField.formatted_value && this.caseField.formatted_value.value) {
|
|
14355
|
-
this.caseField.value = this.caseField.formatted_value.value;
|
|
14356
|
-
}
|
|
14357
|
-
_super.prototype.ngOnInit.call(this);
|
|
14358
|
-
};
|
|
14359
|
-
return ReadDynamicMultiSelectListFieldComponent;
|
|
14360
|
-
}(AbstractFieldReadComponent));
|
|
14361
|
-
ReadDynamicMultiSelectListFieldComponent.ɵfac = function ReadDynamicMultiSelectListFieldComponent_Factory(t) { return ɵReadDynamicMultiSelectListFieldComponent_BaseFactory(t || ReadDynamicMultiSelectListFieldComponent); };
|
|
14362
|
-
ReadDynamicMultiSelectListFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: ReadDynamicMultiSelectListFieldComponent, selectors: [["ccd-read-dynamic-multi-select-list-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [[4, "ngFor", "ngForOf"]], template: function ReadDynamicMultiSelectListFieldComponent_Template(rf, ctx) {
|
|
14363
|
-
if (rf & 1) {
|
|
14364
|
-
i0__namespace.ɵɵtemplate(0, ReadDynamicMultiSelectListFieldComponent_div_0_Template, 3, 4, "div", 0);
|
|
14365
|
-
}
|
|
14366
|
-
if (rf & 2) {
|
|
14367
|
-
i0__namespace.ɵɵproperty("ngForOf", ctx.caseField.value);
|
|
14368
|
-
}
|
|
14369
|
-
}, directives: [i1__namespace.NgForOf], pipes: [FixedListPipe], styles: [".multi-select-list-field-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{padding:5px 0}.multi-select-list-field-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:last-child > td[_ngcontent-%COMP%]{border-bottom:none}.multi-select-list-field-table[_ngcontent-%COMP%] td.collection-actions[_ngcontent-%COMP%]{width:1px;white-space:nowrap}"] });
|
|
14370
|
-
var ɵReadDynamicMultiSelectListFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(ReadDynamicMultiSelectListFieldComponent);
|
|
14371
|
-
(function () {
|
|
14372
|
-
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ReadDynamicMultiSelectListFieldComponent, [{
|
|
14373
|
-
type: i0.Component,
|
|
14374
|
-
args: [{
|
|
14375
|
-
selector: 'ccd-read-dynamic-multi-select-list-field',
|
|
14376
|
-
templateUrl: './read-dynamic-multi-select-list-field.html',
|
|
14377
|
-
styleUrls: ['./read-dynamic-multi-select-list-field.component.scss']
|
|
14378
|
-
}]
|
|
14379
|
-
}], null, null);
|
|
14380
|
-
})();
|
|
14381
|
-
|
|
14382
|
-
function WriteDynamicMultiSelectListFieldComponent_span_3_Template(rf, ctx) {
|
|
14383
|
-
if (rf & 1) {
|
|
14384
|
-
i0__namespace.ɵɵelementStart(0, "span", 5);
|
|
14385
|
-
i0__namespace.ɵɵtext(1);
|
|
14386
|
-
i0__namespace.ɵɵpipe(2, "ccdFieldLabel");
|
|
14387
|
-
i0__namespace.ɵɵelementEnd();
|
|
14388
|
-
}
|
|
14389
|
-
if (rf & 2) {
|
|
14390
|
-
var ctx_r0 = i0__namespace.ɵɵnextContext();
|
|
14391
|
-
i0__namespace.ɵɵadvance(1);
|
|
14392
|
-
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r0.caseField));
|
|
14393
|
-
}
|
|
14394
|
-
}
|
|
14395
|
-
function WriteDynamicMultiSelectListFieldComponent_span_4_Template(rf, ctx) {
|
|
14396
|
-
if (rf & 1) {
|
|
14397
|
-
i0__namespace.ɵɵelementStart(0, "span", 6);
|
|
14398
|
-
i0__namespace.ɵɵtext(1);
|
|
14399
|
-
i0__namespace.ɵɵelementEnd();
|
|
14400
|
-
}
|
|
14401
|
-
if (rf & 2) {
|
|
14402
|
-
var ctx_r1 = i0__namespace.ɵɵnextContext();
|
|
14403
|
-
i0__namespace.ɵɵadvance(1);
|
|
14404
|
-
i0__namespace.ɵɵtextInterpolate(ctx_r1.caseField.hint_text);
|
|
14405
|
-
}
|
|
14406
|
-
}
|
|
14407
|
-
function WriteDynamicMultiSelectListFieldComponent_span_5_Template(rf, ctx) {
|
|
14408
|
-
if (rf & 1) {
|
|
14409
|
-
i0__namespace.ɵɵelementStart(0, "span", 7);
|
|
14410
|
-
i0__namespace.ɵɵtext(1);
|
|
14411
|
-
i0__namespace.ɵɵpipe(2, "ccdFirstError");
|
|
14412
|
-
i0__namespace.ɵɵelementEnd();
|
|
14413
|
-
}
|
|
14414
|
-
if (rf & 2) {
|
|
14415
|
-
var ctx_r2 = i0__namespace.ɵɵnextContext();
|
|
14416
|
-
i0__namespace.ɵɵadvance(1);
|
|
14417
|
-
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r2.checkboxes.errors));
|
|
14418
|
-
}
|
|
14419
|
-
}
|
|
14420
|
-
function WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template(rf, ctx) {
|
|
14421
|
-
if (rf & 1) {
|
|
14422
|
-
var _r6_1 = i0__namespace.ɵɵgetCurrentView();
|
|
14423
|
-
i0__namespace.ɵɵelementContainerStart(0);
|
|
14424
|
-
i0__namespace.ɵɵelementStart(1, "div", 8);
|
|
14425
|
-
i0__namespace.ɵɵelementStart(2, "input", 9);
|
|
14426
|
-
i0__namespace.ɵɵlistener("change", function WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template_input_change_2_listener($event) { i0__namespace.ɵɵrestoreView(_r6_1); var ctx_r5 = i0__namespace.ɵɵnextContext(); return ctx_r5.onCheckChange($event); });
|
|
14427
|
-
i0__namespace.ɵɵelementEnd();
|
|
14428
|
-
i0__namespace.ɵɵelementStart(3, "label", 10);
|
|
14429
|
-
i0__namespace.ɵɵtext(4);
|
|
14430
|
-
i0__namespace.ɵɵelementEnd();
|
|
14431
|
-
i0__namespace.ɵɵelementEnd();
|
|
14432
|
-
i0__namespace.ɵɵelementContainerEnd();
|
|
14433
|
-
}
|
|
14434
|
-
if (rf & 2) {
|
|
14435
|
-
var checkbox_r4 = ctx.$implicit;
|
|
14436
|
-
var ctx_r3 = i0__namespace.ɵɵnextContext();
|
|
14437
|
-
i0__namespace.ɵɵadvance(2);
|
|
14438
|
-
i0__namespace.ɵɵpropertyInterpolate("id", ctx_r3.createElementId(checkbox_r4.code));
|
|
14439
|
-
i0__namespace.ɵɵpropertyInterpolate("name", ctx_r3.id());
|
|
14440
|
-
i0__namespace.ɵɵproperty("value", checkbox_r4.code)("checked", ctx_r3.isSelected(checkbox_r4.code));
|
|
14441
|
-
i0__namespace.ɵɵadvance(1);
|
|
14442
|
-
i0__namespace.ɵɵpropertyInterpolate("for", ctx_r3.createElementId(checkbox_r4.code));
|
|
14443
|
-
i0__namespace.ɵɵadvance(1);
|
|
14444
|
-
i0__namespace.ɵɵtextInterpolate(checkbox_r4.label);
|
|
14445
|
-
}
|
|
14446
|
-
}
|
|
14447
|
-
var _c0$L = function (a0) { return { "error": a0 }; };
|
|
14448
|
-
var WriteDynamicMultiSelectListFieldComponent = /** @class */ (function (_super) {
|
|
14449
|
-
__extends(WriteDynamicMultiSelectListFieldComponent, _super);
|
|
14450
|
-
function WriteDynamicMultiSelectListFieldComponent() {
|
|
14451
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
14452
|
-
}
|
|
14453
|
-
WriteDynamicMultiSelectListFieldComponent.prototype.ngOnInit = function () {
|
|
14454
|
-
var _this = this;
|
|
14455
|
-
this.checkboxes = new i2.FormArray([]);
|
|
14456
|
-
this.setInitialCaseList();
|
|
14457
|
-
this.setInitialCaseFieldValue();
|
|
14458
|
-
// Initialise array with existing values
|
|
14459
|
-
if (this.caseField.value && Array.isArray(this.caseField.value)) {
|
|
14460
|
-
var values = this.caseField.value;
|
|
14461
|
-
values.forEach(function (value) {
|
|
14462
|
-
_this.checkboxes.push(new i2.FormControl(value));
|
|
14463
|
-
});
|
|
14464
|
-
}
|
|
14465
|
-
this.dynamicListFormControl = this.registerControl(new i2.FormControl(this.checkboxes.value));
|
|
14466
|
-
this.dynamicListFormControl.setValue(this.checkboxes.value);
|
|
14467
|
-
};
|
|
14468
|
-
WriteDynamicMultiSelectListFieldComponent.prototype.onCheckChange = function (event) {
|
|
14469
|
-
var _this = this;
|
|
14470
|
-
var target = event.target;
|
|
14471
|
-
if (!target || !target.value) {
|
|
14472
|
-
return;
|
|
14473
|
-
}
|
|
14474
|
-
var selectedListItem = this.getValueListItem(target.value);
|
|
14475
|
-
if (!this.isSelected(target.value)) {
|
|
14476
|
-
// Add a new control in the FormArray
|
|
14477
|
-
this.checkboxes.push(new i2.FormControl(selectedListItem));
|
|
14478
|
-
}
|
|
14479
|
-
else {
|
|
14480
|
-
// Remove the control from the FormArray
|
|
14481
|
-
this.checkboxes.controls.forEach(function (ctrl, i) {
|
|
14482
|
-
if (ctrl.value.code === target.value) {
|
|
14483
|
-
_this.checkboxes.removeAt(i);
|
|
14484
|
-
}
|
|
14485
|
-
});
|
|
14486
|
-
}
|
|
14487
|
-
this.dynamicListFormControl.setValue(this.checkboxes.value);
|
|
14488
|
-
};
|
|
14489
|
-
WriteDynamicMultiSelectListFieldComponent.prototype.isSelected = function (code) {
|
|
14490
|
-
if (this.checkboxes && this.checkboxes.controls) {
|
|
14491
|
-
return this.checkboxes.controls.find(function (control) { return control.value.code === code; });
|
|
14492
|
-
}
|
|
14493
|
-
};
|
|
14494
|
-
WriteDynamicMultiSelectListFieldComponent.prototype.getValueListItem = function (value) {
|
|
14495
|
-
return this.caseField.list_items.find(function (i) { return i.code === value; });
|
|
14496
|
-
};
|
|
14497
|
-
WriteDynamicMultiSelectListFieldComponent.prototype.setInitialCaseList = function () {
|
|
14498
|
-
var hasListItems = this.caseField.list_items && this.caseField.list_items.length > 0;
|
|
14499
|
-
var hasFormattedListItems = this.caseField.formatted_value && this.caseField.formatted_value.list_items.length > 0;
|
|
14500
|
-
if (!hasListItems && hasFormattedListItems) {
|
|
14501
|
-
this.caseField.list_items = this.caseField.formatted_value.list_items;
|
|
14502
|
-
}
|
|
14503
|
-
};
|
|
14504
|
-
WriteDynamicMultiSelectListFieldComponent.prototype.setInitialCaseFieldValue = function () {
|
|
14505
|
-
if (!this.caseField.value && this.caseField.formatted_value && this.caseField.formatted_value.value) {
|
|
14506
|
-
this.caseField.value = this.caseField.formatted_value.value;
|
|
14507
|
-
}
|
|
14508
|
-
var isNull = this.caseField.value === undefined || this.caseField.value === '';
|
|
14509
|
-
if (isNull || !Array.isArray(this.caseField.value)) {
|
|
14510
|
-
this.caseField.value = [];
|
|
14511
|
-
}
|
|
14512
|
-
};
|
|
14513
|
-
return WriteDynamicMultiSelectListFieldComponent;
|
|
14514
|
-
}(AbstractFieldWriteComponent));
|
|
14515
|
-
WriteDynamicMultiSelectListFieldComponent.ɵfac = function WriteDynamicMultiSelectListFieldComponent_Factory(t) { return ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory(t || WriteDynamicMultiSelectListFieldComponent); };
|
|
14516
|
-
WriteDynamicMultiSelectListFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WriteDynamicMultiSelectListFieldComponent, selectors: [["ccd-write-dynamic-multi-select-list-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 7, vars: 8, consts: [[1, "form-group", "bottom-30", 3, "ngClass", "id"], ["class", "form-label", 4, "ngIf"], ["class", "form-hint", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], [4, "ngFor", "ngForOf"], [1, "form-label"], [1, "form-hint"], [1, "error-message"], [1, "multiple-choice"], ["type", "checkbox", 1, "form-control", 3, "id", "name", "value", "checked", "change"], [1, "form-label", 3, "for"]], template: function WriteDynamicMultiSelectListFieldComponent_Template(rf, ctx) {
|
|
14517
|
-
if (rf & 1) {
|
|
14518
|
-
i0__namespace.ɵɵelementStart(0, "div", 0);
|
|
14519
|
-
i0__namespace.ɵɵelementStart(1, "fieldset");
|
|
14520
|
-
i0__namespace.ɵɵelementStart(2, "legend");
|
|
14521
|
-
i0__namespace.ɵɵtemplate(3, WriteDynamicMultiSelectListFieldComponent_span_3_Template, 3, 3, "span", 1);
|
|
14522
|
-
i0__namespace.ɵɵtemplate(4, WriteDynamicMultiSelectListFieldComponent_span_4_Template, 2, 1, "span", 2);
|
|
14523
|
-
i0__namespace.ɵɵtemplate(5, WriteDynamicMultiSelectListFieldComponent_span_5_Template, 3, 3, "span", 3);
|
|
14524
|
-
i0__namespace.ɵɵelementEnd();
|
|
14525
|
-
i0__namespace.ɵɵtemplate(6, WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template, 5, 6, "ng-container", 4);
|
|
14526
|
-
i0__namespace.ɵɵelementEnd();
|
|
14527
|
-
i0__namespace.ɵɵelementEnd();
|
|
14528
|
-
}
|
|
14529
|
-
if (rf & 2) {
|
|
14530
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$L, !ctx.checkboxes.valid && ctx.checkboxes.touched))("id", ctx.id());
|
|
14531
|
-
i0__namespace.ɵɵadvance(3);
|
|
14532
|
-
i0__namespace.ɵɵproperty("ngIf", ctx.caseField.label);
|
|
14533
|
-
i0__namespace.ɵɵadvance(1);
|
|
14534
|
-
i0__namespace.ɵɵproperty("ngIf", ctx.caseField.hint_text);
|
|
14535
|
-
i0__namespace.ɵɵadvance(1);
|
|
14536
|
-
i0__namespace.ɵɵproperty("ngIf", ctx.checkboxes.errors && ctx.checkboxes.touched);
|
|
14537
|
-
i0__namespace.ɵɵadvance(1);
|
|
14538
|
-
i0__namespace.ɵɵproperty("ngForOf", ctx.caseField.list_items);
|
|
14539
|
-
}
|
|
14540
|
-
}, directives: [i1__namespace.NgClass, i1__namespace.NgIf, i1__namespace.NgForOf], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
|
|
14541
|
-
var ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(WriteDynamicMultiSelectListFieldComponent);
|
|
14542
|
-
(function () {
|
|
14543
|
-
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(WriteDynamicMultiSelectListFieldComponent, [{
|
|
14544
|
-
type: i0.Component,
|
|
14545
|
-
args: [{
|
|
14546
|
-
selector: 'ccd-write-dynamic-multi-select-list-field',
|
|
14547
|
-
templateUrl: './write-dynamic-multi-select-list-field.html'
|
|
14548
|
-
}]
|
|
14549
|
-
}], null, null);
|
|
14550
|
-
})();
|
|
14551
|
-
|
|
14552
14345
|
var DynamicRadioListPipe = /** @class */ (function () {
|
|
14553
14346
|
function DynamicRadioListPipe() {
|
|
14554
14347
|
}
|
|
@@ -14669,7 +14462,7 @@
|
|
|
14669
14462
|
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r3.dynamicRadioListControl.errors));
|
|
14670
14463
|
}
|
|
14671
14464
|
}
|
|
14672
|
-
var _c0$
|
|
14465
|
+
var _c0$L = function (a0) { return { selected: a0 }; };
|
|
14673
14466
|
function WriteDynamicRadioListFieldComponent_div_9_Template(rf, ctx) {
|
|
14674
14467
|
if (rf & 1) {
|
|
14675
14468
|
i0__namespace.ɵɵelementStart(0, "div", 10);
|
|
@@ -14682,7 +14475,7 @@
|
|
|
14682
14475
|
if (rf & 2) {
|
|
14683
14476
|
var radioButton_r5 = ctx.$implicit;
|
|
14684
14477
|
var ctx_r4 = i0__namespace.ɵɵnextContext();
|
|
14685
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$
|
|
14478
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$L, ctx_r4.dynamicRadioListControl.value === radioButton_r5.code));
|
|
14686
14479
|
i0__namespace.ɵɵadvance(1);
|
|
14687
14480
|
i0__namespace.ɵɵproperty("id", ctx_r4.createElementId(radioButton_r5.code))("name", ctx_r4.createElementId(radioButton_r5.code))("formControl", ctx_r4.dynamicRadioListControl)("value", radioButton_r5.code);
|
|
14688
14481
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -14846,7 +14639,7 @@
|
|
|
14846
14639
|
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.emailControl.errors, ctx_r2.caseField.label));
|
|
14847
14640
|
}
|
|
14848
14641
|
}
|
|
14849
|
-
var _c0$
|
|
14642
|
+
var _c0$K = function (a0) { return { "form-group-error": a0 }; };
|
|
14850
14643
|
var _c1$h = function (a0) { return { "govuk-input--error": a0 }; };
|
|
14851
14644
|
var WriteEmailFieldComponent = /** @class */ (function (_super) {
|
|
14852
14645
|
__extends(WriteEmailFieldComponent, _super);
|
|
@@ -14871,7 +14664,7 @@
|
|
|
14871
14664
|
i0__namespace.ɵɵelementEnd();
|
|
14872
14665
|
}
|
|
14873
14666
|
if (rf & 2) {
|
|
14874
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$
|
|
14667
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$K, !ctx.emailControl.valid && (ctx.emailControl.dirty || ctx.emailControl.touched)));
|
|
14875
14668
|
i0__namespace.ɵɵadvance(1);
|
|
14876
14669
|
i0__namespace.ɵɵproperty("for", ctx.id());
|
|
14877
14670
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -14895,6 +14688,32 @@
|
|
|
14895
14688
|
}], null, null);
|
|
14896
14689
|
})();
|
|
14897
14690
|
|
|
14691
|
+
var FixedListPipe = /** @class */ (function () {
|
|
14692
|
+
function FixedListPipe() {
|
|
14693
|
+
}
|
|
14694
|
+
FixedListPipe.prototype.transform = function (value, items) {
|
|
14695
|
+
if (!!items) {
|
|
14696
|
+
var item = items.find(function (i) { return i.code === value; });
|
|
14697
|
+
return item ? item.label : FixedListPipe.EMPTY;
|
|
14698
|
+
}
|
|
14699
|
+
else {
|
|
14700
|
+
return FixedListPipe.EMPTY;
|
|
14701
|
+
}
|
|
14702
|
+
};
|
|
14703
|
+
return FixedListPipe;
|
|
14704
|
+
}());
|
|
14705
|
+
FixedListPipe.EMPTY = '';
|
|
14706
|
+
FixedListPipe.ɵfac = function FixedListPipe_Factory(t) { return new (t || FixedListPipe)(); };
|
|
14707
|
+
FixedListPipe.ɵpipe = i0__namespace.ɵɵdefinePipe({ name: "ccdFixedList", type: FixedListPipe, pure: true });
|
|
14708
|
+
(function () {
|
|
14709
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(FixedListPipe, [{
|
|
14710
|
+
type: i0.Pipe,
|
|
14711
|
+
args: [{
|
|
14712
|
+
name: 'ccdFixedList'
|
|
14713
|
+
}]
|
|
14714
|
+
}], null, null);
|
|
14715
|
+
})();
|
|
14716
|
+
|
|
14898
14717
|
var ReadFixedListFieldComponent = /** @class */ (function (_super) {
|
|
14899
14718
|
__extends(ReadFixedListFieldComponent, _super);
|
|
14900
14719
|
function ReadFixedListFieldComponent() {
|
|
@@ -14977,7 +14796,7 @@
|
|
|
14977
14796
|
i0__namespace.ɵɵtextInterpolate(type_r4.label);
|
|
14978
14797
|
}
|
|
14979
14798
|
}
|
|
14980
|
-
var _c0$
|
|
14799
|
+
var _c0$J = function (a0) { return { "form-group-error": a0 }; };
|
|
14981
14800
|
var WriteFixedListFieldComponent = /** @class */ (function (_super) {
|
|
14982
14801
|
__extends(WriteFixedListFieldComponent, _super);
|
|
14983
14802
|
function WriteFixedListFieldComponent() {
|
|
@@ -15026,7 +14845,7 @@
|
|
|
15026
14845
|
i0__namespace.ɵɵelementEnd();
|
|
15027
14846
|
}
|
|
15028
14847
|
if (rf & 2) {
|
|
15029
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(9, _c0$
|
|
14848
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(9, _c0$J, !ctx.fixedListFormControl.valid && (ctx.fixedListFormControl.dirty || ctx.fixedListFormControl.touched)));
|
|
15030
14849
|
i0__namespace.ɵɵadvance(1);
|
|
15031
14850
|
i0__namespace.ɵɵproperty("for", ctx.id());
|
|
15032
14851
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -15144,7 +14963,7 @@
|
|
|
15144
14963
|
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.fixedRadioListControl.errors, ctx_r2.caseField.label));
|
|
15145
14964
|
}
|
|
15146
14965
|
}
|
|
15147
|
-
var _c0$
|
|
14966
|
+
var _c0$I = function (a0) { return { selected: a0 }; };
|
|
15148
14967
|
function WriteFixedRadioListFieldComponent_div_8_Template(rf, ctx) {
|
|
15149
14968
|
if (rf & 1) {
|
|
15150
14969
|
i0__namespace.ɵɵelementStart(0, "div", 9);
|
|
@@ -15157,7 +14976,7 @@
|
|
|
15157
14976
|
if (rf & 2) {
|
|
15158
14977
|
var radioButton_r4 = ctx.$implicit;
|
|
15159
14978
|
var ctx_r3 = i0__namespace.ɵɵnextContext();
|
|
15160
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$
|
|
14979
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$I, ctx_r3.fixedRadioListControl.value === radioButton_r4.code));
|
|
15161
14980
|
i0__namespace.ɵɵadvance(1);
|
|
15162
14981
|
i0__namespace.ɵɵproperty("id", ctx_r3.id() + "-" + radioButton_r4.code)("name", ctx_r3.id())("formControl", ctx_r3.fixedRadioListControl)("value", radioButton_r4.code);
|
|
15163
14982
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -15327,7 +15146,7 @@
|
|
|
15327
15146
|
i0__namespace.ɵɵtextInterpolate1(" ", ctx_r1.caseField.hint_text, " ");
|
|
15328
15147
|
}
|
|
15329
15148
|
}
|
|
15330
|
-
var _c0$
|
|
15149
|
+
var _c0$H = function (a0) { return { "hide-autocomplete": a0 }; };
|
|
15331
15150
|
function WriteJudicialUserFieldComponent_mat_option_7_Template(rf, ctx) {
|
|
15332
15151
|
if (rf & 1) {
|
|
15333
15152
|
var _r7_1 = i0__namespace.ɵɵgetCurrentView();
|
|
@@ -15339,7 +15158,7 @@
|
|
|
15339
15158
|
if (rf & 2) {
|
|
15340
15159
|
var judicialUser_r5 = ctx.$implicit;
|
|
15341
15160
|
var ctx_r3 = i0__namespace.ɵɵnextContext();
|
|
15342
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4, _c0$
|
|
15161
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4, _c0$H, !ctx_r3.showAutocomplete))("value", judicialUser_r5.idamId);
|
|
15343
15162
|
i0__namespace.ɵɵadvance(1);
|
|
15344
15163
|
i0__namespace.ɵɵtextInterpolate2(" ", judicialUser_r5.fullName, " (", judicialUser_r5.emailId, ") ");
|
|
15345
15164
|
}
|
|
@@ -15578,7 +15397,7 @@
|
|
|
15578
15397
|
casesResponse.push(_this.mapResponse(result));
|
|
15579
15398
|
});
|
|
15580
15399
|
});
|
|
15581
|
-
|
|
15400
|
+
var caseLinks = casesResponse.map(function (item) {
|
|
15582
15401
|
return {
|
|
15583
15402
|
caseReference: item.caseReference,
|
|
15584
15403
|
caseName: item.caseName,
|
|
@@ -15592,6 +15411,7 @@
|
|
|
15592
15411
|
}),
|
|
15593
15412
|
};
|
|
15594
15413
|
});
|
|
15414
|
+
_this.linkedCases = caseLinks;
|
|
15595
15415
|
_this.serverLinkedApiError = null;
|
|
15596
15416
|
}, function (err) {
|
|
15597
15417
|
_this.serverLinkedApiError = {
|
|
@@ -16128,7 +15948,7 @@
|
|
|
16128
15948
|
i0__namespace.ɵɵtextInterpolate1(" ", ctx_r13.caseReasonCommentsError, " ");
|
|
16129
15949
|
}
|
|
16130
15950
|
}
|
|
16131
|
-
var _c0$
|
|
15951
|
+
var _c0$G = function (a0) { return { "govuk-form-group--error": a0 }; };
|
|
16132
15952
|
function LinkCasesComponent_div_8_div_14_Template(rf, ctx) {
|
|
16133
15953
|
if (rf & 1) {
|
|
16134
15954
|
i0__namespace.ɵɵelementStart(0, "div", 35);
|
|
@@ -16146,7 +15966,7 @@
|
|
|
16146
15966
|
}
|
|
16147
15967
|
if (rf & 2) {
|
|
16148
15968
|
var ctx_r7 = i0__namespace.ɵɵnextContext(2);
|
|
16149
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(2, _c0$
|
|
15969
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(2, _c0$G, !!ctx_r7.caseReasonCommentsError));
|
|
16150
15970
|
i0__namespace.ɵɵadvance(3);
|
|
16151
15971
|
i0__namespace.ɵɵproperty("ngIf", ctx_r7.caseReasonCommentsError);
|
|
16152
15972
|
}
|
|
@@ -16203,11 +16023,11 @@
|
|
|
16203
16023
|
var ctx_r0 = i0__namespace.ɵɵnextContext();
|
|
16204
16024
|
i0__namespace.ɵɵproperty("formGroup", ctx_r0.linkCaseForm);
|
|
16205
16025
|
i0__namespace.ɵɵadvance(1);
|
|
16206
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$
|
|
16026
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$G, !!ctx_r0.caseNumberError));
|
|
16207
16027
|
i0__namespace.ɵɵadvance(3);
|
|
16208
16028
|
i0__namespace.ɵɵproperty("ngIf", ctx_r0.caseNumberError);
|
|
16209
16029
|
i0__namespace.ɵɵadvance(2);
|
|
16210
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c0$
|
|
16030
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c0$G, !!ctx_r0.caseReasonError));
|
|
16211
16031
|
i0__namespace.ɵɵadvance(5);
|
|
16212
16032
|
i0__namespace.ɵɵproperty("ngIf", ctx_r0.caseReasonError);
|
|
16213
16033
|
i0__namespace.ɵɵadvance(2);
|
|
@@ -16641,7 +16461,7 @@
|
|
|
16641
16461
|
i0__namespace.ɵɵadvance(4);
|
|
16642
16462
|
i0__namespace.ɵɵproperty("ngIf", ctx.linkCaseForm);
|
|
16643
16463
|
i0__namespace.ɵɵadvance(4);
|
|
16644
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(9, _c0$
|
|
16464
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(9, _c0$G, !!ctx.noSelectedCaseError));
|
|
16645
16465
|
i0__namespace.ɵɵadvance(1);
|
|
16646
16466
|
i0__namespace.ɵɵproperty("ngIf", ctx.noSelectedCaseError);
|
|
16647
16467
|
i0__namespace.ɵɵadvance(18);
|
|
@@ -17325,7 +17145,7 @@
|
|
|
17325
17145
|
i0__namespace.ɵɵtextInterpolate2(" ", case_r4.caseName, " ", i0__namespace.ɵɵpipeBind1(4, 6, case_r4.caseReference), " ");
|
|
17326
17146
|
}
|
|
17327
17147
|
}
|
|
17328
|
-
var _c0$
|
|
17148
|
+
var _c0$F = function (a0) { return { "govuk-form-group--error": a0 }; };
|
|
17329
17149
|
function UnLinkCasesComponent_div_0_div_4_Template(rf, ctx) {
|
|
17330
17150
|
if (rf & 1) {
|
|
17331
17151
|
i0__namespace.ɵɵelementStart(0, "div", 7);
|
|
@@ -17337,7 +17157,7 @@
|
|
|
17337
17157
|
}
|
|
17338
17158
|
if (rf & 2) {
|
|
17339
17159
|
var ctx_r1 = i0__namespace.ɵɵnextContext(2);
|
|
17340
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4, _c0$
|
|
17160
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4, _c0$F, ctx_r1.unlinkErrorMessage))("formGroup", ctx_r1.unlinkCaseForm);
|
|
17341
17161
|
i0__namespace.ɵɵadvance(1);
|
|
17342
17162
|
i0__namespace.ɵɵproperty("ngIf", ctx_r1.unlinkErrorMessage);
|
|
17343
17163
|
i0__namespace.ɵɵadvance(2);
|
|
@@ -17513,7 +17333,6 @@
|
|
|
17513
17333
|
}] });
|
|
17514
17334
|
})();
|
|
17515
17335
|
|
|
17516
|
-
// tslint:disable:variable-name
|
|
17517
17336
|
var LinkCaseReason = /** @class */ (function () {
|
|
17518
17337
|
function LinkCaseReason() {
|
|
17519
17338
|
}
|
|
@@ -17672,7 +17491,7 @@
|
|
|
17672
17491
|
this.caseField = (_a = tab === null || tab === void 0 ? void 0 : tab.fields) === null || _a === void 0 ? void 0 : _a.find(function (field) { return field.id === 'caseLinks'; });
|
|
17673
17492
|
}
|
|
17674
17493
|
this.isServerJurisdictionError = this.linkedCasesService.serverJurisdictionError || false;
|
|
17675
|
-
var reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() +
|
|
17494
|
+
var reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() + '/lov/categories/CaseLinkingReasonCode';
|
|
17676
17495
|
this.commonDataService.getRefData(reasonCodeAPIurl).subscribe({
|
|
17677
17496
|
next: function (reasons) {
|
|
17678
17497
|
_this.reasonListLoaded = true;
|
|
@@ -17934,7 +17753,7 @@
|
|
|
17934
17753
|
};
|
|
17935
17754
|
WriteLinkedCasesFieldComponent.prototype.getLinkedCaseReasons = function () {
|
|
17936
17755
|
var _this = this;
|
|
17937
|
-
var reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() +
|
|
17756
|
+
var reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() + '/lov/categories/CaseLinkingReasonCode';
|
|
17938
17757
|
this.commonDataService.getRefData(reasonCodeAPIurl).subscribe({
|
|
17939
17758
|
next: function (reasons) {
|
|
17940
17759
|
// Sort in ascending order
|
|
@@ -17993,10 +17812,11 @@
|
|
|
17993
17812
|
var _this = this;
|
|
17994
17813
|
this.casesService.getCaseViewV2(this.linkedCasesService.caseId).subscribe(function (caseView) {
|
|
17995
17814
|
var caseViewFiltered = caseView.tabs.filter(function (tab) {
|
|
17996
|
-
|
|
17815
|
+
var linkField = tab.fields.some(function (_b) {
|
|
17997
17816
|
var field_type = _b.field_type;
|
|
17998
17817
|
return field_type && field_type.collection_field_type && field_type.collection_field_type.id === 'CaseLink';
|
|
17999
17818
|
});
|
|
17819
|
+
return linkField;
|
|
18000
17820
|
});
|
|
18001
17821
|
if (caseViewFiltered) {
|
|
18002
17822
|
var caseLinkFieldValue = caseViewFiltered.map(function (filtered) { var _a; return ((_a = filtered.fields) === null || _a === void 0 ? void 0 : _a.length) > 0 && filtered.fields.filter(function (field) { return field.id === 'caseLinks'; })[0].value; });
|
|
@@ -18279,7 +18099,7 @@
|
|
|
18279
18099
|
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.moneyGbpControl.errors, ctx_r2.caseField.label));
|
|
18280
18100
|
}
|
|
18281
18101
|
}
|
|
18282
|
-
var _c0$
|
|
18102
|
+
var _c0$E = function (a0) { return { "form-group-error": a0 }; };
|
|
18283
18103
|
var WriteMoneyGbpFieldComponent = /** @class */ (function (_super) {
|
|
18284
18104
|
__extends(WriteMoneyGbpFieldComponent, _super);
|
|
18285
18105
|
function WriteMoneyGbpFieldComponent() {
|
|
@@ -18309,7 +18129,7 @@
|
|
|
18309
18129
|
i0__namespace.ɵɵelementEnd();
|
|
18310
18130
|
}
|
|
18311
18131
|
if (rf & 2) {
|
|
18312
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(11, _c0$
|
|
18132
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(11, _c0$E, !ctx.moneyGbpControl.valid && (ctx.moneyGbpControl.dirty || ctx.moneyGbpControl.touched)));
|
|
18313
18133
|
i0__namespace.ɵɵadvance(1);
|
|
18314
18134
|
i0__namespace.ɵɵproperty("for", ctx.id());
|
|
18315
18135
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -18457,7 +18277,7 @@
|
|
|
18457
18277
|
i0__namespace.ɵɵtextInterpolate(checkbox_r4.label);
|
|
18458
18278
|
}
|
|
18459
18279
|
}
|
|
18460
|
-
var _c0$
|
|
18280
|
+
var _c0$D = function (a0) { return { "error": a0 }; };
|
|
18461
18281
|
var WriteMultiSelectListFieldComponent = /** @class */ (function (_super) {
|
|
18462
18282
|
__extends(WriteMultiSelectListFieldComponent, _super);
|
|
18463
18283
|
function WriteMultiSelectListFieldComponent() {
|
|
@@ -18521,7 +18341,7 @@
|
|
|
18521
18341
|
i0__namespace.ɵɵelementEnd();
|
|
18522
18342
|
}
|
|
18523
18343
|
if (rf & 2) {
|
|
18524
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$
|
|
18344
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$D, !ctx.checkboxes.valid && (ctx.checkboxes.dirty || ctx.checkboxes.touched)))("id", ctx.id());
|
|
18525
18345
|
i0__namespace.ɵɵadvance(3);
|
|
18526
18346
|
i0__namespace.ɵɵproperty("ngIf", ctx.caseField.label);
|
|
18527
18347
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -18612,7 +18432,7 @@
|
|
|
18612
18432
|
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.numberControl.errors, ctx_r2.caseField.label));
|
|
18613
18433
|
}
|
|
18614
18434
|
}
|
|
18615
|
-
var _c0$
|
|
18435
|
+
var _c0$C = function (a0) { return { "form-group-error": a0 }; };
|
|
18616
18436
|
var _c1$e = function (a0) { return { "govuk-input--error": a0 }; };
|
|
18617
18437
|
var WriteNumberFieldComponent = /** @class */ (function (_super) {
|
|
18618
18438
|
__extends(WriteNumberFieldComponent, _super);
|
|
@@ -18637,7 +18457,7 @@
|
|
|
18637
18457
|
i0__namespace.ɵɵelementEnd();
|
|
18638
18458
|
}
|
|
18639
18459
|
if (rf & 2) {
|
|
18640
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$
|
|
18460
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$C, !ctx.numberControl.valid && ctx.numberControl.dirty));
|
|
18641
18461
|
i0__namespace.ɵɵadvance(1);
|
|
18642
18462
|
i0__namespace.ɵɵproperty("for", ctx.id());
|
|
18643
18463
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -18938,7 +18758,7 @@
|
|
|
18938
18758
|
i0__namespace.ɵɵelementEnd();
|
|
18939
18759
|
}
|
|
18940
18760
|
}
|
|
18941
|
-
var _c0$
|
|
18761
|
+
var _c0$B = function (a0) { return { "scroll-container ": a0 }; };
|
|
18942
18762
|
function WriteOrganisationFieldComponent_fieldset_3_div_14_Template(rf, ctx) {
|
|
18943
18763
|
if (rf & 1) {
|
|
18944
18764
|
i0__namespace.ɵɵelementStart(0, "div", 26);
|
|
@@ -18954,7 +18774,7 @@
|
|
|
18954
18774
|
var ctx_r2 = i0__namespace.ɵɵnextContext(2);
|
|
18955
18775
|
var tmp_0_0 = null;
|
|
18956
18776
|
var tmp_2_0 = null;
|
|
18957
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(11, _c0$
|
|
18777
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(11, _c0$B, ((tmp_0_0 = i0__namespace.ɵɵpipeBind1(1, 3, ctx_r2.simpleOrganisations$)) == null ? null : tmp_0_0.length) > 10));
|
|
18958
18778
|
i0__namespace.ɵɵadvance(2);
|
|
18959
18779
|
i0__namespace.ɵɵproperty("ngForOf", i0__namespace.ɵɵpipeBind1(3, 5, ctx_r2.simpleOrganisations$));
|
|
18960
18780
|
i0__namespace.ɵɵadvance(2);
|
|
@@ -19361,6 +19181,276 @@
|
|
|
19361
19181
|
}], function () { return [{ type: AbstractAppConfig }, { type: SessionStorageService }]; }, null);
|
|
19362
19182
|
})();
|
|
19363
19183
|
|
|
19184
|
+
var MarkdownComponent = /** @class */ (function () {
|
|
19185
|
+
function MarkdownComponent() {
|
|
19186
|
+
}
|
|
19187
|
+
MarkdownComponent.prototype.ngOnInit = function () {
|
|
19188
|
+
this.content = this.content.replace(/ \n/g, '<br>');
|
|
19189
|
+
};
|
|
19190
|
+
MarkdownComponent.prototype.onMarkdownClick = function (event) {
|
|
19191
|
+
// If we don't have an anchor tag, we don't need to do anything.
|
|
19192
|
+
if (event.target instanceof HTMLAnchorElement === false) {
|
|
19193
|
+
return;
|
|
19194
|
+
}
|
|
19195
|
+
return true;
|
|
19196
|
+
};
|
|
19197
|
+
return MarkdownComponent;
|
|
19198
|
+
}());
|
|
19199
|
+
MarkdownComponent.ɵfac = function MarkdownComponent_Factory(t) { return new (t || MarkdownComponent)(); };
|
|
19200
|
+
MarkdownComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: MarkdownComponent, selectors: [["ccd-markdown"]], hostBindings: function MarkdownComponent_HostBindings(rf, ctx) {
|
|
19201
|
+
if (rf & 1) {
|
|
19202
|
+
i0__namespace.ɵɵlistener("click", function MarkdownComponent_click_HostBindingHandler($event) { return ctx.onMarkdownClick($event); });
|
|
19203
|
+
}
|
|
19204
|
+
}, inputs: { content: "content", markdownUseHrefAsRouterLink: "markdownUseHrefAsRouterLink" }, decls: 3, vars: 3, consts: [[1, "markdown", 3, "innerHTML"]], template: function MarkdownComponent_Template(rf, ctx) {
|
|
19205
|
+
if (rf & 1) {
|
|
19206
|
+
i0__namespace.ɵɵelementStart(0, "div");
|
|
19207
|
+
i0__namespace.ɵɵelement(1, "markdown", 0);
|
|
19208
|
+
i0__namespace.ɵɵpipe(2, "ccdCaseReference");
|
|
19209
|
+
i0__namespace.ɵɵelementEnd();
|
|
19210
|
+
}
|
|
19211
|
+
if (rf & 2) {
|
|
19212
|
+
i0__namespace.ɵɵadvance(1);
|
|
19213
|
+
i0__namespace.ɵɵproperty("innerHTML", i0__namespace.ɵɵpipeBind1(2, 1, ctx.content), i0__namespace.ɵɵsanitizeHtml);
|
|
19214
|
+
}
|
|
19215
|
+
}, directives: [i1__namespace$4.NgxMdComponent], pipes: [CaseReferencePipe], encapsulation: 2 });
|
|
19216
|
+
(function () {
|
|
19217
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(MarkdownComponent, [{
|
|
19218
|
+
type: i0.Component,
|
|
19219
|
+
args: [{
|
|
19220
|
+
selector: 'ccd-markdown',
|
|
19221
|
+
templateUrl: './markdown.html'
|
|
19222
|
+
}]
|
|
19223
|
+
}], function () { return []; }, { content: [{
|
|
19224
|
+
type: i0.Input
|
|
19225
|
+
}], markdownUseHrefAsRouterLink: [{
|
|
19226
|
+
type: i0.Input
|
|
19227
|
+
}], onMarkdownClick: [{
|
|
19228
|
+
type: i0.HostListener,
|
|
19229
|
+
args: ['click', ['$event']]
|
|
19230
|
+
}] });
|
|
19231
|
+
})();
|
|
19232
|
+
|
|
19233
|
+
function ReadDynamicMultiSelectListFieldComponent_div_0_Template(rf, ctx) {
|
|
19234
|
+
if (rf & 1) {
|
|
19235
|
+
i0__namespace.ɵɵelementStart(0, "div");
|
|
19236
|
+
i0__namespace.ɵɵelementStart(1, "ccd-markdown");
|
|
19237
|
+
i0__namespace.ɵɵtext(2, "[content]=\"value.code | ccdFixedList:caseField.list_items\"");
|
|
19238
|
+
i0__namespace.ɵɵelementEnd();
|
|
19239
|
+
i0__namespace.ɵɵelementEnd();
|
|
19240
|
+
}
|
|
19241
|
+
}
|
|
19242
|
+
var ReadDynamicMultiSelectListFieldComponent = /** @class */ (function (_super) {
|
|
19243
|
+
__extends(ReadDynamicMultiSelectListFieldComponent, _super);
|
|
19244
|
+
function ReadDynamicMultiSelectListFieldComponent() {
|
|
19245
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
19246
|
+
}
|
|
19247
|
+
ReadDynamicMultiSelectListFieldComponent.prototype.ngOnInit = function () {
|
|
19248
|
+
/**
|
|
19249
|
+
*
|
|
19250
|
+
* Reassigning list_items from formatted_list when list_items is empty
|
|
19251
|
+
*/
|
|
19252
|
+
if (!this.caseField.list_items && this.caseField.formatted_value && this.caseField.formatted_value.list_items) {
|
|
19253
|
+
this.caseField.list_items = this.caseField.formatted_value.list_items;
|
|
19254
|
+
}
|
|
19255
|
+
if (!this.caseField.value && this.caseField.formatted_value && this.caseField.formatted_value.value) {
|
|
19256
|
+
this.caseField.value = this.caseField.formatted_value.value;
|
|
19257
|
+
}
|
|
19258
|
+
_super.prototype.ngOnInit.call(this);
|
|
19259
|
+
};
|
|
19260
|
+
return ReadDynamicMultiSelectListFieldComponent;
|
|
19261
|
+
}(AbstractFieldReadComponent));
|
|
19262
|
+
ReadDynamicMultiSelectListFieldComponent.ɵfac = function ReadDynamicMultiSelectListFieldComponent_Factory(t) { return ɵReadDynamicMultiSelectListFieldComponent_BaseFactory(t || ReadDynamicMultiSelectListFieldComponent); };
|
|
19263
|
+
ReadDynamicMultiSelectListFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: ReadDynamicMultiSelectListFieldComponent, selectors: [["ccd-read-dynamic-multi-select-list-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [[4, "ngFor", "ngForOf"]], template: function ReadDynamicMultiSelectListFieldComponent_Template(rf, ctx) {
|
|
19264
|
+
if (rf & 1) {
|
|
19265
|
+
i0__namespace.ɵɵtemplate(0, ReadDynamicMultiSelectListFieldComponent_div_0_Template, 3, 0, "div", 0);
|
|
19266
|
+
}
|
|
19267
|
+
if (rf & 2) {
|
|
19268
|
+
i0__namespace.ɵɵproperty("ngForOf", ctx.caseField.value);
|
|
19269
|
+
}
|
|
19270
|
+
}, directives: [i1__namespace.NgForOf, MarkdownComponent], styles: [".multi-select-list-field-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{padding:5px 0}.multi-select-list-field-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:last-child > td[_ngcontent-%COMP%]{border-bottom:none}.multi-select-list-field-table[_ngcontent-%COMP%] td.collection-actions[_ngcontent-%COMP%]{width:1px;white-space:nowrap}"] });
|
|
19271
|
+
var ɵReadDynamicMultiSelectListFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(ReadDynamicMultiSelectListFieldComponent);
|
|
19272
|
+
(function () {
|
|
19273
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ReadDynamicMultiSelectListFieldComponent, [{
|
|
19274
|
+
type: i0.Component,
|
|
19275
|
+
args: [{
|
|
19276
|
+
selector: 'ccd-read-dynamic-multi-select-list-field',
|
|
19277
|
+
templateUrl: './read-dynamic-multi-select-list-field.html',
|
|
19278
|
+
styleUrls: ['./read-dynamic-multi-select-list-field.component.scss']
|
|
19279
|
+
}]
|
|
19280
|
+
}], null, null);
|
|
19281
|
+
})();
|
|
19282
|
+
|
|
19283
|
+
function WriteDynamicMultiSelectListFieldComponent_span_3_Template(rf, ctx) {
|
|
19284
|
+
if (rf & 1) {
|
|
19285
|
+
i0__namespace.ɵɵelementStart(0, "span", 5);
|
|
19286
|
+
i0__namespace.ɵɵtext(1);
|
|
19287
|
+
i0__namespace.ɵɵpipe(2, "ccdFieldLabel");
|
|
19288
|
+
i0__namespace.ɵɵelementEnd();
|
|
19289
|
+
}
|
|
19290
|
+
if (rf & 2) {
|
|
19291
|
+
var ctx_r0 = i0__namespace.ɵɵnextContext();
|
|
19292
|
+
i0__namespace.ɵɵadvance(1);
|
|
19293
|
+
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r0.caseField));
|
|
19294
|
+
}
|
|
19295
|
+
}
|
|
19296
|
+
function WriteDynamicMultiSelectListFieldComponent_span_4_Template(rf, ctx) {
|
|
19297
|
+
if (rf & 1) {
|
|
19298
|
+
i0__namespace.ɵɵelementStart(0, "span", 6);
|
|
19299
|
+
i0__namespace.ɵɵtext(1);
|
|
19300
|
+
i0__namespace.ɵɵelementEnd();
|
|
19301
|
+
}
|
|
19302
|
+
if (rf & 2) {
|
|
19303
|
+
var ctx_r1 = i0__namespace.ɵɵnextContext();
|
|
19304
|
+
i0__namespace.ɵɵadvance(1);
|
|
19305
|
+
i0__namespace.ɵɵtextInterpolate(ctx_r1.caseField.hint_text);
|
|
19306
|
+
}
|
|
19307
|
+
}
|
|
19308
|
+
function WriteDynamicMultiSelectListFieldComponent_span_5_Template(rf, ctx) {
|
|
19309
|
+
if (rf & 1) {
|
|
19310
|
+
i0__namespace.ɵɵelementStart(0, "span", 7);
|
|
19311
|
+
i0__namespace.ɵɵtext(1);
|
|
19312
|
+
i0__namespace.ɵɵpipe(2, "ccdFirstError");
|
|
19313
|
+
i0__namespace.ɵɵelementEnd();
|
|
19314
|
+
}
|
|
19315
|
+
if (rf & 2) {
|
|
19316
|
+
var ctx_r2 = i0__namespace.ɵɵnextContext();
|
|
19317
|
+
i0__namespace.ɵɵadvance(1);
|
|
19318
|
+
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r2.checkboxes.errors));
|
|
19319
|
+
}
|
|
19320
|
+
}
|
|
19321
|
+
function WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template(rf, ctx) {
|
|
19322
|
+
if (rf & 1) {
|
|
19323
|
+
var _r6_1 = i0__namespace.ɵɵgetCurrentView();
|
|
19324
|
+
i0__namespace.ɵɵelementContainerStart(0);
|
|
19325
|
+
i0__namespace.ɵɵelementStart(1, "div", 8);
|
|
19326
|
+
i0__namespace.ɵɵelementStart(2, "input", 9);
|
|
19327
|
+
i0__namespace.ɵɵlistener("change", function WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template_input_change_2_listener($event) { i0__namespace.ɵɵrestoreView(_r6_1); var ctx_r5 = i0__namespace.ɵɵnextContext(); return ctx_r5.onCheckChange($event); });
|
|
19328
|
+
i0__namespace.ɵɵelementEnd();
|
|
19329
|
+
i0__namespace.ɵɵelementStart(3, "label", 10);
|
|
19330
|
+
i0__namespace.ɵɵelement(4, "ccd-markdown", 11);
|
|
19331
|
+
i0__namespace.ɵɵelementEnd();
|
|
19332
|
+
i0__namespace.ɵɵelementEnd();
|
|
19333
|
+
i0__namespace.ɵɵelementContainerEnd();
|
|
19334
|
+
}
|
|
19335
|
+
if (rf & 2) {
|
|
19336
|
+
var checkbox_r4 = ctx.$implicit;
|
|
19337
|
+
var ctx_r3 = i0__namespace.ɵɵnextContext();
|
|
19338
|
+
i0__namespace.ɵɵadvance(2);
|
|
19339
|
+
i0__namespace.ɵɵpropertyInterpolate("id", ctx_r3.createElementId(checkbox_r4.code));
|
|
19340
|
+
i0__namespace.ɵɵpropertyInterpolate("name", ctx_r3.id());
|
|
19341
|
+
i0__namespace.ɵɵproperty("value", checkbox_r4.code)("checked", ctx_r3.isSelected(checkbox_r4.code));
|
|
19342
|
+
i0__namespace.ɵɵadvance(1);
|
|
19343
|
+
i0__namespace.ɵɵpropertyInterpolate("for", ctx_r3.createElementId(checkbox_r4.code));
|
|
19344
|
+
i0__namespace.ɵɵadvance(1);
|
|
19345
|
+
i0__namespace.ɵɵproperty("content", checkbox_r4.label);
|
|
19346
|
+
}
|
|
19347
|
+
}
|
|
19348
|
+
var _c0$A = function (a0) { return { "error": a0 }; };
|
|
19349
|
+
var WriteDynamicMultiSelectListFieldComponent = /** @class */ (function (_super) {
|
|
19350
|
+
__extends(WriteDynamicMultiSelectListFieldComponent, _super);
|
|
19351
|
+
function WriteDynamicMultiSelectListFieldComponent() {
|
|
19352
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
19353
|
+
}
|
|
19354
|
+
WriteDynamicMultiSelectListFieldComponent.prototype.ngOnInit = function () {
|
|
19355
|
+
var _this = this;
|
|
19356
|
+
this.checkboxes = new i2.FormArray([]);
|
|
19357
|
+
this.setInitialCaseList();
|
|
19358
|
+
this.setInitialCaseFieldValue();
|
|
19359
|
+
// Initialise array with existing values
|
|
19360
|
+
if (this.caseField.value && Array.isArray(this.caseField.value)) {
|
|
19361
|
+
var values = this.caseField.value;
|
|
19362
|
+
values.forEach(function (value) {
|
|
19363
|
+
_this.checkboxes.push(new i2.FormControl(value));
|
|
19364
|
+
});
|
|
19365
|
+
}
|
|
19366
|
+
this.dynamicListFormControl = this.registerControl(new i2.FormControl(this.checkboxes.value));
|
|
19367
|
+
this.dynamicListFormControl.setValue(this.checkboxes.value);
|
|
19368
|
+
};
|
|
19369
|
+
WriteDynamicMultiSelectListFieldComponent.prototype.onCheckChange = function (event) {
|
|
19370
|
+
var _this = this;
|
|
19371
|
+
var target = event.target;
|
|
19372
|
+
if (!target || !target.value) {
|
|
19373
|
+
return;
|
|
19374
|
+
}
|
|
19375
|
+
var selectedListItem = this.getValueListItem(target.value);
|
|
19376
|
+
if (!this.isSelected(target.value)) {
|
|
19377
|
+
// Add a new control in the FormArray
|
|
19378
|
+
this.checkboxes.push(new i2.FormControl(selectedListItem));
|
|
19379
|
+
}
|
|
19380
|
+
else {
|
|
19381
|
+
// Remove the control from the FormArray
|
|
19382
|
+
this.checkboxes.controls.forEach(function (ctrl, i) {
|
|
19383
|
+
if (ctrl.value.code === target.value) {
|
|
19384
|
+
_this.checkboxes.removeAt(i);
|
|
19385
|
+
}
|
|
19386
|
+
});
|
|
19387
|
+
}
|
|
19388
|
+
this.dynamicListFormControl.setValue(this.checkboxes.value);
|
|
19389
|
+
};
|
|
19390
|
+
WriteDynamicMultiSelectListFieldComponent.prototype.isSelected = function (code) {
|
|
19391
|
+
if (this.checkboxes && this.checkboxes.controls) {
|
|
19392
|
+
return this.checkboxes.controls.find(function (control) { return control.value.code === code; });
|
|
19393
|
+
}
|
|
19394
|
+
};
|
|
19395
|
+
WriteDynamicMultiSelectListFieldComponent.prototype.getValueListItem = function (value) {
|
|
19396
|
+
return this.caseField.list_items.find(function (i) { return i.code === value; });
|
|
19397
|
+
};
|
|
19398
|
+
WriteDynamicMultiSelectListFieldComponent.prototype.setInitialCaseList = function () {
|
|
19399
|
+
var hasListItems = this.caseField.list_items && this.caseField.list_items.length > 0;
|
|
19400
|
+
var hasFormattedListItems = this.caseField.formatted_value && this.caseField.formatted_value.list_items.length > 0;
|
|
19401
|
+
if (!hasListItems && hasFormattedListItems) {
|
|
19402
|
+
this.caseField.list_items = this.caseField.formatted_value.list_items;
|
|
19403
|
+
}
|
|
19404
|
+
};
|
|
19405
|
+
WriteDynamicMultiSelectListFieldComponent.prototype.setInitialCaseFieldValue = function () {
|
|
19406
|
+
if (!this.caseField.value && this.caseField.formatted_value && this.caseField.formatted_value.value) {
|
|
19407
|
+
this.caseField.value = this.caseField.formatted_value.value;
|
|
19408
|
+
}
|
|
19409
|
+
var isNull = this.caseField.value === undefined || this.caseField.value === '';
|
|
19410
|
+
if (isNull || !Array.isArray(this.caseField.value)) {
|
|
19411
|
+
this.caseField.value = [];
|
|
19412
|
+
}
|
|
19413
|
+
};
|
|
19414
|
+
return WriteDynamicMultiSelectListFieldComponent;
|
|
19415
|
+
}(AbstractFieldWriteComponent));
|
|
19416
|
+
WriteDynamicMultiSelectListFieldComponent.ɵfac = function WriteDynamicMultiSelectListFieldComponent_Factory(t) { return ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory(t || WriteDynamicMultiSelectListFieldComponent); };
|
|
19417
|
+
WriteDynamicMultiSelectListFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WriteDynamicMultiSelectListFieldComponent, selectors: [["ccd-write-dynamic-multi-select-list-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 7, vars: 8, consts: [[1, "form-group", "bottom-30", 3, "ngClass", "id"], ["class", "form-label", 4, "ngIf"], ["class", "form-hint", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], [4, "ngFor", "ngForOf"], [1, "form-label"], [1, "form-hint"], [1, "error-message"], [1, "multiple-choice"], ["type", "checkbox", 1, "form-control", 3, "id", "name", "value", "checked", "change"], [1, "form-label", 3, "for"], [3, "content"]], template: function WriteDynamicMultiSelectListFieldComponent_Template(rf, ctx) {
|
|
19418
|
+
if (rf & 1) {
|
|
19419
|
+
i0__namespace.ɵɵelementStart(0, "div", 0);
|
|
19420
|
+
i0__namespace.ɵɵelementStart(1, "fieldset");
|
|
19421
|
+
i0__namespace.ɵɵelementStart(2, "legend");
|
|
19422
|
+
i0__namespace.ɵɵtemplate(3, WriteDynamicMultiSelectListFieldComponent_span_3_Template, 3, 3, "span", 1);
|
|
19423
|
+
i0__namespace.ɵɵtemplate(4, WriteDynamicMultiSelectListFieldComponent_span_4_Template, 2, 1, "span", 2);
|
|
19424
|
+
i0__namespace.ɵɵtemplate(5, WriteDynamicMultiSelectListFieldComponent_span_5_Template, 3, 3, "span", 3);
|
|
19425
|
+
i0__namespace.ɵɵelementEnd();
|
|
19426
|
+
i0__namespace.ɵɵtemplate(6, WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template, 5, 6, "ng-container", 4);
|
|
19427
|
+
i0__namespace.ɵɵelementEnd();
|
|
19428
|
+
i0__namespace.ɵɵelementEnd();
|
|
19429
|
+
}
|
|
19430
|
+
if (rf & 2) {
|
|
19431
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$A, !ctx.checkboxes.valid && ctx.checkboxes.touched))("id", ctx.id());
|
|
19432
|
+
i0__namespace.ɵɵadvance(3);
|
|
19433
|
+
i0__namespace.ɵɵproperty("ngIf", ctx.caseField.label);
|
|
19434
|
+
i0__namespace.ɵɵadvance(1);
|
|
19435
|
+
i0__namespace.ɵɵproperty("ngIf", ctx.caseField.hint_text);
|
|
19436
|
+
i0__namespace.ɵɵadvance(1);
|
|
19437
|
+
i0__namespace.ɵɵproperty("ngIf", ctx.checkboxes.errors && ctx.checkboxes.touched);
|
|
19438
|
+
i0__namespace.ɵɵadvance(1);
|
|
19439
|
+
i0__namespace.ɵɵproperty("ngForOf", ctx.caseField.list_items);
|
|
19440
|
+
}
|
|
19441
|
+
}, directives: [i1__namespace.NgClass, i1__namespace.NgIf, i1__namespace.NgForOf, MarkdownComponent], pipes: [FieldLabelPipe, FirstErrorPipe], styles: ["ccd-markdown[_ngcontent-%COMP%]{display:inline-block}"] });
|
|
19442
|
+
var ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(WriteDynamicMultiSelectListFieldComponent);
|
|
19443
|
+
(function () {
|
|
19444
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(WriteDynamicMultiSelectListFieldComponent, [{
|
|
19445
|
+
type: i0.Component,
|
|
19446
|
+
args: [{
|
|
19447
|
+
selector: 'ccd-write-dynamic-multi-select-list-field',
|
|
19448
|
+
templateUrl: './write-dynamic-multi-select-list-field.html',
|
|
19449
|
+
styleUrls: ['./write-dynamic-multi-select-list-field.component.scss']
|
|
19450
|
+
}]
|
|
19451
|
+
}], null, null);
|
|
19452
|
+
})();
|
|
19453
|
+
|
|
19364
19454
|
var ReadPhoneUKFieldComponent = /** @class */ (function (_super) {
|
|
19365
19455
|
__extends(ReadPhoneUKFieldComponent, _super);
|
|
19366
19456
|
function ReadPhoneUKFieldComponent() {
|
|
@@ -19561,7 +19651,7 @@
|
|
|
19561
19651
|
WriteTextAreaFieldComponent.prototype.autoGrow = function (event) {
|
|
19562
19652
|
if (this.browserService.isIEOrEdge()) {
|
|
19563
19653
|
event.target.style.height = 'auto';
|
|
19564
|
-
event.target.style.height = event.target.scrollHeight +
|
|
19654
|
+
event.target.style.height = event.target.scrollHeight + 'px';
|
|
19565
19655
|
event.target.scrollTop = event.target.scrollHeight;
|
|
19566
19656
|
}
|
|
19567
19657
|
};
|
|
@@ -19801,7 +19891,6 @@
|
|
|
19801
19891
|
return YesNoService.EMPTY;
|
|
19802
19892
|
};
|
|
19803
19893
|
YesNoService.prototype.isYes = function (value) {
|
|
19804
|
-
// tslint:disable-next-line:switch-default
|
|
19805
19894
|
switch (typeof (value)) {
|
|
19806
19895
|
case 'boolean':
|
|
19807
19896
|
return value;
|
|
@@ -19811,7 +19900,6 @@
|
|
|
19811
19900
|
return false;
|
|
19812
19901
|
};
|
|
19813
19902
|
YesNoService.prototype.isNo = function (value) {
|
|
19814
|
-
// tslint:disable-next-line:switch-default
|
|
19815
19903
|
switch (typeof (value)) {
|
|
19816
19904
|
case 'boolean':
|
|
19817
19905
|
return !value;
|
|
@@ -20249,7 +20337,7 @@
|
|
|
20249
20337
|
i0__namespace.ɵɵclassProp("grey-bar", ctx.canHaveGreyBar && !ctx.caseField.hiddenCannotChange);
|
|
20250
20338
|
i0__namespace.ɵɵproperty("hidden", ctx.caseField.hidden);
|
|
20251
20339
|
}
|
|
20252
|
-
}, styles: [".form [_nghost-%COMP%] .grey-bar
|
|
20340
|
+
}, styles: [".form [_nghost-%COMP%] .grey-bar>*>.form-group, .form [_nghost-%COMP%] .grey-bar>*>dl.case-field{margin-left:15px;padding-left:15px}.form [_nghost-%COMP%] .grey-bar>*>.form-group:not(.form-group-error), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field:not(.form-group-error){border-left:5px solid #b1b4b6}.form [_nghost-%COMP%] .grey-bar>*>.form-group input:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>.form-group select:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>.form-group textarea:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field input:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field select:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field textarea:not(.inline-block){display:block}"] });
|
|
20253
20341
|
(function () {
|
|
20254
20342
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(FieldWriteComponent, [{
|
|
20255
20343
|
type: i0.Component,
|
|
@@ -20349,7 +20437,7 @@
|
|
|
20349
20437
|
i0__namespace.ɵɵadvance(1);
|
|
20350
20438
|
i0__namespace.ɵɵproperty("ngIf", ctx.withLabel && !ctx.isLabel() && (!ctx.isComplex() || ctx.isCaseLink()))("ngIfElse", _r1);
|
|
20351
20439
|
}
|
|
20352
|
-
}, directives: [i1__namespace.NgIf, i1__namespace.NgTemplateOutlet], styles: [".case-field[_ngcontent-%COMP%]:after{content:\"\";display:block;clear:both}.case-field[_ngcontent-%COMP%]{box-sizing:border-box;margin-bottom:15px}@media (min-width:641px){.case-field[_ngcontent-%COMP%]{margin-bottom:30px}}.case-field[_ngcontent-%COMP%] .case-field__label[_ngcontent-%COMP%]{display:block;color:#0b0c0c;padding-bottom:2px;font-family:nta,Arial,sans-serif;font-weight:700;text-transform:none;font-size:16px;line-height:1.25}@media (min-width:641px){.case-field[_ngcontent-%COMP%] .case-field__label[_ngcontent-%COMP%]{font-size:19px;line-height:1.3157894737}}.case-field[_ngcontent-%COMP%] .case-field__value[_ngcontent-%COMP%]{font-family:nta,Arial,sans-serif;font-weight:400;text-transform:none;font-size:16px;line-height:1.25}@media (min-width:641px){.case-field[_ngcontent-%COMP%] .case-field__value[_ngcontent-%COMP%]{font-size:19px;line-height:1.3157894737}}.form [_nghost-%COMP%] .grey-bar
|
|
20440
|
+
}, directives: [i1__namespace.NgIf, i1__namespace.NgTemplateOutlet], styles: [".case-field[_ngcontent-%COMP%]:after{content:\"\";display:block;clear:both}.case-field[_ngcontent-%COMP%]{box-sizing:border-box;margin-bottom:15px}@media (min-width:641px){.case-field[_ngcontent-%COMP%]{margin-bottom:30px}}.case-field[_ngcontent-%COMP%] .case-field__label[_ngcontent-%COMP%]{display:block;color:#0b0c0c;padding-bottom:2px;font-family:nta,Arial,sans-serif;font-weight:700;text-transform:none;font-size:16px;line-height:1.25}@media (min-width:641px){.case-field[_ngcontent-%COMP%] .case-field__label[_ngcontent-%COMP%]{font-size:19px;line-height:1.3157894737}}.case-field[_ngcontent-%COMP%] .case-field__value[_ngcontent-%COMP%]{font-family:nta,Arial,sans-serif;font-weight:400;text-transform:none;font-size:16px;line-height:1.25}@media (min-width:641px){.case-field[_ngcontent-%COMP%] .case-field__value[_ngcontent-%COMP%]{font-size:19px;line-height:1.3157894737}}.form [_nghost-%COMP%] .grey-bar>*>.form-group, .form [_nghost-%COMP%] .grey-bar>*>dl.case-field{margin-left:15px;padding-left:15px}.form [_nghost-%COMP%] .grey-bar>*>.form-group:not(.form-group-error), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field:not(.form-group-error){border-left:5px solid #b1b4b6}.form [_nghost-%COMP%] .grey-bar>*>.form-group input:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>.form-group select:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>.form-group textarea:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field input:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field select:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field textarea:not(.inline-block){display:block}"] });
|
|
20353
20441
|
var ɵFieldReadLabelComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(FieldReadLabelComponent);
|
|
20354
20442
|
(function () {
|
|
20355
20443
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(FieldReadLabelComponent, [{
|
|
@@ -20548,7 +20636,7 @@
|
|
|
20548
20636
|
i0__namespace.ɵɵadvance(2);
|
|
20549
20637
|
i0__namespace.ɵɵproperty("ngForOf", ctx.currentCategories);
|
|
20550
20638
|
}
|
|
20551
|
-
}, directives: [i1__namespace.NgForOf, i1__namespace.NgTemplateOutlet], styles: [":host{position:relative;display:block}.folders{margin-bottom:20px}.folder{display:none;border-top:1px solid #ccc;margin:0 0 -1px}.folder
|
|
20639
|
+
}, directives: [i1__namespace.NgForOf, i1__namespace.NgTemplateOutlet], styles: [":host{position:relative;display:block}.folders{margin-bottom:20px}.folder{display:none;border-top:1px solid #ccc;margin:0 0 -1px}.folder:last-child{border-bottom:1px solid #ccc}.folders>.folder,input:checked~.folder{display:block}.iconImg{position:relative;display:inline-block;height:28px}.folder>.folder{margin-left:20px}.folder label:before{top:3px}.folder label:after{top:13px}p{font-weight:700}button{margin-right:20px}.close{float:right;width:30px;height:30px;background:url(/assets/img/x.PNG) no-repeat 50%}.cancel,.close{cursor:pointer}.cdk-overlay-pane{overflow:auto}.cdk-overlay-pane::-webkit-scrollbar{width:7px}.cdk-overlay-pane::-webkit-scrollbar-thumb{border:4px solid transparent;background-clip:padding-box;border-radius:9999px;background-color:#aaa}.cdk-overlay-pane::-webkit-scrollbar-button{display:none}.cdk-overlay-pane::-webkit-scrollbar-track-piece{background:#eee}.cdk-overlay-pane::-webkit-scrollbar-thumb{background:#ccc}"], encapsulation: 2 });
|
|
20552
20640
|
(function () {
|
|
20553
20641
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(CaseFileViewFolderSelectorComponent, [{
|
|
20554
20642
|
type: i0.Component,
|
|
@@ -20660,7 +20748,7 @@
|
|
|
20660
20748
|
i0__namespace.ɵɵadvance(4);
|
|
20661
20749
|
i0__namespace.ɵɵproperty("cdkConnectedOverlayOrigin", _r0)("cdkConnectedOverlayOpen", ctx.isOpen)("cdkConnectedOverlayHasBackdrop", true)("cdkConnectedOverlayBackdropClass", "cdk-overlay-transparent-backdrop");
|
|
20662
20750
|
}
|
|
20663
|
-
}, directives: [i1__namespace$
|
|
20751
|
+
}, directives: [i1__namespace$5.CdkOverlayOrigin, i1__namespace$5.CdkConnectedOverlay, i1__namespace.NgIf, i1__namespace.NgForOf], styles: [".overlay-toggle[_ngcontent-%COMP%]{display:block;background:none;border:0;padding:0 6px;margin-right:-6px;cursor:pointer}.overlay-menu[_ngcontent-%COMP%]{background-color:#fafafa;border:1px solid grey;margin-top:8px;font-size:1rem}.overlay-menu__item[_ngcontent-%COMP%], .overlay-menu__title[_ngcontent-%COMP%]{padding:10px;border-bottom:1px solid grey}.overlay-menu__item[_ngcontent-%COMP%]:last-child, .overlay-menu__title[_ngcontent-%COMP%]:last-child{border:none}.overlay-menu__title[_ngcontent-%COMP%]{padding-left:6px;padding-right:6px}.overlay-menu__item[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:pointer;font-size:.875em}.overlay-menu__item[_ngcontent-%COMP%]:hover{background-color:#fff2cc}.overlay-menu__itemIcon[_ngcontent-%COMP%]{height:1.25em;width:1.25em;margin-right:6px}"] });
|
|
20664
20752
|
(function () {
|
|
20665
20753
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(CaseFileViewOverlayMenuComponent, [{
|
|
20666
20754
|
type: i0.Component,
|
|
@@ -20785,7 +20873,6 @@
|
|
|
20785
20873
|
return CaseFileViewCategory;
|
|
20786
20874
|
}());
|
|
20787
20875
|
|
|
20788
|
-
// tslint:disable:variable-name
|
|
20789
20876
|
var CaseFileViewDocument = /** @class */ (function () {
|
|
20790
20877
|
function CaseFileViewDocument() {
|
|
20791
20878
|
}
|
|
@@ -22139,7 +22226,7 @@
|
|
|
22139
22226
|
// is expected not to have a party name)
|
|
22140
22227
|
if (this.flagsData) {
|
|
22141
22228
|
this.filteredFlagsData =
|
|
22142
|
-
this.flagsData.filter(function (f) { return f.flags.partyName
|
|
22229
|
+
this.flagsData.filter(function (f) { return f.flags.partyName != null || f.pathToFlagsFormGroup === _this.caseLevelCaseFlagsFieldId; });
|
|
22143
22230
|
}
|
|
22144
22231
|
// Add a FormControl for the selected flag location if there is at least one flags instance remaining after filtering
|
|
22145
22232
|
if (this.filteredFlagsData && this.filteredFlagsData.length > 0) {
|
|
@@ -23436,19 +23523,18 @@
|
|
|
23436
23523
|
field.value = { CaseReference: value };
|
|
23437
23524
|
return field;
|
|
23438
23525
|
};
|
|
23439
|
-
ReadComplexFieldCollectionTableComponent.prototype.toCaseField = function (id, label,
|
|
23526
|
+
ReadComplexFieldCollectionTableComponent.prototype.toCaseField = function (id, label, field_type, value) {
|
|
23440
23527
|
return classTransformer.plainToClassFromExist(new CaseField(), {
|
|
23441
23528
|
id: id,
|
|
23442
23529
|
label: label,
|
|
23443
23530
|
display_context: 'READONLY',
|
|
23444
23531
|
value: value,
|
|
23445
|
-
field_type:
|
|
23532
|
+
field_type: field_type
|
|
23446
23533
|
});
|
|
23447
23534
|
};
|
|
23448
23535
|
ReadComplexFieldCollectionTableComponent.prototype.sortRowsByColumns = function (column) {
|
|
23449
23536
|
var shouldSortInAscendingOrder = this.columnsHorizontalLabel[column].sortOrder === SortOrder.UNSORTED
|
|
23450
23537
|
|| this.columnsHorizontalLabel[column].sortOrder === SortOrder.DESCENDING;
|
|
23451
|
-
// tslint:disable-next-line:switch-default
|
|
23452
23538
|
switch (this.columnsHorizontalLabel[column].type.type) {
|
|
23453
23539
|
case 'Number':
|
|
23454
23540
|
case 'MoneyGBP': {
|
|
@@ -24519,62 +24605,12 @@
|
|
|
24519
24605
|
}] });
|
|
24520
24606
|
})();
|
|
24521
24607
|
|
|
24522
|
-
var MarkdownComponent = /** @class */ (function () {
|
|
24523
|
-
function MarkdownComponent() {
|
|
24524
|
-
}
|
|
24525
|
-
MarkdownComponent.prototype.ngOnInit = function () {
|
|
24526
|
-
this.content = this.content.replace(/ \n/g, '<br>');
|
|
24527
|
-
};
|
|
24528
|
-
MarkdownComponent.prototype.onMarkdownClick = function (event) {
|
|
24529
|
-
// If we don't have an anchor tag, we don't need to do anything.
|
|
24530
|
-
if (event.target instanceof HTMLAnchorElement === false) {
|
|
24531
|
-
return;
|
|
24532
|
-
}
|
|
24533
|
-
return true;
|
|
24534
|
-
};
|
|
24535
|
-
return MarkdownComponent;
|
|
24536
|
-
}());
|
|
24537
|
-
MarkdownComponent.ɵfac = function MarkdownComponent_Factory(t) { return new (t || MarkdownComponent)(); };
|
|
24538
|
-
MarkdownComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: MarkdownComponent, selectors: [["ccd-markdown"]], hostBindings: function MarkdownComponent_HostBindings(rf, ctx) {
|
|
24539
|
-
if (rf & 1) {
|
|
24540
|
-
i0__namespace.ɵɵlistener("click", function MarkdownComponent_click_HostBindingHandler($event) { return ctx.onMarkdownClick($event); });
|
|
24541
|
-
}
|
|
24542
|
-
}, inputs: { content: "content", markdownUseHrefAsRouterLink: "markdownUseHrefAsRouterLink" }, decls: 3, vars: 3, consts: [[1, "markdown", 3, "innerHTML"]], template: function MarkdownComponent_Template(rf, ctx) {
|
|
24543
|
-
if (rf & 1) {
|
|
24544
|
-
i0__namespace.ɵɵelementStart(0, "div");
|
|
24545
|
-
i0__namespace.ɵɵelement(1, "markdown", 0);
|
|
24546
|
-
i0__namespace.ɵɵpipe(2, "ccdCaseReference");
|
|
24547
|
-
i0__namespace.ɵɵelementEnd();
|
|
24548
|
-
}
|
|
24549
|
-
if (rf & 2) {
|
|
24550
|
-
i0__namespace.ɵɵadvance(1);
|
|
24551
|
-
i0__namespace.ɵɵproperty("innerHTML", i0__namespace.ɵɵpipeBind1(2, 1, ctx.content), i0__namespace.ɵɵsanitizeHtml);
|
|
24552
|
-
}
|
|
24553
|
-
}, directives: [i1__namespace$5.NgxMdComponent], pipes: [CaseReferencePipe], encapsulation: 2 });
|
|
24554
|
-
(function () {
|
|
24555
|
-
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(MarkdownComponent, [{
|
|
24556
|
-
type: i0.Component,
|
|
24557
|
-
args: [{
|
|
24558
|
-
selector: 'ccd-markdown',
|
|
24559
|
-
templateUrl: './markdown.html'
|
|
24560
|
-
}]
|
|
24561
|
-
}], function () { return []; }, { content: [{
|
|
24562
|
-
type: i0.Input
|
|
24563
|
-
}], markdownUseHrefAsRouterLink: [{
|
|
24564
|
-
type: i0.Input
|
|
24565
|
-
}], onMarkdownClick: [{
|
|
24566
|
-
type: i0.HostListener,
|
|
24567
|
-
args: ['click', ['$event']]
|
|
24568
|
-
}] });
|
|
24569
|
-
})();
|
|
24570
|
-
|
|
24571
24608
|
var FeeValue = /** @class */ (function () {
|
|
24572
24609
|
function FeeValue() {
|
|
24573
24610
|
}
|
|
24574
24611
|
return FeeValue;
|
|
24575
24612
|
}());
|
|
24576
24613
|
|
|
24577
|
-
// tslint:disable:variable-name
|
|
24578
24614
|
var Fee = /** @class */ (function () {
|
|
24579
24615
|
function Fee() {
|
|
24580
24616
|
}
|
|
@@ -25280,7 +25316,7 @@
|
|
|
25280
25316
|
function CcdPageFieldsPipe() {
|
|
25281
25317
|
}
|
|
25282
25318
|
CcdPageFieldsPipe.prototype.transform = function (page, dataFormGroup) {
|
|
25283
|
-
var
|
|
25319
|
+
var complex_fields = Object.keys(dataFormGroup.controls['data'].controls).map(function (key) {
|
|
25284
25320
|
var control = dataFormGroup.controls['data'].get(key);
|
|
25285
25321
|
return control['caseField'];
|
|
25286
25322
|
}).filter(function (field) {
|
|
@@ -25300,7 +25336,7 @@
|
|
|
25300
25336
|
field_type: {
|
|
25301
25337
|
id: page.id,
|
|
25302
25338
|
type: 'Complex',
|
|
25303
|
-
complex_fields:
|
|
25339
|
+
complex_fields: complex_fields
|
|
25304
25340
|
}
|
|
25305
25341
|
});
|
|
25306
25342
|
};
|
|
@@ -25479,11 +25515,11 @@
|
|
|
25479
25515
|
}
|
|
25480
25516
|
return childrenCaseFields;
|
|
25481
25517
|
};
|
|
25482
|
-
CollectionCreateCheckerService.prototype.isComplex = function (
|
|
25483
|
-
return
|
|
25518
|
+
CollectionCreateCheckerService.prototype.isComplex = function (case_field) {
|
|
25519
|
+
return case_field.field_type.type === 'Complex';
|
|
25484
25520
|
};
|
|
25485
|
-
CollectionCreateCheckerService.prototype.isCollection = function (
|
|
25486
|
-
return
|
|
25521
|
+
CollectionCreateCheckerService.prototype.isCollection = function (case_field) {
|
|
25522
|
+
return case_field.field_type.type === 'Collection';
|
|
25487
25523
|
};
|
|
25488
25524
|
CollectionCreateCheckerService.prototype.hasCreateAccess = function (caseField, role) {
|
|
25489
25525
|
return !!caseField.acls.find(function (acl) { return acl.role === role && acl.create === true; });
|
|
@@ -25639,9 +25675,9 @@
|
|
|
25639
25675
|
FileUploadStateService,
|
|
25640
25676
|
FileUploadProgressGuard,
|
|
25641
25677
|
WindowService,
|
|
25642
|
-
LinkedCasesService,
|
|
25643
25678
|
CommonDataService,
|
|
25644
25679
|
JurisdictionService,
|
|
25680
|
+
LinkedCasesService,
|
|
25645
25681
|
{ provide: i6.MAT_DATE_LOCALE, useValue: 'en-GB' }
|
|
25646
25682
|
], imports: [[
|
|
25647
25683
|
i1.CommonModule,
|
|
@@ -25658,7 +25694,7 @@
|
|
|
25658
25694
|
FormModule,
|
|
25659
25695
|
TabsModule,
|
|
25660
25696
|
LabelSubstitutorModule,
|
|
25661
|
-
i1$
|
|
25697
|
+
i1$4.NgxMdModule,
|
|
25662
25698
|
i4.NgxMatDatetimePickerModule,
|
|
25663
25699
|
i4.NgxMatTimepickerModule,
|
|
25664
25700
|
i4.NgxMatNativeDateModule,
|
|
@@ -25667,7 +25703,7 @@
|
|
|
25667
25703
|
i5$1.MatDatepickerModule,
|
|
25668
25704
|
i5.MatAutocompleteModule,
|
|
25669
25705
|
i7.CdkTreeModule,
|
|
25670
|
-
i1$
|
|
25706
|
+
i1$5.OverlayModule,
|
|
25671
25707
|
i3.PaymentLibModule,
|
|
25672
25708
|
i2$1.ScrollToModule.forRoot(),
|
|
25673
25709
|
i1$3.MatDialogModule,
|
|
@@ -25801,7 +25837,7 @@
|
|
|
25801
25837
|
FormModule,
|
|
25802
25838
|
TabsModule,
|
|
25803
25839
|
LabelSubstitutorModule,
|
|
25804
|
-
i1$
|
|
25840
|
+
i1$4.NgxMdModule,
|
|
25805
25841
|
i4.NgxMatDatetimePickerModule,
|
|
25806
25842
|
i4.NgxMatTimepickerModule,
|
|
25807
25843
|
i4.NgxMatNativeDateModule,
|
|
@@ -25810,7 +25846,7 @@
|
|
|
25810
25846
|
i5$1.MatDatepickerModule,
|
|
25811
25847
|
i5.MatAutocompleteModule,
|
|
25812
25848
|
i7.CdkTreeModule,
|
|
25813
|
-
i1$
|
|
25849
|
+
i1$5.OverlayModule,
|
|
25814
25850
|
i3.PaymentLibModule, i2__namespace$1.ScrollToModule, i1$3.MatDialogModule,
|
|
25815
25851
|
i11.MediaViewerModule,
|
|
25816
25852
|
LoadingModule], exports: [i4.NgxMatDatetimePickerModule,
|
|
@@ -25934,7 +25970,7 @@
|
|
|
25934
25970
|
FormModule,
|
|
25935
25971
|
TabsModule,
|
|
25936
25972
|
LabelSubstitutorModule,
|
|
25937
|
-
i1$
|
|
25973
|
+
i1$4.NgxMdModule,
|
|
25938
25974
|
i4.NgxMatDatetimePickerModule,
|
|
25939
25975
|
i4.NgxMatTimepickerModule,
|
|
25940
25976
|
i4.NgxMatNativeDateModule,
|
|
@@ -25943,7 +25979,7 @@
|
|
|
25943
25979
|
i5$1.MatDatepickerModule,
|
|
25944
25980
|
i5.MatAutocompleteModule,
|
|
25945
25981
|
i7.CdkTreeModule,
|
|
25946
|
-
i1$
|
|
25982
|
+
i1$5.OverlayModule,
|
|
25947
25983
|
i3.PaymentLibModule,
|
|
25948
25984
|
i2$1.ScrollToModule.forRoot(),
|
|
25949
25985
|
i1$3.MatDialogModule,
|
|
@@ -25983,9 +26019,9 @@
|
|
|
25983
26019
|
FileUploadStateService,
|
|
25984
26020
|
FileUploadProgressGuard,
|
|
25985
26021
|
WindowService,
|
|
25986
|
-
LinkedCasesService,
|
|
25987
26022
|
CommonDataService,
|
|
25988
26023
|
JurisdictionService,
|
|
26024
|
+
LinkedCasesService,
|
|
25989
26025
|
{ provide: i6.MAT_DATE_LOCALE, useValue: 'en-GB' }
|
|
25990
26026
|
],
|
|
25991
26027
|
entryComponents: [CaseFileViewFolderSelectorComponent]
|
|
@@ -26684,7 +26720,7 @@
|
|
|
26684
26720
|
if (caseField.field_type.type === 'Complex') {
|
|
26685
26721
|
// Note: Deliberate use of equality (==) and non-equality (!=) operators for null checks throughout, to
|
|
26686
26722
|
// handle both null and undefined values
|
|
26687
|
-
if (caseField.value
|
|
26723
|
+
if (caseField.value != null) {
|
|
26688
26724
|
// Call this function recursively to replace the Complex field's sub-fields as necessary, passing the
|
|
26689
26725
|
// CaseField itself (the sub-fields do not contain any values, so these need to be obtained from the
|
|
26690
26726
|
// parent)
|
|
@@ -26750,8 +26786,8 @@
|
|
|
26750
26786
|
this.caseEdit.navigateToPage(pageId);
|
|
26751
26787
|
};
|
|
26752
26788
|
CaseEditSubmitComponent.prototype.callbackErrorsNotify = function (errorContext) {
|
|
26753
|
-
this.ignoreWarning = errorContext.
|
|
26754
|
-
this.triggerText = errorContext.
|
|
26789
|
+
this.ignoreWarning = errorContext.ignore_warning;
|
|
26790
|
+
this.triggerText = errorContext.trigger_text;
|
|
26755
26791
|
};
|
|
26756
26792
|
CaseEditSubmitComponent.prototype.summaryCaseField = function (field) {
|
|
26757
26793
|
if (null === this.editForm.get('data').get(field.id)) {
|
|
@@ -27383,7 +27419,6 @@
|
|
|
27383
27419
|
{ provide: COMPONENT_PORTAL_INJECTION_TOKEN, useValue: this }
|
|
27384
27420
|
]
|
|
27385
27421
|
});
|
|
27386
|
-
// tslint:disable-next-line:switch-default
|
|
27387
27422
|
switch (portalType) {
|
|
27388
27423
|
case EventCompletionPortalTypes.TaskCancelled:
|
|
27389
27424
|
this.selectedComponentPortal = new i6$2.ComponentPortal(CaseEventCompletionTaskCancelledComponent, null, injector);
|
|
@@ -27918,36 +27953,36 @@
|
|
|
27918
27953
|
this.screenReaderCurrentLabel = "You're on page";
|
|
27919
27954
|
this.pageChange = new i0.EventEmitter();
|
|
27920
27955
|
this.pageBoundsCorrection = new i0.EventEmitter();
|
|
27921
|
-
this.
|
|
27922
|
-
this.
|
|
27923
|
-
this.
|
|
27956
|
+
this._directionLinks = true;
|
|
27957
|
+
this._autoHide = false;
|
|
27958
|
+
this._responsive = false;
|
|
27924
27959
|
}
|
|
27925
27960
|
Object.defineProperty(PaginationComponent.prototype, "directionLinks", {
|
|
27926
27961
|
get: function () {
|
|
27927
|
-
return this.
|
|
27962
|
+
return this._directionLinks;
|
|
27928
27963
|
},
|
|
27929
27964
|
set: function (value) {
|
|
27930
|
-
this.
|
|
27965
|
+
this._directionLinks = coerceToBoolean(value);
|
|
27931
27966
|
},
|
|
27932
27967
|
enumerable: false,
|
|
27933
27968
|
configurable: true
|
|
27934
27969
|
});
|
|
27935
27970
|
Object.defineProperty(PaginationComponent.prototype, "autoHide", {
|
|
27936
27971
|
get: function () {
|
|
27937
|
-
return this.
|
|
27972
|
+
return this._autoHide;
|
|
27938
27973
|
},
|
|
27939
27974
|
set: function (value) {
|
|
27940
|
-
this.
|
|
27975
|
+
this._autoHide = coerceToBoolean(value);
|
|
27941
27976
|
},
|
|
27942
27977
|
enumerable: false,
|
|
27943
27978
|
configurable: true
|
|
27944
27979
|
});
|
|
27945
27980
|
Object.defineProperty(PaginationComponent.prototype, "responsive", {
|
|
27946
27981
|
get: function () {
|
|
27947
|
-
return this.
|
|
27982
|
+
return this._responsive;
|
|
27948
27983
|
},
|
|
27949
27984
|
set: function (value) {
|
|
27950
|
-
this.
|
|
27985
|
+
this._responsive = coerceToBoolean(value);
|
|
27951
27986
|
},
|
|
27952
27987
|
enumerable: false,
|
|
27953
27988
|
configurable: true
|
|
@@ -28714,7 +28749,7 @@
|
|
|
28714
28749
|
var formValue = _this.windowService.getLocalStorage(FORM_GROUP_VAL_LOC_STORAGE);
|
|
28715
28750
|
workbasketInputs.forEach(function (item) {
|
|
28716
28751
|
if (item.field.elementPath) {
|
|
28717
|
-
item.field.id = item.field.id +
|
|
28752
|
+
item.field.id = item.field.id + '.' + item.field.elementPath;
|
|
28718
28753
|
}
|
|
28719
28754
|
item.field.label = item.label;
|
|
28720
28755
|
if (formValue) {
|
|
@@ -28766,7 +28801,7 @@
|
|
|
28766
28801
|
var value = formGroupLS[key];
|
|
28767
28802
|
// Clear the filter form group control values if it has a value in local storage
|
|
28768
28803
|
// The regionList form group control value should be ignored as it always contain the latest value
|
|
28769
|
-
if (key !== REGION_LIST_AND_FRC_FILTER && value
|
|
28804
|
+
if (key !== REGION_LIST_AND_FRC_FILTER && value != null) {
|
|
28770
28805
|
this.formGroup.get(key).setValue(null);
|
|
28771
28806
|
}
|
|
28772
28807
|
}
|
|
@@ -29895,7 +29930,7 @@
|
|
|
29895
29930
|
this.eventTrigger = this.route.snapshot.data.eventTrigger;
|
|
29896
29931
|
if (this.activityPollingService.isEnabled) {
|
|
29897
29932
|
this.ngZone.runOutsideAngular(function () {
|
|
29898
|
-
_this.activitySubscription = _this.postEditActivity().subscribe(function () {
|
|
29933
|
+
_this.activitySubscription = _this.postEditActivity().subscribe(function (_resolved) {
|
|
29899
29934
|
// console.log('Posted EDIT activity and result is: ' + JSON.stringify(_resolved));
|
|
29900
29935
|
});
|
|
29901
29936
|
});
|
|
@@ -30691,7 +30726,7 @@
|
|
|
30691
30726
|
var _r34_1 = i0__namespace.ɵɵgetCurrentView();
|
|
30692
30727
|
i0__namespace.ɵɵelementContainerStart(0);
|
|
30693
30728
|
i0__namespace.ɵɵelementStart(1, "mat-tab-group", 23, 24);
|
|
30694
|
-
i0__namespace.ɵɵlistener("
|
|
30729
|
+
i0__namespace.ɵɵlistener("selectedIndexChange", function CaseFullAccessViewComponent_ng_container_12_Template_mat_tab_group_selectedIndexChange_1_listener($event) { i0__namespace.ɵɵrestoreView(_r34_1); var ctx_r33 = i0__namespace.ɵɵnextContext(); return ctx_r33.tabChanged($event); });
|
|
30695
30730
|
i0__namespace.ɵɵtemplate(3, CaseFullAccessViewComponent_ng_container_12_mat_tab_3_Template, 1, 2, "mat-tab", 25);
|
|
30696
30731
|
i0__namespace.ɵɵtemplate(4, CaseFullAccessViewComponent_ng_container_12_mat_tab_4_Template, 2, 2, "mat-tab", 25);
|
|
30697
30732
|
i0__namespace.ɵɵtemplate(5, CaseFullAccessViewComponent_ng_container_12_mat_tab_5_Template, 1, 2, "mat-tab", 25);
|
|
@@ -30729,6 +30764,7 @@
|
|
|
30729
30764
|
this.location = location;
|
|
30730
30765
|
this.crf = crf;
|
|
30731
30766
|
this.sessionStorageService = sessionStorageService;
|
|
30767
|
+
this.HEARINGS_TAB_LABEL = 'Hearings';
|
|
30732
30768
|
this.hasPrint = true;
|
|
30733
30769
|
this.hasEventSelector = true;
|
|
30734
30770
|
this.prependedTabs = [];
|
|
@@ -30740,6 +30776,7 @@
|
|
|
30740
30776
|
this.ignoreWarning = false;
|
|
30741
30777
|
this.selectedTabIndex = 0;
|
|
30742
30778
|
this.activeCaseFlags = false;
|
|
30779
|
+
this.subs = [];
|
|
30743
30780
|
this.callbackErrorsSubject = new rxjs.Subject();
|
|
30744
30781
|
}
|
|
30745
30782
|
CaseFullAccessViewComponent.prototype.ngOnInit = function () {
|
|
@@ -30792,6 +30829,7 @@
|
|
|
30792
30829
|
this.unsubscribe(this.callbackErrorsSubject);
|
|
30793
30830
|
this.unsubscribe(this.errorSubscription);
|
|
30794
30831
|
this.unsubscribe(this.subscription);
|
|
30832
|
+
this.subs.forEach(function (s) { return s.unsubscribe(); });
|
|
30795
30833
|
};
|
|
30796
30834
|
CaseFullAccessViewComponent.prototype.unsubscribe = function (subscription) {
|
|
30797
30835
|
if (subscription) {
|
|
@@ -30800,7 +30838,7 @@
|
|
|
30800
30838
|
};
|
|
30801
30839
|
CaseFullAccessViewComponent.prototype.checkRouteAndSetCaseViewTab = function () {
|
|
30802
30840
|
var _this = this;
|
|
30803
|
-
this.router.events
|
|
30841
|
+
this.subs.push(this.router.events
|
|
30804
30842
|
.pipe(operators.filter(function (event) { return event instanceof i1$1.NavigationEnd; }))
|
|
30805
30843
|
.subscribe(function (event) {
|
|
30806
30844
|
var url = event && event.url;
|
|
@@ -30812,8 +30850,9 @@
|
|
|
30812
30850
|
_this.tabGroup.selectedIndex = matTab.position;
|
|
30813
30851
|
}
|
|
30814
30852
|
}
|
|
30815
|
-
});
|
|
30853
|
+
}));
|
|
30816
30854
|
};
|
|
30855
|
+
;
|
|
30817
30856
|
CaseFullAccessViewComponent.prototype.postViewActivity = function () {
|
|
30818
30857
|
return this.activityPollingService.postViewActivity(this.caseDetails.case_id);
|
|
30819
30858
|
};
|
|
@@ -30867,8 +30906,8 @@
|
|
|
30867
30906
|
return this.sortedTabs.length > 0 || this.prependedTabs.length > 0 || this.appendedTabs.length > 0;
|
|
30868
30907
|
};
|
|
30869
30908
|
CaseFullAccessViewComponent.prototype.callbackErrorsNotify = function (callbackErrorsContext) {
|
|
30870
|
-
this.ignoreWarning = callbackErrorsContext.
|
|
30871
|
-
this.triggerText = callbackErrorsContext.
|
|
30909
|
+
this.ignoreWarning = callbackErrorsContext.ignore_warning;
|
|
30910
|
+
this.triggerText = callbackErrorsContext.trigger_text;
|
|
30872
30911
|
};
|
|
30873
30912
|
CaseFullAccessViewComponent.prototype.isDraft = function () {
|
|
30874
30913
|
return Draft.isDraft(this.caseDetails.case_id);
|
|
@@ -30936,22 +30975,25 @@
|
|
|
30936
30975
|
}
|
|
30937
30976
|
}
|
|
30938
30977
|
};
|
|
30939
|
-
|
|
30940
|
-
|
|
30941
|
-
this.
|
|
30942
|
-
var
|
|
30943
|
-
|
|
30944
|
-
//
|
|
30945
|
-
|
|
30946
|
-
|
|
30947
|
-
|
|
30978
|
+
// Refactored under EXUI-110 to address infinite tab loop to use tabIndexChanged instead
|
|
30979
|
+
CaseFullAccessViewComponent.prototype.tabChanged = function (tabIndexChanged) {
|
|
30980
|
+
var matTab = this.tabGroup._tabs.find(function (tab) { return tab.isActive; });
|
|
30981
|
+
var tabLabel = matTab.textLabel;
|
|
30982
|
+
// sortedTabs are fragments
|
|
30983
|
+
// appended/prepepended tabs use router navigation
|
|
30984
|
+
if ((tabIndexChanged <= 1 && this.prependedTabs && this.prependedTabs.length) ||
|
|
30985
|
+
(this.appendedTabs && this.appendedTabs.length && tabLabel === this.HEARINGS_TAB_LABEL)) {
|
|
30986
|
+
// Hack to get ID from tab as it's not easily achieved through Angular Material Tabs
|
|
30987
|
+
var tab = matTab['_viewContainerRef'];
|
|
30988
|
+
var id = tab.element.nativeElement.id;
|
|
30989
|
+
// cases/case-details/:caseId/hearings
|
|
30990
|
+
// cases/case-details/:caseId/roles-and-access
|
|
30948
30991
|
this.router.navigate([id], { relativeTo: this.route });
|
|
30949
30992
|
}
|
|
30950
30993
|
else {
|
|
30951
|
-
|
|
30952
|
-
|
|
30953
|
-
|
|
30954
|
-
});
|
|
30994
|
+
// Routing here is based on tab label, not ideal
|
|
30995
|
+
// cases/case-details/:caseId#tabLabel
|
|
30996
|
+
this.router.navigate(['cases', 'case-details', this.caseDetails.case_id], { fragment: tabLabel });
|
|
30955
30997
|
}
|
|
30956
30998
|
};
|
|
30957
30999
|
CaseFullAccessViewComponent.prototype.onLinkClicked = function (triggerOutputEventText) {
|
|
@@ -31049,6 +31091,12 @@
|
|
|
31049
31091
|
this.callbackErrorsSubject.next(null);
|
|
31050
31092
|
this.alertService.clear();
|
|
31051
31093
|
};
|
|
31094
|
+
CaseFullAccessViewComponent.prototype.getUrlFragment = function (url) {
|
|
31095
|
+
return url.split('#')[url.split('#').length - 1];
|
|
31096
|
+
};
|
|
31097
|
+
CaseFullAccessViewComponent.prototype.getTabIndexByTabLabel = function (tabGroup, tabLabel) {
|
|
31098
|
+
return tabGroup._tabs.toArray().findIndex(function (t) { return t.textLabel.toLowerCase() === tabLabel.toLowerCase(); });
|
|
31099
|
+
};
|
|
31052
31100
|
return CaseFullAccessViewComponent;
|
|
31053
31101
|
}());
|
|
31054
31102
|
CaseFullAccessViewComponent.ORIGIN_QUERY_PARAM = 'origin';
|
|
@@ -31065,7 +31113,7 @@
|
|
|
31065
31113
|
var _t = void 0;
|
|
31066
31114
|
i0__namespace.ɵɵqueryRefresh(_t = i0__namespace.ɵɵloadQuery()) && (ctx.tabGroup = _t.first);
|
|
31067
31115
|
}
|
|
31068
|
-
}, inputs: { hasPrint: "hasPrint", hasEventSelector: "hasEventSelector", caseDetails: "caseDetails", prependedTabs: "prependedTabs", appendedTabs: "appendedTabs" }, features: [i0__namespace.ɵɵNgOnChangesFeature], decls: 13, vars: 12, consts: [["class", "error-summary", "role", "group", "aria-labelledby", "edit-case-event_error-summary-heading", "tabindex", "-1", 4, "ngIf"], [3, "triggerTextContinue", "triggerTextIgnore", "callbackErrorsSubject", "callbackErrorsContext"], [3, "caseId", "displayMode"], [1, "grid-row"], [1, "column-one-half"], [3, "caseDetails"], ["class", "case-viewer-controls", 4, "ngIf"], ["class", "column-one-half", 4, "ngIf"], ["class", "grid-row", 4, "ngIf"], [1, "column-full"], [4, "ngIf"], ["role", "group", "aria-labelledby", "edit-case-event_error-summary-heading", "tabindex", "-1", 1, "error-summary"], ["id", "edit-case-event_error-summary-heading", 1, "heading-h1", "error-summary-heading"], ["id", "edit-case-event_error-summary-body", 1, "govuk-error-summary__body"], ["href", "get-help", "target", "_blank"], ["id", "edit-case-event_error-summary-heading", 1, "heading-h2", "error-summary-heading"], ["class", "error-summary-list", 4, "ngIf"], [1, "error-summary-list"], [4, "ngFor", "ngForOf"], [1, "case-viewer-controls"], ["id", "case-viewer-control-print", "routerLink", "print", 1, "button", "button-secondary"], [3, "isDisabled", "triggers", "triggerText", "onTriggerChange", "onTriggerSubmit"], [3, "notificationBannerConfig", "linkClicked"], ["animationDuration", "0ms", 3, "disableRipple", "selectedIndex", "
|
|
31116
|
+
}, inputs: { hasPrint: "hasPrint", hasEventSelector: "hasEventSelector", caseDetails: "caseDetails", prependedTabs: "prependedTabs", appendedTabs: "appendedTabs" }, features: [i0__namespace.ɵɵNgOnChangesFeature], decls: 13, vars: 12, consts: [["class", "error-summary", "role", "group", "aria-labelledby", "edit-case-event_error-summary-heading", "tabindex", "-1", 4, "ngIf"], [3, "triggerTextContinue", "triggerTextIgnore", "callbackErrorsSubject", "callbackErrorsContext"], [3, "caseId", "displayMode"], [1, "grid-row"], [1, "column-one-half"], [3, "caseDetails"], ["class", "case-viewer-controls", 4, "ngIf"], ["class", "column-one-half", 4, "ngIf"], ["class", "grid-row", 4, "ngIf"], [1, "column-full"], [4, "ngIf"], ["role", "group", "aria-labelledby", "edit-case-event_error-summary-heading", "tabindex", "-1", 1, "error-summary"], ["id", "edit-case-event_error-summary-heading", 1, "heading-h1", "error-summary-heading"], ["id", "edit-case-event_error-summary-body", 1, "govuk-error-summary__body"], ["href", "get-help", "target", "_blank"], ["id", "edit-case-event_error-summary-heading", 1, "heading-h2", "error-summary-heading"], ["class", "error-summary-list", 4, "ngIf"], [1, "error-summary-list"], [4, "ngFor", "ngForOf"], [1, "case-viewer-controls"], ["id", "case-viewer-control-print", "routerLink", "print", 1, "button", "button-secondary"], [3, "isDisabled", "triggers", "triggerText", "onTriggerChange", "onTriggerSubmit"], [3, "notificationBannerConfig", "linkClicked"], ["animationDuration", "0ms", 3, "disableRipple", "selectedIndex", "selectedIndexChange"], ["tabGroup", ""], [3, "id", "label", 4, "ngFor", "ngForOf"], [3, "id", "label"], ["matTabContent", ""], ["aria-describedby", "case viewer table"], ["ccdLabelSubstitutor", "", 3, "caseField", "contextFields", "hidden"], [3, "ngSwitch"], [4, "ngSwitchCase"], ["class", "compound-field", 4, "ngSwitchCase"], ["id", "case-viewer-field-label", 4, "ngIf"], ["scope", "col", 3, "id"], [1, "text-16"], [3, "topLevelFormGroup", "caseField", "caseReference", "markdownUseHrefAsRouterLink"], ["id", "case-viewer-field-label"], [1, "case-viewer-label", "text-16"], [1, "compound-field"]], template: function CaseFullAccessViewComponent_Template(rf, ctx) {
|
|
31069
31117
|
if (rf & 1) {
|
|
31070
31118
|
i0__namespace.ɵɵtemplate(0, CaseFullAccessViewComponent_div_0_Template, 10, 0, "div", 0);
|
|
31071
31119
|
i0__namespace.ɵɵtemplate(1, CaseFullAccessViewComponent_div_1_Template, 6, 2, "div", 0);
|
|
@@ -31147,7 +31195,7 @@
|
|
|
31147
31195
|
* or the empty string
|
|
31148
31196
|
*/
|
|
31149
31197
|
PrintUrlPipe.prototype.transform = function (remoteUrl) {
|
|
31150
|
-
if (
|
|
31198
|
+
if (remoteUrl && remoteUrl.length > 0) {
|
|
31151
31199
|
var printServiceUrlPathname = void 0;
|
|
31152
31200
|
/**
|
|
31153
31201
|
* Check navigator.userAgent to see if the browser is IE or not. Check for either the browser name, "MSIE", or
|
|
@@ -31163,7 +31211,7 @@
|
|
|
31163
31211
|
printServiceUrlPathname = urlParser.pathname;
|
|
31164
31212
|
if (printServiceUrlPathname[0] !== '/') {
|
|
31165
31213
|
// Fix for IE11; it returns the pathname without leading slash
|
|
31166
|
-
printServiceUrlPathname =
|
|
31214
|
+
printServiceUrlPathname = '/' + printServiceUrlPathname;
|
|
31167
31215
|
}
|
|
31168
31216
|
}
|
|
31169
31217
|
else {
|
|
@@ -31366,10 +31414,10 @@
|
|
|
31366
31414
|
};
|
|
31367
31415
|
CaseViewerComponent.prototype.setUserAccessType = function (caseDetails) {
|
|
31368
31416
|
if (caseDetails && Array.isArray(caseDetails.metadataFields)) {
|
|
31369
|
-
var
|
|
31370
|
-
var
|
|
31371
|
-
this.accessGranted =
|
|
31372
|
-
this.userAccessType =
|
|
31417
|
+
var access_process = caseDetails.metadataFields.find(function (metadataField) { return metadataField.id === CaseViewerComponent.METADATA_FIELD_ACCESS_PROCEES_ID; });
|
|
31418
|
+
var access_granted = caseDetails.metadataFields.find(function (metadataField) { return metadataField.id === CaseViewerComponent.METADATA_FIELD_ACCESS_GRANTED_ID; });
|
|
31419
|
+
this.accessGranted = access_granted ? access_granted.value !== CaseViewerComponent.BASIC_USER_ACCESS_TYPES : false;
|
|
31420
|
+
this.userAccessType = access_process ? access_process.value : null;
|
|
31373
31421
|
}
|
|
31374
31422
|
};
|
|
31375
31423
|
CaseViewerComponent.prototype.isDataLoaded = function () {
|
|
@@ -32665,11 +32713,11 @@
|
|
|
32665
32713
|
};
|
|
32666
32714
|
this.$roleAssignmentResponseSubscription = this.casesService.createChallengedAccessRequest(caseId_1, challengedAccessRequest)
|
|
32667
32715
|
.pipe(operators.switchMap(function () { return _this.caseNotifier.fetchAndRefresh(caseId_1); }))
|
|
32668
|
-
.subscribe(function () {
|
|
32716
|
+
.subscribe(function (_response) {
|
|
32669
32717
|
// Would have been nice to pass the caseId within state.data, but this isn't part of NavigationExtras until
|
|
32670
32718
|
// Angular 7.2!
|
|
32671
32719
|
_this.router.navigate(['success'], { relativeTo: _this.route });
|
|
32672
|
-
}, function () {
|
|
32720
|
+
}, function (_error) {
|
|
32673
32721
|
// Navigate to error page
|
|
32674
32722
|
});
|
|
32675
32723
|
}
|
|
@@ -32683,7 +32731,7 @@
|
|
|
32683
32731
|
}
|
|
32684
32732
|
};
|
|
32685
32733
|
CaseChallengedAccessRequestComponent.prototype.inputEmpty = function (input) {
|
|
32686
|
-
return input.value
|
|
32734
|
+
return input.value == null || input.value.trim().length === 0;
|
|
32687
32735
|
};
|
|
32688
32736
|
return CaseChallengedAccessRequestComponent;
|
|
32689
32737
|
}());
|
|
@@ -33307,11 +33355,11 @@
|
|
|
33307
33355
|
};
|
|
33308
33356
|
this.$roleAssignmentResponseSubscription = this.casesService.createSpecificAccessRequest(caseId_1, specificAccessRequest)
|
|
33309
33357
|
.pipe(operators.switchMap(function () { return _this.caseNotifier.fetchAndRefresh(caseId_1); }))
|
|
33310
|
-
.subscribe(function () {
|
|
33358
|
+
.subscribe(function (_response) {
|
|
33311
33359
|
// Would have been nice to pass the caseId within state.data, but this isn't part of NavigationExtras until
|
|
33312
33360
|
// Angular 7.2
|
|
33313
33361
|
_this.router.navigate(['success'], { relativeTo: _this.route });
|
|
33314
|
-
}, function () {
|
|
33362
|
+
}, function (_error) {
|
|
33315
33363
|
// Navigate to error page
|
|
33316
33364
|
});
|
|
33317
33365
|
}
|
|
@@ -33326,7 +33374,7 @@
|
|
|
33326
33374
|
}
|
|
33327
33375
|
};
|
|
33328
33376
|
CaseSpecificAccessRequestComponent.prototype.inputEmpty = function (input) {
|
|
33329
|
-
return input.value
|
|
33377
|
+
return input.value == null || input.value.trim().length === 0;
|
|
33330
33378
|
};
|
|
33331
33379
|
return CaseSpecificAccessRequestComponent;
|
|
33332
33380
|
}());
|
|
@@ -34227,7 +34275,7 @@
|
|
|
34227
34275
|
}
|
|
34228
34276
|
searchInputs.forEach(function (item) {
|
|
34229
34277
|
if (item.field.elementPath) {
|
|
34230
|
-
item.field.id = item.field.id +
|
|
34278
|
+
item.field.id = item.field.id + '.' + item.field.elementPath;
|
|
34231
34279
|
}
|
|
34232
34280
|
item.field.label = item.label;
|
|
34233
34281
|
if (formValueObject) {
|
|
@@ -34506,7 +34554,7 @@
|
|
|
34506
34554
|
if (rf & 2) {
|
|
34507
34555
|
var ctx_r3 = i0__namespace.ɵɵnextContext(2);
|
|
34508
34556
|
i0__namespace.ɵɵadvance(6);
|
|
34509
|
-
i0__namespace.ɵɵtextInterpolate1(" The total size of the result set is ", i0__namespace.ɵɵpipeBind1(7, 1, ctx_r3.paginationMetadata.
|
|
34557
|
+
i0__namespace.ɵɵtextInterpolate1(" The total size of the result set is ", i0__namespace.ɵɵpipeBind1(7, 1, ctx_r3.paginationMetadata.total_results_count), ". Only the first 10,000 records are available for display. ");
|
|
34510
34558
|
}
|
|
34511
34559
|
}
|
|
34512
34560
|
function SearchResultComponent_table_0_div_5_Template(rf, ctx) {
|
|
@@ -35065,7 +35113,7 @@
|
|
|
35065
35113
|
};
|
|
35066
35114
|
Object.defineProperty(SearchResultComponent.prototype, "resultTotal", {
|
|
35067
35115
|
get: function () {
|
|
35068
|
-
var total = this.paginationMetadata.
|
|
35116
|
+
var total = this.paginationMetadata.total_results_count;
|
|
35069
35117
|
var maximumResultReached = total >= this.PAGINATION_MAX_ITEM_RESULT;
|
|
35070
35118
|
this.paginationLimitEnforced = maximumResultReached;
|
|
35071
35119
|
return maximumResultReached ? this.PAGINATION_MAX_ITEM_RESULT : total;
|
|
@@ -35216,7 +35264,7 @@
|
|
|
35216
35264
|
return col;
|
|
35217
35265
|
};
|
|
35218
35266
|
SearchResultComponent.prototype.hasResults = function () {
|
|
35219
|
-
return this.resultView.results.length && this.paginationMetadata.
|
|
35267
|
+
return this.resultView.results.length && this.paginationMetadata.total_pages_count;
|
|
35220
35268
|
};
|
|
35221
35269
|
SearchResultComponent.prototype.hasDrafts = function () {
|
|
35222
35270
|
return this.resultView.hasDrafts();
|
|
@@ -35315,7 +35363,7 @@
|
|
|
35315
35363
|
return ((currentPage - 1) * this.paginationPageSize) + this.resultView.results.length + this.getDraftsCountIfNotPageOne(currentPage);
|
|
35316
35364
|
};
|
|
35317
35365
|
SearchResultComponent.prototype.getTotalResults = function () {
|
|
35318
|
-
var total = this.paginationMetadata.
|
|
35366
|
+
var total = this.paginationMetadata.total_results_count + this.draftsCount;
|
|
35319
35367
|
return total >= this.PAGINATION_MAX_ITEM_RESULT ? this.PAGINATION_MAX_ITEM_RESULT : total;
|
|
35320
35368
|
};
|
|
35321
35369
|
SearchResultComponent.prototype.prepareCaseLinkUrl = function (caseId) {
|
|
@@ -35473,7 +35521,6 @@
|
|
|
35473
35521
|
})();
|
|
35474
35522
|
i0__namespace.ɵɵsetComponentScope(SearchResultComponent, [i1__namespace.NgIf, i1__namespace.NgForOf, i1__namespace$1.RouterLinkWithHref, FieldReadComponent, LabelSubstitutorDirective, ActivityComponent, PaginationComponent], [i1__namespace.DecimalPipe, i1__namespace$6.PaginatePipe, CaseReferencePipe, SortSearchResultPipe]);
|
|
35475
35523
|
|
|
35476
|
-
// tslint:disable:variable-name
|
|
35477
35524
|
var ComplexFieldOverride = /** @class */ (function () {
|
|
35478
35525
|
function ComplexFieldOverride() {
|
|
35479
35526
|
}
|
|
@@ -35495,24 +35542,24 @@
|
|
|
35495
35542
|
this.caseField.id = id;
|
|
35496
35543
|
return this;
|
|
35497
35544
|
};
|
|
35498
|
-
CaseFieldBuilder.prototype.withFieldType = function (
|
|
35499
|
-
this.caseField.field_type =
|
|
35545
|
+
CaseFieldBuilder.prototype.withFieldType = function (field_type) {
|
|
35546
|
+
this.caseField.field_type = field_type;
|
|
35500
35547
|
return this;
|
|
35501
35548
|
};
|
|
35502
|
-
CaseFieldBuilder.prototype.withDisplayContext = function (
|
|
35503
|
-
this.caseField.display_context =
|
|
35549
|
+
CaseFieldBuilder.prototype.withDisplayContext = function (display_context) {
|
|
35550
|
+
this.caseField.display_context = display_context;
|
|
35504
35551
|
return this;
|
|
35505
35552
|
};
|
|
35506
|
-
CaseFieldBuilder.prototype.withDisplayContextParameter = function (
|
|
35507
|
-
this.caseField.display_context_parameter =
|
|
35553
|
+
CaseFieldBuilder.prototype.withDisplayContextParameter = function (display_context_parameter) {
|
|
35554
|
+
this.caseField.display_context_parameter = display_context_parameter;
|
|
35508
35555
|
return this;
|
|
35509
35556
|
};
|
|
35510
35557
|
CaseFieldBuilder.prototype.withHidden = function (hidden) {
|
|
35511
35558
|
this.caseField.hidden = hidden;
|
|
35512
35559
|
return this;
|
|
35513
35560
|
};
|
|
35514
|
-
CaseFieldBuilder.prototype.withHintText = function (
|
|
35515
|
-
this.caseField.hint_text =
|
|
35561
|
+
CaseFieldBuilder.prototype.withHintText = function (hint_text) {
|
|
35562
|
+
this.caseField.hint_text = hint_text;
|
|
35516
35563
|
return this;
|
|
35517
35564
|
};
|
|
35518
35565
|
CaseFieldBuilder.prototype.withLabel = function (label) {
|
|
@@ -35523,12 +35570,12 @@
|
|
|
35523
35570
|
this.caseField.order = order;
|
|
35524
35571
|
return this;
|
|
35525
35572
|
};
|
|
35526
|
-
CaseFieldBuilder.prototype.withSecurityLabel = function (
|
|
35527
|
-
this.caseField.security_label =
|
|
35573
|
+
CaseFieldBuilder.prototype.withSecurityLabel = function (security_label) {
|
|
35574
|
+
this.caseField.security_label = security_label;
|
|
35528
35575
|
return this;
|
|
35529
35576
|
};
|
|
35530
|
-
CaseFieldBuilder.prototype.withShowCondition = function (
|
|
35531
|
-
this.caseField.show_condition =
|
|
35577
|
+
CaseFieldBuilder.prototype.withShowCondition = function (show_condition) {
|
|
35578
|
+
this.caseField.show_condition = show_condition;
|
|
35532
35579
|
return this;
|
|
35533
35580
|
};
|
|
35534
35581
|
CaseFieldBuilder.prototype.withShowSummaryContentOption = function (option) {
|
|
@@ -35556,21 +35603,21 @@
|
|
|
35556
35603
|
complex_fields: []
|
|
35557
35604
|
};
|
|
35558
35605
|
};
|
|
35559
|
-
var createCaseEventTrigger = function (id, name,
|
|
35560
|
-
if (
|
|
35561
|
-
if (
|
|
35606
|
+
var createCaseEventTrigger = function (id, name, case_id, show_summary, case_fields, wizard_pages, can_save_draft) {
|
|
35607
|
+
if (wizard_pages === void 0) { wizard_pages = []; }
|
|
35608
|
+
if (can_save_draft === void 0) { can_save_draft = false; }
|
|
35562
35609
|
var eventTrigger = new CaseEventTrigger();
|
|
35563
35610
|
eventTrigger.id = id;
|
|
35564
35611
|
eventTrigger.name = name;
|
|
35565
|
-
eventTrigger.case_id =
|
|
35566
|
-
eventTrigger.show_summary =
|
|
35567
|
-
eventTrigger.wizard_pages =
|
|
35612
|
+
eventTrigger.case_id = case_id;
|
|
35613
|
+
eventTrigger.show_summary = show_summary;
|
|
35614
|
+
eventTrigger.wizard_pages = wizard_pages;
|
|
35568
35615
|
eventTrigger.event_token = 'test-token';
|
|
35569
|
-
eventTrigger.case_fields =
|
|
35570
|
-
eventTrigger.can_save_draft =
|
|
35616
|
+
eventTrigger.case_fields = case_fields;
|
|
35617
|
+
eventTrigger.can_save_draft = can_save_draft;
|
|
35571
35618
|
return eventTrigger;
|
|
35572
35619
|
};
|
|
35573
|
-
var aCaseField = function (id, label, type,
|
|
35620
|
+
var aCaseField = function (id, label, type, display_context, show_summary_content_option, typeComplexFields, retain_hidden_value, hidden) {
|
|
35574
35621
|
if (typeComplexFields === void 0) { typeComplexFields = []; }
|
|
35575
35622
|
return ({
|
|
35576
35623
|
id: id || 'personFirstName',
|
|
@@ -35579,10 +35626,10 @@
|
|
|
35579
35626
|
type: type || 'Text',
|
|
35580
35627
|
complex_fields: typeComplexFields || []
|
|
35581
35628
|
},
|
|
35582
|
-
display_context:
|
|
35629
|
+
display_context: display_context || 'OPTIONAL',
|
|
35583
35630
|
label: label || 'First name',
|
|
35584
|
-
show_summary_content_option:
|
|
35585
|
-
retain_hidden_value:
|
|
35631
|
+
show_summary_content_option: show_summary_content_option,
|
|
35632
|
+
retain_hidden_value: retain_hidden_value || false,
|
|
35586
35633
|
hidden: hidden || false
|
|
35587
35634
|
});
|
|
35588
35635
|
};
|
|
@@ -35624,48 +35671,48 @@
|
|
|
35624
35671
|
complexFieldOverride.display_context = 'HIDDEN';
|
|
35625
35672
|
return complexFieldOverride;
|
|
35626
35673
|
};
|
|
35627
|
-
var createCaseField = function (id, label, hint, fieldType,
|
|
35674
|
+
var createCaseField = function (id, label, hint, fieldType, display_context, order, show_condition, ACLs, hidden) {
|
|
35628
35675
|
if (order === void 0) { order = undefined; }
|
|
35629
|
-
if (
|
|
35630
|
-
if (
|
|
35676
|
+
if (show_condition === void 0) { show_condition = undefined; }
|
|
35677
|
+
if (ACLs === void 0) { ACLs = undefined; }
|
|
35631
35678
|
return CaseFieldBuilder.create()
|
|
35632
35679
|
.withId(id || 'personFirstName')
|
|
35633
35680
|
.withFieldType(fieldType || textFieldType())
|
|
35634
|
-
.withDisplayContext(
|
|
35681
|
+
.withDisplayContext(display_context || 'OPTIONAL')
|
|
35635
35682
|
.withLabel(label || 'First name')
|
|
35636
35683
|
.withHintText(hint || 'First name hint text')
|
|
35637
35684
|
.withShowSummaryContentOption(0)
|
|
35638
35685
|
.withOrder(order)
|
|
35639
|
-
.withShowCondition(
|
|
35640
|
-
.withACLs(
|
|
35686
|
+
.withShowCondition(show_condition || undefined)
|
|
35687
|
+
.withACLs(ACLs)
|
|
35641
35688
|
.withHidden(hidden || false)
|
|
35642
35689
|
.build();
|
|
35643
35690
|
};
|
|
35644
|
-
var newCaseField = function (id, label, hint, fieldType,
|
|
35691
|
+
var newCaseField = function (id, label, hint, fieldType, display_context, order) {
|
|
35645
35692
|
if (order === void 0) { order = undefined; }
|
|
35646
35693
|
return CaseFieldBuilder.create()
|
|
35647
35694
|
.withId(id || 'personFirstName')
|
|
35648
35695
|
.withFieldType(fieldType || textFieldType())
|
|
35649
|
-
.withDisplayContext(
|
|
35696
|
+
.withDisplayContext(display_context || 'OPTIONAL')
|
|
35650
35697
|
.withHintText(hint || 'First name hint text')
|
|
35651
35698
|
.withLabel(label || 'First name')
|
|
35652
35699
|
.withOrder(order)
|
|
35653
35700
|
.withShowSummaryContentOption(0);
|
|
35654
35701
|
};
|
|
35655
|
-
var createFieldType = function (typeId, type,
|
|
35656
|
-
if (
|
|
35657
|
-
if (
|
|
35702
|
+
var createFieldType = function (typeId, type, complex_fields, collection_field_type) {
|
|
35703
|
+
if (complex_fields === void 0) { complex_fields = []; }
|
|
35704
|
+
if (collection_field_type === void 0) { collection_field_type = undefined; }
|
|
35658
35705
|
return {
|
|
35659
35706
|
id: typeId || 'Text',
|
|
35660
35707
|
type: type || 'Text',
|
|
35661
|
-
complex_fields:
|
|
35662
|
-
collection_field_type:
|
|
35708
|
+
complex_fields: complex_fields || [],
|
|
35709
|
+
collection_field_type: collection_field_type || undefined
|
|
35663
35710
|
};
|
|
35664
35711
|
};
|
|
35665
35712
|
var createFixedListFieldType = function (typeId, fixedListItems) {
|
|
35666
35713
|
if (fixedListItems === void 0) { fixedListItems = []; }
|
|
35667
35714
|
return {
|
|
35668
|
-
id:
|
|
35715
|
+
id: 'FixedList-' + typeId,
|
|
35669
35716
|
type: 'FixedList',
|
|
35670
35717
|
fixed_list_items: fixedListItems || []
|
|
35671
35718
|
};
|
|
@@ -35673,18 +35720,18 @@
|
|
|
35673
35720
|
var createMultiSelectListFieldType = function (typeId, fixedListItems) {
|
|
35674
35721
|
if (fixedListItems === void 0) { fixedListItems = []; }
|
|
35675
35722
|
return {
|
|
35676
|
-
id:
|
|
35723
|
+
id: 'MultiSelectList-' + typeId,
|
|
35677
35724
|
type: 'MultiSelectList',
|
|
35678
35725
|
fixed_list_items: fixedListItems || []
|
|
35679
35726
|
};
|
|
35680
35727
|
};
|
|
35681
|
-
var createACL = function (role,
|
|
35728
|
+
var createACL = function (role, create, read, update, _delete) {
|
|
35682
35729
|
return ({
|
|
35683
35730
|
role: role || 'roleX',
|
|
35684
|
-
create:
|
|
35685
|
-
read:
|
|
35686
|
-
update:
|
|
35687
|
-
delete:
|
|
35731
|
+
create: create,
|
|
35732
|
+
read: read,
|
|
35733
|
+
update: update,
|
|
35734
|
+
delete: _delete
|
|
35688
35735
|
});
|
|
35689
35736
|
};
|
|
35690
35737
|
|
|
@@ -35903,6 +35950,7 @@
|
|
|
35903
35950
|
exports.FormatTranslatorService = FormatTranslatorService;
|
|
35904
35951
|
exports.GreyBarService = GreyBarService;
|
|
35905
35952
|
exports.HRef = HRef;
|
|
35953
|
+
exports.HasLoadingState = HasLoadingState;
|
|
35906
35954
|
exports.HeaderBarComponent = HeaderBarComponent;
|
|
35907
35955
|
exports.HeadersModule = HeadersModule;
|
|
35908
35956
|
exports.HttpError = HttpError;
|