@valtimo/zgw 12.0.0
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/esm2022/lib/components/dossier-management-zgw/dossier-management-zgw.component.mjs +43 -0
- package/esm2022/lib/components/index.mjs +17 -0
- package/esm2022/lib/models/dossier-management-zgw.model.mjs +20 -0
- package/esm2022/lib/models/index.mjs +17 -0
- package/esm2022/lib/modules/contactmomenten/components/contact-moments/contact-moments.component.mjs +89 -0
- package/esm2022/lib/modules/contactmomenten/components/index.mjs +17 -0
- package/esm2022/lib/modules/contactmomenten/index.mjs +19 -0
- package/esm2022/lib/modules/contactmomenten/models/contact-moment.model.mjs +17 -0
- package/esm2022/lib/modules/contactmomenten/models/index.mjs +17 -0
- package/esm2022/lib/modules/contactmomenten/services/contact-moment.service.mjs +43 -0
- package/esm2022/lib/modules/contactmomenten/services/index.mjs +17 -0
- package/esm2022/lib/modules/documenten-api/components/documenten-api-column-modal/documenten-api-column-modal.component.mjs +301 -0
- package/esm2022/lib/modules/documenten-api/components/documenten-api-columns/documenten-api-columns.component.mjs +170 -0
- package/esm2022/lib/modules/documenten-api/components/documenten-api-documents/documenten-api-documents.component.mjs +256 -0
- package/esm2022/lib/modules/documenten-api/components/documenten-api-link-upload-process/dossier-management-link-process.component.mjs +100 -0
- package/esm2022/lib/modules/documenten-api/components/documenten-api-metadata-modal/documenten-api-metadata-modal.component.mjs +233 -0
- package/esm2022/lib/modules/documenten-api/components/documenten-api-version/documenten-api-version.component.mjs +43 -0
- package/esm2022/lib/modules/documenten-api/components/index.mjs +22 -0
- package/esm2022/lib/modules/documenten-api/formio/documenten-api-uploader/documenten-api-uploader-edit-form.mjs +305 -0
- package/esm2022/lib/modules/documenten-api/formio/documenten-api-uploader/documenten-api-uploader.component.mjs +143 -0
- package/esm2022/lib/modules/documenten-api/formio/documenten-api-uploader/documenten-api-uploader.formio.mjs +46 -0
- package/esm2022/lib/modules/documenten-api/formio/documenten-api-uploader/index.mjs +19 -0
- package/esm2022/lib/modules/documenten-api/formio/index.mjs +17 -0
- package/esm2022/lib/modules/documenten-api/index.mjs +20 -0
- package/esm2022/lib/modules/documenten-api/models/configured-column.model.mjs +17 -0
- package/esm2022/lib/modules/documenten-api/models/documenten-api-column-modal.model.mjs +17 -0
- package/esm2022/lib/modules/documenten-api/models/documenten-api-link-process.model.mjs +17 -0
- package/esm2022/lib/modules/documenten-api/models/documenten-api-metadata.model.mjs +17 -0
- package/esm2022/lib/modules/documenten-api/models/documenten-api-version.model.mjs +17 -0
- package/esm2022/lib/modules/documenten-api/models/documenten-api.model.mjs +17 -0
- package/esm2022/lib/modules/documenten-api/models/index.mjs +22 -0
- package/esm2022/lib/modules/documenten-api/services/documenten-api-column.service.mjs +37 -0
- package/esm2022/lib/modules/documenten-api/services/documenten-api-document.service.mjs +42 -0
- package/esm2022/lib/modules/documenten-api/services/documenten-api-link-process.service.mjs +66 -0
- package/esm2022/lib/modules/documenten-api/services/documenten-api-version.service.mjs +47 -0
- package/esm2022/lib/modules/documenten-api/services/index.mjs +20 -0
- package/esm2022/lib/modules/haalcentraal-brp/components/cases-list/cases-list.component.mjs +56 -0
- package/esm2022/lib/modules/haalcentraal-brp/components/customer-list/customer-list.component.mjs +133 -0
- package/esm2022/lib/modules/haalcentraal-brp/customer-routing.module.mjs +51 -0
- package/esm2022/lib/modules/haalcentraal-brp/customer.module.mjs +76 -0
- package/esm2022/lib/modules/haalcentraal-brp/index.mjs +19 -0
- package/esm2022/lib/modules/haalcentraal-brp/models/case.mjs +17 -0
- package/esm2022/lib/modules/haalcentraal-brp/models/customer.mjs +17 -0
- package/esm2022/lib/modules/haalcentraal-brp/models/index.mjs +18 -0
- package/esm2022/lib/modules/haalcentraal-brp/services/customer.service.mjs +43 -0
- package/esm2022/lib/modules/haalcentraal-brp/services/index.mjs +17 -0
- package/esm2022/lib/modules/index.mjs +22 -0
- package/esm2022/lib/modules/objecten-api/components/index.mjs +18 -0
- package/esm2022/lib/modules/objecten-api/components/object-type/object-type.component.mjs +122 -0
- package/esm2022/lib/modules/objecten-api/components/zaakobjecten/zaakobjecten.component.mjs +125 -0
- package/esm2022/lib/modules/objecten-api/index.mjs +19 -0
- package/esm2022/lib/modules/objecten-api/models/index.mjs +17 -0
- package/esm2022/lib/modules/objecten-api/models/zaakobjecten.model.mjs +17 -0
- package/esm2022/lib/modules/objecten-api/services/index.mjs +17 -0
- package/esm2022/lib/modules/objecten-api/services/zaakobjecten.service.mjs +44 -0
- package/esm2022/lib/modules/zaakdetails/components/document-objecten-api-sync/document-objecten-api-sync.component.mjs +127 -0
- package/esm2022/lib/modules/zaakdetails/components/index.mjs +17 -0
- package/esm2022/lib/modules/zaakdetails/index.mjs +19 -0
- package/esm2022/lib/modules/zaakdetails/models/document-objecten-api-sync.model.mjs +2 -0
- package/esm2022/lib/modules/zaakdetails/models/index.mjs +17 -0
- package/esm2022/lib/modules/zaakdetails/services/document-objecten-api-sync.service.mjs +51 -0
- package/esm2022/lib/modules/zaakdetails/services/index.mjs +17 -0
- package/esm2022/lib/modules/zaken-api/components/index.mjs +17 -0
- package/esm2022/lib/modules/zaken-api/components/zaken-api-zaaktype-link/zaken-api-zaaktype-link.component.mjs +183 -0
- package/esm2022/lib/modules/zaken-api/index.mjs +19 -0
- package/esm2022/lib/modules/zaken-api/models/index.mjs +17 -0
- package/esm2022/lib/modules/zaken-api/models/zaken-api-zaaktype-link.model.mjs +2 -0
- package/esm2022/lib/modules/zaken-api/services/index.mjs +17 -0
- package/esm2022/lib/modules/zaken-api/services/zaken-api-zaaktype-link.service.mjs +39 -0
- package/esm2022/lib/services/dossier-management-zgw.service.mjs +39 -0
- package/esm2022/lib/services/index.mjs +17 -0
- package/esm2022/lib/zgw.module.mjs +106 -0
- package/esm2022/public_api.mjs +27 -0
- package/esm2022/valtimo-zgw.mjs +5 -0
- package/fesm2022/valtimo-zgw.mjs +3577 -0
- package/fesm2022/valtimo-zgw.mjs.map +1 -0
- package/index.d.ts +6 -0
- package/lib/components/dossier-management-zgw/dossier-management-zgw.component.d.ts +13 -0
- package/lib/components/dossier-management-zgw/dossier-management-zgw.component.d.ts.map +1 -0
- package/lib/components/index.d.ts +2 -0
- package/lib/components/index.d.ts.map +1 -0
- package/lib/models/dossier-management-zgw.model.d.ts +4 -0
- package/lib/models/dossier-management-zgw.model.d.ts.map +1 -0
- package/lib/models/index.d.ts +2 -0
- package/lib/models/index.d.ts.map +1 -0
- package/lib/modules/contactmomenten/components/contact-moments/contact-moments.component.d.ts +29 -0
- package/lib/modules/contactmomenten/components/contact-moments/contact-moments.component.d.ts.map +1 -0
- package/lib/modules/contactmomenten/components/index.d.ts +2 -0
- package/lib/modules/contactmomenten/components/index.d.ts.map +1 -0
- package/lib/modules/contactmomenten/index.d.ts +4 -0
- package/lib/modules/contactmomenten/index.d.ts.map +1 -0
- package/lib/modules/contactmomenten/models/contact-moment.model.d.ts +14 -0
- package/lib/modules/contactmomenten/models/contact-moment.model.d.ts.map +1 -0
- package/lib/modules/contactmomenten/models/index.d.ts +2 -0
- package/lib/modules/contactmomenten/models/index.d.ts.map +1 -0
- package/lib/modules/contactmomenten/services/contact-moment.service.d.ts +18 -0
- package/lib/modules/contactmomenten/services/contact-moment.service.d.ts.map +1 -0
- package/lib/modules/contactmomenten/services/index.d.ts +2 -0
- package/lib/modules/contactmomenten/services/index.d.ts.map +1 -0
- package/lib/modules/documenten-api/components/documenten-api-column-modal/documenten-api-column-modal.component.d.ts +77 -0
- package/lib/modules/documenten-api/components/documenten-api-column-modal/documenten-api-column-modal.component.d.ts.map +1 -0
- package/lib/modules/documenten-api/components/documenten-api-columns/documenten-api-columns.component.d.ts +40 -0
- package/lib/modules/documenten-api/components/documenten-api-columns/documenten-api-columns.component.d.ts.map +1 -0
- package/lib/modules/documenten-api/components/documenten-api-documents/documenten-api-documents.component.d.ts +66 -0
- package/lib/modules/documenten-api/components/documenten-api-documents/documenten-api-documents.component.d.ts.map +1 -0
- package/lib/modules/documenten-api/components/documenten-api-link-upload-process/dossier-management-link-process.component.d.ts +28 -0
- package/lib/modules/documenten-api/components/documenten-api-link-upload-process/dossier-management-link-process.component.d.ts.map +1 -0
- package/lib/modules/documenten-api/components/documenten-api-metadata-modal/documenten-api-metadata-modal.component.d.ts +75 -0
- package/lib/modules/documenten-api/components/documenten-api-metadata-modal/documenten-api-metadata-modal.component.d.ts.map +1 -0
- package/lib/modules/documenten-api/components/documenten-api-version/documenten-api-version.component.d.ts +16 -0
- package/lib/modules/documenten-api/components/documenten-api-version/documenten-api-version.component.d.ts.map +1 -0
- package/lib/modules/documenten-api/components/index.d.ts +7 -0
- package/lib/modules/documenten-api/components/index.d.ts.map +1 -0
- package/lib/modules/documenten-api/formio/documenten-api-uploader/documenten-api-uploader-edit-form.d.ts +105 -0
- package/lib/modules/documenten-api/formio/documenten-api-uploader/documenten-api-uploader-edit-form.d.ts.map +1 -0
- package/lib/modules/documenten-api/formio/documenten-api-uploader/documenten-api-uploader.component.d.ts +58 -0
- package/lib/modules/documenten-api/formio/documenten-api-uploader/documenten-api-uploader.component.d.ts.map +1 -0
- package/lib/modules/documenten-api/formio/documenten-api-uploader/documenten-api-uploader.formio.d.ts +4 -0
- package/lib/modules/documenten-api/formio/documenten-api-uploader/documenten-api-uploader.formio.d.ts.map +1 -0
- package/lib/modules/documenten-api/formio/documenten-api-uploader/index.d.ts +4 -0
- package/lib/modules/documenten-api/formio/documenten-api-uploader/index.d.ts.map +1 -0
- package/lib/modules/documenten-api/formio/index.d.ts +2 -0
- package/lib/modules/documenten-api/formio/index.d.ts.map +1 -0
- package/lib/modules/documenten-api/index.d.ts +5 -0
- package/lib/modules/documenten-api/index.d.ts.map +1 -0
- package/lib/modules/documenten-api/models/configured-column.model.d.ts +6 -0
- package/lib/modules/documenten-api/models/configured-column.model.d.ts.map +1 -0
- package/lib/modules/documenten-api/models/documenten-api-column-modal.model.d.ts +4 -0
- package/lib/modules/documenten-api/models/documenten-api-column-modal.model.d.ts.map +1 -0
- package/lib/modules/documenten-api/models/documenten-api-link-process.model.d.ts +23 -0
- package/lib/modules/documenten-api/models/documenten-api-link-process.model.d.ts.map +1 -0
- package/lib/modules/documenten-api/models/documenten-api-metadata.model.d.ts +19 -0
- package/lib/modules/documenten-api/models/documenten-api-metadata.model.d.ts.map +1 -0
- package/lib/modules/documenten-api/models/documenten-api-version.model.d.ts +6 -0
- package/lib/modules/documenten-api/models/documenten-api-version.model.d.ts.map +1 -0
- package/lib/modules/documenten-api/models/documenten-api.model.d.ts +18 -0
- package/lib/modules/documenten-api/models/documenten-api.model.d.ts.map +1 -0
- package/lib/modules/documenten-api/models/index.d.ts +7 -0
- package/lib/modules/documenten-api/models/index.d.ts.map +1 -0
- package/lib/modules/documenten-api/services/documenten-api-column.service.d.ts +17 -0
- package/lib/modules/documenten-api/services/documenten-api-column.service.d.ts.map +1 -0
- package/lib/modules/documenten-api/services/documenten-api-document.service.d.ts +15 -0
- package/lib/modules/documenten-api/services/documenten-api-document.service.d.ts.map +1 -0
- package/lib/modules/documenten-api/services/documenten-api-link-process.service.d.ts +17 -0
- package/lib/modules/documenten-api/services/documenten-api-link-process.service.d.ts.map +1 -0
- package/lib/modules/documenten-api/services/documenten-api-version.service.d.ts +17 -0
- package/lib/modules/documenten-api/services/documenten-api-version.service.d.ts.map +1 -0
- package/lib/modules/documenten-api/services/index.d.ts +5 -0
- package/lib/modules/documenten-api/services/index.d.ts.map +1 -0
- package/lib/modules/haalcentraal-brp/components/cases-list/cases-list.component.d.ts +20 -0
- package/lib/modules/haalcentraal-brp/components/cases-list/cases-list.component.d.ts.map +1 -0
- package/lib/modules/haalcentraal-brp/components/customer-list/customer-list.component.d.ts +39 -0
- package/lib/modules/haalcentraal-brp/components/customer-list/customer-list.component.d.ts.map +1 -0
- package/lib/modules/haalcentraal-brp/customer-routing.module.d.ts +9 -0
- package/lib/modules/haalcentraal-brp/customer-routing.module.d.ts.map +1 -0
- package/lib/modules/haalcentraal-brp/customer.module.d.ts +17 -0
- package/lib/modules/haalcentraal-brp/customer.module.d.ts.map +1 -0
- package/lib/modules/haalcentraal-brp/index.d.ts +4 -0
- package/lib/modules/haalcentraal-brp/index.d.ts.map +1 -0
- package/lib/modules/haalcentraal-brp/models/case.d.ts +8 -0
- package/lib/modules/haalcentraal-brp/models/case.d.ts.map +1 -0
- package/lib/modules/haalcentraal-brp/models/customer.d.ts +22 -0
- package/lib/modules/haalcentraal-brp/models/customer.d.ts.map +1 -0
- package/lib/modules/haalcentraal-brp/models/index.d.ts +3 -0
- package/lib/modules/haalcentraal-brp/models/index.d.ts.map +1 -0
- package/lib/modules/haalcentraal-brp/services/customer.service.d.ts +18 -0
- package/lib/modules/haalcentraal-brp/services/customer.service.d.ts.map +1 -0
- package/lib/modules/haalcentraal-brp/services/index.d.ts +2 -0
- package/lib/modules/haalcentraal-brp/services/index.d.ts.map +1 -0
- package/lib/modules/index.d.ts +7 -0
- package/lib/modules/index.d.ts.map +1 -0
- package/lib/modules/objecten-api/components/index.d.ts +3 -0
- package/lib/modules/objecten-api/components/index.d.ts.map +1 -0
- package/lib/modules/objecten-api/components/object-type/object-type.component.d.ts +32 -0
- package/lib/modules/objecten-api/components/object-type/object-type.component.d.ts.map +1 -0
- package/lib/modules/objecten-api/components/zaakobjecten/zaakobjecten.component.d.ts +32 -0
- package/lib/modules/objecten-api/components/zaakobjecten/zaakobjecten.component.d.ts.map +1 -0
- package/lib/modules/objecten-api/index.d.ts +4 -0
- package/lib/modules/objecten-api/index.d.ts.map +1 -0
- package/lib/modules/objecten-api/models/index.d.ts +2 -0
- package/lib/modules/objecten-api/models/index.d.ts.map +1 -0
- package/lib/modules/objecten-api/models/zaakobjecten.model.d.ts +26 -0
- package/lib/modules/objecten-api/models/zaakobjecten.model.d.ts.map +1 -0
- package/lib/modules/objecten-api/services/index.d.ts +2 -0
- package/lib/modules/objecten-api/services/index.d.ts.map +1 -0
- package/lib/modules/objecten-api/services/zaakobjecten.service.d.ts +17 -0
- package/lib/modules/objecten-api/services/zaakobjecten.service.d.ts.map +1 -0
- package/lib/modules/zaakdetails/components/document-objecten-api-sync/document-objecten-api-sync.component.d.ts +39 -0
- package/lib/modules/zaakdetails/components/document-objecten-api-sync/document-objecten-api-sync.component.d.ts.map +1 -0
- package/lib/modules/zaakdetails/components/index.d.ts +2 -0
- package/lib/modules/zaakdetails/components/index.d.ts.map +1 -0
- package/lib/modules/zaakdetails/index.d.ts +4 -0
- package/lib/modules/zaakdetails/index.d.ts.map +1 -0
- package/lib/modules/zaakdetails/models/document-objecten-api-sync.model.d.ts +21 -0
- package/lib/modules/zaakdetails/models/document-objecten-api-sync.model.d.ts.map +1 -0
- package/lib/modules/zaakdetails/models/index.d.ts +2 -0
- package/lib/modules/zaakdetails/models/index.d.ts.map +1 -0
- package/lib/modules/zaakdetails/services/document-objecten-api-sync.service.d.ts +22 -0
- package/lib/modules/zaakdetails/services/document-objecten-api-sync.service.d.ts.map +1 -0
- package/lib/modules/zaakdetails/services/index.d.ts +2 -0
- package/lib/modules/zaakdetails/services/index.d.ts.map +1 -0
- package/lib/modules/zaken-api/components/index.d.ts +2 -0
- package/lib/modules/zaken-api/components/index.d.ts.map +1 -0
- package/lib/modules/zaken-api/components/zaken-api-zaaktype-link/zaken-api-zaaktype-link.component.d.ts +46 -0
- package/lib/modules/zaken-api/components/zaken-api-zaaktype-link/zaken-api-zaaktype-link.component.d.ts.map +1 -0
- package/lib/modules/zaken-api/index.d.ts +4 -0
- package/lib/modules/zaken-api/index.d.ts.map +1 -0
- package/lib/modules/zaken-api/models/index.d.ts +2 -0
- package/lib/modules/zaken-api/models/index.d.ts.map +1 -0
- package/lib/modules/zaken-api/models/zaken-api-zaaktype-link.model.d.ts +15 -0
- package/lib/modules/zaken-api/models/zaken-api-zaaktype-link.model.d.ts.map +1 -0
- package/lib/modules/zaken-api/services/index.d.ts +2 -0
- package/lib/modules/zaken-api/services/index.d.ts.map +1 -0
- package/lib/modules/zaken-api/services/zaken-api-zaaktype-link.service.d.ts +14 -0
- package/lib/modules/zaken-api/services/zaken-api-zaaktype-link.service.d.ts.map +1 -0
- package/lib/services/dossier-management-zgw.service.d.ts +12 -0
- package/lib/services/dossier-management-zgw.service.d.ts.map +1 -0
- package/lib/services/index.d.ts +2 -0
- package/lib/services/index.d.ts.map +1 -0
- package/lib/zgw.module.d.ts +17 -0
- package/lib/zgw.module.d.ts.map +1 -0
- package/package.json +29 -0
- package/public_api.d.ts +8 -0
- package/public_api.d.ts.map +1 -0
- package/valtimo-zgw.d.ts.map +1 -0
|
@@ -0,0 +1,3577 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { EventEmitter, Component, ChangeDetectionStrategy, Input, Output, Injectable, ViewChild, NgModule } from '@angular/core';
|
|
3
|
+
import * as i2 from 'carbon-components-angular';
|
|
4
|
+
import { ModalModule, TagModule, InputModule, ButtonModule, DropdownModule, ToggleModule, IconModule, ComboBoxModule, LoadingModule, NotificationModule, CheckboxModule, TabsModule } from 'carbon-components-angular';
|
|
5
|
+
import * as i3$1 from '@ngx-translate/core';
|
|
6
|
+
import { TranslateModule } from '@ngx-translate/core';
|
|
7
|
+
import * as i4 from '@angular/common';
|
|
8
|
+
import { CommonModule } from '@angular/common';
|
|
9
|
+
import { BehaviorSubject, map, combineLatest, tap, Subscription, take, switchMap, of, filter, Subject, from, startWith } from 'rxjs';
|
|
10
|
+
import * as i3$2 from '@valtimo/components';
|
|
11
|
+
import { CARBON_CONSTANTS, PendingChangesComponent, MoveRowDirection, ViewType, CarbonListModule, ConfirmationModalModule, VModalModule, TitleModule, ButtonModule as ButtonModule$1, FormModule, InputModule as InputModule$1, SelectModule, DatePickerModule, InputLabelModule, ParagraphModule, createCustomFormioComponent, registerCustomFormioComponentWithClass, TableModule, FormIoModule, TimelineItemImpl, ModalModule as ModalModule$1, SpinnerModule, TimelineModule, WidgetModule, ListModule, FilterSidebarModule, PageModule, ValtimoCdsModalDirectiveModule, DropzoneModule, FileSizeModule } from '@valtimo/components';
|
|
12
|
+
import * as i5 from '@angular/forms';
|
|
13
|
+
import { Validators, ReactiveFormsModule, FormsModule, FormGroup, FormControl } from '@angular/forms';
|
|
14
|
+
import * as i3 from '@valtimo/document';
|
|
15
|
+
import { InternalCaseStatusColor, InternalCaseStatusUtils, DocumentModule } from '@valtimo/document';
|
|
16
|
+
import { Edit16, Filter16, TagGroup16, Upload16 } from '@carbon/icons';
|
|
17
|
+
import * as i1$1 from '@angular/router';
|
|
18
|
+
import { RouterModule } from '@angular/router';
|
|
19
|
+
import * as i2$1 from '@valtimo/config';
|
|
20
|
+
import { BaseApiService, UploadProvider, ROLE_USER, ZGW_OBJECT_TYPE_COMPONENT_TOKEN, ZGW_DOCUMENTEN_API_DOCUMENTS_COMPONENT_TOKEN, ZGW_CASE_CONFIGURATION_EXTENSIONS_TOKEN } from '@valtimo/config';
|
|
21
|
+
import * as i1 from '@angular/common/http';
|
|
22
|
+
import { tap as tap$1, map as map$1, filter as filter$1, switchMap as switchMap$1, catchError, take as take$1, debounceTime } from 'rxjs/operators';
|
|
23
|
+
import * as i5$1 from 'keycloak-angular';
|
|
24
|
+
import moment from 'moment';
|
|
25
|
+
import * as i2$2 from '@valtimo/resource';
|
|
26
|
+
import { ResourceModule } from '@valtimo/resource';
|
|
27
|
+
import * as i5$2 from '@valtimo/security';
|
|
28
|
+
import { AuthGuardService } from '@valtimo/security';
|
|
29
|
+
import * as i4$1 from 'ngx-toastr';
|
|
30
|
+
import { FormioModule } from '@formio/angular';
|
|
31
|
+
|
|
32
|
+
/*
|
|
33
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
34
|
+
*
|
|
35
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
36
|
+
* you may not use this file except in compliance with the License.
|
|
37
|
+
* You may obtain a copy of the License at
|
|
38
|
+
*
|
|
39
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
40
|
+
*
|
|
41
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
42
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
43
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
44
|
+
* See the License for the specific language governing permissions and
|
|
45
|
+
* limitations under the License.
|
|
46
|
+
*/
|
|
47
|
+
var ZgwTabEnum;
|
|
48
|
+
(function (ZgwTabEnum) {
|
|
49
|
+
ZgwTabEnum[ZgwTabEnum["DOCUMENTEN_API_COLUMNS"] = 0] = "DOCUMENTEN_API_COLUMNS";
|
|
50
|
+
})(ZgwTabEnum || (ZgwTabEnum = {}));
|
|
51
|
+
|
|
52
|
+
/*
|
|
53
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
54
|
+
*
|
|
55
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
56
|
+
* you may not use this file except in compliance with the License.
|
|
57
|
+
* You may obtain a copy of the License at
|
|
58
|
+
*
|
|
59
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
60
|
+
*
|
|
61
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
62
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
63
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
64
|
+
* See the License for the specific language governing permissions and
|
|
65
|
+
* limitations under the License.
|
|
66
|
+
*/
|
|
67
|
+
|
|
68
|
+
/*
|
|
69
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
70
|
+
*
|
|
71
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
72
|
+
* you may not use this file except in compliance with the License.
|
|
73
|
+
* You may obtain a copy of the License at
|
|
74
|
+
*
|
|
75
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
76
|
+
*
|
|
77
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
78
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
79
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
80
|
+
* See the License for the specific language governing permissions and
|
|
81
|
+
* limitations under the License.
|
|
82
|
+
*/
|
|
83
|
+
class DocumentenApiColumnModalComponent {
|
|
84
|
+
set type(value) {
|
|
85
|
+
this._type.next(value);
|
|
86
|
+
if (value === 'closed') {
|
|
87
|
+
setTimeout(() => {
|
|
88
|
+
this._typeAnimationDelay$.next(value);
|
|
89
|
+
}, CARBON_CONSTANTS.modalAnimationMs);
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
this._typeAnimationDelay$.next(value);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
set prefill(value) {
|
|
96
|
+
this._prefillStatus.next(value);
|
|
97
|
+
}
|
|
98
|
+
get visibleInCaseListByDefault() {
|
|
99
|
+
return this.statusFormGroup?.get('visibleInCaseListByDefault');
|
|
100
|
+
}
|
|
101
|
+
get key() {
|
|
102
|
+
return this.statusFormGroup?.get('key');
|
|
103
|
+
}
|
|
104
|
+
get title() {
|
|
105
|
+
return this.statusFormGroup?.get('title');
|
|
106
|
+
}
|
|
107
|
+
get color() {
|
|
108
|
+
return this.statusFormGroup?.get('color');
|
|
109
|
+
}
|
|
110
|
+
get invalid() {
|
|
111
|
+
return !!this.statusFormGroup?.invalid;
|
|
112
|
+
}
|
|
113
|
+
get pristine() {
|
|
114
|
+
return !!this.statusFormGroup?.pristine;
|
|
115
|
+
}
|
|
116
|
+
constructor(fb, iconService, caseStatusService, translateService) {
|
|
117
|
+
this.fb = fb;
|
|
118
|
+
this.iconService = iconService;
|
|
119
|
+
this.caseStatusService = caseStatusService;
|
|
120
|
+
this.translateService = translateService;
|
|
121
|
+
this.closeModalEvent = new EventEmitter();
|
|
122
|
+
this._type = new BehaviorSubject(undefined);
|
|
123
|
+
this._typeAnimationDelay$ = new BehaviorSubject(undefined);
|
|
124
|
+
this._prefillStatus = new BehaviorSubject(undefined);
|
|
125
|
+
this.isClosed$ = this._type.pipe(map(type => type === 'closed'));
|
|
126
|
+
this.statusFormGroup = this.fb.group({
|
|
127
|
+
title: this.fb.control('', Validators.required),
|
|
128
|
+
key: this.fb.control('', [Validators.required, this.uniqueKeyValidator()]),
|
|
129
|
+
visibleInCaseListByDefault: this.fb.control(true, Validators.required),
|
|
130
|
+
color: this.fb.control('', Validators.required),
|
|
131
|
+
});
|
|
132
|
+
this.isEdit$ = combineLatest([this._typeAnimationDelay$, this._prefillStatus]).pipe(tap(([type, prefillStatus]) => {
|
|
133
|
+
if (type === 'edit' && prefillStatus)
|
|
134
|
+
this.prefillForm(prefillStatus);
|
|
135
|
+
}), map(([type]) => type === 'edit'));
|
|
136
|
+
this.isAdd$ = this._typeAnimationDelay$.pipe(map(type => type === 'add'), tap(isAdd => {
|
|
137
|
+
if (isAdd)
|
|
138
|
+
this.resetForm();
|
|
139
|
+
}));
|
|
140
|
+
this.disabled$ = new BehaviorSubject(false);
|
|
141
|
+
this.COLORS = [
|
|
142
|
+
InternalCaseStatusColor.Red,
|
|
143
|
+
InternalCaseStatusColor.Magenta,
|
|
144
|
+
InternalCaseStatusColor.Purple,
|
|
145
|
+
InternalCaseStatusColor.Blue,
|
|
146
|
+
InternalCaseStatusColor.Teal,
|
|
147
|
+
InternalCaseStatusColor.Green,
|
|
148
|
+
InternalCaseStatusColor.Cyan,
|
|
149
|
+
InternalCaseStatusColor.Gray,
|
|
150
|
+
InternalCaseStatusColor.CoolGray,
|
|
151
|
+
InternalCaseStatusColor.WarmGray,
|
|
152
|
+
InternalCaseStatusColor.HighContrast,
|
|
153
|
+
InternalCaseStatusColor.Outline,
|
|
154
|
+
];
|
|
155
|
+
this._selectedColor$ = new BehaviorSubject(undefined);
|
|
156
|
+
this.colorListItems$ = combineLatest([
|
|
157
|
+
this._selectedColor$,
|
|
158
|
+
this.translateService.stream('key'),
|
|
159
|
+
]).pipe(map(([selectedColor]) => this.COLORS.map(color => ({
|
|
160
|
+
selected: color === selectedColor,
|
|
161
|
+
content: this.translateService.instant('interface.tagType.' +
|
|
162
|
+
InternalCaseStatusUtils.getTagTypeFromInternalCaseStatusColor(color)),
|
|
163
|
+
color,
|
|
164
|
+
tagType: InternalCaseStatusUtils.getTagTypeFromInternalCaseStatusColor(color),
|
|
165
|
+
}))));
|
|
166
|
+
this._editingKey$ = new BehaviorSubject(false);
|
|
167
|
+
this.editingKey$ = this._editingKey$.pipe(tap(editing => {
|
|
168
|
+
if (editing) {
|
|
169
|
+
this.key?.enable();
|
|
170
|
+
}
|
|
171
|
+
else {
|
|
172
|
+
this.key?.disable();
|
|
173
|
+
}
|
|
174
|
+
}));
|
|
175
|
+
this._originalStatusKey$ = new BehaviorSubject('');
|
|
176
|
+
this._subscriptions = new Subscription();
|
|
177
|
+
this.iconService.registerAll([Edit16]);
|
|
178
|
+
}
|
|
179
|
+
ngOnInit() {
|
|
180
|
+
this.openAutoKeySubscription();
|
|
181
|
+
}
|
|
182
|
+
ngOnDestroy() {
|
|
183
|
+
this._subscriptions.unsubscribe();
|
|
184
|
+
}
|
|
185
|
+
onClose() {
|
|
186
|
+
this.close();
|
|
187
|
+
}
|
|
188
|
+
toggleCheckedChange(checked) {
|
|
189
|
+
this.statusFormGroup.patchValue({
|
|
190
|
+
visibleInCaseListByDefault: checked,
|
|
191
|
+
});
|
|
192
|
+
this.statusFormGroup.markAsDirty();
|
|
193
|
+
}
|
|
194
|
+
addStatus() {
|
|
195
|
+
this.disable();
|
|
196
|
+
this.caseStatusService
|
|
197
|
+
.saveInternalCaseStatus(this.documentDefinitionName, this.getFormValue())
|
|
198
|
+
.subscribe({
|
|
199
|
+
next: () => {
|
|
200
|
+
this.enable();
|
|
201
|
+
this.closeAndRefresh();
|
|
202
|
+
},
|
|
203
|
+
error: () => {
|
|
204
|
+
this.enable(false);
|
|
205
|
+
},
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
editStatus() {
|
|
209
|
+
this.disable();
|
|
210
|
+
this._originalStatusKey$
|
|
211
|
+
.pipe(take(1), switchMap(originalStatusKey => this.caseStatusService.updateInternalCaseStatus(this.documentDefinitionName, originalStatusKey, this.getFormValue())))
|
|
212
|
+
.subscribe({
|
|
213
|
+
next: () => {
|
|
214
|
+
this.enable();
|
|
215
|
+
this.closeAndRefresh();
|
|
216
|
+
},
|
|
217
|
+
error: () => {
|
|
218
|
+
this.enable(false);
|
|
219
|
+
},
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
editKeyButtonClick() {
|
|
223
|
+
this._editingKey$.next(true);
|
|
224
|
+
}
|
|
225
|
+
colorDropdownChange(event) {
|
|
226
|
+
const newColor = event?.item?.color;
|
|
227
|
+
if (newColor) {
|
|
228
|
+
this._selectedColor$.next(newColor);
|
|
229
|
+
this.statusFormGroup.patchValue({ color: newColor });
|
|
230
|
+
this.statusFormGroup.markAsDirty();
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
prefillForm(prefillStatus) {
|
|
234
|
+
this._originalStatusKey$.next(prefillStatus.key);
|
|
235
|
+
this.statusFormGroup.patchValue({
|
|
236
|
+
key: prefillStatus.key,
|
|
237
|
+
title: prefillStatus.title,
|
|
238
|
+
visibleInCaseListByDefault: prefillStatus.visibleInCaseListByDefault,
|
|
239
|
+
color: prefillStatus.color,
|
|
240
|
+
});
|
|
241
|
+
this._selectedColor$.next(prefillStatus.color);
|
|
242
|
+
this.statusFormGroup.markAsPristine();
|
|
243
|
+
this.resetEditingKey();
|
|
244
|
+
}
|
|
245
|
+
resetForm() {
|
|
246
|
+
this.statusFormGroup.patchValue({
|
|
247
|
+
key: '',
|
|
248
|
+
title: '',
|
|
249
|
+
visibleInCaseListByDefault: true,
|
|
250
|
+
color: InternalCaseStatusColor.Blue,
|
|
251
|
+
});
|
|
252
|
+
this._selectedColor$.next(InternalCaseStatusColor.Blue);
|
|
253
|
+
this.statusFormGroup.markAsPristine();
|
|
254
|
+
this.resetEditingKey();
|
|
255
|
+
}
|
|
256
|
+
resetEditingKey() {
|
|
257
|
+
this._editingKey$.next(false);
|
|
258
|
+
}
|
|
259
|
+
openAutoKeySubscription() {
|
|
260
|
+
this._subscriptions.add(combineLatest([this.isAdd$, this.title.valueChanges, this.editingKey$]).subscribe(([isAdd, titleValue, editingKey]) => {
|
|
261
|
+
if (isAdd && !editingKey) {
|
|
262
|
+
if (titleValue) {
|
|
263
|
+
this.statusFormGroup.patchValue({ key: this.getUniqueKey(titleValue) });
|
|
264
|
+
}
|
|
265
|
+
else {
|
|
266
|
+
this.clearKey();
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}));
|
|
270
|
+
}
|
|
271
|
+
getUniqueKey(title) {
|
|
272
|
+
const dashCaseKey = `${title}`
|
|
273
|
+
.toLowerCase()
|
|
274
|
+
.replace(/[^a-z0-9-_]+|-[^a-z0-9]+/g, '-')
|
|
275
|
+
.replace(/_[-_]+/g, '_')
|
|
276
|
+
.replace(/^[^a-z]+/g, '');
|
|
277
|
+
const usedKeys = this.usedKeys;
|
|
278
|
+
if (!usedKeys.includes(dashCaseKey)) {
|
|
279
|
+
return dashCaseKey;
|
|
280
|
+
}
|
|
281
|
+
return this.getUniqueKeyWithNumber(dashCaseKey, usedKeys);
|
|
282
|
+
}
|
|
283
|
+
getUniqueKeyWithNumber(dashCaseKey, usedKeys) {
|
|
284
|
+
const numbersFromCurrentKey = (dashCaseKey.match(/^\d+|\d+\b|\d+(?=\w)/g) || []).map((numberValue) => +numberValue);
|
|
285
|
+
const lastNumberFromCurrentKey = numbersFromCurrentKey.length > 0 && numbersFromCurrentKey[numbersFromCurrentKey.length - 1];
|
|
286
|
+
const newKey = lastNumberFromCurrentKey
|
|
287
|
+
? `${dashCaseKey.replace(`${lastNumberFromCurrentKey}`, `${lastNumberFromCurrentKey + 1}`)}`
|
|
288
|
+
: `${dashCaseKey}-1`;
|
|
289
|
+
if (usedKeys.includes(newKey)) {
|
|
290
|
+
return this.getUniqueKeyWithNumber(newKey, usedKeys);
|
|
291
|
+
}
|
|
292
|
+
return newKey;
|
|
293
|
+
}
|
|
294
|
+
clearKey() {
|
|
295
|
+
this.statusFormGroup.patchValue({ key: '' });
|
|
296
|
+
}
|
|
297
|
+
uniqueKeyValidator() {
|
|
298
|
+
return (control) => this.usedKeys?.every((key) => key !== control.value)
|
|
299
|
+
? null
|
|
300
|
+
: { uniqueKey: { value: control.value } };
|
|
301
|
+
}
|
|
302
|
+
disable() {
|
|
303
|
+
this.disabled$.next(true);
|
|
304
|
+
this.statusFormGroup.disable();
|
|
305
|
+
}
|
|
306
|
+
enable(delay = true) {
|
|
307
|
+
setTimeout(() => {
|
|
308
|
+
this.disabled$.next(false);
|
|
309
|
+
this.statusFormGroup.enable();
|
|
310
|
+
}, delay ? CARBON_CONSTANTS.modalAnimationMs : 0);
|
|
311
|
+
}
|
|
312
|
+
close() {
|
|
313
|
+
this.closeModalEvent.emit('close');
|
|
314
|
+
}
|
|
315
|
+
closeAndRefresh() {
|
|
316
|
+
this.closeModalEvent.emit('closeAndRefresh');
|
|
317
|
+
}
|
|
318
|
+
getFormValue() {
|
|
319
|
+
return {
|
|
320
|
+
key: this.key.value,
|
|
321
|
+
title: this.title.value,
|
|
322
|
+
visibleInCaseListByDefault: this.visibleInCaseListByDefault.value,
|
|
323
|
+
color: this.color.value,
|
|
324
|
+
};
|
|
325
|
+
}
|
|
326
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: DocumentenApiColumnModalComponent, deps: [{ token: i5.FormBuilder }, { token: i2.IconService }, { token: i3.CaseStatusService }, { token: i3$1.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
327
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: DocumentenApiColumnModalComponent, isStandalone: true, selector: "valtimo-documenten-api-column-modal", inputs: { type: "type", prefill: "prefill", usedKeys: "usedKeys", documentDefinitionName: "documentDefinitionName" }, outputs: { closeModalEvent: "closeModalEvent" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<cds-modal\n valtimoCdsModal\n *ngIf=\"{\n isAdd: isAdd$ | async,\n isEdit: isEdit$ | async,\n isClosed: isClosed$ | async,\n editingKey: editingKey$ | async,\n disabled: disabled$ | async\n } as obs\"\n [open]=\"!obs.isClosed\"\n size=\"sm\"\n>\n <cds-modal-header showCloseButton=\"true\" (closeSelect)=\"onClose()\">\n <h3 cdsModalHeaderHeading>\n {{ obs.isAdd ? ('dossierManagement.statuses.add' | translate) : '' }}\n {{ obs.isEdit ? ('dossierManagement.statuses.edit' | translate) : '' }}\n </h3>\n </cds-modal-header>\n\n <section cdsModalContent>\n <ng-container *ngTemplateOutlet=\"statusForm; context: {obs: obs}\"></ng-container>\n </section>\n\n <cds-modal-footer>\n <ng-container *ngTemplateOutlet=\"buttons; context: {obs: obs}\"></ng-container>\n </cds-modal-footer>\n</cds-modal>\n\n<ng-template #colorDropdownItemTemplate let-item=\"item\">\n <div class=\"dropdown-color-tag\">\n <cds-tag *ngIf=\"item && item.content\" class=\"cds-tag--no-margin\" [type]=\"item?.tagType\">\n {{ 'interface.tagType.' + item?.tagType | translate }}\n </cds-tag>\n </div>\n</ng-template>\n\n<ng-template #statusForm let-obs=\"obs\">\n <form [formGroup]=\"statusFormGroup\" class=\"status-form\">\n <cds-label>\n {{ 'dossierManagement.statuses.columns.title' | translate }}\n\n <input cdsText formControlName=\"title\" [attr.modal-primary-focus]=\"true\" />\n </cds-label>\n\n <cds-label>\n {{ 'dossierManagement.statuses.columns.key' | translate }}\n\n <div class=\"edit-key-input\">\n <input\n cdsText\n formControlName=\"key\"\n [disabled]=\"!obs.editingKey\"\n [placeholder]=\"\n obs.isAdd && !obs.editingKey\n ? ('dossierManagement.statuses.keyAutoGenerated' | translate)\n : ''\n \"\n />\n\n <cds-icon-button\n *ngIf=\"!obs.editingKey && obs.isAdd\"\n [disabled]=\"obs.disabled\"\n (click)=\"editKeyButtonClick()\"\n kind=\"secondary\"\n >\n <svg class=\"cds--btn__icon\" cdsIcon=\"edit\" size=\"16\"></svg>\n </cds-icon-button>\n </div>\n </cds-label>\n\n <div class=\"horizontal-inputs\">\n <cds-label>\n {{ 'dossierManagement.statuses.columns.color' | translate }}\n\n <cds-dropdown\n [appendInline]=\"false\"\n [placeholder]=\"'dossierManagement.statuses.colorPlaceholder' | translate\"\n (selected)=\"colorDropdownChange($event)\"\n >\n <cds-dropdown-list [items]=\"colorListItems$\" [listTpl]=\"colorDropdownItemTemplate\">\n </cds-dropdown-list>\n </cds-dropdown>\n </cds-label>\n\n <cds-toggle\n [label]=\"'dossierManagement.statuses.visibleTitle' | translate\"\n [onText]=\"'dossierManagement.statuses.visible' | translate\"\n [offText]=\"'dossierManagement.statuses.invisible' | translate\"\n [disabled]=\"obs.disabled\"\n [checked]=\"visibleInCaseListByDefault?.value\"\n (checkedChange)=\"toggleCheckedChange($event)\"\n ></cds-toggle>\n </div>\n </form>\n</ng-template>\n\n<ng-template #buttons let-obs=\"obs\">\n <button cdsButton=\"secondary\" (click)=\"onClose()\" [disabled]=\"obs.disabled\">\n {{ 'interface.cancel' | translate }}\n </button>\n\n <button\n *ngIf=\"obs.isAdd\"\n cdsButton=\"primary\"\n [disabled]=\"invalid || pristine || obs.disabled\"\n (click)=\"addStatus()\"\n >\n {{ 'interface.add' | translate }}\n </button>\n\n <button\n *ngIf=\"obs.isEdit\"\n cdsButton=\"primary\"\n [disabled]=\"invalid || pristine || obs.disabled\"\n (click)=\"editStatus()\"\n >\n {{ 'interface.save' | translate }}\n </button>\n</ng-template>\n", styles: [".status-form{display:flex;flex-direction:column;gap:16px}.edit-key-input{height:40px;display:flex;width:100%;flex-direction:row;gap:16px;align-items:flex-end}::ng-deep .horizontal-inputs{display:grid;gap:16px;grid-template-columns:repeat(2,1fr)}::ng-deep .horizontal-inputs .cds--label{width:100%;display:flex;flex-direction:column;gap:8px}::ng-deep .dropdown-color-tag .cds--tag{margin-top:-4px;margin-left:2px}\n/*!\n * Copyright 2015-2024 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: ModalModule }, { kind: "component", type: i2.Modal, selector: "cds-modal, ibm-modal", inputs: ["size", "theme", "ariaLabel", "open", "trigger", "hasScrollingContent"], outputs: ["overlaySelected", "close"] }, { kind: "component", type: i2.ModalHeader, selector: "cds-modal-header, ibm-modal-header", inputs: ["theme", "closeLabel", "showCloseButton"], outputs: ["closeSelect"] }, { kind: "component", type: i2.ModalFooter, selector: "cds-modal-footer, ibm-modal-footer" }, { kind: "directive", type: i2.ModalContent, selector: "[cdsModalContent], [ibmModalContent]", inputs: ["hasForm"] }, { kind: "directive", type: i2.ModalHeaderHeading, selector: "[cdsModalHeaderHeading], [ibmModalHeaderHeading]" }, { kind: "ngmodule", type: TagModule }, { kind: "component", type: i2.Tag, selector: "cds-tag, ibm-tag", inputs: ["type", "size", "class"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: InputModule }, { kind: "component", type: i2.Label, selector: "cds-label, ibm-label", inputs: ["labelInputID", "disabled", "skeleton", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel"] }, { kind: "directive", type: i2.TextInput, selector: "[cdsText], [ibmText]", inputs: ["theme", "size", "invalid", "warn", "skeleton"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i5.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i2.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "component", type: i2.IconButton, selector: "cds-icon-button, ibm-icon-button", inputs: ["buttonNgClass", "buttonAttributes", "buttonId", "kind", "size", "type", "isExpressive", "disabled", "description"], outputs: ["click", "focus", "blur", "tooltipClick"] }, { kind: "ngmodule", type: DropdownModule }, { kind: "component", type: i2.Dropdown, selector: "cds-dropdown, ibm-dropdown", inputs: ["id", "label", "helperText", "placeholder", "displayValue", "clearText", "size", "type", "theme", "disabled", "skeleton", "inline", "disableArrowKeys", "invalid", "invalidText", "warn", "warnText", "appendInline", "scrollableContainer", "itemValueKey", "selectionFeedback", "menuButtonLabel", "selectedLabel", "dropUp"], outputs: ["selected", "onClose", "close"] }, { kind: "component", type: i2.DropdownList, selector: "cds-dropdown-list, ibm-dropdown-list", inputs: ["ariaLabel", "items", "listTpl", "type", "showTitles"], outputs: ["select", "scroll", "blurIntent"] }, { kind: "ngmodule", type: ToggleModule }, { kind: "component", type: i2.Toggle, selector: "cds-toggle, ibm-toggle", inputs: ["offText", "onText", "label", "size", "hideLabel", "skeleton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
328
|
+
}
|
|
329
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: DocumentenApiColumnModalComponent, decorators: [{
|
|
330
|
+
type: Component,
|
|
331
|
+
args: [{ selector: 'valtimo-documenten-api-column-modal', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
332
|
+
CommonModule,
|
|
333
|
+
ModalModule,
|
|
334
|
+
TagModule,
|
|
335
|
+
TranslateModule,
|
|
336
|
+
InputModule,
|
|
337
|
+
ReactiveFormsModule,
|
|
338
|
+
ButtonModule,
|
|
339
|
+
DropdownModule,
|
|
340
|
+
ToggleModule,
|
|
341
|
+
], template: "<!--\n ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<cds-modal\n valtimoCdsModal\n *ngIf=\"{\n isAdd: isAdd$ | async,\n isEdit: isEdit$ | async,\n isClosed: isClosed$ | async,\n editingKey: editingKey$ | async,\n disabled: disabled$ | async\n } as obs\"\n [open]=\"!obs.isClosed\"\n size=\"sm\"\n>\n <cds-modal-header showCloseButton=\"true\" (closeSelect)=\"onClose()\">\n <h3 cdsModalHeaderHeading>\n {{ obs.isAdd ? ('dossierManagement.statuses.add' | translate) : '' }}\n {{ obs.isEdit ? ('dossierManagement.statuses.edit' | translate) : '' }}\n </h3>\n </cds-modal-header>\n\n <section cdsModalContent>\n <ng-container *ngTemplateOutlet=\"statusForm; context: {obs: obs}\"></ng-container>\n </section>\n\n <cds-modal-footer>\n <ng-container *ngTemplateOutlet=\"buttons; context: {obs: obs}\"></ng-container>\n </cds-modal-footer>\n</cds-modal>\n\n<ng-template #colorDropdownItemTemplate let-item=\"item\">\n <div class=\"dropdown-color-tag\">\n <cds-tag *ngIf=\"item && item.content\" class=\"cds-tag--no-margin\" [type]=\"item?.tagType\">\n {{ 'interface.tagType.' + item?.tagType | translate }}\n </cds-tag>\n </div>\n</ng-template>\n\n<ng-template #statusForm let-obs=\"obs\">\n <form [formGroup]=\"statusFormGroup\" class=\"status-form\">\n <cds-label>\n {{ 'dossierManagement.statuses.columns.title' | translate }}\n\n <input cdsText formControlName=\"title\" [attr.modal-primary-focus]=\"true\" />\n </cds-label>\n\n <cds-label>\n {{ 'dossierManagement.statuses.columns.key' | translate }}\n\n <div class=\"edit-key-input\">\n <input\n cdsText\n formControlName=\"key\"\n [disabled]=\"!obs.editingKey\"\n [placeholder]=\"\n obs.isAdd && !obs.editingKey\n ? ('dossierManagement.statuses.keyAutoGenerated' | translate)\n : ''\n \"\n />\n\n <cds-icon-button\n *ngIf=\"!obs.editingKey && obs.isAdd\"\n [disabled]=\"obs.disabled\"\n (click)=\"editKeyButtonClick()\"\n kind=\"secondary\"\n >\n <svg class=\"cds--btn__icon\" cdsIcon=\"edit\" size=\"16\"></svg>\n </cds-icon-button>\n </div>\n </cds-label>\n\n <div class=\"horizontal-inputs\">\n <cds-label>\n {{ 'dossierManagement.statuses.columns.color' | translate }}\n\n <cds-dropdown\n [appendInline]=\"false\"\n [placeholder]=\"'dossierManagement.statuses.colorPlaceholder' | translate\"\n (selected)=\"colorDropdownChange($event)\"\n >\n <cds-dropdown-list [items]=\"colorListItems$\" [listTpl]=\"colorDropdownItemTemplate\">\n </cds-dropdown-list>\n </cds-dropdown>\n </cds-label>\n\n <cds-toggle\n [label]=\"'dossierManagement.statuses.visibleTitle' | translate\"\n [onText]=\"'dossierManagement.statuses.visible' | translate\"\n [offText]=\"'dossierManagement.statuses.invisible' | translate\"\n [disabled]=\"obs.disabled\"\n [checked]=\"visibleInCaseListByDefault?.value\"\n (checkedChange)=\"toggleCheckedChange($event)\"\n ></cds-toggle>\n </div>\n </form>\n</ng-template>\n\n<ng-template #buttons let-obs=\"obs\">\n <button cdsButton=\"secondary\" (click)=\"onClose()\" [disabled]=\"obs.disabled\">\n {{ 'interface.cancel' | translate }}\n </button>\n\n <button\n *ngIf=\"obs.isAdd\"\n cdsButton=\"primary\"\n [disabled]=\"invalid || pristine || obs.disabled\"\n (click)=\"addStatus()\"\n >\n {{ 'interface.add' | translate }}\n </button>\n\n <button\n *ngIf=\"obs.isEdit\"\n cdsButton=\"primary\"\n [disabled]=\"invalid || pristine || obs.disabled\"\n (click)=\"editStatus()\"\n >\n {{ 'interface.save' | translate }}\n </button>\n</ng-template>\n", styles: [".status-form{display:flex;flex-direction:column;gap:16px}.edit-key-input{height:40px;display:flex;width:100%;flex-direction:row;gap:16px;align-items:flex-end}::ng-deep .horizontal-inputs{display:grid;gap:16px;grid-template-columns:repeat(2,1fr)}::ng-deep .horizontal-inputs .cds--label{width:100%;display:flex;flex-direction:column;gap:8px}::ng-deep .dropdown-color-tag .cds--tag{margin-top:-4px;margin-left:2px}\n/*!\n * Copyright 2015-2024 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"] }]
|
|
342
|
+
}], ctorParameters: () => [{ type: i5.FormBuilder }, { type: i2.IconService }, { type: i3.CaseStatusService }, { type: i3$1.TranslateService }], propDecorators: { type: [{
|
|
343
|
+
type: Input
|
|
344
|
+
}], prefill: [{
|
|
345
|
+
type: Input
|
|
346
|
+
}], usedKeys: [{
|
|
347
|
+
type: Input
|
|
348
|
+
}], documentDefinitionName: [{
|
|
349
|
+
type: Input
|
|
350
|
+
}], closeModalEvent: [{
|
|
351
|
+
type: Output
|
|
352
|
+
}] } });
|
|
353
|
+
|
|
354
|
+
class DocumentenApiColumnService extends BaseApiService {
|
|
355
|
+
constructor(http, configService) {
|
|
356
|
+
super(http, configService);
|
|
357
|
+
this.http = http;
|
|
358
|
+
}
|
|
359
|
+
getConfiguredColumns(caseDefinitionName) {
|
|
360
|
+
return this.http.get(this.getApiUrl(`/management/v1/case-definition/${caseDefinitionName}/zgw-document-column`));
|
|
361
|
+
}
|
|
362
|
+
updateColumnOrder(caseDefinitionName, columns) {
|
|
363
|
+
return this.http.put(this.getApiUrl(`/management/v1/case-definition/${caseDefinitionName}/zgw-document-column`), columns);
|
|
364
|
+
}
|
|
365
|
+
updateColumn(caseDefinitionName, column) {
|
|
366
|
+
delete column.key;
|
|
367
|
+
return this.http.put(this.getApiUrl(`/management/v1/case-definition/${caseDefinitionName}/zgw-document-column/${column.key}`), column);
|
|
368
|
+
}
|
|
369
|
+
deleteConfiguredColumn(caseDefinitionKey, statusKey) {
|
|
370
|
+
return of(null);
|
|
371
|
+
}
|
|
372
|
+
updateConfiguredColumns(caseDefinitionKey, orderColumns) {
|
|
373
|
+
return of(null);
|
|
374
|
+
}
|
|
375
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: DocumentenApiColumnService, deps: [{ token: i1.HttpClient }, { token: i2$1.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
376
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: DocumentenApiColumnService, providedIn: 'root' }); }
|
|
377
|
+
}
|
|
378
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: DocumentenApiColumnService, decorators: [{
|
|
379
|
+
type: Injectable,
|
|
380
|
+
args: [{
|
|
381
|
+
providedIn: 'root',
|
|
382
|
+
}]
|
|
383
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2$1.ConfigService }] });
|
|
384
|
+
|
|
385
|
+
/*
|
|
386
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
387
|
+
*
|
|
388
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
389
|
+
* you may not use this file except in compliance with the License.
|
|
390
|
+
* You may obtain a copy of the License at
|
|
391
|
+
*
|
|
392
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
393
|
+
*
|
|
394
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
395
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
396
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
397
|
+
* See the License for the specific language governing permissions and
|
|
398
|
+
* limitations under the License.
|
|
399
|
+
*/
|
|
400
|
+
/*
|
|
401
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
402
|
+
*
|
|
403
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
404
|
+
* you may not use this file except in compliance with the License.
|
|
405
|
+
* You may obtain a copy of the License at
|
|
406
|
+
*
|
|
407
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
408
|
+
*
|
|
409
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
410
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
411
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
412
|
+
* See the License for the specific language governing permissions and
|
|
413
|
+
* limitations under the License.
|
|
414
|
+
*/
|
|
415
|
+
class DocumentenApiLinkProcessService extends BaseApiService {
|
|
416
|
+
constructor(httpClient, configService) {
|
|
417
|
+
super(httpClient, configService);
|
|
418
|
+
this.httpClient = httpClient;
|
|
419
|
+
this.configService = configService;
|
|
420
|
+
}
|
|
421
|
+
getProcessDefinitions() {
|
|
422
|
+
return this.httpClient.get(this.getApiUrl('/v1/process/definition'));
|
|
423
|
+
}
|
|
424
|
+
getLinkedUploadProcess(documentDefinitionName) {
|
|
425
|
+
return this.httpClient.get(this.getApiUrl(`/v1/process-document/demo/${documentDefinitionName}/process`));
|
|
426
|
+
}
|
|
427
|
+
updateLinkedUploadProcess(documentDefinitionName, processDefinitionKey) {
|
|
428
|
+
return this.httpClient.put(this.getApiUrl(`/v1/process-document/demo/${documentDefinitionName}/process`), {
|
|
429
|
+
processDefinitionKey,
|
|
430
|
+
linkType: 'DOCUMENT_UPLOAD',
|
|
431
|
+
});
|
|
432
|
+
}
|
|
433
|
+
deleteLinkedUploadProcess(documentDefinitionName) {
|
|
434
|
+
return this.httpClient.delete(this.getApiUrl(`/v1/process-document/demo/${documentDefinitionName}/process`));
|
|
435
|
+
}
|
|
436
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: DocumentenApiLinkProcessService, deps: [{ token: i1.HttpClient }, { token: i2$1.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
437
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: DocumentenApiLinkProcessService, providedIn: 'root' }); }
|
|
438
|
+
}
|
|
439
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: DocumentenApiLinkProcessService, decorators: [{
|
|
440
|
+
type: Injectable,
|
|
441
|
+
args: [{
|
|
442
|
+
providedIn: 'root',
|
|
443
|
+
}]
|
|
444
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2$1.ConfigService }] });
|
|
445
|
+
|
|
446
|
+
/*
|
|
447
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
448
|
+
*
|
|
449
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
450
|
+
* you may not use this file except in compliance with the License.
|
|
451
|
+
* You may obtain a copy of the License at
|
|
452
|
+
*
|
|
453
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
454
|
+
*
|
|
455
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
456
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
457
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
458
|
+
* See the License for the specific language governing permissions and
|
|
459
|
+
* limitations under the License.
|
|
460
|
+
*/
|
|
461
|
+
class DocumentenApiDocumentService extends BaseApiService {
|
|
462
|
+
constructor(httpClient, configService) {
|
|
463
|
+
super(httpClient, configService);
|
|
464
|
+
this.httpClient = httpClient;
|
|
465
|
+
this.configService = configService;
|
|
466
|
+
}
|
|
467
|
+
getZakenApiDocuments(documentId) {
|
|
468
|
+
return this.httpClient.get(this.getApiUrl(`/v1/zaken-api/document/${documentId}/files`));
|
|
469
|
+
}
|
|
470
|
+
deleteDocument(file) {
|
|
471
|
+
return this.httpClient.delete(this.getApiUrl(`/v1/documenten-api/${file.pluginConfigurationId}/files/${file.fileId}`));
|
|
472
|
+
}
|
|
473
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: DocumentenApiDocumentService, deps: [{ token: i1.HttpClient }, { token: i2$1.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
474
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: DocumentenApiDocumentService, providedIn: 'root' }); }
|
|
475
|
+
}
|
|
476
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: DocumentenApiDocumentService, decorators: [{
|
|
477
|
+
type: Injectable,
|
|
478
|
+
args: [{
|
|
479
|
+
providedIn: 'root',
|
|
480
|
+
}]
|
|
481
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2$1.ConfigService }] });
|
|
482
|
+
|
|
483
|
+
/*
|
|
484
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
485
|
+
*
|
|
486
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
487
|
+
* you may not use this file except in compliance with the License.
|
|
488
|
+
* You may obtain a copy of the License at
|
|
489
|
+
*
|
|
490
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
491
|
+
*
|
|
492
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
493
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
494
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
495
|
+
* See the License for the specific language governing permissions and
|
|
496
|
+
* limitations under the License.
|
|
497
|
+
*/
|
|
498
|
+
class DocumentenApiVersionService extends BaseApiService {
|
|
499
|
+
get refresh$() {
|
|
500
|
+
return this._refresh$.asObservable();
|
|
501
|
+
}
|
|
502
|
+
constructor(httpClient, configService) {
|
|
503
|
+
super(httpClient, configService);
|
|
504
|
+
this.httpClient = httpClient;
|
|
505
|
+
this.configService = configService;
|
|
506
|
+
this._refresh$ = new BehaviorSubject(null);
|
|
507
|
+
}
|
|
508
|
+
getManagementApiVersion(caseDefinitionName) {
|
|
509
|
+
return this.httpClient.get(this.getApiUrl(`/management/v1/case-definition/${caseDefinitionName}/documenten-api/version`));
|
|
510
|
+
}
|
|
511
|
+
refresh() {
|
|
512
|
+
this._refresh$.next(null);
|
|
513
|
+
}
|
|
514
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: DocumentenApiVersionService, deps: [{ token: i1.HttpClient }, { token: i2$1.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
515
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: DocumentenApiVersionService, providedIn: 'root' }); }
|
|
516
|
+
}
|
|
517
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: DocumentenApiVersionService, decorators: [{
|
|
518
|
+
type: Injectable,
|
|
519
|
+
args: [{
|
|
520
|
+
providedIn: 'root',
|
|
521
|
+
}]
|
|
522
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2$1.ConfigService }] });
|
|
523
|
+
|
|
524
|
+
/*
|
|
525
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
526
|
+
*
|
|
527
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
528
|
+
* you may not use this file except in compliance with the License.
|
|
529
|
+
* You may obtain a copy of the License at
|
|
530
|
+
*
|
|
531
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
532
|
+
*
|
|
533
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
534
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
535
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
536
|
+
* See the License for the specific language governing permissions and
|
|
537
|
+
* limitations under the License.
|
|
538
|
+
*/
|
|
539
|
+
|
|
540
|
+
/*
|
|
541
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
542
|
+
*
|
|
543
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
544
|
+
* you may not use this file except in compliance with the License.
|
|
545
|
+
* You may obtain a copy of the License at
|
|
546
|
+
*
|
|
547
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
548
|
+
*
|
|
549
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
550
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
551
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
552
|
+
* See the License for the specific language governing permissions and
|
|
553
|
+
* limitations under the License.
|
|
554
|
+
*/
|
|
555
|
+
class DocumentenApiColumnsComponent extends PendingChangesComponent {
|
|
556
|
+
get documentDefinitionName$() {
|
|
557
|
+
return this._documentDefinitionName$;
|
|
558
|
+
}
|
|
559
|
+
constructor(route, zgwDocumentColumnService) {
|
|
560
|
+
super();
|
|
561
|
+
this.route = route;
|
|
562
|
+
this.zgwDocumentColumnService = zgwDocumentColumnService;
|
|
563
|
+
this._reload$ = new BehaviorSubject(null);
|
|
564
|
+
this._documentDefinitionName$ = this.route.params.pipe(map(params => params?.name), filter(docDefName => !!docDefName));
|
|
565
|
+
this.loading$ = new BehaviorSubject(true);
|
|
566
|
+
this.usedKeys$ = new BehaviorSubject([]);
|
|
567
|
+
this._documentStatuses = [];
|
|
568
|
+
this.documentStatuses$ = combineLatest([
|
|
569
|
+
this._documentDefinitionName$,
|
|
570
|
+
this._reload$,
|
|
571
|
+
]).pipe(tap(([_, reload]) => {
|
|
572
|
+
if (reload === null) {
|
|
573
|
+
this.loading$.next(true);
|
|
574
|
+
}
|
|
575
|
+
}), switchMap(([documentDefinitionName]) => this.zgwDocumentColumnService.getConfiguredColumns(documentDefinitionName)), tap(statuses => {
|
|
576
|
+
this._documentStatuses = statuses;
|
|
577
|
+
this.usedKeys$.next(statuses.map(status => status.key));
|
|
578
|
+
this.loading$.next(false);
|
|
579
|
+
}));
|
|
580
|
+
this.fields$ = new BehaviorSubject([]);
|
|
581
|
+
this.ACTION_ITEMS = [
|
|
582
|
+
{
|
|
583
|
+
label: 'interface.edit',
|
|
584
|
+
callback: this.openEditModal.bind(this),
|
|
585
|
+
type: 'normal',
|
|
586
|
+
},
|
|
587
|
+
{
|
|
588
|
+
label: 'interface.delete',
|
|
589
|
+
callback: this.openDeleteModal.bind(this),
|
|
590
|
+
type: 'danger',
|
|
591
|
+
},
|
|
592
|
+
];
|
|
593
|
+
this.CARBON_THEME = 'g10';
|
|
594
|
+
this.statusModalType$ = new BehaviorSubject('closed');
|
|
595
|
+
this.prefillStatus$ = new BehaviorSubject(undefined);
|
|
596
|
+
this.columnToUpdate$ = new BehaviorSubject(undefined);
|
|
597
|
+
this.showDisableModal$ = new Subject();
|
|
598
|
+
this._documentDefinitionName$.subscribe(documentDefinitionName => {
|
|
599
|
+
zgwDocumentColumnService.getConfiguredColumns(documentDefinitionName).subscribe(configuredColumns => {
|
|
600
|
+
console.log(configuredColumns);
|
|
601
|
+
}, error => {
|
|
602
|
+
console.error(error);
|
|
603
|
+
});
|
|
604
|
+
});
|
|
605
|
+
}
|
|
606
|
+
ngAfterViewInit() {
|
|
607
|
+
this.initFields();
|
|
608
|
+
}
|
|
609
|
+
openDeleteModal(status) {
|
|
610
|
+
this.columnToUpdate$.next(status);
|
|
611
|
+
this.showDisableModal$.next(true);
|
|
612
|
+
}
|
|
613
|
+
openEditModal(status) {
|
|
614
|
+
this.prefillStatus$.next(status);
|
|
615
|
+
this.statusModalType$.next('edit');
|
|
616
|
+
}
|
|
617
|
+
openAddModal() {
|
|
618
|
+
this.statusModalType$.next('add');
|
|
619
|
+
}
|
|
620
|
+
closeModal(closeModalEvent) {
|
|
621
|
+
if (closeModalEvent === 'closeAndRefresh') {
|
|
622
|
+
this.reload();
|
|
623
|
+
}
|
|
624
|
+
this.statusModalType$.next('closed');
|
|
625
|
+
}
|
|
626
|
+
confirmDeleteStatus(status) {
|
|
627
|
+
this.documentDefinitionName$
|
|
628
|
+
.pipe(switchMap(documentDefinitionName => this.zgwDocumentColumnService.deleteConfiguredColumn(documentDefinitionName, status.key)))
|
|
629
|
+
.subscribe(() => {
|
|
630
|
+
this.reload();
|
|
631
|
+
});
|
|
632
|
+
}
|
|
633
|
+
onMoveRowClick(event) {
|
|
634
|
+
const { direction, index } = event;
|
|
635
|
+
const orderedStatuses = direction === MoveRowDirection.UP
|
|
636
|
+
? this.swapStatuses(this._documentStatuses, index - 1, index)
|
|
637
|
+
: this.swapStatuses(this._documentStatuses, index, index + 1);
|
|
638
|
+
this.documentDefinitionName$
|
|
639
|
+
.pipe(switchMap(documentDefinitionName => this.zgwDocumentColumnService.updateConfiguredColumns(documentDefinitionName, orderedStatuses)))
|
|
640
|
+
.subscribe(() => {
|
|
641
|
+
this.reload(true);
|
|
642
|
+
});
|
|
643
|
+
}
|
|
644
|
+
reload(noAnimation = false) {
|
|
645
|
+
this._reload$.next(noAnimation ? 'noAnimation' : null);
|
|
646
|
+
}
|
|
647
|
+
swapStatuses(statuses, index1, index2) {
|
|
648
|
+
const temp = [...statuses];
|
|
649
|
+
temp[index1] = temp.splice(index2, 1, temp[index1])[0];
|
|
650
|
+
return temp;
|
|
651
|
+
}
|
|
652
|
+
initFields() {
|
|
653
|
+
this.fields$.next([
|
|
654
|
+
{
|
|
655
|
+
key: 'title',
|
|
656
|
+
label: 'dossierManagement.statuses.columns.title',
|
|
657
|
+
viewType: ViewType.TEXT,
|
|
658
|
+
},
|
|
659
|
+
{
|
|
660
|
+
key: 'key',
|
|
661
|
+
label: 'dossierManagement.statuses.columns.key',
|
|
662
|
+
viewType: ViewType.TEXT,
|
|
663
|
+
},
|
|
664
|
+
{
|
|
665
|
+
key: 'visibleInCaseListByDefault',
|
|
666
|
+
label: 'dossierManagement.statuses.columns.visible',
|
|
667
|
+
viewType: ViewType.BOOLEAN,
|
|
668
|
+
},
|
|
669
|
+
{
|
|
670
|
+
viewType: ViewType.TEMPLATE,
|
|
671
|
+
template: this.colorColumnTemplate,
|
|
672
|
+
key: 'color',
|
|
673
|
+
label: 'dossierManagement.statuses.columns.color',
|
|
674
|
+
},
|
|
675
|
+
]);
|
|
676
|
+
}
|
|
677
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: DocumentenApiColumnsComponent, deps: [{ token: i1$1.ActivatedRoute }, { token: DocumentenApiColumnService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
678
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: DocumentenApiColumnsComponent, isStandalone: true, selector: "valtimo-documenten-api-columns", viewQueries: [{ propertyName: "colorColumnTemplate", first: true, predicate: ["colorColumnTemplate"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<!--\n ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<valtimo-carbon-list\n *ngIf=\"{\n loading: loading$ | async,\n documentStatuses: documentStatuses$ | async\n } as obs\"\n [fields]=\"fields$ | async\"\n [header]=\"false\"\n [loading]=\"obs.loading\"\n [movingRowsEnabled]=\"true\"\n [actionItems]=\"ACTION_ITEMS\"\n (rowClicked)=\"openEditModal($event)\"\n (moveRow)=\"onMoveRowClick($event)\"\n>\n <ng-container\n carbonToolbarContent\n *ngTemplateOutlet=\"buttons; context: {obs: obs}\"\n ></ng-container>\n</valtimo-carbon-list>\n\n<valtimo-documenten-api-column-modal\n [type]=\"statusModalType$ | async\"\n [usedKeys]=\"usedKeys$ | async\"\n [documentDefinitionName]=\"documentDefinitionName$ | async\"\n (closeModalEvent)=\"closeModal($event)\"\n></valtimo-documenten-api-column-modal>\n\n<valtimo-confirmation-modal\n confirmButtonTextTranslationKey=\"interface.delete\"\n confirmButtonType=\"danger\"\n contentTranslationKey=\"dossierManagement.statuses.deleteText\"\n [outputOnConfirm]=\"columnToUpdate$ | async\"\n [showModalSubject$]=\"showDisableModal$\"\n titleTranslationKey=\"interface.delete\"\n (confirmEvent)=\"confirmDeleteStatus($event)\"\n></valtimo-confirmation-modal>\n\n<ng-template #buttons let-obs=\"obs\">\n <div class=\"dossier-management-search-fields__buttons\">\n <button cdsButton=\"primary\" [disabled]=\"obs.loading\" (click)=\"openAddModal()\">\n <svg cdsIcon=\"add\" size=\"16\" class=\"cds--btn__icon\"></svg>\n\n {{ 'dossierManagement.statuses.add' | translate }}\n </button>\n </div>\n</ng-template>\n\n<ng-template #colorColumnTemplate let-data=\"data\">\n <cds-tag class=\"cds-tag--no-margin\" [type]=\"data?.item?.tagType\">\n {{ 'interface.tagType.' + data?.item?.tagType | translate }}\n </cds-tag>\n</ng-template>\n", styles: ["::ng-deep .cds-tag--no-margin{margin:0}\n/*!\n * Copyright 2015-2024 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "component", type: DocumentenApiColumnModalComponent, selector: "valtimo-documenten-api-column-modal", inputs: ["type", "prefill", "usedKeys", "documentDefinitionName"], outputs: ["closeModalEvent"] }, { kind: "ngmodule", type: CarbonListModule }, { kind: "component", type: i3$2.CarbonListComponent, selector: "valtimo-carbon-list", inputs: ["items", "fields", "tableTranslations", "paginatorConfig", "pagination", "loading", "actions", "actionItems", "header", "hideColumnHeader", "initialSortState", "isSearchable", "enableSingleSelection", "lastColumnTemplate", "paginationIdentifier", "showSelectionColumn", "striped", "hideToolbar", "lockedTooltipTranslationKey", "movingRowsEnabled"], outputs: ["rowClicked", "paginationClicked", "paginationSet", "search", "sortChanged", "moveRow", "itemsReordered"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: ConfirmationModalModule }, { kind: "component", type: i3$2.ConfirmationModalComponent, selector: "valtimo-confirmation-modal", inputs: ["titleTranslationKey", "title", "content", "contentTranslationKey", "confirmButtonText", "confirmButtonTextTranslationKey", "confirmButtonType", "showOptionalButton", "optionalButtonText", "optionalButtonTextTranslationKey", "optionalButtonType", "cancelButtonText", "cancelButtonTextTranslationKey", "cancelButtonType", "showModalSubject$", "outputOnConfirm", "outputOnOptional", "spacerAfterCancelButton"], outputs: ["confirmEvent", "optionalEvent", "cancelEvent"] }, { kind: "ngmodule", type: TagModule }, { kind: "component", type: i2.Tag, selector: "cds-tag, ibm-tag", inputs: ["type", "size", "class"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i2.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
679
|
+
}
|
|
680
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: DocumentenApiColumnsComponent, decorators: [{
|
|
681
|
+
type: Component,
|
|
682
|
+
args: [{ selector: 'valtimo-documenten-api-columns', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
683
|
+
CommonModule,
|
|
684
|
+
DocumentenApiColumnModalComponent,
|
|
685
|
+
CarbonListModule,
|
|
686
|
+
TranslateModule,
|
|
687
|
+
ConfirmationModalModule,
|
|
688
|
+
TagModule,
|
|
689
|
+
ButtonModule,
|
|
690
|
+
], template: "<!--\n ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<valtimo-carbon-list\n *ngIf=\"{\n loading: loading$ | async,\n documentStatuses: documentStatuses$ | async\n } as obs\"\n [fields]=\"fields$ | async\"\n [header]=\"false\"\n [loading]=\"obs.loading\"\n [movingRowsEnabled]=\"true\"\n [actionItems]=\"ACTION_ITEMS\"\n (rowClicked)=\"openEditModal($event)\"\n (moveRow)=\"onMoveRowClick($event)\"\n>\n <ng-container\n carbonToolbarContent\n *ngTemplateOutlet=\"buttons; context: {obs: obs}\"\n ></ng-container>\n</valtimo-carbon-list>\n\n<valtimo-documenten-api-column-modal\n [type]=\"statusModalType$ | async\"\n [usedKeys]=\"usedKeys$ | async\"\n [documentDefinitionName]=\"documentDefinitionName$ | async\"\n (closeModalEvent)=\"closeModal($event)\"\n></valtimo-documenten-api-column-modal>\n\n<valtimo-confirmation-modal\n confirmButtonTextTranslationKey=\"interface.delete\"\n confirmButtonType=\"danger\"\n contentTranslationKey=\"dossierManagement.statuses.deleteText\"\n [outputOnConfirm]=\"columnToUpdate$ | async\"\n [showModalSubject$]=\"showDisableModal$\"\n titleTranslationKey=\"interface.delete\"\n (confirmEvent)=\"confirmDeleteStatus($event)\"\n></valtimo-confirmation-modal>\n\n<ng-template #buttons let-obs=\"obs\">\n <div class=\"dossier-management-search-fields__buttons\">\n <button cdsButton=\"primary\" [disabled]=\"obs.loading\" (click)=\"openAddModal()\">\n <svg cdsIcon=\"add\" size=\"16\" class=\"cds--btn__icon\"></svg>\n\n {{ 'dossierManagement.statuses.add' | translate }}\n </button>\n </div>\n</ng-template>\n\n<ng-template #colorColumnTemplate let-data=\"data\">\n <cds-tag class=\"cds-tag--no-margin\" [type]=\"data?.item?.tagType\">\n {{ 'interface.tagType.' + data?.item?.tagType | translate }}\n </cds-tag>\n</ng-template>\n", styles: ["::ng-deep .cds-tag--no-margin{margin:0}\n/*!\n * Copyright 2015-2024 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"] }]
|
|
691
|
+
}], ctorParameters: () => [{ type: i1$1.ActivatedRoute }, { type: DocumentenApiColumnService }], propDecorators: { colorColumnTemplate: [{
|
|
692
|
+
type: ViewChild,
|
|
693
|
+
args: ['colorColumnTemplate']
|
|
694
|
+
}] } });
|
|
695
|
+
|
|
696
|
+
/*
|
|
697
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
698
|
+
*
|
|
699
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
700
|
+
* you may not use this file except in compliance with the License.
|
|
701
|
+
* You may obtain a copy of the License at
|
|
702
|
+
*
|
|
703
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
704
|
+
*
|
|
705
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
706
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
707
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
708
|
+
* See the License for the specific language governing permissions and
|
|
709
|
+
* limitations under the License.
|
|
710
|
+
*/
|
|
711
|
+
class DocumentenApiMetadataModalComponent {
|
|
712
|
+
constructor(modalService, translateService, route, documentService, keycloakService, valtimoModalService) {
|
|
713
|
+
this.modalService = modalService;
|
|
714
|
+
this.translateService = translateService;
|
|
715
|
+
this.route = route;
|
|
716
|
+
this.documentService = documentService;
|
|
717
|
+
this.keycloakService = keycloakService;
|
|
718
|
+
this.valtimoModalService = valtimoModalService;
|
|
719
|
+
this.documentTitle = '';
|
|
720
|
+
this.metadata = new EventEmitter();
|
|
721
|
+
this.CONFIDENTIALITY_LEVELS = [
|
|
722
|
+
'openbaar',
|
|
723
|
+
'beperkt_openbaar',
|
|
724
|
+
'intern',
|
|
725
|
+
'zaakvertrouwelijk',
|
|
726
|
+
'vertrouwelijk',
|
|
727
|
+
'confidentieel',
|
|
728
|
+
'geheim',
|
|
729
|
+
'zeer_geheim',
|
|
730
|
+
];
|
|
731
|
+
this.confidentialityLevelItems$ = this.translateService
|
|
732
|
+
.stream('key')
|
|
733
|
+
.pipe(map(() => this.CONFIDENTIALITY_LEVELS.map(confidentialityLevel => ({
|
|
734
|
+
id: confidentialityLevel,
|
|
735
|
+
text: this.translateService.instant(`document.${confidentialityLevel}`),
|
|
736
|
+
}))));
|
|
737
|
+
this.ADDITONAL_DOCUMENT_DATE_OPTIONS = [
|
|
738
|
+
{
|
|
739
|
+
value: 'neither',
|
|
740
|
+
translationKey: 'document.noAdditionalDate',
|
|
741
|
+
},
|
|
742
|
+
{
|
|
743
|
+
value: 'sent',
|
|
744
|
+
translationKey: 'document.sendDate',
|
|
745
|
+
},
|
|
746
|
+
{
|
|
747
|
+
value: 'received',
|
|
748
|
+
translationKey: 'document.receiptDate',
|
|
749
|
+
},
|
|
750
|
+
];
|
|
751
|
+
this.clearStatusSelection$ = new Subject();
|
|
752
|
+
this.additionalDocumentDate$ = new BehaviorSubject('neither');
|
|
753
|
+
this.STATUSES = [
|
|
754
|
+
'in_bewerking',
|
|
755
|
+
'ter_vaststelling',
|
|
756
|
+
'definitief',
|
|
757
|
+
'gearchiveerd',
|
|
758
|
+
];
|
|
759
|
+
this.RECEIPT_STATUSES = ['definitief', 'gearchiveerd'];
|
|
760
|
+
this.formData$ = new BehaviorSubject(null);
|
|
761
|
+
this.statusItems$ = combineLatest([
|
|
762
|
+
this.additionalDocumentDate$,
|
|
763
|
+
this.translateService.stream('key'),
|
|
764
|
+
]).pipe(tap$1(([additionalDocumentDate]) => {
|
|
765
|
+
this.formData$.pipe(take(1)).subscribe(formData => {
|
|
766
|
+
if (additionalDocumentDate === 'received' &&
|
|
767
|
+
(formData.status === 'in_bewerking' || formData.status === 'ter_vaststelling')) {
|
|
768
|
+
this.clearStatusSelection$.next(null);
|
|
769
|
+
}
|
|
770
|
+
});
|
|
771
|
+
}), map(([additionalDocumentDate]) => (additionalDocumentDate === 'received' ? this.RECEIPT_STATUSES : this.STATUSES).map(status => ({
|
|
772
|
+
id: status,
|
|
773
|
+
text: this.translateService.instant(`document.${status}`),
|
|
774
|
+
}))));
|
|
775
|
+
this.LANGUAGES = ['nld', 'eng', 'deu'];
|
|
776
|
+
this.languageItems$ = this.translateService.stream('key').pipe(map(() => this.LANGUAGES.map(language => ({
|
|
777
|
+
id: language,
|
|
778
|
+
text: this.translateService.instant(`document.${language}`),
|
|
779
|
+
}))));
|
|
780
|
+
this.documentTypeItems$ = combineLatest([
|
|
781
|
+
this.route?.params || of(null),
|
|
782
|
+
this.route?.firstChild?.params || of(null),
|
|
783
|
+
this.valtimoModalService.documentDefinitionName$,
|
|
784
|
+
]).pipe(filter(([params, firstChildParams, documentDefinitionName]) => !!(params?.documentDefinitionName ||
|
|
785
|
+
firstChildParams?.documentDefinitionName ||
|
|
786
|
+
documentDefinitionName)), switchMap(([params, firstChildParams, documentDefinitionName]) => this.documentService.getDocumentTypes(params?.documentDefinitionName ||
|
|
787
|
+
firstChildParams?.documentDefinitionName ||
|
|
788
|
+
documentDefinitionName)), map(documentTypes => documentTypes.map(type => ({ id: type.url, text: type.name }))));
|
|
789
|
+
this.showForm$ = this.modalService.modalVisible$;
|
|
790
|
+
this.valid$ = new BehaviorSubject(false);
|
|
791
|
+
this.userEmail$ = from(this.keycloakService.loadUserProfile()).pipe(map(userProfile => userProfile?.email || ''));
|
|
792
|
+
}
|
|
793
|
+
ngOnInit() {
|
|
794
|
+
this.openShowSubscription();
|
|
795
|
+
this.openHideSubscription();
|
|
796
|
+
}
|
|
797
|
+
ngOnDestroy() {
|
|
798
|
+
this.showSubscription?.unsubscribe();
|
|
799
|
+
this.hideSubscription?.unsubscribe();
|
|
800
|
+
}
|
|
801
|
+
hide() {
|
|
802
|
+
this.formData$.next(null);
|
|
803
|
+
this.valid$.next(false);
|
|
804
|
+
this.additionalDocumentDate$.next('neither');
|
|
805
|
+
this.modalService.closeModal();
|
|
806
|
+
}
|
|
807
|
+
cancel() {
|
|
808
|
+
this.hide();
|
|
809
|
+
}
|
|
810
|
+
save() {
|
|
811
|
+
combineLatest([this.valid$, this.formData$])
|
|
812
|
+
.pipe(take(1))
|
|
813
|
+
.subscribe(([valid, formData]) => {
|
|
814
|
+
if (valid) {
|
|
815
|
+
this.metadata.emit(formData);
|
|
816
|
+
}
|
|
817
|
+
});
|
|
818
|
+
}
|
|
819
|
+
formValueChange(data) {
|
|
820
|
+
this.formData$.next(data);
|
|
821
|
+
this.setValid(data);
|
|
822
|
+
}
|
|
823
|
+
setAdditionalDate(value) {
|
|
824
|
+
this.additionalDocumentDate$.next(value);
|
|
825
|
+
}
|
|
826
|
+
setValid(data) {
|
|
827
|
+
this.valid$.next(!!(data.filename &&
|
|
828
|
+
data.title &&
|
|
829
|
+
data.author &&
|
|
830
|
+
data.creationDate &&
|
|
831
|
+
data.status &&
|
|
832
|
+
data.language &&
|
|
833
|
+
data.informatieobjecttype &&
|
|
834
|
+
data.description &&
|
|
835
|
+
data.confidentialityLevel));
|
|
836
|
+
}
|
|
837
|
+
openShowSubscription() {
|
|
838
|
+
this.showSubscription = this.show$.subscribe(() => {
|
|
839
|
+
this.modalService.openModal(this.documentenApiMetadataModal);
|
|
840
|
+
});
|
|
841
|
+
}
|
|
842
|
+
openHideSubscription() {
|
|
843
|
+
this.hideSubscription = this.hide$.subscribe(() => {
|
|
844
|
+
this.hide();
|
|
845
|
+
});
|
|
846
|
+
}
|
|
847
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: DocumentenApiMetadataModalComponent, deps: [{ token: i3$2.ModalService }, { token: i3$1.TranslateService }, { token: i1$1.ActivatedRoute }, { token: i3.DocumentService }, { token: i5$1.KeycloakService }, { token: i3$2.ValtimoModalService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
848
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: DocumentenApiMetadataModalComponent, isStandalone: true, selector: "valtimo-documenten-api-metadata-modal", inputs: { show$: "show$", hide$: "hide$", disabled$: "disabled$", file$: "file$", documentTitle: "documentTitle", disableDocumentTitle: "disableDocumentTitle", filename: "filename", disableFilename: "disableFilename", author: "author", disableAuthor: "disableAuthor", status: "status", disableStatus: "disableStatus", language: "language", disableLanguage: "disableLanguage", documentType: "documentType", disableDocumentType: "disableDocumentType", description: "description", disableDescription: "disableDescription", confidentialityLevel: "confidentialityLevel", disableConfidentialityLevel: "disableConfidentialityLevel", trefwoorden: "trefwoorden", disableTrefwoorden: "disableTrefwoorden" }, outputs: { metadata: "metadata" }, viewQueries: [{ propertyName: "documentenApiMetadataModal", first: true, predicate: ["documentenApiMetadataModal"], descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<v-modal\n #documentenApiMetadataModal\n (closeEvent)=\"hide()\"\n *ngIf=\"{file: file$ | async, disabled: disabled$ | async, valid: valid$ | async} as obs\"\n>\n <div role=\"header\">\n <div class=\"edit-configuration-title\">\n <v-title [center]=\"true\" [fullWidth]=\"true\" [margin]=\"false\" type=\"h2\">{{\n 'document.fillInMetadata' | translate\n }}</v-title>\n </div>\n </div>\n <div role=\"content\">\n <ng-container *ngTemplateOutlet=\"metadataForm; context: {obs: obs}\"></ng-container>\n </div>\n <div role=\"footer\">\n <div class=\"buttons\">\n <v-button (clickEvent)=\"cancel()\" [disabled]=\"obs.disabled\" type=\"secondary\">{{\n 'document.cancel' | translate\n }}</v-button>\n <v-button\n (clickEvent)=\"save()\"\n [disabled]=\"obs.disabled || !obs.valid\"\n mdiIcon=\"upload\"\n type=\"success\"\n >{{ 'document.upload' | translate }}</v-button\n >\n </div>\n </div>\n</v-modal>\n\n<ng-template #metadataForm let-obs=\"obs\">\n <ng-container *ngIf=\"showForm$ | async\">\n <v-form\n (valueChange)=\"formValueChange($event)\"\n *ngIf=\"additionalDocumentDate$ | async as additionalDate\"\n >\n <v-input\n [defaultValue]=\"filename || obs.file?.name\"\n [disabled]=\"obs.disabled || disableFilename\"\n [fullWidth]=\"true\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.filename' | translate\"\n [tooltip]=\"'document.filenameTooltip' | translate\"\n name=\"filename\"\n >\n </v-input>\n <v-input\n [defaultValue]=\"documentTitle\"\n [disabled]=\"obs.disabled || disableDocumentTitle\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.inputTitle' | translate\"\n [tooltip]=\"'document.inputTitleTooltip' | translate\"\n [widthPx]=\"400\"\n name=\"title\"\n >\n </v-input>\n <v-input\n [defaultValue]=\"author || (userEmail$ | async)\"\n [disabled]=\"obs.disabled || disableAuthor\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.author' | translate\"\n [tooltip]=\"'document.authorTooltip' | translate\"\n [widthPx]=\"300\"\n name=\"author\"\n >\n </v-input>\n <v-select\n *ngIf=\"languageItems$ | async as languageItems\"\n [defaultSelectionId]=\"language || languageItems[0].id\"\n [disabled]=\"obs.disabled || disableLanguage\"\n [items]=\"languageItems\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.language' | translate\"\n [tooltip]=\"'document.languageTooltip' | translate\"\n [widthInPx]=\"200\"\n name=\"language\"\n ></v-select>\n <ng-container *ngIf=\"{documentTypeItems: documentTypeItems$ | async} as obs\">\n <v-select\n [defaultSelectionId]=\"documentType\"\n [disabled]=\"obs.disabled || disableDocumentType\"\n [items]=\"obs.documentTypeItems\"\n [loading]=\"!obs.documentTypeItems\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.informatieobjecttype' | translate\"\n [tooltip]=\"'document.informatieobjecttypeTooltip' | translate\"\n [widthInPx]=\"200\"\n name=\"informatieobjecttype\"\n ></v-select>\n </ng-container>\n <v-date-picker\n [defaultDateIsToday]=\"true\"\n [disabled]=\"obs.disabled\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.creationDate' | translate\"\n [tooltip]=\"'document.creationDateTooltip' | translate\"\n [widthPx]=\"100\"\n name=\"creationDate\"\n ></v-date-picker>\n <ng-container\n *ngTemplateOutlet=\"additionalDatePicker; context: {additionalDate: additionalDate}\"\n ></ng-container>\n <v-date-picker\n *ngIf=\"additionalDate === 'received'\"\n [defaultDateIsToday]=\"true\"\n [disabled]=\"obs.disabled\"\n [margin]=\"true\"\n [title]=\"'document.receiptDate' | translate\"\n [tooltip]=\"'document.receiptDateTooltip' | translate\"\n [widthPx]=\"100\"\n name=\"receiptDate\"\n ></v-date-picker>\n <v-date-picker\n *ngIf=\"additionalDate === 'sent'\"\n [defaultDateIsToday]=\"true\"\n [disabled]=\"obs.disabled\"\n [margin]=\"true\"\n [title]=\"'document.sendDate' | translate\"\n [tooltip]=\"'document.sendDateTooltip' | translate\"\n [widthPx]=\"100\"\n name=\"sendDate\"\n ></v-date-picker>\n <v-select\n [defaultSelectionId]=\"status\"\n [disabled]=\"obs.disabled || disableStatus\"\n [items]=\"statusItems$ | async\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.status' | translate\"\n [tooltip]=\"'document.statusTooltip' | translate\"\n [widthInPx]=\"200\"\n [clearSelectionSubject$]=\"clearStatusSelection$\"\n name=\"status\"\n ></v-select>\n <v-input\n [defaultValue]=\"description\"\n [disabled]=\"obs.disabled || disableDescription\"\n [fullWidth]=\"true\"\n [margin]=\"true\"\n [title]=\"'document.inputDescription' | translate\"\n [tooltip]=\"'document.inputDescriptionTooltip' | translate\"\n [required]=\"true\"\n name=\"description\"\n >\n </v-input>\n <v-select\n [defaultSelectionId]=\"confidentialityLevel\"\n [disabled]=\"obs.disabled || disableConfidentialityLevel\"\n [items]=\"confidentialityLevelItems$ | async\"\n [margin]=\"true\"\n [title]=\"'document.confidentialityLevel' | translate\"\n [tooltip]=\"'document.confidentialityLevelTooltip' | translate\"\n [widthInPx]=\"200\"\n [required]=\"true\"\n name=\"confidentialityLevel\"\n ></v-select>\n </v-form>\n </ng-container>\n</ng-template>\n\n<ng-template #additionalDatePicker let-additionalDate=\"additionalDate\">\n <v-input-label\n [title]=\"'document.additionalDate' | translate\"\n [name]=\"'additionalDate'\"\n [tooltip]=\"'document.additionalDateTooltip' | translate\"\n [required]=\"true\"\n >\n </v-input-label>\n <div class=\"col-12 col-sm-8 col-lg-6 form-check mt-1 additional-date\">\n <label\n class=\"custom-control custom-radio custom-control-inline\"\n *ngFor=\"let option of ADDITONAL_DOCUMENT_DATE_OPTIONS\"\n (click)=\"setAdditionalDate(option.value)\"\n >\n <input\n class=\"custom-control-input\"\n type=\"radio\"\n name=\"radio-inline\"\n [checked]=\"additionalDate === option.value\"\n /><span class=\"custom-control-label\">{{ option.translationKey | translate }}</span>\n </label>\n </div>\n</ng-template>\n", styles: [".buttons{display:flex;flex-direction:row;width:100%;justify-content:space-between}.additional-date{padding:0;width:100%;max-width:100%;margin:0;margin-block-end:var(--v-input-margin)}.additional-date .custom-control{margin-bottom:0}\n/*!\n * Copyright 2015-2024 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: VModalModule }, { kind: "component", type: i3$2.VModalComponent, selector: "v-modal", inputs: ["appearingDelayMs", "maxWidthPx", "hideFooter"], outputs: ["closeEvent"] }, { kind: "ngmodule", type: TitleModule }, { kind: "component", type: i3$2.TitleComponent, selector: "v-title", inputs: ["type", "margin", "fullWidth", "center"] }, { kind: "ngmodule", type: ButtonModule$1 }, { kind: "component", type: i3$2.ButtonComponent, selector: "v-button", inputs: ["type", "mdiIcon", "disabled", "title", "titleTranslationKey"], outputs: ["clickEvent"] }, { kind: "ngmodule", type: FormModule }, { kind: "component", type: i3$2.FormComponent, selector: "v-form", inputs: ["className"], outputs: ["valueChange"] }, { kind: "ngmodule", type: InputModule$1 }, { kind: "component", type: i3$2.InputComponent, selector: "v-input", inputs: ["name", "type", "title", "titleTranslationKey", "defaultValue", "widthPx", "fullWidth", "margin", "smallMargin", "disabled", "step", "min", "maxLength", "tooltip", "required", "hideNumberSpinBox", "smallLabel", "rows", "clear$", "carbonTheme", "placeholder"], outputs: ["valueChange"] }, { kind: "ngmodule", type: SelectModule }, { kind: "component", type: i3$2.SelectComponent, selector: "v-select", inputs: ["items", "defaultSelection", "defaultSelectionId", "defaultSelectionIds", "disabled", "dropUp", "multiple", "margin", "widthInPx", "notFoundText", "clearAllText", "clearText", "name", "title", "titleTranslationKey", "clearSelectionSubject$", "tooltip", "required", "loading", "loadingText", "placeholder", "smallMargin", "carbonTheme", "appendInline"], outputs: ["selectedChange"] }, { kind: "ngmodule", type: DatePickerModule }, { kind: "component", type: i3$2.DatePickerComponent, selector: "v-date-picker", inputs: ["name", "title", "titleTranslationKey", "widthPx", "fullWidth", "margin", "disabled", "tooltip", "required", "defaultDate", "defaultDateIsToday", "smallLabel", "clear$", "enableTime", "carbonTheme"], outputs: ["valueChange"] }, { kind: "ngmodule", type: InputLabelModule }, { kind: "component", type: i3$2.InputLabelComponent, selector: "v-input-label", inputs: ["name", "tooltip", "largeMargin", "small", "title", "titleTranslationKey", "required", "disabled", "carbonTheme"] }] }); }
|
|
849
|
+
}
|
|
850
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: DocumentenApiMetadataModalComponent, decorators: [{
|
|
851
|
+
type: Component,
|
|
852
|
+
args: [{ selector: 'valtimo-documenten-api-metadata-modal', standalone: true, imports: [
|
|
853
|
+
CommonModule,
|
|
854
|
+
TranslateModule,
|
|
855
|
+
VModalModule,
|
|
856
|
+
TitleModule,
|
|
857
|
+
ButtonModule$1,
|
|
858
|
+
TranslateModule,
|
|
859
|
+
FormModule,
|
|
860
|
+
InputModule$1,
|
|
861
|
+
SelectModule,
|
|
862
|
+
DatePickerModule,
|
|
863
|
+
InputLabelModule,
|
|
864
|
+
], template: "<!--\n ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<v-modal\n #documentenApiMetadataModal\n (closeEvent)=\"hide()\"\n *ngIf=\"{file: file$ | async, disabled: disabled$ | async, valid: valid$ | async} as obs\"\n>\n <div role=\"header\">\n <div class=\"edit-configuration-title\">\n <v-title [center]=\"true\" [fullWidth]=\"true\" [margin]=\"false\" type=\"h2\">{{\n 'document.fillInMetadata' | translate\n }}</v-title>\n </div>\n </div>\n <div role=\"content\">\n <ng-container *ngTemplateOutlet=\"metadataForm; context: {obs: obs}\"></ng-container>\n </div>\n <div role=\"footer\">\n <div class=\"buttons\">\n <v-button (clickEvent)=\"cancel()\" [disabled]=\"obs.disabled\" type=\"secondary\">{{\n 'document.cancel' | translate\n }}</v-button>\n <v-button\n (clickEvent)=\"save()\"\n [disabled]=\"obs.disabled || !obs.valid\"\n mdiIcon=\"upload\"\n type=\"success\"\n >{{ 'document.upload' | translate }}</v-button\n >\n </div>\n </div>\n</v-modal>\n\n<ng-template #metadataForm let-obs=\"obs\">\n <ng-container *ngIf=\"showForm$ | async\">\n <v-form\n (valueChange)=\"formValueChange($event)\"\n *ngIf=\"additionalDocumentDate$ | async as additionalDate\"\n >\n <v-input\n [defaultValue]=\"filename || obs.file?.name\"\n [disabled]=\"obs.disabled || disableFilename\"\n [fullWidth]=\"true\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.filename' | translate\"\n [tooltip]=\"'document.filenameTooltip' | translate\"\n name=\"filename\"\n >\n </v-input>\n <v-input\n [defaultValue]=\"documentTitle\"\n [disabled]=\"obs.disabled || disableDocumentTitle\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.inputTitle' | translate\"\n [tooltip]=\"'document.inputTitleTooltip' | translate\"\n [widthPx]=\"400\"\n name=\"title\"\n >\n </v-input>\n <v-input\n [defaultValue]=\"author || (userEmail$ | async)\"\n [disabled]=\"obs.disabled || disableAuthor\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.author' | translate\"\n [tooltip]=\"'document.authorTooltip' | translate\"\n [widthPx]=\"300\"\n name=\"author\"\n >\n </v-input>\n <v-select\n *ngIf=\"languageItems$ | async as languageItems\"\n [defaultSelectionId]=\"language || languageItems[0].id\"\n [disabled]=\"obs.disabled || disableLanguage\"\n [items]=\"languageItems\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.language' | translate\"\n [tooltip]=\"'document.languageTooltip' | translate\"\n [widthInPx]=\"200\"\n name=\"language\"\n ></v-select>\n <ng-container *ngIf=\"{documentTypeItems: documentTypeItems$ | async} as obs\">\n <v-select\n [defaultSelectionId]=\"documentType\"\n [disabled]=\"obs.disabled || disableDocumentType\"\n [items]=\"obs.documentTypeItems\"\n [loading]=\"!obs.documentTypeItems\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.informatieobjecttype' | translate\"\n [tooltip]=\"'document.informatieobjecttypeTooltip' | translate\"\n [widthInPx]=\"200\"\n name=\"informatieobjecttype\"\n ></v-select>\n </ng-container>\n <v-date-picker\n [defaultDateIsToday]=\"true\"\n [disabled]=\"obs.disabled\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.creationDate' | translate\"\n [tooltip]=\"'document.creationDateTooltip' | translate\"\n [widthPx]=\"100\"\n name=\"creationDate\"\n ></v-date-picker>\n <ng-container\n *ngTemplateOutlet=\"additionalDatePicker; context: {additionalDate: additionalDate}\"\n ></ng-container>\n <v-date-picker\n *ngIf=\"additionalDate === 'received'\"\n [defaultDateIsToday]=\"true\"\n [disabled]=\"obs.disabled\"\n [margin]=\"true\"\n [title]=\"'document.receiptDate' | translate\"\n [tooltip]=\"'document.receiptDateTooltip' | translate\"\n [widthPx]=\"100\"\n name=\"receiptDate\"\n ></v-date-picker>\n <v-date-picker\n *ngIf=\"additionalDate === 'sent'\"\n [defaultDateIsToday]=\"true\"\n [disabled]=\"obs.disabled\"\n [margin]=\"true\"\n [title]=\"'document.sendDate' | translate\"\n [tooltip]=\"'document.sendDateTooltip' | translate\"\n [widthPx]=\"100\"\n name=\"sendDate\"\n ></v-date-picker>\n <v-select\n [defaultSelectionId]=\"status\"\n [disabled]=\"obs.disabled || disableStatus\"\n [items]=\"statusItems$ | async\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'document.status' | translate\"\n [tooltip]=\"'document.statusTooltip' | translate\"\n [widthInPx]=\"200\"\n [clearSelectionSubject$]=\"clearStatusSelection$\"\n name=\"status\"\n ></v-select>\n <v-input\n [defaultValue]=\"description\"\n [disabled]=\"obs.disabled || disableDescription\"\n [fullWidth]=\"true\"\n [margin]=\"true\"\n [title]=\"'document.inputDescription' | translate\"\n [tooltip]=\"'document.inputDescriptionTooltip' | translate\"\n [required]=\"true\"\n name=\"description\"\n >\n </v-input>\n <v-select\n [defaultSelectionId]=\"confidentialityLevel\"\n [disabled]=\"obs.disabled || disableConfidentialityLevel\"\n [items]=\"confidentialityLevelItems$ | async\"\n [margin]=\"true\"\n [title]=\"'document.confidentialityLevel' | translate\"\n [tooltip]=\"'document.confidentialityLevelTooltip' | translate\"\n [widthInPx]=\"200\"\n [required]=\"true\"\n name=\"confidentialityLevel\"\n ></v-select>\n </v-form>\n </ng-container>\n</ng-template>\n\n<ng-template #additionalDatePicker let-additionalDate=\"additionalDate\">\n <v-input-label\n [title]=\"'document.additionalDate' | translate\"\n [name]=\"'additionalDate'\"\n [tooltip]=\"'document.additionalDateTooltip' | translate\"\n [required]=\"true\"\n >\n </v-input-label>\n <div class=\"col-12 col-sm-8 col-lg-6 form-check mt-1 additional-date\">\n <label\n class=\"custom-control custom-radio custom-control-inline\"\n *ngFor=\"let option of ADDITONAL_DOCUMENT_DATE_OPTIONS\"\n (click)=\"setAdditionalDate(option.value)\"\n >\n <input\n class=\"custom-control-input\"\n type=\"radio\"\n name=\"radio-inline\"\n [checked]=\"additionalDate === option.value\"\n /><span class=\"custom-control-label\">{{ option.translationKey | translate }}</span>\n </label>\n </div>\n</ng-template>\n", styles: [".buttons{display:flex;flex-direction:row;width:100%;justify-content:space-between}.additional-date{padding:0;width:100%;max-width:100%;margin:0;margin-block-end:var(--v-input-margin)}.additional-date .custom-control{margin-bottom:0}\n/*!\n * Copyright 2015-2024 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"] }]
|
|
865
|
+
}], ctorParameters: () => [{ type: i3$2.ModalService }, { type: i3$1.TranslateService }, { type: i1$1.ActivatedRoute }, { type: i3.DocumentService }, { type: i5$1.KeycloakService }, { type: i3$2.ValtimoModalService }], propDecorators: { documentenApiMetadataModal: [{
|
|
866
|
+
type: ViewChild,
|
|
867
|
+
args: ['documentenApiMetadataModal']
|
|
868
|
+
}], show$: [{
|
|
869
|
+
type: Input
|
|
870
|
+
}], hide$: [{
|
|
871
|
+
type: Input
|
|
872
|
+
}], disabled$: [{
|
|
873
|
+
type: Input
|
|
874
|
+
}], file$: [{
|
|
875
|
+
type: Input
|
|
876
|
+
}], documentTitle: [{
|
|
877
|
+
type: Input
|
|
878
|
+
}], disableDocumentTitle: [{
|
|
879
|
+
type: Input
|
|
880
|
+
}], filename: [{
|
|
881
|
+
type: Input
|
|
882
|
+
}], disableFilename: [{
|
|
883
|
+
type: Input
|
|
884
|
+
}], author: [{
|
|
885
|
+
type: Input
|
|
886
|
+
}], disableAuthor: [{
|
|
887
|
+
type: Input
|
|
888
|
+
}], status: [{
|
|
889
|
+
type: Input
|
|
890
|
+
}], disableStatus: [{
|
|
891
|
+
type: Input
|
|
892
|
+
}], language: [{
|
|
893
|
+
type: Input
|
|
894
|
+
}], disableLanguage: [{
|
|
895
|
+
type: Input
|
|
896
|
+
}], documentType: [{
|
|
897
|
+
type: Input
|
|
898
|
+
}], disableDocumentType: [{
|
|
899
|
+
type: Input
|
|
900
|
+
}], description: [{
|
|
901
|
+
type: Input
|
|
902
|
+
}], disableDescription: [{
|
|
903
|
+
type: Input
|
|
904
|
+
}], confidentialityLevel: [{
|
|
905
|
+
type: Input
|
|
906
|
+
}], disableConfidentialityLevel: [{
|
|
907
|
+
type: Input
|
|
908
|
+
}], trefwoorden: [{
|
|
909
|
+
type: Input
|
|
910
|
+
}], disableTrefwoorden: [{
|
|
911
|
+
type: Input
|
|
912
|
+
}], metadata: [{
|
|
913
|
+
type: Output
|
|
914
|
+
}] } });
|
|
915
|
+
|
|
916
|
+
/*
|
|
917
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
918
|
+
*
|
|
919
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
920
|
+
* you may not use this file except in compliance with the License.
|
|
921
|
+
* You may obtain a copy of the License at
|
|
922
|
+
*
|
|
923
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
924
|
+
*
|
|
925
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
926
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
927
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
928
|
+
* See the License for the specific language governing permissions and
|
|
929
|
+
* limitations under the License.
|
|
930
|
+
*/
|
|
931
|
+
class DossierDetailTabDocumentenApiDocumentsComponent {
|
|
932
|
+
constructor(route, router, uploadProviderService, downloadService, translateService, configService, userProviderService, fileSortService, iconService, documentenApiDocumentService) {
|
|
933
|
+
this.route = route;
|
|
934
|
+
this.router = router;
|
|
935
|
+
this.uploadProviderService = uploadProviderService;
|
|
936
|
+
this.downloadService = downloadService;
|
|
937
|
+
this.translateService = translateService;
|
|
938
|
+
this.configService = configService;
|
|
939
|
+
this.userProviderService = userProviderService;
|
|
940
|
+
this.fileSortService = fileSortService;
|
|
941
|
+
this.iconService = iconService;
|
|
942
|
+
this.documentenApiDocumentService = documentenApiDocumentService;
|
|
943
|
+
this.actionItems = [
|
|
944
|
+
{
|
|
945
|
+
label: 'document.download',
|
|
946
|
+
callback: this.onDownloadActionClick.bind(this),
|
|
947
|
+
type: 'normal',
|
|
948
|
+
},
|
|
949
|
+
{
|
|
950
|
+
label: 'document.delete',
|
|
951
|
+
callback: this.onDeleteActionClick.bind(this),
|
|
952
|
+
type: 'danger',
|
|
953
|
+
},
|
|
954
|
+
];
|
|
955
|
+
this.fieldsConfig = [
|
|
956
|
+
// TODO: Refactor this once admin page config is implemented
|
|
957
|
+
'title',
|
|
958
|
+
'fileName',
|
|
959
|
+
'format',
|
|
960
|
+
'size',
|
|
961
|
+
'description',
|
|
962
|
+
'createdOn',
|
|
963
|
+
'createdBy',
|
|
964
|
+
'author',
|
|
965
|
+
'informatieobjecttype',
|
|
966
|
+
'actions',
|
|
967
|
+
];
|
|
968
|
+
this._documentDefinitionName$ = this.route.params.pipe(map$1(params => params?.documentDefinitionName), filter$1(documentDefinitionName => !!documentDefinitionName));
|
|
969
|
+
this._documentId$ = this.route.params.pipe(map$1(params => params?.documentId), filter$1(documentId => !!documentId));
|
|
970
|
+
this.uploadProcessLinkedSet = false;
|
|
971
|
+
this.acceptedFiles = this.configService?.config?.caseFileUploadAcceptedFiles || null;
|
|
972
|
+
this.maxFileSize = this.configService?.config?.caseFileSizeUploadLimitMB || 5;
|
|
973
|
+
this.fileToBeUploaded$ = new BehaviorSubject(null);
|
|
974
|
+
this.hideModal$ = new Subject();
|
|
975
|
+
this.modalDisabled$ = new BehaviorSubject(false);
|
|
976
|
+
this.showModal$ = new Subject();
|
|
977
|
+
this.uploading$ = new BehaviorSubject(false);
|
|
978
|
+
this.loading$ = new BehaviorSubject(true);
|
|
979
|
+
this._refetch$ = new BehaviorSubject(null);
|
|
980
|
+
this.relatedFiles$ = combineLatest([
|
|
981
|
+
this._documentId$,
|
|
982
|
+
this._refetch$,
|
|
983
|
+
]).pipe(tap$1(() => this.loading$.next(true)), switchMap$1(([documentId]) => combineLatest([
|
|
984
|
+
this.documentenApiDocumentService.getZakenApiDocuments(documentId),
|
|
985
|
+
this.translateService.stream('key'),
|
|
986
|
+
])), map$1(([relatedFiles]) => {
|
|
987
|
+
const translatedFiles = relatedFiles?.map(file => ({
|
|
988
|
+
...file,
|
|
989
|
+
createdBy: file.createdBy || this.translateService.instant('list.automaticallyGenerated'),
|
|
990
|
+
language: this.translateService.instant(`document.${file.language}`),
|
|
991
|
+
confidentialityLevel: this.translateService.instant(`document.${file.confidentialityLevel}`),
|
|
992
|
+
status: this.translateService.instant(`document.${file.status}`),
|
|
993
|
+
format: this.translateService.instant(`document.${file.format}`),
|
|
994
|
+
}));
|
|
995
|
+
return translatedFiles || [];
|
|
996
|
+
}), map$1(relatedFiles => this.fileSortService.sortRelatedFilesByDateDescending(relatedFiles)), map$1(relatedFiles => {
|
|
997
|
+
moment.locale(this.translateService.currentLang);
|
|
998
|
+
return relatedFiles.map(file => ({
|
|
999
|
+
...file,
|
|
1000
|
+
createdOn: moment(new Date(file.createdOn)).format('L'),
|
|
1001
|
+
size: `${this.bytesToMegabytes(file.sizeInBytes)}`,
|
|
1002
|
+
}));
|
|
1003
|
+
}), tap$1(() => {
|
|
1004
|
+
this.loading$.next(false);
|
|
1005
|
+
}), catchError(() => {
|
|
1006
|
+
this.showZaakLinkWarning = true;
|
|
1007
|
+
this.loading$.next(false);
|
|
1008
|
+
return of([]);
|
|
1009
|
+
}));
|
|
1010
|
+
}
|
|
1011
|
+
ngOnInit() {
|
|
1012
|
+
this.refetchDocuments();
|
|
1013
|
+
this.setUploadProcessLinked();
|
|
1014
|
+
this.isUserAdmin();
|
|
1015
|
+
this.iconService.registerAll([Filter16, TagGroup16, Upload16]);
|
|
1016
|
+
}
|
|
1017
|
+
ngAfterViewInit() {
|
|
1018
|
+
const fieldOptions = [
|
|
1019
|
+
{ key: 'title', label: 'document.inputTitle' },
|
|
1020
|
+
{ key: 'description', label: 'document.inputDescription' },
|
|
1021
|
+
{ key: 'fileName', label: 'document.filename' },
|
|
1022
|
+
{
|
|
1023
|
+
viewType: ViewType.TEMPLATE,
|
|
1024
|
+
label: 'document.size',
|
|
1025
|
+
key: 'size',
|
|
1026
|
+
template: this.sizeTemplate,
|
|
1027
|
+
},
|
|
1028
|
+
{ key: 'format', label: 'document.format' },
|
|
1029
|
+
{ key: 'createdOn', label: 'document.createdOn' },
|
|
1030
|
+
{ key: 'createdBy', label: 'document.createdBy' },
|
|
1031
|
+
{ key: 'author', label: 'document.author' },
|
|
1032
|
+
{ key: 'keywords', label: 'document.trefwoorden' },
|
|
1033
|
+
{ key: 'informatieobjecttype', label: 'document.informatieobjecttype' },
|
|
1034
|
+
{ key: 'language', label: 'document.language' },
|
|
1035
|
+
{ key: 'identification', label: 'document.id' },
|
|
1036
|
+
{ key: 'confidentialityLevel', label: 'document.confidentialityLevel' },
|
|
1037
|
+
{ key: 'receiptDate', label: 'document.receiptDate' },
|
|
1038
|
+
{ key: 'sendDate', label: 'document.sendDate' },
|
|
1039
|
+
{ key: 'status', label: 'document.status' },
|
|
1040
|
+
];
|
|
1041
|
+
this.fields = [...this.getFields(fieldOptions, this.fieldsConfig)];
|
|
1042
|
+
}
|
|
1043
|
+
bytesToMegabytes(bytes) {
|
|
1044
|
+
const megabytes = bytes / (1024 * 1024);
|
|
1045
|
+
if (megabytes < 1) {
|
|
1046
|
+
return `${Math.ceil(megabytes * 1000)} KB`;
|
|
1047
|
+
}
|
|
1048
|
+
else if (megabytes < 1000) {
|
|
1049
|
+
return megabytes.toFixed(2) + ' MB';
|
|
1050
|
+
}
|
|
1051
|
+
return (megabytes / 1000).toFixed(2) + ' GB';
|
|
1052
|
+
}
|
|
1053
|
+
getUploadButtonTooltip() {
|
|
1054
|
+
if (this.uploadProcessLinkedSet && this.uploadProcessLinked) {
|
|
1055
|
+
return 'Upload';
|
|
1056
|
+
}
|
|
1057
|
+
else if (this.isAdmin) {
|
|
1058
|
+
return 'dossier.documenten.noProcessLinked.adminRole';
|
|
1059
|
+
}
|
|
1060
|
+
return 'dossier.documenten.noProcessLinked.regularUser';
|
|
1061
|
+
}
|
|
1062
|
+
isUserAdmin() {
|
|
1063
|
+
this.userProviderService.getUserSubject().subscribe(userIdentity => {
|
|
1064
|
+
this.isAdmin = userIdentity.roles.includes('ROLE_ADMIN');
|
|
1065
|
+
}, error => {
|
|
1066
|
+
this.isAdmin = false;
|
|
1067
|
+
});
|
|
1068
|
+
}
|
|
1069
|
+
metadataSet(metadata) {
|
|
1070
|
+
this.uploading$.next(true);
|
|
1071
|
+
this.hideModal$.next(null);
|
|
1072
|
+
combineLatest([this.fileToBeUploaded$, this._documentId$])
|
|
1073
|
+
.pipe(take$1(1))
|
|
1074
|
+
.pipe(tap$1(([file, documentId]) => {
|
|
1075
|
+
if (!file)
|
|
1076
|
+
return;
|
|
1077
|
+
this.uploadProviderService
|
|
1078
|
+
.uploadFileWithMetadata(file, documentId, metadata)
|
|
1079
|
+
.subscribe(() => {
|
|
1080
|
+
this.refetchDocuments();
|
|
1081
|
+
this.uploading$.next(false);
|
|
1082
|
+
this.fileToBeUploaded$.next(null);
|
|
1083
|
+
});
|
|
1084
|
+
}))
|
|
1085
|
+
.subscribe();
|
|
1086
|
+
}
|
|
1087
|
+
onDeleteActionClick(item) {
|
|
1088
|
+
this.loading$.next(true);
|
|
1089
|
+
this.documentenApiDocumentService.deleteDocument(item).subscribe(() => {
|
|
1090
|
+
// TODO: Use refetchDocuments() or should we just remove the document from relatedFiles$?
|
|
1091
|
+
this.refetchDocuments();
|
|
1092
|
+
});
|
|
1093
|
+
}
|
|
1094
|
+
onDownloadActionClick(file) {
|
|
1095
|
+
this.downloadDocument(file, true);
|
|
1096
|
+
}
|
|
1097
|
+
onFileSelected(event) {
|
|
1098
|
+
this.fileToBeUploaded$.next(event.target.files[0]);
|
|
1099
|
+
this.showModal$.next(null);
|
|
1100
|
+
}
|
|
1101
|
+
onNavigateToCaseAdminClick() {
|
|
1102
|
+
this._documentDefinitionName$.pipe(take$1(1)).subscribe(documentDefinitionName => {
|
|
1103
|
+
this.router.navigate([`/dossier-management/dossier/${documentDefinitionName}`]);
|
|
1104
|
+
});
|
|
1105
|
+
}
|
|
1106
|
+
onRowClick(event) {
|
|
1107
|
+
this.downloadDocument(event, false);
|
|
1108
|
+
}
|
|
1109
|
+
onUploadButtonClick() {
|
|
1110
|
+
this.fileInput.nativeElement.click();
|
|
1111
|
+
}
|
|
1112
|
+
refetchDocuments() {
|
|
1113
|
+
this._refetch$.next(null);
|
|
1114
|
+
}
|
|
1115
|
+
downloadDocument(relatedFile, forceDownload) {
|
|
1116
|
+
this.downloadService.downloadFile(`/api/v1/documenten-api/${relatedFile.pluginConfigurationId}/files/${relatedFile.fileId}/download`, relatedFile.fileName, forceDownload);
|
|
1117
|
+
}
|
|
1118
|
+
getFields(fieldOptions, fieldsConfig) {
|
|
1119
|
+
return fieldOptions.filter(fieldOption => fieldsConfig.includes(fieldOption.key));
|
|
1120
|
+
}
|
|
1121
|
+
setUploadProcessLinked() {
|
|
1122
|
+
this._documentDefinitionName$
|
|
1123
|
+
.pipe(switchMap$1(documentDefinitionName => this.uploadProviderService.checkUploadProcessLink(documentDefinitionName)), take$1(1), tap$1(() => {
|
|
1124
|
+
this.uploadProcessLinkedSet = true;
|
|
1125
|
+
}))
|
|
1126
|
+
.subscribe((linked) => {
|
|
1127
|
+
this.uploadProcessLinked = linked;
|
|
1128
|
+
});
|
|
1129
|
+
}
|
|
1130
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: DossierDetailTabDocumentenApiDocumentsComponent, deps: [{ token: i1$1.ActivatedRoute }, { token: i1$1.Router }, { token: i2$2.UploadProviderService }, { token: i2$2.DownloadService }, { token: i3$1.TranslateService }, { token: i2$1.ConfigService }, { token: i5$2.UserProviderService }, { token: i3.FileSortService }, { token: i2.IconService }, { token: DocumentenApiDocumentService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1131
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.3", type: DossierDetailTabDocumentenApiDocumentsComponent, isStandalone: true, selector: "valtimo-dossier-detail-tab-documenten-api-documents", viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true }, { propertyName: "sizeTemplate", first: true, predicate: ["sizeTemplate"], descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div\n class=\"carbon-document-table-wrapper\"\n *ngIf=\"{\n loading: loading$ | async,\n uploading: uploading$ | async,\n relatedFiles: relatedFiles$ | async\n } as obs\"\n>\n @if (!obs.loading && !obs.uploading && obs.relatedFiles) {\n <ng-container\n *ngTemplateOutlet=\"list; context: {relatedFiles: obs.relatedFiles}\"\n ></ng-container>\n } @else {\n <ng-container *ngTemplateOutlet=\"listLoading\"></ng-container>\n }\n</div>\n\n<valtimo-documenten-api-metadata-modal\n [disabled$]=\"modalDisabled$\"\n [file$]=\"fileToBeUploaded$\"\n [hide$]=\"hideModal$\"\n [show$]=\"showModal$\"\n (metadata)=\"metadataSet($event)\"\n></valtimo-documenten-api-metadata-modal>\n\n<ng-template #list let-relatedFiles=\"relatedFiles\">\n <valtimo-carbon-list\n [actionItems]=\"actionItems\"\n [items]=\"relatedFiles\"\n [fields]=\"fields\"\n (rowClicked)=\"onRowClick($event)\"\n hideColumnHeader\n >\n <div carbonToolbarContent>\n <input\n [accept]=\"acceptedFiles\"\n (change)=\"onFileSelected($event)\"\n hidden\n type=\"file\"\n #fileInput\n />\n\n <ng-container *ngTemplateOutlet=\"uploadButton\"></ng-container>\n </div>\n\n @if (showZaakLinkWarning && isAdmin) {\n <valtimo-no-results\n [action]=\"navigateToCaseAdminButton\"\n description=\"{{ 'dossier.documenten.noZaakFound' | translate }}\"\n title=\"{{ 'dossier.documenten.noZaakFoundTitle' | translate }}\"\n ></valtimo-no-results>\n } @else {\n <valtimo-no-results\n [action]=\"uploadButton\"\n description=\"{{ 'dossier.documenten.noFiles' | translate }}\"\n title=\"{{ 'dossier.documenten.noFilesTitle' | translate }}\"\n ></valtimo-no-results>\n }\n </valtimo-carbon-list>\n</ng-template>\n\n<ng-template #listLoading>\n <valtimo-carbon-list [items]=\"[]\" [fields]=\"fields\" [loading]=\"true\" hideColumnHeader>\n <div carbonToolbarContent>\n <ng-container *ngTemplateOutlet=\"uploadButton; context: {disabled: true}\"></ng-container>\n </div>\n </valtimo-carbon-list>\n</ng-template>\n\n<ng-template #downloadButton let-index=\"index\" let-item=\"item\">\n <div\n *ngIf=\"{isDownloading: indexesIncludeIndex(downloadingFileIndexes$ | async, index)} as vars\"\n class=\"download-button-container\"\n >\n <button\n *ngIf=\"!vars.isDownloading\"\n cdsButton=\"primary\"\n size=\"sm\"\n (click)=\"downloadDocument(item, index)\"\n >\n {{ 'interface.download' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"download\" size=\"16\"></svg>\n </button>\n\n <cds-loading size=\"sm\" *ngIf=\"vars.isDownloading\"></cds-loading>\n </div>\n</ng-template>\n\n<ng-template #dossierListActions>\n <input [accept]=\"acceptedFiles\" (change)=\"onFileSelected($event)\" hidden type=\"file\" #fileInput />\n <ng-container *ngTemplateOutlet=\"uploadButton\"></ng-container>\n</ng-template>\n\n<ng-template #uploadButton let-disabled=\"disabled\">\n <button\n [disabled]=\"(uploadProcessLinkedSet && !uploadProcessLinked) || showZaakLinkWarning || disabled\"\n [vTooltip]=\"getUploadButtonTooltip() | translate\"\n (click)=\"onUploadButtonClick()\"\n cdsButton=\"primary\"\n >\n {{ 'Upload' | translate }}\n <svg class=\"cds--btn__icon\" cdsIcon=\"upload\" size=\"16\"></svg>\n </button>\n</ng-template>\n\n<ng-template #navigateToCaseAdminButton>\n <button (click)=\"onNavigateToCaseAdminClick()\" cdsButton=\"primary\">\n {{ 'dossier.documenten.navigateToCaseAdmin' | translate }}\n <svg class=\"cds--btn__icon\" cdsIcon=\"settings\" size=\"16\"></svg>\n </button>\n</ng-template>\n\n<ng-template #sizeTemplate let-data=\"data\">\n <div class=\"documenten-api-documents-filesize-template\">\n {{ bytesToMegabytes(data.item.sizeInBytes) }}\n </div>\n</ng-template>\n", styles: [".hidden{display:none}.loading-container{padding:var(--cds-grid-margin);display:flex;align-items:center;justify-content:center}.carbon-document-table-wrapper{margin:0}.documenten-api-documents-filesize-template{text-align:right}\n/*!\n * Copyright 2015-2024 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: CarbonListModule }, { kind: "component", type: i3$2.CarbonListComponent, selector: "valtimo-carbon-list", inputs: ["items", "fields", "tableTranslations", "paginatorConfig", "pagination", "loading", "actions", "actionItems", "header", "hideColumnHeader", "initialSortState", "isSearchable", "enableSingleSelection", "lastColumnTemplate", "paginationIdentifier", "showSelectionColumn", "striped", "hideToolbar", "lockedTooltipTranslationKey", "movingRowsEnabled"], outputs: ["rowClicked", "paginationClicked", "paginationSet", "search", "sortChanged", "moveRow", "itemsReordered"] }, { kind: "component", type: i3$2.CarbonNoResultsComponent, selector: "valtimo-no-results", inputs: ["action", "description", "illustration", "title"] }, { kind: "component", type: DocumentenApiMetadataModalComponent, selector: "valtimo-documenten-api-metadata-modal", inputs: ["show$", "hide$", "disabled$", "file$", "documentTitle", "disableDocumentTitle", "filename", "disableFilename", "author", "disableAuthor", "status", "disableStatus", "language", "disableLanguage", "documentType", "disableDocumentType", "description", "disableDescription", "confidentialityLevel", "disableConfidentialityLevel", "trefwoorden", "disableTrefwoorden"], outputs: ["metadata"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i2.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "ngmodule", type: IconModule }, { kind: "directive", type: i2.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }] }); }
|
|
1132
|
+
}
|
|
1133
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: DossierDetailTabDocumentenApiDocumentsComponent, decorators: [{
|
|
1134
|
+
type: Component,
|
|
1135
|
+
args: [{ selector: 'valtimo-dossier-detail-tab-documenten-api-documents', standalone: true, imports: [
|
|
1136
|
+
CommonModule,
|
|
1137
|
+
CarbonListModule,
|
|
1138
|
+
DocumentenApiMetadataModalComponent,
|
|
1139
|
+
ButtonModule,
|
|
1140
|
+
IconModule,
|
|
1141
|
+
TranslateModule,
|
|
1142
|
+
], template: "<!--\n ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div\n class=\"carbon-document-table-wrapper\"\n *ngIf=\"{\n loading: loading$ | async,\n uploading: uploading$ | async,\n relatedFiles: relatedFiles$ | async\n } as obs\"\n>\n @if (!obs.loading && !obs.uploading && obs.relatedFiles) {\n <ng-container\n *ngTemplateOutlet=\"list; context: {relatedFiles: obs.relatedFiles}\"\n ></ng-container>\n } @else {\n <ng-container *ngTemplateOutlet=\"listLoading\"></ng-container>\n }\n</div>\n\n<valtimo-documenten-api-metadata-modal\n [disabled$]=\"modalDisabled$\"\n [file$]=\"fileToBeUploaded$\"\n [hide$]=\"hideModal$\"\n [show$]=\"showModal$\"\n (metadata)=\"metadataSet($event)\"\n></valtimo-documenten-api-metadata-modal>\n\n<ng-template #list let-relatedFiles=\"relatedFiles\">\n <valtimo-carbon-list\n [actionItems]=\"actionItems\"\n [items]=\"relatedFiles\"\n [fields]=\"fields\"\n (rowClicked)=\"onRowClick($event)\"\n hideColumnHeader\n >\n <div carbonToolbarContent>\n <input\n [accept]=\"acceptedFiles\"\n (change)=\"onFileSelected($event)\"\n hidden\n type=\"file\"\n #fileInput\n />\n\n <ng-container *ngTemplateOutlet=\"uploadButton\"></ng-container>\n </div>\n\n @if (showZaakLinkWarning && isAdmin) {\n <valtimo-no-results\n [action]=\"navigateToCaseAdminButton\"\n description=\"{{ 'dossier.documenten.noZaakFound' | translate }}\"\n title=\"{{ 'dossier.documenten.noZaakFoundTitle' | translate }}\"\n ></valtimo-no-results>\n } @else {\n <valtimo-no-results\n [action]=\"uploadButton\"\n description=\"{{ 'dossier.documenten.noFiles' | translate }}\"\n title=\"{{ 'dossier.documenten.noFilesTitle' | translate }}\"\n ></valtimo-no-results>\n }\n </valtimo-carbon-list>\n</ng-template>\n\n<ng-template #listLoading>\n <valtimo-carbon-list [items]=\"[]\" [fields]=\"fields\" [loading]=\"true\" hideColumnHeader>\n <div carbonToolbarContent>\n <ng-container *ngTemplateOutlet=\"uploadButton; context: {disabled: true}\"></ng-container>\n </div>\n </valtimo-carbon-list>\n</ng-template>\n\n<ng-template #downloadButton let-index=\"index\" let-item=\"item\">\n <div\n *ngIf=\"{isDownloading: indexesIncludeIndex(downloadingFileIndexes$ | async, index)} as vars\"\n class=\"download-button-container\"\n >\n <button\n *ngIf=\"!vars.isDownloading\"\n cdsButton=\"primary\"\n size=\"sm\"\n (click)=\"downloadDocument(item, index)\"\n >\n {{ 'interface.download' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"download\" size=\"16\"></svg>\n </button>\n\n <cds-loading size=\"sm\" *ngIf=\"vars.isDownloading\"></cds-loading>\n </div>\n</ng-template>\n\n<ng-template #dossierListActions>\n <input [accept]=\"acceptedFiles\" (change)=\"onFileSelected($event)\" hidden type=\"file\" #fileInput />\n <ng-container *ngTemplateOutlet=\"uploadButton\"></ng-container>\n</ng-template>\n\n<ng-template #uploadButton let-disabled=\"disabled\">\n <button\n [disabled]=\"(uploadProcessLinkedSet && !uploadProcessLinked) || showZaakLinkWarning || disabled\"\n [vTooltip]=\"getUploadButtonTooltip() | translate\"\n (click)=\"onUploadButtonClick()\"\n cdsButton=\"primary\"\n >\n {{ 'Upload' | translate }}\n <svg class=\"cds--btn__icon\" cdsIcon=\"upload\" size=\"16\"></svg>\n </button>\n</ng-template>\n\n<ng-template #navigateToCaseAdminButton>\n <button (click)=\"onNavigateToCaseAdminClick()\" cdsButton=\"primary\">\n {{ 'dossier.documenten.navigateToCaseAdmin' | translate }}\n <svg class=\"cds--btn__icon\" cdsIcon=\"settings\" size=\"16\"></svg>\n </button>\n</ng-template>\n\n<ng-template #sizeTemplate let-data=\"data\">\n <div class=\"documenten-api-documents-filesize-template\">\n {{ bytesToMegabytes(data.item.sizeInBytes) }}\n </div>\n</ng-template>\n", styles: [".hidden{display:none}.loading-container{padding:var(--cds-grid-margin);display:flex;align-items:center;justify-content:center}.carbon-document-table-wrapper{margin:0}.documenten-api-documents-filesize-template{text-align:right}\n/*!\n * Copyright 2015-2024 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"] }]
|
|
1143
|
+
}], ctorParameters: () => [{ type: i1$1.ActivatedRoute }, { type: i1$1.Router }, { type: i2$2.UploadProviderService }, { type: i2$2.DownloadService }, { type: i3$1.TranslateService }, { type: i2$1.ConfigService }, { type: i5$2.UserProviderService }, { type: i3.FileSortService }, { type: i2.IconService }, { type: DocumentenApiDocumentService }], propDecorators: { fileInput: [{
|
|
1144
|
+
type: ViewChild,
|
|
1145
|
+
args: ['fileInput']
|
|
1146
|
+
}], sizeTemplate: [{
|
|
1147
|
+
type: ViewChild,
|
|
1148
|
+
args: ['sizeTemplate']
|
|
1149
|
+
}] } });
|
|
1150
|
+
|
|
1151
|
+
/*
|
|
1152
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
1153
|
+
*
|
|
1154
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1155
|
+
* you may not use this file except in compliance with the License.
|
|
1156
|
+
* You may obtain a copy of the License at
|
|
1157
|
+
*
|
|
1158
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1159
|
+
*
|
|
1160
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1161
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1162
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1163
|
+
* See the License for the specific language governing permissions and
|
|
1164
|
+
* limitations under the License.
|
|
1165
|
+
*/
|
|
1166
|
+
class DossierManagementLinkProcessComponent {
|
|
1167
|
+
constructor(configService, route, documentenApiLinkProcessService, documentenApiVersionService) {
|
|
1168
|
+
this.configService = configService;
|
|
1169
|
+
this.route = route;
|
|
1170
|
+
this.documentenApiLinkProcessService = documentenApiLinkProcessService;
|
|
1171
|
+
this.documentenApiVersionService = documentenApiVersionService;
|
|
1172
|
+
this.documentenApiUploadProviders$ = new BehaviorSubject(false);
|
|
1173
|
+
this._documentDefinitionName$ = this.route.params.pipe(map(params => params?.name), filter$1(name => !!name));
|
|
1174
|
+
this.selectedProcessKey$ = new BehaviorSubject('');
|
|
1175
|
+
this.processItems$ = combineLatest([
|
|
1176
|
+
this.documentenApiLinkProcessService.getProcessDefinitions(),
|
|
1177
|
+
this.selectedProcessKey$,
|
|
1178
|
+
]).pipe(map(([definitions, selectedProcessKey]) => (definitions || [])
|
|
1179
|
+
.filter(definition => !!definition?.key)
|
|
1180
|
+
.map(process => ({
|
|
1181
|
+
content: process?.name || '-',
|
|
1182
|
+
id: process.key,
|
|
1183
|
+
selected: selectedProcessKey === process.key,
|
|
1184
|
+
}))), tap(() => this.documentenApiVersionService.refresh()));
|
|
1185
|
+
this.disabled$ = new BehaviorSubject(false);
|
|
1186
|
+
}
|
|
1187
|
+
ngOnInit() {
|
|
1188
|
+
this.setDocumentenApiUploaderProvider(this.configService.config);
|
|
1189
|
+
}
|
|
1190
|
+
selectProcess(item) {
|
|
1191
|
+
const processDefinitionKey = item?.id;
|
|
1192
|
+
this.disabled$.next(true);
|
|
1193
|
+
const currentSelectionId = this.selectedProcessKey$.getValue();
|
|
1194
|
+
if (processDefinitionKey && processDefinitionKey !== currentSelectionId) {
|
|
1195
|
+
this.disabled$.next(true);
|
|
1196
|
+
this._documentDefinitionName$
|
|
1197
|
+
.pipe(switchMap(documentDefinitionName => this.documentenApiLinkProcessService.updateLinkedUploadProcess(documentDefinitionName, processDefinitionKey)))
|
|
1198
|
+
.subscribe(processLink => {
|
|
1199
|
+
this.selectedProcessKey$.next(processLink.processDefinitionKey);
|
|
1200
|
+
this.disabled$.next(false);
|
|
1201
|
+
});
|
|
1202
|
+
}
|
|
1203
|
+
else if (!processDefinitionKey) {
|
|
1204
|
+
this._documentDefinitionName$
|
|
1205
|
+
.pipe(switchMap(documentDefinitionName => this.documentenApiLinkProcessService.deleteLinkedUploadProcess(documentDefinitionName)))
|
|
1206
|
+
.subscribe(() => {
|
|
1207
|
+
this.selectedProcessKey$.next('');
|
|
1208
|
+
this.disabled$.next(false);
|
|
1209
|
+
});
|
|
1210
|
+
}
|
|
1211
|
+
}
|
|
1212
|
+
setDocumentenApiUploaderProvider(config) {
|
|
1213
|
+
const hasDocumentenApiUploadProvider = config.uploadProvider === UploadProvider.DOCUMENTEN_API;
|
|
1214
|
+
this.documentenApiUploadProviders$.next(hasDocumentenApiUploadProvider);
|
|
1215
|
+
if (hasDocumentenApiUploadProvider)
|
|
1216
|
+
this.getDefaultSelection();
|
|
1217
|
+
}
|
|
1218
|
+
getDefaultSelection() {
|
|
1219
|
+
this._documentDefinitionName$
|
|
1220
|
+
.pipe(switchMap(documentDefinitionName => this.documentenApiLinkProcessService.getLinkedUploadProcess(documentDefinitionName)))
|
|
1221
|
+
.subscribe(linkedUploadProcess => {
|
|
1222
|
+
if (linkedUploadProcess) {
|
|
1223
|
+
this.selectedProcessKey$.next(linkedUploadProcess.processDefinitionKey);
|
|
1224
|
+
}
|
|
1225
|
+
});
|
|
1226
|
+
}
|
|
1227
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: DossierManagementLinkProcessComponent, deps: [{ token: i2$1.ConfigService }, { token: i1$1.ActivatedRoute }, { token: DocumentenApiLinkProcessService }, { token: DocumentenApiVersionService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1228
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: DossierManagementLinkProcessComponent, isStandalone: true, selector: "valtimo-dossier-management-link-process", ngImport: i0, template: "<!--\n ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container *ngIf=\"documentenApiUploadProviders$ | async\">\n <h2 class=\"mb-4\">{{ 'dossierManagement.linkProcess.title' | translate }}</h2>\n\n <v-paragraph [margin]=\"true\">{{\n 'dossierManagement.linkProcess.description' | translate\n }}</v-paragraph>\n\n <ng-container\n *ngIf=\"{\n processItems: processItems$ | async,\n disabled: disabled$ | async\n } as obs\"\n >\n <cds-combo-box\n [appendInline]=\"true\"\n (selected)=\"selectProcess($event)\"\n [disabled]=\"obs.disabled || !obs.processItems\"\n >\n <cds-dropdown-list [items]=\"obs.processItems || []\"></cds-dropdown-list>\n </cds-combo-box>\n </ng-container>\n</ng-container>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: ParagraphModule }, { kind: "component", type: i3$2.ParagraphComponent, selector: "v-paragraph", inputs: ["center", "fullWidth", "margin", "italic", "loading"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: ComboBoxModule }, { kind: "component", type: i2.ComboBox, selector: "cds-combo-box, ibm-combo-box", inputs: ["placeholder", "openMenuAria", "closeMenuAria", "clearSelectionsTitle", "clearSelectionsAria", "clearSelectionTitle", "clearSelectionAria", "id", "items", "type", "size", "itemValueKey", "label", "helperText", "appendInline", "invalid", "invalidText", "warn", "warnText", "maxLength", "theme", "selectionFeedback", "autocomplete", "dropUp", "disabled"], outputs: ["selected", "submit", "close", "search", "clear"] }, { kind: "component", type: i2.DropdownList, selector: "cds-dropdown-list, ibm-dropdown-list", inputs: ["ariaLabel", "items", "listTpl", "type", "showTitles"], outputs: ["select", "scroll", "blurIntent"] }] }); }
|
|
1229
|
+
}
|
|
1230
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: DossierManagementLinkProcessComponent, decorators: [{
|
|
1231
|
+
type: Component,
|
|
1232
|
+
args: [{ selector: 'valtimo-dossier-management-link-process', standalone: true, imports: [CommonModule, ParagraphModule, TranslateModule, ComboBoxModule], template: "<!--\n ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container *ngIf=\"documentenApiUploadProviders$ | async\">\n <h2 class=\"mb-4\">{{ 'dossierManagement.linkProcess.title' | translate }}</h2>\n\n <v-paragraph [margin]=\"true\">{{\n 'dossierManagement.linkProcess.description' | translate\n }}</v-paragraph>\n\n <ng-container\n *ngIf=\"{\n processItems: processItems$ | async,\n disabled: disabled$ | async\n } as obs\"\n >\n <cds-combo-box\n [appendInline]=\"true\"\n (selected)=\"selectProcess($event)\"\n [disabled]=\"obs.disabled || !obs.processItems\"\n >\n <cds-dropdown-list [items]=\"obs.processItems || []\"></cds-dropdown-list>\n </cds-combo-box>\n </ng-container>\n</ng-container>\n" }]
|
|
1233
|
+
}], ctorParameters: () => [{ type: i2$1.ConfigService }, { type: i1$1.ActivatedRoute }, { type: DocumentenApiLinkProcessService }, { type: DocumentenApiVersionService }] });
|
|
1234
|
+
|
|
1235
|
+
/*
|
|
1236
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
1237
|
+
*
|
|
1238
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1239
|
+
* you may not use this file except in compliance with the License.
|
|
1240
|
+
* You may obtain a copy of the License at
|
|
1241
|
+
*
|
|
1242
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1243
|
+
*
|
|
1244
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1245
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1246
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1247
|
+
* See the License for the specific language governing permissions and
|
|
1248
|
+
* limitations under the License.
|
|
1249
|
+
*/
|
|
1250
|
+
class DocumentenApiVersionComponent {
|
|
1251
|
+
constructor(route, documentenApiVersionService) {
|
|
1252
|
+
this.route = route;
|
|
1253
|
+
this.documentenApiVersionService = documentenApiVersionService;
|
|
1254
|
+
this.loading$ = new BehaviorSubject(true);
|
|
1255
|
+
this.documentDefinitionName$ = this.route.params.pipe(map(params => params.name || ''), filter$1(documentDefinitionName => !!documentDefinitionName));
|
|
1256
|
+
this.documentenApiVersion$ = combineLatest([this.documentDefinitionName$, this.documentenApiVersionService.refresh$]).pipe(tap(() => this.loading$.next(true)), switchMap(([documentDefinitionName]) => this.documentenApiVersionService.getManagementApiVersion(documentDefinitionName)), tap(() => this.loading$.next(false)));
|
|
1257
|
+
}
|
|
1258
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: DocumentenApiVersionComponent, deps: [{ token: i1$1.ActivatedRoute }, { token: DocumentenApiVersionService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1259
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: DocumentenApiVersionComponent, isStandalone: true, selector: "valtimo-documenten-api-version", ngImport: i0, template: "<!--\n ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n<div class=\"input-group mt-4 mb-2 align-items-center\">\n <div>\n <h2>{{ 'openZaak.documentenApi.title' | translate }}</h2>\n </div>\n</div>\n\n<ng-container\n *ngIf=\"{\n loading: loading$ | async,\n documentenApiVersion: documentenApiVersion$ | async\n } as obs\"\n>\n <ng-container *ngIf=\"obs.loading === false; else loading\">\n <ng-container\n *ngIf=\"obs.documentenApiVersion.selectedVersion; else noDocumentenApiVersionWarning\"\n >\n <ng-container\n *ngIf=\"\n obs.documentenApiVersion.detectedVersions.length === 1;\n else multipleDocumentenApiVersionsWarning\n \"\n >\n {{ 'openZaak.documentenApi.documentenApiVersion' | translate }}\n <strong> {{ obs.documentenApiVersion.selectedVersion }} </strong>\n </ng-container>\n </ng-container>\n </ng-container>\n</ng-container>\n\n<ng-template #noDocumentenApiVersionWarning>\n <div class=\"pb-2\">\n <cds-notification\n class=\"full-width-notification\"\n [notificationObj]=\"{\n type: 'warning',\n title: 'openZaak.documentenApi.noVersionWarningTitle' | translate,\n message: 'openZaak.documentenApi.noVersionWarningMessage' | translate,\n showClose: false\n }\"\n >\n </cds-notification>\n </div>\n</ng-template>\n\n<ng-template #multipleDocumentenApiVersionsWarning>\n <div class=\"pb-2\">\n <cds-notification\n class=\"full-width-notification\"\n [notificationObj]=\"{\n type: 'warning',\n title: 'openZaak.documentenApi.multipleVersionsWarningTitle' | translate,\n message: 'openZaak.documentenApi.multipleVersionsWarningMessage' | translate,\n showClose: false\n }\"\n >\n </cds-notification>\n </div>\n</ng-template>\n\n<ng-template #loading>\n <div class=\"loading-container pb-2\">\n <cds-loading size=\"sm\"></cds-loading>\n </div>\n</ng-template>\n", styles: [".loading-container{display:flex;width:100%;justify-content:center}\n/*!\n * Copyright 2015-2024 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: LoadingModule }, { kind: "component", type: i2.Loading, selector: "cds-loading, ibm-loading", inputs: ["title", "isActive", "size", "overlay"] }, { kind: "ngmodule", type: NotificationModule }, { kind: "component", type: i2.Notification, selector: "cds-notification, cds-inline-notification, ibm-notification, ibm-inline-notification", inputs: ["notificationObj"] }] }); }
|
|
1260
|
+
}
|
|
1261
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: DocumentenApiVersionComponent, decorators: [{
|
|
1262
|
+
type: Component,
|
|
1263
|
+
args: [{ selector: 'valtimo-documenten-api-version', standalone: true, imports: [CommonModule, TranslateModule, LoadingModule, NotificationModule], template: "<!--\n ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n<div class=\"input-group mt-4 mb-2 align-items-center\">\n <div>\n <h2>{{ 'openZaak.documentenApi.title' | translate }}</h2>\n </div>\n</div>\n\n<ng-container\n *ngIf=\"{\n loading: loading$ | async,\n documentenApiVersion: documentenApiVersion$ | async\n } as obs\"\n>\n <ng-container *ngIf=\"obs.loading === false; else loading\">\n <ng-container\n *ngIf=\"obs.documentenApiVersion.selectedVersion; else noDocumentenApiVersionWarning\"\n >\n <ng-container\n *ngIf=\"\n obs.documentenApiVersion.detectedVersions.length === 1;\n else multipleDocumentenApiVersionsWarning\n \"\n >\n {{ 'openZaak.documentenApi.documentenApiVersion' | translate }}\n <strong> {{ obs.documentenApiVersion.selectedVersion }} </strong>\n </ng-container>\n </ng-container>\n </ng-container>\n</ng-container>\n\n<ng-template #noDocumentenApiVersionWarning>\n <div class=\"pb-2\">\n <cds-notification\n class=\"full-width-notification\"\n [notificationObj]=\"{\n type: 'warning',\n title: 'openZaak.documentenApi.noVersionWarningTitle' | translate,\n message: 'openZaak.documentenApi.noVersionWarningMessage' | translate,\n showClose: false\n }\"\n >\n </cds-notification>\n </div>\n</ng-template>\n\n<ng-template #multipleDocumentenApiVersionsWarning>\n <div class=\"pb-2\">\n <cds-notification\n class=\"full-width-notification\"\n [notificationObj]=\"{\n type: 'warning',\n title: 'openZaak.documentenApi.multipleVersionsWarningTitle' | translate,\n message: 'openZaak.documentenApi.multipleVersionsWarningMessage' | translate,\n showClose: false\n }\"\n >\n </cds-notification>\n </div>\n</ng-template>\n\n<ng-template #loading>\n <div class=\"loading-container pb-2\">\n <cds-loading size=\"sm\"></cds-loading>\n </div>\n</ng-template>\n", styles: [".loading-container{display:flex;width:100%;justify-content:center}\n/*!\n * Copyright 2015-2024 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"] }]
|
|
1264
|
+
}], ctorParameters: () => [{ type: i1$1.ActivatedRoute }, { type: DocumentenApiVersionService }] });
|
|
1265
|
+
|
|
1266
|
+
/*
|
|
1267
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
1268
|
+
*
|
|
1269
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1270
|
+
* you may not use this file except in compliance with the License.
|
|
1271
|
+
* You may obtain a copy of the License at
|
|
1272
|
+
*
|
|
1273
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1274
|
+
*
|
|
1275
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1276
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1277
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1278
|
+
* See the License for the specific language governing permissions and
|
|
1279
|
+
* limitations under the License.
|
|
1280
|
+
*/
|
|
1281
|
+
|
|
1282
|
+
/*
|
|
1283
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
1284
|
+
*
|
|
1285
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1286
|
+
* you may not use this file except in compliance with the License.
|
|
1287
|
+
* You may obtain a copy of the License at
|
|
1288
|
+
*
|
|
1289
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1290
|
+
*
|
|
1291
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1292
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1293
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1294
|
+
* See the License for the specific language governing permissions and
|
|
1295
|
+
* limitations under the License.
|
|
1296
|
+
*/
|
|
1297
|
+
|
|
1298
|
+
/*
|
|
1299
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
1300
|
+
*
|
|
1301
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1302
|
+
* you may not use this file except in compliance with the License.
|
|
1303
|
+
* You may obtain a copy of the License at
|
|
1304
|
+
*
|
|
1305
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1306
|
+
*
|
|
1307
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1308
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1309
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1310
|
+
* See the License for the specific language governing permissions and
|
|
1311
|
+
* limitations under the License.
|
|
1312
|
+
*/
|
|
1313
|
+
|
|
1314
|
+
/*
|
|
1315
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
1316
|
+
*
|
|
1317
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1318
|
+
* you may not use this file except in compliance with the License.
|
|
1319
|
+
* You may obtain a copy of the License at
|
|
1320
|
+
*
|
|
1321
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1322
|
+
*
|
|
1323
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1324
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1325
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1326
|
+
* See the License for the specific language governing permissions and
|
|
1327
|
+
* limitations under the License.
|
|
1328
|
+
*/
|
|
1329
|
+
|
|
1330
|
+
/*
|
|
1331
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
1332
|
+
*
|
|
1333
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1334
|
+
* you may not use this file except in compliance with the License.
|
|
1335
|
+
* You may obtain a copy of the License at
|
|
1336
|
+
*
|
|
1337
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1338
|
+
*
|
|
1339
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1340
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1341
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1342
|
+
* See the License for the specific language governing permissions and
|
|
1343
|
+
* limitations under the License.
|
|
1344
|
+
*/
|
|
1345
|
+
|
|
1346
|
+
/*
|
|
1347
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
1348
|
+
*
|
|
1349
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1350
|
+
* you may not use this file except in compliance with the License.
|
|
1351
|
+
* You may obtain a copy of the License at
|
|
1352
|
+
*
|
|
1353
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1354
|
+
*
|
|
1355
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1356
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1357
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1358
|
+
* See the License for the specific language governing permissions and
|
|
1359
|
+
* limitations under the License.
|
|
1360
|
+
*/
|
|
1361
|
+
|
|
1362
|
+
/*
|
|
1363
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
1364
|
+
*
|
|
1365
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1366
|
+
* you may not use this file except in compliance with the License.
|
|
1367
|
+
* You may obtain a copy of the License at
|
|
1368
|
+
*
|
|
1369
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1370
|
+
*
|
|
1371
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1372
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1373
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1374
|
+
* See the License for the specific language governing permissions and
|
|
1375
|
+
* limitations under the License.
|
|
1376
|
+
*/
|
|
1377
|
+
|
|
1378
|
+
/*
|
|
1379
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
1380
|
+
*
|
|
1381
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1382
|
+
* you may not use this file except in compliance with the License.
|
|
1383
|
+
* You may obtain a copy of the License at
|
|
1384
|
+
*
|
|
1385
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1386
|
+
*
|
|
1387
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1388
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1389
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1390
|
+
* See the License for the specific language governing permissions and
|
|
1391
|
+
* limitations under the License.
|
|
1392
|
+
*/
|
|
1393
|
+
|
|
1394
|
+
/*
|
|
1395
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
1396
|
+
*
|
|
1397
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1398
|
+
* you may not use this file except in compliance with the License.
|
|
1399
|
+
* You may obtain a copy of the License at
|
|
1400
|
+
*
|
|
1401
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1402
|
+
*
|
|
1403
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1404
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1405
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1406
|
+
* See the License for the specific language governing permissions and
|
|
1407
|
+
* limitations under the License.
|
|
1408
|
+
*/
|
|
1409
|
+
const documentenApiUploaderEditForm = () => ({
|
|
1410
|
+
components: [
|
|
1411
|
+
{ key: 'type', type: 'hidden' },
|
|
1412
|
+
{
|
|
1413
|
+
type: 'textfield',
|
|
1414
|
+
input: true,
|
|
1415
|
+
key: 'label',
|
|
1416
|
+
label: 'Label',
|
|
1417
|
+
placeholder: 'Label',
|
|
1418
|
+
validate: {
|
|
1419
|
+
required: true,
|
|
1420
|
+
},
|
|
1421
|
+
},
|
|
1422
|
+
{
|
|
1423
|
+
type: 'checkbox',
|
|
1424
|
+
input: true,
|
|
1425
|
+
inputType: 'checkbox',
|
|
1426
|
+
key: 'validate.required',
|
|
1427
|
+
label: 'Required',
|
|
1428
|
+
validate: {
|
|
1429
|
+
required: false,
|
|
1430
|
+
},
|
|
1431
|
+
},
|
|
1432
|
+
{
|
|
1433
|
+
type: 'textfield',
|
|
1434
|
+
input: true,
|
|
1435
|
+
key: 'key',
|
|
1436
|
+
label: 'Property Name',
|
|
1437
|
+
placeholder: 'Property Name',
|
|
1438
|
+
tooltip: 'The name of this field in the API endpoint.',
|
|
1439
|
+
validate: {
|
|
1440
|
+
required: true,
|
|
1441
|
+
},
|
|
1442
|
+
},
|
|
1443
|
+
{
|
|
1444
|
+
type: 'textfield',
|
|
1445
|
+
input: true,
|
|
1446
|
+
key: 'customOptions.title',
|
|
1447
|
+
label: 'Title',
|
|
1448
|
+
placeholder: 'Title',
|
|
1449
|
+
tooltip: 'Leave empty to use the default title',
|
|
1450
|
+
validate: {
|
|
1451
|
+
required: false,
|
|
1452
|
+
},
|
|
1453
|
+
},
|
|
1454
|
+
{
|
|
1455
|
+
type: 'checkbox',
|
|
1456
|
+
input: true,
|
|
1457
|
+
inputType: 'checkbox',
|
|
1458
|
+
key: 'customOptions.hideTitle',
|
|
1459
|
+
label: 'Hide title',
|
|
1460
|
+
validate: {
|
|
1461
|
+
required: false,
|
|
1462
|
+
},
|
|
1463
|
+
},
|
|
1464
|
+
{
|
|
1465
|
+
type: 'textfield',
|
|
1466
|
+
input: true,
|
|
1467
|
+
key: 'customOptions.subtitle',
|
|
1468
|
+
label: 'Subtitle',
|
|
1469
|
+
placeholder: 'Title',
|
|
1470
|
+
tooltip: 'Leave empty to hide subtitle',
|
|
1471
|
+
validate: {
|
|
1472
|
+
required: false,
|
|
1473
|
+
},
|
|
1474
|
+
},
|
|
1475
|
+
{
|
|
1476
|
+
type: 'number',
|
|
1477
|
+
input: true,
|
|
1478
|
+
key: 'customOptions.maxFileSize',
|
|
1479
|
+
label: 'Maximum file size',
|
|
1480
|
+
placeholder: 'Maximum file size',
|
|
1481
|
+
defaultValue: 5,
|
|
1482
|
+
validate: {
|
|
1483
|
+
required: true,
|
|
1484
|
+
},
|
|
1485
|
+
},
|
|
1486
|
+
{
|
|
1487
|
+
type: 'checkbox',
|
|
1488
|
+
input: true,
|
|
1489
|
+
inputType: 'checkbox',
|
|
1490
|
+
key: 'customOptions.hideMaxFileSize',
|
|
1491
|
+
label: 'Hide maximum file size',
|
|
1492
|
+
validate: {
|
|
1493
|
+
required: false,
|
|
1494
|
+
},
|
|
1495
|
+
},
|
|
1496
|
+
{
|
|
1497
|
+
type: 'checkbox',
|
|
1498
|
+
input: true,
|
|
1499
|
+
inputType: 'checkbox',
|
|
1500
|
+
key: 'customOptions.camera',
|
|
1501
|
+
label: 'Allow camera uploads',
|
|
1502
|
+
validate: {
|
|
1503
|
+
required: false,
|
|
1504
|
+
},
|
|
1505
|
+
},
|
|
1506
|
+
{
|
|
1507
|
+
type: 'textfield',
|
|
1508
|
+
input: true,
|
|
1509
|
+
key: 'customOptions.documentTitle',
|
|
1510
|
+
label: 'Default document title',
|
|
1511
|
+
tooltip: 'Leave empty to let the user input their own title',
|
|
1512
|
+
validate: {
|
|
1513
|
+
required: false,
|
|
1514
|
+
},
|
|
1515
|
+
},
|
|
1516
|
+
{
|
|
1517
|
+
type: 'checkbox',
|
|
1518
|
+
input: true,
|
|
1519
|
+
inputType: 'checkbox',
|
|
1520
|
+
key: 'customOptions.disableDocumentTitle',
|
|
1521
|
+
label: 'Disable document title input',
|
|
1522
|
+
validate: {
|
|
1523
|
+
required: false,
|
|
1524
|
+
},
|
|
1525
|
+
},
|
|
1526
|
+
{
|
|
1527
|
+
type: 'textfield',
|
|
1528
|
+
input: true,
|
|
1529
|
+
key: 'customOptions.filename',
|
|
1530
|
+
label: 'Default filename',
|
|
1531
|
+
tooltip: 'Leave empty to let the user input their own filename',
|
|
1532
|
+
validate: {
|
|
1533
|
+
required: false,
|
|
1534
|
+
},
|
|
1535
|
+
},
|
|
1536
|
+
{
|
|
1537
|
+
type: 'checkbox',
|
|
1538
|
+
input: true,
|
|
1539
|
+
inputType: 'checkbox',
|
|
1540
|
+
key: 'customOptions.disableFilename',
|
|
1541
|
+
label: 'Disable filename input',
|
|
1542
|
+
validate: {
|
|
1543
|
+
required: false,
|
|
1544
|
+
},
|
|
1545
|
+
},
|
|
1546
|
+
{
|
|
1547
|
+
type: 'textfield',
|
|
1548
|
+
input: true,
|
|
1549
|
+
key: 'customOptions.author',
|
|
1550
|
+
label: 'Default author',
|
|
1551
|
+
tooltip: 'Leave empty to let the user input their own author',
|
|
1552
|
+
validate: {
|
|
1553
|
+
required: false,
|
|
1554
|
+
},
|
|
1555
|
+
},
|
|
1556
|
+
{
|
|
1557
|
+
type: 'checkbox',
|
|
1558
|
+
input: true,
|
|
1559
|
+
inputType: 'checkbox',
|
|
1560
|
+
key: 'customOptions.disableAuthor',
|
|
1561
|
+
label: 'Disable author input',
|
|
1562
|
+
validate: {
|
|
1563
|
+
required: false,
|
|
1564
|
+
},
|
|
1565
|
+
},
|
|
1566
|
+
{
|
|
1567
|
+
type: 'select',
|
|
1568
|
+
label: 'Default status',
|
|
1569
|
+
key: 'customOptions.status',
|
|
1570
|
+
placeholder: 'Select a default status',
|
|
1571
|
+
data: {
|
|
1572
|
+
values: [
|
|
1573
|
+
{ value: 'in_bewerking', label: 'In editing' },
|
|
1574
|
+
{ value: 'ter_vaststelling', label: 'To be confirmed' },
|
|
1575
|
+
{ value: 'definitief', label: 'Definitive' },
|
|
1576
|
+
{ value: 'gearchiveerd', label: 'Archived' },
|
|
1577
|
+
],
|
|
1578
|
+
},
|
|
1579
|
+
dataSrc: 'values',
|
|
1580
|
+
input: true,
|
|
1581
|
+
validate: {
|
|
1582
|
+
required: false,
|
|
1583
|
+
},
|
|
1584
|
+
},
|
|
1585
|
+
{
|
|
1586
|
+
type: 'checkbox',
|
|
1587
|
+
input: true,
|
|
1588
|
+
inputType: 'checkbox',
|
|
1589
|
+
key: 'customOptions.disableStatus',
|
|
1590
|
+
label: 'Disable status input',
|
|
1591
|
+
validate: {
|
|
1592
|
+
required: false,
|
|
1593
|
+
},
|
|
1594
|
+
},
|
|
1595
|
+
{
|
|
1596
|
+
type: 'select',
|
|
1597
|
+
label: 'Default language',
|
|
1598
|
+
key: 'customOptions.language',
|
|
1599
|
+
placeholder: 'Select a default language',
|
|
1600
|
+
data: {
|
|
1601
|
+
values: [
|
|
1602
|
+
{ value: 'nld', label: 'Dutch' },
|
|
1603
|
+
{ value: 'eng', label: 'English' },
|
|
1604
|
+
{ value: 'deu', label: 'German' },
|
|
1605
|
+
],
|
|
1606
|
+
},
|
|
1607
|
+
dataSrc: 'values',
|
|
1608
|
+
input: true,
|
|
1609
|
+
validate: {
|
|
1610
|
+
required: false,
|
|
1611
|
+
},
|
|
1612
|
+
},
|
|
1613
|
+
{
|
|
1614
|
+
type: 'checkbox',
|
|
1615
|
+
input: true,
|
|
1616
|
+
inputType: 'checkbox',
|
|
1617
|
+
key: 'customOptions.disableLanguage',
|
|
1618
|
+
label: 'Disable language input',
|
|
1619
|
+
validate: {
|
|
1620
|
+
required: false,
|
|
1621
|
+
},
|
|
1622
|
+
},
|
|
1623
|
+
{
|
|
1624
|
+
type: 'textfield',
|
|
1625
|
+
input: true,
|
|
1626
|
+
key: 'customOptions.documentType',
|
|
1627
|
+
label: 'Default document type url',
|
|
1628
|
+
tooltip: 'Must match the document type url exactly. Leave empty to let the user input their own document type',
|
|
1629
|
+
validate: {
|
|
1630
|
+
required: false,
|
|
1631
|
+
},
|
|
1632
|
+
},
|
|
1633
|
+
{
|
|
1634
|
+
type: 'checkbox',
|
|
1635
|
+
input: true,
|
|
1636
|
+
inputType: 'checkbox',
|
|
1637
|
+
key: 'customOptions.disableDocumentType',
|
|
1638
|
+
label: 'Disable document type input',
|
|
1639
|
+
validate: {
|
|
1640
|
+
required: false,
|
|
1641
|
+
},
|
|
1642
|
+
},
|
|
1643
|
+
{
|
|
1644
|
+
type: 'textfield',
|
|
1645
|
+
input: true,
|
|
1646
|
+
key: 'customOptions.description',
|
|
1647
|
+
label: 'Default description',
|
|
1648
|
+
tooltip: 'Leave empty to let the user input their own description',
|
|
1649
|
+
validate: {
|
|
1650
|
+
required: false,
|
|
1651
|
+
},
|
|
1652
|
+
},
|
|
1653
|
+
{
|
|
1654
|
+
type: 'checkbox',
|
|
1655
|
+
input: true,
|
|
1656
|
+
inputType: 'checkbox',
|
|
1657
|
+
key: 'customOptions.disableDescription',
|
|
1658
|
+
label: 'Disable description input',
|
|
1659
|
+
validate: {
|
|
1660
|
+
required: false,
|
|
1661
|
+
},
|
|
1662
|
+
},
|
|
1663
|
+
{
|
|
1664
|
+
type: 'select',
|
|
1665
|
+
label: 'Default confidentiality level',
|
|
1666
|
+
key: 'customOptions.confidentialityLevel',
|
|
1667
|
+
placeholder: 'Select a default confidentiality level',
|
|
1668
|
+
data: {
|
|
1669
|
+
values: [
|
|
1670
|
+
{ value: 'openbaar', label: 'Public' },
|
|
1671
|
+
{ value: 'beperkt_openbaar', label: 'Restricted public' },
|
|
1672
|
+
{ value: 'intern', label: 'Internal' },
|
|
1673
|
+
{ value: 'zaakvertrouwelijk', label: 'Case confidential' },
|
|
1674
|
+
{ value: 'vertrouwelijk', label: 'Private' },
|
|
1675
|
+
{ value: 'confidentieel', label: 'Confidential' },
|
|
1676
|
+
{ value: 'geheim', label: 'Secret' },
|
|
1677
|
+
{ value: 'zeer_geheim', label: 'Very secret' },
|
|
1678
|
+
],
|
|
1679
|
+
},
|
|
1680
|
+
dataSrc: 'values',
|
|
1681
|
+
input: true,
|
|
1682
|
+
validate: {
|
|
1683
|
+
required: false,
|
|
1684
|
+
},
|
|
1685
|
+
},
|
|
1686
|
+
{
|
|
1687
|
+
type: 'checkbox',
|
|
1688
|
+
input: true,
|
|
1689
|
+
inputType: 'checkbox',
|
|
1690
|
+
key: 'customOptions.disableConfidentialityLevel',
|
|
1691
|
+
label: 'Disable confidentiality level input',
|
|
1692
|
+
validate: {
|
|
1693
|
+
required: false,
|
|
1694
|
+
},
|
|
1695
|
+
},
|
|
1696
|
+
],
|
|
1697
|
+
});
|
|
1698
|
+
|
|
1699
|
+
/*
|
|
1700
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
1701
|
+
*
|
|
1702
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1703
|
+
* you may not use this file except in compliance with the License.
|
|
1704
|
+
* You may obtain a copy of the License at
|
|
1705
|
+
*
|
|
1706
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1707
|
+
*
|
|
1708
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1709
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1710
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1711
|
+
* See the License for the specific language governing permissions and
|
|
1712
|
+
* limitations under the License.
|
|
1713
|
+
*/
|
|
1714
|
+
class DocumentenApiUploaderComponent {
|
|
1715
|
+
constructor(uploadProviderService, stateService, domService, downloadService, modalService, userProviderService, route) {
|
|
1716
|
+
this.uploadProviderService = uploadProviderService;
|
|
1717
|
+
this.stateService = stateService;
|
|
1718
|
+
this.domService = domService;
|
|
1719
|
+
this.downloadService = downloadService;
|
|
1720
|
+
this.modalService = modalService;
|
|
1721
|
+
this.userProviderService = userProviderService;
|
|
1722
|
+
this.route = route;
|
|
1723
|
+
this.valueChange = new EventEmitter();
|
|
1724
|
+
this.uploading$ = new BehaviorSubject(false);
|
|
1725
|
+
this.fileToBeUploaded$ = new BehaviorSubject(null);
|
|
1726
|
+
this.modalDisabled$ = new BehaviorSubject(false);
|
|
1727
|
+
this.showModal$ = new Subject();
|
|
1728
|
+
this.hideModal$ = new Subject();
|
|
1729
|
+
this.uploadProcessLinked$ = combineLatest([
|
|
1730
|
+
this.route?.params || of(null),
|
|
1731
|
+
this.route?.firstChild?.params || of(null),
|
|
1732
|
+
this.modalService.documentDefinitionName$,
|
|
1733
|
+
]).pipe(filter$1(([params, firstChildParams, documentDefinitionName]) => !!(params?.documentDefinitionName ||
|
|
1734
|
+
firstChildParams?.documentDefinitionName ||
|
|
1735
|
+
documentDefinitionName)), switchMap(([params, firstChildParams, documentDefinitionName]) => this.uploadProviderService.checkUploadProcessLink(params?.documentDefinitionName ||
|
|
1736
|
+
firstChildParams?.documentDefinitionName ||
|
|
1737
|
+
documentDefinitionName)), startWith('loading'));
|
|
1738
|
+
this.isAdmin$ = this.userProviderService
|
|
1739
|
+
.getUserSubject()
|
|
1740
|
+
.pipe(map$1(userIdentity => userIdentity?.roles.includes('ROLE_ADMIN')));
|
|
1741
|
+
this._value = [];
|
|
1742
|
+
}
|
|
1743
|
+
get value() {
|
|
1744
|
+
return this._value;
|
|
1745
|
+
}
|
|
1746
|
+
set value(value) {
|
|
1747
|
+
if (Array.isArray(value)) {
|
|
1748
|
+
this._value = value;
|
|
1749
|
+
}
|
|
1750
|
+
}
|
|
1751
|
+
fileSelected(file) {
|
|
1752
|
+
this.fileToBeUploaded$.next(file);
|
|
1753
|
+
this.showModal$.next(null);
|
|
1754
|
+
}
|
|
1755
|
+
deleteFile(id) {
|
|
1756
|
+
this.domService.toggleSubmitButton(true);
|
|
1757
|
+
this._value = this._value.filter((file) => file?.id ? file?.id !== id : true);
|
|
1758
|
+
this.valueChange.emit(this._value);
|
|
1759
|
+
}
|
|
1760
|
+
metadataSet(metadata) {
|
|
1761
|
+
this.uploading$.next(true);
|
|
1762
|
+
this.hideModal$.next(null);
|
|
1763
|
+
this.domService.toggleSubmitButton(true);
|
|
1764
|
+
this.fileToBeUploaded$
|
|
1765
|
+
.pipe(take$1(1), switchMap(file => this.uploadProviderService.uploadTempFileWithMetadata(file, metadata)), tap$1(result => {
|
|
1766
|
+
this.domService.toggleSubmitButton(false);
|
|
1767
|
+
this.uploading$.next(false);
|
|
1768
|
+
this._value.push(result);
|
|
1769
|
+
this.valueChange.emit(this._value);
|
|
1770
|
+
}))
|
|
1771
|
+
.subscribe();
|
|
1772
|
+
}
|
|
1773
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: DocumentenApiUploaderComponent, deps: [{ token: i2$2.UploadProviderService }, { token: i3$2.FormIoStateService }, { token: i3$2.FormIoDomService }, { token: i2$2.DownloadService }, { token: i3$2.ValtimoModalService }, { token: i5$2.UserProviderService }, { token: i1$1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1774
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: DocumentenApiUploaderComponent, selector: "valtimo-documenten-api-formio-uploader", inputs: { disabled: "disabled", title: "title", hideTitle: "hideTitle", subtitle: "subtitle", maxFileSize: "maxFileSize", hideMaxFileSize: "hideMaxFileSize", camera: "camera", documentTitle: "documentTitle", disableDocumentTitle: "disableDocumentTitle", filename: "filename", disableFilename: "disableFilename", author: "author", disableAuthor: "disableAuthor", status: "status", disableStatus: "disableStatus", language: "language", disableLanguage: "disableLanguage", documentType: "documentType", disableDocumentType: "disableDocumentType", description: "description", disableDescription: "disableDescription", confidentialityLevel: "confidentialityLevel", disableConfidentialityLevel: "disableConfidentialityLevel", value: "value" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container *ngIf=\"{linked: uploadProcessLinked$ | async, isAdmin: isAdmin$ | async} as obs\">\n <div *ngIf=\"obs.linked === false\">\n <div\n *ngIf=\"obs.isAdmin\"\n [translate]=\"'dossier.documenten.noProcessLinked.adminRole'\"\n class=\"bg-warning text-black mb-2 p-3 text-center\"\n ></div>\n <div\n *ngIf=\"!obs.isAdmin\"\n [translate]=\"'dossier.documenten.noProcessLinked.regularUser'\"\n class=\"bg-warning text-black mb-2 p-3 text-center\"\n ></div>\n </div>\n <valtimo-dropzone\n (fileSelected)=\"fileSelected($event)\"\n [acceptedFiles]=\"null\"\n [camera]=\"camera\"\n [disabled]=\"disabled || obs.linked === false || obs.linked === 'loading'\"\n [hideFilePreview]=\"true\"\n [hideTitle]=\"hideTitle\"\n [maxFileSize]=\"maxFileSize\"\n [maxFiles]=\"1\"\n [showMaxFileSize]=\"!hideMaxFileSize\"\n [subtitle]=\"subtitle\"\n [title]=\"title\"\n [uploading]=\"uploading$ | async\"\n ></valtimo-dropzone>\n</ng-container>\n\n<div *ngFor=\"let resource of _value\" class=\"file-preview\">\n <div class=\"file-preview-name\">\n <span>\n {{ resource.filename }}\n </span>\n </div>\n <div class=\"file-preview-size\">\n <span>\n {{ resource.sizeInBytes | filesize }}\n </span>\n </div>\n <div *ngIf=\"!disabled\" class=\"file-preview-delete\">\n <a (click)=\"deleteFile(resource.id)\">\n <i class=\"icon mdi mdi-delete\"></i>\n </a>\n </div>\n</div>\n\n<valtimo-documenten-api-metadata-modal\n (metadata)=\"metadataSet($event)\"\n [author]=\"author\"\n [confidentialityLevel]=\"confidentialityLevel\"\n [description]=\"description\"\n [disableAuthor]=\"disableAuthor\"\n [disableConfidentialityLevel]=\"disableConfidentialityLevel\"\n [disableDescription]=\"disableDescription\"\n [disableDocumentTitle]=\"disableDocumentTitle\"\n [disableDocumentType]=\"disableDocumentType\"\n [disableFilename]=\"disableFilename\"\n [disableLanguage]=\"disableLanguage\"\n [disableStatus]=\"disableStatus\"\n [disabled$]=\"modalDisabled$\"\n [documentTitle]=\"documentTitle\"\n [documentType]=\"documentType\"\n [file$]=\"fileToBeUploaded$\"\n [filename]=\"filename\"\n [hide$]=\"hideModal$\"\n [language]=\"language\"\n [show$]=\"showModal$\"\n [status]=\"status\"\n></valtimo-documenten-api-metadata-modal>\n", styles: [".progress-bar-container{padding:15px 20px}::ng-deep .formio-component-valtimo-file .formio-button-add-another,::ng-deep .formio-component-valtimo-file .btn-secondary{display:none}::ng-deep .formio-component-valtimo-file td{padding:0!important;border:none}::ng-deep .formio-component-valtimo-file .table{border-collapse:collapse;border:none;margin:10px 0}.dropzone-container{margin-bottom:12px}.file-preview{margin-top:-1px;display:flex;border:1px solid #dee2e6}.file-preview div{padding:12px 10px}.file-preview .file-preview-name{width:65%}.file-preview .file-preview-size{width:35%}.file-preview .icon{color:#a1a1a1;font-size:1.3846rem;line-height:18px;cursor:pointer}.file-preview .icon:hover{color:gray}\n/*!\n * Copyright 2015-2024 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$2.DropzoneComponent, selector: "valtimo-dropzone", inputs: ["title", "hideTitle", "subtitle", "externalError$", "maxFileSize", "showMaxFileSize", "acceptedFiles", "clear$", "disabled", "hideFilePreview", "uploading", "camera", "maxFiles"], outputs: ["fileSelected"] }, { kind: "directive", type: i3$1.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { kind: "component", type: DocumentenApiMetadataModalComponent, selector: "valtimo-documenten-api-metadata-modal", inputs: ["show$", "hide$", "disabled$", "file$", "documentTitle", "disableDocumentTitle", "filename", "disableFilename", "author", "disableAuthor", "status", "disableStatus", "language", "disableLanguage", "documentType", "disableDocumentType", "description", "disableDescription", "confidentialityLevel", "disableConfidentialityLevel", "trefwoorden", "disableTrefwoorden"], outputs: ["metadata"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$2.FileSizePipe, name: "filesize" }] }); }
|
|
1775
|
+
}
|
|
1776
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: DocumentenApiUploaderComponent, decorators: [{
|
|
1777
|
+
type: Component,
|
|
1778
|
+
args: [{ selector: 'valtimo-documenten-api-formio-uploader', template: "<!--\n ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container *ngIf=\"{linked: uploadProcessLinked$ | async, isAdmin: isAdmin$ | async} as obs\">\n <div *ngIf=\"obs.linked === false\">\n <div\n *ngIf=\"obs.isAdmin\"\n [translate]=\"'dossier.documenten.noProcessLinked.adminRole'\"\n class=\"bg-warning text-black mb-2 p-3 text-center\"\n ></div>\n <div\n *ngIf=\"!obs.isAdmin\"\n [translate]=\"'dossier.documenten.noProcessLinked.regularUser'\"\n class=\"bg-warning text-black mb-2 p-3 text-center\"\n ></div>\n </div>\n <valtimo-dropzone\n (fileSelected)=\"fileSelected($event)\"\n [acceptedFiles]=\"null\"\n [camera]=\"camera\"\n [disabled]=\"disabled || obs.linked === false || obs.linked === 'loading'\"\n [hideFilePreview]=\"true\"\n [hideTitle]=\"hideTitle\"\n [maxFileSize]=\"maxFileSize\"\n [maxFiles]=\"1\"\n [showMaxFileSize]=\"!hideMaxFileSize\"\n [subtitle]=\"subtitle\"\n [title]=\"title\"\n [uploading]=\"uploading$ | async\"\n ></valtimo-dropzone>\n</ng-container>\n\n<div *ngFor=\"let resource of _value\" class=\"file-preview\">\n <div class=\"file-preview-name\">\n <span>\n {{ resource.filename }}\n </span>\n </div>\n <div class=\"file-preview-size\">\n <span>\n {{ resource.sizeInBytes | filesize }}\n </span>\n </div>\n <div *ngIf=\"!disabled\" class=\"file-preview-delete\">\n <a (click)=\"deleteFile(resource.id)\">\n <i class=\"icon mdi mdi-delete\"></i>\n </a>\n </div>\n</div>\n\n<valtimo-documenten-api-metadata-modal\n (metadata)=\"metadataSet($event)\"\n [author]=\"author\"\n [confidentialityLevel]=\"confidentialityLevel\"\n [description]=\"description\"\n [disableAuthor]=\"disableAuthor\"\n [disableConfidentialityLevel]=\"disableConfidentialityLevel\"\n [disableDescription]=\"disableDescription\"\n [disableDocumentTitle]=\"disableDocumentTitle\"\n [disableDocumentType]=\"disableDocumentType\"\n [disableFilename]=\"disableFilename\"\n [disableLanguage]=\"disableLanguage\"\n [disableStatus]=\"disableStatus\"\n [disabled$]=\"modalDisabled$\"\n [documentTitle]=\"documentTitle\"\n [documentType]=\"documentType\"\n [file$]=\"fileToBeUploaded$\"\n [filename]=\"filename\"\n [hide$]=\"hideModal$\"\n [language]=\"language\"\n [show$]=\"showModal$\"\n [status]=\"status\"\n></valtimo-documenten-api-metadata-modal>\n", styles: [".progress-bar-container{padding:15px 20px}::ng-deep .formio-component-valtimo-file .formio-button-add-another,::ng-deep .formio-component-valtimo-file .btn-secondary{display:none}::ng-deep .formio-component-valtimo-file td{padding:0!important;border:none}::ng-deep .formio-component-valtimo-file .table{border-collapse:collapse;border:none;margin:10px 0}.dropzone-container{margin-bottom:12px}.file-preview{margin-top:-1px;display:flex;border:1px solid #dee2e6}.file-preview div{padding:12px 10px}.file-preview .file-preview-name{width:65%}.file-preview .file-preview-size{width:35%}.file-preview .icon{color:#a1a1a1;font-size:1.3846rem;line-height:18px;cursor:pointer}.file-preview .icon:hover{color:gray}\n/*!\n * Copyright 2015-2024 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"] }]
|
|
1779
|
+
}], ctorParameters: () => [{ type: i2$2.UploadProviderService }, { type: i3$2.FormIoStateService }, { type: i3$2.FormIoDomService }, { type: i2$2.DownloadService }, { type: i3$2.ValtimoModalService }, { type: i5$2.UserProviderService }, { type: i1$1.ActivatedRoute }], propDecorators: { disabled: [{
|
|
1780
|
+
type: Input
|
|
1781
|
+
}], title: [{
|
|
1782
|
+
type: Input
|
|
1783
|
+
}], hideTitle: [{
|
|
1784
|
+
type: Input
|
|
1785
|
+
}], subtitle: [{
|
|
1786
|
+
type: Input
|
|
1787
|
+
}], maxFileSize: [{
|
|
1788
|
+
type: Input
|
|
1789
|
+
}], hideMaxFileSize: [{
|
|
1790
|
+
type: Input
|
|
1791
|
+
}], camera: [{
|
|
1792
|
+
type: Input
|
|
1793
|
+
}], documentTitle: [{
|
|
1794
|
+
type: Input
|
|
1795
|
+
}], disableDocumentTitle: [{
|
|
1796
|
+
type: Input
|
|
1797
|
+
}], filename: [{
|
|
1798
|
+
type: Input
|
|
1799
|
+
}], disableFilename: [{
|
|
1800
|
+
type: Input
|
|
1801
|
+
}], author: [{
|
|
1802
|
+
type: Input
|
|
1803
|
+
}], disableAuthor: [{
|
|
1804
|
+
type: Input
|
|
1805
|
+
}], status: [{
|
|
1806
|
+
type: Input
|
|
1807
|
+
}], disableStatus: [{
|
|
1808
|
+
type: Input
|
|
1809
|
+
}], language: [{
|
|
1810
|
+
type: Input
|
|
1811
|
+
}], disableLanguage: [{
|
|
1812
|
+
type: Input
|
|
1813
|
+
}], documentType: [{
|
|
1814
|
+
type: Input
|
|
1815
|
+
}], disableDocumentType: [{
|
|
1816
|
+
type: Input
|
|
1817
|
+
}], description: [{
|
|
1818
|
+
type: Input
|
|
1819
|
+
}], disableDescription: [{
|
|
1820
|
+
type: Input
|
|
1821
|
+
}], confidentialityLevel: [{
|
|
1822
|
+
type: Input
|
|
1823
|
+
}], disableConfidentialityLevel: [{
|
|
1824
|
+
type: Input
|
|
1825
|
+
}], valueChange: [{
|
|
1826
|
+
type: Output
|
|
1827
|
+
}], value: [{
|
|
1828
|
+
type: Input
|
|
1829
|
+
}] } });
|
|
1830
|
+
|
|
1831
|
+
/*
|
|
1832
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
1833
|
+
*
|
|
1834
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1835
|
+
* you may not use this file except in compliance with the License.
|
|
1836
|
+
* You may obtain a copy of the License at
|
|
1837
|
+
*
|
|
1838
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1839
|
+
*
|
|
1840
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1841
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1842
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1843
|
+
* See the License for the specific language governing permissions and
|
|
1844
|
+
* limitations under the License.
|
|
1845
|
+
*/
|
|
1846
|
+
const customDocumentApiUploaderType = 'documenten-api-file';
|
|
1847
|
+
const COMPONENT_OPTIONS = {
|
|
1848
|
+
type: customDocumentApiUploaderType,
|
|
1849
|
+
selector: 'documenten-api-form-io-uploader',
|
|
1850
|
+
title: 'Documenten API File Upload',
|
|
1851
|
+
group: 'advanced',
|
|
1852
|
+
icon: 'upload',
|
|
1853
|
+
// set empty value to force formio to accept arrays as valid input value for this field type
|
|
1854
|
+
emptyValue: [],
|
|
1855
|
+
editForm: documentenApiUploaderEditForm,
|
|
1856
|
+
};
|
|
1857
|
+
function registerDocumentenApiFormioUploadComponent(injector) {
|
|
1858
|
+
const originalUploadComponent = createCustomFormioComponent(COMPONENT_OPTIONS);
|
|
1859
|
+
// override setValue function to allow for setting an array value
|
|
1860
|
+
class UploaderComponent extends originalUploadComponent {
|
|
1861
|
+
setValue(value) {
|
|
1862
|
+
if (!this._customAngularElement) {
|
|
1863
|
+
return false;
|
|
1864
|
+
}
|
|
1865
|
+
this._customAngularElement.value = value;
|
|
1866
|
+
return true;
|
|
1867
|
+
}
|
|
1868
|
+
}
|
|
1869
|
+
if (!customElements.get(COMPONENT_OPTIONS.selector)) {
|
|
1870
|
+
registerCustomFormioComponentWithClass(COMPONENT_OPTIONS, DocumentenApiUploaderComponent, UploaderComponent, injector);
|
|
1871
|
+
}
|
|
1872
|
+
}
|
|
1873
|
+
|
|
1874
|
+
/*
|
|
1875
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
1876
|
+
*
|
|
1877
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1878
|
+
* you may not use this file except in compliance with the License.
|
|
1879
|
+
* You may obtain a copy of the License at
|
|
1880
|
+
*
|
|
1881
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1882
|
+
*
|
|
1883
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1884
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1885
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1886
|
+
* See the License for the specific language governing permissions and
|
|
1887
|
+
* limitations under the License.
|
|
1888
|
+
*/
|
|
1889
|
+
|
|
1890
|
+
/*
|
|
1891
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
1892
|
+
*
|
|
1893
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1894
|
+
* you may not use this file except in compliance with the License.
|
|
1895
|
+
* You may obtain a copy of the License at
|
|
1896
|
+
*
|
|
1897
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1898
|
+
*
|
|
1899
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1900
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1901
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1902
|
+
* See the License for the specific language governing permissions and
|
|
1903
|
+
* limitations under the License.
|
|
1904
|
+
*/
|
|
1905
|
+
|
|
1906
|
+
/*
|
|
1907
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
1908
|
+
*
|
|
1909
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1910
|
+
* you may not use this file except in compliance with the License.
|
|
1911
|
+
* You may obtain a copy of the License at
|
|
1912
|
+
*
|
|
1913
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1914
|
+
*
|
|
1915
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1916
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1917
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1918
|
+
* See the License for the specific language governing permissions and
|
|
1919
|
+
* limitations under the License.
|
|
1920
|
+
*/
|
|
1921
|
+
|
|
1922
|
+
/*
|
|
1923
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
1924
|
+
*
|
|
1925
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1926
|
+
* you may not use this file except in compliance with the License.
|
|
1927
|
+
* You may obtain a copy of the License at
|
|
1928
|
+
*
|
|
1929
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1930
|
+
*
|
|
1931
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1932
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1933
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1934
|
+
* See the License for the specific language governing permissions and
|
|
1935
|
+
* limitations under the License.
|
|
1936
|
+
*/
|
|
1937
|
+
|
|
1938
|
+
/*
|
|
1939
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
1940
|
+
*
|
|
1941
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1942
|
+
* you may not use this file except in compliance with the License.
|
|
1943
|
+
* You may obtain a copy of the License at
|
|
1944
|
+
*
|
|
1945
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1946
|
+
*
|
|
1947
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1948
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1949
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1950
|
+
* See the License for the specific language governing permissions and
|
|
1951
|
+
* limitations under the License.
|
|
1952
|
+
*/
|
|
1953
|
+
|
|
1954
|
+
/*
|
|
1955
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
1956
|
+
*
|
|
1957
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1958
|
+
* you may not use this file except in compliance with the License.
|
|
1959
|
+
* You may obtain a copy of the License at
|
|
1960
|
+
*
|
|
1961
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1962
|
+
*
|
|
1963
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1964
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1965
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1966
|
+
* See the License for the specific language governing permissions and
|
|
1967
|
+
* limitations under the License.
|
|
1968
|
+
*/
|
|
1969
|
+
class ZaakobjectenService {
|
|
1970
|
+
constructor(configService, http) {
|
|
1971
|
+
this.configService = configService;
|
|
1972
|
+
this.http = http;
|
|
1973
|
+
this.VALTIMO_API_ENDPOINT_URI = this.configService.config.valtimoApi.endpointUri;
|
|
1974
|
+
}
|
|
1975
|
+
getDocumentObjectTypes(documentId) {
|
|
1976
|
+
return this.http.get(`${this.VALTIMO_API_ENDPOINT_URI}v1/document/${documentId}/zaak/objecttype`);
|
|
1977
|
+
}
|
|
1978
|
+
getDocumentObjectsOfType(documentId, typeUrl) {
|
|
1979
|
+
return this.http.get(`${this.VALTIMO_API_ENDPOINT_URI}v1/document/${documentId}/zaak/object?typeUrl=${typeUrl}`);
|
|
1980
|
+
}
|
|
1981
|
+
getObjectTypeForm(documentId, objectUrl) {
|
|
1982
|
+
return this.http.get(`${this.VALTIMO_API_ENDPOINT_URI}v1/document/${documentId}/zaak/object/form?objectUrl=${objectUrl}`);
|
|
1983
|
+
}
|
|
1984
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ZaakobjectenService, deps: [{ token: i2$1.ConfigService }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1985
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ZaakobjectenService, providedIn: 'root' }); }
|
|
1986
|
+
}
|
|
1987
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ZaakobjectenService, decorators: [{
|
|
1988
|
+
type: Injectable,
|
|
1989
|
+
args: [{
|
|
1990
|
+
providedIn: 'root',
|
|
1991
|
+
}]
|
|
1992
|
+
}], ctorParameters: () => [{ type: i2$1.ConfigService }, { type: i1.HttpClient }] });
|
|
1993
|
+
|
|
1994
|
+
/*
|
|
1995
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
1996
|
+
*
|
|
1997
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1998
|
+
* you may not use this file except in compliance with the License.
|
|
1999
|
+
* You may obtain a copy of the License at
|
|
2000
|
+
*
|
|
2001
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
2002
|
+
*
|
|
2003
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2004
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
2005
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2006
|
+
* See the License for the specific language governing permissions and
|
|
2007
|
+
* limitations under the License.
|
|
2008
|
+
*/
|
|
2009
|
+
|
|
2010
|
+
/*
|
|
2011
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
2012
|
+
*
|
|
2013
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
2014
|
+
* you may not use this file except in compliance with the License.
|
|
2015
|
+
* You may obtain a copy of the License at
|
|
2016
|
+
*
|
|
2017
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
2018
|
+
*
|
|
2019
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2020
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
2021
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2022
|
+
* See the License for the specific language governing permissions and
|
|
2023
|
+
* limitations under the License.
|
|
2024
|
+
*/
|
|
2025
|
+
class DossierDetailTabZaakobjectenComponent {
|
|
2026
|
+
constructor(route, zaakobjectenService, modalService) {
|
|
2027
|
+
this.route = route;
|
|
2028
|
+
this.zaakobjectenService = zaakobjectenService;
|
|
2029
|
+
this.modalService = modalService;
|
|
2030
|
+
this.documentId$ = this.route.params.pipe(map(params => params.documentId));
|
|
2031
|
+
this.objecttypes$ = this.documentId$.pipe(switchMap(documentId => this.zaakobjectenService.getDocumentObjectTypes(documentId)));
|
|
2032
|
+
this.objecttypeSelectItems$ = this.objecttypes$.pipe(map(objecttypes => objecttypes.map(type => ({ id: type.url, text: type.name || '-' }))));
|
|
2033
|
+
this.selectedObjecttypeUrl$ = new BehaviorSubject(null);
|
|
2034
|
+
this.objects$ = combineLatest([
|
|
2035
|
+
this.documentId$,
|
|
2036
|
+
this.selectedObjecttypeUrl$,
|
|
2037
|
+
]).pipe(switchMap(([documentId, selectedObjecttypeUrl]) => documentId && selectedObjecttypeUrl
|
|
2038
|
+
? this.zaakobjectenService
|
|
2039
|
+
.getDocumentObjectsOfType(documentId, selectedObjecttypeUrl)
|
|
2040
|
+
.pipe(map(objects => objects.map(object => ({ ...object, title: object.title || '-' }))))
|
|
2041
|
+
: of(null)));
|
|
2042
|
+
this.columns$ = new BehaviorSubject([
|
|
2043
|
+
{
|
|
2044
|
+
labelTranslationKey: 'dossier.zaakobjecten.index',
|
|
2045
|
+
dataKey: 'index',
|
|
2046
|
+
},
|
|
2047
|
+
{
|
|
2048
|
+
labelTranslationKey: 'dossier.zaakobjecten.registrationAt',
|
|
2049
|
+
dataKey: 'registrationAt',
|
|
2050
|
+
},
|
|
2051
|
+
{
|
|
2052
|
+
labelTranslationKey: 'dossier.zaakobjecten.title',
|
|
2053
|
+
dataKey: 'title',
|
|
2054
|
+
},
|
|
2055
|
+
]);
|
|
2056
|
+
this.objectForm$ = new BehaviorSubject(null);
|
|
2057
|
+
this.objectName$ = new BehaviorSubject('');
|
|
2058
|
+
this.noFormDefinitionComponent$ = new BehaviorSubject(false);
|
|
2059
|
+
}
|
|
2060
|
+
selectObjectType(objectTypeUrl) {
|
|
2061
|
+
this.selectedObjecttypeUrl$.next(objectTypeUrl);
|
|
2062
|
+
}
|
|
2063
|
+
rowClicked(object, objectTypeSelectItems) {
|
|
2064
|
+
this.documentId$.pipe(take$1(1)).subscribe(documentId => {
|
|
2065
|
+
this.zaakobjectenService.getObjectTypeForm(documentId, object.url).subscribe(res => {
|
|
2066
|
+
const definition = res.formDefinition;
|
|
2067
|
+
definition.components = definition.components.map(component => ({
|
|
2068
|
+
...component,
|
|
2069
|
+
disabled: true,
|
|
2070
|
+
}));
|
|
2071
|
+
this.setModalData(objectTypeSelectItems, definition);
|
|
2072
|
+
}, () => {
|
|
2073
|
+
this.setModalData(objectTypeSelectItems);
|
|
2074
|
+
});
|
|
2075
|
+
});
|
|
2076
|
+
}
|
|
2077
|
+
hide() {
|
|
2078
|
+
this.modalService.closeModal(() => {
|
|
2079
|
+
this.objectName$.next('');
|
|
2080
|
+
this.objectForm$.next(null);
|
|
2081
|
+
});
|
|
2082
|
+
}
|
|
2083
|
+
show() {
|
|
2084
|
+
this.modalService.openModal(this.viewZaakobjectModal);
|
|
2085
|
+
}
|
|
2086
|
+
getObjectTypeName(objectTypeSelectItems) {
|
|
2087
|
+
const selectedObjectTypeUrl = this.selectedObjecttypeUrl$.getValue();
|
|
2088
|
+
const currentTypeSelectItem = objectTypeSelectItems.find(selectItem => selectItem.id === selectedObjectTypeUrl);
|
|
2089
|
+
return currentTypeSelectItem.text;
|
|
2090
|
+
}
|
|
2091
|
+
setModalData(objectTypeSelectItems, definition) {
|
|
2092
|
+
if (definition) {
|
|
2093
|
+
this.objectForm$.next(definition);
|
|
2094
|
+
this.noFormDefinitionComponent$.next(false);
|
|
2095
|
+
}
|
|
2096
|
+
else {
|
|
2097
|
+
this.noFormDefinitionComponent$.next(true);
|
|
2098
|
+
}
|
|
2099
|
+
this.objectName$.next(this.getObjectTypeName(objectTypeSelectItems));
|
|
2100
|
+
this.show();
|
|
2101
|
+
}
|
|
2102
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: DossierDetailTabZaakobjectenComponent, deps: [{ token: i1$1.ActivatedRoute }, { token: ZaakobjectenService }, { token: i3$2.ModalService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2103
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: DossierDetailTabZaakobjectenComponent, isStandalone: true, selector: "valtimo-dossier-detail-tab-zaakobjecten", viewQueries: [{ propertyName: "viewZaakobjectModal", first: true, predicate: ["viewZaakobjectModal"], descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container\n *ngIf=\"{\n objecttypeSelectItems: objecttypeSelectItems$ | async,\n objects: objects$ | async,\n columns: columns$ | async,\n selectedObjectTypeUrl: selectedObjecttypeUrl$ | async\n } as obs\"\n>\n <v-select\n [items]=\"obs.objecttypeSelectItems\"\n [margin]=\"true\"\n [widthInPx]=\"350\"\n name=\"objecttypes\"\n [title]=\"'dossier.zaakobjecten.objecttype' | translate\"\n [placeholder]=\"'dossier.zaakobjecten.objecttypePlaceholder' | translate\"\n [loading]=\"!obs.objecttypeSelectItems\"\n (selectedChange)=\"selectObjectType($event)\"\n ></v-select>\n <v-input-label\n titleTranslationKey=\"dossier.zaakobjecten.objecten\"\n [largeMargin]=\"!!obs.selectedObjectTypeUrl\"\n ></v-input-label>\n <v-paragraph *ngIf=\"!obs.selectedObjectTypeUrl\">{{\n 'dossier.zaakobjecten.objectenPlaceholder' | translate\n }}</v-paragraph>\n <v-table\n *ngIf=\"obs.selectedObjectTypeUrl\"\n [loading]=\"!obs.objects\"\n [items]=\"obs.objects\"\n [columns]=\"obs.columns\"\n [showEditButtons]=\"true\"\n [amountOfLoadingRows]=\"2\"\n [itemsTranslationKey]=\"'pluginManagement.tableItemsText'\"\n [showPagination]=\"false\"\n editButtonTranslationKey=\"dossier.zaakobjecten.objectType.viewObject\"\n (editButtonClicked)=\"rowClicked($event, obs.objecttypeSelectItems)\"\n ></v-table>\n</ng-container>\n\n<v-modal #viewZaakobjectModal (closeEvent)=\"hide()\" [hideFooter]=\"true\" [maxWidthPx]=\"750\">\n <div role=\"header\">\n <v-title [margin]=\"false\" type=\"h2\" [fullWidth]=\"true\" [center]=\"true\">{{\n objectName$ | async\n }}</v-title>\n </div>\n\n <div role=\"content\">\n <valtimo-form-io\n *ngIf=\"(noFormDefinitionComponent$ | async) === false\"\n [form]=\"objectForm$ | async\"\n ></valtimo-form-io>\n <v-paragraph *ngIf=\"noFormDefinitionComponent$ | async\" [center]=\"true\">{{\n 'dossier.zaakobjecten.noFormDefinitionComponent' | translate\n }}</v-paragraph>\n </div>\n</v-modal>\n", styles: ["/*!\n * Copyright 2015-2024 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: SelectModule }, { kind: "component", type: i3$2.SelectComponent, selector: "v-select", inputs: ["items", "defaultSelection", "defaultSelectionId", "defaultSelectionIds", "disabled", "dropUp", "multiple", "margin", "widthInPx", "notFoundText", "clearAllText", "clearText", "name", "title", "titleTranslationKey", "clearSelectionSubject$", "tooltip", "required", "loading", "loadingText", "placeholder", "smallMargin", "carbonTheme", "appendInline"], outputs: ["selectedChange"] }, { kind: "ngmodule", type: InputLabelModule }, { kind: "component", type: i3$2.InputLabelComponent, selector: "v-input-label", inputs: ["name", "tooltip", "largeMargin", "small", "title", "titleTranslationKey", "required", "disabled", "carbonTheme"] }, { kind: "ngmodule", type: ParagraphModule }, { kind: "component", type: i3$2.ParagraphComponent, selector: "v-paragraph", inputs: ["center", "fullWidth", "margin", "italic", "loading"] }, { kind: "ngmodule", type: TableModule }, { kind: "component", type: i3$2.TableComponent, selector: "v-table", inputs: ["items", "columns", "loading", "showEditButtons", "showPagination", "editButtonTranslationKey", "itemsTranslationKey", "noResultsTranslationKey", "mobileBreakpointPx", "amountOfLoadingRows", "collectionSize", "page", "size"], outputs: ["editButtonClicked", "paginationSizeSet", "paginationPageSet"] }, { kind: "ngmodule", type: VModalModule }, { kind: "component", type: i3$2.VModalComponent, selector: "v-modal", inputs: ["appearingDelayMs", "maxWidthPx", "hideFooter"], outputs: ["closeEvent"] }, { kind: "ngmodule", type: TitleModule }, { kind: "component", type: i3$2.TitleComponent, selector: "v-title", inputs: ["type", "margin", "fullWidth", "center"] }, { kind: "ngmodule", type: FormIoModule }, { kind: "component", type: i3$2.FormioComponent, selector: "valtimo-form-io", inputs: ["options", "submission", "form", "readOnly", "formRefresh$"], outputs: ["submit", "change"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }] }); }
|
|
2104
|
+
}
|
|
2105
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: DossierDetailTabZaakobjectenComponent, decorators: [{
|
|
2106
|
+
type: Component,
|
|
2107
|
+
args: [{ selector: 'valtimo-dossier-detail-tab-zaakobjecten', standalone: true, imports: [
|
|
2108
|
+
CommonModule,
|
|
2109
|
+
SelectModule,
|
|
2110
|
+
InputLabelModule,
|
|
2111
|
+
ParagraphModule,
|
|
2112
|
+
TableModule,
|
|
2113
|
+
VModalModule,
|
|
2114
|
+
TitleModule,
|
|
2115
|
+
FormIoModule,
|
|
2116
|
+
TranslateModule,
|
|
2117
|
+
], template: "<!--\n ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container\n *ngIf=\"{\n objecttypeSelectItems: objecttypeSelectItems$ | async,\n objects: objects$ | async,\n columns: columns$ | async,\n selectedObjectTypeUrl: selectedObjecttypeUrl$ | async\n } as obs\"\n>\n <v-select\n [items]=\"obs.objecttypeSelectItems\"\n [margin]=\"true\"\n [widthInPx]=\"350\"\n name=\"objecttypes\"\n [title]=\"'dossier.zaakobjecten.objecttype' | translate\"\n [placeholder]=\"'dossier.zaakobjecten.objecttypePlaceholder' | translate\"\n [loading]=\"!obs.objecttypeSelectItems\"\n (selectedChange)=\"selectObjectType($event)\"\n ></v-select>\n <v-input-label\n titleTranslationKey=\"dossier.zaakobjecten.objecten\"\n [largeMargin]=\"!!obs.selectedObjectTypeUrl\"\n ></v-input-label>\n <v-paragraph *ngIf=\"!obs.selectedObjectTypeUrl\">{{\n 'dossier.zaakobjecten.objectenPlaceholder' | translate\n }}</v-paragraph>\n <v-table\n *ngIf=\"obs.selectedObjectTypeUrl\"\n [loading]=\"!obs.objects\"\n [items]=\"obs.objects\"\n [columns]=\"obs.columns\"\n [showEditButtons]=\"true\"\n [amountOfLoadingRows]=\"2\"\n [itemsTranslationKey]=\"'pluginManagement.tableItemsText'\"\n [showPagination]=\"false\"\n editButtonTranslationKey=\"dossier.zaakobjecten.objectType.viewObject\"\n (editButtonClicked)=\"rowClicked($event, obs.objecttypeSelectItems)\"\n ></v-table>\n</ng-container>\n\n<v-modal #viewZaakobjectModal (closeEvent)=\"hide()\" [hideFooter]=\"true\" [maxWidthPx]=\"750\">\n <div role=\"header\">\n <v-title [margin]=\"false\" type=\"h2\" [fullWidth]=\"true\" [center]=\"true\">{{\n objectName$ | async\n }}</v-title>\n </div>\n\n <div role=\"content\">\n <valtimo-form-io\n *ngIf=\"(noFormDefinitionComponent$ | async) === false\"\n [form]=\"objectForm$ | async\"\n ></valtimo-form-io>\n <v-paragraph *ngIf=\"noFormDefinitionComponent$ | async\" [center]=\"true\">{{\n 'dossier.zaakobjecten.noFormDefinitionComponent' | translate\n }}</v-paragraph>\n </div>\n</v-modal>\n", styles: ["/*!\n * Copyright 2015-2024 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"] }]
|
|
2118
|
+
}], ctorParameters: () => [{ type: i1$1.ActivatedRoute }, { type: ZaakobjectenService }, { type: i3$2.ModalService }], propDecorators: { viewZaakobjectModal: [{
|
|
2119
|
+
type: ViewChild,
|
|
2120
|
+
args: ['viewZaakobjectModal']
|
|
2121
|
+
}] } });
|
|
2122
|
+
|
|
2123
|
+
/*
|
|
2124
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
2125
|
+
*
|
|
2126
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
2127
|
+
* you may not use this file except in compliance with the License.
|
|
2128
|
+
* You may obtain a copy of the License at
|
|
2129
|
+
*
|
|
2130
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
2131
|
+
*
|
|
2132
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2133
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
2134
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2135
|
+
* See the License for the specific language governing permissions and
|
|
2136
|
+
* limitations under the License.
|
|
2137
|
+
*/
|
|
2138
|
+
class DossierDetailTabObjectTypeComponent {
|
|
2139
|
+
constructor(route, zaakobjectenService, modalService) {
|
|
2140
|
+
this.route = route;
|
|
2141
|
+
this.zaakobjectenService = zaakobjectenService;
|
|
2142
|
+
this.modalService = modalService;
|
|
2143
|
+
this.documentId$ = this.route.params.pipe(map(params => params.documentId));
|
|
2144
|
+
this.objecttypes$ = this.documentId$.pipe(switchMap(documentId => this.zaakobjectenService.getDocumentObjectTypes(documentId)));
|
|
2145
|
+
this.objectName$ = this.route.params.pipe(map(() => {
|
|
2146
|
+
const currentUrl = window.location.href;
|
|
2147
|
+
const splitUrl = currentUrl.split('/');
|
|
2148
|
+
const lastUrlPart = splitUrl[splitUrl.length - 1];
|
|
2149
|
+
return lastUrlPart;
|
|
2150
|
+
}));
|
|
2151
|
+
this.selectedObjecttypeUrl$ = combineLatest([
|
|
2152
|
+
this.objecttypes$,
|
|
2153
|
+
this.objectName$,
|
|
2154
|
+
]).pipe(map(([objectTypes, objectName]) => {
|
|
2155
|
+
const currentType = objectTypes?.find(type => type?.name.toLowerCase() === objectName?.toLowerCase());
|
|
2156
|
+
const currentTypeUrl = currentType?.url;
|
|
2157
|
+
if (objectTypes && objectName && currentTypeUrl)
|
|
2158
|
+
return currentTypeUrl;
|
|
2159
|
+
return '';
|
|
2160
|
+
}));
|
|
2161
|
+
this.loading$ = new BehaviorSubject(true);
|
|
2162
|
+
this.hasData$ = new BehaviorSubject(false);
|
|
2163
|
+
this.objects$ = combineLatest([
|
|
2164
|
+
this.documentId$,
|
|
2165
|
+
this.selectedObjecttypeUrl$,
|
|
2166
|
+
]).pipe(switchMap(([documentId, selectedObjecttypeUrl]) => documentId && selectedObjecttypeUrl
|
|
2167
|
+
? this.zaakobjectenService.getDocumentObjectsOfType(documentId, selectedObjecttypeUrl).pipe(map(objects => objects.map(object => ({ ...object, title: object.title || '-' }))), tap(() => {
|
|
2168
|
+
this.loading$.next(false);
|
|
2169
|
+
this.hasData$.next(true);
|
|
2170
|
+
}))
|
|
2171
|
+
: of(null).pipe(tap(() => {
|
|
2172
|
+
this.loading$.next(false);
|
|
2173
|
+
this.hasData$.next(false);
|
|
2174
|
+
}))));
|
|
2175
|
+
this.columns$ = new BehaviorSubject([
|
|
2176
|
+
{
|
|
2177
|
+
labelTranslationKey: 'dossier.zaakobjecten.index',
|
|
2178
|
+
dataKey: 'index',
|
|
2179
|
+
},
|
|
2180
|
+
{
|
|
2181
|
+
labelTranslationKey: 'dossier.zaakobjecten.registrationAt',
|
|
2182
|
+
dataKey: 'registrationAt',
|
|
2183
|
+
},
|
|
2184
|
+
{
|
|
2185
|
+
labelTranslationKey: 'dossier.zaakobjecten.title',
|
|
2186
|
+
dataKey: 'title',
|
|
2187
|
+
},
|
|
2188
|
+
]);
|
|
2189
|
+
this.objectForm$ = new BehaviorSubject(null);
|
|
2190
|
+
this.noFormDefinitionComponent$ = new BehaviorSubject(false);
|
|
2191
|
+
}
|
|
2192
|
+
rowClicked(object) {
|
|
2193
|
+
this.documentId$.pipe(take$1(1)).subscribe(documentId => {
|
|
2194
|
+
this.zaakobjectenService.getObjectTypeForm(documentId, object.url).subscribe(res => {
|
|
2195
|
+
const definition = res.formDefinition;
|
|
2196
|
+
definition.components = definition.components.map(component => ({
|
|
2197
|
+
...component,
|
|
2198
|
+
disabled: true,
|
|
2199
|
+
}));
|
|
2200
|
+
this.setModalData(definition);
|
|
2201
|
+
}, () => {
|
|
2202
|
+
this.setModalData();
|
|
2203
|
+
});
|
|
2204
|
+
});
|
|
2205
|
+
}
|
|
2206
|
+
hide() {
|
|
2207
|
+
this.modalService.closeModal(() => {
|
|
2208
|
+
this.objectForm$.next(null);
|
|
2209
|
+
});
|
|
2210
|
+
}
|
|
2211
|
+
show() {
|
|
2212
|
+
this.modalService.openModal(this.viewObjectModal);
|
|
2213
|
+
}
|
|
2214
|
+
setModalData(definition) {
|
|
2215
|
+
if (definition) {
|
|
2216
|
+
this.objectForm$.next(definition);
|
|
2217
|
+
this.noFormDefinitionComponent$.next(false);
|
|
2218
|
+
}
|
|
2219
|
+
else {
|
|
2220
|
+
this.noFormDefinitionComponent$.next(true);
|
|
2221
|
+
}
|
|
2222
|
+
this.show();
|
|
2223
|
+
}
|
|
2224
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: DossierDetailTabObjectTypeComponent, deps: [{ token: i1$1.ActivatedRoute }, { token: ZaakobjectenService }, { token: i3$2.ModalService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2225
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: DossierDetailTabObjectTypeComponent, isStandalone: true, selector: "valtimo-object-type", viewQueries: [{ propertyName: "viewObjectModal", first: true, predicate: ["viewObjectModal"], descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container\n *ngIf=\"{\n objects: objects$ | async,\n columns: columns$ | async,\n loading: loading$ | async,\n hasData: hasData$ | async\n } as obs\"\n>\n <v-table\n *ngIf=\"obs.hasData || obs.loading\"\n [loading]=\"obs.loading\"\n [items]=\"obs.objects\"\n [columns]=\"obs.columns\"\n [showEditButtons]=\"true\"\n editButtonTranslationKey=\"dossier.zaakobjecten.objectType.viewObject\"\n [amountOfLoadingRows]=\"2\"\n [itemsTranslationKey]=\"'pluginManagement.tableItemsText'\"\n [showPagination]=\"false\"\n (editButtonClicked)=\"rowClicked($event)\"\n ></v-table>\n\n <v-paragraph *ngIf=\"!obs.hasData && !obs.loading\" [center]=\"true\">{{\n 'dossier.zaakobjecten.noObjectType' | translate\n }}</v-paragraph>\n</ng-container>\n\n<v-modal #viewObjectModal (closeEvent)=\"hide()\" [hideFooter]=\"true\" [maxWidthPx]=\"750\">\n <div role=\"header\">\n <v-title [margin]=\"false\" type=\"h2\" [fullWidth]=\"true\" [center]=\"true\">{{\n objectName$ | async\n }}</v-title>\n </div>\n\n <div role=\"content\">\n <valtimo-form-io\n *ngIf=\"(noFormDefinitionComponent$ | async) === false\"\n [form]=\"objectForm$ | async\"\n ></valtimo-form-io>\n <v-paragraph *ngIf=\"noFormDefinitionComponent$ | async\" [center]=\"true\">{{\n 'dossier.zaakobjecten.noFormDefinitionComponent' | translate\n }}</v-paragraph>\n </div>\n</v-modal>\n", styles: ["/*!\n * Copyright 2015-2024 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: TableModule }, { kind: "component", type: i3$2.TableComponent, selector: "v-table", inputs: ["items", "columns", "loading", "showEditButtons", "showPagination", "editButtonTranslationKey", "itemsTranslationKey", "noResultsTranslationKey", "mobileBreakpointPx", "amountOfLoadingRows", "collectionSize", "page", "size"], outputs: ["editButtonClicked", "paginationSizeSet", "paginationPageSet"] }, { kind: "ngmodule", type: ParagraphModule }, { kind: "component", type: i3$2.ParagraphComponent, selector: "v-paragraph", inputs: ["center", "fullWidth", "margin", "italic", "loading"] }, { kind: "ngmodule", type: VModalModule }, { kind: "component", type: i3$2.VModalComponent, selector: "v-modal", inputs: ["appearingDelayMs", "maxWidthPx", "hideFooter"], outputs: ["closeEvent"] }, { kind: "ngmodule", type: TitleModule }, { kind: "component", type: i3$2.TitleComponent, selector: "v-title", inputs: ["type", "margin", "fullWidth", "center"] }, { kind: "ngmodule", type: FormIoModule }, { kind: "component", type: i3$2.FormioComponent, selector: "valtimo-form-io", inputs: ["options", "submission", "form", "readOnly", "formRefresh$"], outputs: ["submit", "change"] }] }); }
|
|
2226
|
+
}
|
|
2227
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: DossierDetailTabObjectTypeComponent, decorators: [{
|
|
2228
|
+
type: Component,
|
|
2229
|
+
args: [{ selector: 'valtimo-object-type', standalone: true, imports: [CommonModule, TableModule, ParagraphModule, VModalModule, TitleModule, FormIoModule], template: "<!--\n ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container\n *ngIf=\"{\n objects: objects$ | async,\n columns: columns$ | async,\n loading: loading$ | async,\n hasData: hasData$ | async\n } as obs\"\n>\n <v-table\n *ngIf=\"obs.hasData || obs.loading\"\n [loading]=\"obs.loading\"\n [items]=\"obs.objects\"\n [columns]=\"obs.columns\"\n [showEditButtons]=\"true\"\n editButtonTranslationKey=\"dossier.zaakobjecten.objectType.viewObject\"\n [amountOfLoadingRows]=\"2\"\n [itemsTranslationKey]=\"'pluginManagement.tableItemsText'\"\n [showPagination]=\"false\"\n (editButtonClicked)=\"rowClicked($event)\"\n ></v-table>\n\n <v-paragraph *ngIf=\"!obs.hasData && !obs.loading\" [center]=\"true\">{{\n 'dossier.zaakobjecten.noObjectType' | translate\n }}</v-paragraph>\n</ng-container>\n\n<v-modal #viewObjectModal (closeEvent)=\"hide()\" [hideFooter]=\"true\" [maxWidthPx]=\"750\">\n <div role=\"header\">\n <v-title [margin]=\"false\" type=\"h2\" [fullWidth]=\"true\" [center]=\"true\">{{\n objectName$ | async\n }}</v-title>\n </div>\n\n <div role=\"content\">\n <valtimo-form-io\n *ngIf=\"(noFormDefinitionComponent$ | async) === false\"\n [form]=\"objectForm$ | async\"\n ></valtimo-form-io>\n <v-paragraph *ngIf=\"noFormDefinitionComponent$ | async\" [center]=\"true\">{{\n 'dossier.zaakobjecten.noFormDefinitionComponent' | translate\n }}</v-paragraph>\n </div>\n</v-modal>\n", styles: ["/*!\n * Copyright 2015-2024 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"] }]
|
|
2230
|
+
}], ctorParameters: () => [{ type: i1$1.ActivatedRoute }, { type: ZaakobjectenService }, { type: i3$2.ModalService }], propDecorators: { viewObjectModal: [{
|
|
2231
|
+
type: ViewChild,
|
|
2232
|
+
args: ['viewObjectModal']
|
|
2233
|
+
}] } });
|
|
2234
|
+
|
|
2235
|
+
/*
|
|
2236
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
2237
|
+
*
|
|
2238
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
2239
|
+
* you may not use this file except in compliance with the License.
|
|
2240
|
+
* You may obtain a copy of the License at
|
|
2241
|
+
*
|
|
2242
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
2243
|
+
*
|
|
2244
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2245
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
2246
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2247
|
+
* See the License for the specific language governing permissions and
|
|
2248
|
+
* limitations under the License.
|
|
2249
|
+
*/
|
|
2250
|
+
|
|
2251
|
+
/*
|
|
2252
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
2253
|
+
*
|
|
2254
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
2255
|
+
* you may not use this file except in compliance with the License.
|
|
2256
|
+
* You may obtain a copy of the License at
|
|
2257
|
+
*
|
|
2258
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
2259
|
+
*
|
|
2260
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2261
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
2262
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2263
|
+
* See the License for the specific language governing permissions and
|
|
2264
|
+
* limitations under the License.
|
|
2265
|
+
*/
|
|
2266
|
+
|
|
2267
|
+
/*
|
|
2268
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
2269
|
+
*
|
|
2270
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
2271
|
+
* you may not use this file except in compliance with the License.
|
|
2272
|
+
* You may obtain a copy of the License at
|
|
2273
|
+
*
|
|
2274
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
2275
|
+
*
|
|
2276
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2277
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
2278
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2279
|
+
* See the License for the specific language governing permissions and
|
|
2280
|
+
* limitations under the License.
|
|
2281
|
+
*/
|
|
2282
|
+
|
|
2283
|
+
/*
|
|
2284
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
2285
|
+
*
|
|
2286
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
2287
|
+
* you may not use this file except in compliance with the License.
|
|
2288
|
+
* You may obtain a copy of the License at
|
|
2289
|
+
*
|
|
2290
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
2291
|
+
*
|
|
2292
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2293
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
2294
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2295
|
+
* See the License for the specific language governing permissions and
|
|
2296
|
+
* limitations under the License.
|
|
2297
|
+
*/
|
|
2298
|
+
|
|
2299
|
+
/*
|
|
2300
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
2301
|
+
*
|
|
2302
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
2303
|
+
* you may not use this file except in compliance with the License.
|
|
2304
|
+
* You may obtain a copy of the License at
|
|
2305
|
+
*
|
|
2306
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
2307
|
+
*
|
|
2308
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2309
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
2310
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2311
|
+
* See the License for the specific language governing permissions and
|
|
2312
|
+
* limitations under the License.
|
|
2313
|
+
*/
|
|
2314
|
+
/**
|
|
2315
|
+
* @deprecated Will be replace by new plugins
|
|
2316
|
+
*/
|
|
2317
|
+
class ContactMomentService {
|
|
2318
|
+
constructor(http, configService) {
|
|
2319
|
+
this.http = http;
|
|
2320
|
+
this.valtimoEndpointUri = configService.config.valtimoApi.endpointUri;
|
|
2321
|
+
}
|
|
2322
|
+
getContactMoments() {
|
|
2323
|
+
return this.http.get(`${this.valtimoEndpointUri}v1/contactmoment`);
|
|
2324
|
+
}
|
|
2325
|
+
saveContactMoment(contactMomentRequest) {
|
|
2326
|
+
return this.http.post(`${this.valtimoEndpointUri}v1/contactmoment`, contactMomentRequest);
|
|
2327
|
+
}
|
|
2328
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ContactMomentService, deps: [{ token: i1.HttpClient }, { token: i2$1.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2329
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ContactMomentService, providedIn: 'root' }); }
|
|
2330
|
+
}
|
|
2331
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ContactMomentService, decorators: [{
|
|
2332
|
+
type: Injectable,
|
|
2333
|
+
args: [{
|
|
2334
|
+
providedIn: 'root',
|
|
2335
|
+
}]
|
|
2336
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2$1.ConfigService }] });
|
|
2337
|
+
|
|
2338
|
+
/*
|
|
2339
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
2340
|
+
*
|
|
2341
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
2342
|
+
* you may not use this file except in compliance with the License.
|
|
2343
|
+
* You may obtain a copy of the License at
|
|
2344
|
+
*
|
|
2345
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
2346
|
+
*
|
|
2347
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2348
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
2349
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2350
|
+
* See the License for the specific language governing permissions and
|
|
2351
|
+
* limitations under the License.
|
|
2352
|
+
*/
|
|
2353
|
+
|
|
2354
|
+
/*
|
|
2355
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
2356
|
+
*
|
|
2357
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
2358
|
+
* you may not use this file except in compliance with the License.
|
|
2359
|
+
* You may obtain a copy of the License at
|
|
2360
|
+
*
|
|
2361
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
2362
|
+
*
|
|
2363
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2364
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
2365
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2366
|
+
* See the License for the specific language governing permissions and
|
|
2367
|
+
* limitations under the License.
|
|
2368
|
+
*/
|
|
2369
|
+
moment.locale(localStorage.getItem('langKey') || '');
|
|
2370
|
+
class DossierDetailTabContactMomentsComponent {
|
|
2371
|
+
constructor(contactMomentService, alertService, translateService) {
|
|
2372
|
+
this.contactMomentService = contactMomentService;
|
|
2373
|
+
this.alertService = alertService;
|
|
2374
|
+
this.translateService = translateService;
|
|
2375
|
+
this.refetchContactMoments$ = new BehaviorSubject('');
|
|
2376
|
+
this.contactMoments$ = this.refetchContactMoments$.pipe(switchMap$1(() => this.contactMomentService.getContactMoments()), map$1(contactMoments => contactMoments.map(contactMoment => {
|
|
2377
|
+
const registratieDatum = moment(contactMoment.registratiedatum);
|
|
2378
|
+
return new TimelineItemImpl(registratieDatum.format('DD MMM YYYY'), registratieDatum.format('HH:mm'), contactMoment.medewerkerIdentificatie.achternaam, contactMoment.kanaal, contactMoment.tekst, null);
|
|
2379
|
+
})));
|
|
2380
|
+
this.text$ = new BehaviorSubject('');
|
|
2381
|
+
this.channel$ = new BehaviorSubject('MAIL');
|
|
2382
|
+
this.requestData$ = combineLatest([this.text$, this.channel$]);
|
|
2383
|
+
this.valid$ = this.requestData$.pipe(map$1(([text, channel]) => !!(text && channel)));
|
|
2384
|
+
this.disabled$ = new BehaviorSubject(false);
|
|
2385
|
+
}
|
|
2386
|
+
textChange(text) {
|
|
2387
|
+
this.text$.next(text);
|
|
2388
|
+
}
|
|
2389
|
+
buttonClick() {
|
|
2390
|
+
this.modal.show();
|
|
2391
|
+
}
|
|
2392
|
+
saveNote() {
|
|
2393
|
+
this.disable();
|
|
2394
|
+
this.requestData$.pipe(take$1(1)).subscribe(([text, channel]) => {
|
|
2395
|
+
this.contactMomentService.saveContactMoment({ kanaal: channel, tekst: text }).subscribe(() => {
|
|
2396
|
+
this.alertService.success(this.translateService.instant('dossier.contactMoments.saveSuccess'));
|
|
2397
|
+
this.enable();
|
|
2398
|
+
this.clear();
|
|
2399
|
+
this.modal.hide();
|
|
2400
|
+
this.refetchContactMoments();
|
|
2401
|
+
}, () => {
|
|
2402
|
+
this.enable();
|
|
2403
|
+
});
|
|
2404
|
+
});
|
|
2405
|
+
}
|
|
2406
|
+
disable() {
|
|
2407
|
+
this.disabled$.next(true);
|
|
2408
|
+
}
|
|
2409
|
+
enable() {
|
|
2410
|
+
this.disabled$.next(false);
|
|
2411
|
+
}
|
|
2412
|
+
clear() {
|
|
2413
|
+
this.text$.next('');
|
|
2414
|
+
}
|
|
2415
|
+
refetchContactMoments() {
|
|
2416
|
+
this.refetchContactMoments$.next('');
|
|
2417
|
+
}
|
|
2418
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: DossierDetailTabContactMomentsComponent, deps: [{ token: ContactMomentService }, { token: i3$2.AlertService }, { token: i3$1.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2419
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: DossierDetailTabContactMomentsComponent, isStandalone: true, selector: "valtimo-dossier-detail-tab-contact-moments", viewQueries: [{ propertyName: "modal", first: true, predicate: ["contactMomentsNoteModal"], descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"contact-moments-container\">\n <ng-container *ngTemplateOutlet=\"buttons\"></ng-container>\n <ng-container *ngTemplateOutlet=\"moments\"></ng-container>\n</div>\n\n<valtimo-modal\n #contactMomentsNoteModal\n [title]=\"'dossier.contactMoments.popupTitle' | translate\"\n [showFooter]=\"true\"\n [elementId]=\"'contact-moments-modal'\"\n>\n <div class=\"mt-2\" body>\n <ng-container *ngTemplateOutlet=\"body\"></ng-container>\n </div>\n <div footer>\n <ng-container *ngTemplateOutlet=\"footer\"></ng-container>\n </div>\n</valtimo-modal>\n\n<ng-template #body>\n <form>\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"body\">\n {{ 'dossier.contactMoments.noteText' | translate }}\n </label>\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <textarea\n [disabled]=\"disabled$ | async\"\n class=\"form-control\"\n id=\"body\"\n name=\"body\"\n [ngModel]=\"text$ | async\"\n (ngModelChange)=\"textChange($event)\"\n ></textarea>\n </div>\n </div>\n </form>\n</ng-template>\n\n<ng-template #footer>\n <button\n *ngIf=\"(disabled$ | async) === false; else loading\"\n class=\"btn btn-primary\"\n [disabled]=\"(valid$ | async) === false || (disabled$ | async)\"\n (click)=\"saveNote()\"\n >\n {{ 'dossier.contactMoments.saveButtonText' | translate }}\n </button>\n</ng-template>\n\n<ng-template #loading>\n <valtimo-spinner [noMarginTop]=\"true\"></valtimo-spinner>\n</ng-template>\n\n<ng-template #buttons>\n <div class=\"btn-group mt-m3px mb-3 button-container\">\n <button class=\"btn btn-primary btn-space\" (click)=\"buttonClick()\">\n <i class=\"icon mdi mdi-note-plus\"></i>\n {{ 'dossier.contactMoments.makeNoteButton' | translate }}\n </button>\n </div>\n</ng-template>\n\n<ng-template #moments>\n <div *ngIf=\"contactMoments$ | async as contactMoments; else loading\">\n <valtimo-timeline [items]=\"contactMoments\"></valtimo-timeline>\n </div>\n</ng-template>\n", styles: [".contact-moments-container{display:flex;flex-direction:column}.button-container{display:inline;align-self:flex-end}\n/*!\n * Copyright 2015-2024 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: ModalModule$1 }, { kind: "component", type: i3$2.ModalComponent, selector: "valtimo-modal", inputs: ["elementId", "title", "subtitle", "templateBelowSubtitle", "showFooter"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: SpinnerModule }, { kind: "component", type: i3$2.SpinnerComponent, selector: "valtimo-spinner", inputs: ["useBootstrapSpinner", "name", "type", "size", "color", "bdColor", "fullScreen", "noMarginTop"] }, { kind: "ngmodule", type: TimelineModule }, { kind: "component", type: i3$2.TimelineComponent, selector: "valtimo-timeline", inputs: ["items", "actions"] }] }); }
|
|
2420
|
+
}
|
|
2421
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: DossierDetailTabContactMomentsComponent, decorators: [{
|
|
2422
|
+
type: Component,
|
|
2423
|
+
args: [{ selector: 'valtimo-dossier-detail-tab-contact-moments', standalone: true, imports: [CommonModule, ModalModule$1, TranslateModule, FormsModule, SpinnerModule, TimelineModule], template: "<!--\n ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"contact-moments-container\">\n <ng-container *ngTemplateOutlet=\"buttons\"></ng-container>\n <ng-container *ngTemplateOutlet=\"moments\"></ng-container>\n</div>\n\n<valtimo-modal\n #contactMomentsNoteModal\n [title]=\"'dossier.contactMoments.popupTitle' | translate\"\n [showFooter]=\"true\"\n [elementId]=\"'contact-moments-modal'\"\n>\n <div class=\"mt-2\" body>\n <ng-container *ngTemplateOutlet=\"body\"></ng-container>\n </div>\n <div footer>\n <ng-container *ngTemplateOutlet=\"footer\"></ng-container>\n </div>\n</valtimo-modal>\n\n<ng-template #body>\n <form>\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"body\">\n {{ 'dossier.contactMoments.noteText' | translate }}\n </label>\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <textarea\n [disabled]=\"disabled$ | async\"\n class=\"form-control\"\n id=\"body\"\n name=\"body\"\n [ngModel]=\"text$ | async\"\n (ngModelChange)=\"textChange($event)\"\n ></textarea>\n </div>\n </div>\n </form>\n</ng-template>\n\n<ng-template #footer>\n <button\n *ngIf=\"(disabled$ | async) === false; else loading\"\n class=\"btn btn-primary\"\n [disabled]=\"(valid$ | async) === false || (disabled$ | async)\"\n (click)=\"saveNote()\"\n >\n {{ 'dossier.contactMoments.saveButtonText' | translate }}\n </button>\n</ng-template>\n\n<ng-template #loading>\n <valtimo-spinner [noMarginTop]=\"true\"></valtimo-spinner>\n</ng-template>\n\n<ng-template #buttons>\n <div class=\"btn-group mt-m3px mb-3 button-container\">\n <button class=\"btn btn-primary btn-space\" (click)=\"buttonClick()\">\n <i class=\"icon mdi mdi-note-plus\"></i>\n {{ 'dossier.contactMoments.makeNoteButton' | translate }}\n </button>\n </div>\n</ng-template>\n\n<ng-template #moments>\n <div *ngIf=\"contactMoments$ | async as contactMoments; else loading\">\n <valtimo-timeline [items]=\"contactMoments\"></valtimo-timeline>\n </div>\n</ng-template>\n", styles: [".contact-moments-container{display:flex;flex-direction:column}.button-container{display:inline;align-self:flex-end}\n/*!\n * Copyright 2015-2024 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"] }]
|
|
2424
|
+
}], ctorParameters: () => [{ type: ContactMomentService }, { type: i3$2.AlertService }, { type: i3$1.TranslateService }], propDecorators: { modal: [{
|
|
2425
|
+
type: ViewChild,
|
|
2426
|
+
args: ['contactMomentsNoteModal']
|
|
2427
|
+
}] } });
|
|
2428
|
+
|
|
2429
|
+
/*
|
|
2430
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
2431
|
+
*
|
|
2432
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
2433
|
+
* you may not use this file except in compliance with the License.
|
|
2434
|
+
* You may obtain a copy of the License at
|
|
2435
|
+
*
|
|
2436
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
2437
|
+
*
|
|
2438
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2439
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
2440
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2441
|
+
* See the License for the specific language governing permissions and
|
|
2442
|
+
* limitations under the License.
|
|
2443
|
+
*/
|
|
2444
|
+
|
|
2445
|
+
/*
|
|
2446
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
2447
|
+
*
|
|
2448
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
2449
|
+
* you may not use this file except in compliance with the License.
|
|
2450
|
+
* You may obtain a copy of the License at
|
|
2451
|
+
*
|
|
2452
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
2453
|
+
*
|
|
2454
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2455
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
2456
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2457
|
+
* See the License for the specific language governing permissions and
|
|
2458
|
+
* limitations under the License.
|
|
2459
|
+
*/
|
|
2460
|
+
|
|
2461
|
+
/*
|
|
2462
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
2463
|
+
*
|
|
2464
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
2465
|
+
* you may not use this file except in compliance with the License.
|
|
2466
|
+
* You may obtain a copy of the License at
|
|
2467
|
+
*
|
|
2468
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
2469
|
+
*
|
|
2470
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2471
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
2472
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2473
|
+
* See the License for the specific language governing permissions and
|
|
2474
|
+
* limitations under the License.
|
|
2475
|
+
*/
|
|
2476
|
+
/**
|
|
2477
|
+
* @deprecated Will be replace by new plugins
|
|
2478
|
+
*/
|
|
2479
|
+
class CustomerService {
|
|
2480
|
+
constructor(http, configService) {
|
|
2481
|
+
this.http = http;
|
|
2482
|
+
this.valtimoEndpointUri = configService.config.valtimoApi.endpointUri;
|
|
2483
|
+
}
|
|
2484
|
+
getCustomers(request) {
|
|
2485
|
+
return this.http.post(`${this.valtimoEndpointUri}v1/haalcentraal/personen`, request);
|
|
2486
|
+
}
|
|
2487
|
+
getCustomerCases(bsn) {
|
|
2488
|
+
return this.http.get(`${this.valtimoEndpointUri}v1/zaken/${bsn}`);
|
|
2489
|
+
}
|
|
2490
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: CustomerService, deps: [{ token: i1.HttpClient }, { token: i2$1.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2491
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: CustomerService, providedIn: 'root' }); }
|
|
2492
|
+
}
|
|
2493
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: CustomerService, decorators: [{
|
|
2494
|
+
type: Injectable,
|
|
2495
|
+
args: [{
|
|
2496
|
+
providedIn: 'root',
|
|
2497
|
+
}]
|
|
2498
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2$1.ConfigService }] });
|
|
2499
|
+
|
|
2500
|
+
/*
|
|
2501
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
2502
|
+
*
|
|
2503
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
2504
|
+
* you may not use this file except in compliance with the License.
|
|
2505
|
+
* You may obtain a copy of the License at
|
|
2506
|
+
*
|
|
2507
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
2508
|
+
*
|
|
2509
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2510
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
2511
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2512
|
+
* See the License for the specific language governing permissions and
|
|
2513
|
+
* limitations under the License.
|
|
2514
|
+
*/
|
|
2515
|
+
|
|
2516
|
+
/*
|
|
2517
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
2518
|
+
*
|
|
2519
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
2520
|
+
* you may not use this file except in compliance with the License.
|
|
2521
|
+
* You may obtain a copy of the License at
|
|
2522
|
+
*
|
|
2523
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
2524
|
+
*
|
|
2525
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2526
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
2527
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2528
|
+
* See the License for the specific language governing permissions and
|
|
2529
|
+
* limitations under the License.
|
|
2530
|
+
*/
|
|
2531
|
+
|
|
2532
|
+
/*
|
|
2533
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
2534
|
+
*
|
|
2535
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
2536
|
+
* you may not use this file except in compliance with the License.
|
|
2537
|
+
* You may obtain a copy of the License at
|
|
2538
|
+
*
|
|
2539
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
2540
|
+
*
|
|
2541
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2542
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
2543
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2544
|
+
* See the License for the specific language governing permissions and
|
|
2545
|
+
* limitations under the License.
|
|
2546
|
+
*/
|
|
2547
|
+
|
|
2548
|
+
/*
|
|
2549
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
2550
|
+
*
|
|
2551
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
2552
|
+
* you may not use this file except in compliance with the License.
|
|
2553
|
+
* You may obtain a copy of the License at
|
|
2554
|
+
*
|
|
2555
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
2556
|
+
*
|
|
2557
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2558
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
2559
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2560
|
+
* See the License for the specific language governing permissions and
|
|
2561
|
+
* limitations under the License.
|
|
2562
|
+
*/
|
|
2563
|
+
|
|
2564
|
+
/*
|
|
2565
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
2566
|
+
*
|
|
2567
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
2568
|
+
* you may not use this file except in compliance with the License.
|
|
2569
|
+
* You may obtain a copy of the License at
|
|
2570
|
+
*
|
|
2571
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
2572
|
+
*
|
|
2573
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2574
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
2575
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2576
|
+
* See the License for the specific language governing permissions and
|
|
2577
|
+
* limitations under the License.
|
|
2578
|
+
*/
|
|
2579
|
+
/**
|
|
2580
|
+
* @deprecated Will be replace by new plugins
|
|
2581
|
+
*/
|
|
2582
|
+
class CustomerListComponent {
|
|
2583
|
+
constructor(customerService, translateService, configService, router) {
|
|
2584
|
+
this.customerService = customerService;
|
|
2585
|
+
this.translateService = translateService;
|
|
2586
|
+
this.configService = configService;
|
|
2587
|
+
this.router = router;
|
|
2588
|
+
this.fields$ = combineLatest([
|
|
2589
|
+
this.translateService.stream('customers.name'),
|
|
2590
|
+
this.translateService.stream('customers.citizenServiceNumber'),
|
|
2591
|
+
this.translateService.stream('customers.dateOfBirth'),
|
|
2592
|
+
]).pipe(map$1(([nameLabel, numberLabel, dateOfBirthLabel]) => [
|
|
2593
|
+
{
|
|
2594
|
+
label: numberLabel,
|
|
2595
|
+
key: 'citizenServiceNumber',
|
|
2596
|
+
},
|
|
2597
|
+
{
|
|
2598
|
+
label: nameLabel,
|
|
2599
|
+
key: 'name',
|
|
2600
|
+
},
|
|
2601
|
+
{
|
|
2602
|
+
label: dateOfBirthLabel,
|
|
2603
|
+
key: 'dateOfBirth',
|
|
2604
|
+
},
|
|
2605
|
+
]));
|
|
2606
|
+
this.bsn$ = new BehaviorSubject('');
|
|
2607
|
+
this.bsnValid$ = this.bsn$.pipe(map$1(bsn => {
|
|
2608
|
+
const regex = new RegExp(/^[0-9]{9}$/gm);
|
|
2609
|
+
return regex.test(bsn);
|
|
2610
|
+
}));
|
|
2611
|
+
this.dateOfBirth$ = new BehaviorSubject('');
|
|
2612
|
+
this.dateOfBirthValid$ = this.dateOfBirth$.pipe(map$1(dateOfBirth => {
|
|
2613
|
+
const regex = new RegExp(/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/gm);
|
|
2614
|
+
return regex.test(dateOfBirth);
|
|
2615
|
+
}));
|
|
2616
|
+
this.familyName$ = new BehaviorSubject('');
|
|
2617
|
+
this.searchParameters$ = combineLatest([this.bsn$, this.dateOfBirth$, this.familyName$, this.bsnValid$, this.dateOfBirthValid$]).pipe(map$1(([bsn, dateOfBirth, familyName, bsnValid, dateOfBirthValid]) => {
|
|
2618
|
+
if (bsn && bsnValid) {
|
|
2619
|
+
this.loading$.next(true);
|
|
2620
|
+
return { bsn };
|
|
2621
|
+
}
|
|
2622
|
+
else if (dateOfBirth && familyName && dateOfBirthValid) {
|
|
2623
|
+
this.loading$.next(true);
|
|
2624
|
+
return {
|
|
2625
|
+
geslachtsnaam: familyName,
|
|
2626
|
+
geboortedatum: dateOfBirth,
|
|
2627
|
+
};
|
|
2628
|
+
}
|
|
2629
|
+
return undefined;
|
|
2630
|
+
}));
|
|
2631
|
+
this.customers$ = this.searchParameters$.pipe(debounceTime(500), switchMap$1(searchParameters => {
|
|
2632
|
+
if (searchParameters?.bsn ||
|
|
2633
|
+
(searchParameters?.geslachtsnaam &&
|
|
2634
|
+
searchParameters?.geboortedatum)) {
|
|
2635
|
+
return this.customerService
|
|
2636
|
+
.getCustomers(searchParameters)
|
|
2637
|
+
.pipe(catchError(() => of([])));
|
|
2638
|
+
}
|
|
2639
|
+
return of([]);
|
|
2640
|
+
}), map$1(customers => customers.map(customer => ({
|
|
2641
|
+
citizenServiceNumber: customer.burgerservicenummer,
|
|
2642
|
+
dateOfBirth: customer.geboorteDatum,
|
|
2643
|
+
name: `${customer.geslachtsnaam}, ${customer.voornamen} ${customer.voorletters}`,
|
|
2644
|
+
}))), tap$1(() => {
|
|
2645
|
+
this.loading$.next(false);
|
|
2646
|
+
}));
|
|
2647
|
+
this.loading$ = new BehaviorSubject(true);
|
|
2648
|
+
}
|
|
2649
|
+
bsnChange(bsn) {
|
|
2650
|
+
this.clearDateOfBirth();
|
|
2651
|
+
this.clearFamilyName();
|
|
2652
|
+
this.bsn$.next(bsn);
|
|
2653
|
+
}
|
|
2654
|
+
dateOfBirthChange(dateOfBirth) {
|
|
2655
|
+
this.clearBsn();
|
|
2656
|
+
this.dateOfBirth$.next(dateOfBirth);
|
|
2657
|
+
}
|
|
2658
|
+
familyNameChange(familyName) {
|
|
2659
|
+
this.clearBsn();
|
|
2660
|
+
this.familyName$.next(familyName);
|
|
2661
|
+
}
|
|
2662
|
+
rowClick(customer) {
|
|
2663
|
+
const config = this.configService.config;
|
|
2664
|
+
const bsn = customer?.citizenServiceNumber;
|
|
2665
|
+
if (bsn && config?.featureToggles?.enableHackathonCasesPage) {
|
|
2666
|
+
this.router.navigate([`/klanten/klant/${bsn}`]);
|
|
2667
|
+
}
|
|
2668
|
+
}
|
|
2669
|
+
clearBsn() {
|
|
2670
|
+
this.bsn$.next('');
|
|
2671
|
+
}
|
|
2672
|
+
clearDateOfBirth() {
|
|
2673
|
+
this.dateOfBirth$.next('');
|
|
2674
|
+
}
|
|
2675
|
+
clearFamilyName() {
|
|
2676
|
+
this.familyName$.next('');
|
|
2677
|
+
}
|
|
2678
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: CustomerListComponent, deps: [{ token: CustomerService }, { token: i3$1.TranslateService }, { token: i2$1.ConfigService }, { token: i1$1.Router }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2679
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: CustomerListComponent, selector: "valtimo-customer-list", ngImport: i0, template: "<!--\n ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container *ngTemplateOutlet=\"sidebar\"></ng-container>\n\n<div\n class=\"main-content pt-0\"\n *ngIf=\"{customers: customers$ | async, fields: fields$ | async} as obs\"\n>\n <div class=\"container-fluid\">\n <div class=\"col-12 px-0 mb-5\">\n <ng-container *ngIf=\"(loading$ | async) === false; else loading\">\n <ng-container\n *ngTemplateOutlet=\"list; context: {customers: obs.customers, fields: obs.fields}\"\n ></ng-container>\n </ng-container>\n </div>\n </div>\n</div>\n\n<ng-template #list let-customers=\"customers\" let-fields=\"fields\">\n <valtimo-widget>\n <valtimo-list\n [items]=\"customers\"\n [fields]=\"fields\"\n [header]=\"true\"\n (rowClicked)=\"rowClick($event)\"\n >\n <div header>\n <h3 class=\"list-header-title\">{{ 'customers.title' | translate }}</h3>\n <h5 class=\"list-header-description\">{{ 'customers.subtitle' | translate }}</h5>\n </div>\n </valtimo-list>\n </valtimo-widget>\n</ng-template>\n\n<ng-template #loading>\n <valtimo-spinner></valtimo-spinner>\n</ng-template>\n\n<ng-template #sidebar>\n <valtimo-filter-sidebar>\n <h4 class=\"title\">{{ 'customers.searchBasedOn' | translate }}</h4>\n <div class=\"tab-container\">\n <ul class=\"nav nav-tabs nav-tabs-classic\" role=\"tablist\">\n <li class=\"nav-item\">\n <a\n class=\"nav-link active\"\n href=\"#search_bsn\"\n data-toggle=\"tab\"\n role=\"tab\"\n aria-selected=\"true\"\n ><b>{{ 'customers.citizenServiceNumber' | translate }}</b></a\n >\n </li>\n <li class=\"nav-item\">\n <a\n class=\"nav-link\"\n href=\"#search_birth_data\"\n data-toggle=\"tab\"\n role=\"tab\"\n aria-selected=\"false\"\n ><b>{{ 'customers.lastNameAndDateOfBirth' | translate }}</b></a\n >\n </li>\n </ul>\n <div class=\"tab-content\">\n <div class=\"tab-pane active\" id=\"search_bsn\" role=\"tabpanel\">\n <ng-container *ngTemplateOutlet=\"bsnTab\"></ng-container>\n </div>\n <div class=\"tab-pane\" id=\"search_birth_data\" role=\"tabpanel\">\n <ng-container *ngTemplateOutlet=\"birthDataTab\"></ng-container>\n </div>\n </div>\n </div>\n </valtimo-filter-sidebar>\n</ng-template>\n\n<ng-template #bsnTab>\n <form>\n <div class=\"form-group pt-2\">\n <label for=\"inputBsn\">{{ 'customers.citizenServiceNumber' | translate }}</label>\n <input\n class=\"form-control\"\n id=\"inputBsn\"\n type=\"text\"\n name=\"bsn\"\n [placeholder]=\"'customers.citizenServiceNumberPlaceholder' | translate\"\n [ngModel]=\"bsn$ | async\"\n (ngModelChange)=\"bsnChange($event)\"\n [ngClass]=\"{'is-valid': bsnValid$ | async}\"\n />\n </div>\n </form>\n</ng-template>\n\n<ng-template #birthDataTab>\n <form>\n <div class=\"form-group pt-2\">\n <label for=\"inputDateOfBirth\">{{ 'customers.dateOfBirth' | translate }}</label>\n <input\n class=\"form-control\"\n id=\"inputDateOfBirth\"\n type=\"text\"\n name=\"dateOfBirth\"\n [placeholder]=\"'customers.dateOfBirthPlaceholder' | translate\"\n [ngModel]=\"dateOfBirth$ | async\"\n (ngModelChange)=\"dateOfBirthChange($event)\"\n [ngClass]=\"{'is-valid': dateOfBirthValid$ | async}\"\n />\n </div>\n <div class=\"form-group\">\n <label for=\"inputFamilyName\">{{ 'customers.familyName' | translate }}</label>\n <input\n class=\"form-control\"\n id=\"inputFamilyName\"\n type=\"text\"\n name=\"familyName\"\n [placeholder]=\"'customers.familyNamePlaceholder' | translate\"\n [ngModel]=\"familyName$ | async\"\n (ngModelChange)=\"familyNameChange($event)\"\n [ngClass]=\"{'is-valid': familyName$ | async}\"\n />\n </div>\n </form>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2024 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i3$2.WidgetComponent, selector: "valtimo-widget", inputs: ["type", "name", "icon", "contrast", "divider", "title", "subtitle", "collapseAble", "collapse", "additionalClasses"] }, { kind: "component", type: i3$2.ListComponent, selector: "valtimo-list", inputs: ["items", "fields", "pagination", "viewMode", "isSearchable", "header", "actions", "paginationIdentifier", "initialSortState", "lastColumnTemplate"], outputs: ["rowClicked", "paginationClicked", "paginationSet", "search", "sortChanged"] }, { kind: "component", type: i3$2.SpinnerComponent, selector: "valtimo-spinner", inputs: ["useBootstrapSpinner", "name", "type", "size", "color", "bdColor", "fullScreen", "noMarginTop"] }, { kind: "component", type: i3$2.FilterSidebarComponent, selector: "valtimo-filter-sidebar" }, { kind: "directive", type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }] }); }
|
|
2680
|
+
}
|
|
2681
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: CustomerListComponent, decorators: [{
|
|
2682
|
+
type: Component,
|
|
2683
|
+
args: [{ selector: 'valtimo-customer-list', template: "<!--\n ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container *ngTemplateOutlet=\"sidebar\"></ng-container>\n\n<div\n class=\"main-content pt-0\"\n *ngIf=\"{customers: customers$ | async, fields: fields$ | async} as obs\"\n>\n <div class=\"container-fluid\">\n <div class=\"col-12 px-0 mb-5\">\n <ng-container *ngIf=\"(loading$ | async) === false; else loading\">\n <ng-container\n *ngTemplateOutlet=\"list; context: {customers: obs.customers, fields: obs.fields}\"\n ></ng-container>\n </ng-container>\n </div>\n </div>\n</div>\n\n<ng-template #list let-customers=\"customers\" let-fields=\"fields\">\n <valtimo-widget>\n <valtimo-list\n [items]=\"customers\"\n [fields]=\"fields\"\n [header]=\"true\"\n (rowClicked)=\"rowClick($event)\"\n >\n <div header>\n <h3 class=\"list-header-title\">{{ 'customers.title' | translate }}</h3>\n <h5 class=\"list-header-description\">{{ 'customers.subtitle' | translate }}</h5>\n </div>\n </valtimo-list>\n </valtimo-widget>\n</ng-template>\n\n<ng-template #loading>\n <valtimo-spinner></valtimo-spinner>\n</ng-template>\n\n<ng-template #sidebar>\n <valtimo-filter-sidebar>\n <h4 class=\"title\">{{ 'customers.searchBasedOn' | translate }}</h4>\n <div class=\"tab-container\">\n <ul class=\"nav nav-tabs nav-tabs-classic\" role=\"tablist\">\n <li class=\"nav-item\">\n <a\n class=\"nav-link active\"\n href=\"#search_bsn\"\n data-toggle=\"tab\"\n role=\"tab\"\n aria-selected=\"true\"\n ><b>{{ 'customers.citizenServiceNumber' | translate }}</b></a\n >\n </li>\n <li class=\"nav-item\">\n <a\n class=\"nav-link\"\n href=\"#search_birth_data\"\n data-toggle=\"tab\"\n role=\"tab\"\n aria-selected=\"false\"\n ><b>{{ 'customers.lastNameAndDateOfBirth' | translate }}</b></a\n >\n </li>\n </ul>\n <div class=\"tab-content\">\n <div class=\"tab-pane active\" id=\"search_bsn\" role=\"tabpanel\">\n <ng-container *ngTemplateOutlet=\"bsnTab\"></ng-container>\n </div>\n <div class=\"tab-pane\" id=\"search_birth_data\" role=\"tabpanel\">\n <ng-container *ngTemplateOutlet=\"birthDataTab\"></ng-container>\n </div>\n </div>\n </div>\n </valtimo-filter-sidebar>\n</ng-template>\n\n<ng-template #bsnTab>\n <form>\n <div class=\"form-group pt-2\">\n <label for=\"inputBsn\">{{ 'customers.citizenServiceNumber' | translate }}</label>\n <input\n class=\"form-control\"\n id=\"inputBsn\"\n type=\"text\"\n name=\"bsn\"\n [placeholder]=\"'customers.citizenServiceNumberPlaceholder' | translate\"\n [ngModel]=\"bsn$ | async\"\n (ngModelChange)=\"bsnChange($event)\"\n [ngClass]=\"{'is-valid': bsnValid$ | async}\"\n />\n </div>\n </form>\n</ng-template>\n\n<ng-template #birthDataTab>\n <form>\n <div class=\"form-group pt-2\">\n <label for=\"inputDateOfBirth\">{{ 'customers.dateOfBirth' | translate }}</label>\n <input\n class=\"form-control\"\n id=\"inputDateOfBirth\"\n type=\"text\"\n name=\"dateOfBirth\"\n [placeholder]=\"'customers.dateOfBirthPlaceholder' | translate\"\n [ngModel]=\"dateOfBirth$ | async\"\n (ngModelChange)=\"dateOfBirthChange($event)\"\n [ngClass]=\"{'is-valid': dateOfBirthValid$ | async}\"\n />\n </div>\n <div class=\"form-group\">\n <label for=\"inputFamilyName\">{{ 'customers.familyName' | translate }}</label>\n <input\n class=\"form-control\"\n id=\"inputFamilyName\"\n type=\"text\"\n name=\"familyName\"\n [placeholder]=\"'customers.familyNamePlaceholder' | translate\"\n [ngModel]=\"familyName$ | async\"\n (ngModelChange)=\"familyNameChange($event)\"\n [ngClass]=\"{'is-valid': familyName$ | async}\"\n />\n </div>\n </form>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2024 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"] }]
|
|
2684
|
+
}], ctorParameters: () => [{ type: CustomerService }, { type: i3$1.TranslateService }, { type: i2$1.ConfigService }, { type: i1$1.Router }] });
|
|
2685
|
+
|
|
2686
|
+
/*
|
|
2687
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
2688
|
+
*
|
|
2689
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
2690
|
+
* you may not use this file except in compliance with the License.
|
|
2691
|
+
* You may obtain a copy of the License at
|
|
2692
|
+
*
|
|
2693
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
2694
|
+
*
|
|
2695
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2696
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
2697
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2698
|
+
* See the License for the specific language governing permissions and
|
|
2699
|
+
* limitations under the License.
|
|
2700
|
+
*/
|
|
2701
|
+
/**
|
|
2702
|
+
* @deprecated Will be replace by new plugins
|
|
2703
|
+
*/
|
|
2704
|
+
class CasesListComponent {
|
|
2705
|
+
constructor(route, customerService) {
|
|
2706
|
+
this.route = route;
|
|
2707
|
+
this.customerService = customerService;
|
|
2708
|
+
this.customerCases$ = this.route.params.pipe(switchMap$1(params => (params?.bsn ? this.customerService.getCustomerCases(params.bsn) : of([]))), tap$1(() => this.loading$.next(false)));
|
|
2709
|
+
this.loading$ = new BehaviorSubject(true);
|
|
2710
|
+
this.columns$ = new BehaviorSubject([
|
|
2711
|
+
{
|
|
2712
|
+
labelTranslationKey: 'customerCases.labels.zaakNummer',
|
|
2713
|
+
dataKey: 'zaakNummer',
|
|
2714
|
+
},
|
|
2715
|
+
{
|
|
2716
|
+
labelTranslationKey: 'customerCases.labels.zaakStatus',
|
|
2717
|
+
dataKey: 'zaakStatus',
|
|
2718
|
+
},
|
|
2719
|
+
{
|
|
2720
|
+
labelTranslationKey: 'customerCases.labels.zaakType',
|
|
2721
|
+
dataKey: 'zaakType',
|
|
2722
|
+
},
|
|
2723
|
+
]);
|
|
2724
|
+
}
|
|
2725
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: CasesListComponent, deps: [{ token: i1$1.ActivatedRoute }, { token: CustomerService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2726
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: CasesListComponent, selector: "valtimo-cases-list", ngImport: i0, template: "<!--\n ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<v-page-container\n *ngIf=\"{\n customerCases: customerCases$ | async,\n columns: columns$ | async,\n loading: loading$ | async\n } as obs\"\n>\n <v-page-header>\n <v-page-header-introduction>\n <v-title>{{ 'pages.customercases.title' | translate }}</v-title>\n <v-paragraph>{{ 'pages.customercases.description' | translate }}</v-paragraph>\n </v-page-header-introduction>\n </v-page-header>\n <v-page-content>\n <v-table\n [loading]=\"obs.loading\"\n [items]=\"obs.customerCases\"\n [columns]=\"obs.columns\"\n [showEditButtons]=\"false\"\n [amountOfLoadingRows]=\"2\"\n [itemsTranslationKey]=\"'customerCases.tableItemsText'\"\n [showPagination]=\"false\"\n ></v-table>\n </v-page-content>\n</v-page-container>\n", styles: ["/*!\n * Copyright 2015-2024 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$2.PageContainerComponent, selector: "v-page-container" }, { kind: "component", type: i3$2.PageContentComponent, selector: "v-page-content" }, { kind: "component", type: i3$2.VPageHeaderComponent, selector: "v-page-header" }, { kind: "component", type: i3$2.PageHeaderIntroductionComponent, selector: "v-page-header-introduction" }, { kind: "component", type: i3$2.TitleComponent, selector: "v-title", inputs: ["type", "margin", "fullWidth", "center"] }, { kind: "component", type: i3$2.ParagraphComponent, selector: "v-paragraph", inputs: ["center", "fullWidth", "margin", "italic", "loading"] }, { kind: "component", type: i3$2.TableComponent, selector: "v-table", inputs: ["items", "columns", "loading", "showEditButtons", "showPagination", "editButtonTranslationKey", "itemsTranslationKey", "noResultsTranslationKey", "mobileBreakpointPx", "amountOfLoadingRows", "collectionSize", "page", "size"], outputs: ["editButtonClicked", "paginationSizeSet", "paginationPageSet"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }] }); }
|
|
2727
|
+
}
|
|
2728
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: CasesListComponent, decorators: [{
|
|
2729
|
+
type: Component,
|
|
2730
|
+
args: [{ selector: 'valtimo-cases-list', template: "<!--\n ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<v-page-container\n *ngIf=\"{\n customerCases: customerCases$ | async,\n columns: columns$ | async,\n loading: loading$ | async\n } as obs\"\n>\n <v-page-header>\n <v-page-header-introduction>\n <v-title>{{ 'pages.customercases.title' | translate }}</v-title>\n <v-paragraph>{{ 'pages.customercases.description' | translate }}</v-paragraph>\n </v-page-header-introduction>\n </v-page-header>\n <v-page-content>\n <v-table\n [loading]=\"obs.loading\"\n [items]=\"obs.customerCases\"\n [columns]=\"obs.columns\"\n [showEditButtons]=\"false\"\n [amountOfLoadingRows]=\"2\"\n [itemsTranslationKey]=\"'customerCases.tableItemsText'\"\n [showPagination]=\"false\"\n ></v-table>\n </v-page-content>\n</v-page-container>\n", styles: ["/*!\n * Copyright 2015-2024 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"] }]
|
|
2731
|
+
}], ctorParameters: () => [{ type: i1$1.ActivatedRoute }, { type: CustomerService }] });
|
|
2732
|
+
|
|
2733
|
+
/*
|
|
2734
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
2735
|
+
*
|
|
2736
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
2737
|
+
* you may not use this file except in compliance with the License.
|
|
2738
|
+
* You may obtain a copy of the License at
|
|
2739
|
+
*
|
|
2740
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
2741
|
+
*
|
|
2742
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2743
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
2744
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2745
|
+
* See the License for the specific language governing permissions and
|
|
2746
|
+
* limitations under the License.
|
|
2747
|
+
*/
|
|
2748
|
+
const routes = [
|
|
2749
|
+
{
|
|
2750
|
+
path: 'klanten',
|
|
2751
|
+
component: CustomerListComponent,
|
|
2752
|
+
canActivate: [AuthGuardService],
|
|
2753
|
+
data: { title: 'Customers', roles: [ROLE_USER] },
|
|
2754
|
+
},
|
|
2755
|
+
{
|
|
2756
|
+
path: 'klanten/klant/:bsn',
|
|
2757
|
+
component: CasesListComponent,
|
|
2758
|
+
canActivate: [AuthGuardService],
|
|
2759
|
+
data: { title: 'customerCases', roles: [ROLE_USER] },
|
|
2760
|
+
},
|
|
2761
|
+
];
|
|
2762
|
+
class CustomerRoutingModule {
|
|
2763
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: CustomerRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2764
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.3", ngImport: i0, type: CustomerRoutingModule, imports: [CommonModule, i1$1.RouterModule], exports: [RouterModule] }); }
|
|
2765
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: CustomerRoutingModule, imports: [CommonModule, RouterModule.forChild(routes), RouterModule] }); }
|
|
2766
|
+
}
|
|
2767
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: CustomerRoutingModule, decorators: [{
|
|
2768
|
+
type: NgModule,
|
|
2769
|
+
args: [{
|
|
2770
|
+
imports: [CommonModule, RouterModule.forChild(routes)],
|
|
2771
|
+
exports: [RouterModule],
|
|
2772
|
+
}]
|
|
2773
|
+
}] });
|
|
2774
|
+
|
|
2775
|
+
/*
|
|
2776
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
2777
|
+
*
|
|
2778
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
2779
|
+
* you may not use this file except in compliance with the License.
|
|
2780
|
+
* You may obtain a copy of the License at
|
|
2781
|
+
*
|
|
2782
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
2783
|
+
*
|
|
2784
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2785
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
2786
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2787
|
+
* See the License for the specific language governing permissions and
|
|
2788
|
+
* limitations under the License.
|
|
2789
|
+
*/
|
|
2790
|
+
/**
|
|
2791
|
+
* @deprecated Will be replace by new plugins
|
|
2792
|
+
*/
|
|
2793
|
+
class CustomerModule {
|
|
2794
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: CustomerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2795
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.3", ngImport: i0, type: CustomerModule, declarations: [CustomerListComponent, CasesListComponent], imports: [CommonModule,
|
|
2796
|
+
WidgetModule,
|
|
2797
|
+
CustomerRoutingModule,
|
|
2798
|
+
ListModule,
|
|
2799
|
+
SpinnerModule,
|
|
2800
|
+
TranslateModule,
|
|
2801
|
+
FilterSidebarModule,
|
|
2802
|
+
FormsModule,
|
|
2803
|
+
PageModule,
|
|
2804
|
+
TitleModule,
|
|
2805
|
+
ParagraphModule,
|
|
2806
|
+
TableModule], exports: [CustomerListComponent, CasesListComponent] }); }
|
|
2807
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: CustomerModule, imports: [CommonModule,
|
|
2808
|
+
WidgetModule,
|
|
2809
|
+
CustomerRoutingModule,
|
|
2810
|
+
ListModule,
|
|
2811
|
+
SpinnerModule,
|
|
2812
|
+
TranslateModule,
|
|
2813
|
+
FilterSidebarModule,
|
|
2814
|
+
FormsModule,
|
|
2815
|
+
PageModule,
|
|
2816
|
+
TitleModule,
|
|
2817
|
+
ParagraphModule,
|
|
2818
|
+
TableModule] }); }
|
|
2819
|
+
}
|
|
2820
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: CustomerModule, decorators: [{
|
|
2821
|
+
type: NgModule,
|
|
2822
|
+
args: [{
|
|
2823
|
+
imports: [
|
|
2824
|
+
CommonModule,
|
|
2825
|
+
WidgetModule,
|
|
2826
|
+
CustomerRoutingModule,
|
|
2827
|
+
ListModule,
|
|
2828
|
+
SpinnerModule,
|
|
2829
|
+
TranslateModule,
|
|
2830
|
+
FilterSidebarModule,
|
|
2831
|
+
FormsModule,
|
|
2832
|
+
PageModule,
|
|
2833
|
+
TitleModule,
|
|
2834
|
+
ParagraphModule,
|
|
2835
|
+
TableModule,
|
|
2836
|
+
],
|
|
2837
|
+
declarations: [CustomerListComponent, CasesListComponent],
|
|
2838
|
+
exports: [CustomerListComponent, CasesListComponent],
|
|
2839
|
+
}]
|
|
2840
|
+
}] });
|
|
2841
|
+
|
|
2842
|
+
/*
|
|
2843
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
2844
|
+
*
|
|
2845
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
2846
|
+
* you may not use this file except in compliance with the License.
|
|
2847
|
+
* You may obtain a copy of the License at
|
|
2848
|
+
*
|
|
2849
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
2850
|
+
*
|
|
2851
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2852
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
2853
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2854
|
+
* See the License for the specific language governing permissions and
|
|
2855
|
+
* limitations under the License.
|
|
2856
|
+
*/
|
|
2857
|
+
|
|
2858
|
+
/*
|
|
2859
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
2860
|
+
*
|
|
2861
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
2862
|
+
* you may not use this file except in compliance with the License.
|
|
2863
|
+
* You may obtain a copy of the License at
|
|
2864
|
+
*
|
|
2865
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
2866
|
+
*
|
|
2867
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2868
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
2869
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2870
|
+
* See the License for the specific language governing permissions and
|
|
2871
|
+
* limitations under the License.
|
|
2872
|
+
*/
|
|
2873
|
+
class DocumentObjectenApiSyncService extends BaseApiService {
|
|
2874
|
+
constructor(httpClient, configService) {
|
|
2875
|
+
super(httpClient, configService);
|
|
2876
|
+
this.httpClient = httpClient;
|
|
2877
|
+
this.configService = configService;
|
|
2878
|
+
}
|
|
2879
|
+
getDocumentDefinition(documentDefinitionName) {
|
|
2880
|
+
return this.httpClient.get(this.getApiUrl(`/v1/document-definition/${documentDefinitionName}`));
|
|
2881
|
+
}
|
|
2882
|
+
getObjectManagementConfigurations() {
|
|
2883
|
+
return this.httpClient.get(this.getApiUrl(`/management/v1/object/management/configuration`));
|
|
2884
|
+
}
|
|
2885
|
+
getDocumentObjectenApiSync(documentDefinitionName, documentDefinitionVersion) {
|
|
2886
|
+
return this.httpClient.get(this.getApiUrl(`/management/v1/document-definition/${documentDefinitionName}/version/${documentDefinitionVersion}/objecten-api-sync`));
|
|
2887
|
+
}
|
|
2888
|
+
updateDocumentObjectenApiSync(documentDefinitionName, documentDefinitionVersion, request) {
|
|
2889
|
+
return this.httpClient.put(this.getApiUrl(`/management/v1/document-definition/${documentDefinitionName}/version/${documentDefinitionVersion}/objecten-api-sync`), request);
|
|
2890
|
+
}
|
|
2891
|
+
deleteDocumentObjectenApiSync(documentDefinitionName, documentDefinitionVersion) {
|
|
2892
|
+
return this.httpClient.delete(this.getApiUrl(`/management/v1/document-definition/${documentDefinitionName}/version/${documentDefinitionVersion}/objecten-api-sync`));
|
|
2893
|
+
}
|
|
2894
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: DocumentObjectenApiSyncService, deps: [{ token: i1.HttpClient }, { token: i2$1.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2895
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: DocumentObjectenApiSyncService, providedIn: 'root' }); }
|
|
2896
|
+
}
|
|
2897
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: DocumentObjectenApiSyncService, decorators: [{
|
|
2898
|
+
type: Injectable,
|
|
2899
|
+
args: [{
|
|
2900
|
+
providedIn: 'root',
|
|
2901
|
+
}]
|
|
2902
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2$1.ConfigService }] });
|
|
2903
|
+
|
|
2904
|
+
/*
|
|
2905
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
2906
|
+
*
|
|
2907
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
2908
|
+
* you may not use this file except in compliance with the License.
|
|
2909
|
+
* You may obtain a copy of the License at
|
|
2910
|
+
*
|
|
2911
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
2912
|
+
*
|
|
2913
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2914
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
2915
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2916
|
+
* See the License for the specific language governing permissions and
|
|
2917
|
+
* limitations under the License.
|
|
2918
|
+
*/
|
|
2919
|
+
|
|
2920
|
+
/*
|
|
2921
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
2922
|
+
*
|
|
2923
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
2924
|
+
* you may not use this file except in compliance with the License.
|
|
2925
|
+
* You may obtain a copy of the License at
|
|
2926
|
+
*
|
|
2927
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
2928
|
+
*
|
|
2929
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2930
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
2931
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2932
|
+
* See the License for the specific language governing permissions and
|
|
2933
|
+
* limitations under the License.
|
|
2934
|
+
*/
|
|
2935
|
+
class DocumentObjectenApiSyncComponent {
|
|
2936
|
+
get objectManagementConfigurationId() {
|
|
2937
|
+
return this.formGroup.get('objectManagementConfigurationId');
|
|
2938
|
+
}
|
|
2939
|
+
get enabled() {
|
|
2940
|
+
return this.formGroup.get('enabled');
|
|
2941
|
+
}
|
|
2942
|
+
constructor(route, documentObjectenApiSyncService, cdsThemeService) {
|
|
2943
|
+
this.route = route;
|
|
2944
|
+
this.documentObjectenApiSyncService = documentObjectenApiSyncService;
|
|
2945
|
+
this.cdsThemeService = cdsThemeService;
|
|
2946
|
+
this.loading$ = new BehaviorSubject(true);
|
|
2947
|
+
this.documentDefinitionName$ = this.route.params.pipe(map(params => params.name || ''));
|
|
2948
|
+
this.documentDefinition$ = this.documentDefinitionName$.pipe(switchMap(documentDefinitionName => this.documentObjectenApiSyncService.getDocumentDefinition(documentDefinitionName)));
|
|
2949
|
+
this.documentObjectenApiSync$ = new BehaviorSubject(null);
|
|
2950
|
+
this.objectManagementConfigurationItems$ = this.documentObjectenApiSyncService.getObjectManagementConfigurations().pipe(map(results => results?.map(configuration => ({
|
|
2951
|
+
id: configuration.id,
|
|
2952
|
+
text: configuration.title,
|
|
2953
|
+
}))));
|
|
2954
|
+
this.modalShowing$ = new BehaviorSubject(false);
|
|
2955
|
+
this.currentTheme$ = this.cdsThemeService.currentTheme$;
|
|
2956
|
+
this.formGroup = new FormGroup({
|
|
2957
|
+
objectManagementConfigurationId: new FormControl('', Validators.required),
|
|
2958
|
+
enabled: new FormControl(true),
|
|
2959
|
+
});
|
|
2960
|
+
this.valid$ = new BehaviorSubject(false);
|
|
2961
|
+
}
|
|
2962
|
+
ngOnInit() {
|
|
2963
|
+
this.loadDocumentenObjectenApiSync();
|
|
2964
|
+
}
|
|
2965
|
+
loadDocumentenObjectenApiSync() {
|
|
2966
|
+
this.documentDefinition$
|
|
2967
|
+
.pipe(switchMap(documentDefinition => this.documentObjectenApiSyncService.getDocumentObjectenApiSync(documentDefinition.id.name, documentDefinition.id.version)))
|
|
2968
|
+
.subscribe(documentObjectenApiSync => {
|
|
2969
|
+
this.loading$.next(false);
|
|
2970
|
+
this.configSelected(documentObjectenApiSync?.objectManagementConfigurationId);
|
|
2971
|
+
this.enabled.patchValue(documentObjectenApiSync?.enabled);
|
|
2972
|
+
this.documentObjectenApiSync$.next(documentObjectenApiSync);
|
|
2973
|
+
});
|
|
2974
|
+
}
|
|
2975
|
+
remove() {
|
|
2976
|
+
this.documentDefinition$
|
|
2977
|
+
.pipe(switchMap(documentDefinition => this.documentObjectenApiSyncService.deleteDocumentObjectenApiSync(documentDefinition.id.name, documentDefinition.id.version)), tap(() => {
|
|
2978
|
+
this.documentObjectenApiSync$.next(null);
|
|
2979
|
+
}))
|
|
2980
|
+
.subscribe();
|
|
2981
|
+
}
|
|
2982
|
+
submit() {
|
|
2983
|
+
const formValues = this.formGroup.getRawValue();
|
|
2984
|
+
this.documentDefinition$
|
|
2985
|
+
.pipe(switchMap(documentDefinition => this.documentObjectenApiSyncService.updateDocumentObjectenApiSync(documentDefinition.id.name, documentDefinition.id.version, {
|
|
2986
|
+
objectManagementConfigurationId: formValues.objectManagementConfigurationId,
|
|
2987
|
+
enabled: formValues.enabled,
|
|
2988
|
+
})))
|
|
2989
|
+
.subscribe(() => {
|
|
2990
|
+
this.loadDocumentenObjectenApiSync();
|
|
2991
|
+
this.hideModal();
|
|
2992
|
+
});
|
|
2993
|
+
}
|
|
2994
|
+
onModalClose() {
|
|
2995
|
+
this.hideModal();
|
|
2996
|
+
}
|
|
2997
|
+
showModal() {
|
|
2998
|
+
this.modalShowing$.next(true);
|
|
2999
|
+
}
|
|
3000
|
+
configSelected(selectedId) {
|
|
3001
|
+
if (!selectedId) {
|
|
3002
|
+
this.objectManagementConfigurationId.patchValue('');
|
|
3003
|
+
}
|
|
3004
|
+
else {
|
|
3005
|
+
this.objectManagementConfigurationId.patchValue(selectedId);
|
|
3006
|
+
}
|
|
3007
|
+
}
|
|
3008
|
+
hideModal() {
|
|
3009
|
+
this.modalShowing$.next(false);
|
|
3010
|
+
}
|
|
3011
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: DocumentObjectenApiSyncComponent, deps: [{ token: i1$1.ActivatedRoute }, { token: DocumentObjectenApiSyncService }, { token: i3$2.CdsThemeService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3012
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: DocumentObjectenApiSyncComponent, isStandalone: true, selector: "valtimo-document-objecten-api-sync", ngImport: i0, template: "<!--\n ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"input-group mt-4 mb-2 align-items-center\">\n <div>\n <h2>{{ 'zaakdetails.title' | translate }}</h2>\n </div>\n</div>\n\n<ng-container\n *ngIf=\"{\n loading: loading$ | async,\n documentObjectenApiSync: documentObjectenApiSync$ | async\n } as obs\"\n>\n <ng-container *ngIf=\"obs.loading === false; else loading\">\n <ng-container *ngIf=\"obs.documentObjectenApiSync; else addSync\">\n <div class=\"card card-border card-contrast\">\n <div class=\"card-header card-header-contrast card-header-featured\">\n <div>\n {{ obs.documentObjectenApiSync.objectManagementConfigurationTitle || '-' }}\n </div>\n <div class=\"controls\">\n <button class=\"btn btn-danger ml-3\" (click)=\"showModal()\">\n <i class=\"icon mdi mdi-pencil\"></i>\n </button>\n <button class=\"btn btn-danger ml-3\" (click)=\"remove()\">\n <i class=\"icon mdi mdi-delete\"></i>\n </button>\n </div>\n </div>\n <div class=\"card-body\">\n <div class=\"row pt-3 mt-1\">\n <div class=\"col-3\">\n <strong>{{ 'zaakdetails.enabled' | translate }}</strong>\n </div>\n <div class=\"col-3\">\n {{\n obs.documentObjectenApiSync?.enabled\n ? ('zaakdetails.yes' | translate)\n : ('zaakdetails.no' | translate)\n }}\n </div>\n </div>\n <div class=\"row pt-3 mt-1\">\n <div class=\"col-3\">\n <strong>{{ 'zaakdetails.objectManagementConfigurationTitle' | translate }}</strong>\n </div>\n <div class=\"col-3\">\n {{ obs.documentObjectenApiSync.objectManagementConfigurationTitle || '-' }}\n </div>\n </div>\n </div>\n </div>\n </ng-container>\n </ng-container>\n <ng-container *ngTemplateOutlet=\"modal; context: {obs: obs}\"></ng-container>\n</ng-container>\n\n<ng-template #addSync>\n <div class=\"text-right mt-5\">\n <button class=\"btn btn-primary\" (click)=\"showModal()\">\n <i class=\"icon mdi mdi-plus mr-1\"></i>{{ 'zaakdetails.submitButton' | translate }}\n </button>\n </div>\n</ng-template>\n\n<ng-template #modal let-obs=\"obs\">\n <cds-modal\n valtimoCdsModal\n [title]=\"'zaakdetails.editModal.title' | translate\"\n [open]=\"modalShowing$ | async\"\n [showFooter]=\"true\"\n >\n <cds-modal-header [showCloseButton]=\"true\" (closeSelect)=\"onModalClose()\">\n <h3 cdsModalHeaderHeading>\n {{ 'zaakdetails.editModal.title' | translate }}\n </h3>\n </cds-modal-header>\n\n <section cdsModalContent>\n <form [formGroup]=\"formGroup\">\n <v-select\n *ngIf=\"objectManagementConfigurationItems$ | async as objectManagementConfigurations\"\n [appendInline]=\"false\"\n [dropUp]=\"false\"\n [items]=\"objectManagementConfigurations\"\n [defaultSelectionId]=\"objectManagementConfigurationId.getRawValue()\"\n [placeholder]=\"\n 'zaakdetails.editModal.objectManagementConfigurationPlaceholder' | translate\n \"\n [title]=\"'zaakdetails.editModal.objectManagementConfiguration' | translate\"\n [disabled]=\"false\"\n [margin]=\"true\"\n [required]=\"true\"\n name=\"objectManagementConfigurationId\"\n [carbonTheme]=\"currentTheme$ | async\"\n (selectedChange)=\"configSelected($event)\"\n ></v-select>\n\n <cds-checkbox formControlName=\"enabled\"\n >{{ 'zaakdetails.editModal.enabled' | translate }}\n </cds-checkbox>\n </form>\n </section>\n\n <cds-modal-footer>\n <ng-container *ngTemplateOutlet=\"buttonsFooterModal; context: {obs: obs}\"></ng-container>\n </cds-modal-footer>\n </cds-modal>\n</ng-template>\n\n<ng-template #buttonsFooterModal let-obs=\"obs\">\n <button cdsButton=\"secondary\" (click)=\"onModalClose()\" [disabled]=\"false\">\n {{ 'interface.cancel' | translate }}\n </button>\n\n <button cdsButton=\"primary\" [disabled]=\"!formGroup.valid\" (click)=\"submit()\">\n {{ 'searchFieldsOverview.submit' | translate }}\n </button>\n</ng-template>\n\n<ng-template #loading>\n <div class=\"mb-8\">\n <valtimo-spinner></valtimo-spinner>\n </div>\n</ng-template>\n\n<ng-template #noConfigAvailable>\n <div class=\"mb-8\">\n <h4>{{ 'zaakdetails.error.configNotFound' | translate }}</h4>\n </div>\n</ng-template>\n", styles: [".card-header,.setting-row{display:flex;flex-direction:row;justify-content:space-between;align-items:center}.controls{display:flex;align-items:center}\n/*!\n * Copyright 2015-2024 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: SpinnerModule }, { kind: "component", type: i3$2.SpinnerComponent, selector: "valtimo-spinner", inputs: ["useBootstrapSpinner", "name", "type", "size", "color", "bdColor", "fullScreen", "noMarginTop"] }, { kind: "ngmodule", type: FormModule }, { kind: "ngmodule", type: InputModule$1 }, { kind: "ngmodule", type: SelectModule }, { kind: "component", type: i3$2.SelectComponent, selector: "v-select", inputs: ["items", "defaultSelection", "defaultSelectionId", "defaultSelectionIds", "disabled", "dropUp", "multiple", "margin", "widthInPx", "notFoundText", "clearAllText", "clearText", "name", "title", "titleTranslationKey", "clearSelectionSubject$", "tooltip", "required", "loading", "loadingText", "placeholder", "smallMargin", "carbonTheme", "appendInline"], outputs: ["selectedChange"] }, { kind: "ngmodule", type: ValtimoCdsModalDirectiveModule }, { kind: "directive", type: i3$2.ValtimoCdsModalDirective, selector: "[valtimoCdsModal]" }, { kind: "ngmodule", type: CheckboxModule }, { kind: "component", type: i2.Checkbox, selector: "cds-checkbox, ibm-checkbox", inputs: ["disabled", "skeleton", "hideLabel", "name", "id", "required", "value", "ariaLabel", "ariaLabelledby", "indeterminate", "checked"], outputs: ["click", "checkedChange", "indeterminateChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i5.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i5.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i2.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "ngmodule", type: ModalModule }, { kind: "component", type: i2.Modal, selector: "cds-modal, ibm-modal", inputs: ["size", "theme", "ariaLabel", "open", "trigger", "hasScrollingContent"], outputs: ["overlaySelected", "close"] }, { kind: "component", type: i2.ModalHeader, selector: "cds-modal-header, ibm-modal-header", inputs: ["theme", "closeLabel", "showCloseButton"], outputs: ["closeSelect"] }, { kind: "component", type: i2.ModalFooter, selector: "cds-modal-footer, ibm-modal-footer" }, { kind: "directive", type: i2.ModalContent, selector: "[cdsModalContent], [ibmModalContent]", inputs: ["hasForm"] }, { kind: "directive", type: i2.ModalHeaderHeading, selector: "[cdsModalHeaderHeading], [ibmModalHeaderHeading]" }] }); }
|
|
3013
|
+
}
|
|
3014
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: DocumentObjectenApiSyncComponent, decorators: [{
|
|
3015
|
+
type: Component,
|
|
3016
|
+
args: [{ selector: 'valtimo-document-objecten-api-sync', standalone: true, imports: [
|
|
3017
|
+
CommonModule,
|
|
3018
|
+
FormsModule,
|
|
3019
|
+
TranslateModule,
|
|
3020
|
+
SpinnerModule,
|
|
3021
|
+
FormModule,
|
|
3022
|
+
InputModule$1,
|
|
3023
|
+
SelectModule,
|
|
3024
|
+
ValtimoCdsModalDirectiveModule,
|
|
3025
|
+
CheckboxModule,
|
|
3026
|
+
ReactiveFormsModule,
|
|
3027
|
+
ButtonModule,
|
|
3028
|
+
ModalModule,
|
|
3029
|
+
], template: "<!--\n ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"input-group mt-4 mb-2 align-items-center\">\n <div>\n <h2>{{ 'zaakdetails.title' | translate }}</h2>\n </div>\n</div>\n\n<ng-container\n *ngIf=\"{\n loading: loading$ | async,\n documentObjectenApiSync: documentObjectenApiSync$ | async\n } as obs\"\n>\n <ng-container *ngIf=\"obs.loading === false; else loading\">\n <ng-container *ngIf=\"obs.documentObjectenApiSync; else addSync\">\n <div class=\"card card-border card-contrast\">\n <div class=\"card-header card-header-contrast card-header-featured\">\n <div>\n {{ obs.documentObjectenApiSync.objectManagementConfigurationTitle || '-' }}\n </div>\n <div class=\"controls\">\n <button class=\"btn btn-danger ml-3\" (click)=\"showModal()\">\n <i class=\"icon mdi mdi-pencil\"></i>\n </button>\n <button class=\"btn btn-danger ml-3\" (click)=\"remove()\">\n <i class=\"icon mdi mdi-delete\"></i>\n </button>\n </div>\n </div>\n <div class=\"card-body\">\n <div class=\"row pt-3 mt-1\">\n <div class=\"col-3\">\n <strong>{{ 'zaakdetails.enabled' | translate }}</strong>\n </div>\n <div class=\"col-3\">\n {{\n obs.documentObjectenApiSync?.enabled\n ? ('zaakdetails.yes' | translate)\n : ('zaakdetails.no' | translate)\n }}\n </div>\n </div>\n <div class=\"row pt-3 mt-1\">\n <div class=\"col-3\">\n <strong>{{ 'zaakdetails.objectManagementConfigurationTitle' | translate }}</strong>\n </div>\n <div class=\"col-3\">\n {{ obs.documentObjectenApiSync.objectManagementConfigurationTitle || '-' }}\n </div>\n </div>\n </div>\n </div>\n </ng-container>\n </ng-container>\n <ng-container *ngTemplateOutlet=\"modal; context: {obs: obs}\"></ng-container>\n</ng-container>\n\n<ng-template #addSync>\n <div class=\"text-right mt-5\">\n <button class=\"btn btn-primary\" (click)=\"showModal()\">\n <i class=\"icon mdi mdi-plus mr-1\"></i>{{ 'zaakdetails.submitButton' | translate }}\n </button>\n </div>\n</ng-template>\n\n<ng-template #modal let-obs=\"obs\">\n <cds-modal\n valtimoCdsModal\n [title]=\"'zaakdetails.editModal.title' | translate\"\n [open]=\"modalShowing$ | async\"\n [showFooter]=\"true\"\n >\n <cds-modal-header [showCloseButton]=\"true\" (closeSelect)=\"onModalClose()\">\n <h3 cdsModalHeaderHeading>\n {{ 'zaakdetails.editModal.title' | translate }}\n </h3>\n </cds-modal-header>\n\n <section cdsModalContent>\n <form [formGroup]=\"formGroup\">\n <v-select\n *ngIf=\"objectManagementConfigurationItems$ | async as objectManagementConfigurations\"\n [appendInline]=\"false\"\n [dropUp]=\"false\"\n [items]=\"objectManagementConfigurations\"\n [defaultSelectionId]=\"objectManagementConfigurationId.getRawValue()\"\n [placeholder]=\"\n 'zaakdetails.editModal.objectManagementConfigurationPlaceholder' | translate\n \"\n [title]=\"'zaakdetails.editModal.objectManagementConfiguration' | translate\"\n [disabled]=\"false\"\n [margin]=\"true\"\n [required]=\"true\"\n name=\"objectManagementConfigurationId\"\n [carbonTheme]=\"currentTheme$ | async\"\n (selectedChange)=\"configSelected($event)\"\n ></v-select>\n\n <cds-checkbox formControlName=\"enabled\"\n >{{ 'zaakdetails.editModal.enabled' | translate }}\n </cds-checkbox>\n </form>\n </section>\n\n <cds-modal-footer>\n <ng-container *ngTemplateOutlet=\"buttonsFooterModal; context: {obs: obs}\"></ng-container>\n </cds-modal-footer>\n </cds-modal>\n</ng-template>\n\n<ng-template #buttonsFooterModal let-obs=\"obs\">\n <button cdsButton=\"secondary\" (click)=\"onModalClose()\" [disabled]=\"false\">\n {{ 'interface.cancel' | translate }}\n </button>\n\n <button cdsButton=\"primary\" [disabled]=\"!formGroup.valid\" (click)=\"submit()\">\n {{ 'searchFieldsOverview.submit' | translate }}\n </button>\n</ng-template>\n\n<ng-template #loading>\n <div class=\"mb-8\">\n <valtimo-spinner></valtimo-spinner>\n </div>\n</ng-template>\n\n<ng-template #noConfigAvailable>\n <div class=\"mb-8\">\n <h4>{{ 'zaakdetails.error.configNotFound' | translate }}</h4>\n </div>\n</ng-template>\n", styles: [".card-header,.setting-row{display:flex;flex-direction:row;justify-content:space-between;align-items:center}.controls{display:flex;align-items:center}\n/*!\n * Copyright 2015-2024 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"] }]
|
|
3030
|
+
}], ctorParameters: () => [{ type: i1$1.ActivatedRoute }, { type: DocumentObjectenApiSyncService }, { type: i3$2.CdsThemeService }] });
|
|
3031
|
+
|
|
3032
|
+
/*
|
|
3033
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
3034
|
+
*
|
|
3035
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
3036
|
+
* you may not use this file except in compliance with the License.
|
|
3037
|
+
* You may obtain a copy of the License at
|
|
3038
|
+
*
|
|
3039
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
3040
|
+
*
|
|
3041
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
3042
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
3043
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3044
|
+
* See the License for the specific language governing permissions and
|
|
3045
|
+
* limitations under the License.
|
|
3046
|
+
*/
|
|
3047
|
+
|
|
3048
|
+
/*
|
|
3049
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
3050
|
+
*
|
|
3051
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
3052
|
+
* you may not use this file except in compliance with the License.
|
|
3053
|
+
* You may obtain a copy of the License at
|
|
3054
|
+
*
|
|
3055
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
3056
|
+
*
|
|
3057
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
3058
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
3059
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3060
|
+
* See the License for the specific language governing permissions and
|
|
3061
|
+
* limitations under the License.
|
|
3062
|
+
*/
|
|
3063
|
+
|
|
3064
|
+
/*
|
|
3065
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
3066
|
+
*
|
|
3067
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
3068
|
+
* you may not use this file except in compliance with the License.
|
|
3069
|
+
* You may obtain a copy of the License at
|
|
3070
|
+
*
|
|
3071
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
3072
|
+
*
|
|
3073
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
3074
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
3075
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3076
|
+
* See the License for the specific language governing permissions and
|
|
3077
|
+
* limitations under the License.
|
|
3078
|
+
*/
|
|
3079
|
+
|
|
3080
|
+
/*
|
|
3081
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
3082
|
+
*
|
|
3083
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
3084
|
+
* you may not use this file except in compliance with the License.
|
|
3085
|
+
* You may obtain a copy of the License at
|
|
3086
|
+
*
|
|
3087
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
3088
|
+
*
|
|
3089
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
3090
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
3091
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3092
|
+
* See the License for the specific language governing permissions and
|
|
3093
|
+
* limitations under the License.
|
|
3094
|
+
*/
|
|
3095
|
+
class ZakenApiZaaktypeLinkService extends BaseApiService {
|
|
3096
|
+
constructor(httpClient, configService) {
|
|
3097
|
+
super(httpClient, configService);
|
|
3098
|
+
this.httpClient = httpClient;
|
|
3099
|
+
this.configService = configService;
|
|
3100
|
+
}
|
|
3101
|
+
getPluginConfigurationsByPluginDefinitionKey(pluginDefinitionKey) {
|
|
3102
|
+
return this.httpClient.get(this.getApiUrl(`/v1/plugin/configuration?pluginDefinitionKey=${pluginDefinitionKey}`));
|
|
3103
|
+
}
|
|
3104
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ZakenApiZaaktypeLinkService, deps: [{ token: i1.HttpClient }, { token: i2$1.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3105
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ZakenApiZaaktypeLinkService, providedIn: 'root' }); }
|
|
3106
|
+
}
|
|
3107
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ZakenApiZaaktypeLinkService, decorators: [{
|
|
3108
|
+
type: Injectable,
|
|
3109
|
+
args: [{
|
|
3110
|
+
providedIn: 'root',
|
|
3111
|
+
}]
|
|
3112
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2$1.ConfigService }] });
|
|
3113
|
+
|
|
3114
|
+
/*
|
|
3115
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
3116
|
+
*
|
|
3117
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
3118
|
+
* you may not use this file except in compliance with the License.
|
|
3119
|
+
* You may obtain a copy of the License at
|
|
3120
|
+
*
|
|
3121
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
3122
|
+
*
|
|
3123
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
3124
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
3125
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3126
|
+
* See the License for the specific language governing permissions and
|
|
3127
|
+
* limitations under the License.
|
|
3128
|
+
*/
|
|
3129
|
+
|
|
3130
|
+
/*
|
|
3131
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
3132
|
+
*
|
|
3133
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
3134
|
+
* you may not use this file except in compliance with the License.
|
|
3135
|
+
* You may obtain a copy of the License at
|
|
3136
|
+
*
|
|
3137
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
3138
|
+
*
|
|
3139
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
3140
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
3141
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3142
|
+
* See the License for the specific language governing permissions and
|
|
3143
|
+
* limitations under the License.
|
|
3144
|
+
*/
|
|
3145
|
+
class ZakenApiZaaktypeLinkComponent {
|
|
3146
|
+
constructor(route, openZaakService, alertService, toasterService, translateService, zakenApiZaaktypeLinkService, configService) {
|
|
3147
|
+
this.route = route;
|
|
3148
|
+
this.openZaakService = openZaakService;
|
|
3149
|
+
this.alertService = alertService;
|
|
3150
|
+
this.toasterService = toasterService;
|
|
3151
|
+
this.translateService = translateService;
|
|
3152
|
+
this.zakenApiZaaktypeLinkService = zakenApiZaaktypeLinkService;
|
|
3153
|
+
this.configService = configService;
|
|
3154
|
+
this.selectedZaakType = null;
|
|
3155
|
+
this.selectedPluginConfiguration = null;
|
|
3156
|
+
this.selectedInformatieObjectTypeUrl = null;
|
|
3157
|
+
this.loading$ = new BehaviorSubject(true);
|
|
3158
|
+
this.zaakTypeLink$ = new BehaviorSubject(null);
|
|
3159
|
+
this.documentDefinitionName$ = this.route.params.pipe(map(params => params.name || ''));
|
|
3160
|
+
this.documentDefinitionName = this.route.snapshot.paramMap.get('name');
|
|
3161
|
+
this.informatieObjectTypeSelectionEnabled =
|
|
3162
|
+
this.configService.config.uploadProvider === UploadProvider.OPEN_ZAAK;
|
|
3163
|
+
}
|
|
3164
|
+
ngOnInit() {
|
|
3165
|
+
this.zaakTypeLinkRequest = {
|
|
3166
|
+
documentDefinitionName: this.documentDefinitionName,
|
|
3167
|
+
createWithDossier: false,
|
|
3168
|
+
};
|
|
3169
|
+
this.openZaakService.getZaakTypeLink(this.documentDefinitionName).subscribe(zaakTypeLink => {
|
|
3170
|
+
if (zaakTypeLink !== null) {
|
|
3171
|
+
this.zaakTypeLinkRequest = {
|
|
3172
|
+
documentDefinitionName: this.documentDefinitionName,
|
|
3173
|
+
createWithDossier: zaakTypeLink?.createWithDossier,
|
|
3174
|
+
rsin: zaakTypeLink?.rsin,
|
|
3175
|
+
zakenApiPluginConfigurationId: zaakTypeLink?.zakenApiPluginConfigurationId,
|
|
3176
|
+
zaakTypeUrl: zaakTypeLink?.zaakTypeUrl,
|
|
3177
|
+
};
|
|
3178
|
+
}
|
|
3179
|
+
this.zaakTypeLink$.next(zaakTypeLink);
|
|
3180
|
+
this.loadZaakTypes();
|
|
3181
|
+
this.loadZakenApiPluginConfigurations();
|
|
3182
|
+
});
|
|
3183
|
+
this.loading$.next(false);
|
|
3184
|
+
}
|
|
3185
|
+
findZaakType(zaakTypeUrl) {
|
|
3186
|
+
this.selectedZaakType = this.zaakTypes.find(zaakType => zaakType.url === zaakTypeUrl);
|
|
3187
|
+
}
|
|
3188
|
+
findPluginConfiguration(pluginConfigurationId) {
|
|
3189
|
+
this.selectedPluginConfiguration = this.pluginConfigurations.find(pluginConfiguration => pluginConfiguration.id === pluginConfigurationId);
|
|
3190
|
+
}
|
|
3191
|
+
loadZaakTypes() {
|
|
3192
|
+
return this.openZaakService.getZaakTypes().subscribe((zaakTypes) => {
|
|
3193
|
+
this.zaakTypes = zaakTypes;
|
|
3194
|
+
this.findZaakType(this.zaakTypeLink$.getValue()?.zaakTypeUrl);
|
|
3195
|
+
this.loading$.next(false);
|
|
3196
|
+
});
|
|
3197
|
+
}
|
|
3198
|
+
loadZakenApiPluginConfigurations() {
|
|
3199
|
+
return this.zakenApiZaaktypeLinkService
|
|
3200
|
+
.getPluginConfigurationsByPluginDefinitionKey('zakenapi')
|
|
3201
|
+
.subscribe((plugins) => {
|
|
3202
|
+
this.pluginConfigurations = plugins;
|
|
3203
|
+
this.findPluginConfiguration(this.zaakTypeLink$.getValue()?.zakenApiPluginConfigurationId);
|
|
3204
|
+
});
|
|
3205
|
+
}
|
|
3206
|
+
loadInformatieObjectTypeUrls() {
|
|
3207
|
+
this.openZaakService
|
|
3208
|
+
.getInformatieObjectTypes()
|
|
3209
|
+
.subscribe((informatieObjectTypes) => {
|
|
3210
|
+
this.informatieObjectTypes = informatieObjectTypes;
|
|
3211
|
+
});
|
|
3212
|
+
}
|
|
3213
|
+
openModal(zaakTypeLink) {
|
|
3214
|
+
this.zaakTypeLinkRequest = {
|
|
3215
|
+
documentDefinitionName: this.documentDefinitionName,
|
|
3216
|
+
createWithDossier: zaakTypeLink?.createWithDossier,
|
|
3217
|
+
rsin: zaakTypeLink?.rsin,
|
|
3218
|
+
zakenApiPluginConfigurationId: zaakTypeLink?.zakenApiPluginConfigurationId,
|
|
3219
|
+
zaakTypeUrl: zaakTypeLink?.zaakTypeUrl,
|
|
3220
|
+
};
|
|
3221
|
+
if (this.informatieObjectTypeSelectionEnabled) {
|
|
3222
|
+
this.openZaakService.getOpenZaakConfig().subscribe(config => {
|
|
3223
|
+
if (config === null) {
|
|
3224
|
+
this.alertService.error(this.translateService.instant('openZaak.error.configNotFound'));
|
|
3225
|
+
}
|
|
3226
|
+
else {
|
|
3227
|
+
this.loadInformatieObjectTypeUrls();
|
|
3228
|
+
this.openZaakService
|
|
3229
|
+
.getInformatieObjectTypeLink(this.documentDefinitionName)
|
|
3230
|
+
.subscribe(informatieObjectTypeLink => {
|
|
3231
|
+
if (informatieObjectTypeLink !== null) {
|
|
3232
|
+
this.selectedInformatieObjectTypeUrl =
|
|
3233
|
+
informatieObjectTypeLink.informatieObjectType;
|
|
3234
|
+
}
|
|
3235
|
+
});
|
|
3236
|
+
}
|
|
3237
|
+
this.modal.show();
|
|
3238
|
+
});
|
|
3239
|
+
}
|
|
3240
|
+
else {
|
|
3241
|
+
this.modal.show();
|
|
3242
|
+
}
|
|
3243
|
+
}
|
|
3244
|
+
removeZaakTypeLink() {
|
|
3245
|
+
this.openZaakService.deleteZaakTypeLink(this.documentDefinitionName).subscribe(() => {
|
|
3246
|
+
if (this.selectedInformatieObjectTypeUrl !== null) {
|
|
3247
|
+
this.openZaakService.deleteInformatieObjectTypeLink(this.documentDefinitionName);
|
|
3248
|
+
}
|
|
3249
|
+
this.toasterService.success('Successfully de-linked zaaktype');
|
|
3250
|
+
this.zaakTypeLink$.next(null);
|
|
3251
|
+
}, () => {
|
|
3252
|
+
this.toasterService.error('Failed to de-link zaaktype');
|
|
3253
|
+
});
|
|
3254
|
+
}
|
|
3255
|
+
submit() {
|
|
3256
|
+
const requestInformatieObjectTypeLink = {
|
|
3257
|
+
documentDefinitionName: this.documentDefinitionName,
|
|
3258
|
+
zaakType: this.zaakTypeLinkRequest.zaakTypeUrl,
|
|
3259
|
+
informatieObjectType: this.selectedInformatieObjectTypeUrl,
|
|
3260
|
+
};
|
|
3261
|
+
this.openZaakService.createZaakTypeLink(this.zaakTypeLinkRequest).subscribe(linkResult => {
|
|
3262
|
+
this.zaakTypeLink$.next(linkResult);
|
|
3263
|
+
this.zaakTypeLinkRequest = {
|
|
3264
|
+
documentDefinitionName: this.documentDefinitionName,
|
|
3265
|
+
createWithDossier: linkResult?.createWithDossier,
|
|
3266
|
+
rsin: linkResult?.rsin,
|
|
3267
|
+
zakenApiPluginConfigurationId: linkResult?.zakenApiPluginConfigurationId,
|
|
3268
|
+
zaakTypeUrl: linkResult?.zaakTypeUrl,
|
|
3269
|
+
};
|
|
3270
|
+
this.findZaakType(linkResult.zaakTypeUrl);
|
|
3271
|
+
this.findPluginConfiguration(linkResult.zakenApiPluginConfigurationId);
|
|
3272
|
+
if (requestInformatieObjectTypeLink.informatieObjectType !== null) {
|
|
3273
|
+
this.openZaakService
|
|
3274
|
+
.createInformatieObjectTypeLink(requestInformatieObjectTypeLink)
|
|
3275
|
+
.subscribe(() => {
|
|
3276
|
+
this.toasterService.success('Successfully linked object informatie type to dossier');
|
|
3277
|
+
});
|
|
3278
|
+
}
|
|
3279
|
+
this.toasterService.success('Successfully linked zaaktype to dossier');
|
|
3280
|
+
}, err => {
|
|
3281
|
+
this.toasterService.error('Failed to link zaaktype to dossier');
|
|
3282
|
+
});
|
|
3283
|
+
}
|
|
3284
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ZakenApiZaaktypeLinkComponent, deps: [{ token: i1$1.ActivatedRoute }, { token: i2$2.OpenZaakService }, { token: i3$2.AlertService }, { token: i4$1.ToastrService }, { token: i3$1.TranslateService }, { token: ZakenApiZaaktypeLinkService }, { token: i2$1.ConfigService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3285
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: ZakenApiZaaktypeLinkComponent, isStandalone: true, selector: "valtimo-zaken-api-zaaktype-link", viewQueries: [{ propertyName: "modal", first: true, predicate: ["openZaakTypeLinkModal"], descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"input-group mt-4 mb-2 align-items-center\">\n <div>\n <h2>{{ 'openZaak.links' | translate }}</h2>\n </div>\n</div>\n\n<ng-container\n *ngIf=\"{\n loading: loading$ | async,\n zaakTypeLink: zaakTypeLink$ | async\n } as obs\"\n>\n <ng-container *ngIf=\"obs.loading === false; else loading\">\n <ng-container *ngIf=\"obs.zaakTypeLink; else addSync\">\n <div class=\"card card-border card-contrast\">\n <div class=\"card-header card-header-contrast card-header-featured\">\n <div>\n {{ this.selectedZaakType?.omschrijving || '-' }}\n </div>\n <div class=\"controls\">\n <button class=\"btn btn-danger ml-3\" (click)=\"openModal(obs.zaakTypeLink)\">\n <i class=\"icon mdi mdi-pencil\"></i>\n </button>\n <button class=\"btn btn-danger ml-3\" (click)=\"removeZaakTypeLink()\">\n <i class=\"icon mdi mdi-delete\"></i>\n </button>\n </div>\n </div>\n <div class=\"card-body\">\n <div class=\"row pt-3 mt-1\">\n <div class=\"col-3\">\n <strong>{{ 'openZaak.autoCreateForCase' | translate }}</strong>\n </div>\n <div class=\"col-3\">\n {{\n obs.zaakTypeLink?.createWithDossier\n ? ('viewTypeConverter.Yes' | translate)\n : ('viewTypeConverter.No' | translate)\n }}\n </div>\n </div>\n <div class=\"row pt-3 mt-1\">\n <div class=\"col-3\">\n <strong>{{ 'openZaak.zakenApiPlugin' | translate }}</strong>\n </div>\n <div class=\"col-3\">\n {{ this.selectedPluginConfiguration?.title || '-' }}\n </div>\n </div>\n <div class=\"row pt-3 mt-1\">\n <div class=\"col-3\">\n <strong>{{ 'openZaak.rsin' | translate }}</strong>\n </div>\n <div class=\"col-3\">\n {{ obs.zaakTypeLink?.rsin || '-' }}\n </div>\n </div>\n </div>\n </div>\n </ng-container>\n </ng-container>\n</ng-container>\n\n<ng-template #addSync>\n <div class=\"text-right mt-5\">\n <button class=\"btn btn-primary\" (click)=\"openModal(null)\">\n <i class=\"icon mdi mdi-plus mr-1\"></i>{{ 'openZaak.linkZaakType' | translate }}\n </button>\n </div>\n</ng-template>\n\n<valtimo-modal\n #openZaakTypeLinkModal\n elementId=\"openZaakTypeLinkModal\"\n [title]=\"'Zaak types'\"\n subtitle=\"Connect Zaak type to Dossier\"\n showFooter=\"true\"\n>\n <div body>\n <p>{{ 'openZaak.selectZaakTypeForCase' | translate }}</p>\n <div class=\"input-group mb-3 mr-3 align-items-center\">\n <select class=\"form-control\" [(ngModel)]=\"this.zaakTypeLinkRequest.zaakTypeUrl\">\n <option [ngValue]=\"null\">{{ 'openZaak.selectZaakType' | translate }}</option>\n <option *ngFor=\"let zaakType of zaakTypes\" [ngValue]=\"zaakType.url\">\n {{ zaakType?.omschrijving || '-' }}\n </option>\n </select>\n </div>\n\n <p>{{ 'openZaak.selectZakenApiPluginForCase' | translate }}</p>\n <div class=\"input-group mb-3 mr-3 align-items-center\">\n <select\n class=\"form-control\"\n [(ngModel)]=\"this.zaakTypeLinkRequest.zakenApiPluginConfigurationId\"\n >\n <option [ngValue]=\"null\">{{ 'openZaak.selectZakenApiPlugin' | translate }}</option>\n <option\n *ngFor=\"let pluginConfiguration of pluginConfigurations\"\n [ngValue]=\"pluginConfiguration.id\"\n >\n {{ pluginConfiguration?.title || '-' }}\n </option>\n </select>\n </div>\n\n <p>{{ 'openZaak.rsin' | translate }}</p>\n <div class=\"input-group mb-3 mr-3 align-items-center\">\n <input\n type=\"text\"\n id=\"name\"\n class=\"form-control\"\n placeholder=\"RSIN\"\n [(ngModel)]=\"this.zaakTypeLinkRequest.rsin\"\n />\n </div>\n\n <div class=\"setting-row\">\n <p>{{ 'openZaak.autoCreateForCase' | translate }}</p>\n <div class=\"controls\">\n <div class=\"switch-button switch-button-success\">\n <input\n type=\"checkbox\"\n [checked]=\"this.zaakTypeLinkRequest.createWithDossier\"\n name=\"createWithDossier\"\n id=\"createWithDossier\"\n (change)=\"\n this.zaakTypeLinkRequest.createWithDossier =\n !this.zaakTypeLinkRequest.createWithDossier\n \"\n />\n <span><label for=\"createWithDossier\"></label></span>\n </div>\n </div>\n </div>\n\n <div\n *ngIf=\"informatieObjectTypeSelectionEnabled && selectedZaakType\"\n class=\"input-group mb-3 align-items-center\"\n >\n <select class=\"form-control\" [(ngModel)]=\"selectedInformatieObjectTypeUrl\">\n <option [ngValue]=\"null\" selected>{{ 'openZaak.selectInfoObjectType' | translate }}</option>\n <option\n *ngFor=\"let informatieObjectType of informatieObjectTypes\"\n [ngValue]=\"informatieObjectType.url\"\n >\n {{ informatieObjectType?.omschrijving || '-' }}\n </option>\n </select>\n </div>\n </div>\n <div footer>\n <button\n (click)=\"submit()\"\n class=\"btn btn-primary\"\n data-dismiss=\"modal\"\n [disabled]=\"!this.zaakTypeLinkRequest.zaakTypeUrl\"\n >\n <i class=\"icon mdi mdi-save\"></i>\n {{ 'openZaak.save' | translate }}\n </button>\n </div>\n</valtimo-modal>\n\n<ng-template #loading>\n <div class=\"mb-8\">\n <valtimo-spinner></valtimo-spinner>\n </div>\n</ng-template>\n\n<ng-template #noConfigAvailable>\n <div class=\"mb-8\">\n <h4>{{ 'openZaak.error.configNotFound' | translate }}</h4>\n </div>\n</ng-template>\n", styles: [".card-header,.setting-row{display:flex;flex-direction:row;justify-content:space-between;align-items:center}.controls{display:flex;align-items:center}.full-width-notification{max-inline-size:100%;min-inline-size:100%}\n/*!\n * Copyright 2015-2024 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i5.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i5.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ModalModule$1 }, { kind: "component", type: i3$2.ModalComponent, selector: "valtimo-modal", inputs: ["elementId", "title", "subtitle", "templateBelowSubtitle", "showFooter"] }, { kind: "ngmodule", type: NotificationModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }] }); }
|
|
3286
|
+
}
|
|
3287
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ZakenApiZaaktypeLinkComponent, decorators: [{
|
|
3288
|
+
type: Component,
|
|
3289
|
+
args: [{ selector: 'valtimo-zaken-api-zaaktype-link', standalone: true, imports: [CommonModule, FormsModule, ModalModule$1, NotificationModule, TranslateModule], template: "<!--\n ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"input-group mt-4 mb-2 align-items-center\">\n <div>\n <h2>{{ 'openZaak.links' | translate }}</h2>\n </div>\n</div>\n\n<ng-container\n *ngIf=\"{\n loading: loading$ | async,\n zaakTypeLink: zaakTypeLink$ | async\n } as obs\"\n>\n <ng-container *ngIf=\"obs.loading === false; else loading\">\n <ng-container *ngIf=\"obs.zaakTypeLink; else addSync\">\n <div class=\"card card-border card-contrast\">\n <div class=\"card-header card-header-contrast card-header-featured\">\n <div>\n {{ this.selectedZaakType?.omschrijving || '-' }}\n </div>\n <div class=\"controls\">\n <button class=\"btn btn-danger ml-3\" (click)=\"openModal(obs.zaakTypeLink)\">\n <i class=\"icon mdi mdi-pencil\"></i>\n </button>\n <button class=\"btn btn-danger ml-3\" (click)=\"removeZaakTypeLink()\">\n <i class=\"icon mdi mdi-delete\"></i>\n </button>\n </div>\n </div>\n <div class=\"card-body\">\n <div class=\"row pt-3 mt-1\">\n <div class=\"col-3\">\n <strong>{{ 'openZaak.autoCreateForCase' | translate }}</strong>\n </div>\n <div class=\"col-3\">\n {{\n obs.zaakTypeLink?.createWithDossier\n ? ('viewTypeConverter.Yes' | translate)\n : ('viewTypeConverter.No' | translate)\n }}\n </div>\n </div>\n <div class=\"row pt-3 mt-1\">\n <div class=\"col-3\">\n <strong>{{ 'openZaak.zakenApiPlugin' | translate }}</strong>\n </div>\n <div class=\"col-3\">\n {{ this.selectedPluginConfiguration?.title || '-' }}\n </div>\n </div>\n <div class=\"row pt-3 mt-1\">\n <div class=\"col-3\">\n <strong>{{ 'openZaak.rsin' | translate }}</strong>\n </div>\n <div class=\"col-3\">\n {{ obs.zaakTypeLink?.rsin || '-' }}\n </div>\n </div>\n </div>\n </div>\n </ng-container>\n </ng-container>\n</ng-container>\n\n<ng-template #addSync>\n <div class=\"text-right mt-5\">\n <button class=\"btn btn-primary\" (click)=\"openModal(null)\">\n <i class=\"icon mdi mdi-plus mr-1\"></i>{{ 'openZaak.linkZaakType' | translate }}\n </button>\n </div>\n</ng-template>\n\n<valtimo-modal\n #openZaakTypeLinkModal\n elementId=\"openZaakTypeLinkModal\"\n [title]=\"'Zaak types'\"\n subtitle=\"Connect Zaak type to Dossier\"\n showFooter=\"true\"\n>\n <div body>\n <p>{{ 'openZaak.selectZaakTypeForCase' | translate }}</p>\n <div class=\"input-group mb-3 mr-3 align-items-center\">\n <select class=\"form-control\" [(ngModel)]=\"this.zaakTypeLinkRequest.zaakTypeUrl\">\n <option [ngValue]=\"null\">{{ 'openZaak.selectZaakType' | translate }}</option>\n <option *ngFor=\"let zaakType of zaakTypes\" [ngValue]=\"zaakType.url\">\n {{ zaakType?.omschrijving || '-' }}\n </option>\n </select>\n </div>\n\n <p>{{ 'openZaak.selectZakenApiPluginForCase' | translate }}</p>\n <div class=\"input-group mb-3 mr-3 align-items-center\">\n <select\n class=\"form-control\"\n [(ngModel)]=\"this.zaakTypeLinkRequest.zakenApiPluginConfigurationId\"\n >\n <option [ngValue]=\"null\">{{ 'openZaak.selectZakenApiPlugin' | translate }}</option>\n <option\n *ngFor=\"let pluginConfiguration of pluginConfigurations\"\n [ngValue]=\"pluginConfiguration.id\"\n >\n {{ pluginConfiguration?.title || '-' }}\n </option>\n </select>\n </div>\n\n <p>{{ 'openZaak.rsin' | translate }}</p>\n <div class=\"input-group mb-3 mr-3 align-items-center\">\n <input\n type=\"text\"\n id=\"name\"\n class=\"form-control\"\n placeholder=\"RSIN\"\n [(ngModel)]=\"this.zaakTypeLinkRequest.rsin\"\n />\n </div>\n\n <div class=\"setting-row\">\n <p>{{ 'openZaak.autoCreateForCase' | translate }}</p>\n <div class=\"controls\">\n <div class=\"switch-button switch-button-success\">\n <input\n type=\"checkbox\"\n [checked]=\"this.zaakTypeLinkRequest.createWithDossier\"\n name=\"createWithDossier\"\n id=\"createWithDossier\"\n (change)=\"\n this.zaakTypeLinkRequest.createWithDossier =\n !this.zaakTypeLinkRequest.createWithDossier\n \"\n />\n <span><label for=\"createWithDossier\"></label></span>\n </div>\n </div>\n </div>\n\n <div\n *ngIf=\"informatieObjectTypeSelectionEnabled && selectedZaakType\"\n class=\"input-group mb-3 align-items-center\"\n >\n <select class=\"form-control\" [(ngModel)]=\"selectedInformatieObjectTypeUrl\">\n <option [ngValue]=\"null\" selected>{{ 'openZaak.selectInfoObjectType' | translate }}</option>\n <option\n *ngFor=\"let informatieObjectType of informatieObjectTypes\"\n [ngValue]=\"informatieObjectType.url\"\n >\n {{ informatieObjectType?.omschrijving || '-' }}\n </option>\n </select>\n </div>\n </div>\n <div footer>\n <button\n (click)=\"submit()\"\n class=\"btn btn-primary\"\n data-dismiss=\"modal\"\n [disabled]=\"!this.zaakTypeLinkRequest.zaakTypeUrl\"\n >\n <i class=\"icon mdi mdi-save\"></i>\n {{ 'openZaak.save' | translate }}\n </button>\n </div>\n</valtimo-modal>\n\n<ng-template #loading>\n <div class=\"mb-8\">\n <valtimo-spinner></valtimo-spinner>\n </div>\n</ng-template>\n\n<ng-template #noConfigAvailable>\n <div class=\"mb-8\">\n <h4>{{ 'openZaak.error.configNotFound' | translate }}</h4>\n </div>\n</ng-template>\n", styles: [".card-header,.setting-row{display:flex;flex-direction:row;justify-content:space-between;align-items:center}.controls{display:flex;align-items:center}.full-width-notification{max-inline-size:100%;min-inline-size:100%}\n/*!\n * Copyright 2015-2024 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"] }]
|
|
3290
|
+
}], ctorParameters: () => [{ type: i1$1.ActivatedRoute }, { type: i2$2.OpenZaakService }, { type: i3$2.AlertService }, { type: i4$1.ToastrService }, { type: i3$1.TranslateService }, { type: ZakenApiZaaktypeLinkService }, { type: i2$1.ConfigService }], propDecorators: { modal: [{
|
|
3291
|
+
type: ViewChild,
|
|
3292
|
+
args: ['openZaakTypeLinkModal']
|
|
3293
|
+
}] } });
|
|
3294
|
+
|
|
3295
|
+
/*
|
|
3296
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
3297
|
+
*
|
|
3298
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
3299
|
+
* you may not use this file except in compliance with the License.
|
|
3300
|
+
* You may obtain a copy of the License at
|
|
3301
|
+
*
|
|
3302
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
3303
|
+
*
|
|
3304
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
3305
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
3306
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3307
|
+
* See the License for the specific language governing permissions and
|
|
3308
|
+
* limitations under the License.
|
|
3309
|
+
*/
|
|
3310
|
+
|
|
3311
|
+
/*
|
|
3312
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
3313
|
+
*
|
|
3314
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
3315
|
+
* you may not use this file except in compliance with the License.
|
|
3316
|
+
* You may obtain a copy of the License at
|
|
3317
|
+
*
|
|
3318
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
3319
|
+
*
|
|
3320
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
3321
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
3322
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3323
|
+
* See the License for the specific language governing permissions and
|
|
3324
|
+
* limitations under the License.
|
|
3325
|
+
*/
|
|
3326
|
+
|
|
3327
|
+
/*
|
|
3328
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
3329
|
+
*
|
|
3330
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
3331
|
+
* you may not use this file except in compliance with the License.
|
|
3332
|
+
* You may obtain a copy of the License at
|
|
3333
|
+
*
|
|
3334
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
3335
|
+
*
|
|
3336
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
3337
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
3338
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3339
|
+
* See the License for the specific language governing permissions and
|
|
3340
|
+
* limitations under the License.
|
|
3341
|
+
*/
|
|
3342
|
+
|
|
3343
|
+
/*
|
|
3344
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
3345
|
+
*
|
|
3346
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
3347
|
+
* you may not use this file except in compliance with the License.
|
|
3348
|
+
* You may obtain a copy of the License at
|
|
3349
|
+
*
|
|
3350
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
3351
|
+
*
|
|
3352
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
3353
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
3354
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3355
|
+
* See the License for the specific language governing permissions and
|
|
3356
|
+
* limitations under the License.
|
|
3357
|
+
*/
|
|
3358
|
+
|
|
3359
|
+
/*
|
|
3360
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
3361
|
+
*
|
|
3362
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
3363
|
+
* you may not use this file except in compliance with the License.
|
|
3364
|
+
* You may obtain a copy of the License at
|
|
3365
|
+
*
|
|
3366
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
3367
|
+
*
|
|
3368
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
3369
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
3370
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3371
|
+
* See the License for the specific language governing permissions and
|
|
3372
|
+
* limitations under the License.
|
|
3373
|
+
*/
|
|
3374
|
+
class DossierManagementZgwService {
|
|
3375
|
+
constructor() {
|
|
3376
|
+
this._currentTab$ = new BehaviorSubject(ZgwTabEnum.DOCUMENTEN_API_COLUMNS);
|
|
3377
|
+
}
|
|
3378
|
+
get currentTab$() {
|
|
3379
|
+
return this._currentTab$.asObservable();
|
|
3380
|
+
}
|
|
3381
|
+
set currentTab(tab) {
|
|
3382
|
+
this._currentTab$.next(tab);
|
|
3383
|
+
}
|
|
3384
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: DossierManagementZgwService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3385
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: DossierManagementZgwService, providedIn: 'root' }); }
|
|
3386
|
+
}
|
|
3387
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: DossierManagementZgwService, decorators: [{
|
|
3388
|
+
type: Injectable,
|
|
3389
|
+
args: [{
|
|
3390
|
+
providedIn: 'root',
|
|
3391
|
+
}]
|
|
3392
|
+
}] });
|
|
3393
|
+
|
|
3394
|
+
/*
|
|
3395
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
3396
|
+
*
|
|
3397
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
3398
|
+
* you may not use this file except in compliance with the License.
|
|
3399
|
+
* You may obtain a copy of the License at
|
|
3400
|
+
*
|
|
3401
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
3402
|
+
*
|
|
3403
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
3404
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
3405
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3406
|
+
* See the License for the specific language governing permissions and
|
|
3407
|
+
* limitations under the License.
|
|
3408
|
+
*/
|
|
3409
|
+
|
|
3410
|
+
/*
|
|
3411
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
3412
|
+
*
|
|
3413
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
3414
|
+
* you may not use this file except in compliance with the License.
|
|
3415
|
+
* You may obtain a copy of the License at
|
|
3416
|
+
*
|
|
3417
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
3418
|
+
*
|
|
3419
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
3420
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
3421
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3422
|
+
* See the License for the specific language governing permissions and
|
|
3423
|
+
* limitations under the License.
|
|
3424
|
+
*/
|
|
3425
|
+
class DossierManagementZgwComponent {
|
|
3426
|
+
constructor(dossierManagementZgwService) {
|
|
3427
|
+
this.dossierManagementZgwService = dossierManagementZgwService;
|
|
3428
|
+
this.ZgwTabEnum = ZgwTabEnum;
|
|
3429
|
+
this.currentTab$ = this.dossierManagementZgwService.currentTab$;
|
|
3430
|
+
}
|
|
3431
|
+
displayTab(tab) {
|
|
3432
|
+
this.dossierManagementZgwService.currentTab = tab;
|
|
3433
|
+
}
|
|
3434
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: DossierManagementZgwComponent, deps: [{ token: DossierManagementZgwService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3435
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: DossierManagementZgwComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "<!--\n ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container *ngIf=\"currentTab$ | async as currentTab\">\n <ng-container\n *ngIf=\"{\n documentenApiColumnsActive: currentTab === ZgwTabEnum.DOCUMENTEN_API_COLUMNS\n } as vars\"\n >\n <cds-tabs class=\"dossier-management-tabs\">\n <cds-tab\n class=\"no-padding-left-right no-padding-top-bottom\"\n [active]=\"vars.documentenApiColumnsActive\"\n [heading]=\"'dossierManagement.tabs.zgw' | translate\"\n (selected)=\"displayTab(ZgwTabEnum.DOCUMENTEN_API_COLUMNS)\"\n ></cds-tab\n ></cds-tabs>\n\n <div class=\"dossier-management-zgw__content\">\n <valtimo-documenten-api-columns\n *ngIf=\"vars.documentenApiColumnsActive\"\n ></valtimo-documenten-api-columns>\n </div>\n </ng-container>\n</ng-container>\n", styles: ["/*!\n * Copyright 2015-2024 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: TabsModule }, { kind: "component", type: i2.Tabs, selector: "cds-tabs, ibm-tabs", inputs: ["position", "cacheActive", "followFocus", "isNavigation", "ariaLabel", "ariaLabelledby", "type", "theme", "skeleton"] }, { kind: "component", type: i2.Tab, selector: "cds-tab, ibm-tab", inputs: ["heading", "title", "context", "active", "disabled", "tabIndex", "id", "cacheActive"], outputs: ["selected"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }, { kind: "component", type: DocumentenApiColumnsComponent, selector: "valtimo-documenten-api-columns" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3436
|
+
}
|
|
3437
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: DossierManagementZgwComponent, decorators: [{
|
|
3438
|
+
type: Component,
|
|
3439
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule, TabsModule, TranslateModule, DocumentenApiColumnsComponent], template: "<!--\n ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container *ngIf=\"currentTab$ | async as currentTab\">\n <ng-container\n *ngIf=\"{\n documentenApiColumnsActive: currentTab === ZgwTabEnum.DOCUMENTEN_API_COLUMNS\n } as vars\"\n >\n <cds-tabs class=\"dossier-management-tabs\">\n <cds-tab\n class=\"no-padding-left-right no-padding-top-bottom\"\n [active]=\"vars.documentenApiColumnsActive\"\n [heading]=\"'dossierManagement.tabs.zgw' | translate\"\n (selected)=\"displayTab(ZgwTabEnum.DOCUMENTEN_API_COLUMNS)\"\n ></cds-tab\n ></cds-tabs>\n\n <div class=\"dossier-management-zgw__content\">\n <valtimo-documenten-api-columns\n *ngIf=\"vars.documentenApiColumnsActive\"\n ></valtimo-documenten-api-columns>\n </div>\n </ng-container>\n</ng-container>\n", styles: ["/*!\n * Copyright 2015-2024 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"] }]
|
|
3440
|
+
}], ctorParameters: () => [{ type: DossierManagementZgwService }] });
|
|
3441
|
+
|
|
3442
|
+
/*
|
|
3443
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
3444
|
+
*
|
|
3445
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
3446
|
+
* you may not use this file except in compliance with the License.
|
|
3447
|
+
* You may obtain a copy of the License at
|
|
3448
|
+
*
|
|
3449
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
3450
|
+
*
|
|
3451
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
3452
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
3453
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3454
|
+
* See the License for the specific language governing permissions and
|
|
3455
|
+
* limitations under the License.
|
|
3456
|
+
*/
|
|
3457
|
+
|
|
3458
|
+
/*
|
|
3459
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
3460
|
+
*
|
|
3461
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
3462
|
+
* you may not use this file except in compliance with the License.
|
|
3463
|
+
* You may obtain a copy of the License at
|
|
3464
|
+
*
|
|
3465
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
3466
|
+
*
|
|
3467
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
3468
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
3469
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3470
|
+
* See the License for the specific language governing permissions and
|
|
3471
|
+
* limitations under the License.
|
|
3472
|
+
*/
|
|
3473
|
+
class ZgwModule {
|
|
3474
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ZgwModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
3475
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.3", ngImport: i0, type: ZgwModule, declarations: [DocumentenApiUploaderComponent], imports: [CommonModule,
|
|
3476
|
+
FormioModule,
|
|
3477
|
+
DropzoneModule,
|
|
3478
|
+
TranslateModule,
|
|
3479
|
+
DocumentModule,
|
|
3480
|
+
FileSizeModule,
|
|
3481
|
+
ResourceModule,
|
|
3482
|
+
RouterModule,
|
|
3483
|
+
DocumentenApiMetadataModalComponent,
|
|
3484
|
+
CustomerModule], exports: [DocumentenApiUploaderComponent] }); }
|
|
3485
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ZgwModule, providers: [
|
|
3486
|
+
{
|
|
3487
|
+
provide: ZGW_OBJECT_TYPE_COMPONENT_TOKEN,
|
|
3488
|
+
useValue: DossierDetailTabObjectTypeComponent,
|
|
3489
|
+
},
|
|
3490
|
+
{
|
|
3491
|
+
provide: ZGW_DOCUMENTEN_API_DOCUMENTS_COMPONENT_TOKEN,
|
|
3492
|
+
useValue: DossierDetailTabDocumentenApiDocumentsComponent,
|
|
3493
|
+
},
|
|
3494
|
+
{
|
|
3495
|
+
provide: ZGW_CASE_CONFIGURATION_EXTENSIONS_TOKEN,
|
|
3496
|
+
useValue: [
|
|
3497
|
+
DossierManagementLinkProcessComponent,
|
|
3498
|
+
DocumentenApiVersionComponent,
|
|
3499
|
+
DocumentObjectenApiSyncComponent,
|
|
3500
|
+
ZakenApiZaaktypeLinkComponent,
|
|
3501
|
+
],
|
|
3502
|
+
},
|
|
3503
|
+
], imports: [CommonModule,
|
|
3504
|
+
FormioModule,
|
|
3505
|
+
DropzoneModule,
|
|
3506
|
+
TranslateModule,
|
|
3507
|
+
DocumentModule,
|
|
3508
|
+
FileSizeModule,
|
|
3509
|
+
ResourceModule,
|
|
3510
|
+
RouterModule,
|
|
3511
|
+
DocumentenApiMetadataModalComponent,
|
|
3512
|
+
CustomerModule] }); }
|
|
3513
|
+
}
|
|
3514
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ZgwModule, decorators: [{
|
|
3515
|
+
type: NgModule,
|
|
3516
|
+
args: [{
|
|
3517
|
+
imports: [
|
|
3518
|
+
CommonModule,
|
|
3519
|
+
FormioModule,
|
|
3520
|
+
DropzoneModule,
|
|
3521
|
+
TranslateModule,
|
|
3522
|
+
DocumentModule,
|
|
3523
|
+
FileSizeModule,
|
|
3524
|
+
ResourceModule,
|
|
3525
|
+
RouterModule,
|
|
3526
|
+
DocumentenApiMetadataModalComponent,
|
|
3527
|
+
CustomerModule,
|
|
3528
|
+
],
|
|
3529
|
+
declarations: [DocumentenApiUploaderComponent],
|
|
3530
|
+
exports: [DocumentenApiUploaderComponent],
|
|
3531
|
+
providers: [
|
|
3532
|
+
{
|
|
3533
|
+
provide: ZGW_OBJECT_TYPE_COMPONENT_TOKEN,
|
|
3534
|
+
useValue: DossierDetailTabObjectTypeComponent,
|
|
3535
|
+
},
|
|
3536
|
+
{
|
|
3537
|
+
provide: ZGW_DOCUMENTEN_API_DOCUMENTS_COMPONENT_TOKEN,
|
|
3538
|
+
useValue: DossierDetailTabDocumentenApiDocumentsComponent,
|
|
3539
|
+
},
|
|
3540
|
+
{
|
|
3541
|
+
provide: ZGW_CASE_CONFIGURATION_EXTENSIONS_TOKEN,
|
|
3542
|
+
useValue: [
|
|
3543
|
+
DossierManagementLinkProcessComponent,
|
|
3544
|
+
DocumentenApiVersionComponent,
|
|
3545
|
+
DocumentObjectenApiSyncComponent,
|
|
3546
|
+
ZakenApiZaaktypeLinkComponent,
|
|
3547
|
+
],
|
|
3548
|
+
},
|
|
3549
|
+
],
|
|
3550
|
+
}]
|
|
3551
|
+
}] });
|
|
3552
|
+
|
|
3553
|
+
/*
|
|
3554
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
3555
|
+
*
|
|
3556
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
3557
|
+
* you may not use this file except in compliance with the License.
|
|
3558
|
+
* You may obtain a copy of the License at
|
|
3559
|
+
*
|
|
3560
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
3561
|
+
*
|
|
3562
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
3563
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
3564
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3565
|
+
* See the License for the specific language governing permissions and
|
|
3566
|
+
* limitations under the License.
|
|
3567
|
+
*/
|
|
3568
|
+
/*
|
|
3569
|
+
* Public API Surface of documenten-api
|
|
3570
|
+
*/
|
|
3571
|
+
|
|
3572
|
+
/**
|
|
3573
|
+
* Generated bundle index. Do not edit.
|
|
3574
|
+
*/
|
|
3575
|
+
|
|
3576
|
+
export { CasesListComponent, ContactMomentService, CustomerListComponent, CustomerModule, CustomerService, DocumentObjectenApiSyncComponent, DocumentObjectenApiSyncService, DocumentenApiColumnModalComponent, DocumentenApiColumnService, DocumentenApiColumnsComponent, DocumentenApiDocumentService, DocumentenApiLinkProcessService, DocumentenApiMetadataModalComponent, DocumentenApiUploaderComponent, DocumentenApiVersionComponent, DocumentenApiVersionService, DossierDetailTabContactMomentsComponent, DossierDetailTabDocumentenApiDocumentsComponent, DossierDetailTabObjectTypeComponent, DossierDetailTabZaakobjectenComponent, DossierManagementLinkProcessComponent, DossierManagementZgwComponent, DossierManagementZgwService, ZaakobjectenService, ZakenApiZaaktypeLinkComponent, ZakenApiZaaktypeLinkService, ZgwModule, ZgwTabEnum, customDocumentApiUploaderType, documentenApiUploaderEditForm, registerDocumentenApiFormioUploadComponent };
|
|
3577
|
+
//# sourceMappingURL=valtimo-zgw.mjs.map
|