@hmcts/ccd-case-ui-toolkit 6.14.1-v1 → 6.14.1-wa-4-case-flags
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 +798 -850
- 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 +2 -3
- 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-data.service.js +5 -8
- 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 +22 -6
- 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 +2 -1
- 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 +2 -1
- 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 +2 -1
- package/esm2015/lib/shared/components/case-editor/services/cases.service.js +11 -22
- 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 +2 -1
- 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 +3 -3
- 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 +4 -7
- package/esm2015/lib/shared/components/palette/address/write-address-field.component.js +4 -4
- 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 +4 -3
- package/esm2015/lib/shared/components/palette/dynamic-multi-select-list/read-dynamic-multi-select-list-field.component.js +1 -1
- package/esm2015/lib/shared/components/palette/dynamic-multi-select-list/write-dynamic-multi-select-list-field.component.js +1 -1
- 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 +2 -2
- package/esm2015/lib/shared/components/palette/linked-cases/components/linked-cases-table/linked-cases-to-table.component.js +26 -2
- package/esm2015/lib/shared/components/palette/linked-cases/domain/linked-cases-state.model.js +1 -1
- package/esm2015/lib/shared/components/palette/linked-cases/domain/linked-cases.model.js +2 -1
- 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 +2 -3
- package/esm2015/lib/shared/components/palette/linked-cases/write-linked-cases-field.component.js +38 -89
- package/esm2015/lib/shared/components/palette/order-summary/fee.model.js +2 -1
- package/esm2015/lib/shared/components/palette/order-summary/order-summary.model.js +1 -1
- package/esm2015/lib/shared/components/palette/palette.module.js +3 -6
- 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 +3 -1
- 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 +4 -3
- package/esm2015/lib/shared/directives/conditional-show/services/condition-parser.service.js +5 -9
- package/esm2015/lib/shared/domain/addresses/address.model.js +2 -1
- package/esm2015/lib/shared/domain/case-details.model.js +2 -1
- package/esm2015/lib/shared/domain/case-event-data.model.js +2 -1
- 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 +2 -1
- 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 +2 -1
- package/esm2015/lib/shared/domain/case-flag/flag-type.model.js +2 -1
- package/esm2015/lib/shared/domain/case-flag/hmcts-service-detail.model.js +2 -1
- package/esm2015/lib/shared/domain/case-view/case-event-trigger.model.js +2 -1
- package/esm2015/lib/shared/domain/case-view/case-tab.model.js +2 -1
- package/esm2015/lib/shared/domain/case-view/case-view-event.model.js +2 -1
- package/esm2015/lib/shared/domain/case-view/case-view.model.js +2 -1
- 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 +2 -1
- package/esm2015/lib/shared/domain/definition/case-type.model.js +2 -1
- package/esm2015/lib/shared/domain/definition/event-case-field.model.js +2 -1
- package/esm2015/lib/shared/domain/definition/field-type.model.js +2 -1
- package/esm2015/lib/shared/domain/document/document-data.model.js +2 -1
- 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 +2 -1
- package/esm2015/lib/shared/domain/search/search-result-view.model.js +2 -1
- package/esm2015/lib/shared/domain/user/user-info.model.js +1 -1
- package/esm2015/lib/shared/domain/workbasket/workbasket-input.model.js +1 -8
- 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/{cdd-page-fields.pipe.js → ccd-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 +9 -18
- 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 +3 -8
- package/esm2015/lib/shared/services/fields/fields.purger.js +15 -15
- package/esm2015/lib/shared/services/fields/fields.utils.js +12 -4
- package/esm2015/lib/shared/services/form/field-type-sanitiser.js +2 -1
- package/esm2015/lib/shared/services/form/form-value.service.js +1 -2
- package/esm2015/lib/shared/services/loading/loading.service.js +2 -7
- package/esm2015/lib/shared/services/search/search.service.js +5 -10
- 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 +783 -824
- 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-data.service.d.ts +3 -5
- package/lib/shared/commons/case-edit-data/case-edit-data.service.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 +2 -0
- 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 +1 -3
- 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-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 +4 -4
- 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/components/linked-cases-table/linked-cases-to-table.component.d.ts +2 -0
- package/lib/shared/components/palette/linked-cases/components/linked-cases-table/linked-cases-to-table.component.d.ts.map +1 -1
- package/lib/shared/components/palette/linked-cases/domain/linked-cases-state.model.d.ts +0 -4
- package/lib/shared/components/palette/linked-cases/domain/linked-cases-state.model.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 +0 -4
- 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/palette.module.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 +1 -2
- 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 +0 -1
- 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/{cdd-page-fields.pipe.d.ts → ccd-page-fields.pipe.d.ts} +1 -1
- package/lib/shared/pipes/complex/ccd-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 +2 -1
- 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 +1 -4
- package/lib/shared/services/loading/loading.service.d.ts.map +1 -1
- package/lib/shared/services/search/search.service.d.ts +0 -2
- 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/cdd-page-fields.pipe.d.ts.map +0 -1
|
@@ -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 (response
|
|
2134
|
+
if ((response === null || response === void 0 ? void 0 : response.status) !== error.status) {
|
|
2135
2135
|
error.status = response.status;
|
|
2136
2136
|
}
|
|
2137
2137
|
return error;
|
|
@@ -2139,12 +2139,11 @@
|
|
|
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
|
+
return {
|
|
2143
2143
|
headers: headers,
|
|
2144
2144
|
withCredentials: true,
|
|
2145
2145
|
observe: 'body',
|
|
2146
2146
|
};
|
|
2147
|
-
return options;
|
|
2148
2147
|
};
|
|
2149
2148
|
ActivityService.prototype.getActivities = function () {
|
|
2150
2149
|
var caseId = [];
|
|
@@ -2153,41 +2152,33 @@
|
|
|
2153
2152
|
}
|
|
2154
2153
|
try {
|
|
2155
2154
|
var options = this.getOptions();
|
|
2156
|
-
var url = this.activityUrl() +
|
|
2155
|
+
var url = this.activityUrl() + "/cases/" + caseId.join(',') + "/activity";
|
|
2157
2156
|
return this.http
|
|
2158
2157
|
.get(url, options, false, ActivityService.handleHttpError)
|
|
2159
2158
|
.pipe(operators.map(function (response) { return response; }));
|
|
2160
2159
|
}
|
|
2161
2160
|
catch (error) {
|
|
2162
|
-
console.log(
|
|
2161
|
+
console.log("user may not be authenticated." + error);
|
|
2163
2162
|
}
|
|
2164
2163
|
};
|
|
2165
2164
|
ActivityService.prototype.postActivity = function (caseId, activity) {
|
|
2166
2165
|
try {
|
|
2167
2166
|
var options = this.getOptions();
|
|
2168
|
-
var url = this.activityUrl() +
|
|
2167
|
+
var url = this.activityUrl() + "/cases/" + caseId + "/activity";
|
|
2169
2168
|
var body = { activity: activity };
|
|
2170
2169
|
return this.http
|
|
2171
2170
|
.post(url, body, options, false)
|
|
2172
2171
|
.pipe(operators.map(function (response) { return response; }));
|
|
2173
2172
|
}
|
|
2174
2173
|
catch (error) {
|
|
2175
|
-
console.log(
|
|
2174
|
+
console.log("user may not be authenticated." + error);
|
|
2176
2175
|
}
|
|
2177
2176
|
};
|
|
2178
2177
|
ActivityService.prototype.verifyUserIsAuthorized = function () {
|
|
2179
2178
|
var _this = this;
|
|
2180
|
-
if (this.sessionStorageService.getItem('userDetails') === undefined) {
|
|
2181
|
-
return;
|
|
2182
|
-
}
|
|
2183
|
-
if (this.activityUrl() && this.userAuthorised === undefined) {
|
|
2179
|
+
if (this.sessionStorageService.getItem('userDetails') && this.activityUrl() && this.userAuthorised === undefined) {
|
|
2184
2180
|
this.getActivities(ActivityService.DUMMY_CASE_REFERENCE).subscribe(function () { return _this.userAuthorised = true; }, function (error) {
|
|
2185
|
-
|
|
2186
|
-
_this.userAuthorised = false;
|
|
2187
|
-
}
|
|
2188
|
-
else {
|
|
2189
|
-
_this.userAuthorised = true;
|
|
2190
|
-
}
|
|
2181
|
+
_this.userAuthorised = [401, 403].indexOf(error.status) <= -1;
|
|
2191
2182
|
});
|
|
2192
2183
|
}
|
|
2193
2184
|
};
|
|
@@ -2300,7 +2291,7 @@
|
|
|
2300
2291
|
requests.get(activity.caseId).next(activity);
|
|
2301
2292
|
});
|
|
2302
2293
|
}, function (err) {
|
|
2303
|
-
console.log(
|
|
2294
|
+
console.log("error: " + err);
|
|
2304
2295
|
Array.from(requests.values()).forEach(function (subject) { return subject.error(err); });
|
|
2305
2296
|
}); });
|
|
2306
2297
|
});
|
|
@@ -2440,9 +2431,9 @@
|
|
|
2440
2431
|
};
|
|
2441
2432
|
ActivityComponent.prototype.generateDescription = function (prefix, suffix, namesArray, unknownCount) {
|
|
2442
2433
|
var resultText = prefix;
|
|
2443
|
-
resultText += namesArray.map(function (activityInfo) { return activityInfo.forename +
|
|
2434
|
+
resultText += namesArray.map(function (activityInfo) { return activityInfo.forename + " " + activityInfo.surname; }).join(', ');
|
|
2444
2435
|
if (unknownCount > 0) {
|
|
2445
|
-
resultText += (namesArray.length > 0 ?
|
|
2436
|
+
resultText += (namesArray.length > 0 ? " and " + unknownCount + " other" : unknownCount + " user");
|
|
2446
2437
|
resultText += (unknownCount > 1 ? 's' : '');
|
|
2447
2438
|
}
|
|
2448
2439
|
else {
|
|
@@ -2450,10 +2441,10 @@
|
|
|
2450
2441
|
}
|
|
2451
2442
|
if (suffix.length > 0) {
|
|
2452
2443
|
if (namesArray.length + unknownCount > 1) {
|
|
2453
|
-
resultText +=
|
|
2444
|
+
resultText += " are " + suffix;
|
|
2454
2445
|
}
|
|
2455
2446
|
else {
|
|
2456
|
-
resultText +=
|
|
2447
|
+
resultText += " is " + suffix;
|
|
2457
2448
|
}
|
|
2458
2449
|
}
|
|
2459
2450
|
return resultText;
|
|
@@ -2792,7 +2783,7 @@
|
|
|
2792
2783
|
break;
|
|
2793
2784
|
case 'n':
|
|
2794
2785
|
case 'N':
|
|
2795
|
-
maybePush(result,
|
|
2786
|
+
maybePush(result, "***" + c + "***", inQuote); // No way to support A - millisec of day, n - nano of second, N - nano of Day
|
|
2796
2787
|
break;
|
|
2797
2788
|
case 'V':
|
|
2798
2789
|
case 'O':
|
|
@@ -2926,9 +2917,9 @@
|
|
|
2926
2917
|
resultDate = offsetDate.getDate() + " " + DatePipe.MONTHS[offsetDate.getMonth()] + " " + offsetDate.getFullYear();
|
|
2927
2918
|
if (match[4] && match[5] && match[6] && format !== 'short') {
|
|
2928
2919
|
resultDate += ', ';
|
|
2929
|
-
resultDate += this.getHour(offsetDate.getHours().toString()) +
|
|
2930
|
-
resultDate += this.pad(offsetDate.getMinutes()) +
|
|
2931
|
-
resultDate += this.pad(offsetDate.getSeconds()) +
|
|
2920
|
+
resultDate += this.getHour(offsetDate.getHours().toString()) + ":";
|
|
2921
|
+
resultDate += this.pad(offsetDate.getMinutes()) + ":";
|
|
2922
|
+
resultDate += this.pad(offsetDate.getSeconds()) + " ";
|
|
2932
2923
|
resultDate += (this.toInt(offsetDate.getHours().toString()) >= 12) ? 'PM' : 'AM';
|
|
2933
2924
|
}
|
|
2934
2925
|
}
|
|
@@ -3303,6 +3294,7 @@
|
|
|
3303
3294
|
}], null, null);
|
|
3304
3295
|
})();
|
|
3305
3296
|
|
|
3297
|
+
// tslint:disable:variable-name
|
|
3306
3298
|
var AddressModel = /** @class */ (function () {
|
|
3307
3299
|
function AddressModel() {
|
|
3308
3300
|
this.AddressLine1 = '';
|
|
@@ -3613,6 +3605,7 @@
|
|
|
3613
3605
|
__metadata("design:type", Array)
|
|
3614
3606
|
], CaseEventTrigger.prototype, "wizard_pages", void 0);
|
|
3615
3607
|
|
|
3608
|
+
// tslint:disable:variable-name
|
|
3616
3609
|
var CaseViewEvent = /** @class */ (function () {
|
|
3617
3610
|
function CaseViewEvent() {
|
|
3618
3611
|
}
|
|
@@ -3657,6 +3650,7 @@
|
|
|
3657
3650
|
__metadata("design:type", Array)
|
|
3658
3651
|
], CaseType.prototype, "case_fields", void 0);
|
|
3659
3652
|
|
|
3653
|
+
// tslint:disable:variable-name
|
|
3660
3654
|
var EventCaseField = /** @class */ (function () {
|
|
3661
3655
|
function EventCaseField() {
|
|
3662
3656
|
}
|
|
@@ -3707,6 +3701,7 @@
|
|
|
3707
3701
|
return CasePrintDocument;
|
|
3708
3702
|
}());
|
|
3709
3703
|
|
|
3704
|
+
// tslint:disable:variable-name
|
|
3710
3705
|
var HRef = /** @class */ (function () {
|
|
3711
3706
|
function HRef() {
|
|
3712
3707
|
}
|
|
@@ -3744,25 +3739,25 @@
|
|
|
3744
3739
|
OrganisationConverter.toSimpleAddress = function (organisationModel) {
|
|
3745
3740
|
var simpleAddress = '';
|
|
3746
3741
|
if (organisationModel.addressLine1) {
|
|
3747
|
-
simpleAddress += organisationModel.addressLine1 +
|
|
3742
|
+
simpleAddress += organisationModel.addressLine1 + "<br>";
|
|
3748
3743
|
}
|
|
3749
3744
|
if (organisationModel.addressLine2) {
|
|
3750
|
-
simpleAddress += organisationModel.addressLine2 +
|
|
3745
|
+
simpleAddress += organisationModel.addressLine2 + "<br>";
|
|
3751
3746
|
}
|
|
3752
3747
|
if (organisationModel.addressLine3) {
|
|
3753
|
-
simpleAddress += organisationModel.addressLine3 +
|
|
3748
|
+
simpleAddress += organisationModel.addressLine3 + "<br>";
|
|
3754
3749
|
}
|
|
3755
3750
|
if (organisationModel.townCity) {
|
|
3756
|
-
simpleAddress += organisationModel.townCity +
|
|
3751
|
+
simpleAddress += organisationModel.townCity + "<br>";
|
|
3757
3752
|
}
|
|
3758
3753
|
if (organisationModel.county) {
|
|
3759
|
-
simpleAddress += organisationModel.county +
|
|
3754
|
+
simpleAddress += organisationModel.county + "<br>";
|
|
3760
3755
|
}
|
|
3761
3756
|
if (organisationModel.country) {
|
|
3762
|
-
simpleAddress += organisationModel.country +
|
|
3757
|
+
simpleAddress += organisationModel.country + "<br>";
|
|
3763
3758
|
}
|
|
3764
3759
|
if (organisationModel.postCode) {
|
|
3765
|
-
simpleAddress += organisationModel.postCode +
|
|
3760
|
+
simpleAddress += organisationModel.postCode + "<br>";
|
|
3766
3761
|
}
|
|
3767
3762
|
return simpleAddress;
|
|
3768
3763
|
};
|
|
@@ -3875,12 +3870,14 @@
|
|
|
3875
3870
|
__metadata("design:type", Array)
|
|
3876
3871
|
], SearchResultView.prototype, "results", void 0);
|
|
3877
3872
|
|
|
3873
|
+
// tslint:disable:variable-name
|
|
3878
3874
|
var CaseDetails = /** @class */ (function () {
|
|
3879
3875
|
function CaseDetails() {
|
|
3880
3876
|
}
|
|
3881
3877
|
return CaseDetails;
|
|
3882
3878
|
}());
|
|
3883
3879
|
|
|
3880
|
+
// tslint:disable:variable-name
|
|
3884
3881
|
var CaseEventData = /** @class */ (function () {
|
|
3885
3882
|
function CaseEventData() {
|
|
3886
3883
|
}
|
|
@@ -3888,12 +3885,7 @@
|
|
|
3888
3885
|
}());
|
|
3889
3886
|
|
|
3890
3887
|
var WorkbasketInputModel = /** @class */ (function () {
|
|
3891
|
-
function WorkbasketInputModel(
|
|
3892
|
-
this.label = label;
|
|
3893
|
-
this.order = order;
|
|
3894
|
-
this.field = field;
|
|
3895
|
-
this.metadata = metadata;
|
|
3896
|
-
this.display_context_parameter = display_context_parameter;
|
|
3888
|
+
function WorkbasketInputModel() {
|
|
3897
3889
|
}
|
|
3898
3890
|
return WorkbasketInputModel;
|
|
3899
3891
|
}());
|
|
@@ -3941,9 +3933,9 @@
|
|
|
3941
3933
|
});
|
|
3942
3934
|
return valueMap;
|
|
3943
3935
|
};
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
}
|
|
3936
|
+
// public static getType(elem: any): string {
|
|
3937
|
+
// return Object.prototype.toString.call(elem).slice(8, -1);
|
|
3938
|
+
// }
|
|
3947
3939
|
FieldsUtils.isObject = function (elem) {
|
|
3948
3940
|
return typeof elem === 'object' && elem !== null;
|
|
3949
3941
|
};
|
|
@@ -4144,6 +4136,13 @@
|
|
|
4144
4136
|
}
|
|
4145
4137
|
return caseField.field_type.type === 'ComponentLauncher';
|
|
4146
4138
|
};
|
|
4139
|
+
FieldsUtils.isLinkedCasesCaseField = function (caseField) {
|
|
4140
|
+
return FieldsUtils.isComponentLauncherCaseField(caseField) &&
|
|
4141
|
+
caseField.id === 'LinkedCasesComponentLauncher';
|
|
4142
|
+
};
|
|
4143
|
+
FieldsUtils.containsLinkedCasesCaseField = function (caseFields) {
|
|
4144
|
+
return caseFields === null || caseFields === void 0 ? void 0 : caseFields.some(function (caseField) { return FieldsUtils.isLinkedCasesCaseField(caseField); });
|
|
4145
|
+
};
|
|
4147
4146
|
FieldsUtils.isFlagsFieldType = function (fieldType) {
|
|
4148
4147
|
if (!fieldType) {
|
|
4149
4148
|
return false;
|
|
@@ -4452,6 +4451,7 @@
|
|
|
4452
4451
|
var elements = (result[field.id] || field.value);
|
|
4453
4452
|
if (elements) {
|
|
4454
4453
|
elements.forEach(function (elem) {
|
|
4454
|
+
// tslint:disable-next-line:switch-default
|
|
4455
4455
|
switch (field.field_type.collection_field_type.type) {
|
|
4456
4456
|
case 'MoneyGBP': {
|
|
4457
4457
|
elem.value = FieldsUtils.getMoneyGBP(elem.value);
|
|
@@ -4501,7 +4501,6 @@
|
|
|
4501
4501
|
if (!condition) {
|
|
4502
4502
|
return null;
|
|
4503
4503
|
}
|
|
4504
|
-
;
|
|
4505
4504
|
condition = condition.replace(/CONTAINS/g, ' CONTAINS');
|
|
4506
4505
|
return peg.parse(condition.trim(), {});
|
|
4507
4506
|
};
|
|
@@ -4515,14 +4514,12 @@
|
|
|
4515
4514
|
if (!conditions || conditions.length === 0) {
|
|
4516
4515
|
return true;
|
|
4517
4516
|
}
|
|
4518
|
-
;
|
|
4519
4517
|
var validJoinComparators = ['AND', 'OR'];
|
|
4520
|
-
|
|
4518
|
+
return conditions.reduce(function (accumulator, condition, index) {
|
|
4521
4519
|
var isJoinComparator = function (comparator) { return (typeof comparator === 'string' && validJoinComparators.indexOf(comparator) !== -1); };
|
|
4522
4520
|
if (isJoinComparator(condition)) {
|
|
4523
4521
|
return accumulator;
|
|
4524
4522
|
}
|
|
4525
|
-
;
|
|
4526
4523
|
var currentConditionResult = true;
|
|
4527
4524
|
if (Array.isArray(condition)) {
|
|
4528
4525
|
currentConditionResult = _this.evaluate(fields, condition);
|
|
@@ -4539,9 +4536,9 @@
|
|
|
4539
4536
|
}
|
|
4540
4537
|
return currentConditionResult;
|
|
4541
4538
|
}, true);
|
|
4542
|
-
return result;
|
|
4543
4539
|
};
|
|
4544
4540
|
ConditionParser.evaluateJoin = function (leftResult, comparator, rightResult) {
|
|
4541
|
+
// tslint:disable-next-line:switch-default
|
|
4545
4542
|
switch (comparator) {
|
|
4546
4543
|
case 'OR': return leftResult || rightResult;
|
|
4547
4544
|
case 'AND': return leftResult && rightResult;
|
|
@@ -4631,8 +4628,7 @@
|
|
|
4631
4628
|
}
|
|
4632
4629
|
};
|
|
4633
4630
|
ConditionParser.unquoted = function (str) {
|
|
4634
|
-
|
|
4635
|
-
return res;
|
|
4631
|
+
return str.replace(/^"|"$/g, '');
|
|
4636
4632
|
};
|
|
4637
4633
|
ConditionParser.findValueForComplexCondition = function (fields, head, tail, path) {
|
|
4638
4634
|
if (!fields) {
|
|
@@ -4746,8 +4742,8 @@
|
|
|
4746
4742
|
if (originalCondition.indexOf(condition.fieldReference) > -1) {
|
|
4747
4743
|
if (this.processedList && this.processedList.indexOf(condition.fieldReference) === -1) {
|
|
4748
4744
|
this.processedList.push(condition.fieldReference);
|
|
4749
|
-
var regularExp = new RegExp(
|
|
4750
|
-
return originalCondition.replace(regularExp, pathPrefix +
|
|
4745
|
+
var regularExp = new RegExp("(\\b)" + condition.fieldReference + "(?=[^\"]*(?:\"[^\"]*\"[^\"]*)*$)(\\b)", 'g');
|
|
4746
|
+
return originalCondition.replace(regularExp, pathPrefix + "." + condition.fieldReference);
|
|
4751
4747
|
}
|
|
4752
4748
|
else {
|
|
4753
4749
|
return originalCondition;
|
|
@@ -4826,6 +4822,7 @@
|
|
|
4826
4822
|
}
|
|
4827
4823
|
// Consider what type of field this is.
|
|
4828
4824
|
var ft = caseField.field_type;
|
|
4825
|
+
// tslint:disable-next-line:switch-default
|
|
4829
4826
|
switch (ft.type) {
|
|
4830
4827
|
case 'Collection':
|
|
4831
4828
|
if (ft.collection_field_type.type === 'Complex' && ft.collection_field_type.complex_fields) {
|
|
@@ -5316,14 +5313,14 @@
|
|
|
5316
5313
|
var formFields = form.getRawValue();
|
|
5317
5314
|
var currentPage = wizard.getPage(currentPageId, this.fieldsUtils.buildCanShowPredicate(eventTrigger, form));
|
|
5318
5315
|
currentPage.wizard_page_fields.forEach(function (wpf) {
|
|
5319
|
-
var
|
|
5320
|
-
if (_this.hasShowConditionField(
|
|
5321
|
-
var condition = new ShowCondition(
|
|
5322
|
-
if (_this.isHidden(condition, formFields.data) && !(_this.isReadonly(
|
|
5323
|
-
_this.resetField(form,
|
|
5316
|
+
var caseField = _this.findCaseFieldByWizardPageFieldId(currentPage, wpf);
|
|
5317
|
+
if (_this.hasShowConditionField(caseField, formFields)) {
|
|
5318
|
+
var condition = new ShowCondition(caseField.show_condition);
|
|
5319
|
+
if (_this.isHidden(condition, formFields.data) && !(_this.isReadonly(caseField))) {
|
|
5320
|
+
_this.resetField(form, caseField);
|
|
5324
5321
|
}
|
|
5325
5322
|
}
|
|
5326
|
-
_this.retainHiddenValueByFieldType(
|
|
5323
|
+
_this.retainHiddenValueByFieldType(caseField, form);
|
|
5327
5324
|
});
|
|
5328
5325
|
};
|
|
5329
5326
|
FieldsPurger.prototype.retainHiddenValueByFieldType = function (field, form) {
|
|
@@ -5354,13 +5351,13 @@
|
|
|
5354
5351
|
FieldsPurger.prototype.hasShowConditionPage = function (wizardPage, formFields) {
|
|
5355
5352
|
return wizardPage.show_condition && formFields[this.getShowConditionKey(wizardPage.show_condition)];
|
|
5356
5353
|
};
|
|
5357
|
-
FieldsPurger.prototype.hasShowConditionField = function (
|
|
5358
|
-
return
|
|
5354
|
+
FieldsPurger.prototype.hasShowConditionField = function (caseField, formFields) {
|
|
5355
|
+
return caseField.show_condition && formFields.data[this.getShowConditionKey(caseField.show_condition)];
|
|
5359
5356
|
};
|
|
5360
|
-
FieldsPurger.prototype.getShowConditionKey = function (
|
|
5357
|
+
FieldsPurger.prototype.getShowConditionKey = function (showCondition) {
|
|
5361
5358
|
// Need to allow for negated conditions, i.e. !=, as well as regular ones (=)
|
|
5362
5359
|
// Also need to allow for conditions specified using the "CONTAINS" keyword
|
|
5363
|
-
return
|
|
5360
|
+
return showCondition.split(/!=|=|CONTAINS/)[0];
|
|
5364
5361
|
};
|
|
5365
5362
|
FieldsPurger.prototype.resetField = function (form, field) {
|
|
5366
5363
|
var e_1, _a;
|
|
@@ -5456,8 +5453,8 @@
|
|
|
5456
5453
|
FieldsPurger.prototype.resetPage = function (form, wizardPage) {
|
|
5457
5454
|
var _this = this;
|
|
5458
5455
|
wizardPage.wizard_page_fields.forEach(function (wpf) {
|
|
5459
|
-
var
|
|
5460
|
-
_this.resetField(form,
|
|
5456
|
+
var caseField = _this.findCaseFieldByWizardPageFieldId(wizardPage, wpf);
|
|
5457
|
+
_this.resetField(form, caseField);
|
|
5461
5458
|
});
|
|
5462
5459
|
};
|
|
5463
5460
|
FieldsPurger.prototype.getType = function (elem) {
|
|
@@ -5467,8 +5464,8 @@
|
|
|
5467
5464
|
return this.getType(elem) === 'Object';
|
|
5468
5465
|
};
|
|
5469
5466
|
// TODO: call isReadOnly on CaseFields once we make it available
|
|
5470
|
-
FieldsPurger.prototype.isReadonly = function (
|
|
5471
|
-
return
|
|
5467
|
+
FieldsPurger.prototype.isReadonly = function (caseField) {
|
|
5468
|
+
return caseField.display_context.toUpperCase() === 'READONLY';
|
|
5472
5469
|
};
|
|
5473
5470
|
/**
|
|
5474
5471
|
* Deletes a field value by setting the value of the corresponding {@link FormControl} to null (or an empty array
|
|
@@ -5655,6 +5652,7 @@
|
|
|
5655
5652
|
return;
|
|
5656
5653
|
}
|
|
5657
5654
|
caseFields.forEach(function (caseField) {
|
|
5655
|
+
// tslint:disable-next-line:switch-default
|
|
5658
5656
|
switch (caseField.field_type.type) {
|
|
5659
5657
|
case FieldTypeSanitiser.FIELD_TYPE_DYNAMIC_MULTISELECT_LIST:
|
|
5660
5658
|
_this.convertArrayToDynamicListOutput(caseField, data);
|
|
@@ -6363,7 +6361,6 @@
|
|
|
6363
6361
|
});
|
|
6364
6362
|
}
|
|
6365
6363
|
}
|
|
6366
|
-
;
|
|
6367
6364
|
});
|
|
6368
6365
|
}
|
|
6369
6366
|
};
|
|
@@ -6802,7 +6799,7 @@
|
|
|
6802
6799
|
return addressModel;
|
|
6803
6800
|
};
|
|
6804
6801
|
AddressParser.prototype.parseAddressLine1 = function (classification, address) {
|
|
6805
|
-
var addressLine
|
|
6802
|
+
var addressLine;
|
|
6806
6803
|
if (classification === AddressType.RD06) {
|
|
6807
6804
|
addressLine =
|
|
6808
6805
|
address.SUB_BUILDING_NAME + " " + address.ORGANISATION_NAME + " " + address.DEPARTMENT_NAME + " " + address.PO_BOX_NUMBER;
|
|
@@ -6815,7 +6812,7 @@
|
|
|
6815
6812
|
return this.removeNonAddressValues(addressLine);
|
|
6816
6813
|
};
|
|
6817
6814
|
AddressParser.prototype.parseAddressLine2 = function (classification, address) {
|
|
6818
|
-
var addressLine
|
|
6815
|
+
var addressLine;
|
|
6819
6816
|
if (classification === AddressType.RD06) {
|
|
6820
6817
|
addressLine = address.BUILDING_NAME + " ";
|
|
6821
6818
|
}
|
|
@@ -6826,7 +6823,7 @@
|
|
|
6826
6823
|
return this.removeNonAddressValues(addressLine);
|
|
6827
6824
|
};
|
|
6828
6825
|
AddressParser.prototype.parseAddressLine3 = function (classification, address) {
|
|
6829
|
-
var addressLine
|
|
6826
|
+
var addressLine;
|
|
6830
6827
|
if (classification === AddressType.RD06) {
|
|
6831
6828
|
addressLine =
|
|
6832
6829
|
address.BUILDING_NUMBER + " " + address.THOROUGHFARE_NAME;
|
|
@@ -6854,7 +6851,7 @@
|
|
|
6854
6851
|
return value.replace(new RegExp('^,', 'gi'), '');
|
|
6855
6852
|
};
|
|
6856
6853
|
AddressParser.prototype.prefixWithCommaIfPresent = function (value) {
|
|
6857
|
-
return value ?
|
|
6854
|
+
return value ? ", " + value : value;
|
|
6858
6855
|
};
|
|
6859
6856
|
return AddressParser;
|
|
6860
6857
|
}());
|
|
@@ -7104,7 +7101,7 @@
|
|
|
7104
7101
|
if (flagType) {
|
|
7105
7102
|
url += "?flag-type=" + flagType;
|
|
7106
7103
|
}
|
|
7107
|
-
if (welshRequired
|
|
7104
|
+
if (typeof welshRequired === 'boolean') {
|
|
7108
7105
|
// Check if flag-type has been added to the query string; if so, append welsh-required with '&'
|
|
7109
7106
|
url.indexOf('?') > -1 ? url += '&' : url += '?';
|
|
7110
7107
|
welshRequired ? url += 'welsh-required=Y' : url += 'welsh-required=N';
|
|
@@ -7710,18 +7707,6 @@
|
|
|
7710
7707
|
}], null, null);
|
|
7711
7708
|
})();
|
|
7712
7709
|
|
|
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
|
-
}());
|
|
7725
7710
|
var LoadingService = /** @class */ (function () {
|
|
7726
7711
|
function LoadingService() {
|
|
7727
7712
|
this.registered = new Map();
|
|
@@ -7746,7 +7731,7 @@
|
|
|
7746
7731
|
};
|
|
7747
7732
|
LoadingService.prototype.generateToken = function () {
|
|
7748
7733
|
var timestamp = window.performance.now();
|
|
7749
|
-
return
|
|
7734
|
+
return "toolkit-loading-" + timestamp; // format: [source-library]-[unique incrementing number]
|
|
7750
7735
|
};
|
|
7751
7736
|
return LoadingService;
|
|
7752
7737
|
}());
|
|
@@ -7767,10 +7752,7 @@
|
|
|
7767
7752
|
}
|
|
7768
7753
|
SearchService.prototype.search = function (jurisdictionId, caseTypeId, metaCriteria, caseCriteria, view) {
|
|
7769
7754
|
var _this = this;
|
|
7770
|
-
var url = this.appConfig.getApiUrl() + "/caseworkers/:uid"
|
|
7771
|
-
+ ("/jurisdictions/" + jurisdictionId)
|
|
7772
|
-
+ ("/case-types/" + caseTypeId)
|
|
7773
|
-
+ "/cases";
|
|
7755
|
+
var url = this.appConfig.getApiUrl() + "/caseworkers/:uid/jurisdictions/" + jurisdictionId + "/case-types/" + caseTypeId + "/cases";
|
|
7774
7756
|
var options = this.requestOptionsBuilder.buildOptions(metaCriteria, caseCriteria, view);
|
|
7775
7757
|
var loadingToken = this.loadingService.register();
|
|
7776
7758
|
return this.httpService
|
|
@@ -7779,15 +7761,14 @@
|
|
|
7779
7761
|
};
|
|
7780
7762
|
SearchService.prototype.searchCasesByIds = function (caseTypeId, filter, view, sort) {
|
|
7781
7763
|
var _this = this;
|
|
7782
|
-
var url = this.appConfig.getCaseDataUrl() +
|
|
7783
|
-
("/internal/searchCases?ctid=" + caseTypeId + "&use_case=" + view);
|
|
7764
|
+
var url = this.appConfig.getCaseDataUrl() + "/internal/searchCases?ctid=" + caseTypeId + "&use_case=" + view;
|
|
7784
7765
|
var body = Object.assign(Object.assign({ sort: sort }, filter), { size: this.appConfig.getPaginationPageSize() });
|
|
7785
7766
|
var loadingToken = this.loadingService.register();
|
|
7786
7767
|
return this.httpService.post(url, body).pipe(operators.map(function (response) { return response; }), operators.finalize(function () { return _this.loadingService.unregister(loadingToken); }));
|
|
7787
7768
|
};
|
|
7788
7769
|
SearchService.prototype.searchCases = function (caseTypeId, metaCriteria, caseCriteria, view, sort) {
|
|
7789
7770
|
var _this = this;
|
|
7790
|
-
var url = this.appConfig.getCaseDataUrl() +
|
|
7771
|
+
var url = this.appConfig.getCaseDataUrl() + "/internal/searchCases?ctid=" + caseTypeId + "&use_case=" + view;
|
|
7791
7772
|
var options = this.requestOptionsBuilder.buildOptions(metaCriteria, caseCriteria, view);
|
|
7792
7773
|
var body = {
|
|
7793
7774
|
sort: sort,
|
|
@@ -7832,9 +7813,8 @@
|
|
|
7832
7813
|
return SearchService;
|
|
7833
7814
|
}());
|
|
7834
7815
|
SearchService.V2_MEDIATYPE_SEARCH_INPUTS = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-search-input-details.v2+json;charset=UTF-8';
|
|
7835
|
-
|
|
7816
|
+
// public static readonly VIEW_SEARCH = 'SEARCH';
|
|
7836
7817
|
SearchService.VIEW_WORKBASKET = 'WORKBASKET';
|
|
7837
|
-
SearchService.FIELD_PREFIX = 'case.';
|
|
7838
7818
|
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)); };
|
|
7839
7819
|
SearchService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: SearchService, factory: SearchService.ɵfac });
|
|
7840
7820
|
(function () {
|
|
@@ -7964,17 +7944,12 @@
|
|
|
7964
7944
|
this.appConfig = appConfig;
|
|
7965
7945
|
}
|
|
7966
7946
|
DefinitionsService.prototype.getCaseTypes = function (jurisdictionId, access) {
|
|
7967
|
-
var url = this.appConfig.getApiUrl()
|
|
7968
|
-
+ "/caseworkers/:uid"
|
|
7969
|
-
+ ("/jurisdictions/" + jurisdictionId)
|
|
7970
|
-
+ ("/case-types?access=" + access);
|
|
7947
|
+
var url = this.appConfig.getApiUrl() + "/caseworkers/:uid/jurisdictions/" + jurisdictionId + "/case-types?access=" + access;
|
|
7971
7948
|
return this.http
|
|
7972
7949
|
.get(url).pipe(operators.map(function (response) { return response; }));
|
|
7973
7950
|
};
|
|
7974
7951
|
DefinitionsService.prototype.getJurisdictions = function (access) {
|
|
7975
|
-
var url = this.appConfig.getApiUrl()
|
|
7976
|
-
+ "/caseworkers/:uid"
|
|
7977
|
-
+ ("/jurisdictions?access=" + access);
|
|
7952
|
+
var url = this.appConfig.getApiUrl() + "/caseworkers/:uid/jurisdictions?access=" + access;
|
|
7978
7953
|
return this.http
|
|
7979
7954
|
.get(url)
|
|
7980
7955
|
.pipe(operators.map(function (response) { return response; }));
|
|
@@ -8056,8 +8031,8 @@
|
|
|
8056
8031
|
compare: function (a, b) {
|
|
8057
8032
|
var fieldA = a.case_fields[fieldId];
|
|
8058
8033
|
var fieldB = b.case_fields[fieldId];
|
|
8059
|
-
fieldA = util.isUndefined(fieldA) || fieldA
|
|
8060
|
-
fieldB = util.isUndefined(fieldB) || fieldB
|
|
8034
|
+
fieldA = util.isUndefined(fieldA) || fieldA === null ? '' : fieldA.toLowerCase();
|
|
8035
|
+
fieldB = util.isUndefined(fieldB) || fieldB === null ? '' : fieldB.toLowerCase();
|
|
8061
8036
|
return fieldA === fieldB ? 0 : fieldA > fieldB ? 1 : -1;
|
|
8062
8037
|
}
|
|
8063
8038
|
};
|
|
@@ -8067,8 +8042,8 @@
|
|
|
8067
8042
|
compare: function (a, b) {
|
|
8068
8043
|
var fieldA = a.case_fields[fieldId];
|
|
8069
8044
|
var fieldB = b.case_fields[fieldId];
|
|
8070
|
-
fieldA = util.isUndefined(fieldA) || fieldA
|
|
8071
|
-
fieldB = util.isUndefined(fieldB) || fieldB
|
|
8045
|
+
fieldA = util.isUndefined(fieldA) || fieldA === null ? '' : fieldA.join().toLowerCase();
|
|
8046
|
+
fieldB = util.isUndefined(fieldB) || fieldB === null ? '' : fieldB.join().toLowerCase();
|
|
8072
8047
|
return fieldA === fieldB ? 0 : fieldA > fieldB ? 1 : -1;
|
|
8073
8048
|
}
|
|
8074
8049
|
};
|
|
@@ -8326,31 +8301,31 @@
|
|
|
8326
8301
|
};
|
|
8327
8302
|
WizardPageFieldToCaseFieldMapper.prototype.processComplexFieldOverride = function (override, caseField, caseFields) {
|
|
8328
8303
|
var caseFieldIds = override.complex_field_element_id.split('.');
|
|
8329
|
-
var
|
|
8304
|
+
var caseFieldLeaf;
|
|
8330
8305
|
var children = this.getCaseFieldChildren(caseField);
|
|
8331
8306
|
if (children.length > 0) {
|
|
8332
8307
|
var _a = __read(caseFieldIds), _ = _a[0], tail = _a.slice(1);
|
|
8333
|
-
|
|
8308
|
+
caseFieldLeaf = this.getCaseFieldLeaf(tail, children);
|
|
8334
8309
|
}
|
|
8335
8310
|
else {
|
|
8336
|
-
|
|
8311
|
+
caseFieldLeaf = this.getCaseFieldLeaf(caseFieldIds, caseFields);
|
|
8337
8312
|
}
|
|
8338
8313
|
if (override.display_context !== 'HIDDEN') {
|
|
8339
|
-
|
|
8340
|
-
|
|
8314
|
+
caseFieldLeaf.hidden = false;
|
|
8315
|
+
caseFieldLeaf.display_context = override.display_context;
|
|
8341
8316
|
if (override.label && override.label.length > 0) {
|
|
8342
|
-
|
|
8317
|
+
caseFieldLeaf.label = override.label;
|
|
8343
8318
|
}
|
|
8344
8319
|
if (override.hint_text && override.hint_text.length > 0) {
|
|
8345
|
-
|
|
8320
|
+
caseFieldLeaf.hint_text = override.hint_text;
|
|
8346
8321
|
}
|
|
8347
8322
|
if (override.show_condition && override.show_condition.length > 0) {
|
|
8348
|
-
|
|
8323
|
+
caseFieldLeaf.show_condition = override.show_condition;
|
|
8349
8324
|
}
|
|
8350
8325
|
}
|
|
8351
8326
|
else {
|
|
8352
|
-
|
|
8353
|
-
|
|
8327
|
+
caseFieldLeaf.hidden = true;
|
|
8328
|
+
caseFieldLeaf.display_context = override.display_context;
|
|
8354
8329
|
}
|
|
8355
8330
|
};
|
|
8356
8331
|
WizardPageFieldToCaseFieldMapper.prototype.fixShowConditionPath = function (caseField, pathPrefix) {
|
|
@@ -8364,7 +8339,7 @@
|
|
|
8364
8339
|
});
|
|
8365
8340
|
};
|
|
8366
8341
|
WizardPageFieldToCaseFieldMapper.prototype.preparePathPrefix = function (pathPrefix, caseField) {
|
|
8367
|
-
return pathPrefix.length === 0 ? caseField : pathPrefix +
|
|
8342
|
+
return pathPrefix.length === 0 ? caseField : pathPrefix + "." + caseField;
|
|
8368
8343
|
};
|
|
8369
8344
|
WizardPageFieldToCaseFieldMapper.prototype.getCaseFieldLeaf = function (caseFieldId, caseFields) {
|
|
8370
8345
|
var _a = __read(caseFieldId), head = _a[0], tail = _a.slice(1);
|
|
@@ -8421,223 +8396,13 @@
|
|
|
8421
8396
|
}], null, null);
|
|
8422
8397
|
})();
|
|
8423
8398
|
|
|
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
|
-
|
|
8633
8399
|
var CasesService = /** @class */ (function () {
|
|
8634
|
-
function CasesService(http, appConfig, orderService, errorService, wizardPageFieldToCaseFieldMapper,
|
|
8400
|
+
function CasesService(http, appConfig, orderService, errorService, wizardPageFieldToCaseFieldMapper, loadingService, sessionStorageService) {
|
|
8635
8401
|
this.http = http;
|
|
8636
8402
|
this.appConfig = appConfig;
|
|
8637
8403
|
this.orderService = orderService;
|
|
8638
8404
|
this.errorService = errorService;
|
|
8639
8405
|
this.wizardPageFieldToCaseFieldMapper = wizardPageFieldToCaseFieldMapper;
|
|
8640
|
-
this.workAllocationService = workAllocationService;
|
|
8641
8406
|
this.loadingService = loadingService;
|
|
8642
8407
|
this.sessionStorageService = sessionStorageService;
|
|
8643
8408
|
this.get = this.getCaseView;
|
|
@@ -8656,11 +8421,7 @@
|
|
|
8656
8421
|
};
|
|
8657
8422
|
CasesService.prototype.getCaseView = function (jurisdictionId, caseTypeId, caseId) {
|
|
8658
8423
|
var _this = this;
|
|
8659
|
-
var url = this.appConfig.getApiUrl()
|
|
8660
|
-
+ "/caseworkers/:uid"
|
|
8661
|
-
+ ("/jurisdictions/" + jurisdictionId)
|
|
8662
|
-
+ ("/case-types/" + caseTypeId)
|
|
8663
|
-
+ ("/cases/" + caseId);
|
|
8424
|
+
var url = this.appConfig.getApiUrl() + "/caseworkers/:uid/jurisdictions/" + jurisdictionId + "/case-types/" + caseTypeId + "/cases/" + caseId;
|
|
8664
8425
|
var loadingToken = this.loadingService.register();
|
|
8665
8426
|
return this.http
|
|
8666
8427
|
.get(url)
|
|
@@ -8712,7 +8473,7 @@
|
|
|
8712
8473
|
CasesService.prototype.createEvent = function (caseDetails, eventData) {
|
|
8713
8474
|
var _this = this;
|
|
8714
8475
|
var caseId = caseDetails.case_id;
|
|
8715
|
-
var url = this.appConfig.getCaseDataUrl() +
|
|
8476
|
+
var url = this.appConfig.getCaseDataUrl() + "/cases/" + caseId + "/events";
|
|
8716
8477
|
var headers = new i1$2.HttpHeaders()
|
|
8717
8478
|
.set('experimental', 'true')
|
|
8718
8479
|
.set('Accept', CasesService.V2_MEDIATYPE_CREATE_EVENT)
|
|
@@ -8726,9 +8487,8 @@
|
|
|
8726
8487
|
};
|
|
8727
8488
|
CasesService.prototype.validateCase = function (ctid, eventData, pageId) {
|
|
8728
8489
|
var _this = this;
|
|
8729
|
-
var pageIdString = pageId ?
|
|
8730
|
-
var url = this.appConfig.getCaseDataUrl()
|
|
8731
|
-
+ ("/case-types/" + ctid + "/validate" + pageIdString);
|
|
8490
|
+
var pageIdString = pageId ? "?pageId=" + pageId : '';
|
|
8491
|
+
var url = this.appConfig.getCaseDataUrl() + "/case-types/" + ctid + "/validate" + pageIdString;
|
|
8732
8492
|
var headers = new i1$2.HttpHeaders()
|
|
8733
8493
|
.set('experimental', 'true')
|
|
8734
8494
|
.set('Accept', CasesService.V2_MEDIATYPE_CASE_DATA_VALIDATE)
|
|
@@ -8746,8 +8506,7 @@
|
|
|
8746
8506
|
if (eventData.ignore_warning) {
|
|
8747
8507
|
ignoreWarning = 'true';
|
|
8748
8508
|
}
|
|
8749
|
-
var url = this.appConfig.getCaseDataUrl()
|
|
8750
|
-
+ ("/case-types/" + ctid + "/cases?ignore-warning=" + ignoreWarning);
|
|
8509
|
+
var url = this.appConfig.getCaseDataUrl() + "/case-types/" + ctid + "/cases?ignore-warning=" + ignoreWarning;
|
|
8751
8510
|
var headers = new i1$2.HttpHeaders()
|
|
8752
8511
|
.set('experimental', 'true')
|
|
8753
8512
|
.set('Accept', CasesService.V2_MEDIATYPE_CREATE_CASE)
|
|
@@ -8761,9 +8520,7 @@
|
|
|
8761
8520
|
};
|
|
8762
8521
|
CasesService.prototype.getPrintDocuments = function (caseId) {
|
|
8763
8522
|
var _this = this;
|
|
8764
|
-
var url = this.appConfig.getCaseDataUrl()
|
|
8765
|
-
+ ("/cases/" + caseId)
|
|
8766
|
-
+ "/documents";
|
|
8523
|
+
var url = this.appConfig.getCaseDataUrl() + "/cases/" + caseId + "/documents";
|
|
8767
8524
|
var headers = new i1$2.HttpHeaders()
|
|
8768
8525
|
.set('experimental', 'true')
|
|
8769
8526
|
.set('Accept', CasesService.V2_MEDIATYPE_CASE_DOCUMENTS)
|
|
@@ -8872,12 +8629,12 @@
|
|
|
8872
8629
|
CasesService.V2_MEDIATYPE_CREATE_EVENT = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.create-event.v2+json;charset=UTF-8';
|
|
8873
8630
|
CasesService.V2_MEDIATYPE_CREATE_CASE = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.create-case.v2+json;charset=UTF-8';
|
|
8874
8631
|
CasesService.PUI_CASE_MANAGER = 'pui-case-manager';
|
|
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(
|
|
8632
|
+
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)); };
|
|
8876
8633
|
CasesService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: CasesService, factory: CasesService.ɵfac });
|
|
8877
8634
|
(function () {
|
|
8878
8635
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(CasesService, [{
|
|
8879
8636
|
type: i0.Injectable
|
|
8880
|
-
}], function () { return [{ type: HttpService }, { type: AbstractAppConfig }, { type: OrderService }, { type: HttpErrorService }, { type: WizardPageFieldToCaseFieldMapper }, { type:
|
|
8637
|
+
}], function () { return [{ type: HttpService }, { type: AbstractAppConfig }, { type: OrderService }, { type: HttpErrorService }, { type: WizardPageFieldToCaseFieldMapper }, { type: LoadingService }, { type: SessionStorageService }]; }, null);
|
|
8881
8638
|
})();
|
|
8882
8639
|
|
|
8883
8640
|
var EventTriggerService = /** @class */ (function () {
|
|
@@ -9499,7 +9256,7 @@
|
|
|
9499
9256
|
PageValidationService.prototype.isHidden = function (caseField, editForm, path) {
|
|
9500
9257
|
var formFields = editForm.getRawValue();
|
|
9501
9258
|
var condition = ShowCondition.getInstance(caseField.show_condition);
|
|
9502
|
-
if (path && path.indexOf(
|
|
9259
|
+
if (path && path.indexOf("_" + caseField.id + "_") === -1) {
|
|
9503
9260
|
path = "" + path + caseField.id;
|
|
9504
9261
|
}
|
|
9505
9262
|
return !condition.match(formFields.data, path);
|
|
@@ -9531,6 +9288,215 @@
|
|
|
9531
9288
|
}], function () { return [{ type: CaseFieldService }]; }, null);
|
|
9532
9289
|
})();
|
|
9533
9290
|
|
|
9291
|
+
var MULTIPLE_TASKS_FOUND = 'More than one task found!';
|
|
9292
|
+
var WorkAllocationService = /** @class */ (function () {
|
|
9293
|
+
function WorkAllocationService(http, appConfig, errorService, alertService, sessionStorageService) {
|
|
9294
|
+
this.http = http;
|
|
9295
|
+
this.appConfig = appConfig;
|
|
9296
|
+
this.errorService = errorService;
|
|
9297
|
+
this.alertService = alertService;
|
|
9298
|
+
this.sessionStorageService = sessionStorageService;
|
|
9299
|
+
// Check to see if work allocation is enabled
|
|
9300
|
+
}
|
|
9301
|
+
/**
|
|
9302
|
+
* Call the API to get tasks matching the search criteria.
|
|
9303
|
+
* @param searchRequest The search parameters that specify which tasks to match.
|
|
9304
|
+
*/
|
|
9305
|
+
WorkAllocationService.prototype.searchTasks = function (searchRequest) {
|
|
9306
|
+
var _this = this;
|
|
9307
|
+
// Do not need to check if WA enabled as parent method will do that
|
|
9308
|
+
var url = this.appConfig.getWorkAllocationApiUrl() + "/searchForCompletable";
|
|
9309
|
+
return this.http
|
|
9310
|
+
.post(url, { searchRequest: searchRequest }, null, false)
|
|
9311
|
+
.pipe(operators.map(function (response) { return response; }), operators.catchError(function (error) {
|
|
9312
|
+
_this.errorService.setError(error);
|
|
9313
|
+
// explicitly eat away 401 error and 400 error
|
|
9314
|
+
if (error && error.status && (error.status === 401 || error.status === 400)) {
|
|
9315
|
+
// do nothing
|
|
9316
|
+
console.log('error status 401 or 400', error);
|
|
9317
|
+
}
|
|
9318
|
+
else {
|
|
9319
|
+
return rxjs.throwError(error);
|
|
9320
|
+
}
|
|
9321
|
+
}));
|
|
9322
|
+
};
|
|
9323
|
+
WorkAllocationService.prototype.isWAEnabled = function (jurisdiction, caseType) {
|
|
9324
|
+
this.features = this.appConfig.getWAServiceConfig();
|
|
9325
|
+
var enabled = false;
|
|
9326
|
+
if (!jurisdiction || !caseType) {
|
|
9327
|
+
var caseInfo = JSON.parse(this.sessionStorageService.getItem('caseInfo'));
|
|
9328
|
+
jurisdiction = caseInfo.jurisdiction;
|
|
9329
|
+
caseType = caseInfo.caseType;
|
|
9330
|
+
}
|
|
9331
|
+
if (!this.features || !this.features.configurations) {
|
|
9332
|
+
return false;
|
|
9333
|
+
}
|
|
9334
|
+
this.features.configurations.forEach(function (serviceConfig) {
|
|
9335
|
+
if (serviceConfig.serviceName === jurisdiction && (serviceConfig.caseTypes.indexOf(caseType) !== -1)) {
|
|
9336
|
+
enabled = true;
|
|
9337
|
+
}
|
|
9338
|
+
});
|
|
9339
|
+
return enabled;
|
|
9340
|
+
};
|
|
9341
|
+
/**
|
|
9342
|
+
* Call the API to assign a task.
|
|
9343
|
+
* @param taskId specifies which task should be assigned.
|
|
9344
|
+
* @param userId specifies the user the task should be assigned to.
|
|
9345
|
+
*/
|
|
9346
|
+
WorkAllocationService.prototype.assignTask = function (taskId, userId) {
|
|
9347
|
+
var _this = this;
|
|
9348
|
+
if (!this.isWAEnabled()) {
|
|
9349
|
+
return rxjs.of(null);
|
|
9350
|
+
}
|
|
9351
|
+
var url = this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId + "/assign";
|
|
9352
|
+
return this.http
|
|
9353
|
+
.post(url, { userId: userId })
|
|
9354
|
+
.pipe(operators.catchError(function (error) {
|
|
9355
|
+
_this.errorService.setError(error);
|
|
9356
|
+
return rxjs.throwError(error);
|
|
9357
|
+
}));
|
|
9358
|
+
};
|
|
9359
|
+
/**
|
|
9360
|
+
* Call the API to complete a task.
|
|
9361
|
+
* @param taskId specifies which task should be completed.
|
|
9362
|
+
*/
|
|
9363
|
+
WorkAllocationService.prototype.completeTask = function (taskId) {
|
|
9364
|
+
var _this = this;
|
|
9365
|
+
if (!this.isWAEnabled()) {
|
|
9366
|
+
return rxjs.of(null);
|
|
9367
|
+
}
|
|
9368
|
+
var url = this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId + "/complete";
|
|
9369
|
+
return this.http
|
|
9370
|
+
.post(url, {})
|
|
9371
|
+
.pipe(operators.catchError(function (error) {
|
|
9372
|
+
_this.errorService.setError(error);
|
|
9373
|
+
// this will subscribe to get the user details and decide whether to display an error message
|
|
9374
|
+
_this.http.get(_this.appConfig.getUserInfoApiUrl()).pipe(operators.map(function (response) { return response; })).subscribe(function (response) {
|
|
9375
|
+
_this.handleTaskCompletionError(response);
|
|
9376
|
+
});
|
|
9377
|
+
return rxjs.throwError(error);
|
|
9378
|
+
}));
|
|
9379
|
+
};
|
|
9380
|
+
/**
|
|
9381
|
+
* Call the API to assign and complete a task.
|
|
9382
|
+
* @param taskId specifies which task should be completed.
|
|
9383
|
+
*/
|
|
9384
|
+
WorkAllocationService.prototype.assignAndCompleteTask = function (taskId) {
|
|
9385
|
+
var _this = this;
|
|
9386
|
+
if (!this.isWAEnabled()) {
|
|
9387
|
+
return rxjs.of(null);
|
|
9388
|
+
}
|
|
9389
|
+
var url = this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId + "/complete";
|
|
9390
|
+
return this.http
|
|
9391
|
+
.post(url, {
|
|
9392
|
+
completion_options: {
|
|
9393
|
+
assign_and_complete: true
|
|
9394
|
+
}
|
|
9395
|
+
})
|
|
9396
|
+
.pipe(operators.catchError(function (error) {
|
|
9397
|
+
_this.errorService.setError(error);
|
|
9398
|
+
// this will subscribe to get the user details and decide whether to display an error message
|
|
9399
|
+
_this.http.get(_this.appConfig.getUserInfoApiUrl()).pipe(operators.map(function (response) { return response; })).subscribe(function (response) {
|
|
9400
|
+
_this.handleTaskCompletionError(response);
|
|
9401
|
+
});
|
|
9402
|
+
return rxjs.throwError(error);
|
|
9403
|
+
}));
|
|
9404
|
+
};
|
|
9405
|
+
/**
|
|
9406
|
+
* Handles the response from the observable to get the user details when task is completed.
|
|
9407
|
+
* @param response is the response given from the observable which contains the user detaild.
|
|
9408
|
+
*/
|
|
9409
|
+
WorkAllocationService.prototype.handleTaskCompletionError = function (response) {
|
|
9410
|
+
var userDetails = response;
|
|
9411
|
+
if (this.userIsCaseworker(userDetails.userInfo.roles)) {
|
|
9412
|
+
// when submitting the completion of task if not yet rendered cases/case confirm then preserve the alert for re-rendering
|
|
9413
|
+
this.alertService.setPreserveAlerts(true, ['cases/case', 'submit']);
|
|
9414
|
+
this.alertService.warning('A task could not be completed successfully. Please complete the task associated with the case manually.');
|
|
9415
|
+
}
|
|
9416
|
+
};
|
|
9417
|
+
/**
|
|
9418
|
+
* Returns true if the user's role is equivalent to a caseworker.
|
|
9419
|
+
* @param roles is the list of roles found from the current user.
|
|
9420
|
+
*/
|
|
9421
|
+
WorkAllocationService.prototype.userIsCaseworker = function (roles) {
|
|
9422
|
+
var lowerCaseRoles = roles.map(function (role) { return role.toLowerCase(); });
|
|
9423
|
+
// When/if lib & target permanently change to es2016, replace indexOf with includes
|
|
9424
|
+
return (lowerCaseRoles.indexOf(WorkAllocationService.iACCaseOfficer) !== -1)
|
|
9425
|
+
|| (lowerCaseRoles.indexOf(WorkAllocationService.iACAdmOfficer) !== -1);
|
|
9426
|
+
};
|
|
9427
|
+
/**
|
|
9428
|
+
* Look for open tasks for a case and event combination. There are 5 possible scenarios:
|
|
9429
|
+
* 1. No tasks found => Success.
|
|
9430
|
+
* 2. One task found => Mark as done => Success.
|
|
9431
|
+
* 3. One task found => Mark as done throws error => Failure.
|
|
9432
|
+
* 4. More than one task found => Failure.
|
|
9433
|
+
* 5. Search call throws an error => Failure.
|
|
9434
|
+
* @param ccdId The ID of the case to find tasks for.
|
|
9435
|
+
* @param eventId The ID of the event to find tasks for.
|
|
9436
|
+
*/
|
|
9437
|
+
WorkAllocationService.prototype.completeAppropriateTask = function (ccdId, eventId, jurisdiction, caseTypeId) {
|
|
9438
|
+
var _this = this;
|
|
9439
|
+
if (!this.isWAEnabled(jurisdiction, caseTypeId)) {
|
|
9440
|
+
return rxjs.of(null);
|
|
9441
|
+
}
|
|
9442
|
+
var taskSearchParameter = {
|
|
9443
|
+
ccdId: ccdId,
|
|
9444
|
+
eventId: eventId,
|
|
9445
|
+
jurisdiction: jurisdiction,
|
|
9446
|
+
caseTypeId: caseTypeId
|
|
9447
|
+
};
|
|
9448
|
+
return this.searchTasks(taskSearchParameter)
|
|
9449
|
+
.pipe(operators.map(function (response) {
|
|
9450
|
+
var tasks = response.tasks;
|
|
9451
|
+
if (tasks && tasks.length > 0) {
|
|
9452
|
+
if (tasks.length === 1) {
|
|
9453
|
+
_this.completeTask(tasks[0].id).subscribe();
|
|
9454
|
+
}
|
|
9455
|
+
else {
|
|
9456
|
+
// This is a problem. Throw an appropriate error.
|
|
9457
|
+
throw new Error(MULTIPLE_TASKS_FOUND);
|
|
9458
|
+
}
|
|
9459
|
+
}
|
|
9460
|
+
return true; // All good. Nothing to see here.
|
|
9461
|
+
}), operators.catchError(function (error) {
|
|
9462
|
+
// Simply rethrow it.
|
|
9463
|
+
return rxjs.throwError(error);
|
|
9464
|
+
}));
|
|
9465
|
+
};
|
|
9466
|
+
/**
|
|
9467
|
+
* Return tasks for case and event.
|
|
9468
|
+
*/
|
|
9469
|
+
WorkAllocationService.prototype.getTasksByCaseIdAndEventId = function (eventId, caseId, caseType, jurisdiction) {
|
|
9470
|
+
var defaultPayload = {
|
|
9471
|
+
task_required_for_event: false,
|
|
9472
|
+
tasks: []
|
|
9473
|
+
};
|
|
9474
|
+
if (!this.isWAEnabled()) {
|
|
9475
|
+
return rxjs.of(defaultPayload);
|
|
9476
|
+
}
|
|
9477
|
+
return this.http.get(this.appConfig.getWorkAllocationApiUrl() + "/case/tasks/" + caseId + "/event/" + eventId + "/caseType/" + caseType + "/jurisdiction/" + jurisdiction);
|
|
9478
|
+
};
|
|
9479
|
+
/**
|
|
9480
|
+
* Call the API to get a task
|
|
9481
|
+
*/
|
|
9482
|
+
WorkAllocationService.prototype.getTask = function (taskId) {
|
|
9483
|
+
if (!this.isWAEnabled()) {
|
|
9484
|
+
return rxjs.of({ task: null });
|
|
9485
|
+
}
|
|
9486
|
+
return this.http.get(this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId);
|
|
9487
|
+
};
|
|
9488
|
+
return WorkAllocationService;
|
|
9489
|
+
}());
|
|
9490
|
+
WorkAllocationService.iACCaseOfficer = 'caseworker-ia-caseofficer';
|
|
9491
|
+
WorkAllocationService.iACAdmOfficer = 'caseworker-ia-admofficer';
|
|
9492
|
+
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)); };
|
|
9493
|
+
WorkAllocationService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: WorkAllocationService, factory: WorkAllocationService.ɵfac });
|
|
9494
|
+
(function () {
|
|
9495
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(WorkAllocationService, [{
|
|
9496
|
+
type: i0.Injectable
|
|
9497
|
+
}], function () { return [{ type: HttpService }, { type: AbstractAppConfig }, { type: HttpErrorService }, { type: AlertService }, { type: SessionStorageService }]; }, null);
|
|
9498
|
+
})();
|
|
9499
|
+
|
|
9534
9500
|
var CaseEditComponent = /** @class */ (function () {
|
|
9535
9501
|
function CaseEditComponent(fb, router, route, fieldsUtils, fieldsPurger, registrarService, wizardFactory, sessionStorageService, windowsService) {
|
|
9536
9502
|
this.fb = fb;
|
|
@@ -10033,14 +9999,14 @@
|
|
|
10033
9999
|
this.title$ = new rxjs.BehaviorSubject(null);
|
|
10034
10000
|
this.formValidationErrors$ = new rxjs.BehaviorSubject([]);
|
|
10035
10001
|
this.editForm$ = new rxjs.BehaviorSubject(null);
|
|
10036
|
-
this.
|
|
10002
|
+
this.isLinkedCasesJourneyAtFinalStep$ = new rxjs.BehaviorSubject(null);
|
|
10037
10003
|
this.eventTriggerName$ = new rxjs.BehaviorSubject(null);
|
|
10038
10004
|
this.triggerSubmitEvent$ = new rxjs.BehaviorSubject(null);
|
|
10039
10005
|
this.caseDetails$ = this.details$.asObservable();
|
|
10040
10006
|
this.caseTitle$ = this.title$.asObservable();
|
|
10041
10007
|
this.caseEditForm$ = this.editForm$.asObservable();
|
|
10042
10008
|
this.caseFormValidationErrors$ = this.formValidationErrors$.asObservable();
|
|
10043
|
-
this.
|
|
10009
|
+
this.caseIsLinkedCasesJourneyAtFinalStep$ = this.isLinkedCasesJourneyAtFinalStep$.asObservable();
|
|
10044
10010
|
this.caseEventTriggerName$ = this.eventTriggerName$.asObservable();
|
|
10045
10011
|
this.caseTriggerSubmitEvent$ = this.triggerSubmitEvent$.asObservable();
|
|
10046
10012
|
}
|
|
@@ -10053,9 +10019,6 @@
|
|
|
10053
10019
|
CaseEditDataService.prototype.setCaseEventTriggerName = function (triggerName) {
|
|
10054
10020
|
this.eventTriggerName$.next(triggerName);
|
|
10055
10021
|
};
|
|
10056
|
-
CaseEditDataService.prototype.setCaseLinkError = function (error) {
|
|
10057
|
-
this.linkError$.next(error);
|
|
10058
|
-
};
|
|
10059
10022
|
CaseEditDataService.prototype.setFormValidationErrors = function (validationErrors) {
|
|
10060
10023
|
this.formValidationErrors$.next(validationErrors);
|
|
10061
10024
|
};
|
|
@@ -10065,8 +10028,8 @@
|
|
|
10065
10028
|
CaseEditDataService.prototype.clearFormValidationErrors = function () {
|
|
10066
10029
|
this.formValidationErrors$.next([]);
|
|
10067
10030
|
};
|
|
10068
|
-
CaseEditDataService.prototype.
|
|
10069
|
-
this.
|
|
10031
|
+
CaseEditDataService.prototype.setLinkedCasesJourneyAtFinalStep = function (isAtFinalStep) {
|
|
10032
|
+
this.isLinkedCasesJourneyAtFinalStep$.next(isAtFinalStep);
|
|
10070
10033
|
};
|
|
10071
10034
|
CaseEditDataService.prototype.addFormValidationError = function (validationError) {
|
|
10072
10035
|
this.formValidationErrors$.next(this.formValidationErrors$.getValue().concat([validationError]));
|
|
@@ -10423,6 +10386,9 @@
|
|
|
10423
10386
|
this.caseEditDataService.caseEditForm$.subscribe({
|
|
10424
10387
|
next: function (editForm) { return _this.editForm = editForm; }
|
|
10425
10388
|
});
|
|
10389
|
+
this.caseEditDataService.caseIsLinkedCasesJourneyAtFinalStep$.subscribe({
|
|
10390
|
+
next: function (isLinkedCasesJourneyAtFinalStep) { return _this.isLinkedCasesJourneyAtFinalStep = isLinkedCasesJourneyAtFinalStep; }
|
|
10391
|
+
});
|
|
10426
10392
|
this.caseEditDataService.caseTriggerSubmitEvent$.subscribe({
|
|
10427
10393
|
next: function (state) {
|
|
10428
10394
|
if (state) {
|
|
@@ -10442,7 +10408,11 @@
|
|
|
10442
10408
|
return this.caseEdit.first();
|
|
10443
10409
|
};
|
|
10444
10410
|
CaseEditPageComponent.prototype.currentPageIsNotValid = function () {
|
|
10445
|
-
return !this.pageValidationService.isPageValid(this.currentPage, this.editForm)
|
|
10411
|
+
return !this.pageValidationService.isPageValid(this.currentPage, this.editForm) ||
|
|
10412
|
+
(this.isLinkedCasesJourney() && !this.isLinkedCasesJourneyAtFinalStep);
|
|
10413
|
+
};
|
|
10414
|
+
CaseEditPageComponent.prototype.isLinkedCasesJourney = function () {
|
|
10415
|
+
return FieldsUtils.containsLinkedCasesCaseField(this.currentPage.case_fields);
|
|
10446
10416
|
};
|
|
10447
10417
|
/**
|
|
10448
10418
|
* caseEventData.event_data contains all the values from the previous pages so we set caseEventData.data = caseEventData.event_data
|
|
@@ -10469,7 +10439,7 @@
|
|
|
10469
10439
|
var label = casefield.label || 'Field';
|
|
10470
10440
|
var id_1 = casefield.id;
|
|
10471
10441
|
if (fieldElement['component'] && fieldElement['component'].parent) {
|
|
10472
|
-
if (fieldElement['component'].idPrefix.indexOf(
|
|
10442
|
+
if (fieldElement['component'].idPrefix.indexOf("_" + id_1 + "_") === -1) {
|
|
10473
10443
|
id_1 = "" + fieldElement['component'].idPrefix + id_1;
|
|
10474
10444
|
}
|
|
10475
10445
|
else {
|
|
@@ -10542,7 +10512,16 @@
|
|
|
10542
10512
|
var _this = this;
|
|
10543
10513
|
this.caseEditDataService.clearFormValidationErrors();
|
|
10544
10514
|
if (this.currentPageIsNotValid()) {
|
|
10545
|
-
|
|
10515
|
+
// The generateErrorMessage method filters out the hidden fields.
|
|
10516
|
+
// The error message for LinkedCases journey will never get displayed because the
|
|
10517
|
+
// LinkedCases is configured with ComponentLauncher field as visible and caseLinks field as hidden.
|
|
10518
|
+
if (this.isLinkedCasesJourney()) {
|
|
10519
|
+
this.validationErrors.push({ id: 'next-button', message: 'Please select Next to go to the next page' });
|
|
10520
|
+
CaseEditPageComponent.scrollToTop();
|
|
10521
|
+
}
|
|
10522
|
+
else {
|
|
10523
|
+
this.generateErrorMessage(this.currentPage.case_fields);
|
|
10524
|
+
}
|
|
10546
10525
|
}
|
|
10547
10526
|
if (!this.isSubmitting && !this.currentPageIsNotValid()) {
|
|
10548
10527
|
this.isSubmitting = true;
|
|
@@ -10610,8 +10589,8 @@
|
|
|
10610
10589
|
}
|
|
10611
10590
|
};
|
|
10612
10591
|
CaseEditPageComponent.prototype.callbackErrorsNotify = function (errorContext) {
|
|
10613
|
-
this.ignoreWarning = errorContext.
|
|
10614
|
-
this.triggerText = errorContext.
|
|
10592
|
+
this.ignoreWarning = errorContext.ignoreWarning;
|
|
10593
|
+
this.triggerText = errorContext.triggerText;
|
|
10615
10594
|
};
|
|
10616
10595
|
CaseEditPageComponent.prototype.next = function () {
|
|
10617
10596
|
this.resetErrors();
|
|
@@ -10957,12 +10936,12 @@
|
|
|
10957
10936
|
CallbackErrorsComponent.prototype.buildCallbackErrorsContext = function () {
|
|
10958
10937
|
var errorContext = new CallbackErrorsContext();
|
|
10959
10938
|
if (this.hasWarnings() && !this.hasErrors() && !this.hasInvalidData()) {
|
|
10960
|
-
errorContext.
|
|
10961
|
-
errorContext.
|
|
10939
|
+
errorContext.ignoreWarning = true;
|
|
10940
|
+
errorContext.triggerText = this.triggerTextIgnore;
|
|
10962
10941
|
}
|
|
10963
10942
|
else {
|
|
10964
|
-
errorContext.
|
|
10965
|
-
errorContext.
|
|
10943
|
+
errorContext.ignoreWarning = false;
|
|
10944
|
+
errorContext.triggerText = this.triggerTextContinue;
|
|
10966
10945
|
}
|
|
10967
10946
|
return errorContext;
|
|
10968
10947
|
};
|
|
@@ -11007,7 +10986,7 @@
|
|
|
11007
10986
|
|
|
11008
10987
|
var AddressOption = /** @class */ (function () {
|
|
11009
10988
|
function AddressOption(addressModel, description) {
|
|
11010
|
-
if (description
|
|
10989
|
+
if (description === null) {
|
|
11011
10990
|
this.value = addressModel;
|
|
11012
10991
|
this.description = this.getDescription();
|
|
11013
10992
|
}
|
|
@@ -11016,13 +10995,10 @@
|
|
|
11016
10995
|
}
|
|
11017
10996
|
}
|
|
11018
10997
|
AddressOption.prototype.getDescription = function () {
|
|
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);
|
|
10998
|
+
return this.removeInitialCommaIfPresent("" + (this.value.AddressLine1 === undefined ? '' : this.value.AddressLine1) + this.prefixWithCommaIfPresent(this.value.AddressLine2) + this.prefixWithCommaIfPresent(this.value.AddressLine3) + ", " + this.value.PostTown);
|
|
11023
10999
|
};
|
|
11024
11000
|
AddressOption.prototype.prefixWithCommaIfPresent = function (value) {
|
|
11025
|
-
return value ?
|
|
11001
|
+
return value ? ", " + value : value;
|
|
11026
11002
|
};
|
|
11027
11003
|
AddressOption.prototype.removeInitialCommaIfPresent = function (value) {
|
|
11028
11004
|
return value.replace(new RegExp('^,', 'gi'), '');
|
|
@@ -11166,7 +11142,7 @@
|
|
|
11166
11142
|
this.missingPostcode = false;
|
|
11167
11143
|
var postcode_1 = this.postcode.value;
|
|
11168
11144
|
this.caseField.value = null;
|
|
11169
|
-
this.addressOptions =
|
|
11145
|
+
this.addressOptions = [];
|
|
11170
11146
|
this.addressesService.getAddressesForPostcode(postcode_1.replace(' ', '').toUpperCase()).subscribe(function (result) {
|
|
11171
11147
|
result.forEach(function (address) {
|
|
11172
11148
|
_this.addressOptions.push(new AddressOption(address, null));
|
|
@@ -11209,7 +11185,7 @@
|
|
|
11209
11185
|
var hasAddress = false;
|
|
11210
11186
|
if (address) {
|
|
11211
11187
|
Object.keys(address).forEach(function (key) {
|
|
11212
|
-
if (address[key]
|
|
11188
|
+
if (address[key] !== null) {
|
|
11213
11189
|
hasAddress = true;
|
|
11214
11190
|
}
|
|
11215
11191
|
});
|
|
@@ -11232,7 +11208,7 @@
|
|
|
11232
11208
|
};
|
|
11233
11209
|
WriteAddressFieldComponent.prototype.defaultLabel = function (numberOfAddresses) {
|
|
11234
11210
|
return numberOfAddresses === 0 ? 'No address found'
|
|
11235
|
-
: numberOfAddresses + (numberOfAddresses === 1 ? ' address ' : ' addresses ') +
|
|
11211
|
+
: "" + numberOfAddresses + (numberOfAddresses === 1 ? ' address ' : ' addresses ') + "found";
|
|
11236
11212
|
};
|
|
11237
11213
|
WriteAddressFieldComponent.prototype.setFormValue = function () {
|
|
11238
11214
|
if (this.writeComplexFieldComponent.complexGroup) {
|
|
@@ -12790,7 +12766,7 @@
|
|
|
12790
12766
|
}
|
|
12791
12767
|
};
|
|
12792
12768
|
WriteCollectionFieldComponent.prototype.buildCaseField = function (item, index, isNew) {
|
|
12793
|
-
var e_1,
|
|
12769
|
+
var e_1, _c;
|
|
12794
12770
|
if (isNew === void 0) { isNew = false; }
|
|
12795
12771
|
/**
|
|
12796
12772
|
* What follow is code that makes me want to go jump in the shower!
|
|
@@ -12826,8 +12802,8 @@
|
|
|
12826
12802
|
if (!value) {
|
|
12827
12803
|
value = new i2.FormGroup({});
|
|
12828
12804
|
try {
|
|
12829
|
-
for (var
|
|
12830
|
-
var key =
|
|
12805
|
+
for (var _d = __values(Object.keys(group.controls)), _e = _d.next(); !_e.done; _e = _d.next()) {
|
|
12806
|
+
var key = _e.value;
|
|
12831
12807
|
value.addControl(key, group.get(key));
|
|
12832
12808
|
// DON'T remove the control for this key from the outer group or it
|
|
12833
12809
|
// goes awry. So DON'T uncomment the below line!
|
|
@@ -12837,7 +12813,7 @@
|
|
|
12837
12813
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
12838
12814
|
finally {
|
|
12839
12815
|
try {
|
|
12840
|
-
if (
|
|
12816
|
+
if (_e && !_e.done && (_c = _d.return)) _c.call(_d);
|
|
12841
12817
|
}
|
|
12842
12818
|
finally { if (e_1) throw e_1.error; }
|
|
12843
12819
|
}
|
|
@@ -12968,6 +12944,7 @@
|
|
|
12968
12944
|
this.formArray.removeAt(index);
|
|
12969
12945
|
};
|
|
12970
12946
|
WriteCollectionFieldComponent.prototype.resetIds = function (index) {
|
|
12947
|
+
var _a, _b;
|
|
12971
12948
|
for (var i = index; i < this.collItems.length; i++) {
|
|
12972
12949
|
var counter = i + 1;
|
|
12973
12950
|
if (this.collItems[i].index && this.collItems[i].index === counter) {
|
|
@@ -12977,16 +12954,15 @@
|
|
|
12977
12954
|
&& this.collItems[i].caseField.id === counter.toString()) {
|
|
12978
12955
|
this.collItems[i].caseField.id = i.toString();
|
|
12979
12956
|
}
|
|
12980
|
-
var idPrefix1 = this.collItems[i].prefix ? this.collItems[i].prefix.replace(
|
|
12981
|
-
var idPrefix1Current = idPrefix1.replace(
|
|
12957
|
+
var idPrefix1 = this.collItems[i].prefix ? this.collItems[i].prefix.replace("_" + counter.toString(), "_" + i.toString()) : '';
|
|
12958
|
+
var idPrefix1Current = idPrefix1.replace("_" + i.toString(), "_" + counter.toString());
|
|
12982
12959
|
if (this.collItems[i].prefix && this.collItems[i].prefix === idPrefix1Current) {
|
|
12983
12960
|
this.collItems[i].prefix = idPrefix1;
|
|
12984
12961
|
}
|
|
12985
|
-
var idPrefixAvailable = this.collItems[i].container
|
|
12986
|
-
&& this.collItems[i].container['component'].idPrefix ? true : false;
|
|
12962
|
+
var idPrefixAvailable = !!((_b = (_a = this.collItems[i].container) === null || _a === void 0 ? void 0 : _a['component']) === null || _b === void 0 ? void 0 : _b.idPrefix);
|
|
12987
12963
|
var idPrefix2 = idPrefixAvailable ?
|
|
12988
|
-
this.collItems[i].container['component'].idPrefix.replace(
|
|
12989
|
-
var idPrefix2current = idPrefix2.replace(
|
|
12964
|
+
this.collItems[i].container['component'].idPrefix.replace("_" + counter.toString(), "_" + i.toString()) : '';
|
|
12965
|
+
var idPrefix2current = idPrefix2.replace("_" + i.toString(), "_" + counter.toString());
|
|
12990
12966
|
if (idPrefixAvailable && this.collItems[i].container['component'].idPrefix === idPrefix2current) {
|
|
12991
12967
|
this.collItems[i].container['component'].idPrefix = idPrefix2;
|
|
12992
12968
|
}
|
|
@@ -14342,6 +14318,257 @@
|
|
|
14342
14318
|
}], null, null);
|
|
14343
14319
|
})();
|
|
14344
14320
|
|
|
14321
|
+
var FixedListPipe = /** @class */ (function () {
|
|
14322
|
+
function FixedListPipe() {
|
|
14323
|
+
}
|
|
14324
|
+
FixedListPipe.prototype.transform = function (value, items) {
|
|
14325
|
+
if (!!items) {
|
|
14326
|
+
var item = items.find(function (i) { return i.code === value; });
|
|
14327
|
+
return item ? item.label : FixedListPipe.EMPTY;
|
|
14328
|
+
}
|
|
14329
|
+
else {
|
|
14330
|
+
return FixedListPipe.EMPTY;
|
|
14331
|
+
}
|
|
14332
|
+
};
|
|
14333
|
+
return FixedListPipe;
|
|
14334
|
+
}());
|
|
14335
|
+
FixedListPipe.EMPTY = '';
|
|
14336
|
+
FixedListPipe.ɵfac = function FixedListPipe_Factory(t) { return new (t || FixedListPipe)(); };
|
|
14337
|
+
FixedListPipe.ɵpipe = i0__namespace.ɵɵdefinePipe({ name: "ccdFixedList", type: FixedListPipe, pure: true });
|
|
14338
|
+
(function () {
|
|
14339
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(FixedListPipe, [{
|
|
14340
|
+
type: i0.Pipe,
|
|
14341
|
+
args: [{
|
|
14342
|
+
name: 'ccdFixedList'
|
|
14343
|
+
}]
|
|
14344
|
+
}], null, null);
|
|
14345
|
+
})();
|
|
14346
|
+
|
|
14347
|
+
function ReadDynamicMultiSelectListFieldComponent_div_0_Template(rf, ctx) {
|
|
14348
|
+
if (rf & 1) {
|
|
14349
|
+
i0__namespace.ɵɵelementStart(0, "div");
|
|
14350
|
+
i0__namespace.ɵɵtext(1);
|
|
14351
|
+
i0__namespace.ɵɵpipe(2, "ccdFixedList");
|
|
14352
|
+
i0__namespace.ɵɵelementEnd();
|
|
14353
|
+
}
|
|
14354
|
+
if (rf & 2) {
|
|
14355
|
+
var value_r1 = ctx.$implicit;
|
|
14356
|
+
var ctx_r0 = i0__namespace.ɵɵnextContext();
|
|
14357
|
+
i0__namespace.ɵɵadvance(1);
|
|
14358
|
+
i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind2(2, 1, value_r1.code, ctx_r0.caseField.list_items), "\n");
|
|
14359
|
+
}
|
|
14360
|
+
}
|
|
14361
|
+
var ReadDynamicMultiSelectListFieldComponent = /** @class */ (function (_super) {
|
|
14362
|
+
__extends(ReadDynamicMultiSelectListFieldComponent, _super);
|
|
14363
|
+
function ReadDynamicMultiSelectListFieldComponent() {
|
|
14364
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
14365
|
+
}
|
|
14366
|
+
ReadDynamicMultiSelectListFieldComponent.prototype.ngOnInit = function () {
|
|
14367
|
+
/**
|
|
14368
|
+
*
|
|
14369
|
+
* Reassigning list_items from formatted_list when list_items is empty
|
|
14370
|
+
*/
|
|
14371
|
+
if (!this.caseField.list_items && this.caseField.formatted_value && this.caseField.formatted_value.list_items) {
|
|
14372
|
+
this.caseField.list_items = this.caseField.formatted_value.list_items;
|
|
14373
|
+
}
|
|
14374
|
+
if (!this.caseField.value && this.caseField.formatted_value && this.caseField.formatted_value.value) {
|
|
14375
|
+
this.caseField.value = this.caseField.formatted_value.value;
|
|
14376
|
+
}
|
|
14377
|
+
_super.prototype.ngOnInit.call(this);
|
|
14378
|
+
};
|
|
14379
|
+
return ReadDynamicMultiSelectListFieldComponent;
|
|
14380
|
+
}(AbstractFieldReadComponent));
|
|
14381
|
+
ReadDynamicMultiSelectListFieldComponent.ɵfac = function ReadDynamicMultiSelectListFieldComponent_Factory(t) { return ɵReadDynamicMultiSelectListFieldComponent_BaseFactory(t || ReadDynamicMultiSelectListFieldComponent); };
|
|
14382
|
+
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) {
|
|
14383
|
+
if (rf & 1) {
|
|
14384
|
+
i0__namespace.ɵɵtemplate(0, ReadDynamicMultiSelectListFieldComponent_div_0_Template, 3, 4, "div", 0);
|
|
14385
|
+
}
|
|
14386
|
+
if (rf & 2) {
|
|
14387
|
+
i0__namespace.ɵɵproperty("ngForOf", ctx.caseField.value);
|
|
14388
|
+
}
|
|
14389
|
+
}, 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}"] });
|
|
14390
|
+
var ɵReadDynamicMultiSelectListFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(ReadDynamicMultiSelectListFieldComponent);
|
|
14391
|
+
(function () {
|
|
14392
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ReadDynamicMultiSelectListFieldComponent, [{
|
|
14393
|
+
type: i0.Component,
|
|
14394
|
+
args: [{
|
|
14395
|
+
selector: 'ccd-read-dynamic-multi-select-list-field',
|
|
14396
|
+
templateUrl: './read-dynamic-multi-select-list-field.html',
|
|
14397
|
+
styleUrls: ['./read-dynamic-multi-select-list-field.component.scss']
|
|
14398
|
+
}]
|
|
14399
|
+
}], null, null);
|
|
14400
|
+
})();
|
|
14401
|
+
|
|
14402
|
+
function WriteDynamicMultiSelectListFieldComponent_span_3_Template(rf, ctx) {
|
|
14403
|
+
if (rf & 1) {
|
|
14404
|
+
i0__namespace.ɵɵelementStart(0, "span", 5);
|
|
14405
|
+
i0__namespace.ɵɵtext(1);
|
|
14406
|
+
i0__namespace.ɵɵpipe(2, "ccdFieldLabel");
|
|
14407
|
+
i0__namespace.ɵɵelementEnd();
|
|
14408
|
+
}
|
|
14409
|
+
if (rf & 2) {
|
|
14410
|
+
var ctx_r0 = i0__namespace.ɵɵnextContext();
|
|
14411
|
+
i0__namespace.ɵɵadvance(1);
|
|
14412
|
+
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r0.caseField));
|
|
14413
|
+
}
|
|
14414
|
+
}
|
|
14415
|
+
function WriteDynamicMultiSelectListFieldComponent_span_4_Template(rf, ctx) {
|
|
14416
|
+
if (rf & 1) {
|
|
14417
|
+
i0__namespace.ɵɵelementStart(0, "span", 6);
|
|
14418
|
+
i0__namespace.ɵɵtext(1);
|
|
14419
|
+
i0__namespace.ɵɵelementEnd();
|
|
14420
|
+
}
|
|
14421
|
+
if (rf & 2) {
|
|
14422
|
+
var ctx_r1 = i0__namespace.ɵɵnextContext();
|
|
14423
|
+
i0__namespace.ɵɵadvance(1);
|
|
14424
|
+
i0__namespace.ɵɵtextInterpolate(ctx_r1.caseField.hint_text);
|
|
14425
|
+
}
|
|
14426
|
+
}
|
|
14427
|
+
function WriteDynamicMultiSelectListFieldComponent_span_5_Template(rf, ctx) {
|
|
14428
|
+
if (rf & 1) {
|
|
14429
|
+
i0__namespace.ɵɵelementStart(0, "span", 7);
|
|
14430
|
+
i0__namespace.ɵɵtext(1);
|
|
14431
|
+
i0__namespace.ɵɵpipe(2, "ccdFirstError");
|
|
14432
|
+
i0__namespace.ɵɵelementEnd();
|
|
14433
|
+
}
|
|
14434
|
+
if (rf & 2) {
|
|
14435
|
+
var ctx_r2 = i0__namespace.ɵɵnextContext();
|
|
14436
|
+
i0__namespace.ɵɵadvance(1);
|
|
14437
|
+
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r2.checkboxes.errors));
|
|
14438
|
+
}
|
|
14439
|
+
}
|
|
14440
|
+
function WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template(rf, ctx) {
|
|
14441
|
+
if (rf & 1) {
|
|
14442
|
+
var _r6_1 = i0__namespace.ɵɵgetCurrentView();
|
|
14443
|
+
i0__namespace.ɵɵelementContainerStart(0);
|
|
14444
|
+
i0__namespace.ɵɵelementStart(1, "div", 8);
|
|
14445
|
+
i0__namespace.ɵɵelementStart(2, "input", 9);
|
|
14446
|
+
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); });
|
|
14447
|
+
i0__namespace.ɵɵelementEnd();
|
|
14448
|
+
i0__namespace.ɵɵelementStart(3, "label", 10);
|
|
14449
|
+
i0__namespace.ɵɵtext(4);
|
|
14450
|
+
i0__namespace.ɵɵelementEnd();
|
|
14451
|
+
i0__namespace.ɵɵelementEnd();
|
|
14452
|
+
i0__namespace.ɵɵelementContainerEnd();
|
|
14453
|
+
}
|
|
14454
|
+
if (rf & 2) {
|
|
14455
|
+
var checkbox_r4 = ctx.$implicit;
|
|
14456
|
+
var ctx_r3 = i0__namespace.ɵɵnextContext();
|
|
14457
|
+
i0__namespace.ɵɵadvance(2);
|
|
14458
|
+
i0__namespace.ɵɵpropertyInterpolate("id", ctx_r3.createElementId(checkbox_r4.code));
|
|
14459
|
+
i0__namespace.ɵɵpropertyInterpolate("name", ctx_r3.id());
|
|
14460
|
+
i0__namespace.ɵɵproperty("value", checkbox_r4.code)("checked", ctx_r3.isSelected(checkbox_r4.code));
|
|
14461
|
+
i0__namespace.ɵɵadvance(1);
|
|
14462
|
+
i0__namespace.ɵɵpropertyInterpolate("for", ctx_r3.createElementId(checkbox_r4.code));
|
|
14463
|
+
i0__namespace.ɵɵadvance(1);
|
|
14464
|
+
i0__namespace.ɵɵtextInterpolate(checkbox_r4.label);
|
|
14465
|
+
}
|
|
14466
|
+
}
|
|
14467
|
+
var _c0$L = function (a0) { return { "error": a0 }; };
|
|
14468
|
+
var WriteDynamicMultiSelectListFieldComponent = /** @class */ (function (_super) {
|
|
14469
|
+
__extends(WriteDynamicMultiSelectListFieldComponent, _super);
|
|
14470
|
+
function WriteDynamicMultiSelectListFieldComponent() {
|
|
14471
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
14472
|
+
}
|
|
14473
|
+
WriteDynamicMultiSelectListFieldComponent.prototype.ngOnInit = function () {
|
|
14474
|
+
var _this = this;
|
|
14475
|
+
this.checkboxes = new i2.FormArray([]);
|
|
14476
|
+
this.setInitialCaseList();
|
|
14477
|
+
this.setInitialCaseFieldValue();
|
|
14478
|
+
// Initialise array with existing values
|
|
14479
|
+
if (this.caseField.value && Array.isArray(this.caseField.value)) {
|
|
14480
|
+
var values = this.caseField.value;
|
|
14481
|
+
values.forEach(function (value) {
|
|
14482
|
+
_this.checkboxes.push(new i2.FormControl(value));
|
|
14483
|
+
});
|
|
14484
|
+
}
|
|
14485
|
+
this.dynamicListFormControl = this.registerControl(new i2.FormControl(this.checkboxes.value));
|
|
14486
|
+
this.dynamicListFormControl.setValue(this.checkboxes.value);
|
|
14487
|
+
};
|
|
14488
|
+
WriteDynamicMultiSelectListFieldComponent.prototype.onCheckChange = function (event) {
|
|
14489
|
+
var _this = this;
|
|
14490
|
+
var target = event.target;
|
|
14491
|
+
if (!target || !target.value) {
|
|
14492
|
+
return;
|
|
14493
|
+
}
|
|
14494
|
+
var selectedListItem = this.getValueListItem(target.value);
|
|
14495
|
+
if (!this.isSelected(target.value)) {
|
|
14496
|
+
// Add a new control in the FormArray
|
|
14497
|
+
this.checkboxes.push(new i2.FormControl(selectedListItem));
|
|
14498
|
+
}
|
|
14499
|
+
else {
|
|
14500
|
+
// Remove the control from the FormArray
|
|
14501
|
+
this.checkboxes.controls.forEach(function (ctrl, i) {
|
|
14502
|
+
if (ctrl.value.code === target.value) {
|
|
14503
|
+
_this.checkboxes.removeAt(i);
|
|
14504
|
+
}
|
|
14505
|
+
});
|
|
14506
|
+
}
|
|
14507
|
+
this.dynamicListFormControl.setValue(this.checkboxes.value);
|
|
14508
|
+
};
|
|
14509
|
+
WriteDynamicMultiSelectListFieldComponent.prototype.isSelected = function (code) {
|
|
14510
|
+
if (this.checkboxes && this.checkboxes.controls) {
|
|
14511
|
+
return this.checkboxes.controls.find(function (control) { return control.value.code === code; });
|
|
14512
|
+
}
|
|
14513
|
+
};
|
|
14514
|
+
WriteDynamicMultiSelectListFieldComponent.prototype.getValueListItem = function (value) {
|
|
14515
|
+
return this.caseField.list_items.find(function (i) { return i.code === value; });
|
|
14516
|
+
};
|
|
14517
|
+
WriteDynamicMultiSelectListFieldComponent.prototype.setInitialCaseList = function () {
|
|
14518
|
+
var hasListItems = this.caseField.list_items && this.caseField.list_items.length > 0;
|
|
14519
|
+
var hasFormattedListItems = this.caseField.formatted_value && this.caseField.formatted_value.list_items.length > 0;
|
|
14520
|
+
if (!hasListItems && hasFormattedListItems) {
|
|
14521
|
+
this.caseField.list_items = this.caseField.formatted_value.list_items;
|
|
14522
|
+
}
|
|
14523
|
+
};
|
|
14524
|
+
WriteDynamicMultiSelectListFieldComponent.prototype.setInitialCaseFieldValue = function () {
|
|
14525
|
+
if (!this.caseField.value && this.caseField.formatted_value && this.caseField.formatted_value.value) {
|
|
14526
|
+
this.caseField.value = this.caseField.formatted_value.value;
|
|
14527
|
+
}
|
|
14528
|
+
var isNull = this.caseField.value === undefined || this.caseField.value === '';
|
|
14529
|
+
if (isNull || !Array.isArray(this.caseField.value)) {
|
|
14530
|
+
this.caseField.value = [];
|
|
14531
|
+
}
|
|
14532
|
+
};
|
|
14533
|
+
return WriteDynamicMultiSelectListFieldComponent;
|
|
14534
|
+
}(AbstractFieldWriteComponent));
|
|
14535
|
+
WriteDynamicMultiSelectListFieldComponent.ɵfac = function WriteDynamicMultiSelectListFieldComponent_Factory(t) { return ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory(t || WriteDynamicMultiSelectListFieldComponent); };
|
|
14536
|
+
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) {
|
|
14537
|
+
if (rf & 1) {
|
|
14538
|
+
i0__namespace.ɵɵelementStart(0, "div", 0);
|
|
14539
|
+
i0__namespace.ɵɵelementStart(1, "fieldset");
|
|
14540
|
+
i0__namespace.ɵɵelementStart(2, "legend");
|
|
14541
|
+
i0__namespace.ɵɵtemplate(3, WriteDynamicMultiSelectListFieldComponent_span_3_Template, 3, 3, "span", 1);
|
|
14542
|
+
i0__namespace.ɵɵtemplate(4, WriteDynamicMultiSelectListFieldComponent_span_4_Template, 2, 1, "span", 2);
|
|
14543
|
+
i0__namespace.ɵɵtemplate(5, WriteDynamicMultiSelectListFieldComponent_span_5_Template, 3, 3, "span", 3);
|
|
14544
|
+
i0__namespace.ɵɵelementEnd();
|
|
14545
|
+
i0__namespace.ɵɵtemplate(6, WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template, 5, 6, "ng-container", 4);
|
|
14546
|
+
i0__namespace.ɵɵelementEnd();
|
|
14547
|
+
i0__namespace.ɵɵelementEnd();
|
|
14548
|
+
}
|
|
14549
|
+
if (rf & 2) {
|
|
14550
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$L, !ctx.checkboxes.valid && ctx.checkboxes.touched))("id", ctx.id());
|
|
14551
|
+
i0__namespace.ɵɵadvance(3);
|
|
14552
|
+
i0__namespace.ɵɵproperty("ngIf", ctx.caseField.label);
|
|
14553
|
+
i0__namespace.ɵɵadvance(1);
|
|
14554
|
+
i0__namespace.ɵɵproperty("ngIf", ctx.caseField.hint_text);
|
|
14555
|
+
i0__namespace.ɵɵadvance(1);
|
|
14556
|
+
i0__namespace.ɵɵproperty("ngIf", ctx.checkboxes.errors && ctx.checkboxes.touched);
|
|
14557
|
+
i0__namespace.ɵɵadvance(1);
|
|
14558
|
+
i0__namespace.ɵɵproperty("ngForOf", ctx.caseField.list_items);
|
|
14559
|
+
}
|
|
14560
|
+
}, directives: [i1__namespace.NgClass, i1__namespace.NgIf, i1__namespace.NgForOf], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
|
|
14561
|
+
var ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(WriteDynamicMultiSelectListFieldComponent);
|
|
14562
|
+
(function () {
|
|
14563
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(WriteDynamicMultiSelectListFieldComponent, [{
|
|
14564
|
+
type: i0.Component,
|
|
14565
|
+
args: [{
|
|
14566
|
+
selector: 'ccd-write-dynamic-multi-select-list-field',
|
|
14567
|
+
templateUrl: './write-dynamic-multi-select-list-field.html'
|
|
14568
|
+
}]
|
|
14569
|
+
}], null, null);
|
|
14570
|
+
})();
|
|
14571
|
+
|
|
14345
14572
|
var DynamicRadioListPipe = /** @class */ (function () {
|
|
14346
14573
|
function DynamicRadioListPipe() {
|
|
14347
14574
|
}
|
|
@@ -14462,7 +14689,7 @@
|
|
|
14462
14689
|
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r3.dynamicRadioListControl.errors));
|
|
14463
14690
|
}
|
|
14464
14691
|
}
|
|
14465
|
-
var _c0$
|
|
14692
|
+
var _c0$K = function (a0) { return { selected: a0 }; };
|
|
14466
14693
|
function WriteDynamicRadioListFieldComponent_div_9_Template(rf, ctx) {
|
|
14467
14694
|
if (rf & 1) {
|
|
14468
14695
|
i0__namespace.ɵɵelementStart(0, "div", 10);
|
|
@@ -14475,7 +14702,7 @@
|
|
|
14475
14702
|
if (rf & 2) {
|
|
14476
14703
|
var radioButton_r5 = ctx.$implicit;
|
|
14477
14704
|
var ctx_r4 = i0__namespace.ɵɵnextContext();
|
|
14478
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$
|
|
14705
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$K, ctx_r4.dynamicRadioListControl.value === radioButton_r5.code));
|
|
14479
14706
|
i0__namespace.ɵɵadvance(1);
|
|
14480
14707
|
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);
|
|
14481
14708
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -14639,7 +14866,7 @@
|
|
|
14639
14866
|
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.emailControl.errors, ctx_r2.caseField.label));
|
|
14640
14867
|
}
|
|
14641
14868
|
}
|
|
14642
|
-
var _c0$
|
|
14869
|
+
var _c0$J = function (a0) { return { "form-group-error": a0 }; };
|
|
14643
14870
|
var _c1$h = function (a0) { return { "govuk-input--error": a0 }; };
|
|
14644
14871
|
var WriteEmailFieldComponent = /** @class */ (function (_super) {
|
|
14645
14872
|
__extends(WriteEmailFieldComponent, _super);
|
|
@@ -14664,7 +14891,7 @@
|
|
|
14664
14891
|
i0__namespace.ɵɵelementEnd();
|
|
14665
14892
|
}
|
|
14666
14893
|
if (rf & 2) {
|
|
14667
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$
|
|
14894
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$J, !ctx.emailControl.valid && (ctx.emailControl.dirty || ctx.emailControl.touched)));
|
|
14668
14895
|
i0__namespace.ɵɵadvance(1);
|
|
14669
14896
|
i0__namespace.ɵɵproperty("for", ctx.id());
|
|
14670
14897
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -14688,32 +14915,6 @@
|
|
|
14688
14915
|
}], null, null);
|
|
14689
14916
|
})();
|
|
14690
14917
|
|
|
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
|
-
|
|
14717
14918
|
var ReadFixedListFieldComponent = /** @class */ (function (_super) {
|
|
14718
14919
|
__extends(ReadFixedListFieldComponent, _super);
|
|
14719
14920
|
function ReadFixedListFieldComponent() {
|
|
@@ -14796,7 +14997,7 @@
|
|
|
14796
14997
|
i0__namespace.ɵɵtextInterpolate(type_r4.label);
|
|
14797
14998
|
}
|
|
14798
14999
|
}
|
|
14799
|
-
var _c0$
|
|
15000
|
+
var _c0$I = function (a0) { return { "form-group-error": a0 }; };
|
|
14800
15001
|
var WriteFixedListFieldComponent = /** @class */ (function (_super) {
|
|
14801
15002
|
__extends(WriteFixedListFieldComponent, _super);
|
|
14802
15003
|
function WriteFixedListFieldComponent() {
|
|
@@ -14845,7 +15046,7 @@
|
|
|
14845
15046
|
i0__namespace.ɵɵelementEnd();
|
|
14846
15047
|
}
|
|
14847
15048
|
if (rf & 2) {
|
|
14848
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(9, _c0$
|
|
15049
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(9, _c0$I, !ctx.fixedListFormControl.valid && (ctx.fixedListFormControl.dirty || ctx.fixedListFormControl.touched)));
|
|
14849
15050
|
i0__namespace.ɵɵadvance(1);
|
|
14850
15051
|
i0__namespace.ɵɵproperty("for", ctx.id());
|
|
14851
15052
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -14963,7 +15164,7 @@
|
|
|
14963
15164
|
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.fixedRadioListControl.errors, ctx_r2.caseField.label));
|
|
14964
15165
|
}
|
|
14965
15166
|
}
|
|
14966
|
-
var _c0$
|
|
15167
|
+
var _c0$H = function (a0) { return { selected: a0 }; };
|
|
14967
15168
|
function WriteFixedRadioListFieldComponent_div_8_Template(rf, ctx) {
|
|
14968
15169
|
if (rf & 1) {
|
|
14969
15170
|
i0__namespace.ɵɵelementStart(0, "div", 9);
|
|
@@ -14976,7 +15177,7 @@
|
|
|
14976
15177
|
if (rf & 2) {
|
|
14977
15178
|
var radioButton_r4 = ctx.$implicit;
|
|
14978
15179
|
var ctx_r3 = i0__namespace.ɵɵnextContext();
|
|
14979
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$
|
|
15180
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$H, ctx_r3.fixedRadioListControl.value === radioButton_r4.code));
|
|
14980
15181
|
i0__namespace.ɵɵadvance(1);
|
|
14981
15182
|
i0__namespace.ɵɵproperty("id", ctx_r3.id() + "-" + radioButton_r4.code)("name", ctx_r3.id())("formControl", ctx_r3.fixedRadioListControl)("value", radioButton_r4.code);
|
|
14982
15183
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -15146,7 +15347,7 @@
|
|
|
15146
15347
|
i0__namespace.ɵɵtextInterpolate1(" ", ctx_r1.caseField.hint_text, " ");
|
|
15147
15348
|
}
|
|
15148
15349
|
}
|
|
15149
|
-
var _c0$
|
|
15350
|
+
var _c0$G = function (a0) { return { "hide-autocomplete": a0 }; };
|
|
15150
15351
|
function WriteJudicialUserFieldComponent_mat_option_7_Template(rf, ctx) {
|
|
15151
15352
|
if (rf & 1) {
|
|
15152
15353
|
var _r7_1 = i0__namespace.ɵɵgetCurrentView();
|
|
@@ -15158,7 +15359,7 @@
|
|
|
15158
15359
|
if (rf & 2) {
|
|
15159
15360
|
var judicialUser_r5 = ctx.$implicit;
|
|
15160
15361
|
var ctx_r3 = i0__namespace.ɵɵnextContext();
|
|
15161
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4, _c0$
|
|
15362
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4, _c0$G, !ctx_r3.showAutocomplete))("value", judicialUser_r5.idamId);
|
|
15162
15363
|
i0__namespace.ɵɵadvance(1);
|
|
15163
15364
|
i0__namespace.ɵɵtextInterpolate2(" ", judicialUser_r5.fullName, " (", judicialUser_r5.emailId, ") ");
|
|
15164
15365
|
}
|
|
@@ -15397,7 +15598,7 @@
|
|
|
15397
15598
|
casesResponse.push(_this.mapResponse(result));
|
|
15398
15599
|
});
|
|
15399
15600
|
});
|
|
15400
|
-
|
|
15601
|
+
_this.linkedCases = casesResponse.map(function (item) {
|
|
15401
15602
|
return {
|
|
15402
15603
|
caseReference: item.caseReference,
|
|
15403
15604
|
caseName: item.caseName,
|
|
@@ -15411,7 +15612,6 @@
|
|
|
15411
15612
|
}),
|
|
15412
15613
|
};
|
|
15413
15614
|
});
|
|
15414
|
-
_this.linkedCases = caseLinks;
|
|
15415
15615
|
_this.serverLinkedApiError = null;
|
|
15416
15616
|
}, function (err) {
|
|
15417
15617
|
_this.serverLinkedApiError = {
|
|
@@ -15948,7 +16148,7 @@
|
|
|
15948
16148
|
i0__namespace.ɵɵtextInterpolate1(" ", ctx_r13.caseReasonCommentsError, " ");
|
|
15949
16149
|
}
|
|
15950
16150
|
}
|
|
15951
|
-
var _c0$
|
|
16151
|
+
var _c0$F = function (a0) { return { "govuk-form-group--error": a0 }; };
|
|
15952
16152
|
function LinkCasesComponent_div_8_div_14_Template(rf, ctx) {
|
|
15953
16153
|
if (rf & 1) {
|
|
15954
16154
|
i0__namespace.ɵɵelementStart(0, "div", 35);
|
|
@@ -15966,7 +16166,7 @@
|
|
|
15966
16166
|
}
|
|
15967
16167
|
if (rf & 2) {
|
|
15968
16168
|
var ctx_r7 = i0__namespace.ɵɵnextContext(2);
|
|
15969
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(2, _c0$
|
|
16169
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(2, _c0$F, !!ctx_r7.caseReasonCommentsError));
|
|
15970
16170
|
i0__namespace.ɵɵadvance(3);
|
|
15971
16171
|
i0__namespace.ɵɵproperty("ngIf", ctx_r7.caseReasonCommentsError);
|
|
15972
16172
|
}
|
|
@@ -16023,11 +16223,11 @@
|
|
|
16023
16223
|
var ctx_r0 = i0__namespace.ɵɵnextContext();
|
|
16024
16224
|
i0__namespace.ɵɵproperty("formGroup", ctx_r0.linkCaseForm);
|
|
16025
16225
|
i0__namespace.ɵɵadvance(1);
|
|
16026
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$
|
|
16226
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$F, !!ctx_r0.caseNumberError));
|
|
16027
16227
|
i0__namespace.ɵɵadvance(3);
|
|
16028
16228
|
i0__namespace.ɵɵproperty("ngIf", ctx_r0.caseNumberError);
|
|
16029
16229
|
i0__namespace.ɵɵadvance(2);
|
|
16030
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c0$
|
|
16230
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c0$F, !!ctx_r0.caseReasonError));
|
|
16031
16231
|
i0__namespace.ɵɵadvance(5);
|
|
16032
16232
|
i0__namespace.ɵɵproperty("ngIf", ctx_r0.caseReasonError);
|
|
16033
16233
|
i0__namespace.ɵɵadvance(2);
|
|
@@ -16461,7 +16661,7 @@
|
|
|
16461
16661
|
i0__namespace.ɵɵadvance(4);
|
|
16462
16662
|
i0__namespace.ɵɵproperty("ngIf", ctx.linkCaseForm);
|
|
16463
16663
|
i0__namespace.ɵɵadvance(4);
|
|
16464
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(9, _c0$
|
|
16664
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(9, _c0$F, !!ctx.noSelectedCaseError));
|
|
16465
16665
|
i0__namespace.ɵɵadvance(1);
|
|
16466
16666
|
i0__namespace.ɵɵproperty("ngIf", ctx.noSelectedCaseError);
|
|
16467
16667
|
i0__namespace.ɵɵadvance(18);
|
|
@@ -16942,6 +17142,7 @@
|
|
|
16942
17142
|
searchCases.forEach(function (response) {
|
|
16943
17143
|
casesResponse.push(_this.mapResponse(response));
|
|
16944
17144
|
});
|
|
17145
|
+
casesResponse = _this.sortReasonCodes(casesResponse);
|
|
16945
17146
|
_this.linkedCasesFromResponse = _this.sortLinkedCasesByReasonCode(casesResponse);
|
|
16946
17147
|
_this.isLoaded = true;
|
|
16947
17148
|
var caseLinks = _this.linkedCasesFromResponse.map(function (item) {
|
|
@@ -16967,6 +17168,30 @@
|
|
|
16967
17168
|
});
|
|
16968
17169
|
}
|
|
16969
17170
|
};
|
|
17171
|
+
LinkedCasesToTableComponent.prototype.sortReasonCodes = function (searchCasesResponse) {
|
|
17172
|
+
var _this = this;
|
|
17173
|
+
searchCasesResponse.forEach(function (item) {
|
|
17174
|
+
var _a;
|
|
17175
|
+
if ((_a = item === null || item === void 0 ? void 0 : item.reasons) === null || _a === void 0 ? void 0 : _a.length) {
|
|
17176
|
+
item.reasons.forEach(function (reason) {
|
|
17177
|
+
reason.sortOrder = _this.getReasonSortOrder(reason.value.Reason);
|
|
17178
|
+
});
|
|
17179
|
+
item.reasons = item.reasons.sort(function (a, b) { return a.sortOrder - b.sortOrder; });
|
|
17180
|
+
item.sortOrder = item.reasons[0].sortOrder;
|
|
17181
|
+
}
|
|
17182
|
+
});
|
|
17183
|
+
searchCasesResponse = searchCasesResponse === null || searchCasesResponse === void 0 ? void 0 : searchCasesResponse.sort(function (a, b) { return a.sortOrder - b.sortOrder; });
|
|
17184
|
+
return searchCasesResponse;
|
|
17185
|
+
};
|
|
17186
|
+
LinkedCasesToTableComponent.prototype.getReasonSortOrder = function (reasonCode) {
|
|
17187
|
+
if (reasonCode === LinkedCasesToTableComponent.CASE_PROGRESS_REASON_CODE) {
|
|
17188
|
+
return 1;
|
|
17189
|
+
}
|
|
17190
|
+
else if (reasonCode === LinkedCasesToTableComponent.CASE_CONSOLIDATED_REASON_CODE) {
|
|
17191
|
+
return 2;
|
|
17192
|
+
}
|
|
17193
|
+
return 3;
|
|
17194
|
+
};
|
|
16970
17195
|
LinkedCasesToTableComponent.prototype.searchCasesByCaseIds = function (searchCasesResponse) {
|
|
16971
17196
|
return rxjs.forkJoin(searchCasesResponse);
|
|
16972
17197
|
};
|
|
@@ -17145,7 +17370,7 @@
|
|
|
17145
17370
|
i0__namespace.ɵɵtextInterpolate2(" ", case_r4.caseName, " ", i0__namespace.ɵɵpipeBind1(4, 6, case_r4.caseReference), " ");
|
|
17146
17371
|
}
|
|
17147
17372
|
}
|
|
17148
|
-
var _c0$
|
|
17373
|
+
var _c0$E = function (a0) { return { "govuk-form-group--error": a0 }; };
|
|
17149
17374
|
function UnLinkCasesComponent_div_0_div_4_Template(rf, ctx) {
|
|
17150
17375
|
if (rf & 1) {
|
|
17151
17376
|
i0__namespace.ɵɵelementStart(0, "div", 7);
|
|
@@ -17157,7 +17382,7 @@
|
|
|
17157
17382
|
}
|
|
17158
17383
|
if (rf & 2) {
|
|
17159
17384
|
var ctx_r1 = i0__namespace.ɵɵnextContext(2);
|
|
17160
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4, _c0$
|
|
17385
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4, _c0$E, ctx_r1.unlinkErrorMessage))("formGroup", ctx_r1.unlinkCaseForm);
|
|
17161
17386
|
i0__namespace.ɵɵadvance(1);
|
|
17162
17387
|
i0__namespace.ɵɵproperty("ngIf", ctx_r1.unlinkErrorMessage);
|
|
17163
17388
|
i0__namespace.ɵɵadvance(2);
|
|
@@ -17333,6 +17558,7 @@
|
|
|
17333
17558
|
}] });
|
|
17334
17559
|
})();
|
|
17335
17560
|
|
|
17561
|
+
// tslint:disable:variable-name
|
|
17336
17562
|
var LinkCaseReason = /** @class */ (function () {
|
|
17337
17563
|
function LinkCaseReason() {
|
|
17338
17564
|
}
|
|
@@ -17491,7 +17717,7 @@
|
|
|
17491
17717
|
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'; });
|
|
17492
17718
|
}
|
|
17493
17719
|
this.isServerJurisdictionError = this.linkedCasesService.serverJurisdictionError || false;
|
|
17494
|
-
var reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() +
|
|
17720
|
+
var reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() + "/lov/categories/CaseLinkingReasonCode";
|
|
17495
17721
|
this.commonDataService.getRefData(reasonCodeAPIurl).subscribe({
|
|
17496
17722
|
next: function (reasons) {
|
|
17497
17723
|
_this.reasonListLoaded = true;
|
|
@@ -17598,87 +17824,52 @@
|
|
|
17598
17824
|
}], function () { return [{ type: i1__namespace$1.ActivatedRoute }, { type: i1__namespace$1.Router }, { type: LinkedCasesService }, { type: AbstractAppConfig }, { type: CommonDataService }]; }, null);
|
|
17599
17825
|
})();
|
|
17600
17826
|
|
|
17601
|
-
function
|
|
17827
|
+
function WriteLinkedCasesFieldComponent_ng_container_2_Template(rf, ctx) {
|
|
17602
17828
|
if (rf & 1) {
|
|
17603
|
-
var
|
|
17604
|
-
i0__namespace.ɵɵ
|
|
17605
|
-
i0__namespace.ɵɵelementStart(1, "
|
|
17606
|
-
i0__namespace.ɵɵ
|
|
17607
|
-
i0__namespace.ɵɵelementStart(3, "a", 9);
|
|
17608
|
-
i0__namespace.ɵɵlistener("click", function WriteLinkedCasesFieldComponent_div_0_div_3_Template_a_click_3_listener() { i0__namespace.ɵɵrestoreView(_r9_1); var errorMessage_r7 = ctx.$implicit; var ctx_r8 = i0__namespace.ɵɵnextContext(2); return ctx_r8.navigateToErrorElement(errorMessage_r7.fieldId); });
|
|
17609
|
-
i0__namespace.ɵɵtext(4);
|
|
17610
|
-
i0__namespace.ɵɵelementEnd();
|
|
17611
|
-
i0__namespace.ɵɵelementEnd();
|
|
17612
|
-
i0__namespace.ɵɵelementEnd();
|
|
17613
|
-
i0__namespace.ɵɵelementEnd();
|
|
17614
|
-
}
|
|
17615
|
-
if (rf & 2) {
|
|
17616
|
-
var errorMessage_r7 = ctx.$implicit;
|
|
17617
|
-
i0__namespace.ɵɵadvance(4);
|
|
17618
|
-
i0__namespace.ɵɵtextInterpolate(errorMessage_r7.description);
|
|
17619
|
-
}
|
|
17620
|
-
}
|
|
17621
|
-
function WriteLinkedCasesFieldComponent_div_0_Template(rf, ctx) {
|
|
17622
|
-
if (rf & 1) {
|
|
17623
|
-
i0__namespace.ɵɵelementStart(0, "div", 4);
|
|
17624
|
-
i0__namespace.ɵɵelementStart(1, "h2", 5);
|
|
17625
|
-
i0__namespace.ɵɵtext(2, " There is a problem ");
|
|
17626
|
-
i0__namespace.ɵɵelementEnd();
|
|
17627
|
-
i0__namespace.ɵɵtemplate(3, WriteLinkedCasesFieldComponent_div_0_div_3_Template, 5, 1, "div", 6);
|
|
17829
|
+
var _r6_1 = i0__namespace.ɵɵgetCurrentView();
|
|
17830
|
+
i0__namespace.ɵɵelementContainerStart(0);
|
|
17831
|
+
i0__namespace.ɵɵelementStart(1, "ccd-linked-cases-before-you-start", 3);
|
|
17832
|
+
i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesFieldComponent_ng_container_2_Template_ccd_linked_cases_before_you_start_linkedCasesStateEmitter_1_listener($event) { i0__namespace.ɵɵrestoreView(_r6_1); var ctx_r5 = i0__namespace.ɵɵnextContext(); return ctx_r5.onLinkedCasesStateEmitted($event); });
|
|
17628
17833
|
i0__namespace.ɵɵelementEnd();
|
|
17629
|
-
|
|
17630
|
-
if (rf & 2) {
|
|
17631
|
-
var ctx_r0 = i0__namespace.ɵɵnextContext();
|
|
17632
|
-
i0__namespace.ɵɵadvance(3);
|
|
17633
|
-
i0__namespace.ɵɵproperty("ngForOf", ctx_r0.errorMessages);
|
|
17834
|
+
i0__namespace.ɵɵelementContainerEnd();
|
|
17634
17835
|
}
|
|
17635
17836
|
}
|
|
17636
17837
|
function WriteLinkedCasesFieldComponent_ng_container_3_Template(rf, ctx) {
|
|
17637
17838
|
if (rf & 1) {
|
|
17638
|
-
var
|
|
17839
|
+
var _r8_1 = i0__namespace.ɵɵgetCurrentView();
|
|
17639
17840
|
i0__namespace.ɵɵelementContainerStart(0);
|
|
17640
|
-
i0__namespace.ɵɵelementStart(1, "ccd-linked-cases
|
|
17641
|
-
i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function
|
|
17841
|
+
i0__namespace.ɵɵelementStart(1, "ccd-no-linked-cases", 3);
|
|
17842
|
+
i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesFieldComponent_ng_container_3_Template_ccd_no_linked_cases_linkedCasesStateEmitter_1_listener($event) { i0__namespace.ɵɵrestoreView(_r8_1); var ctx_r7 = i0__namespace.ɵɵnextContext(); return ctx_r7.onLinkedCasesStateEmitted($event); });
|
|
17642
17843
|
i0__namespace.ɵɵelementEnd();
|
|
17643
17844
|
i0__namespace.ɵɵelementContainerEnd();
|
|
17644
17845
|
}
|
|
17645
17846
|
}
|
|
17646
17847
|
function WriteLinkedCasesFieldComponent_ng_container_4_Template(rf, ctx) {
|
|
17647
17848
|
if (rf & 1) {
|
|
17648
|
-
var
|
|
17849
|
+
var _r10_1 = i0__namespace.ɵɵgetCurrentView();
|
|
17649
17850
|
i0__namespace.ɵɵelementContainerStart(0);
|
|
17650
|
-
i0__namespace.ɵɵelementStart(1, "ccd-
|
|
17651
|
-
i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function
|
|
17851
|
+
i0__namespace.ɵɵelementStart(1, "ccd-link-cases", 3);
|
|
17852
|
+
i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesFieldComponent_ng_container_4_Template_ccd_link_cases_linkedCasesStateEmitter_1_listener($event) { i0__namespace.ɵɵrestoreView(_r10_1); var ctx_r9 = i0__namespace.ɵɵnextContext(); return ctx_r9.onLinkedCasesStateEmitted($event); });
|
|
17652
17853
|
i0__namespace.ɵɵelementEnd();
|
|
17653
17854
|
i0__namespace.ɵɵelementContainerEnd();
|
|
17654
17855
|
}
|
|
17655
17856
|
}
|
|
17656
17857
|
function WriteLinkedCasesFieldComponent_ng_container_5_Template(rf, ctx) {
|
|
17657
17858
|
if (rf & 1) {
|
|
17658
|
-
var
|
|
17859
|
+
var _r12_1 = i0__namespace.ɵɵgetCurrentView();
|
|
17659
17860
|
i0__namespace.ɵɵelementContainerStart(0);
|
|
17660
|
-
i0__namespace.ɵɵelementStart(1, "ccd-
|
|
17661
|
-
i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function
|
|
17861
|
+
i0__namespace.ɵɵelementStart(1, "ccd-unlink-cases", 3);
|
|
17862
|
+
i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesFieldComponent_ng_container_5_Template_ccd_unlink_cases_linkedCasesStateEmitter_1_listener($event) { i0__namespace.ɵɵrestoreView(_r12_1); var ctx_r11 = i0__namespace.ɵɵnextContext(); return ctx_r11.onLinkedCasesStateEmitted($event); });
|
|
17662
17863
|
i0__namespace.ɵɵelementEnd();
|
|
17663
17864
|
i0__namespace.ɵɵelementContainerEnd();
|
|
17664
17865
|
}
|
|
17665
17866
|
}
|
|
17666
17867
|
function WriteLinkedCasesFieldComponent_ng_container_6_Template(rf, ctx) {
|
|
17667
17868
|
if (rf & 1) {
|
|
17668
|
-
var
|
|
17669
|
-
i0__namespace.ɵɵelementContainerStart(0);
|
|
17670
|
-
i0__namespace.ɵɵelementStart(1, "ccd-unlink-cases", 10);
|
|
17671
|
-
i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesFieldComponent_ng_container_6_Template_ccd_unlink_cases_linkedCasesStateEmitter_1_listener($event) { i0__namespace.ɵɵrestoreView(_r17_1); var ctx_r16 = i0__namespace.ɵɵnextContext(); return ctx_r16.onLinkedCasesStateEmitted($event); });
|
|
17672
|
-
i0__namespace.ɵɵelementEnd();
|
|
17673
|
-
i0__namespace.ɵɵelementContainerEnd();
|
|
17674
|
-
}
|
|
17675
|
-
}
|
|
17676
|
-
function WriteLinkedCasesFieldComponent_ng_container_7_Template(rf, ctx) {
|
|
17677
|
-
if (rf & 1) {
|
|
17678
|
-
var _r19_1 = i0__namespace.ɵɵgetCurrentView();
|
|
17869
|
+
var _r14_1 = i0__namespace.ɵɵgetCurrentView();
|
|
17679
17870
|
i0__namespace.ɵɵelementContainerStart(0);
|
|
17680
|
-
i0__namespace.ɵɵelementStart(1, "ccd-linked-cases-check-your-answers",
|
|
17681
|
-
i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function
|
|
17871
|
+
i0__namespace.ɵɵelementStart(1, "ccd-linked-cases-check-your-answers", 3);
|
|
17872
|
+
i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesFieldComponent_ng_container_6_Template_ccd_linked_cases_check_your_answers_linkedCasesStateEmitter_1_listener($event) { i0__namespace.ɵɵrestoreView(_r14_1); var ctx_r13 = i0__namespace.ɵɵnextContext(); return ctx_r13.onLinkedCasesStateEmitted($event); });
|
|
17682
17873
|
i0__namespace.ɵɵelementEnd();
|
|
17683
17874
|
i0__namespace.ɵɵelementContainerEnd();
|
|
17684
17875
|
}
|
|
@@ -17695,11 +17886,13 @@
|
|
|
17695
17886
|
_this.linkedCasesPages = exports.LinkedCasesPages;
|
|
17696
17887
|
_this.linkedCasesEventTriggers = exports.LinkedCasesEventTriggers;
|
|
17697
17888
|
_this.linkedCases = [];
|
|
17698
|
-
_this.errorMessages = [];
|
|
17699
17889
|
return _this;
|
|
17700
17890
|
}
|
|
17701
17891
|
WriteLinkedCasesFieldComponent.prototype.ngOnInit = function () {
|
|
17702
17892
|
var _this = this;
|
|
17893
|
+
// This is required to enable Continue button validation
|
|
17894
|
+
// Continue button should be enabled only at check your answers page
|
|
17895
|
+
this.caseEditDataService.setLinkedCasesJourneyAtFinalStep(false);
|
|
17703
17896
|
// Clear validation errors
|
|
17704
17897
|
this.caseEditDataService.clearFormValidationErrors();
|
|
17705
17898
|
// Get linked case reasons from ref data
|
|
@@ -17736,11 +17929,10 @@
|
|
|
17736
17929
|
};
|
|
17737
17930
|
WriteLinkedCasesFieldComponent.prototype.onLinkedCasesStateEmitted = function (linkedCasesState) {
|
|
17738
17931
|
var _this = this;
|
|
17739
|
-
|
|
17932
|
+
// Clear validation errors
|
|
17740
17933
|
this.caseEditDataService.clearFormValidationErrors();
|
|
17741
17934
|
if (linkedCasesState.navigateToNextPage) {
|
|
17742
17935
|
this.linkedCasesPage = this.getNextPage(linkedCasesState);
|
|
17743
|
-
this.setContinueButtonValidationErrorMessage();
|
|
17744
17936
|
this.proceedToNextPage();
|
|
17745
17937
|
}
|
|
17746
17938
|
else {
|
|
@@ -17753,7 +17945,7 @@
|
|
|
17753
17945
|
};
|
|
17754
17946
|
WriteLinkedCasesFieldComponent.prototype.getLinkedCaseReasons = function () {
|
|
17755
17947
|
var _this = this;
|
|
17756
|
-
var reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() +
|
|
17948
|
+
var reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() + "/lov/categories/CaseLinkingReasonCode";
|
|
17757
17949
|
this.commonDataService.getRefData(reasonCodeAPIurl).subscribe({
|
|
17758
17950
|
next: function (reasons) {
|
|
17759
17951
|
// Sort in ascending order
|
|
@@ -17764,27 +17956,19 @@
|
|
|
17764
17956
|
}
|
|
17765
17957
|
});
|
|
17766
17958
|
};
|
|
17767
|
-
WriteLinkedCasesFieldComponent.prototype.setContinueButtonValidationErrorMessage = function () {
|
|
17768
|
-
var errorMessage = this.linkedCasesService.isLinkedCasesEventTrigger
|
|
17769
|
-
? exports.LinkedCasesErrorMessages.LinkCasesNavigationError
|
|
17770
|
-
: exports.LinkedCasesErrorMessages.UnlinkCasesNavigationError;
|
|
17771
|
-
var buttonId = this.linkedCasesService.linkedCases.length === 0
|
|
17772
|
-
? 'back-button'
|
|
17773
|
-
: 'next-button';
|
|
17774
|
-
this.caseEditDataService.setCaseLinkError({
|
|
17775
|
-
componentId: buttonId,
|
|
17776
|
-
errorMessage: errorMessage
|
|
17777
|
-
});
|
|
17778
|
-
};
|
|
17779
17959
|
WriteLinkedCasesFieldComponent.prototype.proceedToNextPage = function () {
|
|
17780
17960
|
if (this.isAtFinalPage()) {
|
|
17781
17961
|
// Continue button event must be allowed in final page
|
|
17782
|
-
this.caseEditDataService.
|
|
17962
|
+
this.caseEditDataService.setLinkedCasesJourneyAtFinalStep(true);
|
|
17783
17963
|
// Trigger validation to clear the "notAtFinalPage" error if now at the final state
|
|
17784
17964
|
this.formGroup.updateValueAndValidity();
|
|
17785
17965
|
// update form value
|
|
17786
17966
|
this.submitLinkedCases();
|
|
17787
17967
|
}
|
|
17968
|
+
else {
|
|
17969
|
+
// Continue button event must not be allowed if not in final page
|
|
17970
|
+
this.caseEditDataService.setLinkedCasesJourneyAtFinalStep(false);
|
|
17971
|
+
}
|
|
17788
17972
|
};
|
|
17789
17973
|
WriteLinkedCasesFieldComponent.prototype.submitLinkedCases = function () {
|
|
17790
17974
|
if (!this.linkedCasesService.isLinkedCasesEventTrigger) {
|
|
@@ -17812,11 +17996,10 @@
|
|
|
17812
17996
|
var _this = this;
|
|
17813
17997
|
this.casesService.getCaseViewV2(this.linkedCasesService.caseId).subscribe(function (caseView) {
|
|
17814
17998
|
var caseViewFiltered = caseView.tabs.filter(function (tab) {
|
|
17815
|
-
|
|
17999
|
+
return tab.fields.some(function (_b) {
|
|
17816
18000
|
var field_type = _b.field_type;
|
|
17817
18001
|
return field_type && field_type.collection_field_type && field_type.collection_field_type.id === 'CaseLink';
|
|
17818
18002
|
});
|
|
17819
|
-
return linkField;
|
|
17820
18003
|
});
|
|
17821
18004
|
if (caseViewFiltered) {
|
|
17822
18005
|
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; });
|
|
@@ -17829,38 +18012,24 @@
|
|
|
17829
18012
|
&& !_this.linkedCasesService.serverLinkedApiError)
|
|
17830
18013
|
? exports.LinkedCasesPages.BEFORE_YOU_START
|
|
17831
18014
|
: exports.LinkedCasesPages.NO_LINKED_CASES;
|
|
17832
|
-
// Initialise the error to be displayed when clicked on Continue button
|
|
17833
|
-
_this.setContinueButtonValidationErrorMessage();
|
|
17834
18015
|
});
|
|
17835
18016
|
};
|
|
17836
|
-
WriteLinkedCasesFieldComponent.prototype.navigateToErrorElement = function (elementId) {
|
|
17837
|
-
if (elementId) {
|
|
17838
|
-
var htmlElement = document.getElementById(elementId);
|
|
17839
|
-
if (htmlElement) {
|
|
17840
|
-
htmlElement.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
|
17841
|
-
htmlElement.focus();
|
|
17842
|
-
}
|
|
17843
|
-
}
|
|
17844
|
-
};
|
|
17845
18017
|
return WriteLinkedCasesFieldComponent;
|
|
17846
18018
|
}(AbstractFieldWriteComponent));
|
|
17847
18019
|
WriteLinkedCasesFieldComponent.ɵfac = function WriteLinkedCasesFieldComponent_Factory(t) { return new (t || WriteLinkedCasesFieldComponent)(i0__namespace.ɵɵdirectiveInject(AbstractAppConfig), i0__namespace.ɵɵdirectiveInject(CommonDataService), i0__namespace.ɵɵdirectiveInject(CasesService), i0__namespace.ɵɵdirectiveInject(LinkedCasesService), i0__namespace.ɵɵdirectiveInject(CaseEditDataService)); };
|
|
17848
|
-
WriteLinkedCasesFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WriteLinkedCasesFieldComponent, selectors: [["ccd-write-linked-cases-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls:
|
|
18020
|
+
WriteLinkedCasesFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WriteLinkedCasesFieldComponent, selectors: [["ccd-write-linked-cases-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 7, vars: 7, consts: [[1, "form-group", "govuk-!-margin-bottom-2", 3, "formGroup"], [1, "govuk-form-group", 3, "ngSwitch"], [4, "ngSwitchCase"], [3, "linkedCasesStateEmitter"]], template: function WriteLinkedCasesFieldComponent_Template(rf, ctx) {
|
|
17849
18021
|
if (rf & 1) {
|
|
17850
|
-
i0__namespace.ɵɵ
|
|
18022
|
+
i0__namespace.ɵɵelementStart(0, "div", 0);
|
|
17851
18023
|
i0__namespace.ɵɵelementStart(1, "div", 1);
|
|
17852
|
-
i0__namespace.ɵɵ
|
|
17853
|
-
i0__namespace.ɵɵtemplate(3, WriteLinkedCasesFieldComponent_ng_container_3_Template, 2, 0, "ng-container",
|
|
17854
|
-
i0__namespace.ɵɵtemplate(4, WriteLinkedCasesFieldComponent_ng_container_4_Template, 2, 0, "ng-container",
|
|
17855
|
-
i0__namespace.ɵɵtemplate(5, WriteLinkedCasesFieldComponent_ng_container_5_Template, 2, 0, "ng-container",
|
|
17856
|
-
i0__namespace.ɵɵtemplate(6, WriteLinkedCasesFieldComponent_ng_container_6_Template, 2, 0, "ng-container",
|
|
17857
|
-
i0__namespace.ɵɵtemplate(7, WriteLinkedCasesFieldComponent_ng_container_7_Template, 2, 0, "ng-container", 3);
|
|
18024
|
+
i0__namespace.ɵɵtemplate(2, WriteLinkedCasesFieldComponent_ng_container_2_Template, 2, 0, "ng-container", 2);
|
|
18025
|
+
i0__namespace.ɵɵtemplate(3, WriteLinkedCasesFieldComponent_ng_container_3_Template, 2, 0, "ng-container", 2);
|
|
18026
|
+
i0__namespace.ɵɵtemplate(4, WriteLinkedCasesFieldComponent_ng_container_4_Template, 2, 0, "ng-container", 2);
|
|
18027
|
+
i0__namespace.ɵɵtemplate(5, WriteLinkedCasesFieldComponent_ng_container_5_Template, 2, 0, "ng-container", 2);
|
|
18028
|
+
i0__namespace.ɵɵtemplate(6, WriteLinkedCasesFieldComponent_ng_container_6_Template, 2, 0, "ng-container", 2);
|
|
17858
18029
|
i0__namespace.ɵɵelementEnd();
|
|
17859
18030
|
i0__namespace.ɵɵelementEnd();
|
|
17860
18031
|
}
|
|
17861
18032
|
if (rf & 2) {
|
|
17862
|
-
i0__namespace.ɵɵproperty("ngIf", ctx.errorMessages.length > 0);
|
|
17863
|
-
i0__namespace.ɵɵadvance(1);
|
|
17864
18033
|
i0__namespace.ɵɵproperty("formGroup", ctx.formGroup);
|
|
17865
18034
|
i0__namespace.ɵɵadvance(1);
|
|
17866
18035
|
i0__namespace.ɵɵproperty("ngSwitch", ctx.linkedCasesPage);
|
|
@@ -18099,7 +18268,7 @@
|
|
|
18099
18268
|
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.moneyGbpControl.errors, ctx_r2.caseField.label));
|
|
18100
18269
|
}
|
|
18101
18270
|
}
|
|
18102
|
-
var _c0$
|
|
18271
|
+
var _c0$D = function (a0) { return { "form-group-error": a0 }; };
|
|
18103
18272
|
var WriteMoneyGbpFieldComponent = /** @class */ (function (_super) {
|
|
18104
18273
|
__extends(WriteMoneyGbpFieldComponent, _super);
|
|
18105
18274
|
function WriteMoneyGbpFieldComponent() {
|
|
@@ -18129,7 +18298,7 @@
|
|
|
18129
18298
|
i0__namespace.ɵɵelementEnd();
|
|
18130
18299
|
}
|
|
18131
18300
|
if (rf & 2) {
|
|
18132
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(11, _c0$
|
|
18301
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(11, _c0$D, !ctx.moneyGbpControl.valid && (ctx.moneyGbpControl.dirty || ctx.moneyGbpControl.touched)));
|
|
18133
18302
|
i0__namespace.ɵɵadvance(1);
|
|
18134
18303
|
i0__namespace.ɵɵproperty("for", ctx.id());
|
|
18135
18304
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -18277,7 +18446,7 @@
|
|
|
18277
18446
|
i0__namespace.ɵɵtextInterpolate(checkbox_r4.label);
|
|
18278
18447
|
}
|
|
18279
18448
|
}
|
|
18280
|
-
var _c0$
|
|
18449
|
+
var _c0$C = function (a0) { return { "error": a0 }; };
|
|
18281
18450
|
var WriteMultiSelectListFieldComponent = /** @class */ (function (_super) {
|
|
18282
18451
|
__extends(WriteMultiSelectListFieldComponent, _super);
|
|
18283
18452
|
function WriteMultiSelectListFieldComponent() {
|
|
@@ -18341,7 +18510,7 @@
|
|
|
18341
18510
|
i0__namespace.ɵɵelementEnd();
|
|
18342
18511
|
}
|
|
18343
18512
|
if (rf & 2) {
|
|
18344
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$
|
|
18513
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$C, !ctx.checkboxes.valid && (ctx.checkboxes.dirty || ctx.checkboxes.touched)))("id", ctx.id());
|
|
18345
18514
|
i0__namespace.ɵɵadvance(3);
|
|
18346
18515
|
i0__namespace.ɵɵproperty("ngIf", ctx.caseField.label);
|
|
18347
18516
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -18432,7 +18601,7 @@
|
|
|
18432
18601
|
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.numberControl.errors, ctx_r2.caseField.label));
|
|
18433
18602
|
}
|
|
18434
18603
|
}
|
|
18435
|
-
var _c0$
|
|
18604
|
+
var _c0$B = function (a0) { return { "form-group-error": a0 }; };
|
|
18436
18605
|
var _c1$e = function (a0) { return { "govuk-input--error": a0 }; };
|
|
18437
18606
|
var WriteNumberFieldComponent = /** @class */ (function (_super) {
|
|
18438
18607
|
__extends(WriteNumberFieldComponent, _super);
|
|
@@ -18457,7 +18626,7 @@
|
|
|
18457
18626
|
i0__namespace.ɵɵelementEnd();
|
|
18458
18627
|
}
|
|
18459
18628
|
if (rf & 2) {
|
|
18460
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$
|
|
18629
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$B, !ctx.numberControl.valid && ctx.numberControl.dirty));
|
|
18461
18630
|
i0__namespace.ɵɵadvance(1);
|
|
18462
18631
|
i0__namespace.ɵɵproperty("for", ctx.id());
|
|
18463
18632
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -18758,7 +18927,7 @@
|
|
|
18758
18927
|
i0__namespace.ɵɵelementEnd();
|
|
18759
18928
|
}
|
|
18760
18929
|
}
|
|
18761
|
-
var _c0$
|
|
18930
|
+
var _c0$A = function (a0) { return { "scroll-container ": a0 }; };
|
|
18762
18931
|
function WriteOrganisationFieldComponent_fieldset_3_div_14_Template(rf, ctx) {
|
|
18763
18932
|
if (rf & 1) {
|
|
18764
18933
|
i0__namespace.ɵɵelementStart(0, "div", 26);
|
|
@@ -18774,7 +18943,7 @@
|
|
|
18774
18943
|
var ctx_r2 = i0__namespace.ɵɵnextContext(2);
|
|
18775
18944
|
var tmp_0_0 = null;
|
|
18776
18945
|
var tmp_2_0 = null;
|
|
18777
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(11, _c0$
|
|
18946
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(11, _c0$A, ((tmp_0_0 = i0__namespace.ɵɵpipeBind1(1, 3, ctx_r2.simpleOrganisations$)) == null ? null : tmp_0_0.length) > 10));
|
|
18778
18947
|
i0__namespace.ɵɵadvance(2);
|
|
18779
18948
|
i0__namespace.ɵɵproperty("ngForOf", i0__namespace.ɵɵpipeBind1(3, 5, ctx_r2.simpleOrganisations$));
|
|
18780
18949
|
i0__namespace.ɵɵadvance(2);
|
|
@@ -19181,231 +19350,6 @@
|
|
|
19181
19350
|
}], function () { return [{ type: AbstractAppConfig }, { type: SessionStorageService }]; }, null);
|
|
19182
19351
|
})();
|
|
19183
19352
|
|
|
19184
|
-
function ReadDynamicMultiSelectListFieldComponent_div_0_Template(rf, ctx) {
|
|
19185
|
-
if (rf & 1) {
|
|
19186
|
-
i0__namespace.ɵɵelementStart(0, "div");
|
|
19187
|
-
i0__namespace.ɵɵtext(1);
|
|
19188
|
-
i0__namespace.ɵɵpipe(2, "ccdFixedList");
|
|
19189
|
-
i0__namespace.ɵɵelementEnd();
|
|
19190
|
-
}
|
|
19191
|
-
if (rf & 2) {
|
|
19192
|
-
var value_r1 = ctx.$implicit;
|
|
19193
|
-
var ctx_r0 = i0__namespace.ɵɵnextContext();
|
|
19194
|
-
i0__namespace.ɵɵadvance(1);
|
|
19195
|
-
i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind2(2, 1, value_r1.code, ctx_r0.caseField.list_items), "\n");
|
|
19196
|
-
}
|
|
19197
|
-
}
|
|
19198
|
-
var ReadDynamicMultiSelectListFieldComponent = /** @class */ (function (_super) {
|
|
19199
|
-
__extends(ReadDynamicMultiSelectListFieldComponent, _super);
|
|
19200
|
-
function ReadDynamicMultiSelectListFieldComponent() {
|
|
19201
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
19202
|
-
}
|
|
19203
|
-
ReadDynamicMultiSelectListFieldComponent.prototype.ngOnInit = function () {
|
|
19204
|
-
/**
|
|
19205
|
-
*
|
|
19206
|
-
* Reassigning list_items from formatted_list when list_items is empty
|
|
19207
|
-
*/
|
|
19208
|
-
if (!this.caseField.list_items && this.caseField.formatted_value && this.caseField.formatted_value.list_items) {
|
|
19209
|
-
this.caseField.list_items = this.caseField.formatted_value.list_items;
|
|
19210
|
-
}
|
|
19211
|
-
if (!this.caseField.value && this.caseField.formatted_value && this.caseField.formatted_value.value) {
|
|
19212
|
-
this.caseField.value = this.caseField.formatted_value.value;
|
|
19213
|
-
}
|
|
19214
|
-
_super.prototype.ngOnInit.call(this);
|
|
19215
|
-
};
|
|
19216
|
-
return ReadDynamicMultiSelectListFieldComponent;
|
|
19217
|
-
}(AbstractFieldReadComponent));
|
|
19218
|
-
ReadDynamicMultiSelectListFieldComponent.ɵfac = function ReadDynamicMultiSelectListFieldComponent_Factory(t) { return ɵReadDynamicMultiSelectListFieldComponent_BaseFactory(t || ReadDynamicMultiSelectListFieldComponent); };
|
|
19219
|
-
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) {
|
|
19220
|
-
if (rf & 1) {
|
|
19221
|
-
i0__namespace.ɵɵtemplate(0, ReadDynamicMultiSelectListFieldComponent_div_0_Template, 3, 4, "div", 0);
|
|
19222
|
-
}
|
|
19223
|
-
if (rf & 2) {
|
|
19224
|
-
i0__namespace.ɵɵproperty("ngForOf", ctx.caseField.value);
|
|
19225
|
-
}
|
|
19226
|
-
}, 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}"] });
|
|
19227
|
-
var ɵReadDynamicMultiSelectListFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(ReadDynamicMultiSelectListFieldComponent);
|
|
19228
|
-
(function () {
|
|
19229
|
-
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ReadDynamicMultiSelectListFieldComponent, [{
|
|
19230
|
-
type: i0.Component,
|
|
19231
|
-
args: [{
|
|
19232
|
-
selector: 'ccd-read-dynamic-multi-select-list-field',
|
|
19233
|
-
templateUrl: './read-dynamic-multi-select-list-field.html',
|
|
19234
|
-
styleUrls: ['./read-dynamic-multi-select-list-field.component.scss']
|
|
19235
|
-
}]
|
|
19236
|
-
}], null, null);
|
|
19237
|
-
})();
|
|
19238
|
-
|
|
19239
|
-
function WriteDynamicMultiSelectListFieldComponent_span_3_Template(rf, ctx) {
|
|
19240
|
-
if (rf & 1) {
|
|
19241
|
-
i0__namespace.ɵɵelementStart(0, "span", 5);
|
|
19242
|
-
i0__namespace.ɵɵtext(1);
|
|
19243
|
-
i0__namespace.ɵɵpipe(2, "ccdFieldLabel");
|
|
19244
|
-
i0__namespace.ɵɵelementEnd();
|
|
19245
|
-
}
|
|
19246
|
-
if (rf & 2) {
|
|
19247
|
-
var ctx_r0 = i0__namespace.ɵɵnextContext();
|
|
19248
|
-
i0__namespace.ɵɵadvance(1);
|
|
19249
|
-
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r0.caseField));
|
|
19250
|
-
}
|
|
19251
|
-
}
|
|
19252
|
-
function WriteDynamicMultiSelectListFieldComponent_span_4_Template(rf, ctx) {
|
|
19253
|
-
if (rf & 1) {
|
|
19254
|
-
i0__namespace.ɵɵelementStart(0, "span", 6);
|
|
19255
|
-
i0__namespace.ɵɵtext(1);
|
|
19256
|
-
i0__namespace.ɵɵelementEnd();
|
|
19257
|
-
}
|
|
19258
|
-
if (rf & 2) {
|
|
19259
|
-
var ctx_r1 = i0__namespace.ɵɵnextContext();
|
|
19260
|
-
i0__namespace.ɵɵadvance(1);
|
|
19261
|
-
i0__namespace.ɵɵtextInterpolate(ctx_r1.caseField.hint_text);
|
|
19262
|
-
}
|
|
19263
|
-
}
|
|
19264
|
-
function WriteDynamicMultiSelectListFieldComponent_span_5_Template(rf, ctx) {
|
|
19265
|
-
if (rf & 1) {
|
|
19266
|
-
i0__namespace.ɵɵelementStart(0, "span", 7);
|
|
19267
|
-
i0__namespace.ɵɵtext(1);
|
|
19268
|
-
i0__namespace.ɵɵpipe(2, "ccdFirstError");
|
|
19269
|
-
i0__namespace.ɵɵelementEnd();
|
|
19270
|
-
}
|
|
19271
|
-
if (rf & 2) {
|
|
19272
|
-
var ctx_r2 = i0__namespace.ɵɵnextContext();
|
|
19273
|
-
i0__namespace.ɵɵadvance(1);
|
|
19274
|
-
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r2.checkboxes.errors));
|
|
19275
|
-
}
|
|
19276
|
-
}
|
|
19277
|
-
function WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template(rf, ctx) {
|
|
19278
|
-
if (rf & 1) {
|
|
19279
|
-
var _r6_1 = i0__namespace.ɵɵgetCurrentView();
|
|
19280
|
-
i0__namespace.ɵɵelementContainerStart(0);
|
|
19281
|
-
i0__namespace.ɵɵelementStart(1, "div", 8);
|
|
19282
|
-
i0__namespace.ɵɵelementStart(2, "input", 9);
|
|
19283
|
-
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); });
|
|
19284
|
-
i0__namespace.ɵɵelementEnd();
|
|
19285
|
-
i0__namespace.ɵɵelementStart(3, "label", 10);
|
|
19286
|
-
i0__namespace.ɵɵtext(4);
|
|
19287
|
-
i0__namespace.ɵɵelementEnd();
|
|
19288
|
-
i0__namespace.ɵɵelementEnd();
|
|
19289
|
-
i0__namespace.ɵɵelementContainerEnd();
|
|
19290
|
-
}
|
|
19291
|
-
if (rf & 2) {
|
|
19292
|
-
var checkbox_r4 = ctx.$implicit;
|
|
19293
|
-
var ctx_r3 = i0__namespace.ɵɵnextContext();
|
|
19294
|
-
i0__namespace.ɵɵadvance(2);
|
|
19295
|
-
i0__namespace.ɵɵpropertyInterpolate("id", ctx_r3.createElementId(checkbox_r4.code));
|
|
19296
|
-
i0__namespace.ɵɵpropertyInterpolate("name", ctx_r3.id());
|
|
19297
|
-
i0__namespace.ɵɵproperty("value", checkbox_r4.code)("checked", ctx_r3.isSelected(checkbox_r4.code));
|
|
19298
|
-
i0__namespace.ɵɵadvance(1);
|
|
19299
|
-
i0__namespace.ɵɵpropertyInterpolate("for", ctx_r3.createElementId(checkbox_r4.code));
|
|
19300
|
-
i0__namespace.ɵɵadvance(1);
|
|
19301
|
-
i0__namespace.ɵɵtextInterpolate(checkbox_r4.label);
|
|
19302
|
-
}
|
|
19303
|
-
}
|
|
19304
|
-
var _c0$A = function (a0) { return { "error": a0 }; };
|
|
19305
|
-
var WriteDynamicMultiSelectListFieldComponent = /** @class */ (function (_super) {
|
|
19306
|
-
__extends(WriteDynamicMultiSelectListFieldComponent, _super);
|
|
19307
|
-
function WriteDynamicMultiSelectListFieldComponent() {
|
|
19308
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
19309
|
-
}
|
|
19310
|
-
WriteDynamicMultiSelectListFieldComponent.prototype.ngOnInit = function () {
|
|
19311
|
-
var _this = this;
|
|
19312
|
-
this.checkboxes = new i2.FormArray([]);
|
|
19313
|
-
this.setInitialCaseList();
|
|
19314
|
-
this.setInitialCaseFieldValue();
|
|
19315
|
-
// Initialise array with existing values
|
|
19316
|
-
if (this.caseField.value && Array.isArray(this.caseField.value)) {
|
|
19317
|
-
var values = this.caseField.value;
|
|
19318
|
-
values.forEach(function (value) {
|
|
19319
|
-
_this.checkboxes.push(new i2.FormControl(value));
|
|
19320
|
-
});
|
|
19321
|
-
}
|
|
19322
|
-
this.dynamicListFormControl = this.registerControl(new i2.FormControl(this.checkboxes.value));
|
|
19323
|
-
this.dynamicListFormControl.setValue(this.checkboxes.value);
|
|
19324
|
-
};
|
|
19325
|
-
WriteDynamicMultiSelectListFieldComponent.prototype.onCheckChange = function (event) {
|
|
19326
|
-
var _this = this;
|
|
19327
|
-
var target = event.target;
|
|
19328
|
-
if (!target || !target.value) {
|
|
19329
|
-
return;
|
|
19330
|
-
}
|
|
19331
|
-
var selectedListItem = this.getValueListItem(target.value);
|
|
19332
|
-
if (!this.isSelected(target.value)) {
|
|
19333
|
-
// Add a new control in the FormArray
|
|
19334
|
-
this.checkboxes.push(new i2.FormControl(selectedListItem));
|
|
19335
|
-
}
|
|
19336
|
-
else {
|
|
19337
|
-
// Remove the control from the FormArray
|
|
19338
|
-
this.checkboxes.controls.forEach(function (ctrl, i) {
|
|
19339
|
-
if (ctrl.value.code === target.value) {
|
|
19340
|
-
_this.checkboxes.removeAt(i);
|
|
19341
|
-
}
|
|
19342
|
-
});
|
|
19343
|
-
}
|
|
19344
|
-
this.dynamicListFormControl.setValue(this.checkboxes.value);
|
|
19345
|
-
};
|
|
19346
|
-
WriteDynamicMultiSelectListFieldComponent.prototype.isSelected = function (code) {
|
|
19347
|
-
if (this.checkboxes && this.checkboxes.controls) {
|
|
19348
|
-
return this.checkboxes.controls.find(function (control) { return control.value.code === code; });
|
|
19349
|
-
}
|
|
19350
|
-
};
|
|
19351
|
-
WriteDynamicMultiSelectListFieldComponent.prototype.getValueListItem = function (value) {
|
|
19352
|
-
return this.caseField.list_items.find(function (i) { return i.code === value; });
|
|
19353
|
-
};
|
|
19354
|
-
WriteDynamicMultiSelectListFieldComponent.prototype.setInitialCaseList = function () {
|
|
19355
|
-
var hasListItems = this.caseField.list_items && this.caseField.list_items.length > 0;
|
|
19356
|
-
var hasFormattedListItems = this.caseField.formatted_value && this.caseField.formatted_value.list_items.length > 0;
|
|
19357
|
-
if (!hasListItems && hasFormattedListItems) {
|
|
19358
|
-
this.caseField.list_items = this.caseField.formatted_value.list_items;
|
|
19359
|
-
}
|
|
19360
|
-
};
|
|
19361
|
-
WriteDynamicMultiSelectListFieldComponent.prototype.setInitialCaseFieldValue = function () {
|
|
19362
|
-
if (!this.caseField.value && this.caseField.formatted_value && this.caseField.formatted_value.value) {
|
|
19363
|
-
this.caseField.value = this.caseField.formatted_value.value;
|
|
19364
|
-
}
|
|
19365
|
-
var isNull = this.caseField.value === undefined || this.caseField.value === '';
|
|
19366
|
-
if (isNull || !Array.isArray(this.caseField.value)) {
|
|
19367
|
-
this.caseField.value = [];
|
|
19368
|
-
}
|
|
19369
|
-
};
|
|
19370
|
-
return WriteDynamicMultiSelectListFieldComponent;
|
|
19371
|
-
}(AbstractFieldWriteComponent));
|
|
19372
|
-
WriteDynamicMultiSelectListFieldComponent.ɵfac = function WriteDynamicMultiSelectListFieldComponent_Factory(t) { return ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory(t || WriteDynamicMultiSelectListFieldComponent); };
|
|
19373
|
-
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) {
|
|
19374
|
-
if (rf & 1) {
|
|
19375
|
-
i0__namespace.ɵɵelementStart(0, "div", 0);
|
|
19376
|
-
i0__namespace.ɵɵelementStart(1, "fieldset");
|
|
19377
|
-
i0__namespace.ɵɵelementStart(2, "legend");
|
|
19378
|
-
i0__namespace.ɵɵtemplate(3, WriteDynamicMultiSelectListFieldComponent_span_3_Template, 3, 3, "span", 1);
|
|
19379
|
-
i0__namespace.ɵɵtemplate(4, WriteDynamicMultiSelectListFieldComponent_span_4_Template, 2, 1, "span", 2);
|
|
19380
|
-
i0__namespace.ɵɵtemplate(5, WriteDynamicMultiSelectListFieldComponent_span_5_Template, 3, 3, "span", 3);
|
|
19381
|
-
i0__namespace.ɵɵelementEnd();
|
|
19382
|
-
i0__namespace.ɵɵtemplate(6, WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template, 5, 6, "ng-container", 4);
|
|
19383
|
-
i0__namespace.ɵɵelementEnd();
|
|
19384
|
-
i0__namespace.ɵɵelementEnd();
|
|
19385
|
-
}
|
|
19386
|
-
if (rf & 2) {
|
|
19387
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$A, !ctx.checkboxes.valid && ctx.checkboxes.touched))("id", ctx.id());
|
|
19388
|
-
i0__namespace.ɵɵadvance(3);
|
|
19389
|
-
i0__namespace.ɵɵproperty("ngIf", ctx.caseField.label);
|
|
19390
|
-
i0__namespace.ɵɵadvance(1);
|
|
19391
|
-
i0__namespace.ɵɵproperty("ngIf", ctx.caseField.hint_text);
|
|
19392
|
-
i0__namespace.ɵɵadvance(1);
|
|
19393
|
-
i0__namespace.ɵɵproperty("ngIf", ctx.checkboxes.errors && ctx.checkboxes.touched);
|
|
19394
|
-
i0__namespace.ɵɵadvance(1);
|
|
19395
|
-
i0__namespace.ɵɵproperty("ngForOf", ctx.caseField.list_items);
|
|
19396
|
-
}
|
|
19397
|
-
}, directives: [i1__namespace.NgClass, i1__namespace.NgIf, i1__namespace.NgForOf], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
|
|
19398
|
-
var ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(WriteDynamicMultiSelectListFieldComponent);
|
|
19399
|
-
(function () {
|
|
19400
|
-
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(WriteDynamicMultiSelectListFieldComponent, [{
|
|
19401
|
-
type: i0.Component,
|
|
19402
|
-
args: [{
|
|
19403
|
-
selector: 'ccd-write-dynamic-multi-select-list-field',
|
|
19404
|
-
templateUrl: './write-dynamic-multi-select-list-field.html'
|
|
19405
|
-
}]
|
|
19406
|
-
}], null, null);
|
|
19407
|
-
})();
|
|
19408
|
-
|
|
19409
19353
|
var ReadPhoneUKFieldComponent = /** @class */ (function (_super) {
|
|
19410
19354
|
__extends(ReadPhoneUKFieldComponent, _super);
|
|
19411
19355
|
function ReadPhoneUKFieldComponent() {
|
|
@@ -19606,7 +19550,7 @@
|
|
|
19606
19550
|
WriteTextAreaFieldComponent.prototype.autoGrow = function (event) {
|
|
19607
19551
|
if (this.browserService.isIEOrEdge()) {
|
|
19608
19552
|
event.target.style.height = 'auto';
|
|
19609
|
-
event.target.style.height = event.target.scrollHeight +
|
|
19553
|
+
event.target.style.height = event.target.scrollHeight + "px";
|
|
19610
19554
|
event.target.scrollTop = event.target.scrollHeight;
|
|
19611
19555
|
}
|
|
19612
19556
|
};
|
|
@@ -19846,6 +19790,7 @@
|
|
|
19846
19790
|
return YesNoService.EMPTY;
|
|
19847
19791
|
};
|
|
19848
19792
|
YesNoService.prototype.isYes = function (value) {
|
|
19793
|
+
// tslint:disable-next-line:switch-default
|
|
19849
19794
|
switch (typeof (value)) {
|
|
19850
19795
|
case 'boolean':
|
|
19851
19796
|
return value;
|
|
@@ -19855,6 +19800,7 @@
|
|
|
19855
19800
|
return false;
|
|
19856
19801
|
};
|
|
19857
19802
|
YesNoService.prototype.isNo = function (value) {
|
|
19803
|
+
// tslint:disable-next-line:switch-default
|
|
19858
19804
|
switch (typeof (value)) {
|
|
19859
19805
|
case 'boolean':
|
|
19860
19806
|
return !value;
|
|
@@ -20591,7 +20537,7 @@
|
|
|
20591
20537
|
i0__namespace.ɵɵadvance(2);
|
|
20592
20538
|
i0__namespace.ɵɵproperty("ngForOf", ctx.currentCategories);
|
|
20593
20539
|
}
|
|
20594
|
-
}, 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
|
|
20540
|
+
}, 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 });
|
|
20595
20541
|
(function () {
|
|
20596
20542
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(CaseFileViewFolderSelectorComponent, [{
|
|
20597
20543
|
type: i0.Component,
|
|
@@ -20828,6 +20774,7 @@
|
|
|
20828
20774
|
return CaseFileViewCategory;
|
|
20829
20775
|
}());
|
|
20830
20776
|
|
|
20777
|
+
// tslint:disable:variable-name
|
|
20831
20778
|
var CaseFileViewDocument = /** @class */ (function () {
|
|
20832
20779
|
function CaseFileViewDocument() {
|
|
20833
20780
|
}
|
|
@@ -22181,7 +22128,7 @@
|
|
|
22181
22128
|
// is expected not to have a party name)
|
|
22182
22129
|
if (this.flagsData) {
|
|
22183
22130
|
this.filteredFlagsData =
|
|
22184
|
-
this.flagsData.filter(function (f) { return f.flags.partyName
|
|
22131
|
+
this.flagsData.filter(function (f) { return f.flags.partyName !== null || f.pathToFlagsFormGroup === _this.caseLevelCaseFlagsFieldId; });
|
|
22185
22132
|
}
|
|
22186
22133
|
// Add a FormControl for the selected flag location if there is at least one flags instance remaining after filtering
|
|
22187
22134
|
if (this.filteredFlagsData && this.filteredFlagsData.length > 0) {
|
|
@@ -23478,18 +23425,19 @@
|
|
|
23478
23425
|
field.value = { CaseReference: value };
|
|
23479
23426
|
return field;
|
|
23480
23427
|
};
|
|
23481
|
-
ReadComplexFieldCollectionTableComponent.prototype.toCaseField = function (id, label,
|
|
23428
|
+
ReadComplexFieldCollectionTableComponent.prototype.toCaseField = function (id, label, fieldType, value) {
|
|
23482
23429
|
return classTransformer.plainToClassFromExist(new CaseField(), {
|
|
23483
23430
|
id: id,
|
|
23484
23431
|
label: label,
|
|
23485
23432
|
display_context: 'READONLY',
|
|
23486
23433
|
value: value,
|
|
23487
|
-
field_type:
|
|
23434
|
+
field_type: fieldType
|
|
23488
23435
|
});
|
|
23489
23436
|
};
|
|
23490
23437
|
ReadComplexFieldCollectionTableComponent.prototype.sortRowsByColumns = function (column) {
|
|
23491
23438
|
var shouldSortInAscendingOrder = this.columnsHorizontalLabel[column].sortOrder === SortOrder.UNSORTED
|
|
23492
23439
|
|| this.columnsHorizontalLabel[column].sortOrder === SortOrder.DESCENDING;
|
|
23440
|
+
// tslint:disable-next-line:switch-default
|
|
23493
23441
|
switch (this.columnsHorizontalLabel[column].type.type) {
|
|
23494
23442
|
case 'Number':
|
|
23495
23443
|
case 'MoneyGBP': {
|
|
@@ -24615,6 +24563,7 @@
|
|
|
24615
24563
|
return FeeValue;
|
|
24616
24564
|
}());
|
|
24617
24565
|
|
|
24566
|
+
// tslint:disable:variable-name
|
|
24618
24567
|
var Fee = /** @class */ (function () {
|
|
24619
24568
|
function Fee() {
|
|
24620
24569
|
}
|
|
@@ -25320,7 +25269,7 @@
|
|
|
25320
25269
|
function CcdPageFieldsPipe() {
|
|
25321
25270
|
}
|
|
25322
25271
|
CcdPageFieldsPipe.prototype.transform = function (page, dataFormGroup) {
|
|
25323
|
-
var
|
|
25272
|
+
var complexFields = Object.keys(dataFormGroup.controls['data'].controls).map(function (key) {
|
|
25324
25273
|
var control = dataFormGroup.controls['data'].get(key);
|
|
25325
25274
|
return control['caseField'];
|
|
25326
25275
|
}).filter(function (field) {
|
|
@@ -25340,7 +25289,7 @@
|
|
|
25340
25289
|
field_type: {
|
|
25341
25290
|
id: page.id,
|
|
25342
25291
|
type: 'Complex',
|
|
25343
|
-
complex_fields:
|
|
25292
|
+
complex_fields: complexFields
|
|
25344
25293
|
}
|
|
25345
25294
|
});
|
|
25346
25295
|
};
|
|
@@ -25519,11 +25468,11 @@
|
|
|
25519
25468
|
}
|
|
25520
25469
|
return childrenCaseFields;
|
|
25521
25470
|
};
|
|
25522
|
-
CollectionCreateCheckerService.prototype.isComplex = function (
|
|
25523
|
-
return
|
|
25471
|
+
CollectionCreateCheckerService.prototype.isComplex = function (caseField) {
|
|
25472
|
+
return caseField.field_type.type === 'Complex';
|
|
25524
25473
|
};
|
|
25525
|
-
CollectionCreateCheckerService.prototype.isCollection = function (
|
|
25526
|
-
return
|
|
25474
|
+
CollectionCreateCheckerService.prototype.isCollection = function (caseField) {
|
|
25475
|
+
return caseField.field_type.type === 'Collection';
|
|
25527
25476
|
};
|
|
25528
25477
|
CollectionCreateCheckerService.prototype.hasCreateAccess = function (caseField, role) {
|
|
25529
25478
|
return !!caseField.acls.find(function (acl) { return acl.role === role && acl.create === true; });
|
|
@@ -25679,7 +25628,6 @@
|
|
|
25679
25628
|
FileUploadStateService,
|
|
25680
25629
|
FileUploadProgressGuard,
|
|
25681
25630
|
WindowService,
|
|
25682
|
-
LinkedCasesService,
|
|
25683
25631
|
CommonDataService,
|
|
25684
25632
|
JurisdictionService,
|
|
25685
25633
|
{ provide: i6.MAT_DATE_LOCALE, useValue: 'en-GB' }
|
|
@@ -26023,7 +25971,6 @@
|
|
|
26023
25971
|
FileUploadStateService,
|
|
26024
25972
|
FileUploadProgressGuard,
|
|
26025
25973
|
WindowService,
|
|
26026
|
-
LinkedCasesService,
|
|
26027
25974
|
CommonDataService,
|
|
26028
25975
|
JurisdictionService,
|
|
26029
25976
|
{ provide: i6.MAT_DATE_LOCALE, useValue: 'en-GB' }
|
|
@@ -26060,7 +26007,7 @@
|
|
|
26060
26007
|
AddCommentsComponent,
|
|
26061
26008
|
ManageCaseFlagsComponent,
|
|
26062
26009
|
UpdateFlagComponent], []);
|
|
26063
|
-
i0__namespace.ɵɵsetComponentScope(WriteLinkedCasesFieldComponent, [
|
|
26010
|
+
i0__namespace.ɵɵsetComponentScope(WriteLinkedCasesFieldComponent, [i2__namespace.NgControlStatusGroup, i2__namespace.FormGroupDirective, i1__namespace.NgSwitch, i1__namespace.NgSwitchCase, BeforeYouStartComponent,
|
|
26064
26011
|
NoLinkedCasesComponent,
|
|
26065
26012
|
LinkCasesComponent,
|
|
26066
26013
|
UnLinkCasesComponent,
|
|
@@ -26724,7 +26671,7 @@
|
|
|
26724
26671
|
if (caseField.field_type.type === 'Complex') {
|
|
26725
26672
|
// Note: Deliberate use of equality (==) and non-equality (!=) operators for null checks throughout, to
|
|
26726
26673
|
// handle both null and undefined values
|
|
26727
|
-
if (caseField.value
|
|
26674
|
+
if (caseField.value !== null) {
|
|
26728
26675
|
// Call this function recursively to replace the Complex field's sub-fields as necessary, passing the
|
|
26729
26676
|
// CaseField itself (the sub-fields do not contain any values, so these need to be obtained from the
|
|
26730
26677
|
// parent)
|
|
@@ -26790,8 +26737,8 @@
|
|
|
26790
26737
|
this.caseEdit.navigateToPage(pageId);
|
|
26791
26738
|
};
|
|
26792
26739
|
CaseEditSubmitComponent.prototype.callbackErrorsNotify = function (errorContext) {
|
|
26793
|
-
this.ignoreWarning = errorContext.
|
|
26794
|
-
this.triggerText = errorContext.
|
|
26740
|
+
this.ignoreWarning = errorContext.ignoreWarning;
|
|
26741
|
+
this.triggerText = errorContext.triggerText;
|
|
26795
26742
|
};
|
|
26796
26743
|
CaseEditSubmitComponent.prototype.summaryCaseField = function (field) {
|
|
26797
26744
|
if (null === this.editForm.get('data').get(field.id)) {
|
|
@@ -27423,6 +27370,7 @@
|
|
|
27423
27370
|
{ provide: COMPONENT_PORTAL_INJECTION_TOKEN, useValue: this }
|
|
27424
27371
|
]
|
|
27425
27372
|
});
|
|
27373
|
+
// tslint:disable-next-line:switch-default
|
|
27426
27374
|
switch (portalType) {
|
|
27427
27375
|
case EventCompletionPortalTypes.TaskCancelled:
|
|
27428
27376
|
this.selectedComponentPortal = new i6$2.ComponentPortal(CaseEventCompletionTaskCancelledComponent, null, injector);
|
|
@@ -27957,36 +27905,36 @@
|
|
|
27957
27905
|
this.screenReaderCurrentLabel = "You're on page";
|
|
27958
27906
|
this.pageChange = new i0.EventEmitter();
|
|
27959
27907
|
this.pageBoundsCorrection = new i0.EventEmitter();
|
|
27960
|
-
this.
|
|
27961
|
-
this.
|
|
27962
|
-
this.
|
|
27908
|
+
this.pDirectionLinks = true;
|
|
27909
|
+
this.pAutoHide = false;
|
|
27910
|
+
this.pResponsive = false;
|
|
27963
27911
|
}
|
|
27964
27912
|
Object.defineProperty(PaginationComponent.prototype, "directionLinks", {
|
|
27965
27913
|
get: function () {
|
|
27966
|
-
return this.
|
|
27914
|
+
return this.pDirectionLinks;
|
|
27967
27915
|
},
|
|
27968
27916
|
set: function (value) {
|
|
27969
|
-
this.
|
|
27917
|
+
this.pDirectionLinks = coerceToBoolean(value);
|
|
27970
27918
|
},
|
|
27971
27919
|
enumerable: false,
|
|
27972
27920
|
configurable: true
|
|
27973
27921
|
});
|
|
27974
27922
|
Object.defineProperty(PaginationComponent.prototype, "autoHide", {
|
|
27975
27923
|
get: function () {
|
|
27976
|
-
return this.
|
|
27924
|
+
return this.pAutoHide;
|
|
27977
27925
|
},
|
|
27978
27926
|
set: function (value) {
|
|
27979
|
-
this.
|
|
27927
|
+
this.pAutoHide = coerceToBoolean(value);
|
|
27980
27928
|
},
|
|
27981
27929
|
enumerable: false,
|
|
27982
27930
|
configurable: true
|
|
27983
27931
|
});
|
|
27984
27932
|
Object.defineProperty(PaginationComponent.prototype, "responsive", {
|
|
27985
27933
|
get: function () {
|
|
27986
|
-
return this.
|
|
27934
|
+
return this.pResponsive;
|
|
27987
27935
|
},
|
|
27988
27936
|
set: function (value) {
|
|
27989
|
-
this.
|
|
27937
|
+
this.pResponsive = coerceToBoolean(value);
|
|
27990
27938
|
},
|
|
27991
27939
|
enumerable: false,
|
|
27992
27940
|
configurable: true
|
|
@@ -28753,7 +28701,7 @@
|
|
|
28753
28701
|
var formValue = _this.windowService.getLocalStorage(FORM_GROUP_VAL_LOC_STORAGE);
|
|
28754
28702
|
workbasketInputs.forEach(function (item) {
|
|
28755
28703
|
if (item.field.elementPath) {
|
|
28756
|
-
item.field.id = item.field.id +
|
|
28704
|
+
item.field.id = item.field.id + "." + item.field.elementPath;
|
|
28757
28705
|
}
|
|
28758
28706
|
item.field.label = item.label;
|
|
28759
28707
|
if (formValue) {
|
|
@@ -28805,7 +28753,7 @@
|
|
|
28805
28753
|
var value = formGroupLS[key];
|
|
28806
28754
|
// Clear the filter form group control values if it has a value in local storage
|
|
28807
28755
|
// The regionList form group control value should be ignored as it always contain the latest value
|
|
28808
|
-
if (key !== REGION_LIST_AND_FRC_FILTER && value
|
|
28756
|
+
if (key !== REGION_LIST_AND_FRC_FILTER && value !== null) {
|
|
28809
28757
|
this.formGroup.get(key).setValue(null);
|
|
28810
28758
|
}
|
|
28811
28759
|
}
|
|
@@ -29934,7 +29882,7 @@
|
|
|
29934
29882
|
this.eventTrigger = this.route.snapshot.data.eventTrigger;
|
|
29935
29883
|
if (this.activityPollingService.isEnabled) {
|
|
29936
29884
|
this.ngZone.runOutsideAngular(function () {
|
|
29937
|
-
_this.activitySubscription = _this.postEditActivity().subscribe(function (
|
|
29885
|
+
_this.activitySubscription = _this.postEditActivity().subscribe(function () {
|
|
29938
29886
|
// console.log('Posted EDIT activity and result is: ' + JSON.stringify(_resolved));
|
|
29939
29887
|
});
|
|
29940
29888
|
});
|
|
@@ -30906,8 +30854,8 @@
|
|
|
30906
30854
|
return this.sortedTabs.length > 0 || this.prependedTabs.length > 0 || this.appendedTabs.length > 0;
|
|
30907
30855
|
};
|
|
30908
30856
|
CaseFullAccessViewComponent.prototype.callbackErrorsNotify = function (callbackErrorsContext) {
|
|
30909
|
-
this.ignoreWarning = callbackErrorsContext.
|
|
30910
|
-
this.triggerText = callbackErrorsContext.
|
|
30857
|
+
this.ignoreWarning = callbackErrorsContext.ignoreWarning;
|
|
30858
|
+
this.triggerText = callbackErrorsContext.triggerText;
|
|
30911
30859
|
};
|
|
30912
30860
|
CaseFullAccessViewComponent.prototype.isDraft = function () {
|
|
30913
30861
|
return Draft.isDraft(this.caseDetails.case_id);
|
|
@@ -31186,7 +31134,7 @@
|
|
|
31186
31134
|
* or the empty string
|
|
31187
31135
|
*/
|
|
31188
31136
|
PrintUrlPipe.prototype.transform = function (remoteUrl) {
|
|
31189
|
-
if (remoteUrl
|
|
31137
|
+
if ((remoteUrl === null || remoteUrl === void 0 ? void 0 : remoteUrl.length) > 0) {
|
|
31190
31138
|
var printServiceUrlPathname = void 0;
|
|
31191
31139
|
/**
|
|
31192
31140
|
* Check navigator.userAgent to see if the browser is IE or not. Check for either the browser name, "MSIE", or
|
|
@@ -31202,7 +31150,7 @@
|
|
|
31202
31150
|
printServiceUrlPathname = urlParser.pathname;
|
|
31203
31151
|
if (printServiceUrlPathname[0] !== '/') {
|
|
31204
31152
|
// Fix for IE11; it returns the pathname without leading slash
|
|
31205
|
-
printServiceUrlPathname =
|
|
31153
|
+
printServiceUrlPathname = "/" + printServiceUrlPathname;
|
|
31206
31154
|
}
|
|
31207
31155
|
}
|
|
31208
31156
|
else {
|
|
@@ -31405,10 +31353,10 @@
|
|
|
31405
31353
|
};
|
|
31406
31354
|
CaseViewerComponent.prototype.setUserAccessType = function (caseDetails) {
|
|
31407
31355
|
if (caseDetails && Array.isArray(caseDetails.metadataFields)) {
|
|
31408
|
-
var
|
|
31409
|
-
var
|
|
31410
|
-
this.accessGranted =
|
|
31411
|
-
this.userAccessType =
|
|
31356
|
+
var accessProcess = caseDetails.metadataFields.find(function (metadataField) { return metadataField.id === CaseViewerComponent.METADATA_FIELD_ACCESS_PROCEES_ID; });
|
|
31357
|
+
var accessGranted = caseDetails.metadataFields.find(function (metadataField) { return metadataField.id === CaseViewerComponent.METADATA_FIELD_ACCESS_GRANTED_ID; });
|
|
31358
|
+
this.accessGranted = accessGranted ? accessGranted.value !== CaseViewerComponent.BASIC_USER_ACCESS_TYPES : false;
|
|
31359
|
+
this.userAccessType = accessProcess ? accessProcess.value : null;
|
|
31412
31360
|
}
|
|
31413
31361
|
};
|
|
31414
31362
|
CaseViewerComponent.prototype.isDataLoaded = function () {
|
|
@@ -32704,11 +32652,11 @@
|
|
|
32704
32652
|
};
|
|
32705
32653
|
this.$roleAssignmentResponseSubscription = this.casesService.createChallengedAccessRequest(caseId_1, challengedAccessRequest)
|
|
32706
32654
|
.pipe(operators.switchMap(function () { return _this.caseNotifier.fetchAndRefresh(caseId_1); }))
|
|
32707
|
-
.subscribe(function (
|
|
32655
|
+
.subscribe(function () {
|
|
32708
32656
|
// Would have been nice to pass the caseId within state.data, but this isn't part of NavigationExtras until
|
|
32709
32657
|
// Angular 7.2!
|
|
32710
32658
|
_this.router.navigate(['success'], { relativeTo: _this.route });
|
|
32711
|
-
}, function (
|
|
32659
|
+
}, function () {
|
|
32712
32660
|
// Navigate to error page
|
|
32713
32661
|
});
|
|
32714
32662
|
}
|
|
@@ -32722,7 +32670,7 @@
|
|
|
32722
32670
|
}
|
|
32723
32671
|
};
|
|
32724
32672
|
CaseChallengedAccessRequestComponent.prototype.inputEmpty = function (input) {
|
|
32725
|
-
return input.value
|
|
32673
|
+
return input.value === null || input.value.trim().length === 0;
|
|
32726
32674
|
};
|
|
32727
32675
|
return CaseChallengedAccessRequestComponent;
|
|
32728
32676
|
}());
|
|
@@ -33346,11 +33294,11 @@
|
|
|
33346
33294
|
};
|
|
33347
33295
|
this.$roleAssignmentResponseSubscription = this.casesService.createSpecificAccessRequest(caseId_1, specificAccessRequest)
|
|
33348
33296
|
.pipe(operators.switchMap(function () { return _this.caseNotifier.fetchAndRefresh(caseId_1); }))
|
|
33349
|
-
.subscribe(function (
|
|
33297
|
+
.subscribe(function () {
|
|
33350
33298
|
// Would have been nice to pass the caseId within state.data, but this isn't part of NavigationExtras until
|
|
33351
33299
|
// Angular 7.2
|
|
33352
33300
|
_this.router.navigate(['success'], { relativeTo: _this.route });
|
|
33353
|
-
}, function (
|
|
33301
|
+
}, function () {
|
|
33354
33302
|
// Navigate to error page
|
|
33355
33303
|
});
|
|
33356
33304
|
}
|
|
@@ -33365,7 +33313,7 @@
|
|
|
33365
33313
|
}
|
|
33366
33314
|
};
|
|
33367
33315
|
CaseSpecificAccessRequestComponent.prototype.inputEmpty = function (input) {
|
|
33368
|
-
return input.value
|
|
33316
|
+
return input.value === null || input.value.trim().length === 0;
|
|
33369
33317
|
};
|
|
33370
33318
|
return CaseSpecificAccessRequestComponent;
|
|
33371
33319
|
}());
|
|
@@ -34266,7 +34214,7 @@
|
|
|
34266
34214
|
}
|
|
34267
34215
|
searchInputs.forEach(function (item) {
|
|
34268
34216
|
if (item.field.elementPath) {
|
|
34269
|
-
item.field.id = item.field.id +
|
|
34217
|
+
item.field.id = item.field.id + "." + item.field.elementPath;
|
|
34270
34218
|
}
|
|
34271
34219
|
item.field.label = item.label;
|
|
34272
34220
|
if (formValueObject) {
|
|
@@ -34545,7 +34493,7 @@
|
|
|
34545
34493
|
if (rf & 2) {
|
|
34546
34494
|
var ctx_r3 = i0__namespace.ɵɵnextContext(2);
|
|
34547
34495
|
i0__namespace.ɵɵadvance(6);
|
|
34548
|
-
i0__namespace.ɵɵtextInterpolate1(" The total size of the result set is ", i0__namespace.ɵɵpipeBind1(7, 1, ctx_r3.paginationMetadata.
|
|
34496
|
+
i0__namespace.ɵɵtextInterpolate1(" The total size of the result set is ", i0__namespace.ɵɵpipeBind1(7, 1, ctx_r3.paginationMetadata.totalResultsCount), ". Only the first 10,000 records are available for display. ");
|
|
34549
34497
|
}
|
|
34550
34498
|
}
|
|
34551
34499
|
function SearchResultComponent_table_0_div_5_Template(rf, ctx) {
|
|
@@ -35104,7 +35052,7 @@
|
|
|
35104
35052
|
};
|
|
35105
35053
|
Object.defineProperty(SearchResultComponent.prototype, "resultTotal", {
|
|
35106
35054
|
get: function () {
|
|
35107
|
-
var total = this.paginationMetadata.
|
|
35055
|
+
var total = this.paginationMetadata.totalResultsCount;
|
|
35108
35056
|
var maximumResultReached = total >= this.PAGINATION_MAX_ITEM_RESULT;
|
|
35109
35057
|
this.paginationLimitEnforced = maximumResultReached;
|
|
35110
35058
|
return maximumResultReached ? this.PAGINATION_MAX_ITEM_RESULT : total;
|
|
@@ -35255,7 +35203,7 @@
|
|
|
35255
35203
|
return col;
|
|
35256
35204
|
};
|
|
35257
35205
|
SearchResultComponent.prototype.hasResults = function () {
|
|
35258
|
-
return this.resultView.results.length && this.paginationMetadata.
|
|
35206
|
+
return this.resultView.results.length && this.paginationMetadata.totalPagesCount;
|
|
35259
35207
|
};
|
|
35260
35208
|
SearchResultComponent.prototype.hasDrafts = function () {
|
|
35261
35209
|
return this.resultView.hasDrafts();
|
|
@@ -35354,7 +35302,7 @@
|
|
|
35354
35302
|
return ((currentPage - 1) * this.paginationPageSize) + this.resultView.results.length + this.getDraftsCountIfNotPageOne(currentPage);
|
|
35355
35303
|
};
|
|
35356
35304
|
SearchResultComponent.prototype.getTotalResults = function () {
|
|
35357
|
-
var total = this.paginationMetadata.
|
|
35305
|
+
var total = this.paginationMetadata.totalResultsCount + this.draftsCount;
|
|
35358
35306
|
return total >= this.PAGINATION_MAX_ITEM_RESULT ? this.PAGINATION_MAX_ITEM_RESULT : total;
|
|
35359
35307
|
};
|
|
35360
35308
|
SearchResultComponent.prototype.prepareCaseLinkUrl = function (caseId) {
|
|
@@ -35512,6 +35460,7 @@
|
|
|
35512
35460
|
})();
|
|
35513
35461
|
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]);
|
|
35514
35462
|
|
|
35463
|
+
// tslint:disable:variable-name
|
|
35515
35464
|
var ComplexFieldOverride = /** @class */ (function () {
|
|
35516
35465
|
function ComplexFieldOverride() {
|
|
35517
35466
|
}
|
|
@@ -35533,24 +35482,24 @@
|
|
|
35533
35482
|
this.caseField.id = id;
|
|
35534
35483
|
return this;
|
|
35535
35484
|
};
|
|
35536
|
-
CaseFieldBuilder.prototype.withFieldType = function (
|
|
35537
|
-
this.caseField.field_type =
|
|
35485
|
+
CaseFieldBuilder.prototype.withFieldType = function (fieldType) {
|
|
35486
|
+
this.caseField.field_type = fieldType;
|
|
35538
35487
|
return this;
|
|
35539
35488
|
};
|
|
35540
|
-
CaseFieldBuilder.prototype.withDisplayContext = function (
|
|
35541
|
-
this.caseField.display_context =
|
|
35489
|
+
CaseFieldBuilder.prototype.withDisplayContext = function (displayContext) {
|
|
35490
|
+
this.caseField.display_context = displayContext;
|
|
35542
35491
|
return this;
|
|
35543
35492
|
};
|
|
35544
|
-
CaseFieldBuilder.prototype.withDisplayContextParameter = function (
|
|
35545
|
-
this.caseField.display_context_parameter =
|
|
35493
|
+
CaseFieldBuilder.prototype.withDisplayContextParameter = function (displayContextParameter) {
|
|
35494
|
+
this.caseField.display_context_parameter = displayContextParameter;
|
|
35546
35495
|
return this;
|
|
35547
35496
|
};
|
|
35548
35497
|
CaseFieldBuilder.prototype.withHidden = function (hidden) {
|
|
35549
35498
|
this.caseField.hidden = hidden;
|
|
35550
35499
|
return this;
|
|
35551
35500
|
};
|
|
35552
|
-
CaseFieldBuilder.prototype.withHintText = function (
|
|
35553
|
-
this.caseField.hint_text =
|
|
35501
|
+
CaseFieldBuilder.prototype.withHintText = function (hintText) {
|
|
35502
|
+
this.caseField.hint_text = hintText;
|
|
35554
35503
|
return this;
|
|
35555
35504
|
};
|
|
35556
35505
|
CaseFieldBuilder.prototype.withLabel = function (label) {
|
|
@@ -35561,12 +35510,12 @@
|
|
|
35561
35510
|
this.caseField.order = order;
|
|
35562
35511
|
return this;
|
|
35563
35512
|
};
|
|
35564
|
-
CaseFieldBuilder.prototype.withSecurityLabel = function (
|
|
35565
|
-
this.caseField.security_label =
|
|
35513
|
+
CaseFieldBuilder.prototype.withSecurityLabel = function (securityLabel) {
|
|
35514
|
+
this.caseField.security_label = securityLabel;
|
|
35566
35515
|
return this;
|
|
35567
35516
|
};
|
|
35568
|
-
CaseFieldBuilder.prototype.withShowCondition = function (
|
|
35569
|
-
this.caseField.show_condition =
|
|
35517
|
+
CaseFieldBuilder.prototype.withShowCondition = function (showCondition) {
|
|
35518
|
+
this.caseField.show_condition = showCondition;
|
|
35570
35519
|
return this;
|
|
35571
35520
|
};
|
|
35572
35521
|
CaseFieldBuilder.prototype.withShowSummaryContentOption = function (option) {
|
|
@@ -35594,21 +35543,21 @@
|
|
|
35594
35543
|
complex_fields: []
|
|
35595
35544
|
};
|
|
35596
35545
|
};
|
|
35597
|
-
var createCaseEventTrigger = function (id, name,
|
|
35598
|
-
if (
|
|
35599
|
-
if (
|
|
35546
|
+
var createCaseEventTrigger = function (id, name, caseId, showSummary, caseFields, wizardPages, canSaveDraft) {
|
|
35547
|
+
if (wizardPages === void 0) { wizardPages = []; }
|
|
35548
|
+
if (canSaveDraft === void 0) { canSaveDraft = false; }
|
|
35600
35549
|
var eventTrigger = new CaseEventTrigger();
|
|
35601
35550
|
eventTrigger.id = id;
|
|
35602
35551
|
eventTrigger.name = name;
|
|
35603
|
-
eventTrigger.case_id =
|
|
35604
|
-
eventTrigger.show_summary =
|
|
35605
|
-
eventTrigger.wizard_pages =
|
|
35552
|
+
eventTrigger.case_id = caseId;
|
|
35553
|
+
eventTrigger.show_summary = showSummary;
|
|
35554
|
+
eventTrigger.wizard_pages = wizardPages;
|
|
35606
35555
|
eventTrigger.event_token = 'test-token';
|
|
35607
|
-
eventTrigger.case_fields =
|
|
35608
|
-
eventTrigger.can_save_draft =
|
|
35556
|
+
eventTrigger.case_fields = caseFields;
|
|
35557
|
+
eventTrigger.can_save_draft = canSaveDraft;
|
|
35609
35558
|
return eventTrigger;
|
|
35610
35559
|
};
|
|
35611
|
-
var aCaseField = function (id, label, type,
|
|
35560
|
+
var aCaseField = function (id, label, type, displayContext, showSummaryContentOption, typeComplexFields, retainHiddenValue, hidden) {
|
|
35612
35561
|
if (typeComplexFields === void 0) { typeComplexFields = []; }
|
|
35613
35562
|
return ({
|
|
35614
35563
|
id: id || 'personFirstName',
|
|
@@ -35617,10 +35566,10 @@
|
|
|
35617
35566
|
type: type || 'Text',
|
|
35618
35567
|
complex_fields: typeComplexFields || []
|
|
35619
35568
|
},
|
|
35620
|
-
display_context:
|
|
35569
|
+
display_context: displayContext || 'OPTIONAL',
|
|
35621
35570
|
label: label || 'First name',
|
|
35622
|
-
show_summary_content_option:
|
|
35623
|
-
retain_hidden_value:
|
|
35571
|
+
show_summary_content_option: showSummaryContentOption,
|
|
35572
|
+
retain_hidden_value: retainHiddenValue || false,
|
|
35624
35573
|
hidden: hidden || false
|
|
35625
35574
|
});
|
|
35626
35575
|
};
|
|
@@ -35662,48 +35611,48 @@
|
|
|
35662
35611
|
complexFieldOverride.display_context = 'HIDDEN';
|
|
35663
35612
|
return complexFieldOverride;
|
|
35664
35613
|
};
|
|
35665
|
-
var createCaseField = function (id, label, hint, fieldType,
|
|
35614
|
+
var createCaseField = function (id, label, hint, fieldType, displayContext, order, showCondition, acls, hidden) {
|
|
35666
35615
|
if (order === void 0) { order = undefined; }
|
|
35667
|
-
if (
|
|
35668
|
-
if (
|
|
35616
|
+
if (showCondition === void 0) { showCondition = undefined; }
|
|
35617
|
+
if (acls === void 0) { acls = undefined; }
|
|
35669
35618
|
return CaseFieldBuilder.create()
|
|
35670
35619
|
.withId(id || 'personFirstName')
|
|
35671
35620
|
.withFieldType(fieldType || textFieldType())
|
|
35672
|
-
.withDisplayContext(
|
|
35621
|
+
.withDisplayContext(displayContext || 'OPTIONAL')
|
|
35673
35622
|
.withLabel(label || 'First name')
|
|
35674
35623
|
.withHintText(hint || 'First name hint text')
|
|
35675
35624
|
.withShowSummaryContentOption(0)
|
|
35676
35625
|
.withOrder(order)
|
|
35677
|
-
.withShowCondition(
|
|
35678
|
-
.withACLs(
|
|
35626
|
+
.withShowCondition(showCondition || undefined)
|
|
35627
|
+
.withACLs(acls)
|
|
35679
35628
|
.withHidden(hidden || false)
|
|
35680
35629
|
.build();
|
|
35681
35630
|
};
|
|
35682
|
-
var newCaseField = function (id, label, hint, fieldType,
|
|
35631
|
+
var newCaseField = function (id, label, hint, fieldType, displayContext, order) {
|
|
35683
35632
|
if (order === void 0) { order = undefined; }
|
|
35684
35633
|
return CaseFieldBuilder.create()
|
|
35685
35634
|
.withId(id || 'personFirstName')
|
|
35686
35635
|
.withFieldType(fieldType || textFieldType())
|
|
35687
|
-
.withDisplayContext(
|
|
35636
|
+
.withDisplayContext(displayContext || 'OPTIONAL')
|
|
35688
35637
|
.withHintText(hint || 'First name hint text')
|
|
35689
35638
|
.withLabel(label || 'First name')
|
|
35690
35639
|
.withOrder(order)
|
|
35691
35640
|
.withShowSummaryContentOption(0);
|
|
35692
35641
|
};
|
|
35693
|
-
var createFieldType = function (typeId, type,
|
|
35694
|
-
if (
|
|
35695
|
-
if (
|
|
35642
|
+
var createFieldType = function (typeId, type, complexFields, collectionFieldType) {
|
|
35643
|
+
if (complexFields === void 0) { complexFields = []; }
|
|
35644
|
+
if (collectionFieldType === void 0) { collectionFieldType = undefined; }
|
|
35696
35645
|
return {
|
|
35697
35646
|
id: typeId || 'Text',
|
|
35698
35647
|
type: type || 'Text',
|
|
35699
|
-
complex_fields:
|
|
35700
|
-
collection_field_type:
|
|
35648
|
+
complex_fields: complexFields || [],
|
|
35649
|
+
collection_field_type: collectionFieldType || undefined
|
|
35701
35650
|
};
|
|
35702
35651
|
};
|
|
35703
35652
|
var createFixedListFieldType = function (typeId, fixedListItems) {
|
|
35704
35653
|
if (fixedListItems === void 0) { fixedListItems = []; }
|
|
35705
35654
|
return {
|
|
35706
|
-
id:
|
|
35655
|
+
id: "FixedList-" + typeId,
|
|
35707
35656
|
type: 'FixedList',
|
|
35708
35657
|
fixed_list_items: fixedListItems || []
|
|
35709
35658
|
};
|
|
@@ -35711,18 +35660,18 @@
|
|
|
35711
35660
|
var createMultiSelectListFieldType = function (typeId, fixedListItems) {
|
|
35712
35661
|
if (fixedListItems === void 0) { fixedListItems = []; }
|
|
35713
35662
|
return {
|
|
35714
|
-
id:
|
|
35663
|
+
id: "MultiSelectList-" + typeId,
|
|
35715
35664
|
type: 'MultiSelectList',
|
|
35716
35665
|
fixed_list_items: fixedListItems || []
|
|
35717
35666
|
};
|
|
35718
35667
|
};
|
|
35719
|
-
var createACL = function (role,
|
|
35668
|
+
var createACL = function (role, aclCreate, aclRead, aclUpdate, aclDelete) {
|
|
35720
35669
|
return ({
|
|
35721
35670
|
role: role || 'roleX',
|
|
35722
|
-
create:
|
|
35723
|
-
read:
|
|
35724
|
-
update:
|
|
35725
|
-
delete:
|
|
35671
|
+
create: aclCreate,
|
|
35672
|
+
read: aclRead,
|
|
35673
|
+
update: aclUpdate,
|
|
35674
|
+
delete: aclDelete
|
|
35726
35675
|
});
|
|
35727
35676
|
};
|
|
35728
35677
|
|
|
@@ -35941,7 +35890,6 @@
|
|
|
35941
35890
|
exports.FormatTranslatorService = FormatTranslatorService;
|
|
35942
35891
|
exports.GreyBarService = GreyBarService;
|
|
35943
35892
|
exports.HRef = HRef;
|
|
35944
|
-
exports.HasLoadingState = HasLoadingState;
|
|
35945
35893
|
exports.HeaderBarComponent = HeaderBarComponent;
|
|
35946
35894
|
exports.HeadersModule = HeadersModule;
|
|
35947
35895
|
exports.HttpError = HttpError;
|