@hmcts/ccd-case-ui-toolkit 6.13.11-welsh-release → 6.13.11-welsh-release-v3
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 +732 -867
- 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/components/header/headers.module.js +2 -2
- package/esm2015/lib/shared/commons/case-edit-data/case-edit-data.module.js +1 -1
- package/esm2015/lib/shared/commons/case-edit-data/case-edit-validation.model.js +1 -1
- package/esm2015/lib/shared/components/activity/activity.component.js +5 -5
- package/esm2015/lib/shared/components/case-editor/case-create/case-create.component.js +2 -2
- package/esm2015/lib/shared/components/case-editor/case-edit/case-edit.component.js +1 -1
- package/esm2015/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.js +4 -4
- package/esm2015/lib/shared/components/case-editor/case-edit-submit/case-edit-submit.component.js +4 -4
- package/esm2015/lib/shared/components/case-editor/case-editor.module.js +1 -1
- package/esm2015/lib/shared/components/case-editor/case-event-completion/case-event-completion.component.js +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/case-progress/case-progress.component.js +2 -2
- 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/case-edit-wizard.guard.js +2 -3
- 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 +2 -2
- package/esm2015/lib/shared/components/case-history/domain/case-history.model.js +2 -1
- package/esm2015/lib/shared/components/case-timeline/case-timeline.component.js +2 -2
- package/esm2015/lib/shared/components/case-viewer/case-challenged-access-request/case-challenged-access-request.component.js +5 -5
- package/esm2015/lib/shared/components/case-viewer/case-event-trigger/case-event-trigger.component.js +5 -13
- 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/case-file-view-field.component.js +12 -5
- package/esm2015/lib/shared/components/palette/case-file-view/index.js +1 -2
- 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 +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 +3 -4
- 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 -8
- package/esm2015/lib/shared/components/palette/palette.service.js +3 -4
- 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/components/workbasket-filters/workbasket-filters.module.js +2 -2
- 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/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/alert/alert.service.js +5 -8
- 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 +5 -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/fesm2015/hmcts-ccd-case-ui-toolkit.js +714 -825
- 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/components/header/headers.module.d.ts.map +1 -1
- package/lib/shared/commons/case-edit-data/case-edit-data.module.d.ts.map +1 -1
- package/lib/shared/commons/case-edit-data/case-edit-validation.model.d.ts.map +1 -1
- package/lib/shared/components/case-editor/case-edit/case-edit.component.d.ts +3 -3
- package/lib/shared/components/case-editor/case-edit/case-edit.component.d.ts.map +1 -1
- package/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.d.ts.map +1 -1
- package/lib/shared/components/case-editor/case-event-completion/case-event-completion.component.d.ts.map +1 -1
- package/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.d.ts +2 -2
- package/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.d.ts.map +1 -1
- package/lib/shared/components/case-editor/domain/wizard-page-field-complex-override.model.d.ts.map +1 -1
- package/lib/shared/components/case-editor/domain/wizard-page-field.model.d.ts.map +1 -1
- package/lib/shared/components/case-editor/domain/wizard-page.model.d.ts.map +1 -1
- package/lib/shared/components/case-editor/services/case-edit-wizard.guard.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-event-trigger/case-event-trigger.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-file-view/case-file-view-field.component.d.ts +5 -2
- package/lib/shared/components/palette/case-file-view/case-file-view-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/case-file-view/index.d.ts +0 -1
- package/lib/shared/components/palette/case-file-view/index.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/domain/linked-cases.model.d.ts.map +1 -1
- package/lib/shared/components/palette/linked-cases/read-linked-cases-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/linked-cases/services/linked-cases.service.d.ts.map +1 -1
- package/lib/shared/components/palette/linked-cases/write-linked-cases-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/order-summary/fee.model.d.ts.map +1 -1
- package/lib/shared/components/palette/order-summary/order-summary.model.d.ts.map +1 -1
- package/lib/shared/components/palette/palette.module.d.ts +40 -41
- package/lib/shared/components/palette/palette.module.d.ts.map +1 -1
- package/lib/shared/components/palette/palette.service.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/components/workbasket-filters/workbasket-filters.module.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/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/alert/alert.service.d.ts +3 -4
- package/lib/shared/services/alert/alert.service.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 +0 -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/package.json +2 -2
- package/esm2015/lib/shared/components/palette/case-file-view/case-file-view-field-read.component.js +0 -72
- package/lib/shared/components/palette/case-file-view/case-file-view-field-read.component.d.ts +0 -8
- package/lib/shared/components/palette/case-file-view/case-file-view-field-read.component.d.ts.map +0 -1
- package/lib/shared/pipes/complex/cdd-page-fields.pipe.d.ts.map +0 -1
|
@@ -1095,22 +1095,22 @@
|
|
|
1095
1095
|
}
|
|
1096
1096
|
};
|
|
1097
1097
|
DateInputComponent.prototype.dayId = function () {
|
|
1098
|
-
return this.id +
|
|
1098
|
+
return this.id + "-day";
|
|
1099
1099
|
};
|
|
1100
1100
|
DateInputComponent.prototype.monthId = function () {
|
|
1101
|
-
return this.id +
|
|
1101
|
+
return this.id + "-month";
|
|
1102
1102
|
};
|
|
1103
1103
|
DateInputComponent.prototype.yearId = function () {
|
|
1104
|
-
return this.id +
|
|
1104
|
+
return this.id + "-year";
|
|
1105
1105
|
};
|
|
1106
1106
|
DateInputComponent.prototype.hourId = function () {
|
|
1107
|
-
return this.id +
|
|
1107
|
+
return this.id + "-hour";
|
|
1108
1108
|
};
|
|
1109
1109
|
DateInputComponent.prototype.minuteId = function () {
|
|
1110
|
-
return this.id +
|
|
1110
|
+
return this.id + "-minute";
|
|
1111
1111
|
};
|
|
1112
1112
|
DateInputComponent.prototype.secondId = function () {
|
|
1113
|
-
return this.id +
|
|
1113
|
+
return this.id + "-second";
|
|
1114
1114
|
};
|
|
1115
1115
|
DateInputComponent.prototype.viewValue = function () {
|
|
1116
1116
|
if (this.day || this.month || this.year || this.hour || this.minute || this.second) {
|
|
@@ -1125,7 +1125,7 @@
|
|
|
1125
1125
|
this.minute ? this.pad(this.minute) : '',
|
|
1126
1126
|
this.second ? this.pad(this.second) : ''
|
|
1127
1127
|
].join(':');
|
|
1128
|
-
return date +
|
|
1128
|
+
return date + "T" + time + ".000";
|
|
1129
1129
|
}
|
|
1130
1130
|
else {
|
|
1131
1131
|
return date;
|
|
@@ -2214,7 +2214,7 @@
|
|
|
2214
2214
|
});
|
|
2215
2215
|
ActivityService.handleHttpError = function (response) {
|
|
2216
2216
|
var error = HttpErrorService.convertToHttpError(response);
|
|
2217
|
-
if (response
|
|
2217
|
+
if ((response === null || response === void 0 ? void 0 : response.status) !== error.status) {
|
|
2218
2218
|
error.status = response.status;
|
|
2219
2219
|
}
|
|
2220
2220
|
return error;
|
|
@@ -2222,12 +2222,11 @@
|
|
|
2222
2222
|
ActivityService.prototype.getOptions = function () {
|
|
2223
2223
|
var userDetails = JSON.parse(this.sessionStorageService.getItem('userDetails'));
|
|
2224
2224
|
var headers = new i1$2.HttpHeaders().set('Content-Type', 'application/json').set('Authorization', userDetails.token);
|
|
2225
|
-
|
|
2225
|
+
return {
|
|
2226
2226
|
headers: headers,
|
|
2227
2227
|
withCredentials: true,
|
|
2228
2228
|
observe: 'body',
|
|
2229
2229
|
};
|
|
2230
|
-
return options;
|
|
2231
2230
|
};
|
|
2232
2231
|
ActivityService.prototype.getActivities = function () {
|
|
2233
2232
|
var caseId = [];
|
|
@@ -2236,41 +2235,33 @@
|
|
|
2236
2235
|
}
|
|
2237
2236
|
try {
|
|
2238
2237
|
var options = this.getOptions();
|
|
2239
|
-
var url = this.activityUrl() +
|
|
2238
|
+
var url = this.activityUrl() + "/cases/" + caseId.join(',') + "/activity";
|
|
2240
2239
|
return this.http
|
|
2241
2240
|
.get(url, options, false, ActivityService.handleHttpError)
|
|
2242
2241
|
.pipe(operators.map(function (response) { return response; }));
|
|
2243
2242
|
}
|
|
2244
2243
|
catch (error) {
|
|
2245
|
-
console.log(
|
|
2244
|
+
console.log("user may not be authenticated." + error);
|
|
2246
2245
|
}
|
|
2247
2246
|
};
|
|
2248
2247
|
ActivityService.prototype.postActivity = function (caseId, activity) {
|
|
2249
2248
|
try {
|
|
2250
2249
|
var options = this.getOptions();
|
|
2251
|
-
var url = this.activityUrl() +
|
|
2250
|
+
var url = this.activityUrl() + "/cases/" + caseId + "/activity";
|
|
2252
2251
|
var body = { activity: activity };
|
|
2253
2252
|
return this.http
|
|
2254
2253
|
.post(url, body, options, false)
|
|
2255
2254
|
.pipe(operators.map(function (response) { return response; }));
|
|
2256
2255
|
}
|
|
2257
2256
|
catch (error) {
|
|
2258
|
-
console.log(
|
|
2257
|
+
console.log("user may not be authenticated." + error);
|
|
2259
2258
|
}
|
|
2260
2259
|
};
|
|
2261
2260
|
ActivityService.prototype.verifyUserIsAuthorized = function () {
|
|
2262
2261
|
var _this = this;
|
|
2263
|
-
if (this.sessionStorageService.getItem('userDetails') === undefined) {
|
|
2264
|
-
return;
|
|
2265
|
-
}
|
|
2266
|
-
if (this.activityUrl() && this.userAuthorised === undefined) {
|
|
2262
|
+
if (this.sessionStorageService.getItem('userDetails') && this.activityUrl() && this.userAuthorised === undefined) {
|
|
2267
2263
|
this.getActivities(ActivityService.DUMMY_CASE_REFERENCE).subscribe(function () { return _this.userAuthorised = true; }, function (error) {
|
|
2268
|
-
|
|
2269
|
-
_this.userAuthorised = false;
|
|
2270
|
-
}
|
|
2271
|
-
else {
|
|
2272
|
-
_this.userAuthorised = true;
|
|
2273
|
-
}
|
|
2264
|
+
_this.userAuthorised = [401, 403].indexOf(error.status) <= -1;
|
|
2274
2265
|
});
|
|
2275
2266
|
}
|
|
2276
2267
|
};
|
|
@@ -2383,7 +2374,7 @@
|
|
|
2383
2374
|
requests.get(activity.caseId).next(activity);
|
|
2384
2375
|
});
|
|
2385
2376
|
}, function (err) {
|
|
2386
|
-
console.log(
|
|
2377
|
+
console.log("error: " + err);
|
|
2387
2378
|
Array.from(requests.values()).forEach(function (subject) { return subject.error(err); });
|
|
2388
2379
|
}); });
|
|
2389
2380
|
});
|
|
@@ -2527,9 +2518,9 @@
|
|
|
2527
2518
|
};
|
|
2528
2519
|
ActivityComponent.prototype.generateDescription = function (prefix, suffix, namesArray, unknownCount) {
|
|
2529
2520
|
var resultText = prefix;
|
|
2530
|
-
resultText += namesArray.map(function (activityInfo) { return activityInfo.forename +
|
|
2521
|
+
resultText += namesArray.map(function (activityInfo) { return activityInfo.forename + " " + activityInfo.surname; }).join(', ');
|
|
2531
2522
|
if (unknownCount > 0) {
|
|
2532
|
-
resultText += (namesArray.length > 0 ?
|
|
2523
|
+
resultText += (namesArray.length > 0 ? " and " + unknownCount + " other" : unknownCount + " user");
|
|
2533
2524
|
resultText += (unknownCount > 1 ? 's' : '');
|
|
2534
2525
|
}
|
|
2535
2526
|
else {
|
|
@@ -2537,10 +2528,10 @@
|
|
|
2537
2528
|
}
|
|
2538
2529
|
if (suffix.length > 0) {
|
|
2539
2530
|
if (namesArray.length + unknownCount > 1) {
|
|
2540
|
-
resultText +=
|
|
2531
|
+
resultText += " are " + suffix;
|
|
2541
2532
|
}
|
|
2542
2533
|
else {
|
|
2543
|
-
resultText +=
|
|
2534
|
+
resultText += " is " + suffix;
|
|
2544
2535
|
}
|
|
2545
2536
|
}
|
|
2546
2537
|
return resultText;
|
|
@@ -2881,7 +2872,7 @@
|
|
|
2881
2872
|
break;
|
|
2882
2873
|
case 'n':
|
|
2883
2874
|
case 'N':
|
|
2884
|
-
maybePush(result,
|
|
2875
|
+
maybePush(result, "***" + c + "***", inQuote); // No way to support A - millisec of day, n - nano of second, N - nano of Day
|
|
2885
2876
|
break;
|
|
2886
2877
|
case 'V':
|
|
2887
2878
|
case 'O':
|
|
@@ -3015,9 +3006,9 @@
|
|
|
3015
3006
|
resultDate = offsetDate.getDate() + " " + DatePipe.MONTHS[offsetDate.getMonth()] + " " + offsetDate.getFullYear();
|
|
3016
3007
|
if (match[4] && match[5] && match[6] && format !== 'short') {
|
|
3017
3008
|
resultDate += ', ';
|
|
3018
|
-
resultDate += this.getHour(offsetDate.getHours().toString()) +
|
|
3019
|
-
resultDate += this.pad(offsetDate.getMinutes()) +
|
|
3020
|
-
resultDate += this.pad(offsetDate.getSeconds()) +
|
|
3009
|
+
resultDate += this.getHour(offsetDate.getHours().toString()) + ":";
|
|
3010
|
+
resultDate += this.pad(offsetDate.getMinutes()) + ":";
|
|
3011
|
+
resultDate += this.pad(offsetDate.getSeconds()) + " ";
|
|
3021
3012
|
resultDate += (this.toInt(offsetDate.getHours().toString()) >= 12) ? 'PM' : 'AM';
|
|
3022
3013
|
}
|
|
3023
3014
|
}
|
|
@@ -3392,6 +3383,7 @@
|
|
|
3392
3383
|
}], null, null);
|
|
3393
3384
|
})();
|
|
3394
3385
|
|
|
3386
|
+
// tslint:disable:variable-name
|
|
3395
3387
|
var AddressModel = /** @class */ (function () {
|
|
3396
3388
|
function AddressModel() {
|
|
3397
3389
|
this.AddressLine1 = '';
|
|
@@ -3702,6 +3694,7 @@
|
|
|
3702
3694
|
__metadata("design:type", Array)
|
|
3703
3695
|
], CaseEventTrigger.prototype, "wizard_pages", void 0);
|
|
3704
3696
|
|
|
3697
|
+
// tslint:disable:variable-name
|
|
3705
3698
|
var CaseViewEvent = /** @class */ (function () {
|
|
3706
3699
|
function CaseViewEvent() {
|
|
3707
3700
|
}
|
|
@@ -3746,6 +3739,7 @@
|
|
|
3746
3739
|
__metadata("design:type", Array)
|
|
3747
3740
|
], CaseType.prototype, "case_fields", void 0);
|
|
3748
3741
|
|
|
3742
|
+
// tslint:disable:variable-name
|
|
3749
3743
|
var EventCaseField = /** @class */ (function () {
|
|
3750
3744
|
function EventCaseField() {
|
|
3751
3745
|
}
|
|
@@ -3796,6 +3790,7 @@
|
|
|
3796
3790
|
return CasePrintDocument;
|
|
3797
3791
|
}());
|
|
3798
3792
|
|
|
3793
|
+
// tslint:disable:variable-name
|
|
3799
3794
|
var HRef = /** @class */ (function () {
|
|
3800
3795
|
function HRef() {
|
|
3801
3796
|
}
|
|
@@ -3833,25 +3828,25 @@
|
|
|
3833
3828
|
OrganisationConverter.toSimpleAddress = function (organisationModel) {
|
|
3834
3829
|
var simpleAddress = '';
|
|
3835
3830
|
if (organisationModel.addressLine1) {
|
|
3836
|
-
simpleAddress += organisationModel.addressLine1 +
|
|
3831
|
+
simpleAddress += organisationModel.addressLine1 + "<br>";
|
|
3837
3832
|
}
|
|
3838
3833
|
if (organisationModel.addressLine2) {
|
|
3839
|
-
simpleAddress += organisationModel.addressLine2 +
|
|
3834
|
+
simpleAddress += organisationModel.addressLine2 + "<br>";
|
|
3840
3835
|
}
|
|
3841
3836
|
if (organisationModel.addressLine3) {
|
|
3842
|
-
simpleAddress += organisationModel.addressLine3 +
|
|
3837
|
+
simpleAddress += organisationModel.addressLine3 + "<br>";
|
|
3843
3838
|
}
|
|
3844
3839
|
if (organisationModel.townCity) {
|
|
3845
|
-
simpleAddress += organisationModel.townCity +
|
|
3840
|
+
simpleAddress += organisationModel.townCity + "<br>";
|
|
3846
3841
|
}
|
|
3847
3842
|
if (organisationModel.county) {
|
|
3848
|
-
simpleAddress += organisationModel.county +
|
|
3843
|
+
simpleAddress += organisationModel.county + "<br>";
|
|
3849
3844
|
}
|
|
3850
3845
|
if (organisationModel.country) {
|
|
3851
|
-
simpleAddress += organisationModel.country +
|
|
3846
|
+
simpleAddress += organisationModel.country + "<br>";
|
|
3852
3847
|
}
|
|
3853
3848
|
if (organisationModel.postCode) {
|
|
3854
|
-
simpleAddress += organisationModel.postCode +
|
|
3849
|
+
simpleAddress += organisationModel.postCode + "<br>";
|
|
3855
3850
|
}
|
|
3856
3851
|
return simpleAddress;
|
|
3857
3852
|
};
|
|
@@ -3964,12 +3959,14 @@
|
|
|
3964
3959
|
__metadata("design:type", Array)
|
|
3965
3960
|
], SearchResultView.prototype, "results", void 0);
|
|
3966
3961
|
|
|
3962
|
+
// tslint:disable:variable-name
|
|
3967
3963
|
var CaseDetails = /** @class */ (function () {
|
|
3968
3964
|
function CaseDetails() {
|
|
3969
3965
|
}
|
|
3970
3966
|
return CaseDetails;
|
|
3971
3967
|
}());
|
|
3972
3968
|
|
|
3969
|
+
// tslint:disable:variable-name
|
|
3973
3970
|
var CaseEventData = /** @class */ (function () {
|
|
3974
3971
|
function CaseEventData() {
|
|
3975
3972
|
}
|
|
@@ -3977,12 +3974,7 @@
|
|
|
3977
3974
|
}());
|
|
3978
3975
|
|
|
3979
3976
|
var WorkbasketInputModel = /** @class */ (function () {
|
|
3980
|
-
function WorkbasketInputModel(
|
|
3981
|
-
this.label = label;
|
|
3982
|
-
this.order = order;
|
|
3983
|
-
this.field = field;
|
|
3984
|
-
this.metadata = metadata;
|
|
3985
|
-
this.display_context_parameter = display_context_parameter;
|
|
3977
|
+
function WorkbasketInputModel() {
|
|
3986
3978
|
}
|
|
3987
3979
|
return WorkbasketInputModel;
|
|
3988
3980
|
}());
|
|
@@ -4030,9 +4022,9 @@
|
|
|
4030
4022
|
});
|
|
4031
4023
|
return valueMap;
|
|
4032
4024
|
};
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
}
|
|
4025
|
+
// public static getType(elem: any): string {
|
|
4026
|
+
// return Object.prototype.toString.call(elem).slice(8, -1);
|
|
4027
|
+
// }
|
|
4036
4028
|
FieldsUtils.isObject = function (elem) {
|
|
4037
4029
|
return typeof elem === 'object' && elem !== null;
|
|
4038
4030
|
};
|
|
@@ -4541,6 +4533,7 @@
|
|
|
4541
4533
|
var elements = (result[field.id] || field.value);
|
|
4542
4534
|
if (elements) {
|
|
4543
4535
|
elements.forEach(function (elem) {
|
|
4536
|
+
// tslint:disable-next-line:switch-default
|
|
4544
4537
|
switch (field.field_type.collection_field_type.type) {
|
|
4545
4538
|
case 'MoneyGBP': {
|
|
4546
4539
|
elem.value = FieldsUtils.getMoneyGBP(elem.value);
|
|
@@ -4590,7 +4583,6 @@
|
|
|
4590
4583
|
if (!condition) {
|
|
4591
4584
|
return null;
|
|
4592
4585
|
}
|
|
4593
|
-
;
|
|
4594
4586
|
condition = condition.replace(/CONTAINS/g, ' CONTAINS');
|
|
4595
4587
|
return peg.parse(condition.trim(), {});
|
|
4596
4588
|
};
|
|
@@ -4604,14 +4596,12 @@
|
|
|
4604
4596
|
if (!conditions || conditions.length === 0) {
|
|
4605
4597
|
return true;
|
|
4606
4598
|
}
|
|
4607
|
-
;
|
|
4608
4599
|
var validJoinComparators = ['AND', 'OR'];
|
|
4609
|
-
|
|
4600
|
+
return conditions.reduce(function (accumulator, condition, index) {
|
|
4610
4601
|
var isJoinComparator = function (comparator) { return (typeof comparator === 'string' && validJoinComparators.indexOf(comparator) !== -1); };
|
|
4611
4602
|
if (isJoinComparator(condition)) {
|
|
4612
4603
|
return accumulator;
|
|
4613
4604
|
}
|
|
4614
|
-
;
|
|
4615
4605
|
var currentConditionResult = true;
|
|
4616
4606
|
if (Array.isArray(condition)) {
|
|
4617
4607
|
currentConditionResult = _this.evaluate(fields, condition);
|
|
@@ -4628,9 +4618,9 @@
|
|
|
4628
4618
|
}
|
|
4629
4619
|
return currentConditionResult;
|
|
4630
4620
|
}, true);
|
|
4631
|
-
return result;
|
|
4632
4621
|
};
|
|
4633
4622
|
ConditionParser.evaluateJoin = function (leftResult, comparator, rightResult) {
|
|
4623
|
+
// tslint:disable-next-line:switch-default
|
|
4634
4624
|
switch (comparator) {
|
|
4635
4625
|
case 'OR': return leftResult || rightResult;
|
|
4636
4626
|
case 'AND': return leftResult && rightResult;
|
|
@@ -4720,8 +4710,7 @@
|
|
|
4720
4710
|
}
|
|
4721
4711
|
};
|
|
4722
4712
|
ConditionParser.unquoted = function (str) {
|
|
4723
|
-
|
|
4724
|
-
return res;
|
|
4713
|
+
return str.replace(/^"|"$/g, '');
|
|
4725
4714
|
};
|
|
4726
4715
|
ConditionParser.findValueForComplexCondition = function (fields, head, tail, path) {
|
|
4727
4716
|
if (!fields) {
|
|
@@ -4835,8 +4824,8 @@
|
|
|
4835
4824
|
if (originalCondition.indexOf(condition.fieldReference) > -1) {
|
|
4836
4825
|
if (this.processedList && this.processedList.indexOf(condition.fieldReference) === -1) {
|
|
4837
4826
|
this.processedList.push(condition.fieldReference);
|
|
4838
|
-
var regularExp = new RegExp(
|
|
4839
|
-
return originalCondition.replace(regularExp, pathPrefix +
|
|
4827
|
+
var regularExp = new RegExp("(\\b)" + condition.fieldReference + "(?=[^\"]*(?:\"[^\"]*\"[^\"]*)*$)(\\b)", 'g');
|
|
4828
|
+
return originalCondition.replace(regularExp, pathPrefix + "." + condition.fieldReference);
|
|
4840
4829
|
}
|
|
4841
4830
|
else {
|
|
4842
4831
|
return originalCondition;
|
|
@@ -4915,6 +4904,7 @@
|
|
|
4915
4904
|
}
|
|
4916
4905
|
// Consider what type of field this is.
|
|
4917
4906
|
var ft = caseField.field_type;
|
|
4907
|
+
// tslint:disable-next-line:switch-default
|
|
4918
4908
|
switch (ft.type) {
|
|
4919
4909
|
case 'Collection':
|
|
4920
4910
|
if (ft.collection_field_type.type === 'Complex' && ft.collection_field_type.complex_fields) {
|
|
@@ -5405,14 +5395,14 @@
|
|
|
5405
5395
|
var formFields = form.getRawValue();
|
|
5406
5396
|
var currentPage = wizard.getPage(currentPageId, this.fieldsUtils.buildCanShowPredicate(eventTrigger, form));
|
|
5407
5397
|
currentPage.wizard_page_fields.forEach(function (wpf) {
|
|
5408
|
-
var
|
|
5409
|
-
if (_this.hasShowConditionField(
|
|
5410
|
-
var condition = new ShowCondition(
|
|
5411
|
-
if (_this.isHidden(condition, formFields.data) && !(_this.isReadonly(
|
|
5412
|
-
_this.resetField(form,
|
|
5398
|
+
var caseField = _this.findCaseFieldByWizardPageFieldId(currentPage, wpf);
|
|
5399
|
+
if (_this.hasShowConditionField(caseField, formFields)) {
|
|
5400
|
+
var condition = new ShowCondition(caseField.show_condition);
|
|
5401
|
+
if (_this.isHidden(condition, formFields.data) && !(_this.isReadonly(caseField))) {
|
|
5402
|
+
_this.resetField(form, caseField);
|
|
5413
5403
|
}
|
|
5414
5404
|
}
|
|
5415
|
-
_this.retainHiddenValueByFieldType(
|
|
5405
|
+
_this.retainHiddenValueByFieldType(caseField, form);
|
|
5416
5406
|
});
|
|
5417
5407
|
};
|
|
5418
5408
|
FieldsPurger.prototype.retainHiddenValueByFieldType = function (field, form) {
|
|
@@ -5443,13 +5433,13 @@
|
|
|
5443
5433
|
FieldsPurger.prototype.hasShowConditionPage = function (wizardPage, formFields) {
|
|
5444
5434
|
return wizardPage.show_condition && formFields[this.getShowConditionKey(wizardPage.show_condition)];
|
|
5445
5435
|
};
|
|
5446
|
-
FieldsPurger.prototype.hasShowConditionField = function (
|
|
5447
|
-
return
|
|
5436
|
+
FieldsPurger.prototype.hasShowConditionField = function (caseField, formFields) {
|
|
5437
|
+
return caseField.show_condition && formFields.data[this.getShowConditionKey(caseField.show_condition)];
|
|
5448
5438
|
};
|
|
5449
|
-
FieldsPurger.prototype.getShowConditionKey = function (
|
|
5439
|
+
FieldsPurger.prototype.getShowConditionKey = function (showCondition) {
|
|
5450
5440
|
// Need to allow for negated conditions, i.e. !=, as well as regular ones (=)
|
|
5451
5441
|
// Also need to allow for conditions specified using the "CONTAINS" keyword
|
|
5452
|
-
return
|
|
5442
|
+
return showCondition.split(/!=|=|CONTAINS/)[0];
|
|
5453
5443
|
};
|
|
5454
5444
|
FieldsPurger.prototype.resetField = function (form, field) {
|
|
5455
5445
|
var e_1, _a;
|
|
@@ -5545,8 +5535,8 @@
|
|
|
5545
5535
|
FieldsPurger.prototype.resetPage = function (form, wizardPage) {
|
|
5546
5536
|
var _this = this;
|
|
5547
5537
|
wizardPage.wizard_page_fields.forEach(function (wpf) {
|
|
5548
|
-
var
|
|
5549
|
-
_this.resetField(form,
|
|
5538
|
+
var caseField = _this.findCaseFieldByWizardPageFieldId(wizardPage, wpf);
|
|
5539
|
+
_this.resetField(form, caseField);
|
|
5550
5540
|
});
|
|
5551
5541
|
};
|
|
5552
5542
|
FieldsPurger.prototype.getType = function (elem) {
|
|
@@ -5556,8 +5546,8 @@
|
|
|
5556
5546
|
return this.getType(elem) === 'Object';
|
|
5557
5547
|
};
|
|
5558
5548
|
// TODO: call isReadOnly on CaseFields once we make it available
|
|
5559
|
-
FieldsPurger.prototype.isReadonly = function (
|
|
5560
|
-
return
|
|
5549
|
+
FieldsPurger.prototype.isReadonly = function (caseField) {
|
|
5550
|
+
return caseField.display_context.toUpperCase() === 'READONLY';
|
|
5561
5551
|
};
|
|
5562
5552
|
/**
|
|
5563
5553
|
* Deletes a field value by setting the value of the corresponding {@link FormControl} to null (or an empty array
|
|
@@ -5744,6 +5734,7 @@
|
|
|
5744
5734
|
return;
|
|
5745
5735
|
}
|
|
5746
5736
|
caseFields.forEach(function (caseField) {
|
|
5737
|
+
// tslint:disable-next-line:switch-default
|
|
5747
5738
|
switch (caseField.field_type.type) {
|
|
5748
5739
|
case FieldTypeSanitiser.FIELD_TYPE_DYNAMIC_MULTISELECT_LIST:
|
|
5749
5740
|
_this.convertArrayToDynamicListOutput(caseField, data);
|
|
@@ -6452,7 +6443,6 @@
|
|
|
6452
6443
|
});
|
|
6453
6444
|
}
|
|
6454
6445
|
}
|
|
6455
|
-
;
|
|
6456
6446
|
});
|
|
6457
6447
|
}
|
|
6458
6448
|
};
|
|
@@ -6891,7 +6881,7 @@
|
|
|
6891
6881
|
return addressModel;
|
|
6892
6882
|
};
|
|
6893
6883
|
AddressParser.prototype.parseAddressLine1 = function (classification, address) {
|
|
6894
|
-
var addressLine
|
|
6884
|
+
var addressLine;
|
|
6895
6885
|
if (classification === AddressType.RD06) {
|
|
6896
6886
|
addressLine =
|
|
6897
6887
|
address.SUB_BUILDING_NAME + " " + address.ORGANISATION_NAME + " " + address.DEPARTMENT_NAME + " " + address.PO_BOX_NUMBER;
|
|
@@ -6904,7 +6894,7 @@
|
|
|
6904
6894
|
return this.removeNonAddressValues(addressLine);
|
|
6905
6895
|
};
|
|
6906
6896
|
AddressParser.prototype.parseAddressLine2 = function (classification, address) {
|
|
6907
|
-
var addressLine
|
|
6897
|
+
var addressLine;
|
|
6908
6898
|
if (classification === AddressType.RD06) {
|
|
6909
6899
|
addressLine = address.BUILDING_NAME + " ";
|
|
6910
6900
|
}
|
|
@@ -6915,7 +6905,7 @@
|
|
|
6915
6905
|
return this.removeNonAddressValues(addressLine);
|
|
6916
6906
|
};
|
|
6917
6907
|
AddressParser.prototype.parseAddressLine3 = function (classification, address) {
|
|
6918
|
-
var addressLine
|
|
6908
|
+
var addressLine;
|
|
6919
6909
|
if (classification === AddressType.RD06) {
|
|
6920
6910
|
addressLine =
|
|
6921
6911
|
address.BUILDING_NUMBER + " " + address.THOROUGHFARE_NAME;
|
|
@@ -6943,7 +6933,7 @@
|
|
|
6943
6933
|
return value.replace(new RegExp('^,', 'gi'), '');
|
|
6944
6934
|
};
|
|
6945
6935
|
AddressParser.prototype.prefixWithCommaIfPresent = function (value) {
|
|
6946
|
-
return value ?
|
|
6936
|
+
return value ? ", " + value : value;
|
|
6947
6937
|
};
|
|
6948
6938
|
return AddressParser;
|
|
6949
6939
|
}());
|
|
@@ -7046,30 +7036,25 @@
|
|
|
7046
7036
|
this.alertObserver.next(null);
|
|
7047
7037
|
this.message = '';
|
|
7048
7038
|
};
|
|
7049
|
-
AlertService.prototype.error = function (
|
|
7050
|
-
var phrase = _a.phrase, replacements = _a.replacements;
|
|
7051
|
-
var message = this.getTranslationWithReplacements(phrase, replacements);
|
|
7039
|
+
AlertService.prototype.error = function (message) {
|
|
7052
7040
|
this.preservedError = this.preserveMessages(message);
|
|
7053
7041
|
var alert = { level: 'error', message: message };
|
|
7054
7042
|
this.errorObserver.next(alert);
|
|
7055
7043
|
// EUI-3381.
|
|
7056
7044
|
this.push(alert);
|
|
7057
7045
|
};
|
|
7058
|
-
AlertService.prototype.warning = function (
|
|
7059
|
-
var phrase = _a.phrase, replacements = _a.replacements;
|
|
7060
|
-
var message = this.getTranslationWithReplacements(phrase, replacements);
|
|
7046
|
+
AlertService.prototype.warning = function (message) {
|
|
7061
7047
|
this.preservedWarning = this.preserveMessages(message);
|
|
7062
7048
|
var alert = { level: 'warning', message: message };
|
|
7063
7049
|
this.warningObserver.next(alert);
|
|
7064
7050
|
// EUI-3381.
|
|
7065
7051
|
this.push(alert);
|
|
7066
7052
|
};
|
|
7067
|
-
AlertService.prototype.success = function (
|
|
7068
|
-
|
|
7069
|
-
|
|
7053
|
+
AlertService.prototype.success = function (message, preserve) {
|
|
7054
|
+
if (preserve === void 0) { preserve = false; }
|
|
7055
|
+
this.preservedSuccess = this.preserveMessages(message);
|
|
7070
7056
|
this.preserveAlerts = preserve || this.preserveAlerts;
|
|
7071
7057
|
var alert = { level: 'success', message: message };
|
|
7072
|
-
this.preservedSuccess = this.preserveMessages(message);
|
|
7073
7058
|
this.successObserver.next(alert);
|
|
7074
7059
|
// EUI-3381.
|
|
7075
7060
|
this.push(alert);
|
|
@@ -7213,7 +7198,7 @@
|
|
|
7213
7198
|
if (flagType) {
|
|
7214
7199
|
url += "?flag-type=" + flagType;
|
|
7215
7200
|
}
|
|
7216
|
-
if (welshRequired
|
|
7201
|
+
if (typeof welshRequired === 'boolean') {
|
|
7217
7202
|
// Check if flag-type has been added to the query string; if so, append welsh-required with '&'
|
|
7218
7203
|
url.indexOf('?') > -1 ? url += '&' : url += '?';
|
|
7219
7204
|
welshRequired ? url += 'welsh-required=Y' : url += 'welsh-required=N';
|
|
@@ -7825,18 +7810,6 @@
|
|
|
7825
7810
|
}], null, null);
|
|
7826
7811
|
})();
|
|
7827
7812
|
|
|
7828
|
-
var HasLoadingState = /** @class */ (function () {
|
|
7829
|
-
function HasLoadingState() {
|
|
7830
|
-
}
|
|
7831
|
-
Object.defineProperty(HasLoadingState.prototype, "isLoading", {
|
|
7832
|
-
get: function () {
|
|
7833
|
-
return;
|
|
7834
|
-
},
|
|
7835
|
-
enumerable: false,
|
|
7836
|
-
configurable: true
|
|
7837
|
-
});
|
|
7838
|
-
return HasLoadingState;
|
|
7839
|
-
}());
|
|
7840
7813
|
var LoadingService = /** @class */ (function () {
|
|
7841
7814
|
function LoadingService() {
|
|
7842
7815
|
this.registered = new Map();
|
|
@@ -7861,7 +7834,7 @@
|
|
|
7861
7834
|
};
|
|
7862
7835
|
LoadingService.prototype.generateToken = function () {
|
|
7863
7836
|
var timestamp = window.performance.now();
|
|
7864
|
-
return
|
|
7837
|
+
return "toolkit-loading-" + timestamp; // format: [source-library]-[unique incrementing number]
|
|
7865
7838
|
};
|
|
7866
7839
|
return LoadingService;
|
|
7867
7840
|
}());
|
|
@@ -7882,10 +7855,7 @@
|
|
|
7882
7855
|
}
|
|
7883
7856
|
SearchService.prototype.search = function (jurisdictionId, caseTypeId, metaCriteria, caseCriteria, view) {
|
|
7884
7857
|
var _this = this;
|
|
7885
|
-
var url = this.appConfig.getApiUrl() + "/caseworkers/:uid"
|
|
7886
|
-
+ ("/jurisdictions/" + jurisdictionId)
|
|
7887
|
-
+ ("/case-types/" + caseTypeId)
|
|
7888
|
-
+ "/cases";
|
|
7858
|
+
var url = this.appConfig.getApiUrl() + "/caseworkers/:uid/jurisdictions/" + jurisdictionId + "/case-types/" + caseTypeId + "/cases";
|
|
7889
7859
|
var options = this.requestOptionsBuilder.buildOptions(metaCriteria, caseCriteria, view);
|
|
7890
7860
|
var loadingToken = this.loadingService.register();
|
|
7891
7861
|
return this.httpService
|
|
@@ -7894,15 +7864,14 @@
|
|
|
7894
7864
|
};
|
|
7895
7865
|
SearchService.prototype.searchCasesByIds = function (caseTypeId, filter, view, sort) {
|
|
7896
7866
|
var _this = this;
|
|
7897
|
-
var url = this.appConfig.getCaseDataUrl() +
|
|
7898
|
-
("/internal/searchCases?ctid=" + caseTypeId + "&use_case=" + view);
|
|
7867
|
+
var url = this.appConfig.getCaseDataUrl() + "/internal/searchCases?ctid=" + caseTypeId + "&use_case=" + view;
|
|
7899
7868
|
var body = Object.assign(Object.assign({ sort: sort }, filter), { size: this.appConfig.getPaginationPageSize() });
|
|
7900
7869
|
var loadingToken = this.loadingService.register();
|
|
7901
7870
|
return this.httpService.post(url, body).pipe(operators.map(function (response) { return response; }), operators.finalize(function () { return _this.loadingService.unregister(loadingToken); }));
|
|
7902
7871
|
};
|
|
7903
7872
|
SearchService.prototype.searchCases = function (caseTypeId, metaCriteria, caseCriteria, view, sort) {
|
|
7904
7873
|
var _this = this;
|
|
7905
|
-
var url = this.appConfig.getCaseDataUrl() +
|
|
7874
|
+
var url = this.appConfig.getCaseDataUrl() + "/internal/searchCases?ctid=" + caseTypeId + "&use_case=" + view;
|
|
7906
7875
|
var options = this.requestOptionsBuilder.buildOptions(metaCriteria, caseCriteria, view);
|
|
7907
7876
|
var body = {
|
|
7908
7877
|
sort: sort,
|
|
@@ -7947,9 +7916,8 @@
|
|
|
7947
7916
|
return SearchService;
|
|
7948
7917
|
}());
|
|
7949
7918
|
SearchService.V2_MEDIATYPE_SEARCH_INPUTS = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-search-input-details.v2+json;charset=UTF-8';
|
|
7950
|
-
|
|
7919
|
+
// public static readonly VIEW_SEARCH = 'SEARCH';
|
|
7951
7920
|
SearchService.VIEW_WORKBASKET = 'WORKBASKET';
|
|
7952
|
-
SearchService.FIELD_PREFIX = 'case.';
|
|
7953
7921
|
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)); };
|
|
7954
7922
|
SearchService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: SearchService, factory: SearchService.ɵfac });
|
|
7955
7923
|
(function () {
|
|
@@ -8079,17 +8047,12 @@
|
|
|
8079
8047
|
this.appConfig = appConfig;
|
|
8080
8048
|
}
|
|
8081
8049
|
DefinitionsService.prototype.getCaseTypes = function (jurisdictionId, access) {
|
|
8082
|
-
var url = this.appConfig.getApiUrl()
|
|
8083
|
-
+ "/caseworkers/:uid"
|
|
8084
|
-
+ ("/jurisdictions/" + jurisdictionId)
|
|
8085
|
-
+ ("/case-types?access=" + access);
|
|
8050
|
+
var url = this.appConfig.getApiUrl() + "/caseworkers/:uid/jurisdictions/" + jurisdictionId + "/case-types?access=" + access;
|
|
8086
8051
|
return this.http
|
|
8087
8052
|
.get(url).pipe(operators.map(function (response) { return response; }));
|
|
8088
8053
|
};
|
|
8089
8054
|
DefinitionsService.prototype.getJurisdictions = function (access) {
|
|
8090
|
-
var url = this.appConfig.getApiUrl()
|
|
8091
|
-
+ "/caseworkers/:uid"
|
|
8092
|
-
+ ("/jurisdictions?access=" + access);
|
|
8055
|
+
var url = this.appConfig.getApiUrl() + "/caseworkers/:uid/jurisdictions?access=" + access;
|
|
8093
8056
|
return this.http
|
|
8094
8057
|
.get(url)
|
|
8095
8058
|
.pipe(operators.map(function (response) { return response; }));
|
|
@@ -8171,8 +8134,8 @@
|
|
|
8171
8134
|
compare: function (a, b) {
|
|
8172
8135
|
var fieldA = a.case_fields[fieldId];
|
|
8173
8136
|
var fieldB = b.case_fields[fieldId];
|
|
8174
|
-
fieldA = util.isUndefined(fieldA) || fieldA
|
|
8175
|
-
fieldB = util.isUndefined(fieldB) || fieldB
|
|
8137
|
+
fieldA = util.isUndefined(fieldA) || fieldA === null ? '' : fieldA.toLowerCase();
|
|
8138
|
+
fieldB = util.isUndefined(fieldB) || fieldB === null ? '' : fieldB.toLowerCase();
|
|
8176
8139
|
return fieldA === fieldB ? 0 : fieldA > fieldB ? 1 : -1;
|
|
8177
8140
|
}
|
|
8178
8141
|
};
|
|
@@ -8182,8 +8145,8 @@
|
|
|
8182
8145
|
compare: function (a, b) {
|
|
8183
8146
|
var fieldA = a.case_fields[fieldId];
|
|
8184
8147
|
var fieldB = b.case_fields[fieldId];
|
|
8185
|
-
fieldA = util.isUndefined(fieldA) || fieldA
|
|
8186
|
-
fieldB = util.isUndefined(fieldB) || fieldB
|
|
8148
|
+
fieldA = util.isUndefined(fieldA) || fieldA === null ? '' : fieldA.join().toLowerCase();
|
|
8149
|
+
fieldB = util.isUndefined(fieldB) || fieldB === null ? '' : fieldB.join().toLowerCase();
|
|
8187
8150
|
return fieldA === fieldB ? 0 : fieldA > fieldB ? 1 : -1;
|
|
8188
8151
|
}
|
|
8189
8152
|
};
|
|
@@ -8441,31 +8404,31 @@
|
|
|
8441
8404
|
};
|
|
8442
8405
|
WizardPageFieldToCaseFieldMapper.prototype.processComplexFieldOverride = function (override, caseField, caseFields) {
|
|
8443
8406
|
var caseFieldIds = override.complex_field_element_id.split('.');
|
|
8444
|
-
var
|
|
8407
|
+
var caseFieldLeaf;
|
|
8445
8408
|
var children = this.getCaseFieldChildren(caseField);
|
|
8446
8409
|
if (children.length > 0) {
|
|
8447
8410
|
var _a = __read(caseFieldIds), _ = _a[0], tail = _a.slice(1);
|
|
8448
|
-
|
|
8411
|
+
caseFieldLeaf = this.getCaseFieldLeaf(tail, children);
|
|
8449
8412
|
}
|
|
8450
8413
|
else {
|
|
8451
|
-
|
|
8414
|
+
caseFieldLeaf = this.getCaseFieldLeaf(caseFieldIds, caseFields);
|
|
8452
8415
|
}
|
|
8453
8416
|
if (override.display_context !== 'HIDDEN') {
|
|
8454
|
-
|
|
8455
|
-
|
|
8417
|
+
caseFieldLeaf.hidden = false;
|
|
8418
|
+
caseFieldLeaf.display_context = override.display_context;
|
|
8456
8419
|
if (override.label && override.label.length > 0) {
|
|
8457
|
-
|
|
8420
|
+
caseFieldLeaf.label = override.label;
|
|
8458
8421
|
}
|
|
8459
8422
|
if (override.hint_text && override.hint_text.length > 0) {
|
|
8460
|
-
|
|
8423
|
+
caseFieldLeaf.hint_text = override.hint_text;
|
|
8461
8424
|
}
|
|
8462
8425
|
if (override.show_condition && override.show_condition.length > 0) {
|
|
8463
|
-
|
|
8426
|
+
caseFieldLeaf.show_condition = override.show_condition;
|
|
8464
8427
|
}
|
|
8465
8428
|
}
|
|
8466
8429
|
else {
|
|
8467
|
-
|
|
8468
|
-
|
|
8430
|
+
caseFieldLeaf.hidden = true;
|
|
8431
|
+
caseFieldLeaf.display_context = override.display_context;
|
|
8469
8432
|
}
|
|
8470
8433
|
};
|
|
8471
8434
|
WizardPageFieldToCaseFieldMapper.prototype.fixShowConditionPath = function (caseField, pathPrefix) {
|
|
@@ -8479,7 +8442,7 @@
|
|
|
8479
8442
|
});
|
|
8480
8443
|
};
|
|
8481
8444
|
WizardPageFieldToCaseFieldMapper.prototype.preparePathPrefix = function (pathPrefix, caseField) {
|
|
8482
|
-
return pathPrefix.length === 0 ? caseField : pathPrefix +
|
|
8445
|
+
return pathPrefix.length === 0 ? caseField : pathPrefix + "." + caseField;
|
|
8483
8446
|
};
|
|
8484
8447
|
WizardPageFieldToCaseFieldMapper.prototype.getCaseFieldLeaf = function (caseFieldId, caseFields) {
|
|
8485
8448
|
var _a = __read(caseFieldId), head = _a[0], tail = _a.slice(1);
|
|
@@ -8536,223 +8499,13 @@
|
|
|
8536
8499
|
}], null, null);
|
|
8537
8500
|
})();
|
|
8538
8501
|
|
|
8539
|
-
var MULTIPLE_TASKS_FOUND = 'More than one task found!';
|
|
8540
|
-
var WorkAllocationService = /** @class */ (function () {
|
|
8541
|
-
function WorkAllocationService(http, appConfig, errorService, alertService, sessionStorageService) {
|
|
8542
|
-
this.http = http;
|
|
8543
|
-
this.appConfig = appConfig;
|
|
8544
|
-
this.errorService = errorService;
|
|
8545
|
-
this.alertService = alertService;
|
|
8546
|
-
this.sessionStorageService = sessionStorageService;
|
|
8547
|
-
// Check to see if work allocation is enabled
|
|
8548
|
-
}
|
|
8549
|
-
/**
|
|
8550
|
-
* Call the API to get tasks matching the search criteria.
|
|
8551
|
-
* @param searchRequest The search parameters that specify which tasks to match.
|
|
8552
|
-
*/
|
|
8553
|
-
WorkAllocationService.prototype.searchTasks = function (searchRequest) {
|
|
8554
|
-
var _this = this;
|
|
8555
|
-
// Do not need to check if WA enabled as parent method will do that
|
|
8556
|
-
var url = this.appConfig.getWorkAllocationApiUrl() + "/searchForCompletable";
|
|
8557
|
-
return this.http
|
|
8558
|
-
.post(url, { searchRequest: searchRequest }, null, false)
|
|
8559
|
-
.pipe(operators.map(function (response) { return response; }), operators.catchError(function (error) {
|
|
8560
|
-
_this.errorService.setError(error);
|
|
8561
|
-
// explicitly eat away 401 error and 400 error
|
|
8562
|
-
if (error && error.status && (error.status === 401 || error.status === 400)) {
|
|
8563
|
-
// do nothing
|
|
8564
|
-
console.log('error status 401 or 400', error);
|
|
8565
|
-
}
|
|
8566
|
-
else {
|
|
8567
|
-
return rxjs.throwError(error);
|
|
8568
|
-
}
|
|
8569
|
-
}));
|
|
8570
|
-
};
|
|
8571
|
-
WorkAllocationService.prototype.isWAEnabled = function (jurisdiction, caseType) {
|
|
8572
|
-
this.features = this.appConfig.getWAServiceConfig();
|
|
8573
|
-
var enabled = false;
|
|
8574
|
-
if (!jurisdiction || !caseType) {
|
|
8575
|
-
var caseInfo = JSON.parse(this.sessionStorageService.getItem('caseInfo'));
|
|
8576
|
-
jurisdiction = caseInfo.jurisdiction;
|
|
8577
|
-
caseType = caseInfo.caseType;
|
|
8578
|
-
}
|
|
8579
|
-
if (!this.features || !this.features.configurations) {
|
|
8580
|
-
return false;
|
|
8581
|
-
}
|
|
8582
|
-
this.features.configurations.forEach(function (serviceConfig) {
|
|
8583
|
-
if (serviceConfig.serviceName === jurisdiction && (serviceConfig.caseTypes.indexOf(caseType) !== -1)) {
|
|
8584
|
-
enabled = true;
|
|
8585
|
-
}
|
|
8586
|
-
});
|
|
8587
|
-
return enabled;
|
|
8588
|
-
};
|
|
8589
|
-
/**
|
|
8590
|
-
* Call the API to assign a task.
|
|
8591
|
-
* @param taskId specifies which task should be assigned.
|
|
8592
|
-
* @param userId specifies the user the task should be assigned to.
|
|
8593
|
-
*/
|
|
8594
|
-
WorkAllocationService.prototype.assignTask = function (taskId, userId) {
|
|
8595
|
-
var _this = this;
|
|
8596
|
-
if (!this.isWAEnabled()) {
|
|
8597
|
-
return rxjs.of(null);
|
|
8598
|
-
}
|
|
8599
|
-
var url = this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId + "/assign";
|
|
8600
|
-
return this.http
|
|
8601
|
-
.post(url, { userId: userId })
|
|
8602
|
-
.pipe(operators.catchError(function (error) {
|
|
8603
|
-
_this.errorService.setError(error);
|
|
8604
|
-
return rxjs.throwError(error);
|
|
8605
|
-
}));
|
|
8606
|
-
};
|
|
8607
|
-
/**
|
|
8608
|
-
* Call the API to complete a task.
|
|
8609
|
-
* @param taskId specifies which task should be completed.
|
|
8610
|
-
*/
|
|
8611
|
-
WorkAllocationService.prototype.completeTask = function (taskId) {
|
|
8612
|
-
var _this = this;
|
|
8613
|
-
if (!this.isWAEnabled()) {
|
|
8614
|
-
return rxjs.of(null);
|
|
8615
|
-
}
|
|
8616
|
-
var url = this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId + "/complete";
|
|
8617
|
-
return this.http
|
|
8618
|
-
.post(url, {})
|
|
8619
|
-
.pipe(operators.catchError(function (error) {
|
|
8620
|
-
_this.errorService.setError(error);
|
|
8621
|
-
// this will subscribe to get the user details and decide whether to display an error message
|
|
8622
|
-
_this.http.get(_this.appConfig.getUserInfoApiUrl()).pipe(operators.map(function (response) { return response; })).subscribe(function (response) {
|
|
8623
|
-
_this.handleTaskCompletionError(response);
|
|
8624
|
-
});
|
|
8625
|
-
return rxjs.throwError(error);
|
|
8626
|
-
}));
|
|
8627
|
-
};
|
|
8628
|
-
/**
|
|
8629
|
-
* Call the API to assign and complete a task.
|
|
8630
|
-
* @param taskId specifies which task should be completed.
|
|
8631
|
-
*/
|
|
8632
|
-
WorkAllocationService.prototype.assignAndCompleteTask = function (taskId) {
|
|
8633
|
-
var _this = this;
|
|
8634
|
-
if (!this.isWAEnabled()) {
|
|
8635
|
-
return rxjs.of(null);
|
|
8636
|
-
}
|
|
8637
|
-
var url = this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId + "/complete";
|
|
8638
|
-
return this.http
|
|
8639
|
-
.post(url, {
|
|
8640
|
-
completion_options: {
|
|
8641
|
-
assign_and_complete: true
|
|
8642
|
-
}
|
|
8643
|
-
})
|
|
8644
|
-
.pipe(operators.catchError(function (error) {
|
|
8645
|
-
_this.errorService.setError(error);
|
|
8646
|
-
// this will subscribe to get the user details and decide whether to display an error message
|
|
8647
|
-
_this.http.get(_this.appConfig.getUserInfoApiUrl()).pipe(operators.map(function (response) { return response; })).subscribe(function (response) {
|
|
8648
|
-
_this.handleTaskCompletionError(response);
|
|
8649
|
-
});
|
|
8650
|
-
return rxjs.throwError(error);
|
|
8651
|
-
}));
|
|
8652
|
-
};
|
|
8653
|
-
/**
|
|
8654
|
-
* Handles the response from the observable to get the user details when task is completed.
|
|
8655
|
-
* @param response is the response given from the observable which contains the user detaild.
|
|
8656
|
-
*/
|
|
8657
|
-
WorkAllocationService.prototype.handleTaskCompletionError = function (response) {
|
|
8658
|
-
var userDetails = response;
|
|
8659
|
-
if (this.userIsCaseworker(userDetails.userInfo.roles)) {
|
|
8660
|
-
// when submitting the completion of task if not yet rendered cases/case confirm then preserve the alert for re-rendering
|
|
8661
|
-
this.alertService.setPreserveAlerts(true, ['cases/case', 'submit']);
|
|
8662
|
-
this.alertService.warning({ phrase: 'A task could not be completed successfully. Please complete the task associated with the case manually.' });
|
|
8663
|
-
}
|
|
8664
|
-
};
|
|
8665
|
-
/**
|
|
8666
|
-
* Returns true if the user's role is equivalent to a caseworker.
|
|
8667
|
-
* @param roles is the list of roles found from the current user.
|
|
8668
|
-
*/
|
|
8669
|
-
WorkAllocationService.prototype.userIsCaseworker = function (roles) {
|
|
8670
|
-
var lowerCaseRoles = roles.map(function (role) { return role.toLowerCase(); });
|
|
8671
|
-
// When/if lib & target permanently change to es2016, replace indexOf with includes
|
|
8672
|
-
return (lowerCaseRoles.indexOf(WorkAllocationService.iACCaseOfficer) !== -1)
|
|
8673
|
-
|| (lowerCaseRoles.indexOf(WorkAllocationService.iACAdmOfficer) !== -1);
|
|
8674
|
-
};
|
|
8675
|
-
/**
|
|
8676
|
-
* Look for open tasks for a case and event combination. There are 5 possible scenarios:
|
|
8677
|
-
* 1. No tasks found => Success.
|
|
8678
|
-
* 2. One task found => Mark as done => Success.
|
|
8679
|
-
* 3. One task found => Mark as done throws error => Failure.
|
|
8680
|
-
* 4. More than one task found => Failure.
|
|
8681
|
-
* 5. Search call throws an error => Failure.
|
|
8682
|
-
* @param ccdId The ID of the case to find tasks for.
|
|
8683
|
-
* @param eventId The ID of the event to find tasks for.
|
|
8684
|
-
*/
|
|
8685
|
-
WorkAllocationService.prototype.completeAppropriateTask = function (ccdId, eventId, jurisdiction, caseTypeId) {
|
|
8686
|
-
var _this = this;
|
|
8687
|
-
if (!this.isWAEnabled(jurisdiction, caseTypeId)) {
|
|
8688
|
-
return rxjs.of(null);
|
|
8689
|
-
}
|
|
8690
|
-
var taskSearchParameter = {
|
|
8691
|
-
ccdId: ccdId,
|
|
8692
|
-
eventId: eventId,
|
|
8693
|
-
jurisdiction: jurisdiction,
|
|
8694
|
-
caseTypeId: caseTypeId
|
|
8695
|
-
};
|
|
8696
|
-
return this.searchTasks(taskSearchParameter)
|
|
8697
|
-
.pipe(operators.map(function (response) {
|
|
8698
|
-
var tasks = response.tasks;
|
|
8699
|
-
if (tasks && tasks.length > 0) {
|
|
8700
|
-
if (tasks.length === 1) {
|
|
8701
|
-
_this.completeTask(tasks[0].id).subscribe();
|
|
8702
|
-
}
|
|
8703
|
-
else {
|
|
8704
|
-
// This is a problem. Throw an appropriate error.
|
|
8705
|
-
throw new Error(MULTIPLE_TASKS_FOUND);
|
|
8706
|
-
}
|
|
8707
|
-
}
|
|
8708
|
-
return true; // All good. Nothing to see here.
|
|
8709
|
-
}), operators.catchError(function (error) {
|
|
8710
|
-
// Simply rethrow it.
|
|
8711
|
-
return rxjs.throwError(error);
|
|
8712
|
-
}));
|
|
8713
|
-
};
|
|
8714
|
-
/**
|
|
8715
|
-
* Return tasks for case and event.
|
|
8716
|
-
*/
|
|
8717
|
-
WorkAllocationService.prototype.getTasksByCaseIdAndEventId = function (eventId, caseId, caseType, jurisdiction) {
|
|
8718
|
-
var defaultPayload = {
|
|
8719
|
-
task_required_for_event: false,
|
|
8720
|
-
tasks: []
|
|
8721
|
-
};
|
|
8722
|
-
if (!this.isWAEnabled()) {
|
|
8723
|
-
return rxjs.of(defaultPayload);
|
|
8724
|
-
}
|
|
8725
|
-
return this.http.get(this.appConfig.getWorkAllocationApiUrl() + "/case/tasks/" + caseId + "/event/" + eventId + "/caseType/" + caseType + "/jurisdiction/" + jurisdiction);
|
|
8726
|
-
};
|
|
8727
|
-
/**
|
|
8728
|
-
* Call the API to get a task
|
|
8729
|
-
*/
|
|
8730
|
-
WorkAllocationService.prototype.getTask = function (taskId) {
|
|
8731
|
-
if (!this.isWAEnabled()) {
|
|
8732
|
-
return rxjs.of({ task: null });
|
|
8733
|
-
}
|
|
8734
|
-
return this.http.get(this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId);
|
|
8735
|
-
};
|
|
8736
|
-
return WorkAllocationService;
|
|
8737
|
-
}());
|
|
8738
|
-
WorkAllocationService.iACCaseOfficer = 'caseworker-ia-caseofficer';
|
|
8739
|
-
WorkAllocationService.iACAdmOfficer = 'caseworker-ia-admofficer';
|
|
8740
|
-
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)); };
|
|
8741
|
-
WorkAllocationService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: WorkAllocationService, factory: WorkAllocationService.ɵfac });
|
|
8742
|
-
(function () {
|
|
8743
|
-
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(WorkAllocationService, [{
|
|
8744
|
-
type: i0.Injectable
|
|
8745
|
-
}], function () { return [{ type: HttpService }, { type: AbstractAppConfig }, { type: HttpErrorService }, { type: AlertService }, { type: SessionStorageService }]; }, null);
|
|
8746
|
-
})();
|
|
8747
|
-
|
|
8748
8502
|
var CasesService = /** @class */ (function () {
|
|
8749
|
-
function CasesService(http, appConfig, orderService, errorService, wizardPageFieldToCaseFieldMapper,
|
|
8503
|
+
function CasesService(http, appConfig, orderService, errorService, wizardPageFieldToCaseFieldMapper, loadingService, sessionStorageService) {
|
|
8750
8504
|
this.http = http;
|
|
8751
8505
|
this.appConfig = appConfig;
|
|
8752
8506
|
this.orderService = orderService;
|
|
8753
8507
|
this.errorService = errorService;
|
|
8754
8508
|
this.wizardPageFieldToCaseFieldMapper = wizardPageFieldToCaseFieldMapper;
|
|
8755
|
-
this.workAllocationService = workAllocationService;
|
|
8756
8509
|
this.loadingService = loadingService;
|
|
8757
8510
|
this.sessionStorageService = sessionStorageService;
|
|
8758
8511
|
this.get = this.getCaseView;
|
|
@@ -8771,11 +8524,7 @@
|
|
|
8771
8524
|
};
|
|
8772
8525
|
CasesService.prototype.getCaseView = function (jurisdictionId, caseTypeId, caseId) {
|
|
8773
8526
|
var _this = this;
|
|
8774
|
-
var url = this.appConfig.getApiUrl()
|
|
8775
|
-
+ "/caseworkers/:uid"
|
|
8776
|
-
+ ("/jurisdictions/" + jurisdictionId)
|
|
8777
|
-
+ ("/case-types/" + caseTypeId)
|
|
8778
|
-
+ ("/cases/" + caseId);
|
|
8527
|
+
var url = this.appConfig.getApiUrl() + "/caseworkers/:uid/jurisdictions/" + jurisdictionId + "/case-types/" + caseTypeId + "/cases/" + caseId;
|
|
8779
8528
|
var loadingToken = this.loadingService.register();
|
|
8780
8529
|
return this.http
|
|
8781
8530
|
.get(url)
|
|
@@ -8827,7 +8576,7 @@
|
|
|
8827
8576
|
CasesService.prototype.createEvent = function (caseDetails, eventData) {
|
|
8828
8577
|
var _this = this;
|
|
8829
8578
|
var caseId = caseDetails.case_id;
|
|
8830
|
-
var url = this.appConfig.getCaseDataUrl() +
|
|
8579
|
+
var url = this.appConfig.getCaseDataUrl() + "/cases/" + caseId + "/events";
|
|
8831
8580
|
var headers = new i1$2.HttpHeaders()
|
|
8832
8581
|
.set('experimental', 'true')
|
|
8833
8582
|
.set('Accept', CasesService.V2_MEDIATYPE_CREATE_EVENT)
|
|
@@ -8841,9 +8590,8 @@
|
|
|
8841
8590
|
};
|
|
8842
8591
|
CasesService.prototype.validateCase = function (ctid, eventData, pageId) {
|
|
8843
8592
|
var _this = this;
|
|
8844
|
-
var pageIdString = pageId ?
|
|
8845
|
-
var url = this.appConfig.getCaseDataUrl()
|
|
8846
|
-
+ ("/case-types/" + ctid + "/validate" + pageIdString);
|
|
8593
|
+
var pageIdString = pageId ? "?pageId=" + pageId : '';
|
|
8594
|
+
var url = this.appConfig.getCaseDataUrl() + "/case-types/" + ctid + "/validate" + pageIdString;
|
|
8847
8595
|
var headers = new i1$2.HttpHeaders()
|
|
8848
8596
|
.set('experimental', 'true')
|
|
8849
8597
|
.set('Accept', CasesService.V2_MEDIATYPE_CASE_DATA_VALIDATE)
|
|
@@ -8861,8 +8609,7 @@
|
|
|
8861
8609
|
if (eventData.ignore_warning) {
|
|
8862
8610
|
ignoreWarning = 'true';
|
|
8863
8611
|
}
|
|
8864
|
-
var url = this.appConfig.getCaseDataUrl()
|
|
8865
|
-
+ ("/case-types/" + ctid + "/cases?ignore-warning=" + ignoreWarning);
|
|
8612
|
+
var url = this.appConfig.getCaseDataUrl() + "/case-types/" + ctid + "/cases?ignore-warning=" + ignoreWarning;
|
|
8866
8613
|
var headers = new i1$2.HttpHeaders()
|
|
8867
8614
|
.set('experimental', 'true')
|
|
8868
8615
|
.set('Accept', CasesService.V2_MEDIATYPE_CREATE_CASE)
|
|
@@ -8876,9 +8623,7 @@
|
|
|
8876
8623
|
};
|
|
8877
8624
|
CasesService.prototype.getPrintDocuments = function (caseId) {
|
|
8878
8625
|
var _this = this;
|
|
8879
|
-
var url = this.appConfig.getCaseDataUrl()
|
|
8880
|
-
+ ("/cases/" + caseId)
|
|
8881
|
-
+ "/documents";
|
|
8626
|
+
var url = this.appConfig.getCaseDataUrl() + "/cases/" + caseId + "/documents";
|
|
8882
8627
|
var headers = new i1$2.HttpHeaders()
|
|
8883
8628
|
.set('experimental', 'true')
|
|
8884
8629
|
.set('Accept', CasesService.V2_MEDIATYPE_CASE_DOCUMENTS)
|
|
@@ -8987,12 +8732,12 @@
|
|
|
8987
8732
|
CasesService.V2_MEDIATYPE_CREATE_EVENT = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.create-event.v2+json;charset=UTF-8';
|
|
8988
8733
|
CasesService.V2_MEDIATYPE_CREATE_CASE = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.create-case.v2+json;charset=UTF-8';
|
|
8989
8734
|
CasesService.PUI_CASE_MANAGER = 'pui-case-manager';
|
|
8990
|
-
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(
|
|
8735
|
+
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)); };
|
|
8991
8736
|
CasesService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: CasesService, factory: CasesService.ɵfac });
|
|
8992
8737
|
(function () {
|
|
8993
8738
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(CasesService, [{
|
|
8994
8739
|
type: i0.Injectable
|
|
8995
|
-
}], function () { return [{ type: HttpService }, { type: AbstractAppConfig }, { type: OrderService }, { type: HttpErrorService }, { type: WizardPageFieldToCaseFieldMapper }, { type:
|
|
8740
|
+
}], function () { return [{ type: HttpService }, { type: AbstractAppConfig }, { type: OrderService }, { type: HttpErrorService }, { type: WizardPageFieldToCaseFieldMapper }, { type: LoadingService }, { type: SessionStorageService }]; }, null);
|
|
8996
8741
|
})();
|
|
8997
8742
|
|
|
8998
8743
|
var EventTriggerService = /** @class */ (function () {
|
|
@@ -9047,7 +8792,7 @@
|
|
|
9047
8792
|
_this.eventTriggerService.announceEventTrigger(eventTrigger);
|
|
9048
8793
|
})
|
|
9049
8794
|
.catch(function (error) {
|
|
9050
|
-
_this.alertService.error(
|
|
8795
|
+
_this.alertService.error(error.message);
|
|
9051
8796
|
return rxjs.throwError(error);
|
|
9052
8797
|
});
|
|
9053
8798
|
};
|
|
@@ -9252,8 +8997,7 @@
|
|
|
9252
8997
|
if (!wizard.hasPage(pageId)) {
|
|
9253
8998
|
this.goToFirst(wizard, canShowPredicate, route)
|
|
9254
8999
|
.then(function () {
|
|
9255
|
-
|
|
9256
|
-
_this.alertService.error({ phrase: 'No page could be found for %PAGEID%', replacements: replacements });
|
|
9000
|
+
_this.alertService.error("No page could be found for '" + pageId + "'");
|
|
9257
9001
|
});
|
|
9258
9002
|
return Promise.resolve(false);
|
|
9259
9003
|
}
|
|
@@ -9615,7 +9359,7 @@
|
|
|
9615
9359
|
PageValidationService.prototype.isHidden = function (caseField, editForm, path) {
|
|
9616
9360
|
var formFields = editForm.getRawValue();
|
|
9617
9361
|
var condition = ShowCondition.getInstance(caseField.show_condition);
|
|
9618
|
-
if (path && path.indexOf(
|
|
9362
|
+
if (path && path.indexOf("_" + caseField.id + "_") === -1) {
|
|
9619
9363
|
path = "" + path + caseField.id;
|
|
9620
9364
|
}
|
|
9621
9365
|
return !condition.match(formFields.data, path);
|
|
@@ -9647,6 +9391,215 @@
|
|
|
9647
9391
|
}], function () { return [{ type: CaseFieldService }]; }, null);
|
|
9648
9392
|
})();
|
|
9649
9393
|
|
|
9394
|
+
var MULTIPLE_TASKS_FOUND = 'More than one task found!';
|
|
9395
|
+
var WorkAllocationService = /** @class */ (function () {
|
|
9396
|
+
function WorkAllocationService(http, appConfig, errorService, alertService, sessionStorageService) {
|
|
9397
|
+
this.http = http;
|
|
9398
|
+
this.appConfig = appConfig;
|
|
9399
|
+
this.errorService = errorService;
|
|
9400
|
+
this.alertService = alertService;
|
|
9401
|
+
this.sessionStorageService = sessionStorageService;
|
|
9402
|
+
// Check to see if work allocation is enabled
|
|
9403
|
+
}
|
|
9404
|
+
/**
|
|
9405
|
+
* Call the API to get tasks matching the search criteria.
|
|
9406
|
+
* @param searchRequest The search parameters that specify which tasks to match.
|
|
9407
|
+
*/
|
|
9408
|
+
WorkAllocationService.prototype.searchTasks = function (searchRequest) {
|
|
9409
|
+
var _this = this;
|
|
9410
|
+
// Do not need to check if WA enabled as parent method will do that
|
|
9411
|
+
var url = this.appConfig.getWorkAllocationApiUrl() + "/searchForCompletable";
|
|
9412
|
+
return this.http
|
|
9413
|
+
.post(url, { searchRequest: searchRequest }, null, false)
|
|
9414
|
+
.pipe(operators.map(function (response) { return response; }), operators.catchError(function (error) {
|
|
9415
|
+
_this.errorService.setError(error);
|
|
9416
|
+
// explicitly eat away 401 error and 400 error
|
|
9417
|
+
if (error && error.status && (error.status === 401 || error.status === 400)) {
|
|
9418
|
+
// do nothing
|
|
9419
|
+
console.log('error status 401 or 400', error);
|
|
9420
|
+
}
|
|
9421
|
+
else {
|
|
9422
|
+
return rxjs.throwError(error);
|
|
9423
|
+
}
|
|
9424
|
+
}));
|
|
9425
|
+
};
|
|
9426
|
+
WorkAllocationService.prototype.isWAEnabled = function (jurisdiction, caseType) {
|
|
9427
|
+
this.features = this.appConfig.getWAServiceConfig();
|
|
9428
|
+
var enabled = false;
|
|
9429
|
+
if (!jurisdiction || !caseType) {
|
|
9430
|
+
var caseInfo = JSON.parse(this.sessionStorageService.getItem('caseInfo'));
|
|
9431
|
+
jurisdiction = caseInfo.jurisdiction;
|
|
9432
|
+
caseType = caseInfo.caseType;
|
|
9433
|
+
}
|
|
9434
|
+
if (!this.features || !this.features.configurations) {
|
|
9435
|
+
return false;
|
|
9436
|
+
}
|
|
9437
|
+
this.features.configurations.forEach(function (serviceConfig) {
|
|
9438
|
+
if (serviceConfig.serviceName === jurisdiction && (serviceConfig.caseTypes.indexOf(caseType) !== -1)) {
|
|
9439
|
+
enabled = true;
|
|
9440
|
+
}
|
|
9441
|
+
});
|
|
9442
|
+
return enabled;
|
|
9443
|
+
};
|
|
9444
|
+
/**
|
|
9445
|
+
* Call the API to assign a task.
|
|
9446
|
+
* @param taskId specifies which task should be assigned.
|
|
9447
|
+
* @param userId specifies the user the task should be assigned to.
|
|
9448
|
+
*/
|
|
9449
|
+
WorkAllocationService.prototype.assignTask = function (taskId, userId) {
|
|
9450
|
+
var _this = this;
|
|
9451
|
+
if (!this.isWAEnabled()) {
|
|
9452
|
+
return rxjs.of(null);
|
|
9453
|
+
}
|
|
9454
|
+
var url = this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId + "/assign";
|
|
9455
|
+
return this.http
|
|
9456
|
+
.post(url, { userId: userId })
|
|
9457
|
+
.pipe(operators.catchError(function (error) {
|
|
9458
|
+
_this.errorService.setError(error);
|
|
9459
|
+
return rxjs.throwError(error);
|
|
9460
|
+
}));
|
|
9461
|
+
};
|
|
9462
|
+
/**
|
|
9463
|
+
* Call the API to complete a task.
|
|
9464
|
+
* @param taskId specifies which task should be completed.
|
|
9465
|
+
*/
|
|
9466
|
+
WorkAllocationService.prototype.completeTask = function (taskId) {
|
|
9467
|
+
var _this = this;
|
|
9468
|
+
if (!this.isWAEnabled()) {
|
|
9469
|
+
return rxjs.of(null);
|
|
9470
|
+
}
|
|
9471
|
+
var url = this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId + "/complete";
|
|
9472
|
+
return this.http
|
|
9473
|
+
.post(url, {})
|
|
9474
|
+
.pipe(operators.catchError(function (error) {
|
|
9475
|
+
_this.errorService.setError(error);
|
|
9476
|
+
// this will subscribe to get the user details and decide whether to display an error message
|
|
9477
|
+
_this.http.get(_this.appConfig.getUserInfoApiUrl()).pipe(operators.map(function (response) { return response; })).subscribe(function (response) {
|
|
9478
|
+
_this.handleTaskCompletionError(response);
|
|
9479
|
+
});
|
|
9480
|
+
return rxjs.throwError(error);
|
|
9481
|
+
}));
|
|
9482
|
+
};
|
|
9483
|
+
/**
|
|
9484
|
+
* Call the API to assign and complete a task.
|
|
9485
|
+
* @param taskId specifies which task should be completed.
|
|
9486
|
+
*/
|
|
9487
|
+
WorkAllocationService.prototype.assignAndCompleteTask = function (taskId) {
|
|
9488
|
+
var _this = this;
|
|
9489
|
+
if (!this.isWAEnabled()) {
|
|
9490
|
+
return rxjs.of(null);
|
|
9491
|
+
}
|
|
9492
|
+
var url = this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId + "/complete";
|
|
9493
|
+
return this.http
|
|
9494
|
+
.post(url, {
|
|
9495
|
+
completion_options: {
|
|
9496
|
+
assign_and_complete: true
|
|
9497
|
+
}
|
|
9498
|
+
})
|
|
9499
|
+
.pipe(operators.catchError(function (error) {
|
|
9500
|
+
_this.errorService.setError(error);
|
|
9501
|
+
// this will subscribe to get the user details and decide whether to display an error message
|
|
9502
|
+
_this.http.get(_this.appConfig.getUserInfoApiUrl()).pipe(operators.map(function (response) { return response; })).subscribe(function (response) {
|
|
9503
|
+
_this.handleTaskCompletionError(response);
|
|
9504
|
+
});
|
|
9505
|
+
return rxjs.throwError(error);
|
|
9506
|
+
}));
|
|
9507
|
+
};
|
|
9508
|
+
/**
|
|
9509
|
+
* Handles the response from the observable to get the user details when task is completed.
|
|
9510
|
+
* @param response is the response given from the observable which contains the user detaild.
|
|
9511
|
+
*/
|
|
9512
|
+
WorkAllocationService.prototype.handleTaskCompletionError = function (response) {
|
|
9513
|
+
var userDetails = response;
|
|
9514
|
+
if (this.userIsCaseworker(userDetails.userInfo.roles)) {
|
|
9515
|
+
// when submitting the completion of task if not yet rendered cases/case confirm then preserve the alert for re-rendering
|
|
9516
|
+
this.alertService.setPreserveAlerts(true, ['cases/case', 'submit']);
|
|
9517
|
+
this.alertService.warning('A task could not be completed successfully. Please complete the task associated with the case manually.');
|
|
9518
|
+
}
|
|
9519
|
+
};
|
|
9520
|
+
/**
|
|
9521
|
+
* Returns true if the user's role is equivalent to a caseworker.
|
|
9522
|
+
* @param roles is the list of roles found from the current user.
|
|
9523
|
+
*/
|
|
9524
|
+
WorkAllocationService.prototype.userIsCaseworker = function (roles) {
|
|
9525
|
+
var lowerCaseRoles = roles.map(function (role) { return role.toLowerCase(); });
|
|
9526
|
+
// When/if lib & target permanently change to es2016, replace indexOf with includes
|
|
9527
|
+
return (lowerCaseRoles.indexOf(WorkAllocationService.iACCaseOfficer) !== -1)
|
|
9528
|
+
|| (lowerCaseRoles.indexOf(WorkAllocationService.iACAdmOfficer) !== -1);
|
|
9529
|
+
};
|
|
9530
|
+
/**
|
|
9531
|
+
* Look for open tasks for a case and event combination. There are 5 possible scenarios:
|
|
9532
|
+
* 1. No tasks found => Success.
|
|
9533
|
+
* 2. One task found => Mark as done => Success.
|
|
9534
|
+
* 3. One task found => Mark as done throws error => Failure.
|
|
9535
|
+
* 4. More than one task found => Failure.
|
|
9536
|
+
* 5. Search call throws an error => Failure.
|
|
9537
|
+
* @param ccdId The ID of the case to find tasks for.
|
|
9538
|
+
* @param eventId The ID of the event to find tasks for.
|
|
9539
|
+
*/
|
|
9540
|
+
WorkAllocationService.prototype.completeAppropriateTask = function (ccdId, eventId, jurisdiction, caseTypeId) {
|
|
9541
|
+
var _this = this;
|
|
9542
|
+
if (!this.isWAEnabled(jurisdiction, caseTypeId)) {
|
|
9543
|
+
return rxjs.of(null);
|
|
9544
|
+
}
|
|
9545
|
+
var taskSearchParameter = {
|
|
9546
|
+
ccdId: ccdId,
|
|
9547
|
+
eventId: eventId,
|
|
9548
|
+
jurisdiction: jurisdiction,
|
|
9549
|
+
caseTypeId: caseTypeId
|
|
9550
|
+
};
|
|
9551
|
+
return this.searchTasks(taskSearchParameter)
|
|
9552
|
+
.pipe(operators.map(function (response) {
|
|
9553
|
+
var tasks = response.tasks;
|
|
9554
|
+
if (tasks && tasks.length > 0) {
|
|
9555
|
+
if (tasks.length === 1) {
|
|
9556
|
+
_this.completeTask(tasks[0].id).subscribe();
|
|
9557
|
+
}
|
|
9558
|
+
else {
|
|
9559
|
+
// This is a problem. Throw an appropriate error.
|
|
9560
|
+
throw new Error(MULTIPLE_TASKS_FOUND);
|
|
9561
|
+
}
|
|
9562
|
+
}
|
|
9563
|
+
return true; // All good. Nothing to see here.
|
|
9564
|
+
}), operators.catchError(function (error) {
|
|
9565
|
+
// Simply rethrow it.
|
|
9566
|
+
return rxjs.throwError(error);
|
|
9567
|
+
}));
|
|
9568
|
+
};
|
|
9569
|
+
/**
|
|
9570
|
+
* Return tasks for case and event.
|
|
9571
|
+
*/
|
|
9572
|
+
WorkAllocationService.prototype.getTasksByCaseIdAndEventId = function (eventId, caseId, caseType, jurisdiction) {
|
|
9573
|
+
var defaultPayload = {
|
|
9574
|
+
task_required_for_event: false,
|
|
9575
|
+
tasks: []
|
|
9576
|
+
};
|
|
9577
|
+
if (!this.isWAEnabled()) {
|
|
9578
|
+
return rxjs.of(defaultPayload);
|
|
9579
|
+
}
|
|
9580
|
+
return this.http.get(this.appConfig.getWorkAllocationApiUrl() + "/case/tasks/" + caseId + "/event/" + eventId + "/caseType/" + caseType + "/jurisdiction/" + jurisdiction);
|
|
9581
|
+
};
|
|
9582
|
+
/**
|
|
9583
|
+
* Call the API to get a task
|
|
9584
|
+
*/
|
|
9585
|
+
WorkAllocationService.prototype.getTask = function (taskId) {
|
|
9586
|
+
if (!this.isWAEnabled()) {
|
|
9587
|
+
return rxjs.of({ task: null });
|
|
9588
|
+
}
|
|
9589
|
+
return this.http.get(this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId);
|
|
9590
|
+
};
|
|
9591
|
+
return WorkAllocationService;
|
|
9592
|
+
}());
|
|
9593
|
+
WorkAllocationService.iACCaseOfficer = 'caseworker-ia-caseofficer';
|
|
9594
|
+
WorkAllocationService.iACAdmOfficer = 'caseworker-ia-admofficer';
|
|
9595
|
+
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)); };
|
|
9596
|
+
WorkAllocationService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: WorkAllocationService, factory: WorkAllocationService.ɵfac });
|
|
9597
|
+
(function () {
|
|
9598
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(WorkAllocationService, [{
|
|
9599
|
+
type: i0.Injectable
|
|
9600
|
+
}], function () { return [{ type: HttpService }, { type: AbstractAppConfig }, { type: HttpErrorService }, { type: AlertService }, { type: SessionStorageService }]; }, null);
|
|
9601
|
+
})();
|
|
9602
|
+
|
|
9650
9603
|
var CaseEditComponent = /** @class */ (function () {
|
|
9651
9604
|
function CaseEditComponent(fb, router, route, fieldsUtils, fieldsPurger, registrarService, wizardFactory, sessionStorageService, windowsService) {
|
|
9652
9605
|
this.fb = fb;
|
|
@@ -10632,7 +10585,7 @@
|
|
|
10632
10585
|
var label = casefield.label || 'Field';
|
|
10633
10586
|
var id_1 = casefield.id;
|
|
10634
10587
|
if (fieldElement['component'] && fieldElement['component'].parent) {
|
|
10635
|
-
if (fieldElement['component'].idPrefix.indexOf(
|
|
10588
|
+
if (fieldElement['component'].idPrefix.indexOf("_" + id_1 + "_") === -1) {
|
|
10636
10589
|
id_1 = "" + fieldElement['component'].idPrefix + id_1;
|
|
10637
10590
|
}
|
|
10638
10591
|
else {
|
|
@@ -10773,8 +10726,8 @@
|
|
|
10773
10726
|
}
|
|
10774
10727
|
};
|
|
10775
10728
|
CaseEditPageComponent.prototype.callbackErrorsNotify = function (errorContext) {
|
|
10776
|
-
this.ignoreWarning = errorContext.
|
|
10777
|
-
this.triggerText = errorContext.
|
|
10729
|
+
this.ignoreWarning = errorContext.ignoreWarning;
|
|
10730
|
+
this.triggerText = errorContext.triggerText;
|
|
10778
10731
|
};
|
|
10779
10732
|
CaseEditPageComponent.prototype.next = function () {
|
|
10780
10733
|
this.resetErrors();
|
|
@@ -11130,12 +11083,12 @@
|
|
|
11130
11083
|
CallbackErrorsComponent.prototype.buildCallbackErrorsContext = function () {
|
|
11131
11084
|
var errorContext = new CallbackErrorsContext();
|
|
11132
11085
|
if (this.hasWarnings() && !this.hasErrors() && !this.hasInvalidData()) {
|
|
11133
|
-
errorContext.
|
|
11134
|
-
errorContext.
|
|
11086
|
+
errorContext.ignoreWarning = true;
|
|
11087
|
+
errorContext.triggerText = this.triggerTextIgnore;
|
|
11135
11088
|
}
|
|
11136
11089
|
else {
|
|
11137
|
-
errorContext.
|
|
11138
|
-
errorContext.
|
|
11090
|
+
errorContext.ignoreWarning = false;
|
|
11091
|
+
errorContext.triggerText = this.triggerTextContinue;
|
|
11139
11092
|
}
|
|
11140
11093
|
return errorContext;
|
|
11141
11094
|
};
|
|
@@ -11180,7 +11133,7 @@
|
|
|
11180
11133
|
|
|
11181
11134
|
var AddressOption = /** @class */ (function () {
|
|
11182
11135
|
function AddressOption(addressModel, description) {
|
|
11183
|
-
if (description
|
|
11136
|
+
if (description === null) {
|
|
11184
11137
|
this.value = addressModel;
|
|
11185
11138
|
this.description = this.getDescription();
|
|
11186
11139
|
}
|
|
@@ -11189,13 +11142,10 @@
|
|
|
11189
11142
|
}
|
|
11190
11143
|
}
|
|
11191
11144
|
AddressOption.prototype.getDescription = function () {
|
|
11192
|
-
return this.removeInitialCommaIfPresent((this.value.AddressLine1 === undefined ? '' : this.value.AddressLine1)
|
|
11193
|
-
+ this.prefixWithCommaIfPresent(this.value.AddressLine2)
|
|
11194
|
-
+ this.prefixWithCommaIfPresent(this.value.AddressLine3)
|
|
11195
|
-
+ ', ' + this.value.PostTown);
|
|
11145
|
+
return this.removeInitialCommaIfPresent("" + (this.value.AddressLine1 === undefined ? '' : this.value.AddressLine1) + this.prefixWithCommaIfPresent(this.value.AddressLine2) + this.prefixWithCommaIfPresent(this.value.AddressLine3) + ", " + this.value.PostTown);
|
|
11196
11146
|
};
|
|
11197
11147
|
AddressOption.prototype.prefixWithCommaIfPresent = function (value) {
|
|
11198
|
-
return value ?
|
|
11148
|
+
return value ? ", " + value : value;
|
|
11199
11149
|
};
|
|
11200
11150
|
AddressOption.prototype.removeInitialCommaIfPresent = function (value) {
|
|
11201
11151
|
return value.replace(new RegExp('^,', 'gi'), '');
|
|
@@ -11360,7 +11310,7 @@
|
|
|
11360
11310
|
this.missingPostcode = false;
|
|
11361
11311
|
var postcode_1 = this.postcode.value;
|
|
11362
11312
|
this.caseField.value = null;
|
|
11363
|
-
this.addressOptions =
|
|
11313
|
+
this.addressOptions = [];
|
|
11364
11314
|
this.addressesService.getAddressesForPostcode(postcode_1.replace(' ', '').toUpperCase()).subscribe(function (result) {
|
|
11365
11315
|
result.forEach(function (address) {
|
|
11366
11316
|
_this.addressOptions.push(new AddressOption(address, null));
|
|
@@ -11403,7 +11353,7 @@
|
|
|
11403
11353
|
var hasAddress = false;
|
|
11404
11354
|
if (address) {
|
|
11405
11355
|
Object.keys(address).forEach(function (key) {
|
|
11406
|
-
if (address[key]
|
|
11356
|
+
if (address[key] !== null) {
|
|
11407
11357
|
hasAddress = true;
|
|
11408
11358
|
}
|
|
11409
11359
|
});
|
|
@@ -11426,7 +11376,7 @@
|
|
|
11426
11376
|
};
|
|
11427
11377
|
WriteAddressFieldComponent.prototype.defaultLabel = function (numberOfAddresses) {
|
|
11428
11378
|
return numberOfAddresses === 0 ? 'No address found'
|
|
11429
|
-
: numberOfAddresses + (numberOfAddresses === 1 ? ' address ' : ' addresses ') +
|
|
11379
|
+
: "" + numberOfAddresses + (numberOfAddresses === 1 ? ' address ' : ' addresses ') + "found";
|
|
11430
11380
|
};
|
|
11431
11381
|
WriteAddressFieldComponent.prototype.setFormValue = function () {
|
|
11432
11382
|
if (this.writeComplexFieldComponent.complexGroup) {
|
|
@@ -11584,12 +11534,13 @@
|
|
|
11584
11534
|
}
|
|
11585
11535
|
}
|
|
11586
11536
|
var CaseFileViewFieldComponent = /** @class */ (function () {
|
|
11587
|
-
function CaseFileViewFieldComponent(elementRef, route, caseFileViewService, documentManagementService, loadingService) {
|
|
11537
|
+
function CaseFileViewFieldComponent(elementRef, route, caseFileViewService, documentManagementService, loadingService, sessionStorageService) {
|
|
11588
11538
|
this.elementRef = elementRef;
|
|
11589
11539
|
this.route = route;
|
|
11590
11540
|
this.caseFileViewService = caseFileViewService;
|
|
11591
11541
|
this.documentManagementService = documentManagementService;
|
|
11592
11542
|
this.loadingService = loadingService;
|
|
11543
|
+
this.sessionStorageService = sessionStorageService;
|
|
11593
11544
|
this.allowMoving = true;
|
|
11594
11545
|
this.getCategoriesAndDocumentsError = false;
|
|
11595
11546
|
}
|
|
@@ -11603,6 +11554,12 @@
|
|
|
11603
11554
|
},
|
|
11604
11555
|
error: function (_) { return _this.getCategoriesAndDocumentsError = true; }
|
|
11605
11556
|
});
|
|
11557
|
+
// EXUI-8000
|
|
11558
|
+
var userInfo = JSON.parse(this.sessionStorageService.getItem('userDetails'));
|
|
11559
|
+
// Get acls that intersects from acl roles and user roles
|
|
11560
|
+
var acls = this.caseField.acls.filter(function (acl) { return userInfo.roles.includes(acl.role); });
|
|
11561
|
+
// As there can be more than one intersecting role, if any acls are update: true
|
|
11562
|
+
this.allowMoving = acls.some(function (acl) { return acl.update; });
|
|
11606
11563
|
};
|
|
11607
11564
|
CaseFileViewFieldComponent.prototype.ngAfterViewInit = function () {
|
|
11608
11565
|
var slider = this.elementRef.nativeElement.querySelector('.slider');
|
|
@@ -11650,7 +11607,7 @@
|
|
|
11650
11607
|
return CaseFileViewFieldComponent;
|
|
11651
11608
|
}());
|
|
11652
11609
|
CaseFileViewFieldComponent.PARAM_CASE_ID = 'cid';
|
|
11653
|
-
CaseFileViewFieldComponent.ɵfac = function CaseFileViewFieldComponent_Factory(t) { return new (t || CaseFileViewFieldComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.ElementRef), i0__namespace.ɵɵdirectiveInject(i1__namespace$1.ActivatedRoute), i0__namespace.ɵɵdirectiveInject(CaseFileViewService), i0__namespace.ɵɵdirectiveInject(DocumentManagementService), i0__namespace.ɵɵdirectiveInject(LoadingService)); };
|
|
11610
|
+
CaseFileViewFieldComponent.ɵfac = function CaseFileViewFieldComponent_Factory(t) { return new (t || CaseFileViewFieldComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.ElementRef), i0__namespace.ɵɵdirectiveInject(i1__namespace$1.ActivatedRoute), i0__namespace.ɵɵdirectiveInject(CaseFileViewService), i0__namespace.ɵɵdirectiveInject(DocumentManagementService), i0__namespace.ɵɵdirectiveInject(LoadingService), i0__namespace.ɵɵdirectiveInject(SessionStorageService)); };
|
|
11654
11611
|
CaseFileViewFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: CaseFileViewFieldComponent, selectors: [["ccd-case-file-view-field"]], decls: 2, vars: 2, consts: [["class", "govuk-grid-column-two-thirds", 4, "ngIf"], [4, "ngIf"], [1, "govuk-grid-column-two-thirds"], [1, "govuk-heading-xl"], [1, "govuk-body"], [1, "govuk-heading-l"], ["id", "case-file-view", 1, "govuk-form-group"], [1, "document-tree-container"], [1, "document-tree-container__tree", 3, "categoriesAndDocuments", "allowMoving", "clickedDocument", "moveDocument"], [1, "slider"], [1, "media-viewer-container"], [3, "url", "downloadFileName", "showToolbar", "contentType", "enableAnnotations", "enableRedactions", "height"]], template: function CaseFileViewFieldComponent_Template(rf, ctx) {
|
|
11655
11612
|
if (rf & 1) {
|
|
11656
11613
|
i0__namespace.ɵɵtemplate(0, CaseFileViewFieldComponent_div_0_Template, 5, 0, "div", 0);
|
|
@@ -11670,92 +11627,7 @@
|
|
|
11670
11627
|
templateUrl: './case-file-view-field.component.html',
|
|
11671
11628
|
styleUrls: ['./case-file-view-field.component.scss'],
|
|
11672
11629
|
}]
|
|
11673
|
-
}], function () { return [{ type: i0__namespace.ElementRef }, { type: i1__namespace$1.ActivatedRoute }, { type: CaseFileViewService }, { type: DocumentManagementService }, { type: LoadingService }]; }, null);
|
|
11674
|
-
})();
|
|
11675
|
-
|
|
11676
|
-
function CaseFileViewFieldReadComponent_div_0_Template(rf, ctx) {
|
|
11677
|
-
if (rf & 1) {
|
|
11678
|
-
i0__namespace.ɵɵelementStart(0, "div", 2);
|
|
11679
|
-
i0__namespace.ɵɵelementStart(1, "h1", 3);
|
|
11680
|
-
i0__namespace.ɵɵtext(2, "Sorry, there is a problem with the service");
|
|
11681
|
-
i0__namespace.ɵɵelementEnd();
|
|
11682
|
-
i0__namespace.ɵɵelementStart(3, "p", 4);
|
|
11683
|
-
i0__namespace.ɵɵtext(4, "Try again later.");
|
|
11684
|
-
i0__namespace.ɵɵelementEnd();
|
|
11685
|
-
i0__namespace.ɵɵelementEnd();
|
|
11686
|
-
}
|
|
11687
|
-
}
|
|
11688
|
-
function CaseFileViewFieldReadComponent_div_1_ng_container_8_Template(rf, ctx) {
|
|
11689
|
-
if (rf & 1) {
|
|
11690
|
-
i0__namespace.ɵɵelementContainerStart(0);
|
|
11691
|
-
i0__namespace.ɵɵelement(1, "mv-media-viewer", 11);
|
|
11692
|
-
i0__namespace.ɵɵelementContainerEnd();
|
|
11693
|
-
}
|
|
11694
|
-
if (rf & 2) {
|
|
11695
|
-
var ctx_r2 = i0__namespace.ɵɵnextContext(2);
|
|
11696
|
-
i0__namespace.ɵɵadvance(1);
|
|
11697
|
-
i0__namespace.ɵɵproperty("url", ctx_r2.currentDocument.document_binary_url)("downloadFileName", ctx_r2.currentDocument.document_filename)("showToolbar", true)("contentType", ctx_r2.currentDocument.content_type)("enableAnnotations", true)("enableRedactions", true)("height", "94.5vh");
|
|
11698
|
-
}
|
|
11699
|
-
}
|
|
11700
|
-
function CaseFileViewFieldReadComponent_div_1_Template(rf, ctx) {
|
|
11701
|
-
if (rf & 1) {
|
|
11702
|
-
var _r4_1 = i0__namespace.ɵɵgetCurrentView();
|
|
11703
|
-
i0__namespace.ɵɵelementStart(0, "div");
|
|
11704
|
-
i0__namespace.ɵɵelementStart(1, "h2", 5);
|
|
11705
|
-
i0__namespace.ɵɵtext(2, "Case file");
|
|
11706
|
-
i0__namespace.ɵɵelementEnd();
|
|
11707
|
-
i0__namespace.ɵɵelementStart(3, "div", 6);
|
|
11708
|
-
i0__namespace.ɵɵelementStart(4, "div", 7);
|
|
11709
|
-
i0__namespace.ɵɵelementStart(5, "ccd-case-file-view-folder", 8);
|
|
11710
|
-
i0__namespace.ɵɵlistener("clickedDocument", function CaseFileViewFieldReadComponent_div_1_Template_ccd_case_file_view_folder_clickedDocument_5_listener($event) { i0__namespace.ɵɵrestoreView(_r4_1); var ctx_r3 = i0__namespace.ɵɵnextContext(); return ctx_r3.setMediaViewerFile($event); })("moveDocument", function CaseFileViewFieldReadComponent_div_1_Template_ccd_case_file_view_folder_moveDocument_5_listener($event) { i0__namespace.ɵɵrestoreView(_r4_1); var ctx_r5 = i0__namespace.ɵɵnextContext(); return ctx_r5.moveDocument($event); });
|
|
11711
|
-
i0__namespace.ɵɵelementEnd();
|
|
11712
|
-
i0__namespace.ɵɵelementEnd();
|
|
11713
|
-
i0__namespace.ɵɵelement(6, "div", 9);
|
|
11714
|
-
i0__namespace.ɵɵelementStart(7, "div", 10);
|
|
11715
|
-
i0__namespace.ɵɵtemplate(8, CaseFileViewFieldReadComponent_div_1_ng_container_8_Template, 2, 7, "ng-container", 1);
|
|
11716
|
-
i0__namespace.ɵɵelementEnd();
|
|
11717
|
-
i0__namespace.ɵɵelementEnd();
|
|
11718
|
-
i0__namespace.ɵɵelementEnd();
|
|
11719
|
-
}
|
|
11720
|
-
if (rf & 2) {
|
|
11721
|
-
var ctx_r1 = i0__namespace.ɵɵnextContext();
|
|
11722
|
-
i0__namespace.ɵɵadvance(5);
|
|
11723
|
-
i0__namespace.ɵɵproperty("categoriesAndDocuments", ctx_r1.categoriesAndDocuments$)("allowMoving", ctx_r1.allowMoving);
|
|
11724
|
-
i0__namespace.ɵɵadvance(3);
|
|
11725
|
-
i0__namespace.ɵɵproperty("ngIf", ctx_r1.currentDocument);
|
|
11726
|
-
}
|
|
11727
|
-
}
|
|
11728
|
-
var CaseFileViewFieldReadComponent = /** @class */ (function (_super) {
|
|
11729
|
-
__extends(CaseFileViewFieldReadComponent, _super);
|
|
11730
|
-
function CaseFileViewFieldReadComponent() {
|
|
11731
|
-
var _this = _super.apply(this, __spread(arguments)) || this;
|
|
11732
|
-
_this.allowMoving = false;
|
|
11733
|
-
return _this;
|
|
11734
|
-
}
|
|
11735
|
-
return CaseFileViewFieldReadComponent;
|
|
11736
|
-
}(CaseFileViewFieldComponent));
|
|
11737
|
-
CaseFileViewFieldReadComponent.ɵfac = function CaseFileViewFieldReadComponent_Factory(t) { return ɵCaseFileViewFieldReadComponent_BaseFactory(t || CaseFileViewFieldReadComponent); };
|
|
11738
|
-
CaseFileViewFieldReadComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: CaseFileViewFieldReadComponent, selectors: [["ccd-case-file-view-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 2, vars: 2, consts: [["class", "govuk-grid-column-two-thirds", 4, "ngIf"], [4, "ngIf"], [1, "govuk-grid-column-two-thirds"], [1, "govuk-heading-xl"], [1, "govuk-body"], [1, "govuk-heading-l"], ["id", "case-file-view", 1, "govuk-form-group"], [1, "document-tree-container"], [1, "document-tree-container__tree", 3, "categoriesAndDocuments", "allowMoving", "clickedDocument", "moveDocument"], [1, "slider"], [1, "media-viewer-container"], [3, "url", "downloadFileName", "showToolbar", "contentType", "enableAnnotations", "enableRedactions", "height"]], template: function CaseFileViewFieldReadComponent_Template(rf, ctx) {
|
|
11739
|
-
if (rf & 1) {
|
|
11740
|
-
i0__namespace.ɵɵtemplate(0, CaseFileViewFieldReadComponent_div_0_Template, 5, 0, "div", 0);
|
|
11741
|
-
i0__namespace.ɵɵtemplate(1, CaseFileViewFieldReadComponent_div_1_Template, 9, 3, "div", 1);
|
|
11742
|
-
}
|
|
11743
|
-
if (rf & 2) {
|
|
11744
|
-
i0__namespace.ɵɵproperty("ngIf", ctx.getCategoriesAndDocumentsError);
|
|
11745
|
-
i0__namespace.ɵɵadvance(1);
|
|
11746
|
-
i0__namespace.ɵɵproperty("ngIf", !ctx.getCategoriesAndDocumentsError);
|
|
11747
|
-
}
|
|
11748
|
-
}, styles: ["#case-file-view[_ngcontent-%COMP%]{display:flex;border:2px solid #c9c9c9;height:100vh;position:relative}#case-file-view[_ngcontent-%COMP%] .document-tree-container[_ngcontent-%COMP%]{background-color:#faf8f8;width:30%;min-height:400px;min-width:10%}#case-file-view[_ngcontent-%COMP%] .slider[_ngcontent-%COMP%]{width:.2%;background-color:#6b6b6b}#case-file-view[_ngcontent-%COMP%] .slider[_ngcontent-%COMP%]:focus, #case-file-view[_ngcontent-%COMP%] .slider[_ngcontent-%COMP%]:hover{cursor:col-resize}#case-file-view[_ngcontent-%COMP%] .media-viewer-container[_ngcontent-%COMP%]{background-color:#dee0e2;flex:1 1 0;overflow:hidden}"] });
|
|
11749
|
-
var ɵCaseFileViewFieldReadComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(CaseFileViewFieldReadComponent);
|
|
11750
|
-
(function () {
|
|
11751
|
-
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(CaseFileViewFieldReadComponent, [{
|
|
11752
|
-
type: i0.Component,
|
|
11753
|
-
args: [{
|
|
11754
|
-
selector: 'ccd-case-file-view-field',
|
|
11755
|
-
templateUrl: './case-file-view-field.component.html',
|
|
11756
|
-
styleUrls: ['./case-file-view-field.component.scss'],
|
|
11757
|
-
}]
|
|
11758
|
-
}], null, null);
|
|
11630
|
+
}], function () { return [{ type: i0__namespace.ElementRef }, { type: i1__namespace$1.ActivatedRoute }, { type: CaseFileViewService }, { type: DocumentManagementService }, { type: LoadingService }, { type: SessionStorageService }]; }, null);
|
|
11759
11631
|
})();
|
|
11760
11632
|
|
|
11761
11633
|
exports.AddCommentsErrorMessage = void 0;
|
|
@@ -13094,7 +12966,7 @@
|
|
|
13094
12966
|
}
|
|
13095
12967
|
};
|
|
13096
12968
|
WriteCollectionFieldComponent.prototype.buildCaseField = function (item, index, isNew) {
|
|
13097
|
-
var e_1,
|
|
12969
|
+
var e_1, _c;
|
|
13098
12970
|
if (isNew === void 0) { isNew = false; }
|
|
13099
12971
|
/**
|
|
13100
12972
|
* What follow is code that makes me want to go jump in the shower!
|
|
@@ -13130,8 +13002,8 @@
|
|
|
13130
13002
|
if (!value) {
|
|
13131
13003
|
value = new i2$1.FormGroup({});
|
|
13132
13004
|
try {
|
|
13133
|
-
for (var
|
|
13134
|
-
var key =
|
|
13005
|
+
for (var _d = __values(Object.keys(group.controls)), _e = _d.next(); !_e.done; _e = _d.next()) {
|
|
13006
|
+
var key = _e.value;
|
|
13135
13007
|
value.addControl(key, group.get(key));
|
|
13136
13008
|
// DON'T remove the control for this key from the outer group or it
|
|
13137
13009
|
// goes awry. So DON'T uncomment the below line!
|
|
@@ -13141,7 +13013,7 @@
|
|
|
13141
13013
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
13142
13014
|
finally {
|
|
13143
13015
|
try {
|
|
13144
|
-
if (
|
|
13016
|
+
if (_e && !_e.done && (_c = _d.return)) _c.call(_d);
|
|
13145
13017
|
}
|
|
13146
13018
|
finally { if (e_1) throw e_1.error; }
|
|
13147
13019
|
}
|
|
@@ -13272,6 +13144,7 @@
|
|
|
13272
13144
|
this.formArray.removeAt(index);
|
|
13273
13145
|
};
|
|
13274
13146
|
WriteCollectionFieldComponent.prototype.resetIds = function (index) {
|
|
13147
|
+
var _a, _b;
|
|
13275
13148
|
for (var i = index; i < this.collItems.length; i++) {
|
|
13276
13149
|
var counter = i + 1;
|
|
13277
13150
|
if (this.collItems[i].index && this.collItems[i].index === counter) {
|
|
@@ -13281,16 +13154,15 @@
|
|
|
13281
13154
|
&& this.collItems[i].caseField.id === counter.toString()) {
|
|
13282
13155
|
this.collItems[i].caseField.id = i.toString();
|
|
13283
13156
|
}
|
|
13284
|
-
var idPrefix1 = this.collItems[i].prefix ? this.collItems[i].prefix.replace(
|
|
13285
|
-
var idPrefix1Current = idPrefix1.replace(
|
|
13157
|
+
var idPrefix1 = this.collItems[i].prefix ? this.collItems[i].prefix.replace("_" + counter.toString(), "_" + i.toString()) : '';
|
|
13158
|
+
var idPrefix1Current = idPrefix1.replace("_" + i.toString(), "_" + counter.toString());
|
|
13286
13159
|
if (this.collItems[i].prefix && this.collItems[i].prefix === idPrefix1Current) {
|
|
13287
13160
|
this.collItems[i].prefix = idPrefix1;
|
|
13288
13161
|
}
|
|
13289
|
-
var idPrefixAvailable = this.collItems[i].container
|
|
13290
|
-
&& this.collItems[i].container['component'].idPrefix ? true : false;
|
|
13162
|
+
var idPrefixAvailable = !!((_b = (_a = this.collItems[i].container) === null || _a === void 0 ? void 0 : _a['component']) === null || _b === void 0 ? void 0 : _b.idPrefix);
|
|
13291
13163
|
var idPrefix2 = idPrefixAvailable ?
|
|
13292
|
-
this.collItems[i].container['component'].idPrefix.replace(
|
|
13293
|
-
var idPrefix2current = idPrefix2.replace(
|
|
13164
|
+
this.collItems[i].container['component'].idPrefix.replace("_" + counter.toString(), "_" + i.toString()) : '';
|
|
13165
|
+
var idPrefix2current = idPrefix2.replace("_" + i.toString(), "_" + counter.toString());
|
|
13294
13166
|
if (idPrefixAvailable && this.collItems[i].container['component'].idPrefix === idPrefix2current) {
|
|
13295
13167
|
this.collItems[i].container['component'].idPrefix = idPrefix2;
|
|
13296
13168
|
}
|
|
@@ -14684,6 +14556,257 @@
|
|
|
14684
14556
|
}], null, null);
|
|
14685
14557
|
})();
|
|
14686
14558
|
|
|
14559
|
+
var FixedListPipe = /** @class */ (function () {
|
|
14560
|
+
function FixedListPipe() {
|
|
14561
|
+
}
|
|
14562
|
+
FixedListPipe.prototype.transform = function (value, items) {
|
|
14563
|
+
if (!!items) {
|
|
14564
|
+
var item = items.find(function (i) { return i.code === value; });
|
|
14565
|
+
return item ? item.label : FixedListPipe.EMPTY;
|
|
14566
|
+
}
|
|
14567
|
+
else {
|
|
14568
|
+
return FixedListPipe.EMPTY;
|
|
14569
|
+
}
|
|
14570
|
+
};
|
|
14571
|
+
return FixedListPipe;
|
|
14572
|
+
}());
|
|
14573
|
+
FixedListPipe.EMPTY = '';
|
|
14574
|
+
FixedListPipe.ɵfac = function FixedListPipe_Factory(t) { return new (t || FixedListPipe)(); };
|
|
14575
|
+
FixedListPipe.ɵpipe = i0__namespace.ɵɵdefinePipe({ name: "ccdFixedList", type: FixedListPipe, pure: true });
|
|
14576
|
+
(function () {
|
|
14577
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(FixedListPipe, [{
|
|
14578
|
+
type: i0.Pipe,
|
|
14579
|
+
args: [{
|
|
14580
|
+
name: 'ccdFixedList'
|
|
14581
|
+
}]
|
|
14582
|
+
}], null, null);
|
|
14583
|
+
})();
|
|
14584
|
+
|
|
14585
|
+
function ReadDynamicMultiSelectListFieldComponent_div_0_Template(rf, ctx) {
|
|
14586
|
+
if (rf & 1) {
|
|
14587
|
+
i0__namespace.ɵɵelementStart(0, "div");
|
|
14588
|
+
i0__namespace.ɵɵtext(1);
|
|
14589
|
+
i0__namespace.ɵɵpipe(2, "ccdFixedList");
|
|
14590
|
+
i0__namespace.ɵɵelementEnd();
|
|
14591
|
+
}
|
|
14592
|
+
if (rf & 2) {
|
|
14593
|
+
var value_r1 = ctx.$implicit;
|
|
14594
|
+
var ctx_r0 = i0__namespace.ɵɵnextContext();
|
|
14595
|
+
i0__namespace.ɵɵadvance(1);
|
|
14596
|
+
i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind2(2, 1, value_r1.code, ctx_r0.caseField.list_items), "\n");
|
|
14597
|
+
}
|
|
14598
|
+
}
|
|
14599
|
+
var ReadDynamicMultiSelectListFieldComponent = /** @class */ (function (_super) {
|
|
14600
|
+
__extends(ReadDynamicMultiSelectListFieldComponent, _super);
|
|
14601
|
+
function ReadDynamicMultiSelectListFieldComponent() {
|
|
14602
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
14603
|
+
}
|
|
14604
|
+
ReadDynamicMultiSelectListFieldComponent.prototype.ngOnInit = function () {
|
|
14605
|
+
/**
|
|
14606
|
+
*
|
|
14607
|
+
* Reassigning list_items from formatted_list when list_items is empty
|
|
14608
|
+
*/
|
|
14609
|
+
if (!this.caseField.list_items && this.caseField.formatted_value && this.caseField.formatted_value.list_items) {
|
|
14610
|
+
this.caseField.list_items = this.caseField.formatted_value.list_items;
|
|
14611
|
+
}
|
|
14612
|
+
if (!this.caseField.value && this.caseField.formatted_value && this.caseField.formatted_value.value) {
|
|
14613
|
+
this.caseField.value = this.caseField.formatted_value.value;
|
|
14614
|
+
}
|
|
14615
|
+
_super.prototype.ngOnInit.call(this);
|
|
14616
|
+
};
|
|
14617
|
+
return ReadDynamicMultiSelectListFieldComponent;
|
|
14618
|
+
}(AbstractFieldReadComponent));
|
|
14619
|
+
ReadDynamicMultiSelectListFieldComponent.ɵfac = function ReadDynamicMultiSelectListFieldComponent_Factory(t) { return ɵReadDynamicMultiSelectListFieldComponent_BaseFactory(t || ReadDynamicMultiSelectListFieldComponent); };
|
|
14620
|
+
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) {
|
|
14621
|
+
if (rf & 1) {
|
|
14622
|
+
i0__namespace.ɵɵtemplate(0, ReadDynamicMultiSelectListFieldComponent_div_0_Template, 3, 4, "div", 0);
|
|
14623
|
+
}
|
|
14624
|
+
if (rf & 2) {
|
|
14625
|
+
i0__namespace.ɵɵproperty("ngForOf", ctx.caseField.value);
|
|
14626
|
+
}
|
|
14627
|
+
}, directives: [i2__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}"] });
|
|
14628
|
+
var ɵReadDynamicMultiSelectListFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(ReadDynamicMultiSelectListFieldComponent);
|
|
14629
|
+
(function () {
|
|
14630
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ReadDynamicMultiSelectListFieldComponent, [{
|
|
14631
|
+
type: i0.Component,
|
|
14632
|
+
args: [{
|
|
14633
|
+
selector: 'ccd-read-dynamic-multi-select-list-field',
|
|
14634
|
+
templateUrl: './read-dynamic-multi-select-list-field.html',
|
|
14635
|
+
styleUrls: ['./read-dynamic-multi-select-list-field.component.scss']
|
|
14636
|
+
}]
|
|
14637
|
+
}], null, null);
|
|
14638
|
+
})();
|
|
14639
|
+
|
|
14640
|
+
function WriteDynamicMultiSelectListFieldComponent_span_3_Template(rf, ctx) {
|
|
14641
|
+
if (rf & 1) {
|
|
14642
|
+
i0__namespace.ɵɵelementStart(0, "span", 5);
|
|
14643
|
+
i0__namespace.ɵɵtext(1);
|
|
14644
|
+
i0__namespace.ɵɵpipe(2, "ccdFieldLabel");
|
|
14645
|
+
i0__namespace.ɵɵelementEnd();
|
|
14646
|
+
}
|
|
14647
|
+
if (rf & 2) {
|
|
14648
|
+
var ctx_r0 = i0__namespace.ɵɵnextContext();
|
|
14649
|
+
i0__namespace.ɵɵadvance(1);
|
|
14650
|
+
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r0.caseField));
|
|
14651
|
+
}
|
|
14652
|
+
}
|
|
14653
|
+
function WriteDynamicMultiSelectListFieldComponent_span_4_Template(rf, ctx) {
|
|
14654
|
+
if (rf & 1) {
|
|
14655
|
+
i0__namespace.ɵɵelementStart(0, "span", 6);
|
|
14656
|
+
i0__namespace.ɵɵtext(1);
|
|
14657
|
+
i0__namespace.ɵɵelementEnd();
|
|
14658
|
+
}
|
|
14659
|
+
if (rf & 2) {
|
|
14660
|
+
var ctx_r1 = i0__namespace.ɵɵnextContext();
|
|
14661
|
+
i0__namespace.ɵɵadvance(1);
|
|
14662
|
+
i0__namespace.ɵɵtextInterpolate(ctx_r1.caseField.hint_text);
|
|
14663
|
+
}
|
|
14664
|
+
}
|
|
14665
|
+
function WriteDynamicMultiSelectListFieldComponent_span_5_Template(rf, ctx) {
|
|
14666
|
+
if (rf & 1) {
|
|
14667
|
+
i0__namespace.ɵɵelementStart(0, "span", 7);
|
|
14668
|
+
i0__namespace.ɵɵtext(1);
|
|
14669
|
+
i0__namespace.ɵɵpipe(2, "ccdFirstError");
|
|
14670
|
+
i0__namespace.ɵɵelementEnd();
|
|
14671
|
+
}
|
|
14672
|
+
if (rf & 2) {
|
|
14673
|
+
var ctx_r2 = i0__namespace.ɵɵnextContext();
|
|
14674
|
+
i0__namespace.ɵɵadvance(1);
|
|
14675
|
+
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r2.checkboxes.errors));
|
|
14676
|
+
}
|
|
14677
|
+
}
|
|
14678
|
+
function WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template(rf, ctx) {
|
|
14679
|
+
if (rf & 1) {
|
|
14680
|
+
var _r6_1 = i0__namespace.ɵɵgetCurrentView();
|
|
14681
|
+
i0__namespace.ɵɵelementContainerStart(0);
|
|
14682
|
+
i0__namespace.ɵɵelementStart(1, "div", 8);
|
|
14683
|
+
i0__namespace.ɵɵelementStart(2, "input", 9);
|
|
14684
|
+
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); });
|
|
14685
|
+
i0__namespace.ɵɵelementEnd();
|
|
14686
|
+
i0__namespace.ɵɵelementStart(3, "label", 10);
|
|
14687
|
+
i0__namespace.ɵɵtext(4);
|
|
14688
|
+
i0__namespace.ɵɵelementEnd();
|
|
14689
|
+
i0__namespace.ɵɵelementEnd();
|
|
14690
|
+
i0__namespace.ɵɵelementContainerEnd();
|
|
14691
|
+
}
|
|
14692
|
+
if (rf & 2) {
|
|
14693
|
+
var checkbox_r4 = ctx.$implicit;
|
|
14694
|
+
var ctx_r3 = i0__namespace.ɵɵnextContext();
|
|
14695
|
+
i0__namespace.ɵɵadvance(2);
|
|
14696
|
+
i0__namespace.ɵɵpropertyInterpolate("id", ctx_r3.createElementId(checkbox_r4.code));
|
|
14697
|
+
i0__namespace.ɵɵpropertyInterpolate("name", ctx_r3.id());
|
|
14698
|
+
i0__namespace.ɵɵproperty("value", checkbox_r4.code)("checked", ctx_r3.isSelected(checkbox_r4.code));
|
|
14699
|
+
i0__namespace.ɵɵadvance(1);
|
|
14700
|
+
i0__namespace.ɵɵpropertyInterpolate("for", ctx_r3.createElementId(checkbox_r4.code));
|
|
14701
|
+
i0__namespace.ɵɵadvance(1);
|
|
14702
|
+
i0__namespace.ɵɵtextInterpolate(checkbox_r4.label);
|
|
14703
|
+
}
|
|
14704
|
+
}
|
|
14705
|
+
var _c0$L = function (a0) { return { "error": a0 }; };
|
|
14706
|
+
var WriteDynamicMultiSelectListFieldComponent = /** @class */ (function (_super) {
|
|
14707
|
+
__extends(WriteDynamicMultiSelectListFieldComponent, _super);
|
|
14708
|
+
function WriteDynamicMultiSelectListFieldComponent() {
|
|
14709
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
14710
|
+
}
|
|
14711
|
+
WriteDynamicMultiSelectListFieldComponent.prototype.ngOnInit = function () {
|
|
14712
|
+
var _this = this;
|
|
14713
|
+
this.checkboxes = new i2$1.FormArray([]);
|
|
14714
|
+
this.setInitialCaseList();
|
|
14715
|
+
this.setInitialCaseFieldValue();
|
|
14716
|
+
// Initialise array with existing values
|
|
14717
|
+
if (this.caseField.value && Array.isArray(this.caseField.value)) {
|
|
14718
|
+
var values = this.caseField.value;
|
|
14719
|
+
values.forEach(function (value) {
|
|
14720
|
+
_this.checkboxes.push(new i2$1.FormControl(value));
|
|
14721
|
+
});
|
|
14722
|
+
}
|
|
14723
|
+
this.dynamicListFormControl = this.registerControl(new i2$1.FormControl(this.checkboxes.value));
|
|
14724
|
+
this.dynamicListFormControl.setValue(this.checkboxes.value);
|
|
14725
|
+
};
|
|
14726
|
+
WriteDynamicMultiSelectListFieldComponent.prototype.onCheckChange = function (event) {
|
|
14727
|
+
var _this = this;
|
|
14728
|
+
var target = event.target;
|
|
14729
|
+
if (!target || !target.value) {
|
|
14730
|
+
return;
|
|
14731
|
+
}
|
|
14732
|
+
var selectedListItem = this.getValueListItem(target.value);
|
|
14733
|
+
if (!this.isSelected(target.value)) {
|
|
14734
|
+
// Add a new control in the FormArray
|
|
14735
|
+
this.checkboxes.push(new i2$1.FormControl(selectedListItem));
|
|
14736
|
+
}
|
|
14737
|
+
else {
|
|
14738
|
+
// Remove the control from the FormArray
|
|
14739
|
+
this.checkboxes.controls.forEach(function (ctrl, i) {
|
|
14740
|
+
if (ctrl.value.code === target.value) {
|
|
14741
|
+
_this.checkboxes.removeAt(i);
|
|
14742
|
+
}
|
|
14743
|
+
});
|
|
14744
|
+
}
|
|
14745
|
+
this.dynamicListFormControl.setValue(this.checkboxes.value);
|
|
14746
|
+
};
|
|
14747
|
+
WriteDynamicMultiSelectListFieldComponent.prototype.isSelected = function (code) {
|
|
14748
|
+
if (this.checkboxes && this.checkboxes.controls) {
|
|
14749
|
+
return this.checkboxes.controls.find(function (control) { return control.value.code === code; });
|
|
14750
|
+
}
|
|
14751
|
+
};
|
|
14752
|
+
WriteDynamicMultiSelectListFieldComponent.prototype.getValueListItem = function (value) {
|
|
14753
|
+
return this.caseField.list_items.find(function (i) { return i.code === value; });
|
|
14754
|
+
};
|
|
14755
|
+
WriteDynamicMultiSelectListFieldComponent.prototype.setInitialCaseList = function () {
|
|
14756
|
+
var hasListItems = this.caseField.list_items && this.caseField.list_items.length > 0;
|
|
14757
|
+
var hasFormattedListItems = this.caseField.formatted_value && this.caseField.formatted_value.list_items.length > 0;
|
|
14758
|
+
if (!hasListItems && hasFormattedListItems) {
|
|
14759
|
+
this.caseField.list_items = this.caseField.formatted_value.list_items;
|
|
14760
|
+
}
|
|
14761
|
+
};
|
|
14762
|
+
WriteDynamicMultiSelectListFieldComponent.prototype.setInitialCaseFieldValue = function () {
|
|
14763
|
+
if (!this.caseField.value && this.caseField.formatted_value && this.caseField.formatted_value.value) {
|
|
14764
|
+
this.caseField.value = this.caseField.formatted_value.value;
|
|
14765
|
+
}
|
|
14766
|
+
var isNull = this.caseField.value === undefined || this.caseField.value === '';
|
|
14767
|
+
if (isNull || !Array.isArray(this.caseField.value)) {
|
|
14768
|
+
this.caseField.value = [];
|
|
14769
|
+
}
|
|
14770
|
+
};
|
|
14771
|
+
return WriteDynamicMultiSelectListFieldComponent;
|
|
14772
|
+
}(AbstractFieldWriteComponent));
|
|
14773
|
+
WriteDynamicMultiSelectListFieldComponent.ɵfac = function WriteDynamicMultiSelectListFieldComponent_Factory(t) { return ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory(t || WriteDynamicMultiSelectListFieldComponent); };
|
|
14774
|
+
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) {
|
|
14775
|
+
if (rf & 1) {
|
|
14776
|
+
i0__namespace.ɵɵelementStart(0, "div", 0);
|
|
14777
|
+
i0__namespace.ɵɵelementStart(1, "fieldset");
|
|
14778
|
+
i0__namespace.ɵɵelementStart(2, "legend");
|
|
14779
|
+
i0__namespace.ɵɵtemplate(3, WriteDynamicMultiSelectListFieldComponent_span_3_Template, 3, 3, "span", 1);
|
|
14780
|
+
i0__namespace.ɵɵtemplate(4, WriteDynamicMultiSelectListFieldComponent_span_4_Template, 2, 1, "span", 2);
|
|
14781
|
+
i0__namespace.ɵɵtemplate(5, WriteDynamicMultiSelectListFieldComponent_span_5_Template, 3, 3, "span", 3);
|
|
14782
|
+
i0__namespace.ɵɵelementEnd();
|
|
14783
|
+
i0__namespace.ɵɵtemplate(6, WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template, 5, 6, "ng-container", 4);
|
|
14784
|
+
i0__namespace.ɵɵelementEnd();
|
|
14785
|
+
i0__namespace.ɵɵelementEnd();
|
|
14786
|
+
}
|
|
14787
|
+
if (rf & 2) {
|
|
14788
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$L, !ctx.checkboxes.valid && ctx.checkboxes.touched))("id", ctx.id());
|
|
14789
|
+
i0__namespace.ɵɵadvance(3);
|
|
14790
|
+
i0__namespace.ɵɵproperty("ngIf", ctx.caseField.label);
|
|
14791
|
+
i0__namespace.ɵɵadvance(1);
|
|
14792
|
+
i0__namespace.ɵɵproperty("ngIf", ctx.caseField.hint_text);
|
|
14793
|
+
i0__namespace.ɵɵadvance(1);
|
|
14794
|
+
i0__namespace.ɵɵproperty("ngIf", ctx.checkboxes.errors && ctx.checkboxes.touched);
|
|
14795
|
+
i0__namespace.ɵɵadvance(1);
|
|
14796
|
+
i0__namespace.ɵɵproperty("ngForOf", ctx.caseField.list_items);
|
|
14797
|
+
}
|
|
14798
|
+
}, directives: [i2__namespace.NgClass, i2__namespace.NgIf, i2__namespace.NgForOf], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
|
|
14799
|
+
var ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(WriteDynamicMultiSelectListFieldComponent);
|
|
14800
|
+
(function () {
|
|
14801
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(WriteDynamicMultiSelectListFieldComponent, [{
|
|
14802
|
+
type: i0.Component,
|
|
14803
|
+
args: [{
|
|
14804
|
+
selector: 'ccd-write-dynamic-multi-select-list-field',
|
|
14805
|
+
templateUrl: './write-dynamic-multi-select-list-field.html'
|
|
14806
|
+
}]
|
|
14807
|
+
}], null, null);
|
|
14808
|
+
})();
|
|
14809
|
+
|
|
14687
14810
|
var DynamicRadioListPipe = /** @class */ (function () {
|
|
14688
14811
|
function DynamicRadioListPipe() {
|
|
14689
14812
|
}
|
|
@@ -14813,7 +14936,7 @@
|
|
|
14813
14936
|
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, i0__namespace.ɵɵpipeBind1(3, 3, ctx_r3.dynamicRadioListControl.errors)));
|
|
14814
14937
|
}
|
|
14815
14938
|
}
|
|
14816
|
-
var _c0$
|
|
14939
|
+
var _c0$K = function (a0) { return { selected: a0 }; };
|
|
14817
14940
|
function WriteDynamicRadioListFieldComponent_div_9_Template(rf, ctx) {
|
|
14818
14941
|
if (rf & 1) {
|
|
14819
14942
|
i0__namespace.ɵɵelementStart(0, "div", 10);
|
|
@@ -14827,7 +14950,7 @@
|
|
|
14827
14950
|
if (rf & 2) {
|
|
14828
14951
|
var radioButton_r5 = ctx.$implicit;
|
|
14829
14952
|
var ctx_r4 = i0__namespace.ɵɵnextContext();
|
|
14830
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(9, _c0$
|
|
14953
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(9, _c0$K, ctx_r4.dynamicRadioListControl.value === radioButton_r5.code));
|
|
14831
14954
|
i0__namespace.ɵɵadvance(1);
|
|
14832
14955
|
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);
|
|
14833
14956
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -14994,7 +15117,7 @@
|
|
|
14994
15117
|
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, i0__namespace.ɵɵpipeBind2(3, 3, ctx_r2.emailControl.errors, ctx_r2.caseField.label)));
|
|
14995
15118
|
}
|
|
14996
15119
|
}
|
|
14997
|
-
var _c0$
|
|
15120
|
+
var _c0$J = function (a0) { return { "form-group-error": a0 }; };
|
|
14998
15121
|
var _c1$h = function (a0) { return { "govuk-input--error": a0 }; };
|
|
14999
15122
|
var WriteEmailFieldComponent = /** @class */ (function (_super) {
|
|
15000
15123
|
__extends(WriteEmailFieldComponent, _super);
|
|
@@ -15019,7 +15142,7 @@
|
|
|
15019
15142
|
i0__namespace.ɵɵelementEnd();
|
|
15020
15143
|
}
|
|
15021
15144
|
if (rf & 2) {
|
|
15022
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$
|
|
15145
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$J, !ctx.emailControl.valid && (ctx.emailControl.dirty || ctx.emailControl.touched)));
|
|
15023
15146
|
i0__namespace.ɵɵadvance(1);
|
|
15024
15147
|
i0__namespace.ɵɵproperty("for", ctx.id());
|
|
15025
15148
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -15043,32 +15166,6 @@
|
|
|
15043
15166
|
}], null, null);
|
|
15044
15167
|
})();
|
|
15045
15168
|
|
|
15046
|
-
var FixedListPipe = /** @class */ (function () {
|
|
15047
|
-
function FixedListPipe() {
|
|
15048
|
-
}
|
|
15049
|
-
FixedListPipe.prototype.transform = function (value, items) {
|
|
15050
|
-
if (!!items) {
|
|
15051
|
-
var item = items.find(function (i) { return i.code === value; });
|
|
15052
|
-
return item ? item.label : FixedListPipe.EMPTY;
|
|
15053
|
-
}
|
|
15054
|
-
else {
|
|
15055
|
-
return FixedListPipe.EMPTY;
|
|
15056
|
-
}
|
|
15057
|
-
};
|
|
15058
|
-
return FixedListPipe;
|
|
15059
|
-
}());
|
|
15060
|
-
FixedListPipe.EMPTY = '';
|
|
15061
|
-
FixedListPipe.ɵfac = function FixedListPipe_Factory(t) { return new (t || FixedListPipe)(); };
|
|
15062
|
-
FixedListPipe.ɵpipe = i0__namespace.ɵɵdefinePipe({ name: "ccdFixedList", type: FixedListPipe, pure: true });
|
|
15063
|
-
(function () {
|
|
15064
|
-
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(FixedListPipe, [{
|
|
15065
|
-
type: i0.Pipe,
|
|
15066
|
-
args: [{
|
|
15067
|
-
name: 'ccdFixedList'
|
|
15068
|
-
}]
|
|
15069
|
-
}], null, null);
|
|
15070
|
-
})();
|
|
15071
|
-
|
|
15072
15169
|
var ReadFixedListFieldComponent = /** @class */ (function (_super) {
|
|
15073
15170
|
__extends(ReadFixedListFieldComponent, _super);
|
|
15074
15171
|
function ReadFixedListFieldComponent() {
|
|
@@ -15156,7 +15253,7 @@
|
|
|
15156
15253
|
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 2, type_r4.label));
|
|
15157
15254
|
}
|
|
15158
15255
|
}
|
|
15159
|
-
var _c0$
|
|
15256
|
+
var _c0$I = function (a0) { return { "form-group-error": a0 }; };
|
|
15160
15257
|
var WriteFixedListFieldComponent = /** @class */ (function (_super) {
|
|
15161
15258
|
__extends(WriteFixedListFieldComponent, _super);
|
|
15162
15259
|
function WriteFixedListFieldComponent() {
|
|
@@ -15205,7 +15302,7 @@
|
|
|
15205
15302
|
i0__namespace.ɵɵelementEnd();
|
|
15206
15303
|
}
|
|
15207
15304
|
if (rf & 2) {
|
|
15208
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(9, _c0$
|
|
15305
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(9, _c0$I, !ctx.fixedListFormControl.valid && (ctx.fixedListFormControl.dirty || ctx.fixedListFormControl.touched)));
|
|
15209
15306
|
i0__namespace.ɵɵadvance(1);
|
|
15210
15307
|
i0__namespace.ɵɵproperty("for", ctx.id());
|
|
15211
15308
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -15327,7 +15424,7 @@
|
|
|
15327
15424
|
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, i0__namespace.ɵɵpipeBind2(3, 3, ctx_r2.fixedRadioListControl.errors, ctx_r2.caseField.label)));
|
|
15328
15425
|
}
|
|
15329
15426
|
}
|
|
15330
|
-
var _c0$
|
|
15427
|
+
var _c0$H = function (a0) { return { selected: a0 }; };
|
|
15331
15428
|
function WriteFixedRadioListFieldComponent_div_8_Template(rf, ctx) {
|
|
15332
15429
|
if (rf & 1) {
|
|
15333
15430
|
i0__namespace.ɵɵelementStart(0, "div", 9);
|
|
@@ -15341,7 +15438,7 @@
|
|
|
15341
15438
|
if (rf & 2) {
|
|
15342
15439
|
var radioButton_r4 = ctx.$implicit;
|
|
15343
15440
|
var ctx_r3 = i0__namespace.ɵɵnextContext();
|
|
15344
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(9, _c0$
|
|
15441
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(9, _c0$H, ctx_r3.fixedRadioListControl.value === radioButton_r4.code));
|
|
15345
15442
|
i0__namespace.ɵɵadvance(1);
|
|
15346
15443
|
i0__namespace.ɵɵproperty("id", ctx_r3.id() + "-" + radioButton_r4.code)("name", ctx_r3.id())("formControl", ctx_r3.fixedRadioListControl)("value", radioButton_r4.code);
|
|
15347
15444
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -15511,7 +15608,7 @@
|
|
|
15511
15608
|
i0__namespace.ɵɵtextInterpolate1(" ", ctx_r1.caseField.hint_text, " ");
|
|
15512
15609
|
}
|
|
15513
15610
|
}
|
|
15514
|
-
var _c0$
|
|
15611
|
+
var _c0$G = function (a0) { return { "hide-autocomplete": a0 }; };
|
|
15515
15612
|
function WriteJudicialUserFieldComponent_mat_option_7_Template(rf, ctx) {
|
|
15516
15613
|
if (rf & 1) {
|
|
15517
15614
|
var _r7_1 = i0__namespace.ɵɵgetCurrentView();
|
|
@@ -15523,7 +15620,7 @@
|
|
|
15523
15620
|
if (rf & 2) {
|
|
15524
15621
|
var judicialUser_r5 = ctx.$implicit;
|
|
15525
15622
|
var ctx_r3 = i0__namespace.ɵɵnextContext();
|
|
15526
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4, _c0$
|
|
15623
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4, _c0$G, !ctx_r3.showAutocomplete))("value", judicialUser_r5.idamId);
|
|
15527
15624
|
i0__namespace.ɵɵadvance(1);
|
|
15528
15625
|
i0__namespace.ɵɵtextInterpolate2(" ", judicialUser_r5.fullName, " (", judicialUser_r5.emailId, ") ");
|
|
15529
15626
|
}
|
|
@@ -15787,7 +15884,7 @@
|
|
|
15787
15884
|
casesResponse.push(_this.mapResponse(result));
|
|
15788
15885
|
});
|
|
15789
15886
|
});
|
|
15790
|
-
|
|
15887
|
+
_this.linkedCases = casesResponse.map(function (item) {
|
|
15791
15888
|
return {
|
|
15792
15889
|
caseReference: item.caseReference,
|
|
15793
15890
|
caseName: item.caseName,
|
|
@@ -15801,7 +15898,6 @@
|
|
|
15801
15898
|
}),
|
|
15802
15899
|
};
|
|
15803
15900
|
});
|
|
15804
|
-
_this.linkedCases = caseLinks;
|
|
15805
15901
|
_this.serverLinkedApiError = null;
|
|
15806
15902
|
}, function (err) {
|
|
15807
15903
|
_this.serverLinkedApiError = {
|
|
@@ -16338,7 +16434,7 @@
|
|
|
16338
16434
|
i0__namespace.ɵɵtextInterpolate1(" ", ctx_r13.caseReasonCommentsError, " ");
|
|
16339
16435
|
}
|
|
16340
16436
|
}
|
|
16341
|
-
var _c0$
|
|
16437
|
+
var _c0$F = function (a0) { return { "govuk-form-group--error": a0 }; };
|
|
16342
16438
|
function LinkCasesComponent_div_8_div_14_Template(rf, ctx) {
|
|
16343
16439
|
if (rf & 1) {
|
|
16344
16440
|
i0__namespace.ɵɵelementStart(0, "div", 35);
|
|
@@ -16356,7 +16452,7 @@
|
|
|
16356
16452
|
}
|
|
16357
16453
|
if (rf & 2) {
|
|
16358
16454
|
var ctx_r7 = i0__namespace.ɵɵnextContext(2);
|
|
16359
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(2, _c0$
|
|
16455
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(2, _c0$F, !!ctx_r7.caseReasonCommentsError));
|
|
16360
16456
|
i0__namespace.ɵɵadvance(3);
|
|
16361
16457
|
i0__namespace.ɵɵproperty("ngIf", ctx_r7.caseReasonCommentsError);
|
|
16362
16458
|
}
|
|
@@ -16413,11 +16509,11 @@
|
|
|
16413
16509
|
var ctx_r0 = i0__namespace.ɵɵnextContext();
|
|
16414
16510
|
i0__namespace.ɵɵproperty("formGroup", ctx_r0.linkCaseForm);
|
|
16415
16511
|
i0__namespace.ɵɵadvance(1);
|
|
16416
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$
|
|
16512
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$F, !!ctx_r0.caseNumberError));
|
|
16417
16513
|
i0__namespace.ɵɵadvance(3);
|
|
16418
16514
|
i0__namespace.ɵɵproperty("ngIf", ctx_r0.caseNumberError);
|
|
16419
16515
|
i0__namespace.ɵɵadvance(2);
|
|
16420
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c0$
|
|
16516
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c0$F, !!ctx_r0.caseReasonError));
|
|
16421
16517
|
i0__namespace.ɵɵadvance(5);
|
|
16422
16518
|
i0__namespace.ɵɵproperty("ngIf", ctx_r0.caseReasonError);
|
|
16423
16519
|
i0__namespace.ɵɵadvance(2);
|
|
@@ -16851,7 +16947,7 @@
|
|
|
16851
16947
|
i0__namespace.ɵɵadvance(4);
|
|
16852
16948
|
i0__namespace.ɵɵproperty("ngIf", ctx.linkCaseForm);
|
|
16853
16949
|
i0__namespace.ɵɵadvance(4);
|
|
16854
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(9, _c0$
|
|
16950
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(9, _c0$F, !!ctx.noSelectedCaseError));
|
|
16855
16951
|
i0__namespace.ɵɵadvance(1);
|
|
16856
16952
|
i0__namespace.ɵɵproperty("ngIf", ctx.noSelectedCaseError);
|
|
16857
16953
|
i0__namespace.ɵɵadvance(18);
|
|
@@ -17535,7 +17631,7 @@
|
|
|
17535
17631
|
i0__namespace.ɵɵtextInterpolate2(" ", case_r4.caseName, " ", i0__namespace.ɵɵpipeBind1(4, 6, case_r4.caseReference), " ");
|
|
17536
17632
|
}
|
|
17537
17633
|
}
|
|
17538
|
-
var _c0$
|
|
17634
|
+
var _c0$E = function (a0) { return { "govuk-form-group--error": a0 }; };
|
|
17539
17635
|
function UnLinkCasesComponent_div_0_div_4_Template(rf, ctx) {
|
|
17540
17636
|
if (rf & 1) {
|
|
17541
17637
|
i0__namespace.ɵɵelementStart(0, "div", 7);
|
|
@@ -17547,7 +17643,7 @@
|
|
|
17547
17643
|
}
|
|
17548
17644
|
if (rf & 2) {
|
|
17549
17645
|
var ctx_r1 = i0__namespace.ɵɵnextContext(2);
|
|
17550
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4, _c0$
|
|
17646
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4, _c0$E, ctx_r1.unlinkErrorMessage))("formGroup", ctx_r1.unlinkCaseForm);
|
|
17551
17647
|
i0__namespace.ɵɵadvance(1);
|
|
17552
17648
|
i0__namespace.ɵɵproperty("ngIf", ctx_r1.unlinkErrorMessage);
|
|
17553
17649
|
i0__namespace.ɵɵadvance(2);
|
|
@@ -17723,6 +17819,7 @@
|
|
|
17723
17819
|
}] });
|
|
17724
17820
|
})();
|
|
17725
17821
|
|
|
17822
|
+
// tslint:disable:variable-name
|
|
17726
17823
|
var LinkCaseReason = /** @class */ (function () {
|
|
17727
17824
|
function LinkCaseReason() {
|
|
17728
17825
|
}
|
|
@@ -17881,7 +17978,7 @@
|
|
|
17881
17978
|
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'; });
|
|
17882
17979
|
}
|
|
17883
17980
|
this.isServerJurisdictionError = this.linkedCasesService.serverJurisdictionError || false;
|
|
17884
|
-
var reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() +
|
|
17981
|
+
var reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() + "/lov/categories/CaseLinkingReasonCode";
|
|
17885
17982
|
this.commonDataService.getRefData(reasonCodeAPIurl).subscribe({
|
|
17886
17983
|
next: function (reasons) {
|
|
17887
17984
|
_this.reasonListLoaded = true;
|
|
@@ -18143,7 +18240,7 @@
|
|
|
18143
18240
|
};
|
|
18144
18241
|
WriteLinkedCasesFieldComponent.prototype.getLinkedCaseReasons = function () {
|
|
18145
18242
|
var _this = this;
|
|
18146
|
-
var reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() +
|
|
18243
|
+
var reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() + "/lov/categories/CaseLinkingReasonCode";
|
|
18147
18244
|
this.commonDataService.getRefData(reasonCodeAPIurl).subscribe({
|
|
18148
18245
|
next: function (reasons) {
|
|
18149
18246
|
// Sort in ascending order
|
|
@@ -18202,11 +18299,10 @@
|
|
|
18202
18299
|
var _this = this;
|
|
18203
18300
|
this.casesService.getCaseViewV2(this.linkedCasesService.caseId).subscribe(function (caseView) {
|
|
18204
18301
|
var caseViewFiltered = caseView.tabs.filter(function (tab) {
|
|
18205
|
-
|
|
18302
|
+
return tab.fields.some(function (_b) {
|
|
18206
18303
|
var field_type = _b.field_type;
|
|
18207
18304
|
return field_type && field_type.collection_field_type && field_type.collection_field_type.id === 'CaseLink';
|
|
18208
18305
|
});
|
|
18209
|
-
return linkField;
|
|
18210
18306
|
});
|
|
18211
18307
|
if (caseViewFiltered) {
|
|
18212
18308
|
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; });
|
|
@@ -18492,7 +18588,7 @@
|
|
|
18492
18588
|
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, i0__namespace.ɵɵpipeBind2(3, 3, ctx_r2.moneyGbpControl.errors, ctx_r2.caseField.label)));
|
|
18493
18589
|
}
|
|
18494
18590
|
}
|
|
18495
|
-
var _c0$
|
|
18591
|
+
var _c0$D = function (a0) { return { "form-group-error": a0 }; };
|
|
18496
18592
|
var WriteMoneyGbpFieldComponent = /** @class */ (function (_super) {
|
|
18497
18593
|
__extends(WriteMoneyGbpFieldComponent, _super);
|
|
18498
18594
|
function WriteMoneyGbpFieldComponent() {
|
|
@@ -18522,7 +18618,7 @@
|
|
|
18522
18618
|
i0__namespace.ɵɵelementEnd();
|
|
18523
18619
|
}
|
|
18524
18620
|
if (rf & 2) {
|
|
18525
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(11, _c0$
|
|
18621
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(11, _c0$D, !ctx.moneyGbpControl.valid && (ctx.moneyGbpControl.dirty || ctx.moneyGbpControl.touched)));
|
|
18526
18622
|
i0__namespace.ɵɵadvance(1);
|
|
18527
18623
|
i0__namespace.ɵɵproperty("for", ctx.id());
|
|
18528
18624
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -18677,7 +18773,7 @@
|
|
|
18677
18773
|
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(5, 6, checkbox_r4.label));
|
|
18678
18774
|
}
|
|
18679
18775
|
}
|
|
18680
|
-
var _c0$
|
|
18776
|
+
var _c0$C = function (a0) { return { "error": a0 }; };
|
|
18681
18777
|
var WriteMultiSelectListFieldComponent = /** @class */ (function (_super) {
|
|
18682
18778
|
__extends(WriteMultiSelectListFieldComponent, _super);
|
|
18683
18779
|
function WriteMultiSelectListFieldComponent() {
|
|
@@ -18741,7 +18837,7 @@
|
|
|
18741
18837
|
i0__namespace.ɵɵelementEnd();
|
|
18742
18838
|
}
|
|
18743
18839
|
if (rf & 2) {
|
|
18744
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$
|
|
18840
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$C, !ctx.checkboxes.valid && (ctx.checkboxes.dirty || ctx.checkboxes.touched)))("id", ctx.id());
|
|
18745
18841
|
i0__namespace.ɵɵadvance(3);
|
|
18746
18842
|
i0__namespace.ɵɵproperty("ngIf", ctx.caseField.label);
|
|
18747
18843
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -18835,7 +18931,7 @@
|
|
|
18835
18931
|
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, i0__namespace.ɵɵpipeBind2(3, 3, ctx_r2.numberControl.errors, ctx_r2.caseField.label)));
|
|
18836
18932
|
}
|
|
18837
18933
|
}
|
|
18838
|
-
var _c0$
|
|
18934
|
+
var _c0$B = function (a0) { return { "form-group-error": a0 }; };
|
|
18839
18935
|
var _c1$e = function (a0) { return { "govuk-input--error": a0 }; };
|
|
18840
18936
|
var WriteNumberFieldComponent = /** @class */ (function (_super) {
|
|
18841
18937
|
__extends(WriteNumberFieldComponent, _super);
|
|
@@ -18860,7 +18956,7 @@
|
|
|
18860
18956
|
i0__namespace.ɵɵelementEnd();
|
|
18861
18957
|
}
|
|
18862
18958
|
if (rf & 2) {
|
|
18863
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$
|
|
18959
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$B, !ctx.numberControl.valid && ctx.numberControl.dirty));
|
|
18864
18960
|
i0__namespace.ɵɵadvance(1);
|
|
18865
18961
|
i0__namespace.ɵɵproperty("for", ctx.id());
|
|
18866
18962
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -19199,7 +19295,7 @@
|
|
|
19199
19295
|
i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(3, 1, "No results found."), " ");
|
|
19200
19296
|
}
|
|
19201
19297
|
}
|
|
19202
|
-
var _c0$
|
|
19298
|
+
var _c0$A = function (a0) { return { "scroll-container ": a0 }; };
|
|
19203
19299
|
function WriteOrganisationFieldComponent_fieldset_3_div_17_Template(rf, ctx) {
|
|
19204
19300
|
if (rf & 1) {
|
|
19205
19301
|
i0__namespace.ɵɵelementStart(0, "div", 26);
|
|
@@ -19215,7 +19311,7 @@
|
|
|
19215
19311
|
var ctx_r2 = i0__namespace.ɵɵnextContext(2);
|
|
19216
19312
|
var tmp_0_0 = null;
|
|
19217
19313
|
var tmp_2_0 = null;
|
|
19218
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(11, _c0$
|
|
19314
|
+
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));
|
|
19219
19315
|
i0__namespace.ɵɵadvance(2);
|
|
19220
19316
|
i0__namespace.ɵɵproperty("ngForOf", i0__namespace.ɵɵpipeBind1(3, 5, ctx_r2.simpleOrganisations$));
|
|
19221
19317
|
i0__namespace.ɵɵadvance(2);
|
|
@@ -19639,231 +19735,6 @@
|
|
|
19639
19735
|
}], function () { return [{ type: AbstractAppConfig }, { type: SessionStorageService }]; }, null);
|
|
19640
19736
|
})();
|
|
19641
19737
|
|
|
19642
|
-
function ReadDynamicMultiSelectListFieldComponent_div_0_Template(rf, ctx) {
|
|
19643
|
-
if (rf & 1) {
|
|
19644
|
-
i0__namespace.ɵɵelementStart(0, "div");
|
|
19645
|
-
i0__namespace.ɵɵtext(1);
|
|
19646
|
-
i0__namespace.ɵɵpipe(2, "ccdFixedList");
|
|
19647
|
-
i0__namespace.ɵɵelementEnd();
|
|
19648
|
-
}
|
|
19649
|
-
if (rf & 2) {
|
|
19650
|
-
var value_r1 = ctx.$implicit;
|
|
19651
|
-
var ctx_r0 = i0__namespace.ɵɵnextContext();
|
|
19652
|
-
i0__namespace.ɵɵadvance(1);
|
|
19653
|
-
i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind2(2, 1, value_r1.code, ctx_r0.caseField.list_items), "\n");
|
|
19654
|
-
}
|
|
19655
|
-
}
|
|
19656
|
-
var ReadDynamicMultiSelectListFieldComponent = /** @class */ (function (_super) {
|
|
19657
|
-
__extends(ReadDynamicMultiSelectListFieldComponent, _super);
|
|
19658
|
-
function ReadDynamicMultiSelectListFieldComponent() {
|
|
19659
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
19660
|
-
}
|
|
19661
|
-
ReadDynamicMultiSelectListFieldComponent.prototype.ngOnInit = function () {
|
|
19662
|
-
/**
|
|
19663
|
-
*
|
|
19664
|
-
* Reassigning list_items from formatted_list when list_items is empty
|
|
19665
|
-
*/
|
|
19666
|
-
if (!this.caseField.list_items && this.caseField.formatted_value && this.caseField.formatted_value.list_items) {
|
|
19667
|
-
this.caseField.list_items = this.caseField.formatted_value.list_items;
|
|
19668
|
-
}
|
|
19669
|
-
if (!this.caseField.value && this.caseField.formatted_value && this.caseField.formatted_value.value) {
|
|
19670
|
-
this.caseField.value = this.caseField.formatted_value.value;
|
|
19671
|
-
}
|
|
19672
|
-
_super.prototype.ngOnInit.call(this);
|
|
19673
|
-
};
|
|
19674
|
-
return ReadDynamicMultiSelectListFieldComponent;
|
|
19675
|
-
}(AbstractFieldReadComponent));
|
|
19676
|
-
ReadDynamicMultiSelectListFieldComponent.ɵfac = function ReadDynamicMultiSelectListFieldComponent_Factory(t) { return ɵReadDynamicMultiSelectListFieldComponent_BaseFactory(t || ReadDynamicMultiSelectListFieldComponent); };
|
|
19677
|
-
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) {
|
|
19678
|
-
if (rf & 1) {
|
|
19679
|
-
i0__namespace.ɵɵtemplate(0, ReadDynamicMultiSelectListFieldComponent_div_0_Template, 3, 4, "div", 0);
|
|
19680
|
-
}
|
|
19681
|
-
if (rf & 2) {
|
|
19682
|
-
i0__namespace.ɵɵproperty("ngForOf", ctx.caseField.value);
|
|
19683
|
-
}
|
|
19684
|
-
}, directives: [i2__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}"] });
|
|
19685
|
-
var ɵReadDynamicMultiSelectListFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(ReadDynamicMultiSelectListFieldComponent);
|
|
19686
|
-
(function () {
|
|
19687
|
-
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ReadDynamicMultiSelectListFieldComponent, [{
|
|
19688
|
-
type: i0.Component,
|
|
19689
|
-
args: [{
|
|
19690
|
-
selector: 'ccd-read-dynamic-multi-select-list-field',
|
|
19691
|
-
templateUrl: './read-dynamic-multi-select-list-field.html',
|
|
19692
|
-
styleUrls: ['./read-dynamic-multi-select-list-field.component.scss']
|
|
19693
|
-
}]
|
|
19694
|
-
}], null, null);
|
|
19695
|
-
})();
|
|
19696
|
-
|
|
19697
|
-
function WriteDynamicMultiSelectListFieldComponent_span_3_Template(rf, ctx) {
|
|
19698
|
-
if (rf & 1) {
|
|
19699
|
-
i0__namespace.ɵɵelementStart(0, "span", 5);
|
|
19700
|
-
i0__namespace.ɵɵtext(1);
|
|
19701
|
-
i0__namespace.ɵɵpipe(2, "ccdFieldLabel");
|
|
19702
|
-
i0__namespace.ɵɵelementEnd();
|
|
19703
|
-
}
|
|
19704
|
-
if (rf & 2) {
|
|
19705
|
-
var ctx_r0 = i0__namespace.ɵɵnextContext();
|
|
19706
|
-
i0__namespace.ɵɵadvance(1);
|
|
19707
|
-
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r0.caseField));
|
|
19708
|
-
}
|
|
19709
|
-
}
|
|
19710
|
-
function WriteDynamicMultiSelectListFieldComponent_span_4_Template(rf, ctx) {
|
|
19711
|
-
if (rf & 1) {
|
|
19712
|
-
i0__namespace.ɵɵelementStart(0, "span", 6);
|
|
19713
|
-
i0__namespace.ɵɵtext(1);
|
|
19714
|
-
i0__namespace.ɵɵelementEnd();
|
|
19715
|
-
}
|
|
19716
|
-
if (rf & 2) {
|
|
19717
|
-
var ctx_r1 = i0__namespace.ɵɵnextContext();
|
|
19718
|
-
i0__namespace.ɵɵadvance(1);
|
|
19719
|
-
i0__namespace.ɵɵtextInterpolate(ctx_r1.caseField.hint_text);
|
|
19720
|
-
}
|
|
19721
|
-
}
|
|
19722
|
-
function WriteDynamicMultiSelectListFieldComponent_span_5_Template(rf, ctx) {
|
|
19723
|
-
if (rf & 1) {
|
|
19724
|
-
i0__namespace.ɵɵelementStart(0, "span", 7);
|
|
19725
|
-
i0__namespace.ɵɵtext(1);
|
|
19726
|
-
i0__namespace.ɵɵpipe(2, "ccdFirstError");
|
|
19727
|
-
i0__namespace.ɵɵelementEnd();
|
|
19728
|
-
}
|
|
19729
|
-
if (rf & 2) {
|
|
19730
|
-
var ctx_r2 = i0__namespace.ɵɵnextContext();
|
|
19731
|
-
i0__namespace.ɵɵadvance(1);
|
|
19732
|
-
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r2.checkboxes.errors));
|
|
19733
|
-
}
|
|
19734
|
-
}
|
|
19735
|
-
function WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template(rf, ctx) {
|
|
19736
|
-
if (rf & 1) {
|
|
19737
|
-
var _r6_1 = i0__namespace.ɵɵgetCurrentView();
|
|
19738
|
-
i0__namespace.ɵɵelementContainerStart(0);
|
|
19739
|
-
i0__namespace.ɵɵelementStart(1, "div", 8);
|
|
19740
|
-
i0__namespace.ɵɵelementStart(2, "input", 9);
|
|
19741
|
-
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); });
|
|
19742
|
-
i0__namespace.ɵɵelementEnd();
|
|
19743
|
-
i0__namespace.ɵɵelementStart(3, "label", 10);
|
|
19744
|
-
i0__namespace.ɵɵtext(4);
|
|
19745
|
-
i0__namespace.ɵɵelementEnd();
|
|
19746
|
-
i0__namespace.ɵɵelementEnd();
|
|
19747
|
-
i0__namespace.ɵɵelementContainerEnd();
|
|
19748
|
-
}
|
|
19749
|
-
if (rf & 2) {
|
|
19750
|
-
var checkbox_r4 = ctx.$implicit;
|
|
19751
|
-
var ctx_r3 = i0__namespace.ɵɵnextContext();
|
|
19752
|
-
i0__namespace.ɵɵadvance(2);
|
|
19753
|
-
i0__namespace.ɵɵpropertyInterpolate("id", ctx_r3.createElementId(checkbox_r4.code));
|
|
19754
|
-
i0__namespace.ɵɵpropertyInterpolate("name", ctx_r3.id());
|
|
19755
|
-
i0__namespace.ɵɵproperty("value", checkbox_r4.code)("checked", ctx_r3.isSelected(checkbox_r4.code));
|
|
19756
|
-
i0__namespace.ɵɵadvance(1);
|
|
19757
|
-
i0__namespace.ɵɵpropertyInterpolate("for", ctx_r3.createElementId(checkbox_r4.code));
|
|
19758
|
-
i0__namespace.ɵɵadvance(1);
|
|
19759
|
-
i0__namespace.ɵɵtextInterpolate(checkbox_r4.label);
|
|
19760
|
-
}
|
|
19761
|
-
}
|
|
19762
|
-
var _c0$A = function (a0) { return { "error": a0 }; };
|
|
19763
|
-
var WriteDynamicMultiSelectListFieldComponent = /** @class */ (function (_super) {
|
|
19764
|
-
__extends(WriteDynamicMultiSelectListFieldComponent, _super);
|
|
19765
|
-
function WriteDynamicMultiSelectListFieldComponent() {
|
|
19766
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
19767
|
-
}
|
|
19768
|
-
WriteDynamicMultiSelectListFieldComponent.prototype.ngOnInit = function () {
|
|
19769
|
-
var _this = this;
|
|
19770
|
-
this.checkboxes = new i2$1.FormArray([]);
|
|
19771
|
-
this.setInitialCaseList();
|
|
19772
|
-
this.setInitialCaseFieldValue();
|
|
19773
|
-
// Initialise array with existing values
|
|
19774
|
-
if (this.caseField.value && Array.isArray(this.caseField.value)) {
|
|
19775
|
-
var values = this.caseField.value;
|
|
19776
|
-
values.forEach(function (value) {
|
|
19777
|
-
_this.checkboxes.push(new i2$1.FormControl(value));
|
|
19778
|
-
});
|
|
19779
|
-
}
|
|
19780
|
-
this.dynamicListFormControl = this.registerControl(new i2$1.FormControl(this.checkboxes.value));
|
|
19781
|
-
this.dynamicListFormControl.setValue(this.checkboxes.value);
|
|
19782
|
-
};
|
|
19783
|
-
WriteDynamicMultiSelectListFieldComponent.prototype.onCheckChange = function (event) {
|
|
19784
|
-
var _this = this;
|
|
19785
|
-
var target = event.target;
|
|
19786
|
-
if (!target || !target.value) {
|
|
19787
|
-
return;
|
|
19788
|
-
}
|
|
19789
|
-
var selectedListItem = this.getValueListItem(target.value);
|
|
19790
|
-
if (!this.isSelected(target.value)) {
|
|
19791
|
-
// Add a new control in the FormArray
|
|
19792
|
-
this.checkboxes.push(new i2$1.FormControl(selectedListItem));
|
|
19793
|
-
}
|
|
19794
|
-
else {
|
|
19795
|
-
// Remove the control from the FormArray
|
|
19796
|
-
this.checkboxes.controls.forEach(function (ctrl, i) {
|
|
19797
|
-
if (ctrl.value.code === target.value) {
|
|
19798
|
-
_this.checkboxes.removeAt(i);
|
|
19799
|
-
}
|
|
19800
|
-
});
|
|
19801
|
-
}
|
|
19802
|
-
this.dynamicListFormControl.setValue(this.checkboxes.value);
|
|
19803
|
-
};
|
|
19804
|
-
WriteDynamicMultiSelectListFieldComponent.prototype.isSelected = function (code) {
|
|
19805
|
-
if (this.checkboxes && this.checkboxes.controls) {
|
|
19806
|
-
return this.checkboxes.controls.find(function (control) { return control.value.code === code; });
|
|
19807
|
-
}
|
|
19808
|
-
};
|
|
19809
|
-
WriteDynamicMultiSelectListFieldComponent.prototype.getValueListItem = function (value) {
|
|
19810
|
-
return this.caseField.list_items.find(function (i) { return i.code === value; });
|
|
19811
|
-
};
|
|
19812
|
-
WriteDynamicMultiSelectListFieldComponent.prototype.setInitialCaseList = function () {
|
|
19813
|
-
var hasListItems = this.caseField.list_items && this.caseField.list_items.length > 0;
|
|
19814
|
-
var hasFormattedListItems = this.caseField.formatted_value && this.caseField.formatted_value.list_items.length > 0;
|
|
19815
|
-
if (!hasListItems && hasFormattedListItems) {
|
|
19816
|
-
this.caseField.list_items = this.caseField.formatted_value.list_items;
|
|
19817
|
-
}
|
|
19818
|
-
};
|
|
19819
|
-
WriteDynamicMultiSelectListFieldComponent.prototype.setInitialCaseFieldValue = function () {
|
|
19820
|
-
if (!this.caseField.value && this.caseField.formatted_value && this.caseField.formatted_value.value) {
|
|
19821
|
-
this.caseField.value = this.caseField.formatted_value.value;
|
|
19822
|
-
}
|
|
19823
|
-
var isNull = this.caseField.value === undefined || this.caseField.value === '';
|
|
19824
|
-
if (isNull || !Array.isArray(this.caseField.value)) {
|
|
19825
|
-
this.caseField.value = [];
|
|
19826
|
-
}
|
|
19827
|
-
};
|
|
19828
|
-
return WriteDynamicMultiSelectListFieldComponent;
|
|
19829
|
-
}(AbstractFieldWriteComponent));
|
|
19830
|
-
WriteDynamicMultiSelectListFieldComponent.ɵfac = function WriteDynamicMultiSelectListFieldComponent_Factory(t) { return ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory(t || WriteDynamicMultiSelectListFieldComponent); };
|
|
19831
|
-
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) {
|
|
19832
|
-
if (rf & 1) {
|
|
19833
|
-
i0__namespace.ɵɵelementStart(0, "div", 0);
|
|
19834
|
-
i0__namespace.ɵɵelementStart(1, "fieldset");
|
|
19835
|
-
i0__namespace.ɵɵelementStart(2, "legend");
|
|
19836
|
-
i0__namespace.ɵɵtemplate(3, WriteDynamicMultiSelectListFieldComponent_span_3_Template, 3, 3, "span", 1);
|
|
19837
|
-
i0__namespace.ɵɵtemplate(4, WriteDynamicMultiSelectListFieldComponent_span_4_Template, 2, 1, "span", 2);
|
|
19838
|
-
i0__namespace.ɵɵtemplate(5, WriteDynamicMultiSelectListFieldComponent_span_5_Template, 3, 3, "span", 3);
|
|
19839
|
-
i0__namespace.ɵɵelementEnd();
|
|
19840
|
-
i0__namespace.ɵɵtemplate(6, WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template, 5, 6, "ng-container", 4);
|
|
19841
|
-
i0__namespace.ɵɵelementEnd();
|
|
19842
|
-
i0__namespace.ɵɵelementEnd();
|
|
19843
|
-
}
|
|
19844
|
-
if (rf & 2) {
|
|
19845
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$A, !ctx.checkboxes.valid && ctx.checkboxes.touched))("id", ctx.id());
|
|
19846
|
-
i0__namespace.ɵɵadvance(3);
|
|
19847
|
-
i0__namespace.ɵɵproperty("ngIf", ctx.caseField.label);
|
|
19848
|
-
i0__namespace.ɵɵadvance(1);
|
|
19849
|
-
i0__namespace.ɵɵproperty("ngIf", ctx.caseField.hint_text);
|
|
19850
|
-
i0__namespace.ɵɵadvance(1);
|
|
19851
|
-
i0__namespace.ɵɵproperty("ngIf", ctx.checkboxes.errors && ctx.checkboxes.touched);
|
|
19852
|
-
i0__namespace.ɵɵadvance(1);
|
|
19853
|
-
i0__namespace.ɵɵproperty("ngForOf", ctx.caseField.list_items);
|
|
19854
|
-
}
|
|
19855
|
-
}, directives: [i2__namespace.NgClass, i2__namespace.NgIf, i2__namespace.NgForOf], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
|
|
19856
|
-
var ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(WriteDynamicMultiSelectListFieldComponent);
|
|
19857
|
-
(function () {
|
|
19858
|
-
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(WriteDynamicMultiSelectListFieldComponent, [{
|
|
19859
|
-
type: i0.Component,
|
|
19860
|
-
args: [{
|
|
19861
|
-
selector: 'ccd-write-dynamic-multi-select-list-field',
|
|
19862
|
-
templateUrl: './write-dynamic-multi-select-list-field.html'
|
|
19863
|
-
}]
|
|
19864
|
-
}], null, null);
|
|
19865
|
-
})();
|
|
19866
|
-
|
|
19867
19738
|
var ReadPhoneUKFieldComponent = /** @class */ (function (_super) {
|
|
19868
19739
|
__extends(ReadPhoneUKFieldComponent, _super);
|
|
19869
19740
|
function ReadPhoneUKFieldComponent() {
|
|
@@ -20071,7 +19942,7 @@
|
|
|
20071
19942
|
WriteTextAreaFieldComponent.prototype.autoGrow = function (event) {
|
|
20072
19943
|
if (this.browserService.isIEOrEdge()) {
|
|
20073
19944
|
event.target.style.height = 'auto';
|
|
20074
|
-
event.target.style.height = event.target.scrollHeight +
|
|
19945
|
+
event.target.style.height = event.target.scrollHeight + "px";
|
|
20075
19946
|
event.target.scrollTop = event.target.scrollHeight;
|
|
20076
19947
|
}
|
|
20077
19948
|
};
|
|
@@ -20315,6 +20186,7 @@
|
|
|
20315
20186
|
return YesNoService.EMPTY;
|
|
20316
20187
|
};
|
|
20317
20188
|
YesNoService.prototype.isYes = function (value) {
|
|
20189
|
+
// tslint:disable-next-line:switch-default
|
|
20318
20190
|
switch (typeof (value)) {
|
|
20319
20191
|
case 'boolean':
|
|
20320
20192
|
return value;
|
|
@@ -20324,6 +20196,7 @@
|
|
|
20324
20196
|
return false;
|
|
20325
20197
|
};
|
|
20326
20198
|
YesNoService.prototype.isNo = function (value) {
|
|
20199
|
+
// tslint:disable-next-line:switch-default
|
|
20327
20200
|
switch (typeof (value)) {
|
|
20328
20201
|
case 'boolean':
|
|
20329
20202
|
return !value;
|
|
@@ -20512,7 +20385,7 @@
|
|
|
20512
20385
|
function PaletteService() {
|
|
20513
20386
|
var _b;
|
|
20514
20387
|
this.componentLauncherRegistry = (_b = {},
|
|
20515
|
-
_b[DisplayContextCustomParameter.CaseFileView] = [CaseFileViewFieldComponent,
|
|
20388
|
+
_b[DisplayContextCustomParameter.CaseFileView] = [CaseFileViewFieldComponent, CaseFileViewFieldComponent],
|
|
20516
20389
|
_b[DisplayContextCustomParameter.LinkedCases] = [WriteLinkedCasesFieldComponent, ReadLinkedCasesFieldComponent],
|
|
20517
20390
|
_b);
|
|
20518
20391
|
}
|
|
@@ -21307,6 +21180,7 @@
|
|
|
21307
21180
|
return CaseFileViewCategory;
|
|
21308
21181
|
}());
|
|
21309
21182
|
|
|
21183
|
+
// tslint:disable:variable-name
|
|
21310
21184
|
var CaseFileViewDocument = /** @class */ (function () {
|
|
21311
21185
|
function CaseFileViewDocument() {
|
|
21312
21186
|
}
|
|
@@ -22660,7 +22534,7 @@
|
|
|
22660
22534
|
// is expected not to have a party name)
|
|
22661
22535
|
if (this.flagsData) {
|
|
22662
22536
|
this.filteredFlagsData =
|
|
22663
|
-
this.flagsData.filter(function (f) { return f.flags.partyName
|
|
22537
|
+
this.flagsData.filter(function (f) { return f.flags.partyName !== null || f.pathToFlagsFormGroup === _this.caseLevelCaseFlagsFieldId; });
|
|
22664
22538
|
}
|
|
22665
22539
|
// Add a FormControl for the selected flag location if there is at least one flags instance remaining after filtering
|
|
22666
22540
|
if (this.filteredFlagsData && this.filteredFlagsData.length > 0) {
|
|
@@ -23973,18 +23847,19 @@
|
|
|
23973
23847
|
field.value = { CaseReference: value };
|
|
23974
23848
|
return field;
|
|
23975
23849
|
};
|
|
23976
|
-
ReadComplexFieldCollectionTableComponent.prototype.toCaseField = function (id, label,
|
|
23850
|
+
ReadComplexFieldCollectionTableComponent.prototype.toCaseField = function (id, label, fieldType, value) {
|
|
23977
23851
|
return classTransformer.plainToClassFromExist(new CaseField(), {
|
|
23978
23852
|
id: id,
|
|
23979
23853
|
label: label,
|
|
23980
23854
|
display_context: 'READONLY',
|
|
23981
23855
|
value: value,
|
|
23982
|
-
field_type:
|
|
23856
|
+
field_type: fieldType
|
|
23983
23857
|
});
|
|
23984
23858
|
};
|
|
23985
23859
|
ReadComplexFieldCollectionTableComponent.prototype.sortRowsByColumns = function (column) {
|
|
23986
23860
|
var shouldSortInAscendingOrder = this.columnsHorizontalLabel[column].sortOrder === SortOrder.UNSORTED
|
|
23987
23861
|
|| this.columnsHorizontalLabel[column].sortOrder === SortOrder.DESCENDING;
|
|
23862
|
+
// tslint:disable-next-line:switch-default
|
|
23988
23863
|
switch (this.columnsHorizontalLabel[column].type.type) {
|
|
23989
23864
|
case 'Number':
|
|
23990
23865
|
case 'MoneyGBP': {
|
|
@@ -25161,6 +25036,7 @@
|
|
|
25161
25036
|
return FeeValue;
|
|
25162
25037
|
}());
|
|
25163
25038
|
|
|
25039
|
+
// tslint:disable:variable-name
|
|
25164
25040
|
var Fee = /** @class */ (function () {
|
|
25165
25041
|
function Fee() {
|
|
25166
25042
|
}
|
|
@@ -25898,7 +25774,7 @@
|
|
|
25898
25774
|
function CcdPageFieldsPipe() {
|
|
25899
25775
|
}
|
|
25900
25776
|
CcdPageFieldsPipe.prototype.transform = function (page, dataFormGroup) {
|
|
25901
|
-
var
|
|
25777
|
+
var complexFields = Object.keys(dataFormGroup.controls['data'].controls).map(function (key) {
|
|
25902
25778
|
var control = dataFormGroup.controls['data'].get(key);
|
|
25903
25779
|
return control['caseField'];
|
|
25904
25780
|
}).filter(function (field) {
|
|
@@ -25918,7 +25794,7 @@
|
|
|
25918
25794
|
field_type: {
|
|
25919
25795
|
id: page.id,
|
|
25920
25796
|
type: 'Complex',
|
|
25921
|
-
complex_fields:
|
|
25797
|
+
complex_fields: complexFields
|
|
25922
25798
|
}
|
|
25923
25799
|
});
|
|
25924
25800
|
};
|
|
@@ -26097,11 +25973,11 @@
|
|
|
26097
25973
|
}
|
|
26098
25974
|
return childrenCaseFields;
|
|
26099
25975
|
};
|
|
26100
|
-
CollectionCreateCheckerService.prototype.isComplex = function (
|
|
26101
|
-
return
|
|
25976
|
+
CollectionCreateCheckerService.prototype.isComplex = function (caseField) {
|
|
25977
|
+
return caseField.field_type.type === 'Complex';
|
|
26102
25978
|
};
|
|
26103
|
-
CollectionCreateCheckerService.prototype.isCollection = function (
|
|
26104
|
-
return
|
|
25979
|
+
CollectionCreateCheckerService.prototype.isCollection = function (caseField) {
|
|
25980
|
+
return caseField.field_type.type === 'Collection';
|
|
26105
25981
|
};
|
|
26106
25982
|
CollectionCreateCheckerService.prototype.hasCreateAccess = function (caseField, role) {
|
|
26107
25983
|
return !!caseField.acls.find(function (acl) { return acl.role === role && acl.create === true; });
|
|
@@ -26220,7 +26096,6 @@
|
|
|
26220
26096
|
WriteCollectionFieldComponent,
|
|
26221
26097
|
// ComponentLauncher web components
|
|
26222
26098
|
CaseFileViewFieldComponent,
|
|
26223
|
-
CaseFileViewFieldReadComponent,
|
|
26224
26099
|
CaseFileViewFolderComponent,
|
|
26225
26100
|
CaseFileViewFolderSortComponent,
|
|
26226
26101
|
CaseFileViewOverlayMenuComponent,
|
|
@@ -26389,7 +26264,6 @@
|
|
|
26389
26264
|
WriteCollectionFieldComponent,
|
|
26390
26265
|
// ComponentLauncher web components
|
|
26391
26266
|
CaseFileViewFieldComponent,
|
|
26392
|
-
CaseFileViewFieldReadComponent,
|
|
26393
26267
|
CaseFileViewFolderComponent,
|
|
26394
26268
|
CaseFileViewFolderSortComponent,
|
|
26395
26269
|
CaseFileViewOverlayMenuComponent,
|
|
@@ -26516,7 +26390,6 @@
|
|
|
26516
26390
|
WriteCollectionFieldComponent,
|
|
26517
26391
|
// ComponentLauncher web components
|
|
26518
26392
|
CaseFileViewFieldComponent,
|
|
26519
|
-
CaseFileViewFieldReadComponent,
|
|
26520
26393
|
CaseFileViewFolderComponent,
|
|
26521
26394
|
CaseFileViewFolderSortComponent,
|
|
26522
26395
|
CaseFileViewOverlayMenuComponent,
|
|
@@ -26655,8 +26528,7 @@
|
|
|
26655
26528
|
i0__namespace.ɵɵsetComponentScope(WriteCollectionFieldComponent, [i2__namespace.NgIf, i2__namespace.NgForOf, FieldWriteComponent, i2__namespace$1.NgControlStatusGroup, i2__namespace$1.FormGroupDirective], [i1__namespace.RpxTranslatePipe, FieldLabelPipe, FirstErrorPipe]);
|
|
26656
26529
|
i0__namespace.ɵɵsetComponentScope(
|
|
26657
26530
|
// ComponentLauncher web components
|
|
26658
|
-
CaseFileViewFieldComponent, [i2__namespace.NgIf, CaseFileViewFolderComponent, i12__namespace
|
|
26659
|
-
i0__namespace.ɵɵsetComponentScope(CaseFileViewFieldReadComponent, [i2__namespace.NgIf, CaseFileViewFolderComponent, i12__namespace.ɵcs], []);
|
|
26531
|
+
CaseFileViewFieldComponent, [i2__namespace.NgIf, CaseFileViewFolderComponent, i12__namespace.MediaViewerComponent], []);
|
|
26660
26532
|
i0__namespace.ɵɵsetComponentScope(LinkedCasesToTableComponent, [i2__namespace.NgIf, i2__namespace.NgForOf], [CaseReferencePipe, LinkCasesReasonValuePipe]);
|
|
26661
26533
|
i0__namespace.ɵɵsetComponentScope(LinkedCasesFromTableComponent, [i2__namespace.NgIf, i2__namespace.NgForOf], [CaseReferencePipe, LinkCasesFromReasonValuePipe]);
|
|
26662
26534
|
i0__namespace.ɵɵsetComponentScope(LinkCasesComponent, [i2__namespace.NgIf, i2__namespace$1.NgControlStatusGroup, i2__namespace$1.FormGroupDirective, i2__namespace.NgClass, i2__namespace$1.DefaultValueAccessor, i2__namespace$1.NgControlStatus, i2__namespace$1.FormControlName, i2__namespace$1.FormArrayName, i2__namespace.NgForOf, i2__namespace$1.FormGroupName, i2__namespace$1.CheckboxControlValueAccessor], [CaseReferencePipe, LinkCasesReasonValuePipe]);
|
|
@@ -27359,7 +27231,7 @@
|
|
|
27359
27231
|
if (caseField.field_type.type === 'Complex') {
|
|
27360
27232
|
// Note: Deliberate use of equality (==) and non-equality (!=) operators for null checks throughout, to
|
|
27361
27233
|
// handle both null and undefined values
|
|
27362
|
-
if (caseField.value
|
|
27234
|
+
if (caseField.value !== null) {
|
|
27363
27235
|
// Call this function recursively to replace the Complex field's sub-fields as necessary, passing the
|
|
27364
27236
|
// CaseField itself (the sub-fields do not contain any values, so these need to be obtained from the
|
|
27365
27237
|
// parent)
|
|
@@ -27425,8 +27297,8 @@
|
|
|
27425
27297
|
this.caseEdit.navigateToPage(pageId);
|
|
27426
27298
|
};
|
|
27427
27299
|
CaseEditSubmitComponent.prototype.callbackErrorsNotify = function (errorContext) {
|
|
27428
|
-
this.ignoreWarning = errorContext.
|
|
27429
|
-
this.triggerText = errorContext.
|
|
27300
|
+
this.ignoreWarning = errorContext.ignoreWarning;
|
|
27301
|
+
this.triggerText = errorContext.triggerText;
|
|
27430
27302
|
};
|
|
27431
27303
|
CaseEditSubmitComponent.prototype.summaryCaseField = function (field) {
|
|
27432
27304
|
if (null === this.editForm.get('data').get(field.id)) {
|
|
@@ -27639,7 +27511,7 @@
|
|
|
27639
27511
|
_this.eventTrigger = eventTrigger;
|
|
27640
27512
|
})
|
|
27641
27513
|
.catch(function (error) {
|
|
27642
|
-
_this.alertService.error(
|
|
27514
|
+
_this.alertService.error(error.message);
|
|
27643
27515
|
return rxjs.throwError(error);
|
|
27644
27516
|
});
|
|
27645
27517
|
};
|
|
@@ -28109,6 +27981,7 @@
|
|
|
28109
27981
|
{ provide: COMPONENT_PORTAL_INJECTION_TOKEN, useValue: this }
|
|
28110
27982
|
]
|
|
28111
27983
|
});
|
|
27984
|
+
// tslint:disable-next-line:switch-default
|
|
28112
27985
|
switch (portalType) {
|
|
28113
27986
|
case EventCompletionPortalTypes.TaskCancelled:
|
|
28114
27987
|
this.selectedComponentPortal = new i6$2.ComponentPortal(CaseEventCompletionTaskCancelledComponent, null, injector);
|
|
@@ -28658,36 +28531,36 @@
|
|
|
28658
28531
|
this.screenReaderCurrentLabel = "You're on page";
|
|
28659
28532
|
this.pageChange = new i0.EventEmitter();
|
|
28660
28533
|
this.pageBoundsCorrection = new i0.EventEmitter();
|
|
28661
|
-
this.
|
|
28662
|
-
this.
|
|
28663
|
-
this.
|
|
28534
|
+
this.pDirectionLinks = true;
|
|
28535
|
+
this.pAutoHide = false;
|
|
28536
|
+
this.pResponsive = false;
|
|
28664
28537
|
}
|
|
28665
28538
|
Object.defineProperty(PaginationComponent.prototype, "directionLinks", {
|
|
28666
28539
|
get: function () {
|
|
28667
|
-
return this.
|
|
28540
|
+
return this.pDirectionLinks;
|
|
28668
28541
|
},
|
|
28669
28542
|
set: function (value) {
|
|
28670
|
-
this.
|
|
28543
|
+
this.pDirectionLinks = coerceToBoolean(value);
|
|
28671
28544
|
},
|
|
28672
28545
|
enumerable: false,
|
|
28673
28546
|
configurable: true
|
|
28674
28547
|
});
|
|
28675
28548
|
Object.defineProperty(PaginationComponent.prototype, "autoHide", {
|
|
28676
28549
|
get: function () {
|
|
28677
|
-
return this.
|
|
28550
|
+
return this.pAutoHide;
|
|
28678
28551
|
},
|
|
28679
28552
|
set: function (value) {
|
|
28680
|
-
this.
|
|
28553
|
+
this.pAutoHide = coerceToBoolean(value);
|
|
28681
28554
|
},
|
|
28682
28555
|
enumerable: false,
|
|
28683
28556
|
configurable: true
|
|
28684
28557
|
});
|
|
28685
28558
|
Object.defineProperty(PaginationComponent.prototype, "responsive", {
|
|
28686
28559
|
get: function () {
|
|
28687
|
-
return this.
|
|
28560
|
+
return this.pResponsive;
|
|
28688
28561
|
},
|
|
28689
28562
|
set: function (value) {
|
|
28690
|
-
this.
|
|
28563
|
+
this.pResponsive = coerceToBoolean(value);
|
|
28691
28564
|
},
|
|
28692
28565
|
enumerable: false,
|
|
28693
28566
|
configurable: true
|
|
@@ -29476,7 +29349,7 @@
|
|
|
29476
29349
|
var formValue = _this.windowService.getLocalStorage(FORM_GROUP_VAL_LOC_STORAGE);
|
|
29477
29350
|
workbasketInputs.forEach(function (item) {
|
|
29478
29351
|
if (item.field.elementPath) {
|
|
29479
|
-
item.field.id = item.field.id +
|
|
29352
|
+
item.field.id = item.field.id + "." + item.field.elementPath;
|
|
29480
29353
|
}
|
|
29481
29354
|
item.field.label = item.label;
|
|
29482
29355
|
if (formValue) {
|
|
@@ -29528,7 +29401,7 @@
|
|
|
29528
29401
|
var value = formGroupLS[key];
|
|
29529
29402
|
// Clear the filter form group control values if it has a value in local storage
|
|
29530
29403
|
// The regionList form group control value should be ignored as it always contain the latest value
|
|
29531
|
-
if (key !== REGION_LIST_AND_FRC_FILTER && value
|
|
29404
|
+
if (key !== REGION_LIST_AND_FRC_FILTER && value !== null) {
|
|
29532
29405
|
this.formGroup.get(key).setValue(null);
|
|
29533
29406
|
}
|
|
29534
29407
|
}
|
|
@@ -30430,7 +30303,7 @@
|
|
|
30430
30303
|
}))
|
|
30431
30304
|
.toPromise()
|
|
30432
30305
|
.catch(function (error) {
|
|
30433
|
-
_this.alertService.error(
|
|
30306
|
+
_this.alertService.error(error.message);
|
|
30434
30307
|
return rxjs.throwError(error);
|
|
30435
30308
|
});
|
|
30436
30309
|
};
|
|
@@ -30723,7 +30596,7 @@
|
|
|
30723
30596
|
this.eventTrigger = this.route.snapshot.data.eventTrigger;
|
|
30724
30597
|
if (this.activityPollingService.isEnabled) {
|
|
30725
30598
|
this.ngZone.runOutsideAngular(function () {
|
|
30726
|
-
_this.activitySubscription = _this.postEditActivity().subscribe(function (
|
|
30599
|
+
_this.activitySubscription = _this.postEditActivity().subscribe(function () {
|
|
30727
30600
|
// console.log('Posted EDIT activity and result is: ' + JSON.stringify(_resolved));
|
|
30728
30601
|
});
|
|
30729
30602
|
});
|
|
@@ -30788,19 +30661,12 @@
|
|
|
30788
30661
|
.navigate([this.parentUrl])
|
|
30789
30662
|
.then(function () {
|
|
30790
30663
|
var caseReference = _this.caseReferencePipe.transform(_this.caseDetails.case_id.toString());
|
|
30791
|
-
var replacements = { CASEREFERENCE: caseReference, NAME: _this.eventTrigger.name };
|
|
30792
30664
|
if (EventStatusService.isIncomplete(eventStatus)) {
|
|
30793
|
-
_this.alertService.warning(
|
|
30794
|
-
|
|
30795
|
-
replacements: replacements
|
|
30796
|
-
});
|
|
30665
|
+
_this.alertService.warning("Case #" + caseReference + " has been updated with event: " + _this.eventTrigger.name + " "
|
|
30666
|
+
+ "but the callback service cannot be completed");
|
|
30797
30667
|
}
|
|
30798
30668
|
else {
|
|
30799
|
-
_this.alertService.success(
|
|
30800
|
-
phrase: 'Case #%CASEREFERENCE% has been updated with event: %NAME%',
|
|
30801
|
-
replacements: replacements,
|
|
30802
|
-
preserve: true
|
|
30803
|
-
});
|
|
30669
|
+
_this.alertService.success("Case #" + caseReference + " has been updated with event: " + _this.eventTrigger.name, true);
|
|
30804
30670
|
}
|
|
30805
30671
|
});
|
|
30806
30672
|
};
|
|
@@ -31795,8 +31661,8 @@
|
|
|
31795
31661
|
return this.sortedTabs.length > 0 || this.prependedTabs.length > 0 || this.appendedTabs.length > 0;
|
|
31796
31662
|
};
|
|
31797
31663
|
CaseFullAccessViewComponent.prototype.callbackErrorsNotify = function (callbackErrorsContext) {
|
|
31798
|
-
this.ignoreWarning = callbackErrorsContext.
|
|
31799
|
-
this.triggerText = callbackErrorsContext.
|
|
31664
|
+
this.ignoreWarning = callbackErrorsContext.ignoreWarning;
|
|
31665
|
+
this.triggerText = callbackErrorsContext.triggerText;
|
|
31800
31666
|
};
|
|
31801
31667
|
CaseFullAccessViewComponent.prototype.isDraft = function () {
|
|
31802
31668
|
return Draft.isDraft(this.caseDetails.case_id);
|
|
@@ -32075,7 +31941,7 @@
|
|
|
32075
31941
|
* or the empty string
|
|
32076
31942
|
*/
|
|
32077
31943
|
PrintUrlPipe.prototype.transform = function (remoteUrl) {
|
|
32078
|
-
if (remoteUrl
|
|
31944
|
+
if ((remoteUrl === null || remoteUrl === void 0 ? void 0 : remoteUrl.length) > 0) {
|
|
32079
31945
|
var printServiceUrlPathname = void 0;
|
|
32080
31946
|
/**
|
|
32081
31947
|
* Check navigator.userAgent to see if the browser is IE or not. Check for either the browser name, "MSIE", or
|
|
@@ -32091,7 +31957,7 @@
|
|
|
32091
31957
|
printServiceUrlPathname = urlParser.pathname;
|
|
32092
31958
|
if (printServiceUrlPathname[0] !== '/') {
|
|
32093
31959
|
// Fix for IE11; it returns the pathname without leading slash
|
|
32094
|
-
printServiceUrlPathname =
|
|
31960
|
+
printServiceUrlPathname = "/" + printServiceUrlPathname;
|
|
32095
31961
|
}
|
|
32096
31962
|
}
|
|
32097
31963
|
else {
|
|
@@ -32308,10 +32174,10 @@
|
|
|
32308
32174
|
};
|
|
32309
32175
|
CaseViewerComponent.prototype.setUserAccessType = function (caseDetails) {
|
|
32310
32176
|
if (caseDetails && Array.isArray(caseDetails.metadataFields)) {
|
|
32311
|
-
var
|
|
32312
|
-
var
|
|
32313
|
-
this.accessGranted =
|
|
32314
|
-
this.userAccessType =
|
|
32177
|
+
var accessProcess = caseDetails.metadataFields.find(function (metadataField) { return metadataField.id === CaseViewerComponent.METADATA_FIELD_ACCESS_PROCEES_ID; });
|
|
32178
|
+
var accessGranted = caseDetails.metadataFields.find(function (metadataField) { return metadataField.id === CaseViewerComponent.METADATA_FIELD_ACCESS_GRANTED_ID; });
|
|
32179
|
+
this.accessGranted = accessGranted ? accessGranted.value !== CaseViewerComponent.BASIC_USER_ACCESS_TYPES : false;
|
|
32180
|
+
this.userAccessType = accessProcess ? accessProcess.value : null;
|
|
32315
32181
|
}
|
|
32316
32182
|
};
|
|
32317
32183
|
CaseViewerComponent.prototype.isDataLoaded = function () {
|
|
@@ -33732,11 +33598,11 @@
|
|
|
33732
33598
|
};
|
|
33733
33599
|
this.$roleAssignmentResponseSubscription = this.casesService.createChallengedAccessRequest(caseId_1, challengedAccessRequest)
|
|
33734
33600
|
.pipe(operators.switchMap(function () { return _this.caseNotifier.fetchAndRefresh(caseId_1); }))
|
|
33735
|
-
.subscribe(function (
|
|
33601
|
+
.subscribe(function () {
|
|
33736
33602
|
// Would have been nice to pass the caseId within state.data, but this isn't part of NavigationExtras until
|
|
33737
33603
|
// Angular 7.2!
|
|
33738
33604
|
_this.router.navigate(['success'], { relativeTo: _this.route });
|
|
33739
|
-
}, function (
|
|
33605
|
+
}, function () {
|
|
33740
33606
|
// Navigate to error page
|
|
33741
33607
|
});
|
|
33742
33608
|
}
|
|
@@ -33750,7 +33616,7 @@
|
|
|
33750
33616
|
}
|
|
33751
33617
|
};
|
|
33752
33618
|
CaseChallengedAccessRequestComponent.prototype.inputEmpty = function (input) {
|
|
33753
|
-
return input.value
|
|
33619
|
+
return input.value === null || input.value.trim().length === 0;
|
|
33754
33620
|
};
|
|
33755
33621
|
return CaseChallengedAccessRequestComponent;
|
|
33756
33622
|
}());
|
|
@@ -34452,11 +34318,11 @@
|
|
|
34452
34318
|
};
|
|
34453
34319
|
this.$roleAssignmentResponseSubscription = this.casesService.createSpecificAccessRequest(caseId_1, specificAccessRequest)
|
|
34454
34320
|
.pipe(operators.switchMap(function () { return _this.caseNotifier.fetchAndRefresh(caseId_1); }))
|
|
34455
|
-
.subscribe(function (
|
|
34321
|
+
.subscribe(function () {
|
|
34456
34322
|
// Would have been nice to pass the caseId within state.data, but this isn't part of NavigationExtras until
|
|
34457
34323
|
// Angular 7.2
|
|
34458
34324
|
_this.router.navigate(['success'], { relativeTo: _this.route });
|
|
34459
|
-
}, function (
|
|
34325
|
+
}, function () {
|
|
34460
34326
|
// Navigate to error page
|
|
34461
34327
|
});
|
|
34462
34328
|
}
|
|
@@ -34471,7 +34337,7 @@
|
|
|
34471
34337
|
}
|
|
34472
34338
|
};
|
|
34473
34339
|
CaseSpecificAccessRequestComponent.prototype.inputEmpty = function (input) {
|
|
34474
|
-
return input.value
|
|
34340
|
+
return input.value === null || input.value.trim().length === 0;
|
|
34475
34341
|
};
|
|
34476
34342
|
return CaseSpecificAccessRequestComponent;
|
|
34477
34343
|
}());
|
|
@@ -35434,7 +35300,7 @@
|
|
|
35434
35300
|
}
|
|
35435
35301
|
searchInputs.forEach(function (item) {
|
|
35436
35302
|
if (item.field.elementPath) {
|
|
35437
|
-
item.field.id = item.field.id +
|
|
35303
|
+
item.field.id = item.field.id + "." + item.field.elementPath;
|
|
35438
35304
|
}
|
|
35439
35305
|
item.field.label = item.label;
|
|
35440
35306
|
if (formValueObject) {
|
|
@@ -35743,7 +35609,7 @@
|
|
|
35743
35609
|
i0__namespace.ɵɵadvance(5);
|
|
35744
35610
|
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(6, 4, "Warning"));
|
|
35745
35611
|
i0__namespace.ɵɵadvance(2);
|
|
35746
|
-
i0__namespace.ɵɵtextInterpolate3(" ", i0__namespace.ɵɵpipeBind1(8, 6, "The total size of the result set is"), " ", i0__namespace.ɵɵpipeBind1(9, 8, ctx_r3.paginationMetadata.
|
|
35612
|
+
i0__namespace.ɵɵtextInterpolate3(" ", i0__namespace.ɵɵpipeBind1(8, 6, "The total size of the result set is"), " ", i0__namespace.ɵɵpipeBind1(9, 8, ctx_r3.paginationMetadata.totalResultsCount), ". ", i0__namespace.ɵɵpipeBind1(10, 10, "Only the first 10,000 records are available for display."), " ");
|
|
35747
35613
|
}
|
|
35748
35614
|
}
|
|
35749
35615
|
function SearchResultComponent_table_0_div_6_Template(rf, ctx) {
|
|
@@ -36336,7 +36202,7 @@
|
|
|
36336
36202
|
};
|
|
36337
36203
|
Object.defineProperty(SearchResultComponent.prototype, "resultTotal", {
|
|
36338
36204
|
get: function () {
|
|
36339
|
-
var total = this.paginationMetadata.
|
|
36205
|
+
var total = this.paginationMetadata.totalResultsCount;
|
|
36340
36206
|
var maximumResultReached = total >= this.PAGINATION_MAX_ITEM_RESULT;
|
|
36341
36207
|
this.paginationLimitEnforced = maximumResultReached;
|
|
36342
36208
|
return maximumResultReached ? this.PAGINATION_MAX_ITEM_RESULT : total;
|
|
@@ -36487,7 +36353,7 @@
|
|
|
36487
36353
|
return col;
|
|
36488
36354
|
};
|
|
36489
36355
|
SearchResultComponent.prototype.hasResults = function () {
|
|
36490
|
-
return this.resultView.results.length && this.paginationMetadata.
|
|
36356
|
+
return this.resultView.results.length && this.paginationMetadata.totalPagesCount;
|
|
36491
36357
|
};
|
|
36492
36358
|
SearchResultComponent.prototype.hasDrafts = function () {
|
|
36493
36359
|
return this.resultView.hasDrafts();
|
|
@@ -36586,7 +36452,7 @@
|
|
|
36586
36452
|
return ((currentPage - 1) * this.paginationPageSize) + this.resultView.results.length + this.getDraftsCountIfNotPageOne(currentPage);
|
|
36587
36453
|
};
|
|
36588
36454
|
SearchResultComponent.prototype.getTotalResults = function () {
|
|
36589
|
-
var total = this.paginationMetadata.
|
|
36455
|
+
var total = this.paginationMetadata.totalResultsCount + this.draftsCount;
|
|
36590
36456
|
return total >= this.PAGINATION_MAX_ITEM_RESULT ? this.PAGINATION_MAX_ITEM_RESULT : total;
|
|
36591
36457
|
};
|
|
36592
36458
|
SearchResultComponent.prototype.prepareCaseLinkUrl = function (caseId) {
|
|
@@ -36745,6 +36611,7 @@
|
|
|
36745
36611
|
})();
|
|
36746
36612
|
i0__namespace.ɵɵsetComponentScope(SearchResultComponent, [i2__namespace.NgIf, i2__namespace.NgForOf, i1__namespace$1.RouterLinkWithHref, FieldReadComponent, LabelSubstitutorDirective, ActivityComponent, PaginationComponent], [i1__namespace.RpxTranslatePipe, i2__namespace.DecimalPipe, i1__namespace$6.PaginatePipe, CaseReferencePipe, SortSearchResultPipe]);
|
|
36747
36613
|
|
|
36614
|
+
// tslint:disable:variable-name
|
|
36748
36615
|
var ComplexFieldOverride = /** @class */ (function () {
|
|
36749
36616
|
function ComplexFieldOverride() {
|
|
36750
36617
|
}
|
|
@@ -36766,24 +36633,24 @@
|
|
|
36766
36633
|
this.caseField.id = id;
|
|
36767
36634
|
return this;
|
|
36768
36635
|
};
|
|
36769
|
-
CaseFieldBuilder.prototype.withFieldType = function (
|
|
36770
|
-
this.caseField.field_type =
|
|
36636
|
+
CaseFieldBuilder.prototype.withFieldType = function (fieldType) {
|
|
36637
|
+
this.caseField.field_type = fieldType;
|
|
36771
36638
|
return this;
|
|
36772
36639
|
};
|
|
36773
|
-
CaseFieldBuilder.prototype.withDisplayContext = function (
|
|
36774
|
-
this.caseField.display_context =
|
|
36640
|
+
CaseFieldBuilder.prototype.withDisplayContext = function (displayContext) {
|
|
36641
|
+
this.caseField.display_context = displayContext;
|
|
36775
36642
|
return this;
|
|
36776
36643
|
};
|
|
36777
|
-
CaseFieldBuilder.prototype.withDisplayContextParameter = function (
|
|
36778
|
-
this.caseField.display_context_parameter =
|
|
36644
|
+
CaseFieldBuilder.prototype.withDisplayContextParameter = function (displayContextParameter) {
|
|
36645
|
+
this.caseField.display_context_parameter = displayContextParameter;
|
|
36779
36646
|
return this;
|
|
36780
36647
|
};
|
|
36781
36648
|
CaseFieldBuilder.prototype.withHidden = function (hidden) {
|
|
36782
36649
|
this.caseField.hidden = hidden;
|
|
36783
36650
|
return this;
|
|
36784
36651
|
};
|
|
36785
|
-
CaseFieldBuilder.prototype.withHintText = function (
|
|
36786
|
-
this.caseField.hint_text =
|
|
36652
|
+
CaseFieldBuilder.prototype.withHintText = function (hintText) {
|
|
36653
|
+
this.caseField.hint_text = hintText;
|
|
36787
36654
|
return this;
|
|
36788
36655
|
};
|
|
36789
36656
|
CaseFieldBuilder.prototype.withLabel = function (label) {
|
|
@@ -36794,12 +36661,12 @@
|
|
|
36794
36661
|
this.caseField.order = order;
|
|
36795
36662
|
return this;
|
|
36796
36663
|
};
|
|
36797
|
-
CaseFieldBuilder.prototype.withSecurityLabel = function (
|
|
36798
|
-
this.caseField.security_label =
|
|
36664
|
+
CaseFieldBuilder.prototype.withSecurityLabel = function (securityLabel) {
|
|
36665
|
+
this.caseField.security_label = securityLabel;
|
|
36799
36666
|
return this;
|
|
36800
36667
|
};
|
|
36801
|
-
CaseFieldBuilder.prototype.withShowCondition = function (
|
|
36802
|
-
this.caseField.show_condition =
|
|
36668
|
+
CaseFieldBuilder.prototype.withShowCondition = function (showCondition) {
|
|
36669
|
+
this.caseField.show_condition = showCondition;
|
|
36803
36670
|
return this;
|
|
36804
36671
|
};
|
|
36805
36672
|
CaseFieldBuilder.prototype.withShowSummaryContentOption = function (option) {
|
|
@@ -36827,21 +36694,21 @@
|
|
|
36827
36694
|
complex_fields: []
|
|
36828
36695
|
};
|
|
36829
36696
|
};
|
|
36830
|
-
var createCaseEventTrigger = function (id, name,
|
|
36831
|
-
if (
|
|
36832
|
-
if (
|
|
36697
|
+
var createCaseEventTrigger = function (id, name, caseId, showSummary, caseFields, wizardPages, canSaveDraft) {
|
|
36698
|
+
if (wizardPages === void 0) { wizardPages = []; }
|
|
36699
|
+
if (canSaveDraft === void 0) { canSaveDraft = false; }
|
|
36833
36700
|
var eventTrigger = new CaseEventTrigger();
|
|
36834
36701
|
eventTrigger.id = id;
|
|
36835
36702
|
eventTrigger.name = name;
|
|
36836
|
-
eventTrigger.case_id =
|
|
36837
|
-
eventTrigger.show_summary =
|
|
36838
|
-
eventTrigger.wizard_pages =
|
|
36703
|
+
eventTrigger.case_id = caseId;
|
|
36704
|
+
eventTrigger.show_summary = showSummary;
|
|
36705
|
+
eventTrigger.wizard_pages = wizardPages;
|
|
36839
36706
|
eventTrigger.event_token = 'test-token';
|
|
36840
|
-
eventTrigger.case_fields =
|
|
36841
|
-
eventTrigger.can_save_draft =
|
|
36707
|
+
eventTrigger.case_fields = caseFields;
|
|
36708
|
+
eventTrigger.can_save_draft = canSaveDraft;
|
|
36842
36709
|
return eventTrigger;
|
|
36843
36710
|
};
|
|
36844
|
-
var aCaseField = function (id, label, type,
|
|
36711
|
+
var aCaseField = function (id, label, type, displayContext, showSummaryContentOption, typeComplexFields, retainHiddenValue, hidden) {
|
|
36845
36712
|
if (typeComplexFields === void 0) { typeComplexFields = []; }
|
|
36846
36713
|
return ({
|
|
36847
36714
|
id: id || 'personFirstName',
|
|
@@ -36850,10 +36717,10 @@
|
|
|
36850
36717
|
type: type || 'Text',
|
|
36851
36718
|
complex_fields: typeComplexFields || []
|
|
36852
36719
|
},
|
|
36853
|
-
display_context:
|
|
36720
|
+
display_context: displayContext || 'OPTIONAL',
|
|
36854
36721
|
label: label || 'First name',
|
|
36855
|
-
show_summary_content_option:
|
|
36856
|
-
retain_hidden_value:
|
|
36722
|
+
show_summary_content_option: showSummaryContentOption,
|
|
36723
|
+
retain_hidden_value: retainHiddenValue || false,
|
|
36857
36724
|
hidden: hidden || false
|
|
36858
36725
|
});
|
|
36859
36726
|
};
|
|
@@ -36895,48 +36762,48 @@
|
|
|
36895
36762
|
complexFieldOverride.display_context = 'HIDDEN';
|
|
36896
36763
|
return complexFieldOverride;
|
|
36897
36764
|
};
|
|
36898
|
-
var createCaseField = function (id, label, hint, fieldType,
|
|
36765
|
+
var createCaseField = function (id, label, hint, fieldType, displayContext, order, showCondition, acls, hidden) {
|
|
36899
36766
|
if (order === void 0) { order = undefined; }
|
|
36900
|
-
if (
|
|
36901
|
-
if (
|
|
36767
|
+
if (showCondition === void 0) { showCondition = undefined; }
|
|
36768
|
+
if (acls === void 0) { acls = undefined; }
|
|
36902
36769
|
return CaseFieldBuilder.create()
|
|
36903
36770
|
.withId(id || 'personFirstName')
|
|
36904
36771
|
.withFieldType(fieldType || textFieldType())
|
|
36905
|
-
.withDisplayContext(
|
|
36772
|
+
.withDisplayContext(displayContext || 'OPTIONAL')
|
|
36906
36773
|
.withLabel(label || 'First name')
|
|
36907
36774
|
.withHintText(hint || 'First name hint text')
|
|
36908
36775
|
.withShowSummaryContentOption(0)
|
|
36909
36776
|
.withOrder(order)
|
|
36910
|
-
.withShowCondition(
|
|
36911
|
-
.withACLs(
|
|
36777
|
+
.withShowCondition(showCondition || undefined)
|
|
36778
|
+
.withACLs(acls)
|
|
36912
36779
|
.withHidden(hidden || false)
|
|
36913
36780
|
.build();
|
|
36914
36781
|
};
|
|
36915
|
-
var newCaseField = function (id, label, hint, fieldType,
|
|
36782
|
+
var newCaseField = function (id, label, hint, fieldType, displayContext, order) {
|
|
36916
36783
|
if (order === void 0) { order = undefined; }
|
|
36917
36784
|
return CaseFieldBuilder.create()
|
|
36918
36785
|
.withId(id || 'personFirstName')
|
|
36919
36786
|
.withFieldType(fieldType || textFieldType())
|
|
36920
|
-
.withDisplayContext(
|
|
36787
|
+
.withDisplayContext(displayContext || 'OPTIONAL')
|
|
36921
36788
|
.withHintText(hint || 'First name hint text')
|
|
36922
36789
|
.withLabel(label || 'First name')
|
|
36923
36790
|
.withOrder(order)
|
|
36924
36791
|
.withShowSummaryContentOption(0);
|
|
36925
36792
|
};
|
|
36926
|
-
var createFieldType = function (typeId, type,
|
|
36927
|
-
if (
|
|
36928
|
-
if (
|
|
36793
|
+
var createFieldType = function (typeId, type, complexFields, collectionFieldType) {
|
|
36794
|
+
if (complexFields === void 0) { complexFields = []; }
|
|
36795
|
+
if (collectionFieldType === void 0) { collectionFieldType = undefined; }
|
|
36929
36796
|
return {
|
|
36930
36797
|
id: typeId || 'Text',
|
|
36931
36798
|
type: type || 'Text',
|
|
36932
|
-
complex_fields:
|
|
36933
|
-
collection_field_type:
|
|
36799
|
+
complex_fields: complexFields || [],
|
|
36800
|
+
collection_field_type: collectionFieldType || undefined
|
|
36934
36801
|
};
|
|
36935
36802
|
};
|
|
36936
36803
|
var createFixedListFieldType = function (typeId, fixedListItems) {
|
|
36937
36804
|
if (fixedListItems === void 0) { fixedListItems = []; }
|
|
36938
36805
|
return {
|
|
36939
|
-
id:
|
|
36806
|
+
id: "FixedList-" + typeId,
|
|
36940
36807
|
type: 'FixedList',
|
|
36941
36808
|
fixed_list_items: fixedListItems || []
|
|
36942
36809
|
};
|
|
@@ -36944,18 +36811,18 @@
|
|
|
36944
36811
|
var createMultiSelectListFieldType = function (typeId, fixedListItems) {
|
|
36945
36812
|
if (fixedListItems === void 0) { fixedListItems = []; }
|
|
36946
36813
|
return {
|
|
36947
|
-
id:
|
|
36814
|
+
id: "MultiSelectList-" + typeId,
|
|
36948
36815
|
type: 'MultiSelectList',
|
|
36949
36816
|
fixed_list_items: fixedListItems || []
|
|
36950
36817
|
};
|
|
36951
36818
|
};
|
|
36952
|
-
var createACL = function (role,
|
|
36819
|
+
var createACL = function (role, aclCreate, aclRead, aclUpdate, aclDelete) {
|
|
36953
36820
|
return ({
|
|
36954
36821
|
role: role || 'roleX',
|
|
36955
|
-
create:
|
|
36956
|
-
read:
|
|
36957
|
-
update:
|
|
36958
|
-
delete:
|
|
36822
|
+
create: aclCreate,
|
|
36823
|
+
read: aclRead,
|
|
36824
|
+
update: aclUpdate,
|
|
36825
|
+
delete: aclDelete
|
|
36959
36826
|
});
|
|
36960
36827
|
};
|
|
36961
36828
|
|
|
@@ -37055,7 +36922,6 @@
|
|
|
37055
36922
|
exports.CaseField = CaseField;
|
|
37056
36923
|
exports.CaseFieldService = CaseFieldService;
|
|
37057
36924
|
exports.CaseFileViewFieldComponent = CaseFileViewFieldComponent;
|
|
37058
|
-
exports.CaseFileViewFieldReadComponent = CaseFileViewFieldReadComponent;
|
|
37059
36925
|
exports.CaseFileViewFolderComponent = CaseFileViewFolderComponent;
|
|
37060
36926
|
exports.CaseFileViewFolderDocumentActionsComponent = CaseFileViewFolderDocumentActionsComponent;
|
|
37061
36927
|
exports.CaseFileViewFolderSelectorComponent = CaseFileViewFolderSelectorComponent;
|
|
@@ -37175,7 +37041,6 @@
|
|
|
37175
37041
|
exports.FormatTranslatorService = FormatTranslatorService;
|
|
37176
37042
|
exports.GreyBarService = GreyBarService;
|
|
37177
37043
|
exports.HRef = HRef;
|
|
37178
|
-
exports.HasLoadingState = HasLoadingState;
|
|
37179
37044
|
exports.HeaderBarComponent = HeaderBarComponent;
|
|
37180
37045
|
exports.HeadersModule = HeadersModule;
|
|
37181
37046
|
exports.HttpError = HttpError;
|