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