@valtimo/dossier 10.8.0 → 11.1.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-assign-user/dossier-assign-user.component.mjs +98 -0
- package/esm2022/lib/components/dossier-bulk-assign-modal/dossier-bulk-assign-modal.component.mjs +75 -0
- package/esm2022/lib/components/dossier-detail/dossier-detail.component.mjs +191 -0
- package/esm2022/lib/components/dossier-detail/tab/audit/audit.component.mjs +76 -0
- package/esm2022/lib/components/dossier-detail/tab/contact-moments/contact-moments.component.mjs +86 -0
- package/esm2022/lib/components/dossier-detail/tab/documenten-api-documents/documenten-api-documents.component.mjs +146 -0
- package/esm2022/lib/components/dossier-detail/tab/documents/documents.component.mjs +41 -0
- package/esm2022/lib/components/dossier-detail/tab/formio/formio.component.mjs +61 -0
- package/esm2022/lib/components/dossier-detail/tab/notes/notes.component.mjs +166 -0
- package/esm2022/lib/components/dossier-detail/tab/object-type/object-type.component.mjs +121 -0
- package/esm2022/lib/components/dossier-detail/tab/progress/progress.component.mjs +52 -0
- package/esm2022/lib/components/dossier-detail/tab/s3-documents/s3-documents.component.mjs +136 -0
- package/esm2022/lib/components/dossier-detail/tab/summary/summary.component.mjs +134 -0
- package/esm2022/lib/components/dossier-detail/tab/zaakobjecten/zaakobjecten.component.mjs +112 -0
- package/esm2022/lib/components/dossier-list/dossier-list.component.mjs +370 -0
- package/esm2022/lib/components/dossier-list-actions/dossier-list-actions.component.mjs +84 -0
- package/esm2022/lib/components/dossier-process-start-modal/dossier-process-start-modal.component.mjs +132 -0
- package/esm2022/lib/components/dossier-supporting-process-start-modal/dossier-supporting-process-start-modal.component.mjs +116 -0
- package/esm2022/lib/components/dossier-update/dossier-update.component.mjs +113 -0
- package/{esm2020 → esm2022}/lib/components/note-modal/note-modal.component.mjs +5 -5
- package/esm2022/lib/constants/case-tab-token.mjs +19 -0
- package/esm2022/lib/constants/index.mjs +3 -0
- package/esm2022/lib/constants/tab.mjs +42 -0
- package/esm2022/lib/dossier-routing.module.mjs +76 -0
- package/esm2022/lib/dossier.module.mjs +288 -0
- package/esm2022/lib/models/candidate-user.model.mjs +17 -0
- package/esm2022/lib/models/dossier-detail-tab.model.mjs +27 -0
- package/{esm2020 → esm2022}/lib/models/dossier-parameters.model.mjs +1 -1
- package/esm2022/lib/models/index.mjs +23 -0
- package/esm2022/lib/models/tab-api.model.mjs +23 -0
- package/esm2022/lib/models/tabs.model.mjs +116 -0
- package/esm2022/lib/permissions/dossier-detail.permissions.mjs +55 -0
- package/esm2022/lib/permissions/index.mjs +17 -0
- package/esm2022/lib/pipes/index.mjs +17 -0
- package/esm2022/lib/pipes/tab-translate/index.mjs +18 -0
- package/esm2022/lib/pipes/tab-translate/tab-translate-pipe.module.mjs +33 -0
- package/esm2022/lib/pipes/tab-translate/tab-translate.pipe.mjs +41 -0
- package/esm2022/lib/services/dossier-bulk-assign.service.mjs +35 -0
- package/esm2022/lib/services/dossier-column.service.mjs +98 -0
- package/esm2022/lib/services/dossier-list-assignee.service.mjs +89 -0
- package/esm2022/lib/services/dossier-list-pagination.service.mjs +119 -0
- package/esm2022/lib/services/dossier-list-search.service.mjs +59 -0
- package/esm2022/lib/services/dossier-list.service.mjs +74 -0
- package/esm2022/lib/services/dossier-parameter.service.mjs +165 -0
- package/esm2022/lib/services/dossier-tab-api.service.mjs +23 -0
- package/esm2022/lib/services/dossier-tab.service.mjs +130 -0
- package/esm2022/lib/services/dossier.service.mjs +58 -0
- package/{esm2020 → esm2022}/lib/services/file-sort.service.mjs +4 -4
- package/esm2022/lib/services/index.mjs +27 -0
- package/esm2022/lib/services/notes.service.mjs +76 -0
- package/{esm2020 → esm2022}/lib/services/zaakobjecten.service.mjs +4 -4
- package/esm2022/public_api.mjs +34 -0
- package/fesm2022/valtimo-dossier.mjs +3979 -0
- package/fesm2022/valtimo-dossier.mjs.map +1 -0
- package/lib/components/dossier-assign-user/dossier-assign-user.component.d.ts +28 -0
- package/lib/components/dossier-assign-user/dossier-assign-user.component.d.ts.map +1 -0
- package/lib/components/dossier-bulk-assign-modal/dossier-bulk-assign-modal.component.d.ts +22 -0
- package/lib/components/dossier-bulk-assign-modal/dossier-bulk-assign-modal.component.d.ts.map +1 -0
- package/lib/{dossier-detail → components/dossier-detail}/dossier-detail.component.d.ts +36 -33
- package/lib/components/dossier-detail/dossier-detail.component.d.ts.map +1 -0
- package/lib/{dossier-detail → components/dossier-detail}/tab/audit/audit.component.d.ts +1 -1
- package/lib/components/dossier-detail/tab/audit/audit.component.d.ts.map +1 -0
- package/lib/{dossier-detail → components/dossier-detail}/tab/contact-moments/contact-moments.component.d.ts +1 -1
- package/lib/components/dossier-detail/tab/contact-moments/contact-moments.component.d.ts.map +1 -0
- package/lib/{dossier-detail → components/dossier-detail}/tab/documenten-api-documents/documenten-api-documents.component.d.ts +3 -4
- package/lib/components/dossier-detail/tab/documenten-api-documents/documenten-api-documents.component.d.ts.map +1 -0
- package/lib/{dossier-detail → components/dossier-detail}/tab/documents/documents.component.d.ts +1 -1
- package/lib/components/dossier-detail/tab/documents/documents.component.d.ts.map +1 -0
- package/lib/components/dossier-detail/tab/formio/formio.component.d.ts +20 -0
- package/lib/components/dossier-detail/tab/formio/formio.component.d.ts.map +1 -0
- package/lib/{dossier-detail → components/dossier-detail}/tab/notes/notes.component.d.ts +19 -12
- package/lib/components/dossier-detail/tab/notes/notes.component.d.ts.map +1 -0
- package/lib/{dossier-detail → components/dossier-detail}/tab/object-type/object-type.component.d.ts +5 -5
- package/lib/components/dossier-detail/tab/object-type/object-type.component.d.ts.map +1 -0
- package/lib/{dossier-detail → components/dossier-detail}/tab/progress/progress.component.d.ts +1 -1
- package/lib/components/dossier-detail/tab/progress/progress.component.d.ts.map +1 -0
- package/lib/{dossier-detail → components/dossier-detail}/tab/s3-documents/s3-documents.component.d.ts +3 -3
- package/lib/components/dossier-detail/tab/s3-documents/s3-documents.component.d.ts.map +1 -0
- package/lib/{dossier-detail → components/dossier-detail}/tab/summary/summary.component.d.ts +8 -4
- package/lib/components/dossier-detail/tab/summary/summary.component.d.ts.map +1 -0
- package/lib/{dossier-detail → components/dossier-detail}/tab/zaakobjecten/zaakobjecten.component.d.ts +5 -5
- package/lib/components/dossier-detail/tab/zaakobjecten/zaakobjecten.component.d.ts.map +1 -0
- package/lib/components/dossier-list/dossier-list.component.d.ts +94 -0
- package/lib/components/dossier-list/dossier-list.component.d.ts.map +1 -0
- package/lib/{dossier-list-actions → components/dossier-list-actions}/dossier-list-actions.component.d.ts +6 -7
- package/lib/components/dossier-list-actions/dossier-list-actions.component.d.ts.map +1 -0
- package/lib/{dossier-process-start-modal → components/dossier-process-start-modal}/dossier-process-start-modal.component.d.ts +4 -7
- package/lib/components/dossier-process-start-modal/dossier-process-start-modal.component.d.ts.map +1 -0
- package/lib/{dossier-supporting-process-start-modal → components/dossier-supporting-process-start-modal}/dossier-supporting-process-start-modal.component.d.ts +4 -7
- package/lib/components/dossier-supporting-process-start-modal/dossier-supporting-process-start-modal.component.d.ts.map +1 -0
- package/lib/{dossier-update → components/dossier-update}/dossier-update.component.d.ts +2 -2
- package/lib/components/dossier-update/dossier-update.component.d.ts.map +1 -0
- package/lib/components/note-modal/note-modal.component.d.ts +3 -3
- package/lib/components/note-modal/note-modal.component.d.ts.map +1 -1
- package/lib/constants/case-tab-token.d.ts +5 -0
- package/lib/constants/case-tab-token.d.ts.map +1 -0
- package/lib/constants/index.d.ts +3 -0
- package/lib/constants/index.d.ts.map +1 -0
- package/lib/constants/tab.d.ts +7 -0
- package/lib/constants/tab.d.ts.map +1 -0
- package/lib/dossier-routing.module.d.ts.map +1 -1
- package/lib/dossier.module.d.ts +35 -33
- package/lib/dossier.module.d.ts.map +1 -1
- package/lib/models/candidate-user.model.d.ts +7 -0
- package/lib/models/candidate-user.model.d.ts.map +1 -0
- package/lib/models/dossier-detail-tab.model.d.ts +18 -0
- package/lib/models/dossier-detail-tab.model.d.ts.map +1 -0
- package/lib/models/dossier-parameters.model.d.ts +0 -1
- package/lib/models/dossier-parameters.model.d.ts.map +1 -1
- package/lib/models/index.d.ts +5 -2
- package/lib/models/index.d.ts.map +1 -1
- package/lib/models/search.model.d.ts +3 -3
- package/lib/models/search.model.d.ts.map +1 -1
- package/lib/models/tab-api.model.d.ts +13 -0
- package/lib/models/tab-api.model.d.ts.map +1 -0
- package/lib/models/tabs.model.d.ts +11 -10
- package/lib/models/tabs.model.d.ts.map +1 -1
- package/lib/permissions/dossier-detail.permissions.d.ts +14 -0
- package/lib/permissions/dossier-detail.permissions.d.ts.map +1 -0
- package/lib/permissions/index.d.ts +2 -0
- package/lib/permissions/index.d.ts.map +1 -0
- package/lib/pipes/index.d.ts +2 -0
- package/lib/pipes/index.d.ts.map +1 -0
- package/lib/pipes/tab-translate/index.d.ts +3 -0
- package/lib/pipes/tab-translate/index.d.ts.map +1 -0
- package/lib/pipes/tab-translate/tab-translate-pipe.module.d.ts +9 -0
- package/lib/pipes/tab-translate/tab-translate-pipe.module.d.ts.map +1 -0
- package/lib/pipes/tab-translate/tab-translate.pipe.d.ts +13 -0
- package/lib/pipes/tab-translate/tab-translate.pipe.d.ts.map +1 -0
- package/lib/services/dossier-bulk-assign.service.d.ts +17 -0
- package/lib/services/dossier-bulk-assign.service.d.ts.map +1 -0
- package/lib/services/dossier-column.service.d.ts +1 -1
- package/lib/services/dossier-column.service.d.ts.map +1 -1
- package/lib/services/dossier-list-assignee.service.d.ts +5 -4
- package/lib/services/dossier-list-assignee.service.d.ts.map +1 -1
- package/lib/services/dossier-list-pagination.service.d.ts +2 -2
- package/lib/services/dossier-list-pagination.service.d.ts.map +1 -1
- package/lib/services/dossier-list-search.service.d.ts +0 -3
- package/lib/services/dossier-list-search.service.d.ts.map +1 -1
- package/lib/services/dossier-list.service.d.ts +6 -0
- package/lib/services/dossier-list.service.d.ts.map +1 -1
- package/lib/services/dossier-parameter.service.d.ts.map +1 -1
- package/lib/services/dossier-tab-api.service.d.ts +15 -0
- package/lib/services/dossier-tab-api.service.d.ts.map +1 -0
- package/lib/services/dossier-tab.service.d.ts +31 -0
- package/lib/services/dossier-tab.service.d.ts.map +1 -0
- package/lib/{dossier.service.d.ts → services/dossier.service.d.ts} +5 -1
- package/lib/services/dossier.service.d.ts.map +1 -0
- package/lib/services/index.d.ts +4 -1
- package/lib/services/index.d.ts.map +1 -1
- package/lib/services/notes.service.d.ts.map +1 -1
- package/lib/services/zaakobjecten.service.d.ts.map +1 -1
- package/package.json +13 -19
- package/public_api.d.ts +13 -14
- package/public_api.d.ts.map +1 -1
- package/esm2020/lib/dossier-assign-user/dossier-assign-user.component.mjs +0 -126
- package/esm2020/lib/dossier-detail/dossier-detail.component.mjs +0 -175
- package/esm2020/lib/dossier-detail/tab/audit/audit.component.mjs +0 -76
- package/esm2020/lib/dossier-detail/tab/contact-moments/contact-moments.component.mjs +0 -86
- package/esm2020/lib/dossier-detail/tab/documenten-api-documents/documenten-api-documents.component.mjs +0 -147
- package/esm2020/lib/dossier-detail/tab/documents/documents.component.mjs +0 -41
- package/esm2020/lib/dossier-detail/tab/notes/notes.component.mjs +0 -153
- package/esm2020/lib/dossier-detail/tab/object-type/object-type.component.mjs +0 -122
- package/esm2020/lib/dossier-detail/tab/progress/progress.component.mjs +0 -51
- package/esm2020/lib/dossier-detail/tab/s3-documents/s3-documents.component.mjs +0 -134
- package/esm2020/lib/dossier-detail/tab/summary/summary.component.mjs +0 -124
- package/esm2020/lib/dossier-detail/tab/zaakobjecten/zaakobjecten.component.mjs +0 -113
- package/esm2020/lib/dossier-detail-tab-enum.mjs +0 -26
- package/esm2020/lib/dossier-list/dossier-list.component.mjs +0 -224
- package/esm2020/lib/dossier-list-actions/dossier-list-actions.component.mjs +0 -86
- package/esm2020/lib/dossier-process-start-modal/dossier-process-start-modal.component.mjs +0 -192
- package/esm2020/lib/dossier-routing.module.mjs +0 -66
- package/esm2020/lib/dossier-supporting-process-start-modal/dossier-supporting-process-start-modal.component.mjs +0 -181
- package/esm2020/lib/dossier-update/dossier-update.component.mjs +0 -113
- package/esm2020/lib/dossier.config.mjs +0 -29
- package/esm2020/lib/dossier.module.mjs +0 -259
- package/esm2020/lib/dossier.service.mjs +0 -50
- package/esm2020/lib/models/index.mjs +0 -20
- package/esm2020/lib/models/tabs.model.mjs +0 -112
- package/esm2020/lib/services/dossier-column.service.mjs +0 -100
- package/esm2020/lib/services/dossier-list-assignee.service.mjs +0 -82
- package/esm2020/lib/services/dossier-list-pagination.service.mjs +0 -116
- package/esm2020/lib/services/dossier-list-search.service.mjs +0 -66
- package/esm2020/lib/services/dossier-list.service.mjs +0 -56
- package/esm2020/lib/services/dossier-parameter.service.mjs +0 -167
- package/esm2020/lib/services/index.mjs +0 -24
- package/esm2020/lib/services/notes.service.mjs +0 -76
- package/esm2020/lib/tab.service.mjs +0 -80
- package/esm2020/public_api.mjs +0 -35
- package/fesm2015/valtimo-dossier.mjs +0 -3348
- package/fesm2015/valtimo-dossier.mjs.map +0 -1
- package/fesm2020/valtimo-dossier.mjs +0 -3447
- package/fesm2020/valtimo-dossier.mjs.map +0 -1
- package/lib/dossier-assign-user/dossier-assign-user.component.d.ts +0 -34
- package/lib/dossier-assign-user/dossier-assign-user.component.d.ts.map +0 -1
- package/lib/dossier-detail/dossier-detail.component.d.ts.map +0 -1
- package/lib/dossier-detail/tab/audit/audit.component.d.ts.map +0 -1
- package/lib/dossier-detail/tab/contact-moments/contact-moments.component.d.ts.map +0 -1
- package/lib/dossier-detail/tab/documenten-api-documents/documenten-api-documents.component.d.ts.map +0 -1
- package/lib/dossier-detail/tab/documents/documents.component.d.ts.map +0 -1
- package/lib/dossier-detail/tab/notes/notes.component.d.ts.map +0 -1
- package/lib/dossier-detail/tab/object-type/object-type.component.d.ts.map +0 -1
- package/lib/dossier-detail/tab/progress/progress.component.d.ts.map +0 -1
- package/lib/dossier-detail/tab/s3-documents/s3-documents.component.d.ts.map +0 -1
- package/lib/dossier-detail/tab/summary/summary.component.d.ts.map +0 -1
- package/lib/dossier-detail/tab/zaakobjecten/zaakobjecten.component.d.ts.map +0 -1
- package/lib/dossier-detail-tab-enum.d.ts +0 -10
- package/lib/dossier-detail-tab-enum.d.ts.map +0 -1
- package/lib/dossier-list/dossier-list.component.d.ts +0 -66
- package/lib/dossier-list/dossier-list.component.d.ts.map +0 -1
- package/lib/dossier-list-actions/dossier-list-actions.component.d.ts.map +0 -1
- package/lib/dossier-process-start-modal/dossier-process-start-modal.component.d.ts.map +0 -1
- package/lib/dossier-supporting-process-start-modal/dossier-supporting-process-start-modal.component.d.ts.map +0 -1
- package/lib/dossier-update/dossier-update.component.d.ts.map +0 -1
- package/lib/dossier.config.d.ts +0 -4
- package/lib/dossier.config.d.ts.map +0 -1
- package/lib/dossier.service.d.ts.map +0 -1
- package/lib/tab.service.d.ts +0 -21
- package/lib/tab.service.d.ts.map +0 -1
- /package/{esm2020 → esm2022}/lib/models/notes.model.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/models/search.model.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/models/zaakobjecten.model.mjs +0 -0
- /package/{esm2020 → esm2022}/valtimo-dossier.mjs +0 -0
|
@@ -1,3447 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, EventEmitter, Component, ViewEncapsulation, ViewChild, Output, Input, InjectionToken, Inject, ViewContainerRef, NgModule, ANALYZE_FOR_ENTRY_COMPONENTS } from '@angular/core';
|
|
3
|
-
import { map, BehaviorSubject, distinctUntilChanged, take, combineLatest, switchMap, filter, tap, of, Subscription, Subject, noop, from, startWith } from 'rxjs';
|
|
4
|
-
import * as i1 from '@valtimo/config';
|
|
5
|
-
import { UploadProvider, ROLE_USER, ConfigModule, HttpLoaderFactory } from '@valtimo/config';
|
|
6
|
-
import * as i2 from '@valtimo/document';
|
|
7
|
-
import { AdvancedDocumentSearchRequestImpl } from '@valtimo/document';
|
|
8
|
-
import * as i6 from '@ngx-translate/core';
|
|
9
|
-
import { TranslateModule, TranslateLoader } from '@ngx-translate/core';
|
|
10
|
-
import * as i2$1 from '@angular/common/http';
|
|
11
|
-
import { HttpClient } from '@angular/common/http';
|
|
12
|
-
import * as i1$1 from '@angular/router';
|
|
13
|
-
import { NavigationEnd, RouterModule } from '@angular/router';
|
|
14
|
-
import * as i1$2 from 'ngx-logger';
|
|
15
|
-
import * as i6$2 from '@valtimo/components';
|
|
16
|
-
import { FormioOptionsImpl, TimelineItemImpl, ListModule, WidgetModule, BpmnJsDiagramModule, TimelineModule, CamundaFormModule, FilterSidebarModule, DataListModule, FormIoModule, ModalModule, SpinnerModule, UploaderModule, DropzoneModule, DocumentenApiMetadataModalModule, SearchableDropdownSelectModule, SearchFieldsModule } from '@valtimo/components';
|
|
17
|
-
import * as i5 from '@angular/common';
|
|
18
|
-
import { CommonModule } from '@angular/common';
|
|
19
|
-
import * as i8 from '@ng-bootstrap/ng-bootstrap';
|
|
20
|
-
import { NgbButtonsModule, NgbTooltipModule, NgbPaginationModule, NgbModule } from '@ng-bootstrap/ng-bootstrap';
|
|
21
|
-
import { take as take$1, switchMap as switchMap$1, map as map$1, tap as tap$1, catchError } from 'rxjs/operators';
|
|
22
|
-
import * as i2$2 from '@valtimo/process';
|
|
23
|
-
import { ProcessModule } from '@valtimo/process';
|
|
24
|
-
import * as i4 from '@valtimo/form-link';
|
|
25
|
-
import { FormLinkModule } from '@valtimo/form-link';
|
|
26
|
-
import * as i6$1 from '@valtimo/security';
|
|
27
|
-
import { AuthGuardService } from '@valtimo/security';
|
|
28
|
-
import moment from 'moment';
|
|
29
|
-
import * as i3 from '@valtimo/task';
|
|
30
|
-
import { TaskModule } from '@valtimo/task';
|
|
31
|
-
import * as i5$1 from '@valtimo/form';
|
|
32
|
-
import { FormModule } from '@valtimo/form';
|
|
33
|
-
import * as i5$2 from '@angular/forms';
|
|
34
|
-
import { FormsModule } from '@angular/forms';
|
|
35
|
-
import * as i3$1 from 'ngx-spinner';
|
|
36
|
-
import * as i3$2 from 'ngx-toastr';
|
|
37
|
-
import * as i4$1 from '@valtimo/resource';
|
|
38
|
-
import * as i3$3 from '@valtimo/user-interface';
|
|
39
|
-
import { SelectModule, InputLabelModule, ParagraphModule, TableModule, ModalModule as ModalModule$1, TitleModule, ButtonModule, PageModule, InputModule, FormModule as FormModule$1 } from '@valtimo/user-interface';
|
|
40
|
-
import * as i12 from 'carbon-components-angular';
|
|
41
|
-
import { LoadingModule, ButtonModule as ButtonModule$1, IconModule } from 'carbon-components-angular';
|
|
42
|
-
import * as i8$1 from 'keycloak-angular';
|
|
43
|
-
import * as i1$3 from '@valtimo/contact-moment';
|
|
44
|
-
|
|
45
|
-
/*
|
|
46
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
47
|
-
*
|
|
48
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
49
|
-
* you may not use this file except in compliance with the License.
|
|
50
|
-
* You may obtain a copy of the License at
|
|
51
|
-
*
|
|
52
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
53
|
-
*
|
|
54
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
55
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
56
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
57
|
-
* See the License for the specific language governing permissions and
|
|
58
|
-
* limitations under the License.
|
|
59
|
-
*/
|
|
60
|
-
class TabLoaderImpl {
|
|
61
|
-
constructor(tabs, componentFactoryResolver, viewContainerRef, translateService, router, location) {
|
|
62
|
-
this._tabs = null;
|
|
63
|
-
this._componentFactoryResolver = null;
|
|
64
|
-
this._viewContainerRef = null;
|
|
65
|
-
this._activeComponent = null;
|
|
66
|
-
this._activeTab = null;
|
|
67
|
-
this._translateService = null;
|
|
68
|
-
this._tabs = tabs;
|
|
69
|
-
this._componentFactoryResolver = componentFactoryResolver;
|
|
70
|
-
this._viewContainerRef = viewContainerRef;
|
|
71
|
-
this._translateService = translateService;
|
|
72
|
-
this._router = router;
|
|
73
|
-
this._location = location;
|
|
74
|
-
}
|
|
75
|
-
initial(tabName) {
|
|
76
|
-
let initialTab;
|
|
77
|
-
if (tabName) {
|
|
78
|
-
initialTab = this._tabs.find(tab => tab.name === tabName);
|
|
79
|
-
}
|
|
80
|
-
else {
|
|
81
|
-
initialTab = this._tabs[0] || null;
|
|
82
|
-
}
|
|
83
|
-
this.load(initialTab);
|
|
84
|
-
}
|
|
85
|
-
load(newTab) {
|
|
86
|
-
if (newTab !== this._activeTab) {
|
|
87
|
-
this._tabs.forEach(tab => tab.deactivate());
|
|
88
|
-
this.replaceView(newTab);
|
|
89
|
-
this.replaceUrlState(newTab);
|
|
90
|
-
this.setActive(newTab);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
refreshView() {
|
|
94
|
-
this.replaceView(this._activeTab);
|
|
95
|
-
}
|
|
96
|
-
replaceView(tab) {
|
|
97
|
-
const componentFactory = this._componentFactoryResolver.resolveComponentFactory(tab.component);
|
|
98
|
-
this._viewContainerRef.clear();
|
|
99
|
-
if (this._activeTab !== null) {
|
|
100
|
-
this._activeComponent.destroy();
|
|
101
|
-
}
|
|
102
|
-
this._activeComponent = this._viewContainerRef.createComponent(componentFactory);
|
|
103
|
-
}
|
|
104
|
-
replaceUrlState(tab) {
|
|
105
|
-
const currentUrl = this._router.url;
|
|
106
|
-
const queryParams = currentUrl.split('?')[1] || '';
|
|
107
|
-
const urlParts = currentUrl.split('/');
|
|
108
|
-
urlParts.splice(urlParts.length - 1, 1, tab.name);
|
|
109
|
-
const newUrl = urlParts.join('/');
|
|
110
|
-
if (currentUrl.includes(newUrl) && queryParams) {
|
|
111
|
-
this._router.navigateByUrl(`${newUrl}?${queryParams}`);
|
|
112
|
-
}
|
|
113
|
-
else {
|
|
114
|
-
this._router.navigateByUrl(newUrl);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
setActive(tab) {
|
|
118
|
-
tab.activate();
|
|
119
|
-
this._activeTab = tab;
|
|
120
|
-
}
|
|
121
|
-
get tabs() {
|
|
122
|
-
return this._tabs;
|
|
123
|
-
}
|
|
124
|
-
translateTabName(tab) {
|
|
125
|
-
const translationId = 'dossier.tabs.' + tab.name;
|
|
126
|
-
const translation = this._translateService.instant('dossier.tabs.' + tab.name);
|
|
127
|
-
return translationId !== translation ? translation : tab.name;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
class TabImpl {
|
|
131
|
-
constructor(name, sequence, component) {
|
|
132
|
-
this._active = false;
|
|
133
|
-
this._name = name;
|
|
134
|
-
this._sequence = sequence;
|
|
135
|
-
this._component = component;
|
|
136
|
-
}
|
|
137
|
-
get name() {
|
|
138
|
-
return this._name;
|
|
139
|
-
}
|
|
140
|
-
get sequence() {
|
|
141
|
-
return this._sequence;
|
|
142
|
-
}
|
|
143
|
-
get component() {
|
|
144
|
-
return this._component;
|
|
145
|
-
}
|
|
146
|
-
activate() {
|
|
147
|
-
this._active = true;
|
|
148
|
-
}
|
|
149
|
-
deactivate() {
|
|
150
|
-
this._active = false;
|
|
151
|
-
}
|
|
152
|
-
isActive() {
|
|
153
|
-
return this._active;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
/*
|
|
158
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
159
|
-
*
|
|
160
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
161
|
-
* you may not use this file except in compliance with the License.
|
|
162
|
-
* You may obtain a copy of the License at
|
|
163
|
-
*
|
|
164
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
165
|
-
*
|
|
166
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
167
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
168
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
169
|
-
* See the License for the specific language governing permissions and
|
|
170
|
-
* limitations under the License.
|
|
171
|
-
*/
|
|
172
|
-
|
|
173
|
-
/*
|
|
174
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
175
|
-
*
|
|
176
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
177
|
-
* you may not use this file except in compliance with the License.
|
|
178
|
-
* You may obtain a copy of the License at
|
|
179
|
-
*
|
|
180
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
181
|
-
*
|
|
182
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
183
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
184
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
185
|
-
* See the License for the specific language governing permissions and
|
|
186
|
-
* limitations under the License.
|
|
187
|
-
*/
|
|
188
|
-
|
|
189
|
-
/*
|
|
190
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
191
|
-
*
|
|
192
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
193
|
-
* you may not use this file except in compliance with the License.
|
|
194
|
-
* You may obtain a copy of the License at
|
|
195
|
-
*
|
|
196
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
197
|
-
*
|
|
198
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
199
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
200
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
-
* See the License for the specific language governing permissions and
|
|
202
|
-
* limitations under the License.
|
|
203
|
-
*/
|
|
204
|
-
|
|
205
|
-
/*
|
|
206
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
207
|
-
*
|
|
208
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
209
|
-
* you may not use this file except in compliance with the License.
|
|
210
|
-
* You may obtain a copy of the License at
|
|
211
|
-
*
|
|
212
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
213
|
-
*
|
|
214
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
215
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
216
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
217
|
-
* See the License for the specific language governing permissions and
|
|
218
|
-
* limitations under the License.
|
|
219
|
-
*/
|
|
220
|
-
|
|
221
|
-
/*
|
|
222
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
223
|
-
*
|
|
224
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
225
|
-
* you may not use this file except in compliance with the License.
|
|
226
|
-
* You may obtain a copy of the License at
|
|
227
|
-
*
|
|
228
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
229
|
-
*
|
|
230
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
231
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
232
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
233
|
-
* See the License for the specific language governing permissions and
|
|
234
|
-
* limitations under the License.
|
|
235
|
-
*/
|
|
236
|
-
class DossierColumnService {
|
|
237
|
-
constructor(configService, documentService, translateService) {
|
|
238
|
-
this.configService = configService;
|
|
239
|
-
this.documentService = documentService;
|
|
240
|
-
this.translateService = translateService;
|
|
241
|
-
}
|
|
242
|
-
getDefinitionColumns(documentDefinitionName) {
|
|
243
|
-
const config = this.configService.config;
|
|
244
|
-
const customDefinitionTable = config.customDefinitionTables[documentDefinitionName];
|
|
245
|
-
const defaultDefinitionTable = config.defaultDefinitionTable;
|
|
246
|
-
return this.documentService.getCaseList(documentDefinitionName).pipe(map(caseListColumns => {
|
|
247
|
-
const apiCaseListColumns = config?.featureToggles?.caseListColumn &&
|
|
248
|
-
caseListColumns &&
|
|
249
|
-
Array.isArray(caseListColumns) &&
|
|
250
|
-
caseListColumns.length > 0 &&
|
|
251
|
-
this.mapCaseListColumnsToDefinitionColumns(caseListColumns);
|
|
252
|
-
return {
|
|
253
|
-
columns: customDefinitionTable || apiCaseListColumns || defaultDefinitionTable,
|
|
254
|
-
hasApiConfig: !!apiCaseListColumns,
|
|
255
|
-
};
|
|
256
|
-
}));
|
|
257
|
-
}
|
|
258
|
-
hasEnvironmentConfig(documentDefinitionName) {
|
|
259
|
-
return !!this.configService.config?.customDefinitionTables[documentDefinitionName];
|
|
260
|
-
}
|
|
261
|
-
mapDefinitionColumnsToListFields(columns, hasEnvConfig) {
|
|
262
|
-
return columns.map(column => {
|
|
263
|
-
const translationKey = `fieldLabels.${column.translationKey}`;
|
|
264
|
-
const translation = this.translateService.instant(translationKey);
|
|
265
|
-
const validTranslation = translation !== translationKey && translation;
|
|
266
|
-
return {
|
|
267
|
-
key: hasEnvConfig ? column.propertyName : column.translationKey,
|
|
268
|
-
label: column.title || validTranslation || column.translationKey,
|
|
269
|
-
sortable: column.sortable,
|
|
270
|
-
...(column.viewType && { viewType: column.viewType }),
|
|
271
|
-
...(column.enum && { enum: column.enum }),
|
|
272
|
-
...(column.format && { format: column.format }),
|
|
273
|
-
...(column.default && { default: column.default }),
|
|
274
|
-
};
|
|
275
|
-
});
|
|
276
|
-
}
|
|
277
|
-
mapCaseListColumnsToDefinitionColumns(caseListColumns) {
|
|
278
|
-
return caseListColumns.map(caseListColumn => ({
|
|
279
|
-
translationKey: caseListColumn.key,
|
|
280
|
-
sortable: caseListColumn.sortable,
|
|
281
|
-
default: caseListColumn.defaultSort,
|
|
282
|
-
viewType: this.getViewType(caseListColumn.displayType.type),
|
|
283
|
-
propertyName: this.getPropertyName(caseListColumn.path),
|
|
284
|
-
...(caseListColumn.title && { title: caseListColumn.title }),
|
|
285
|
-
...(caseListColumn?.displayType?.displayTypeParameters?.enum && {
|
|
286
|
-
enum: caseListColumn.displayType.displayTypeParameters.enum,
|
|
287
|
-
}),
|
|
288
|
-
...(caseListColumn.displayType?.displayTypeParameters?.dateFormat && {
|
|
289
|
-
format: caseListColumn.displayType?.displayTypeParameters?.dateFormat,
|
|
290
|
-
}),
|
|
291
|
-
}));
|
|
292
|
-
}
|
|
293
|
-
getViewType(caseListColumnDisplayType) {
|
|
294
|
-
switch (caseListColumnDisplayType) {
|
|
295
|
-
case 'arrayCount':
|
|
296
|
-
return 'relatedFiles';
|
|
297
|
-
break;
|
|
298
|
-
case 'underscoresToSpaces':
|
|
299
|
-
return 'stringReplaceUnderscore';
|
|
300
|
-
default:
|
|
301
|
-
return caseListColumnDisplayType;
|
|
302
|
-
break;
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
getPropertyName(caseListColumnPath) {
|
|
306
|
-
return caseListColumnPath.replace('doc:', '$.').replace('case:', '');
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
DossierColumnService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierColumnService, deps: [{ token: i1.ConfigService }, { token: i2.DocumentService }, { token: i6.TranslateService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
310
|
-
DossierColumnService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierColumnService });
|
|
311
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierColumnService, decorators: [{
|
|
312
|
-
type: Injectable
|
|
313
|
-
}], ctorParameters: function () { return [{ type: i1.ConfigService }, { type: i2.DocumentService }, { type: i6.TranslateService }]; } });
|
|
314
|
-
|
|
315
|
-
/*
|
|
316
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
317
|
-
*
|
|
318
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
319
|
-
* you may not use this file except in compliance with the License.
|
|
320
|
-
* You may obtain a copy of the License at
|
|
321
|
-
*
|
|
322
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
323
|
-
*
|
|
324
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
325
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
326
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
327
|
-
* See the License for the specific language governing permissions and
|
|
328
|
-
* limitations under the License.
|
|
329
|
-
*/
|
|
330
|
-
class ZaakobjectenService {
|
|
331
|
-
constructor(configService, http) {
|
|
332
|
-
this.configService = configService;
|
|
333
|
-
this.http = http;
|
|
334
|
-
this.VALTIMO_API_ENDPOINT_URI = this.configService.config.valtimoApi.endpointUri;
|
|
335
|
-
}
|
|
336
|
-
getDocumentObjectTypes(documentId) {
|
|
337
|
-
return this.http.get(`${this.VALTIMO_API_ENDPOINT_URI}v1/document/${documentId}/zaak/objecttype`);
|
|
338
|
-
}
|
|
339
|
-
getDocumentObjectsOfType(documentId, typeUrl) {
|
|
340
|
-
return this.http.get(`${this.VALTIMO_API_ENDPOINT_URI}v1/document/${documentId}/zaak/object?typeUrl=${typeUrl}`);
|
|
341
|
-
}
|
|
342
|
-
getObjectTypeForm(documentId, objectUrl) {
|
|
343
|
-
return this.http.get(`${this.VALTIMO_API_ENDPOINT_URI}v1/document/${documentId}/zaak/object/form?objectUrl=${objectUrl}`);
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
ZaakobjectenService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ZaakobjectenService, deps: [{ token: i1.ConfigService }, { token: i2$1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
347
|
-
ZaakobjectenService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ZaakobjectenService, providedIn: 'root' });
|
|
348
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ZaakobjectenService, decorators: [{
|
|
349
|
-
type: Injectable,
|
|
350
|
-
args: [{
|
|
351
|
-
providedIn: 'root',
|
|
352
|
-
}]
|
|
353
|
-
}], ctorParameters: function () { return [{ type: i1.ConfigService }, { type: i2$1.HttpClient }]; } });
|
|
354
|
-
|
|
355
|
-
/*
|
|
356
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
357
|
-
*
|
|
358
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
359
|
-
* you may not use this file except in compliance with the License.
|
|
360
|
-
* You may obtain a copy of the License at
|
|
361
|
-
*
|
|
362
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
363
|
-
*
|
|
364
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
365
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
366
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
367
|
-
* See the License for the specific language governing permissions and
|
|
368
|
-
* limitations under the License.
|
|
369
|
-
*/
|
|
370
|
-
class DossierParameterService {
|
|
371
|
-
constructor(router, route) {
|
|
372
|
-
this.router = router;
|
|
373
|
-
this.route = route;
|
|
374
|
-
this._dossierParameters$ = new BehaviorSubject(undefined);
|
|
375
|
-
this._searchFieldValues$ = new BehaviorSubject({});
|
|
376
|
-
this.setDossierParameters();
|
|
377
|
-
}
|
|
378
|
-
get dossierParameters$() {
|
|
379
|
-
return this._dossierParameters$.asObservable();
|
|
380
|
-
}
|
|
381
|
-
get searchFieldValues$() {
|
|
382
|
-
return this._searchFieldValues$.asObservable();
|
|
383
|
-
}
|
|
384
|
-
get querySearchParams$() {
|
|
385
|
-
return this.route.queryParams.pipe(map(params => {
|
|
386
|
-
if (params.search) {
|
|
387
|
-
return JSON.parse(atob(params.search));
|
|
388
|
-
}
|
|
389
|
-
return {};
|
|
390
|
-
}), distinctUntilChanged((prevParams, currParams) => JSON.stringify(prevParams) === JSON.stringify(currParams)));
|
|
391
|
-
}
|
|
392
|
-
get queryPaginationParams$() {
|
|
393
|
-
return this.route.queryParams.pipe(map(params => {
|
|
394
|
-
const paramsCopy = { ...params };
|
|
395
|
-
if (paramsCopy.search) {
|
|
396
|
-
delete paramsCopy.search;
|
|
397
|
-
}
|
|
398
|
-
return paramsCopy.collectionSize
|
|
399
|
-
? {
|
|
400
|
-
collectionSize: Number(paramsCopy.collectionSize),
|
|
401
|
-
page: Number(paramsCopy.page),
|
|
402
|
-
size: Number(paramsCopy.size),
|
|
403
|
-
maxPaginationItemSize: Number(paramsCopy.maxPaginationItemSize),
|
|
404
|
-
...(paramsCopy.isSorting === 'true' && {
|
|
405
|
-
sort: {
|
|
406
|
-
isSorting: !!(paramsCopy.isSorting === 'true'),
|
|
407
|
-
state: {
|
|
408
|
-
name: paramsCopy.sortStateName,
|
|
409
|
-
direction: paramsCopy.sortStateDirection,
|
|
410
|
-
},
|
|
411
|
-
},
|
|
412
|
-
}),
|
|
413
|
-
}
|
|
414
|
-
: null;
|
|
415
|
-
}), distinctUntilChanged((prevParams, currParams) => JSON.stringify(prevParams) === JSON.stringify(currParams)));
|
|
416
|
-
}
|
|
417
|
-
get queryAssigneeParam$() {
|
|
418
|
-
return this.route.queryParams.pipe(map(params => {
|
|
419
|
-
if (params?.assignee) {
|
|
420
|
-
return params?.assignee?.toUpperCase();
|
|
421
|
-
}
|
|
422
|
-
return '';
|
|
423
|
-
}), distinctUntilChanged((prevParams, currParams) => prevParams === currParams));
|
|
424
|
-
}
|
|
425
|
-
ngOnDestroy() {
|
|
426
|
-
this.dossierParametersSubscription?.unsubscribe();
|
|
427
|
-
}
|
|
428
|
-
setSearchFieldValues(searchFieldValues) {
|
|
429
|
-
this._searchFieldValues$.next(searchFieldValues);
|
|
430
|
-
}
|
|
431
|
-
setSearchParameters(searchParameters) {
|
|
432
|
-
this._dossierParameters$.pipe(take(1)).subscribe(dossierParameters => {
|
|
433
|
-
if (Object.keys(searchParameters || {}).length > 0) {
|
|
434
|
-
this._dossierParameters$.next({
|
|
435
|
-
...dossierParameters,
|
|
436
|
-
search: this.objectToBase64(searchParameters),
|
|
437
|
-
});
|
|
438
|
-
}
|
|
439
|
-
else {
|
|
440
|
-
if (dossierParameters?.search) {
|
|
441
|
-
delete dossierParameters.search;
|
|
442
|
-
}
|
|
443
|
-
this._dossierParameters$.next(dossierParameters);
|
|
444
|
-
}
|
|
445
|
-
});
|
|
446
|
-
}
|
|
447
|
-
setPaginationParameters(pagination) {
|
|
448
|
-
if (pagination) {
|
|
449
|
-
this._dossierParameters$.pipe(take(1)).subscribe(dossierParameters => {
|
|
450
|
-
this._dossierParameters$.next({
|
|
451
|
-
...dossierParameters,
|
|
452
|
-
size: `${pagination.size}`,
|
|
453
|
-
collectionSize: `${pagination.collectionSize}`,
|
|
454
|
-
page: `${pagination.page}`,
|
|
455
|
-
maxPaginationItemSize: `${pagination.maxPaginationItemSize}`,
|
|
456
|
-
isSorting: pagination.sort?.isSorting ? 'true' : 'false',
|
|
457
|
-
...(pagination.sort?.state?.name && { sortStateName: `${pagination.sort?.state.name}` }),
|
|
458
|
-
...(pagination.sort?.state?.direction && {
|
|
459
|
-
sortStateDirection: `${pagination.sort?.state.direction}`,
|
|
460
|
-
}),
|
|
461
|
-
});
|
|
462
|
-
});
|
|
463
|
-
}
|
|
464
|
-
}
|
|
465
|
-
setAssigneeParameter(assigneeFilter) {
|
|
466
|
-
this._dossierParameters$.pipe(take(1)).subscribe(dossierParameters => {
|
|
467
|
-
this._dossierParameters$.next({
|
|
468
|
-
...dossierParameters,
|
|
469
|
-
assignee: assigneeFilter.toLowerCase(),
|
|
470
|
-
});
|
|
471
|
-
});
|
|
472
|
-
}
|
|
473
|
-
clearSearchFieldValues() {
|
|
474
|
-
this._searchFieldValues$.next({});
|
|
475
|
-
}
|
|
476
|
-
clearParameters() {
|
|
477
|
-
this._dossierParameters$.next(undefined);
|
|
478
|
-
this.router.navigate([this.getUrlWithoutParams()]);
|
|
479
|
-
}
|
|
480
|
-
openDossierParametersSubscription() {
|
|
481
|
-
this.dossierParametersSubscription = this.dossierParameters$.subscribe(dossierParams => {
|
|
482
|
-
this.router.navigate([this.getUrlWithoutParams()], { queryParams: dossierParams });
|
|
483
|
-
});
|
|
484
|
-
}
|
|
485
|
-
objectToBase64(jsObject) {
|
|
486
|
-
return btoa(JSON.stringify(jsObject));
|
|
487
|
-
}
|
|
488
|
-
getUrlWithoutParams() {
|
|
489
|
-
const urlTree = this.router.parseUrl(this.router.url);
|
|
490
|
-
urlTree.queryParams = {};
|
|
491
|
-
urlTree.fragment = null;
|
|
492
|
-
return urlTree.toString();
|
|
493
|
-
}
|
|
494
|
-
setDossierParameters() {
|
|
495
|
-
combineLatest([this.queryPaginationParams$, this.querySearchParams$, this.queryAssigneeParam$])
|
|
496
|
-
.pipe(take(1))
|
|
497
|
-
.subscribe(([paginationParams, searchParams, assigneeParams]) => {
|
|
498
|
-
if (paginationParams) {
|
|
499
|
-
this.setPaginationParameters(paginationParams);
|
|
500
|
-
}
|
|
501
|
-
if (searchParams) {
|
|
502
|
-
this.setSearchParameters(searchParams);
|
|
503
|
-
this.setSearchFieldValues(searchParams);
|
|
504
|
-
}
|
|
505
|
-
if (assigneeParams) {
|
|
506
|
-
this.setAssigneeParameter(assigneeParams);
|
|
507
|
-
}
|
|
508
|
-
this.openDossierParametersSubscription();
|
|
509
|
-
});
|
|
510
|
-
}
|
|
511
|
-
}
|
|
512
|
-
DossierParameterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierParameterService, deps: [{ token: i1$1.Router }, { token: i1$1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
513
|
-
DossierParameterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierParameterService });
|
|
514
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierParameterService, decorators: [{
|
|
515
|
-
type: Injectable
|
|
516
|
-
}], ctorParameters: function () { return [{ type: i1$1.Router }, { type: i1$1.ActivatedRoute }]; } });
|
|
517
|
-
|
|
518
|
-
/*
|
|
519
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
520
|
-
*
|
|
521
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
522
|
-
* you may not use this file except in compliance with the License.
|
|
523
|
-
* You may obtain a copy of the License at
|
|
524
|
-
*
|
|
525
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
526
|
-
*
|
|
527
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
528
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
529
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
530
|
-
* See the License for the specific language governing permissions and
|
|
531
|
-
* limitations under the License.
|
|
532
|
-
*/
|
|
533
|
-
class FileSortService {
|
|
534
|
-
constructor(configService) {
|
|
535
|
-
this.configService = configService;
|
|
536
|
-
}
|
|
537
|
-
sortRelatedFilesByDateDescending(relatedFiles) {
|
|
538
|
-
const sortByDate = this.configService.config?.featureToggles?.sortFilesByDate;
|
|
539
|
-
if (sortByDate) {
|
|
540
|
-
return relatedFiles.sort((a, b) => new Date(b.createdOn).getTime() - new Date(a.createdOn).getTime());
|
|
541
|
-
}
|
|
542
|
-
return relatedFiles;
|
|
543
|
-
}
|
|
544
|
-
}
|
|
545
|
-
FileSortService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FileSortService, deps: [{ token: i1.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
546
|
-
FileSortService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FileSortService, providedIn: 'root' });
|
|
547
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FileSortService, decorators: [{
|
|
548
|
-
type: Injectable,
|
|
549
|
-
args: [{
|
|
550
|
-
providedIn: 'root',
|
|
551
|
-
}]
|
|
552
|
-
}], ctorParameters: function () { return [{ type: i1.ConfigService }]; } });
|
|
553
|
-
|
|
554
|
-
/*
|
|
555
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
556
|
-
*
|
|
557
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
558
|
-
* you may not use this file except in compliance with the License.
|
|
559
|
-
* You may obtain a copy of the License at
|
|
560
|
-
*
|
|
561
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
562
|
-
*
|
|
563
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
564
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
565
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
566
|
-
* See the License for the specific language governing permissions and
|
|
567
|
-
* limitations under the License.
|
|
568
|
-
*/
|
|
569
|
-
class DossierListService {
|
|
570
|
-
constructor(dossierColumnService) {
|
|
571
|
-
this.dossierColumnService = dossierColumnService;
|
|
572
|
-
this._documentDefinitionName$ = new BehaviorSubject('');
|
|
573
|
-
this._hasEnvColumnConfig$ = this.documentDefinitionName$.pipe(map(documentDefinitionName => this.dossierColumnService.hasEnvironmentConfig(documentDefinitionName)));
|
|
574
|
-
}
|
|
575
|
-
get documentDefinitionName$() {
|
|
576
|
-
return this._documentDefinitionName$.asObservable();
|
|
577
|
-
}
|
|
578
|
-
get hasEnvColumnConfig$() {
|
|
579
|
-
return this._hasEnvColumnConfig$;
|
|
580
|
-
}
|
|
581
|
-
setDocumentDefinitionName(documentDefinitionName) {
|
|
582
|
-
this._documentDefinitionName$.next(documentDefinitionName);
|
|
583
|
-
}
|
|
584
|
-
mapDocuments(documents, hasEnvColumnConfig, hasApiColumnConfig) {
|
|
585
|
-
if (hasEnvColumnConfig || !hasApiColumnConfig) {
|
|
586
|
-
return documents.content.map(document => {
|
|
587
|
-
const { content, ...others } = document;
|
|
588
|
-
return { ...content, ...others };
|
|
589
|
-
});
|
|
590
|
-
}
|
|
591
|
-
return documents.content.reduce((acc, curr) => {
|
|
592
|
-
const propsObject = { id: curr.id };
|
|
593
|
-
curr.items?.forEach(item => {
|
|
594
|
-
propsObject[item.key] = item.value;
|
|
595
|
-
});
|
|
596
|
-
return [...acc, propsObject];
|
|
597
|
-
}, []);
|
|
598
|
-
}
|
|
599
|
-
}
|
|
600
|
-
DossierListService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierListService, deps: [{ token: DossierColumnService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
601
|
-
DossierListService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierListService });
|
|
602
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierListService, decorators: [{
|
|
603
|
-
type: Injectable
|
|
604
|
-
}], ctorParameters: function () { return [{ type: DossierColumnService }]; } });
|
|
605
|
-
|
|
606
|
-
/*
|
|
607
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
608
|
-
*
|
|
609
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
610
|
-
* you may not use this file except in compliance with the License.
|
|
611
|
-
* You may obtain a copy of the License at
|
|
612
|
-
*
|
|
613
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
614
|
-
*
|
|
615
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
616
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
617
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
618
|
-
* See the License for the specific language governing permissions and
|
|
619
|
-
* limitations under the License.
|
|
620
|
-
*/
|
|
621
|
-
class DossierListAssigneeService {
|
|
622
|
-
constructor(dossierListService, documentService, translateService, dossierParameterService) {
|
|
623
|
-
this.dossierListService = dossierListService;
|
|
624
|
-
this.documentService = documentService;
|
|
625
|
-
this.translateService = translateService;
|
|
626
|
-
this.dossierParameterService = dossierParameterService;
|
|
627
|
-
this.ASSIGNEE_KEY = 'assigneeFullName';
|
|
628
|
-
this.defaultAssigneeFilter = 'ALL';
|
|
629
|
-
this.canHaveAssignee$ = this.dossierListService.documentDefinitionName$.pipe(switchMap(documentDefinitionName => this.documentService.getCaseSettings(documentDefinitionName)), map(caseSettings => caseSettings?.canHaveAssignee));
|
|
630
|
-
this._assigneeFilter$ = new BehaviorSubject(this.defaultAssigneeFilter);
|
|
631
|
-
}
|
|
632
|
-
get assigneeFilter$() {
|
|
633
|
-
return this._assigneeFilter$.asObservable();
|
|
634
|
-
}
|
|
635
|
-
resetAssigneeFilter() {
|
|
636
|
-
this.dossierParameterService.queryAssigneeParam$.pipe(take(1)).subscribe(assigneeParam => {
|
|
637
|
-
if (assigneeParam) {
|
|
638
|
-
this._assigneeFilter$.next(assigneeParam);
|
|
639
|
-
this.dossierParameterService.setAssigneeParameter(assigneeParam);
|
|
640
|
-
}
|
|
641
|
-
else {
|
|
642
|
-
this._assigneeFilter$.next(this.defaultAssigneeFilter);
|
|
643
|
-
this.dossierParameterService.setAssigneeParameter(this.defaultAssigneeFilter);
|
|
644
|
-
}
|
|
645
|
-
});
|
|
646
|
-
}
|
|
647
|
-
setAssigneeFilter(assigneeFilter) {
|
|
648
|
-
this._assigneeFilter$.next(assigneeFilter);
|
|
649
|
-
this.dossierParameterService.setAssigneeParameter(assigneeFilter);
|
|
650
|
-
}
|
|
651
|
-
filterAssigneeColumns(columns, canHaveAssignee) {
|
|
652
|
-
return columns.filter(column => {
|
|
653
|
-
if (column?.key === this.ASSIGNEE_KEY && !canHaveAssignee) {
|
|
654
|
-
return false;
|
|
655
|
-
}
|
|
656
|
-
return true;
|
|
657
|
-
});
|
|
658
|
-
}
|
|
659
|
-
addAssigneeListField(columns, listFields, canHaveAssignee) {
|
|
660
|
-
return [
|
|
661
|
-
...listFields,
|
|
662
|
-
...(canHaveAssignee && !columns.find(column => column.propertyName === this.ASSIGNEE_KEY)
|
|
663
|
-
? [
|
|
664
|
-
{
|
|
665
|
-
key: this.ASSIGNEE_KEY,
|
|
666
|
-
label: this.translateService.instant(`fieldLabels.${this.ASSIGNEE_KEY}`),
|
|
667
|
-
sortable: true,
|
|
668
|
-
viewType: 'string',
|
|
669
|
-
},
|
|
670
|
-
]
|
|
671
|
-
: []),
|
|
672
|
-
];
|
|
673
|
-
}
|
|
674
|
-
}
|
|
675
|
-
DossierListAssigneeService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierListAssigneeService, deps: [{ token: DossierListService }, { token: i2.DocumentService }, { token: i6.TranslateService }, { token: DossierParameterService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
676
|
-
DossierListAssigneeService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierListAssigneeService });
|
|
677
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierListAssigneeService, decorators: [{
|
|
678
|
-
type: Injectable
|
|
679
|
-
}], ctorParameters: function () { return [{ type: DossierListService }, { type: i2.DocumentService }, { type: i6.TranslateService }, { type: DossierParameterService }]; } });
|
|
680
|
-
|
|
681
|
-
/*
|
|
682
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
683
|
-
*
|
|
684
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
685
|
-
* you may not use this file except in compliance with the License.
|
|
686
|
-
* You may obtain a copy of the License at
|
|
687
|
-
*
|
|
688
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
689
|
-
*
|
|
690
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
691
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
692
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
693
|
-
* See the License for the specific language governing permissions and
|
|
694
|
-
* limitations under the License.
|
|
695
|
-
*/
|
|
696
|
-
class DossierService {
|
|
697
|
-
constructor(configService) {
|
|
698
|
-
this.configService = configService;
|
|
699
|
-
this.definitions = configService.config.definitions;
|
|
700
|
-
}
|
|
701
|
-
getImplementationEnvironmentDefinitions(name) {
|
|
702
|
-
return this.definitions.dossiers.find(definition => definition.name === name);
|
|
703
|
-
}
|
|
704
|
-
getInitialSortState(columns) {
|
|
705
|
-
const defaultColumn = columns.find(column => column.default);
|
|
706
|
-
const isSorting = defaultColumn?.default === 'ASC' || defaultColumn?.default === 'DESC';
|
|
707
|
-
const direction = typeof !defaultColumn || defaultColumn.default === 'boolean'
|
|
708
|
-
? 'DESC'
|
|
709
|
-
: defaultColumn.default;
|
|
710
|
-
return {
|
|
711
|
-
isSorting,
|
|
712
|
-
state: {
|
|
713
|
-
name: defaultColumn ? defaultColumn.propertyName : columns[0].propertyName,
|
|
714
|
-
direction,
|
|
715
|
-
},
|
|
716
|
-
};
|
|
717
|
-
}
|
|
718
|
-
}
|
|
719
|
-
DossierService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierService, deps: [{ token: i1.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
720
|
-
DossierService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierService, providedIn: 'root' });
|
|
721
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierService, decorators: [{
|
|
722
|
-
type: Injectable,
|
|
723
|
-
args: [{
|
|
724
|
-
providedIn: 'root',
|
|
725
|
-
}]
|
|
726
|
-
}], ctorParameters: function () { return [{ type: i1.ConfigService }]; } });
|
|
727
|
-
|
|
728
|
-
/*
|
|
729
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
730
|
-
*
|
|
731
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
732
|
-
* you may not use this file except in compliance with the License.
|
|
733
|
-
* You may obtain a copy of the License at
|
|
734
|
-
*
|
|
735
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
736
|
-
*
|
|
737
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
738
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
739
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
740
|
-
* See the License for the specific language governing permissions and
|
|
741
|
-
* limitations under the License.
|
|
742
|
-
*/
|
|
743
|
-
class DossierListPaginationService {
|
|
744
|
-
constructor(logger, dossierParameterService, dossierService) {
|
|
745
|
-
this.logger = logger;
|
|
746
|
-
this.dossierParameterService = dossierParameterService;
|
|
747
|
-
this.dossierService = dossierService;
|
|
748
|
-
this.DEFAULT_PAGINATION = {
|
|
749
|
-
collectionSize: 0,
|
|
750
|
-
page: 1,
|
|
751
|
-
size: 10,
|
|
752
|
-
maxPaginationItemSize: 5,
|
|
753
|
-
sort: undefined,
|
|
754
|
-
};
|
|
755
|
-
this._pagination$ = new BehaviorSubject(undefined);
|
|
756
|
-
this._paginationCopy$ = this._pagination$.pipe(filter(pagination => !!pagination), map(pagination => pagination && JSON.parse(JSON.stringify(pagination))), tap(pagination => this.dossierParameterService.setPaginationParameters(pagination)));
|
|
757
|
-
}
|
|
758
|
-
get pagination$() {
|
|
759
|
-
return this._paginationCopy$;
|
|
760
|
-
}
|
|
761
|
-
pageChange(newPage) {
|
|
762
|
-
this._pagination$.pipe(take(1)).subscribe(pagination => {
|
|
763
|
-
if (pagination && pagination.page !== newPage) {
|
|
764
|
-
this.logger.debug(`Page change: ${newPage}`);
|
|
765
|
-
this._pagination$.next({ ...pagination, page: newPage });
|
|
766
|
-
}
|
|
767
|
-
});
|
|
768
|
-
}
|
|
769
|
-
pageSizeChange(newPageSize) {
|
|
770
|
-
this._pagination$.pipe(take(1)).subscribe(pagination => {
|
|
771
|
-
if (pagination && pagination.size !== newPageSize) {
|
|
772
|
-
const amountOfAvailablePages = Math.ceil(pagination.collectionSize / newPageSize);
|
|
773
|
-
const newPage = amountOfAvailablePages < pagination.page ? amountOfAvailablePages : pagination.page;
|
|
774
|
-
this.logger.debug(`Page size change. New Page: ${newPage} New page size: ${newPageSize}`);
|
|
775
|
-
this._pagination$.next({ ...pagination, size: newPageSize, page: newPage });
|
|
776
|
-
}
|
|
777
|
-
});
|
|
778
|
-
}
|
|
779
|
-
sortChanged(newSortState) {
|
|
780
|
-
this._pagination$.pipe(take(1)).subscribe(pagination => {
|
|
781
|
-
if (pagination && JSON.stringify(pagination.sort) !== JSON.stringify(newSortState)) {
|
|
782
|
-
this.logger.debug(`Sort state change: ${JSON.stringify(newSortState)}`);
|
|
783
|
-
this._pagination$.next({ ...pagination, sort: newSortState });
|
|
784
|
-
}
|
|
785
|
-
});
|
|
786
|
-
}
|
|
787
|
-
setPage(newPageNumber) {
|
|
788
|
-
this._pagination$.pipe(take(1)).subscribe(pagination => {
|
|
789
|
-
this._pagination$.next({ ...pagination, page: newPageNumber });
|
|
790
|
-
});
|
|
791
|
-
}
|
|
792
|
-
setCollectionSize(documents) {
|
|
793
|
-
this._pagination$.pipe(take(1)).subscribe(pagination => {
|
|
794
|
-
if (pagination && pagination.collectionSize !== documents.totalElements) {
|
|
795
|
-
this._pagination$.next({ ...pagination, collectionSize: documents.totalElements });
|
|
796
|
-
}
|
|
797
|
-
});
|
|
798
|
-
}
|
|
799
|
-
checkPage(documents) {
|
|
800
|
-
this._pagination$.pipe(take(1)).subscribe(pagination => {
|
|
801
|
-
if (pagination) {
|
|
802
|
-
const amountOfItems = documents.totalElements;
|
|
803
|
-
const amountOfPages = Math.ceil(amountOfItems / pagination.size);
|
|
804
|
-
const currentPage = pagination.page;
|
|
805
|
-
if (currentPage > amountOfPages) {
|
|
806
|
-
this._pagination$.next({ ...pagination, page: amountOfPages });
|
|
807
|
-
}
|
|
808
|
-
}
|
|
809
|
-
});
|
|
810
|
-
}
|
|
811
|
-
clearPagination() {
|
|
812
|
-
this._pagination$.next(undefined);
|
|
813
|
-
}
|
|
814
|
-
setPagination(documentDefinitionName, columns) {
|
|
815
|
-
this.dossierParameterService.queryPaginationParams$
|
|
816
|
-
.pipe(take(1))
|
|
817
|
-
.subscribe(queryPaginationParams => {
|
|
818
|
-
const defaultPagination = this.getDefaultPagination(columns);
|
|
819
|
-
const paginationToUse = queryPaginationParams || defaultPagination;
|
|
820
|
-
this.logger.debug(`Set pagination: ${JSON.stringify(paginationToUse)}`);
|
|
821
|
-
this._pagination$.next(paginationToUse);
|
|
822
|
-
});
|
|
823
|
-
}
|
|
824
|
-
getDefaultPagination(columns) {
|
|
825
|
-
const defaultSortState = this.dossierService.getInitialSortState(columns);
|
|
826
|
-
return {
|
|
827
|
-
...this.DEFAULT_PAGINATION,
|
|
828
|
-
sort: defaultSortState,
|
|
829
|
-
};
|
|
830
|
-
}
|
|
831
|
-
}
|
|
832
|
-
DossierListPaginationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierListPaginationService, deps: [{ token: i1$2.NGXLogger }, { token: DossierParameterService }, { token: DossierService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
833
|
-
DossierListPaginationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierListPaginationService });
|
|
834
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierListPaginationService, decorators: [{
|
|
835
|
-
type: Injectable
|
|
836
|
-
}], ctorParameters: function () { return [{ type: i1$2.NGXLogger }, { type: DossierParameterService }, { type: DossierService }]; } });
|
|
837
|
-
|
|
838
|
-
/*
|
|
839
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
840
|
-
*
|
|
841
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
842
|
-
* you may not use this file except in compliance with the License.
|
|
843
|
-
* You may obtain a copy of the License at
|
|
844
|
-
*
|
|
845
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
846
|
-
*
|
|
847
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
848
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
849
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
850
|
-
* See the License for the specific language governing permissions and
|
|
851
|
-
* limitations under the License.
|
|
852
|
-
*/
|
|
853
|
-
class DossierListSearchService {
|
|
854
|
-
constructor(dossierListService, documentService, dossierParameterService) {
|
|
855
|
-
this.dossierListService = dossierListService;
|
|
856
|
-
this.documentService = documentService;
|
|
857
|
-
this.dossierParameterService = dossierParameterService;
|
|
858
|
-
this._searchSwitch$ = new BehaviorSubject(false);
|
|
859
|
-
this._documentSearchFields$ = this.dossierListService.documentDefinitionName$.pipe(switchMap(documentDefinitionName => this.documentService.getDocumentSearchFields(documentDefinitionName)));
|
|
860
|
-
}
|
|
861
|
-
get searchSwitch$() {
|
|
862
|
-
return this._searchSwitch$.asObservable();
|
|
863
|
-
}
|
|
864
|
-
get documentSearchFields$() {
|
|
865
|
-
return this._documentSearchFields$;
|
|
866
|
-
}
|
|
867
|
-
search(searchFieldValues) {
|
|
868
|
-
this.dossierParameterService.setSearchFieldValues(searchFieldValues || {});
|
|
869
|
-
this.dossierParameterService.setSearchParameters(searchFieldValues);
|
|
870
|
-
this._searchSwitch$.next(!this._searchSwitch$.getValue());
|
|
871
|
-
}
|
|
872
|
-
refresh() {
|
|
873
|
-
this._searchSwitch$.next(!this._searchSwitch$.getValue());
|
|
874
|
-
}
|
|
875
|
-
mapSearchValuesToFilters(values) {
|
|
876
|
-
const filters = [];
|
|
877
|
-
Object.keys(values).forEach(valueKey => {
|
|
878
|
-
const searchValue = values[valueKey];
|
|
879
|
-
if (searchValue.start) {
|
|
880
|
-
filters.push({ key: valueKey, rangeFrom: searchValue.start, rangeTo: searchValue.end });
|
|
881
|
-
}
|
|
882
|
-
else if (Array.isArray(searchValue)) {
|
|
883
|
-
filters.push({ key: valueKey, values: searchValue });
|
|
884
|
-
}
|
|
885
|
-
else {
|
|
886
|
-
filters.push({ key: valueKey, values: [searchValue] });
|
|
887
|
-
}
|
|
888
|
-
});
|
|
889
|
-
return filters;
|
|
890
|
-
}
|
|
891
|
-
}
|
|
892
|
-
DossierListSearchService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierListSearchService, deps: [{ token: DossierListService }, { token: i2.DocumentService }, { token: DossierParameterService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
893
|
-
DossierListSearchService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierListSearchService });
|
|
894
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierListSearchService, decorators: [{
|
|
895
|
-
type: Injectable
|
|
896
|
-
}], ctorParameters: function () { return [{ type: DossierListService }, { type: i2.DocumentService }, { type: DossierParameterService }]; } });
|
|
897
|
-
|
|
898
|
-
/*
|
|
899
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
900
|
-
*
|
|
901
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
902
|
-
* you may not use this file except in compliance with the License.
|
|
903
|
-
* You may obtain a copy of the License at
|
|
904
|
-
*
|
|
905
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
906
|
-
*
|
|
907
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
908
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
909
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
910
|
-
* See the License for the specific language governing permissions and
|
|
911
|
-
* limitations under the License.
|
|
912
|
-
*/
|
|
913
|
-
|
|
914
|
-
/*
|
|
915
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
916
|
-
*
|
|
917
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
918
|
-
* you may not use this file except in compliance with the License.
|
|
919
|
-
* You may obtain a copy of the License at
|
|
920
|
-
*
|
|
921
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
922
|
-
*
|
|
923
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
924
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
925
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
926
|
-
* See the License for the specific language governing permissions and
|
|
927
|
-
* limitations under the License.
|
|
928
|
-
*/
|
|
929
|
-
var DefaultTabs;
|
|
930
|
-
(function (DefaultTabs) {
|
|
931
|
-
DefaultTabs["summary"] = "summary";
|
|
932
|
-
DefaultTabs["progress"] = "progress";
|
|
933
|
-
DefaultTabs["audit"] = "audit";
|
|
934
|
-
DefaultTabs["documents"] = "documents";
|
|
935
|
-
DefaultTabs["contactMoments"] = "contact-moments";
|
|
936
|
-
DefaultTabs["zaakobjecten"] = "zaakobjecten";
|
|
937
|
-
DefaultTabs["notes"] = "notes";
|
|
938
|
-
})(DefaultTabs || (DefaultTabs = {}));
|
|
939
|
-
|
|
940
|
-
/*
|
|
941
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
942
|
-
*
|
|
943
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
944
|
-
* you may not use this file except in compliance with the License.
|
|
945
|
-
* You may obtain a copy of the License at
|
|
946
|
-
*
|
|
947
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
948
|
-
*
|
|
949
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
950
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
951
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
952
|
-
* See the License for the specific language governing permissions and
|
|
953
|
-
* limitations under the License.
|
|
954
|
-
*/
|
|
955
|
-
class DossierProcessStartModalComponent {
|
|
956
|
-
constructor(route, router, processService, documentService, formLinkService, processLinkService, formFlowService, userProviderService, logger) {
|
|
957
|
-
this.route = route;
|
|
958
|
-
this.router = router;
|
|
959
|
-
this.processService = processService;
|
|
960
|
-
this.documentService = documentService;
|
|
961
|
-
this.formLinkService = formLinkService;
|
|
962
|
-
this.processLinkService = processLinkService;
|
|
963
|
-
this.formFlowService = formFlowService;
|
|
964
|
-
this.userProviderService = userProviderService;
|
|
965
|
-
this.logger = logger;
|
|
966
|
-
this.formFlowComplete = new EventEmitter();
|
|
967
|
-
}
|
|
968
|
-
ngOnInit() {
|
|
969
|
-
this.isUserAdmin();
|
|
970
|
-
}
|
|
971
|
-
loadProcessLink() {
|
|
972
|
-
this.formAssociation = null;
|
|
973
|
-
this.processLinkId = null;
|
|
974
|
-
this.formDefinition = null;
|
|
975
|
-
this.formFlowInstanceId = null;
|
|
976
|
-
this.processService
|
|
977
|
-
.getProcessDefinitionStartProcessLink(this.processDefinitionId, null, this.documentDefinitionName)
|
|
978
|
-
.pipe(take$1(1))
|
|
979
|
-
.subscribe(startProcessResult => {
|
|
980
|
-
if (startProcessResult) {
|
|
981
|
-
switch (startProcessResult.type) {
|
|
982
|
-
case 'form':
|
|
983
|
-
this.formDefinition = startProcessResult.properties.prefilledForm;
|
|
984
|
-
this.processLinkId = startProcessResult.processLinkId;
|
|
985
|
-
break;
|
|
986
|
-
case 'form-flow':
|
|
987
|
-
this.formFlowInstanceId = startProcessResult.properties.formFlowInstanceId;
|
|
988
|
-
break;
|
|
989
|
-
}
|
|
990
|
-
this.modal.show();
|
|
991
|
-
}
|
|
992
|
-
else {
|
|
993
|
-
// backwards compatibility for form associations
|
|
994
|
-
this.formLinkService
|
|
995
|
-
.getStartEventFormDefinitionByProcessDefinitionKey(this.processDefinitionKey, null)
|
|
996
|
-
.pipe(take$1(1))
|
|
997
|
-
.subscribe({
|
|
998
|
-
next: formDefinitionWithFormAssociation => this.openFormAssociation(formDefinitionWithFormAssociation),
|
|
999
|
-
error: error => {
|
|
1000
|
-
this.modal.show();
|
|
1001
|
-
},
|
|
1002
|
-
});
|
|
1003
|
-
}
|
|
1004
|
-
});
|
|
1005
|
-
}
|
|
1006
|
-
openFormAssociation(formDefinitionWithFormAssociation) {
|
|
1007
|
-
this.formAssociation = formDefinitionWithFormAssociation.formAssociation;
|
|
1008
|
-
const className = this.formAssociation.formLink.className.split('.');
|
|
1009
|
-
const linkType = className[className.length - 1];
|
|
1010
|
-
switch (linkType) {
|
|
1011
|
-
case 'BpmnElementFormIdLink':
|
|
1012
|
-
this.formDefinition = formDefinitionWithFormAssociation;
|
|
1013
|
-
this.modal.show();
|
|
1014
|
-
break;
|
|
1015
|
-
case 'BpmnElementFormFlowIdLink':
|
|
1016
|
-
this.formFlowService
|
|
1017
|
-
.createInstanceForNewProcess(this.processDefinitionKey, {
|
|
1018
|
-
documentId: null,
|
|
1019
|
-
documentDefinitionName: this.documentDefinitionName,
|
|
1020
|
-
})
|
|
1021
|
-
.subscribe(result => (this.formFlowInstanceId = result.formFlowInstanceId));
|
|
1022
|
-
this.modal.show();
|
|
1023
|
-
break;
|
|
1024
|
-
case 'BpmnElementUrlLink':
|
|
1025
|
-
const url = this.router.serializeUrl(this.router.createUrlTree([this.formAssociation.formLink.url]));
|
|
1026
|
-
window.open(url, '_blank');
|
|
1027
|
-
break;
|
|
1028
|
-
case 'BpmnElementAngularStateUrlLink':
|
|
1029
|
-
this.route.params.pipe(take$1(1)).subscribe(params => {
|
|
1030
|
-
const documentId = params?.documentId;
|
|
1031
|
-
this.router.navigate([this.formAssociation.formLink.url], {
|
|
1032
|
-
state: { ...(documentId && { documentId }) },
|
|
1033
|
-
});
|
|
1034
|
-
});
|
|
1035
|
-
break;
|
|
1036
|
-
default:
|
|
1037
|
-
this.logger.fatal('Unsupported class name');
|
|
1038
|
-
}
|
|
1039
|
-
}
|
|
1040
|
-
gotoFormLinkScreen() {
|
|
1041
|
-
this.modal.hide();
|
|
1042
|
-
this.router.navigate(['form-links'], { queryParams: { process: this.processDefinitionKey } });
|
|
1043
|
-
}
|
|
1044
|
-
get modalTitle() {
|
|
1045
|
-
return `Start - ${this.processName}`;
|
|
1046
|
-
}
|
|
1047
|
-
openModal(processDocumentDefinition) {
|
|
1048
|
-
this.processDefinitionKey = processDocumentDefinition.id.processDefinitionKey;
|
|
1049
|
-
this.processDefinitionId = processDocumentDefinition.latestVersionId;
|
|
1050
|
-
this.documentDefinitionName = processDocumentDefinition.id.documentDefinitionId.name;
|
|
1051
|
-
this.processName = processDocumentDefinition.processName;
|
|
1052
|
-
this.options = new FormioOptionsImpl();
|
|
1053
|
-
this.options.disableAlerts = true;
|
|
1054
|
-
const formioBeforeSubmit = function (submission, callback) {
|
|
1055
|
-
callback(null, submission);
|
|
1056
|
-
};
|
|
1057
|
-
this.options.setHooks(formioBeforeSubmit);
|
|
1058
|
-
this.loadProcessLink();
|
|
1059
|
-
}
|
|
1060
|
-
onSubmit(submission) {
|
|
1061
|
-
this.formioSubmission = submission;
|
|
1062
|
-
if (this.processLinkId) {
|
|
1063
|
-
this.processLinkService.submitForm(this.processLinkId, submission.data).subscribe({
|
|
1064
|
-
next: (formSubmissionResult) => {
|
|
1065
|
-
this.submitCompleted(formSubmissionResult);
|
|
1066
|
-
},
|
|
1067
|
-
error: errors => {
|
|
1068
|
-
this.form.showErrors(errors);
|
|
1069
|
-
},
|
|
1070
|
-
});
|
|
1071
|
-
}
|
|
1072
|
-
else {
|
|
1073
|
-
this.formLinkService
|
|
1074
|
-
.onSubmit(this.processDefinitionKey, this.formAssociation.formLink.id, submission.data)
|
|
1075
|
-
.subscribe((formSubmissionResult) => {
|
|
1076
|
-
this.submitCompleted(formSubmissionResult);
|
|
1077
|
-
}, errors => {
|
|
1078
|
-
this.form.showErrors(errors);
|
|
1079
|
-
});
|
|
1080
|
-
}
|
|
1081
|
-
}
|
|
1082
|
-
formFlowSubmitted() {
|
|
1083
|
-
this.formFlowComplete.emit(null);
|
|
1084
|
-
this.modal.hide();
|
|
1085
|
-
}
|
|
1086
|
-
isUserAdmin() {
|
|
1087
|
-
this.userProviderService.getUserSubject().subscribe(userIdentity => {
|
|
1088
|
-
this.isAdmin = userIdentity.roles.includes('ROLE_ADMIN');
|
|
1089
|
-
}, error => {
|
|
1090
|
-
this.isAdmin = false;
|
|
1091
|
-
});
|
|
1092
|
-
}
|
|
1093
|
-
submitCompleted(formSubmissionResult) {
|
|
1094
|
-
this.modal.hide();
|
|
1095
|
-
this.router.navigate([
|
|
1096
|
-
'dossiers',
|
|
1097
|
-
this.documentDefinitionName,
|
|
1098
|
-
'document',
|
|
1099
|
-
formSubmissionResult.documentId,
|
|
1100
|
-
'summary',
|
|
1101
|
-
]);
|
|
1102
|
-
}
|
|
1103
|
-
}
|
|
1104
|
-
DossierProcessStartModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierProcessStartModalComponent, deps: [{ token: i1$1.ActivatedRoute }, { token: i1$1.Router }, { token: i2$2.ProcessService }, { token: i2.DocumentService }, { token: i4.FormLinkService }, { token: i4.ProcessLinkService }, { token: i4.FormFlowService }, { token: i6$1.UserProviderService }, { token: i1$2.NGXLogger }], target: i0.ɵɵFactoryTarget.Component });
|
|
1105
|
-
DossierProcessStartModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: DossierProcessStartModalComponent, selector: "valtimo-dossier-process-start-modal", outputs: { formFlowComplete: "formFlowComplete" }, viewQueries: [{ propertyName: "form", first: true, predicate: ["form"], descendants: true }, { propertyName: "modal", first: true, predicate: ["processStartModal"], descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 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-modal #processStartModal elementId=\"processStartModal\" [title]=\"modalTitle\">\n <div body *ngIf=\"formDefinition\">\n <valtimo-form-io #form [form]=\"formDefinition\" [options]=\"options\" (submit)=\"onSubmit($event)\">\n </valtimo-form-io>\n </div>\n <div body *ngIf=\"formFlowInstanceId\">\n <valtimo-form-flow\n [formFlowInstanceId]=\"formFlowInstanceId\"\n (formFlowComplete)=\"formFlowSubmitted()\"\n ></valtimo-form-flow>\n </div>\n <div body *ngIf=\"!formFlowInstanceId && !formDefinition && isAdmin\">\n <div\n class=\"bg-warning text-black mb-0 p-3 text-center\"\n [translate]=\"'formManagement.noFormDefinitionFoundAdmin'\"\n ></div>\n <div class=\"mb-0 mt-4 p-3 text-center\">\n <button\n class=\"btn btn-secondary btn-space\"\n type=\"button\"\n (click)=\"gotoFormLinkScreen()\"\n id=\"form-link-button\"\n >\n {{ 'formManagement.gotoFormLinksButton' | translate }}\n </button>\n </div>\n </div>\n <div body *ngIf=\"!formFlowInstanceId && !formDefinition && !isAdmin\">\n <div\n class=\"bg-warning text-black mb-0 p-3 text-center\"\n [translate]=\"'formManagement.noFormDefinitionFoundUser'\"\n ></div>\n </div>\n</valtimo-modal>\n", styles: ["/*!\n * Copyright 2015-2023 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 */#processStartModal .formio-component-submit{text-align:right}\n"], dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$2.FormioComponent, selector: "valtimo-form-io", inputs: ["form", "options", "submission", "readOnly", "formRefresh$"], outputs: ["submit", "change"] }, { kind: "component", type: i6$2.ModalComponent, selector: "valtimo-modal", inputs: ["elementId", "title", "subtitle", "templateBelowSubtitle", "showFooter"] }, { kind: "directive", type: i6.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { kind: "component", type: i4.FormFlowComponent, selector: "valtimo-form-flow", inputs: ["formIoFormData", "formFlowInstanceId"], outputs: ["formFlowComplete"] }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None });
|
|
1106
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierProcessStartModalComponent, decorators: [{
|
|
1107
|
-
type: Component,
|
|
1108
|
-
args: [{ selector: 'valtimo-dossier-process-start-modal', encapsulation: ViewEncapsulation.None, template: "<!--\n ~ Copyright 2015-2023 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-modal #processStartModal elementId=\"processStartModal\" [title]=\"modalTitle\">\n <div body *ngIf=\"formDefinition\">\n <valtimo-form-io #form [form]=\"formDefinition\" [options]=\"options\" (submit)=\"onSubmit($event)\">\n </valtimo-form-io>\n </div>\n <div body *ngIf=\"formFlowInstanceId\">\n <valtimo-form-flow\n [formFlowInstanceId]=\"formFlowInstanceId\"\n (formFlowComplete)=\"formFlowSubmitted()\"\n ></valtimo-form-flow>\n </div>\n <div body *ngIf=\"!formFlowInstanceId && !formDefinition && isAdmin\">\n <div\n class=\"bg-warning text-black mb-0 p-3 text-center\"\n [translate]=\"'formManagement.noFormDefinitionFoundAdmin'\"\n ></div>\n <div class=\"mb-0 mt-4 p-3 text-center\">\n <button\n class=\"btn btn-secondary btn-space\"\n type=\"button\"\n (click)=\"gotoFormLinkScreen()\"\n id=\"form-link-button\"\n >\n {{ 'formManagement.gotoFormLinksButton' | translate }}\n </button>\n </div>\n </div>\n <div body *ngIf=\"!formFlowInstanceId && !formDefinition && !isAdmin\">\n <div\n class=\"bg-warning text-black mb-0 p-3 text-center\"\n [translate]=\"'formManagement.noFormDefinitionFoundUser'\"\n ></div>\n </div>\n</valtimo-modal>\n", styles: ["/*!\n * Copyright 2015-2023 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 */#processStartModal .formio-component-submit{text-align:right}\n"] }]
|
|
1109
|
-
}], ctorParameters: function () { return [{ type: i1$1.ActivatedRoute }, { type: i1$1.Router }, { type: i2$2.ProcessService }, { type: i2.DocumentService }, { type: i4.FormLinkService }, { type: i4.ProcessLinkService }, { type: i4.FormFlowService }, { type: i6$1.UserProviderService }, { type: i1$2.NGXLogger }]; }, propDecorators: { form: [{
|
|
1110
|
-
type: ViewChild,
|
|
1111
|
-
args: ['form', { static: false }]
|
|
1112
|
-
}], modal: [{
|
|
1113
|
-
type: ViewChild,
|
|
1114
|
-
args: ['processStartModal', { static: false }]
|
|
1115
|
-
}], formFlowComplete: [{
|
|
1116
|
-
type: Output
|
|
1117
|
-
}] } });
|
|
1118
|
-
|
|
1119
|
-
/*
|
|
1120
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1121
|
-
*
|
|
1122
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1123
|
-
* you may not use this file except in compliance with the License.
|
|
1124
|
-
* You may obtain a copy of the License at
|
|
1125
|
-
*
|
|
1126
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1127
|
-
*
|
|
1128
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1129
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
1130
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1131
|
-
* See the License for the specific language governing permissions and
|
|
1132
|
-
* limitations under the License.
|
|
1133
|
-
*/
|
|
1134
|
-
class DossierListActionsComponent {
|
|
1135
|
-
constructor(documentService, route, listService) {
|
|
1136
|
-
this.documentService = documentService;
|
|
1137
|
-
this.route = route;
|
|
1138
|
-
this.listService = listService;
|
|
1139
|
-
this.formFlowComplete = new EventEmitter();
|
|
1140
|
-
this.selectedProcessDocumentDefinition = null;
|
|
1141
|
-
this.modalListenerAdded = false;
|
|
1142
|
-
this._cachedAssociatedProcessDocumentDefinitions = [];
|
|
1143
|
-
this.associatedProcessDocumentDefinitions$ = this.listService.documentDefinitionName$.pipe(switchMap(documentDefinitionName => documentDefinitionName
|
|
1144
|
-
? this.documentService.findProcessDocumentDefinitions(documentDefinitionName)
|
|
1145
|
-
: of([])), map(processDocumentDefinitions => processDocumentDefinitions.filter(definition => definition.canInitializeDocument)), tap(processDocumentDefinitions => {
|
|
1146
|
-
this._cachedAssociatedProcessDocumentDefinitions = processDocumentDefinitions;
|
|
1147
|
-
}));
|
|
1148
|
-
}
|
|
1149
|
-
ngOnInit() {
|
|
1150
|
-
this.modalListenerAdded = false;
|
|
1151
|
-
}
|
|
1152
|
-
startDossier() {
|
|
1153
|
-
const associatedProcessDocumentDefinitions = this._cachedAssociatedProcessDocumentDefinitions;
|
|
1154
|
-
if (associatedProcessDocumentDefinitions.length > 1) {
|
|
1155
|
-
$('#startProcess').modal('show');
|
|
1156
|
-
}
|
|
1157
|
-
else {
|
|
1158
|
-
this.selectedProcessDocumentDefinition = associatedProcessDocumentDefinitions[0];
|
|
1159
|
-
this.showStartProcessModal();
|
|
1160
|
-
}
|
|
1161
|
-
}
|
|
1162
|
-
selectProcess(processDocumentDefinition) {
|
|
1163
|
-
const modal = $('#startProcess');
|
|
1164
|
-
if (!this.modalListenerAdded) {
|
|
1165
|
-
modal.on('hidden.bs.modal', this.showStartProcessModal.bind(this));
|
|
1166
|
-
this.modalListenerAdded = true;
|
|
1167
|
-
}
|
|
1168
|
-
this.selectedProcessDocumentDefinition = processDocumentDefinition;
|
|
1169
|
-
modal.modal('hide');
|
|
1170
|
-
}
|
|
1171
|
-
onFormFlowComplete() {
|
|
1172
|
-
this.formFlowComplete.emit(null);
|
|
1173
|
-
}
|
|
1174
|
-
showStartProcessModal() {
|
|
1175
|
-
if (this.selectedProcessDocumentDefinition !== null) {
|
|
1176
|
-
this.processStart.openModal(this.selectedProcessDocumentDefinition);
|
|
1177
|
-
this.selectedProcessDocumentDefinition = null;
|
|
1178
|
-
}
|
|
1179
|
-
}
|
|
1180
|
-
}
|
|
1181
|
-
DossierListActionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierListActionsComponent, deps: [{ token: i2.DocumentService }, { token: i1$1.ActivatedRoute }, { token: DossierListService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1182
|
-
DossierListActionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: DossierListActionsComponent, selector: "valtimo-dossier-list-actions", inputs: { loading: "loading" }, outputs: { formFlowComplete: "formFlowComplete" }, viewQueries: [{ propertyName: "processStart", first: true, predicate: ["processStartModal"], descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 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 *ngIf=\"associatedProcessDocumentDefinitions$ | async as associatedProcessDocumentDefinitions\">\n <div class=\"text-right mt-m3px mb-3\">\n <button\n type=\"button\"\n class=\"btn btn-space btn-primary mr-0\"\n (click)=\"startDossier()\"\n [ngbTooltip]=\"associatedProcessDocumentDefinitions.length === 0 ? 'No action' : null\"\n placement=\"bottom\"\n [disabled]=\"associatedProcessDocumentDefinitions.length === 0 || loading\"\n >\n <i class=\"icon mdi mdi-plus mr-1\"></i>\n {{ 'Start Dossier' | translate }}\n </button>\n </div>\n <div\n class=\"modal fade\"\n id=\"startProcess\"\n tabindex=\"-1\"\n role=\"dialog\"\n aria-labelledby=\"startProcessLabel\"\n aria-hidden=\"true\"\n >\n <div class=\"modal-dialog modal-dialog-centered\" role=\"document\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <h3 class=\"modal-title\" id=\"startProcessLabel\">\n {{ 'dashboard.startProcess.title' | translate }}\n </h3>\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n <span aria-hidden=\"true\">×</span>\n </button>\n </div>\n <div class=\"modal-body\">\n <div class=\"table-responsive\">\n <table class=\"table m-0\">\n <tr\n *ngFor=\"let processDocumentDefinition of associatedProcessDocumentDefinitions\"\n (click)=\"selectProcess(processDocumentDefinition)\"\n style=\"cursor: pointer\"\n >\n <td>{{ processDocumentDefinition.processName }}</td>\n </tr>\n </table>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-secondary\" data-dismiss=\"modal\">\n {{ 'cta.close' | translate }}\n </button>\n </div>\n </div>\n </div>\n </div>\n</div>\n\n<valtimo-dossier-process-start-modal\n #processStartModal\n (formFlowComplete)=\"onFormFlowComplete()\"\n></valtimo-dossier-process-start-modal>\n", styles: [""], dependencies: [{ kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i8.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "triggers", "container", "disableTooltip", "tooltipClass", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "component", type: DossierProcessStartModalComponent, selector: "valtimo-dossier-process-start-modal", outputs: ["formFlowComplete"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }] });
|
|
1183
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierListActionsComponent, decorators: [{
|
|
1184
|
-
type: Component,
|
|
1185
|
-
args: [{ selector: 'valtimo-dossier-list-actions', template: "<!--\n ~ Copyright 2015-2023 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 *ngIf=\"associatedProcessDocumentDefinitions$ | async as associatedProcessDocumentDefinitions\">\n <div class=\"text-right mt-m3px mb-3\">\n <button\n type=\"button\"\n class=\"btn btn-space btn-primary mr-0\"\n (click)=\"startDossier()\"\n [ngbTooltip]=\"associatedProcessDocumentDefinitions.length === 0 ? 'No action' : null\"\n placement=\"bottom\"\n [disabled]=\"associatedProcessDocumentDefinitions.length === 0 || loading\"\n >\n <i class=\"icon mdi mdi-plus mr-1\"></i>\n {{ 'Start Dossier' | translate }}\n </button>\n </div>\n <div\n class=\"modal fade\"\n id=\"startProcess\"\n tabindex=\"-1\"\n role=\"dialog\"\n aria-labelledby=\"startProcessLabel\"\n aria-hidden=\"true\"\n >\n <div class=\"modal-dialog modal-dialog-centered\" role=\"document\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <h3 class=\"modal-title\" id=\"startProcessLabel\">\n {{ 'dashboard.startProcess.title' | translate }}\n </h3>\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n <span aria-hidden=\"true\">×</span>\n </button>\n </div>\n <div class=\"modal-body\">\n <div class=\"table-responsive\">\n <table class=\"table m-0\">\n <tr\n *ngFor=\"let processDocumentDefinition of associatedProcessDocumentDefinitions\"\n (click)=\"selectProcess(processDocumentDefinition)\"\n style=\"cursor: pointer\"\n >\n <td>{{ processDocumentDefinition.processName }}</td>\n </tr>\n </table>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-secondary\" data-dismiss=\"modal\">\n {{ 'cta.close' | translate }}\n </button>\n </div>\n </div>\n </div>\n </div>\n</div>\n\n<valtimo-dossier-process-start-modal\n #processStartModal\n (formFlowComplete)=\"onFormFlowComplete()\"\n></valtimo-dossier-process-start-modal>\n" }]
|
|
1186
|
-
}], ctorParameters: function () { return [{ type: i2.DocumentService }, { type: i1$1.ActivatedRoute }, { type: DossierListService }]; }, propDecorators: { processStart: [{
|
|
1187
|
-
type: ViewChild,
|
|
1188
|
-
args: ['processStartModal']
|
|
1189
|
-
}], loading: [{
|
|
1190
|
-
type: Input
|
|
1191
|
-
}], formFlowComplete: [{
|
|
1192
|
-
type: Output
|
|
1193
|
-
}] } });
|
|
1194
|
-
|
|
1195
|
-
/*
|
|
1196
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1197
|
-
*
|
|
1198
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1199
|
-
* you may not use this file except in compliance with the License.
|
|
1200
|
-
* You may obtain a copy of the License at
|
|
1201
|
-
*
|
|
1202
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1203
|
-
*
|
|
1204
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1205
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
1206
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1207
|
-
* See the License for the specific language governing permissions and
|
|
1208
|
-
* limitations under the License.
|
|
1209
|
-
*/
|
|
1210
|
-
class DossierListComponent {
|
|
1211
|
-
constructor(route, translateService, listService, columnService, assigneeService, paginationService, searchService, parameterService, documentService, router, configService, pageTitleService, breadcrumbService) {
|
|
1212
|
-
this.route = route;
|
|
1213
|
-
this.translateService = translateService;
|
|
1214
|
-
this.listService = listService;
|
|
1215
|
-
this.columnService = columnService;
|
|
1216
|
-
this.assigneeService = assigneeService;
|
|
1217
|
-
this.paginationService = paginationService;
|
|
1218
|
-
this.searchService = searchService;
|
|
1219
|
-
this.parameterService = parameterService;
|
|
1220
|
-
this.documentService = documentService;
|
|
1221
|
-
this.router = router;
|
|
1222
|
-
this.configService = configService;
|
|
1223
|
-
this.pageTitleService = pageTitleService;
|
|
1224
|
-
this.breadcrumbService = breadcrumbService;
|
|
1225
|
-
this.loadingFields = true;
|
|
1226
|
-
this.loadingPagination = true;
|
|
1227
|
-
this.loadingSearchFields = true;
|
|
1228
|
-
this.loadingAssigneeFilter = true;
|
|
1229
|
-
this.loadingDocumentItems = true;
|
|
1230
|
-
this.visibleDossierTabs = null;
|
|
1231
|
-
this.searchFields$ = this.searchService.documentSearchFields$.pipe(tap(searchFields => {
|
|
1232
|
-
this.loadingSearchFields = false;
|
|
1233
|
-
}));
|
|
1234
|
-
this.documentDefinitionName$ = this.listService.documentDefinitionName$;
|
|
1235
|
-
this.schema$ = this.listService.documentDefinitionName$.pipe(switchMap(documentDefinitionName => this.documentService.getDocumentDefinition(documentDefinitionName)), map(documentDefinition => documentDefinition?.schema), tap(schema => {
|
|
1236
|
-
if (schema?.title) {
|
|
1237
|
-
this.pageTitleService.setCustomPageTitle(schema?.title, true);
|
|
1238
|
-
}
|
|
1239
|
-
}));
|
|
1240
|
-
this.searchFieldValues$ = this.parameterService.searchFieldValues$;
|
|
1241
|
-
this.assigneeFilter$ = this.assigneeService.assigneeFilter$;
|
|
1242
|
-
this._pagination$ = this.paginationService.pagination$.pipe(tap(pagination => {
|
|
1243
|
-
this.pagination = pagination;
|
|
1244
|
-
this.loadingPagination = false;
|
|
1245
|
-
}));
|
|
1246
|
-
this._hasEnvColumnConfig$ = this.listService.hasEnvColumnConfig$;
|
|
1247
|
-
this._hasApiColumnConfig$ = new BehaviorSubject(false);
|
|
1248
|
-
this._canHaveAssignee$ = this.assigneeService.canHaveAssignee$;
|
|
1249
|
-
this._searchSwitch$ = this.searchService.searchSwitch$;
|
|
1250
|
-
this._columns$ = this.listService.documentDefinitionName$.pipe(switchMap(documentDefinitionName => this.columnService.getDefinitionColumns(documentDefinitionName)), map(res => {
|
|
1251
|
-
this._hasApiColumnConfig$.next(res.hasApiConfig);
|
|
1252
|
-
return res.columns;
|
|
1253
|
-
}), tap(columns => {
|
|
1254
|
-
this.listService.documentDefinitionName$.pipe(take(1)).subscribe(documentDefinitionName => {
|
|
1255
|
-
this.paginationService.setPagination(documentDefinitionName, columns);
|
|
1256
|
-
});
|
|
1257
|
-
}));
|
|
1258
|
-
this.fields$ = combineLatest([
|
|
1259
|
-
this._canHaveAssignee$,
|
|
1260
|
-
this._columns$,
|
|
1261
|
-
this._hasEnvColumnConfig$,
|
|
1262
|
-
this.translateService.stream('key'),
|
|
1263
|
-
]).pipe(tap(([canHaveAssignee]) => {
|
|
1264
|
-
this.canHaveAssignee = canHaveAssignee;
|
|
1265
|
-
}), map(([canHaveAssignee, columns, hasEnvConfig]) => {
|
|
1266
|
-
const filteredAssigneeColumns = this.assigneeService.filterAssigneeColumns(columns, canHaveAssignee);
|
|
1267
|
-
const listFields = this.columnService.mapDefinitionColumnsToListFields(filteredAssigneeColumns, hasEnvConfig);
|
|
1268
|
-
const fieldsToReturn = this.assigneeService.addAssigneeListField(columns, listFields, canHaveAssignee);
|
|
1269
|
-
return fieldsToReturn;
|
|
1270
|
-
}), tap(listFields => {
|
|
1271
|
-
const defaultListField = listFields.find(field => field.default);
|
|
1272
|
-
// set default sort state if no pagination query parameters for sorting are available
|
|
1273
|
-
this.parameterService.queryPaginationParams$
|
|
1274
|
-
.pipe(take(1))
|
|
1275
|
-
.subscribe(queryPaginationParams => {
|
|
1276
|
-
if (defaultListField && !queryPaginationParams?.sort?.isSorting) {
|
|
1277
|
-
const sortDirection = typeof defaultListField.default === 'string' ? defaultListField.default : 'DESC';
|
|
1278
|
-
this.paginationService.sortChanged({
|
|
1279
|
-
isSorting: true,
|
|
1280
|
-
state: { name: defaultListField.key, direction: sortDirection },
|
|
1281
|
-
});
|
|
1282
|
-
}
|
|
1283
|
-
});
|
|
1284
|
-
}), tap(() => {
|
|
1285
|
-
this.loadingFields = false;
|
|
1286
|
-
}));
|
|
1287
|
-
this._documentSearchRequest$ = combineLatest([this._pagination$, this.listService.documentDefinitionName$]).pipe(filter(([pagination]) => !!pagination), map(([pagination, documentDefinitionName]) => new AdvancedDocumentSearchRequestImpl(documentDefinitionName, pagination.page - 1, pagination.size, pagination.sort)));
|
|
1288
|
-
this._documentsRequest$ = combineLatest([
|
|
1289
|
-
this._documentSearchRequest$,
|
|
1290
|
-
this.searchFieldValues$,
|
|
1291
|
-
this.assigneeFilter$,
|
|
1292
|
-
this._hasEnvColumnConfig$,
|
|
1293
|
-
this._hasApiColumnConfig$,
|
|
1294
|
-
this._searchSwitch$,
|
|
1295
|
-
]).pipe(distinctUntilChanged(([prevSearchRequest, prevSearchValues, prevAssigneeFilter, prevHasEnvColumnConfig, prevHasApiColumnConfig, prevSearchSwitch,], [currSearchRequest, currSearchValues, currAssigneeFilter, currHasEnvColumnConfig, currHasApiColumnConfig, currSearchSwitch,]) => JSON.stringify({ ...prevSearchRequest, ...prevSearchValues }) +
|
|
1296
|
-
prevAssigneeFilter +
|
|
1297
|
-
prevSearchSwitch ===
|
|
1298
|
-
JSON.stringify({ ...currSearchRequest, ...currSearchValues }) +
|
|
1299
|
-
currAssigneeFilter +
|
|
1300
|
-
currSearchSwitch), switchMap(([documentSearchRequest, searchValues, assigneeFilter, hasEnvColumnConfig, hasApiColumnConfig,]) => {
|
|
1301
|
-
if ((Object.keys(searchValues) || []).length > 0) {
|
|
1302
|
-
return hasEnvColumnConfig || !hasApiColumnConfig
|
|
1303
|
-
? this.documentService.getDocumentsSearch(documentSearchRequest, 'AND', assigneeFilter, this.searchService.mapSearchValuesToFilters(searchValues))
|
|
1304
|
-
: this.documentService.getSpecifiedDocumentsSearch(documentSearchRequest, 'AND', assigneeFilter, this.searchService.mapSearchValuesToFilters(searchValues));
|
|
1305
|
-
}
|
|
1306
|
-
return hasEnvColumnConfig || !hasApiColumnConfig
|
|
1307
|
-
? this.documentService.getDocumentsSearch(documentSearchRequest, 'AND', assigneeFilter)
|
|
1308
|
-
: this.documentService.getSpecifiedDocumentsSearch(documentSearchRequest, 'AND', assigneeFilter);
|
|
1309
|
-
}), tap(documents => {
|
|
1310
|
-
this.paginationService.setCollectionSize(documents);
|
|
1311
|
-
this.paginationService.checkPage(documents);
|
|
1312
|
-
}));
|
|
1313
|
-
this.documentItems$ = combineLatest([
|
|
1314
|
-
this._documentsRequest$,
|
|
1315
|
-
this._hasEnvColumnConfig$,
|
|
1316
|
-
this._hasApiColumnConfig$,
|
|
1317
|
-
]).pipe(map(([documents, hasEnvColumnConfig, hasApiColumnConfig]) => this.listService.mapDocuments(documents, hasEnvColumnConfig, hasApiColumnConfig)), tap(() => {
|
|
1318
|
-
this.loadingAssigneeFilter = false;
|
|
1319
|
-
this.loadingDocumentItems = false;
|
|
1320
|
-
}));
|
|
1321
|
-
}
|
|
1322
|
-
ngOnInit() {
|
|
1323
|
-
this.setVisibleTabs();
|
|
1324
|
-
this.openDocumentDefinitionNameSubscription();
|
|
1325
|
-
}
|
|
1326
|
-
ngOnDestroy() {
|
|
1327
|
-
this._documentDefinitionNameSubscription?.unsubscribe();
|
|
1328
|
-
this.pageTitleService.enableReset();
|
|
1329
|
-
}
|
|
1330
|
-
search(searchFieldValues) {
|
|
1331
|
-
this.searchService.search(searchFieldValues);
|
|
1332
|
-
}
|
|
1333
|
-
rowClick(document) {
|
|
1334
|
-
this.listService.documentDefinitionName$.pipe(take(1)).subscribe(documentDefinitionName => {
|
|
1335
|
-
this.breadcrumbService.cacheQueryParams(`/dossiers/${documentDefinitionName}`, this.route.snapshot.queryParams);
|
|
1336
|
-
this.router.navigate([
|
|
1337
|
-
`/dossiers/${documentDefinitionName}/document/${document.id}/${DefaultTabs.summary}`,
|
|
1338
|
-
]);
|
|
1339
|
-
});
|
|
1340
|
-
}
|
|
1341
|
-
pageChange(newPage) {
|
|
1342
|
-
this.paginationService.pageChange(newPage);
|
|
1343
|
-
}
|
|
1344
|
-
pageSizeChange(newPageSize) {
|
|
1345
|
-
this.paginationService.pageSizeChange(newPageSize);
|
|
1346
|
-
}
|
|
1347
|
-
sortChanged(newSortState) {
|
|
1348
|
-
this.paginationService.sortChanged(newSortState);
|
|
1349
|
-
}
|
|
1350
|
-
tabChange(tab) {
|
|
1351
|
-
this.paginationService.setPage(1);
|
|
1352
|
-
this.assigneeService.setAssigneeFilter(tab.nextId.toUpperCase());
|
|
1353
|
-
}
|
|
1354
|
-
refresh() {
|
|
1355
|
-
this.searchService.refresh();
|
|
1356
|
-
}
|
|
1357
|
-
openDocumentDefinitionNameSubscription() {
|
|
1358
|
-
this._documentDefinitionNameSubscription = this.route.params
|
|
1359
|
-
.pipe(map(params => params?.documentDefinitionName), filter(docDefName => !!docDefName), distinctUntilChanged())
|
|
1360
|
-
.subscribe(documentDefinitonName => {
|
|
1361
|
-
if (this._previousDocumentDefinitionName) {
|
|
1362
|
-
this.parameterService.clearParameters();
|
|
1363
|
-
this.parameterService.clearSearchFieldValues();
|
|
1364
|
-
}
|
|
1365
|
-
this._previousDocumentDefinitionName = documentDefinitonName;
|
|
1366
|
-
this.setLoading();
|
|
1367
|
-
this.paginationService.clearPagination();
|
|
1368
|
-
this.assigneeService.resetAssigneeFilter();
|
|
1369
|
-
this.listService.setDocumentDefinitionName(documentDefinitonName);
|
|
1370
|
-
});
|
|
1371
|
-
}
|
|
1372
|
-
setLoading() {
|
|
1373
|
-
this.loadingFields = true;
|
|
1374
|
-
this.loadingPagination = true;
|
|
1375
|
-
this.loadingSearchFields = true;
|
|
1376
|
-
this.loadingAssigneeFilter = true;
|
|
1377
|
-
this.loadingDocumentItems = true;
|
|
1378
|
-
}
|
|
1379
|
-
setVisibleTabs() {
|
|
1380
|
-
this.visibleDossierTabs = this.configService.config?.visibleDossierListTabs || null;
|
|
1381
|
-
}
|
|
1382
|
-
}
|
|
1383
|
-
DossierListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierListComponent, deps: [{ token: i1$1.ActivatedRoute }, { token: i6.TranslateService }, { token: DossierListService }, { token: DossierColumnService }, { token: DossierListAssigneeService }, { token: DossierListPaginationService }, { token: DossierListSearchService }, { token: DossierParameterService }, { token: i2.DocumentService }, { token: i1$1.Router }, { token: i1.ConfigService }, { token: i6$2.PageTitleService }, { token: i6$2.BreadcrumbService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1384
|
-
DossierListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: DossierListComponent, selector: "valtimo-dossier-list", providers: [
|
|
1385
|
-
DossierListService,
|
|
1386
|
-
DossierColumnService,
|
|
1387
|
-
DossierListAssigneeService,
|
|
1388
|
-
DossierParameterService,
|
|
1389
|
-
DossierListPaginationService,
|
|
1390
|
-
DossierListSearchService,
|
|
1391
|
-
], ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 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 fields: fields$ | async,\n documentItems: documentItems$ | async,\n searchFields: searchFields$ | async,\n schema: schema$ | async,\n loaded:\n !loadingFields &&\n !loadingPagination &&\n !loadingSearchFields &&\n !loadingAssigneeFilter &&\n !loadingDocumentItems\n } as obs\"\n>\n <div class=\"main-content pt-0\">\n <div class=\"container-fluid\">\n <div class=\"col-12 px-0 mb-5\">\n <valtimo-dossier-list-actions\n [loading]=\"!obs.loaded\"\n (formFlowComplete)=\"refresh()\"\n ></valtimo-dossier-list-actions>\n <ng-container *ngIf=\"obs.loaded; else loading\">\n <ng-container *ngTemplateOutlet=\"searchFields; context: {obs: obs}\"></ng-container>\n <ng-container *ngTemplateOutlet=\"list; context: {obs: obs}\"></ng-container>\n </ng-container>\n </div>\n </div>\n </div>\n</ng-container>\n\n<ng-template #searchFields let-obs=\"obs\">\n <div class=\"mb-3\">\n <valtimo-search-fields\n [searchFields]=\"obs.searchFields\"\n (doSearch)=\"search($event)\"\n [documentDefinitionName]=\"documentDefinitionName$ | async\"\n [defaultValues]=\"searchFieldValues$ | async\"\n ></valtimo-search-fields>\n </div>\n</ng-template>\n\n<ng-template #list let-obs=\"obs\">\n <valtimo-widget>\n <valtimo-list\n [items]=\"obs.documentItems\"\n [fields]=\"obs.fields\"\n (rowClicked)=\"rowClick($event)\"\n [pagination]=\"pagination\"\n [viewMode]=\"true\"\n [header]=\"true\"\n paginationIdentifier=\"dossierList\"\n (paginationClicked)=\"pageChange($event)\"\n (paginationSet)=\"pageSizeChange($event)\"\n [initialSortState]=\"pagination.sort\"\n (sortChanged)=\"sortChanged($event)\"\n >\n <div header>\n <h3 class=\"list-header-title\">\n <sup class=\"ml-1 badge badge-pill badge-primary\">{{\n pagination?.collectionSize || 0\n }}</sup>\n </h3>\n </div>\n <div tabs *ngIf=\"canHaveAssignee\">\n <ng-container *ngTemplateOutlet=\"tabs\"></ng-container>\n </div>\n </valtimo-list>\n </valtimo-widget>\n</ng-template>\n\n<ng-template #tabs>\n <ng-container *ngIf=\"assigneeFilter$ | async as assigneeFilter\">\n <ul\n *ngIf=\"visibleDossierTabs === null; else configuredTabs\"\n ngbNav\n [destroyOnHide]=\"false\"\n (navChange)=\"tabChange($event)\"\n class=\"nav-tabs\"\n [activeId]=\"assigneeFilter\"\n >\n <li ngbNavItem=\"ALL\" [title]=\"'dossier.tabs.ALL' | translate\">\n <a ngbNavLink>{{ 'dossier.tabs.ALL' | translate }}</a>\n </li>\n <li ngbNavItem=\"MINE\" [title]=\"'dossier.tabs.MINE' | translate\">\n <a ngbNavLink>{{ 'dossier.tabs.MINE' | translate }}</a>\n </li>\n <li ngbNavItem=\"OPEN\" [title]=\"'dossier.tabs.OPEN' | translate\">\n <a ngbNavLink>{{ 'dossier.tabs.OPEN' | translate }}</a>\n </li>\n </ul>\n </ng-container>\n</ng-template>\n\n<ng-template #configuredTabs>\n <ng-container *ngIf=\"assigneeFilter$ | async as assigneeFilter\">\n <ul\n ngbNav\n [destroyOnHide]=\"false\"\n (navChange)=\"tabChange($event)\"\n class=\"nav-tabs\"\n [activeId]=\"assigneeFilter\"\n >\n <li\n *ngFor=\"let tab of visibleDossierTabs\"\n [ngbNavItem]=\"tab\"\n [title]=\"'dossier.tabs.' + tab | translate\"\n >\n <a ngbNavLink>{{ 'dossier.tabs.' + tab | translate }}</a>\n </li>\n </ul>\n </ng-container>\n</ng-template>\n\n<ng-template #loading><valtimo-spinner></valtimo-spinner></ng-template>\n", styles: [""], dependencies: [{ kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i6$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: i6$2.WidgetComponent, selector: "valtimo-widget", inputs: ["type", "name", "icon", "contrast", "divider", "title", "subtitle", "collapseAble", "collapse", "additionalClasses"] }, { kind: "component", type: i6$2.SpinnerComponent, selector: "valtimo-spinner", inputs: ["useBootstrapSpinner", "name", "type", "size", "color", "bdColor", "fullScreen", "noMarginTop"] }, { kind: "component", type: i6$2.SearchFieldsComponent, selector: "valtimo-search-fields", inputs: ["loading", "searchFields", "documentDefinitionName", "setValuesSubject$", "defaultValues"], outputs: ["doSearch"] }, { kind: "directive", type: i8.NgbNav, selector: "[ngbNav]", inputs: ["activeId", "animation", "destroyOnHide", "orientation", "roles", "keyboard"], outputs: ["activeIdChange", "shown", "hidden", "navChange"], exportAs: ["ngbNav"] }, { kind: "directive", type: i8.NgbNavItem, selector: "[ngbNavItem]", inputs: ["destroyOnHide", "disabled", "domId", "ngbNavItem"], outputs: ["shown", "hidden"], exportAs: ["ngbNavItem"] }, { kind: "directive", type: i8.NgbNavLink, selector: "a[ngbNavLink]" }, { kind: "component", type: DossierListActionsComponent, selector: "valtimo-dossier-list-actions", inputs: ["loading"], outputs: ["formFlowComplete"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }] });
|
|
1392
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierListComponent, decorators: [{
|
|
1393
|
-
type: Component,
|
|
1394
|
-
args: [{ selector: 'valtimo-dossier-list', providers: [
|
|
1395
|
-
DossierListService,
|
|
1396
|
-
DossierColumnService,
|
|
1397
|
-
DossierListAssigneeService,
|
|
1398
|
-
DossierParameterService,
|
|
1399
|
-
DossierListPaginationService,
|
|
1400
|
-
DossierListSearchService,
|
|
1401
|
-
], template: "<!--\n ~ Copyright 2015-2023 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 fields: fields$ | async,\n documentItems: documentItems$ | async,\n searchFields: searchFields$ | async,\n schema: schema$ | async,\n loaded:\n !loadingFields &&\n !loadingPagination &&\n !loadingSearchFields &&\n !loadingAssigneeFilter &&\n !loadingDocumentItems\n } as obs\"\n>\n <div class=\"main-content pt-0\">\n <div class=\"container-fluid\">\n <div class=\"col-12 px-0 mb-5\">\n <valtimo-dossier-list-actions\n [loading]=\"!obs.loaded\"\n (formFlowComplete)=\"refresh()\"\n ></valtimo-dossier-list-actions>\n <ng-container *ngIf=\"obs.loaded; else loading\">\n <ng-container *ngTemplateOutlet=\"searchFields; context: {obs: obs}\"></ng-container>\n <ng-container *ngTemplateOutlet=\"list; context: {obs: obs}\"></ng-container>\n </ng-container>\n </div>\n </div>\n </div>\n</ng-container>\n\n<ng-template #searchFields let-obs=\"obs\">\n <div class=\"mb-3\">\n <valtimo-search-fields\n [searchFields]=\"obs.searchFields\"\n (doSearch)=\"search($event)\"\n [documentDefinitionName]=\"documentDefinitionName$ | async\"\n [defaultValues]=\"searchFieldValues$ | async\"\n ></valtimo-search-fields>\n </div>\n</ng-template>\n\n<ng-template #list let-obs=\"obs\">\n <valtimo-widget>\n <valtimo-list\n [items]=\"obs.documentItems\"\n [fields]=\"obs.fields\"\n (rowClicked)=\"rowClick($event)\"\n [pagination]=\"pagination\"\n [viewMode]=\"true\"\n [header]=\"true\"\n paginationIdentifier=\"dossierList\"\n (paginationClicked)=\"pageChange($event)\"\n (paginationSet)=\"pageSizeChange($event)\"\n [initialSortState]=\"pagination.sort\"\n (sortChanged)=\"sortChanged($event)\"\n >\n <div header>\n <h3 class=\"list-header-title\">\n <sup class=\"ml-1 badge badge-pill badge-primary\">{{\n pagination?.collectionSize || 0\n }}</sup>\n </h3>\n </div>\n <div tabs *ngIf=\"canHaveAssignee\">\n <ng-container *ngTemplateOutlet=\"tabs\"></ng-container>\n </div>\n </valtimo-list>\n </valtimo-widget>\n</ng-template>\n\n<ng-template #tabs>\n <ng-container *ngIf=\"assigneeFilter$ | async as assigneeFilter\">\n <ul\n *ngIf=\"visibleDossierTabs === null; else configuredTabs\"\n ngbNav\n [destroyOnHide]=\"false\"\n (navChange)=\"tabChange($event)\"\n class=\"nav-tabs\"\n [activeId]=\"assigneeFilter\"\n >\n <li ngbNavItem=\"ALL\" [title]=\"'dossier.tabs.ALL' | translate\">\n <a ngbNavLink>{{ 'dossier.tabs.ALL' | translate }}</a>\n </li>\n <li ngbNavItem=\"MINE\" [title]=\"'dossier.tabs.MINE' | translate\">\n <a ngbNavLink>{{ 'dossier.tabs.MINE' | translate }}</a>\n </li>\n <li ngbNavItem=\"OPEN\" [title]=\"'dossier.tabs.OPEN' | translate\">\n <a ngbNavLink>{{ 'dossier.tabs.OPEN' | translate }}</a>\n </li>\n </ul>\n </ng-container>\n</ng-template>\n\n<ng-template #configuredTabs>\n <ng-container *ngIf=\"assigneeFilter$ | async as assigneeFilter\">\n <ul\n ngbNav\n [destroyOnHide]=\"false\"\n (navChange)=\"tabChange($event)\"\n class=\"nav-tabs\"\n [activeId]=\"assigneeFilter\"\n >\n <li\n *ngFor=\"let tab of visibleDossierTabs\"\n [ngbNavItem]=\"tab\"\n [title]=\"'dossier.tabs.' + tab | translate\"\n >\n <a ngbNavLink>{{ 'dossier.tabs.' + tab | translate }}</a>\n </li>\n </ul>\n </ng-container>\n</ng-template>\n\n<ng-template #loading><valtimo-spinner></valtimo-spinner></ng-template>\n" }]
|
|
1402
|
-
}], ctorParameters: function () { return [{ type: i1$1.ActivatedRoute }, { type: i6.TranslateService }, { type: DossierListService }, { type: DossierColumnService }, { type: DossierListAssigneeService }, { type: DossierListPaginationService }, { type: DossierListSearchService }, { type: DossierParameterService }, { type: i2.DocumentService }, { type: i1$1.Router }, { type: i1.ConfigService }, { type: i6$2.PageTitleService }, { type: i6$2.BreadcrumbService }]; } });
|
|
1403
|
-
|
|
1404
|
-
/*
|
|
1405
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1406
|
-
*
|
|
1407
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1408
|
-
* you may not use this file except in compliance with the License.
|
|
1409
|
-
* You may obtain a copy of the License at
|
|
1410
|
-
*
|
|
1411
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1412
|
-
*
|
|
1413
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1414
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
1415
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1416
|
-
* See the License for the specific language governing permissions and
|
|
1417
|
-
* limitations under the License.
|
|
1418
|
-
*/
|
|
1419
|
-
moment.locale(localStorage.getItem('langKey') || '');
|
|
1420
|
-
moment.defaultFormat = 'DD MMM YYYY HH:mm';
|
|
1421
|
-
class DossierDetailTabSummaryComponent {
|
|
1422
|
-
constructor(router, documentService, taskService, processService, el, renderer, route, formService, userProviderService) {
|
|
1423
|
-
this.router = router;
|
|
1424
|
-
this.documentService = documentService;
|
|
1425
|
-
this.taskService = taskService;
|
|
1426
|
-
this.processService = processService;
|
|
1427
|
-
this.el = el;
|
|
1428
|
-
this.renderer = renderer;
|
|
1429
|
-
this.route = route;
|
|
1430
|
-
this.formService = formService;
|
|
1431
|
-
this.userProviderService = userProviderService;
|
|
1432
|
-
this.processDocumentInstances = [];
|
|
1433
|
-
this.tasks = [];
|
|
1434
|
-
this.formDefinition = null;
|
|
1435
|
-
this.roles = [];
|
|
1436
|
-
this._subscriptions = new Subscription();
|
|
1437
|
-
this.snapshot = this.route.snapshot.paramMap;
|
|
1438
|
-
this.documentDefinitionName = this.snapshot.get('documentDefinitionName') || '';
|
|
1439
|
-
this.documentId = this.snapshot.get('documentId') || '';
|
|
1440
|
-
this.options = new FormioOptionsImpl();
|
|
1441
|
-
this.options.disableAlerts = true;
|
|
1442
|
-
}
|
|
1443
|
-
ngOnInit() {
|
|
1444
|
-
this.moment = moment;
|
|
1445
|
-
this.init();
|
|
1446
|
-
}
|
|
1447
|
-
ngOnDestroy() {
|
|
1448
|
-
this._subscriptions.unsubscribe();
|
|
1449
|
-
}
|
|
1450
|
-
init() {
|
|
1451
|
-
this._subscriptions.add(this.documentService.getDocument(this.documentId).subscribe(document => {
|
|
1452
|
-
this.document = document;
|
|
1453
|
-
}));
|
|
1454
|
-
this._subscriptions.add(this.formService
|
|
1455
|
-
.getFormDefinitionByNamePreFilled(`${this.documentDefinitionName}.summary`, this.documentId)
|
|
1456
|
-
.subscribe(formDefinition => {
|
|
1457
|
-
this.formDefinition = formDefinition;
|
|
1458
|
-
}));
|
|
1459
|
-
this._subscriptions.add(this.userProviderService.getUserSubject().subscribe(user => {
|
|
1460
|
-
this.roles = user.roles;
|
|
1461
|
-
this.tasks = [];
|
|
1462
|
-
this.loadProcessDocumentInstances(this.documentId);
|
|
1463
|
-
}));
|
|
1464
|
-
}
|
|
1465
|
-
loadProcessDocumentInstances(documentId) {
|
|
1466
|
-
this._subscriptions.add(this.documentService
|
|
1467
|
-
.findProcessDocumentInstances(documentId)
|
|
1468
|
-
.subscribe(processDocumentInstances => {
|
|
1469
|
-
this.processDocumentInstances = processDocumentInstances;
|
|
1470
|
-
this.processDocumentInstances.forEach(instance => {
|
|
1471
|
-
this.loadProcessInstanceTasks(instance.id.processInstanceId);
|
|
1472
|
-
});
|
|
1473
|
-
}));
|
|
1474
|
-
}
|
|
1475
|
-
loadProcessInstanceTasks(processInstanceId) {
|
|
1476
|
-
this._subscriptions.add(this.processService.getProcessInstanceTasks(processInstanceId).subscribe(tasks => {
|
|
1477
|
-
if (tasks != null) {
|
|
1478
|
-
tasks.forEach(task => {
|
|
1479
|
-
task.createdUnix = this.moment(task.created).unix();
|
|
1480
|
-
task.created = this.moment(task.created).format('DD MMM YYYY HH:mm');
|
|
1481
|
-
task.isLocked = () => {
|
|
1482
|
-
let locked = true;
|
|
1483
|
-
for (const link of task.identityLinks) {
|
|
1484
|
-
if (link.type === 'candidate' && link.groupId) {
|
|
1485
|
-
if (this.roles.includes(link.groupId)) {
|
|
1486
|
-
locked = false;
|
|
1487
|
-
break;
|
|
1488
|
-
}
|
|
1489
|
-
}
|
|
1490
|
-
}
|
|
1491
|
-
return locked;
|
|
1492
|
-
};
|
|
1493
|
-
});
|
|
1494
|
-
this.tasks = this.tasks.concat(tasks);
|
|
1495
|
-
this.tasks.sort((t1, t2) => t2.createdUnix - t1.createdUnix);
|
|
1496
|
-
}
|
|
1497
|
-
}));
|
|
1498
|
-
}
|
|
1499
|
-
rowTaskClick(task) {
|
|
1500
|
-
this.taskDetail.openTaskDetails(task);
|
|
1501
|
-
}
|
|
1502
|
-
}
|
|
1503
|
-
DossierDetailTabSummaryComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierDetailTabSummaryComponent, deps: [{ token: i1$1.Router }, { token: i2.DocumentService }, { token: i3.TaskService }, { token: i2$2.ProcessService }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i1$1.ActivatedRoute }, { token: i5$1.FormService }, { token: i6$1.UserProviderService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1504
|
-
DossierDetailTabSummaryComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: DossierDetailTabSummaryComponent, selector: "valtimo-dossier-detail-tab-summary", viewQueries: [{ propertyName: "taskDetail", first: true, predicate: ["taskDetail"], descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 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=\"container-fluid\">\n <div class=\"row py-4\">\n <div class=\"col-sm-12 col-md-8 col-xl-9\">\n <div *ngIf=\"document\">\n <div *ngIf=\"formDefinition\" class=\"summaryForm\">\n <div class=\"mb-4\">\n <valtimo-form-io [form]=\"formDefinition\" [options]=\"options\"></valtimo-form-io>\n </div>\n </div>\n </div>\n </div>\n\n <!--Current user tasks right side-->\n <div class=\"col-sm-12 col-md-4 col-xl-3\">\n <h4 class=\"user-tasks-title\">{{ 'summary.userTasks' | translate }}</h4>\n <ng-container *ngIf=\"!tasks.length\">\n <valtimo-widget>\n <div class=\"p-3\">\n <img class=\"float-left\" src=\"assets/audit-2.png\" height=\"25\" />\n <span class=\"float-right\">{{ 'summary.userTasksDoneState' | translate }}</span>\n <div class=\"clearfix\"></div>\n </div>\n </valtimo-widget>\n </ng-container>\n <ng-container *ngFor=\"let task of tasks\">\n <valtimo-widget>\n <div\n class=\"p-3 clickable hoverable\"\n (click)=\"rowTaskClick(task)\"\n *ngIf=\"!task.isLocked()\"\n >\n <span class=\"float-right badge badge-pill badge-primary\">{{\n 'summary.taskOpen' | translate\n }}</span>\n <strong>{{ task.name }}</strong>\n <div class=\"mt-1\">{{ 'summary.taskCreated' | translate }} {{ task.created }}</div>\n </div>\n <div class=\"p-3 hoverable\" *ngIf=\"task.isLocked()\">\n <span\n class=\"float-right badge badge-pill badge-secondary bg-grey\"\n ngbTooltip=\"{{ 'summary.taskLocked' | translate }}\"\n >\n <i class=\"icon mdi mdi-lock\"></i>\n </span>\n <strong>{{ task.name }}</strong>\n <div>{{ 'summary.taskCreated' | translate }} {{ task.created }}</div>\n </div>\n </valtimo-widget>\n </ng-container>\n <valtimo-task-detail-modal\n #taskDetail\n (formSubmit)=\"init()\"\n (assignmentOfTaskChanged)=\"init()\"\n ></valtimo-task-detail-modal>\n </div>\n </div>\n</div>\n", styles: ["/*!\n * Copyright 2015-2023 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 */.hoverable:hover{background-color:#eee}.summaryForm .formio-component{margin-bottom:0!important}.summaryForm .formio-component div[ref=element] .form-control{height:24px!important;background-color:#fff;border:0px;margin:0;padding:0!important;font-size:13px}.summaryForm .formio-field div[ref=element] .form-control{font-weight:400}.summaryForm .formio-value div[ref=element] .form-control{font-weight:700}.user-tasks-title{margin-top:0;margin-bottom:12px;font-weight:400;color:#000;height:20px}\n"], dependencies: [{ kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$2.WidgetComponent, selector: "valtimo-widget", inputs: ["type", "name", "icon", "contrast", "divider", "title", "subtitle", "collapseAble", "collapse", "additionalClasses"] }, { kind: "component", type: i6$2.FormioComponent, selector: "valtimo-form-io", inputs: ["form", "options", "submission", "readOnly", "formRefresh$"], outputs: ["submit", "change"] }, { kind: "component", type: i3.TaskDetailModalComponent, selector: "valtimo-task-detail-modal", outputs: ["formSubmit", "assignmentOfTaskChanged"] }, { kind: "directive", type: i8.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "triggers", "container", "disableTooltip", "tooltipClass", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None });
|
|
1505
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierDetailTabSummaryComponent, decorators: [{
|
|
1506
|
-
type: Component,
|
|
1507
|
-
args: [{ selector: 'valtimo-dossier-detail-tab-summary', encapsulation: ViewEncapsulation.None, template: "<!--\n ~ Copyright 2015-2023 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=\"container-fluid\">\n <div class=\"row py-4\">\n <div class=\"col-sm-12 col-md-8 col-xl-9\">\n <div *ngIf=\"document\">\n <div *ngIf=\"formDefinition\" class=\"summaryForm\">\n <div class=\"mb-4\">\n <valtimo-form-io [form]=\"formDefinition\" [options]=\"options\"></valtimo-form-io>\n </div>\n </div>\n </div>\n </div>\n\n <!--Current user tasks right side-->\n <div class=\"col-sm-12 col-md-4 col-xl-3\">\n <h4 class=\"user-tasks-title\">{{ 'summary.userTasks' | translate }}</h4>\n <ng-container *ngIf=\"!tasks.length\">\n <valtimo-widget>\n <div class=\"p-3\">\n <img class=\"float-left\" src=\"assets/audit-2.png\" height=\"25\" />\n <span class=\"float-right\">{{ 'summary.userTasksDoneState' | translate }}</span>\n <div class=\"clearfix\"></div>\n </div>\n </valtimo-widget>\n </ng-container>\n <ng-container *ngFor=\"let task of tasks\">\n <valtimo-widget>\n <div\n class=\"p-3 clickable hoverable\"\n (click)=\"rowTaskClick(task)\"\n *ngIf=\"!task.isLocked()\"\n >\n <span class=\"float-right badge badge-pill badge-primary\">{{\n 'summary.taskOpen' | translate\n }}</span>\n <strong>{{ task.name }}</strong>\n <div class=\"mt-1\">{{ 'summary.taskCreated' | translate }} {{ task.created }}</div>\n </div>\n <div class=\"p-3 hoverable\" *ngIf=\"task.isLocked()\">\n <span\n class=\"float-right badge badge-pill badge-secondary bg-grey\"\n ngbTooltip=\"{{ 'summary.taskLocked' | translate }}\"\n >\n <i class=\"icon mdi mdi-lock\"></i>\n </span>\n <strong>{{ task.name }}</strong>\n <div>{{ 'summary.taskCreated' | translate }} {{ task.created }}</div>\n </div>\n </valtimo-widget>\n </ng-container>\n <valtimo-task-detail-modal\n #taskDetail\n (formSubmit)=\"init()\"\n (assignmentOfTaskChanged)=\"init()\"\n ></valtimo-task-detail-modal>\n </div>\n </div>\n</div>\n", styles: ["/*!\n * Copyright 2015-2023 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 */.hoverable:hover{background-color:#eee}.summaryForm .formio-component{margin-bottom:0!important}.summaryForm .formio-component div[ref=element] .form-control{height:24px!important;background-color:#fff;border:0px;margin:0;padding:0!important;font-size:13px}.summaryForm .formio-field div[ref=element] .form-control{font-weight:400}.summaryForm .formio-value div[ref=element] .form-control{font-weight:700}.user-tasks-title{margin-top:0;margin-bottom:12px;font-weight:400;color:#000;height:20px}\n"] }]
|
|
1508
|
-
}], ctorParameters: function () { return [{ type: i1$1.Router }, { type: i2.DocumentService }, { type: i3.TaskService }, { type: i2$2.ProcessService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i1$1.ActivatedRoute }, { type: i5$1.FormService }, { type: i6$1.UserProviderService }]; }, propDecorators: { taskDetail: [{
|
|
1509
|
-
type: ViewChild,
|
|
1510
|
-
args: ['taskDetail']
|
|
1511
|
-
}] } });
|
|
1512
|
-
|
|
1513
|
-
/*
|
|
1514
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1515
|
-
*
|
|
1516
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1517
|
-
* you may not use this file except in compliance with the License.
|
|
1518
|
-
* You may obtain a copy of the License at
|
|
1519
|
-
*
|
|
1520
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1521
|
-
*
|
|
1522
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1523
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
1524
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1525
|
-
* See the License for the specific language governing permissions and
|
|
1526
|
-
* limitations under the License.
|
|
1527
|
-
*/
|
|
1528
|
-
class DossierDetailTabProgressComponent {
|
|
1529
|
-
constructor(route, documentService) {
|
|
1530
|
-
this.route = route;
|
|
1531
|
-
this.documentService = documentService;
|
|
1532
|
-
const snapshot = this.route.snapshot.paramMap;
|
|
1533
|
-
this.documentId = snapshot.get('documentId') || '';
|
|
1534
|
-
}
|
|
1535
|
-
ngOnInit() {
|
|
1536
|
-
this.documentService
|
|
1537
|
-
.findProcessDocumentInstances(this.documentId)
|
|
1538
|
-
.subscribe(processDocumentInstances => {
|
|
1539
|
-
this.processDocumentInstances = processDocumentInstances.sort((a, b) => a.isActive === b.isActive ? 0 : a.isActive ? -1 : 1);
|
|
1540
|
-
if (processDocumentInstances.length > 0) {
|
|
1541
|
-
this.selectedProcessInstanceId = processDocumentInstances[0].id.processInstanceId;
|
|
1542
|
-
}
|
|
1543
|
-
});
|
|
1544
|
-
}
|
|
1545
|
-
loadProcessInstance(processInstanceId) {
|
|
1546
|
-
this.selectedProcessInstanceId = processInstanceId;
|
|
1547
|
-
}
|
|
1548
|
-
}
|
|
1549
|
-
DossierDetailTabProgressComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierDetailTabProgressComponent, deps: [{ token: i1$1.ActivatedRoute }, { token: i2.DocumentService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1550
|
-
DossierDetailTabProgressComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: DossierDetailTabProgressComponent, selector: "valtimo-dossier-detail-tab-progress", ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 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=\"full-height-tab-content\"\n *ngIf=\"\n processDocumentInstances && processDocumentInstances.length > 0;\n else emptyProcessDocumentInstances\n \"\n>\n <div class=\"col-3\">\n <label><strong>Process</strong></label\n ><br />\n <select class=\"form-control\" (change)=\"loadProcessInstance($event.target.value)\">\n <option\n *ngFor=\"let processDocumentInstance of processDocumentInstances\"\n [value]=\"processDocumentInstance.id.processInstanceId\"\n [selected]=\"selectedProcessInstanceId === processDocumentInstance.id.processInstanceId\"\n >\n {{ processDocumentInstance.processName }}\n </option>\n </select>\n </div>\n <valtimo-process-diagram\n [processInstanceId]=\"selectedProcessInstanceId\"\n ></valtimo-process-diagram>\n</div>\n\n<ng-template #emptyProcessDocumentInstances>\n <span> {{ 'progress.noProcessDocumentInstances' | translate }}</span>\n</ng-template>\n", styles: [".full-height-tab-content{height:calc(100vh - 380px);width:100%}\n"], dependencies: [{ kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$2.ProcessDiagramComponent, selector: "valtimo-process-diagram", inputs: ["processDefinitionKey", "processInstanceId"], outputs: ["importDone"] }, { kind: "directive", type: i5$2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i5$2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }] });
|
|
1551
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierDetailTabProgressComponent, decorators: [{
|
|
1552
|
-
type: Component,
|
|
1553
|
-
args: [{ selector: 'valtimo-dossier-detail-tab-progress', template: "<!--\n ~ Copyright 2015-2023 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=\"full-height-tab-content\"\n *ngIf=\"\n processDocumentInstances && processDocumentInstances.length > 0;\n else emptyProcessDocumentInstances\n \"\n>\n <div class=\"col-3\">\n <label><strong>Process</strong></label\n ><br />\n <select class=\"form-control\" (change)=\"loadProcessInstance($event.target.value)\">\n <option\n *ngFor=\"let processDocumentInstance of processDocumentInstances\"\n [value]=\"processDocumentInstance.id.processInstanceId\"\n [selected]=\"selectedProcessInstanceId === processDocumentInstance.id.processInstanceId\"\n >\n {{ processDocumentInstance.processName }}\n </option>\n </select>\n </div>\n <valtimo-process-diagram\n [processInstanceId]=\"selectedProcessInstanceId\"\n ></valtimo-process-diagram>\n</div>\n\n<ng-template #emptyProcessDocumentInstances>\n <span> {{ 'progress.noProcessDocumentInstances' | translate }}</span>\n</ng-template>\n", styles: [".full-height-tab-content{height:calc(100vh - 380px);width:100%}\n"] }]
|
|
1554
|
-
}], ctorParameters: function () { return [{ type: i1$1.ActivatedRoute }, { type: i2.DocumentService }]; } });
|
|
1555
|
-
|
|
1556
|
-
/*
|
|
1557
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1558
|
-
*
|
|
1559
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1560
|
-
* you may not use this file except in compliance with the License.
|
|
1561
|
-
* You may obtain a copy of the License at
|
|
1562
|
-
*
|
|
1563
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1564
|
-
*
|
|
1565
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1566
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
1567
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1568
|
-
* See the License for the specific language governing permissions and
|
|
1569
|
-
* limitations under the License.
|
|
1570
|
-
*/
|
|
1571
|
-
moment.locale(localStorage.getItem('langKey') || '');
|
|
1572
|
-
moment.defaultFormat = 'DD MMM YYYY HH:mm';
|
|
1573
|
-
class DossierDetailTabAuditComponent {
|
|
1574
|
-
constructor(route, documentService, spinnerService) {
|
|
1575
|
-
this.route = route;
|
|
1576
|
-
this.documentService = documentService;
|
|
1577
|
-
this.spinnerService = spinnerService;
|
|
1578
|
-
this.paginationClicked = new EventEmitter();
|
|
1579
|
-
this.defaultAuditPage = 0;
|
|
1580
|
-
this.spinnerService.show('auditSpinner');
|
|
1581
|
-
const snapshot = this.route.snapshot.paramMap;
|
|
1582
|
-
this.documentId = snapshot.get('documentId') || '';
|
|
1583
|
-
}
|
|
1584
|
-
static getTranslationKey(auditEvent) {
|
|
1585
|
-
const classNameArray = auditEvent.className.split('.');
|
|
1586
|
-
const eventName = classNameArray[classNameArray.length - 1];
|
|
1587
|
-
return 'events.' + eventName;
|
|
1588
|
-
}
|
|
1589
|
-
ngOnInit() {
|
|
1590
|
-
this.loadAuditPage(this.defaultAuditPage);
|
|
1591
|
-
}
|
|
1592
|
-
loadAuditPage(pageNumber) {
|
|
1593
|
-
this.documentService.getAuditLog(this.documentId, pageNumber).subscribe(page => {
|
|
1594
|
-
const timelineItems = [];
|
|
1595
|
-
page.content.forEach(auditRecord => {
|
|
1596
|
-
const occurredOn = moment(auditRecord.metaData.occurredOn);
|
|
1597
|
-
const fromNow = occurredOn.fromNow();
|
|
1598
|
-
timelineItems.push(new TimelineItemImpl(occurredOn.format('DD MMM YYYY'), occurredOn.format('HH:mm'), auditRecord.metaData.user, fromNow, DossierDetailTabAuditComponent.getTranslationKey(auditRecord.auditEvent), auditRecord.auditEvent));
|
|
1599
|
-
});
|
|
1600
|
-
this.timelineItems = timelineItems;
|
|
1601
|
-
this.spinnerService.hide('auditSpinner');
|
|
1602
|
-
this.pagination = page;
|
|
1603
|
-
this.pagination.number += 1;
|
|
1604
|
-
});
|
|
1605
|
-
}
|
|
1606
|
-
onChangePagination(page) {
|
|
1607
|
-
this.paginationClicked.emit(page);
|
|
1608
|
-
this.currentAuditPage = page - 1;
|
|
1609
|
-
this.loadAuditPage(this.currentAuditPage);
|
|
1610
|
-
}
|
|
1611
|
-
}
|
|
1612
|
-
DossierDetailTabAuditComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierDetailTabAuditComponent, deps: [{ token: i1$1.ActivatedRoute }, { token: i2.DocumentService }, { token: i3$1.NgxSpinnerService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1613
|
-
DossierDetailTabAuditComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: DossierDetailTabAuditComponent, selector: "valtimo-dossier-detail-tab-audit", outputs: { paginationClicked: "paginationClicked" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 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 *ngIf=\"timelineItems\">\n <valtimo-timeline [items]=\"timelineItems\"></valtimo-timeline>\n</div>\n<valtimo-spinner\n [useBootstrapSpinner]=\"false\"\n name=\"auditSpinner\"\n bdColor=\"rgba(125, 125, 125, 0.35)\"\n color=\"#264251\"\n type=\"square-jelly-box\"\n>\n</valtimo-spinner>\n<div\n class=\"pagination-holder audit-pagination bg-light px-4 pt-4 pb-2 overflow-auto row mr-0 ml-0\"\n *ngIf=\"pagination && pagination.totalElements > pagination.size\"\n>\n <div class=\"float-left page-count col-4\">\n <strong>{{\n 'list.currentPage' | translate : {current: pagination.number, total: pagination.totalPages}\n }}</strong>\n <br />\n {{\n pagination.totalElements === 1\n ? ('list.showingResult' | translate : {number: pagination.content.length})\n : ('list.showingResults'\n | translate : {number: pagination.content.length, total: pagination.totalElements})\n }}\n </div>\n <div class=\"col-8\">\n <ngb-pagination\n *ngIf=\"pagination.totalElements > pagination.size\"\n class=\"float-right\"\n [collectionSize]=\"pagination.totalElements\"\n [(page)]=\"pagination.number\"\n [pageSize]=\"pagination.size\"\n [maxSize]=\"pagination.size\"\n [rotate]=\"true\"\n (pageChange)=\"onChangePagination(pagination.number)\"\n ></ngb-pagination>\n </div>\n</div>\n", styles: [".audit-pagination{margin:0 -1.923rem -1.923rem!important;border-top:1px solid #dee2e6}\n"], dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$2.TimelineComponent, selector: "valtimo-timeline", inputs: ["items", "actions"] }, { kind: "component", type: i6$2.SpinnerComponent, selector: "valtimo-spinner", inputs: ["useBootstrapSpinner", "name", "type", "size", "color", "bdColor", "fullScreen", "noMarginTop"] }, { kind: "component", type: i8.NgbPagination, selector: "ngb-pagination", inputs: ["disabled", "boundaryLinks", "directionLinks", "ellipses", "rotate", "collectionSize", "maxSize", "page", "pageSize", "size"], outputs: ["pageChange"] }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }] });
|
|
1614
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierDetailTabAuditComponent, decorators: [{
|
|
1615
|
-
type: Component,
|
|
1616
|
-
args: [{ selector: 'valtimo-dossier-detail-tab-audit', template: "<!--\n ~ Copyright 2015-2023 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 *ngIf=\"timelineItems\">\n <valtimo-timeline [items]=\"timelineItems\"></valtimo-timeline>\n</div>\n<valtimo-spinner\n [useBootstrapSpinner]=\"false\"\n name=\"auditSpinner\"\n bdColor=\"rgba(125, 125, 125, 0.35)\"\n color=\"#264251\"\n type=\"square-jelly-box\"\n>\n</valtimo-spinner>\n<div\n class=\"pagination-holder audit-pagination bg-light px-4 pt-4 pb-2 overflow-auto row mr-0 ml-0\"\n *ngIf=\"pagination && pagination.totalElements > pagination.size\"\n>\n <div class=\"float-left page-count col-4\">\n <strong>{{\n 'list.currentPage' | translate : {current: pagination.number, total: pagination.totalPages}\n }}</strong>\n <br />\n {{\n pagination.totalElements === 1\n ? ('list.showingResult' | translate : {number: pagination.content.length})\n : ('list.showingResults'\n | translate : {number: pagination.content.length, total: pagination.totalElements})\n }}\n </div>\n <div class=\"col-8\">\n <ngb-pagination\n *ngIf=\"pagination.totalElements > pagination.size\"\n class=\"float-right\"\n [collectionSize]=\"pagination.totalElements\"\n [(page)]=\"pagination.number\"\n [pageSize]=\"pagination.size\"\n [maxSize]=\"pagination.size\"\n [rotate]=\"true\"\n (pageChange)=\"onChangePagination(pagination.number)\"\n ></ngb-pagination>\n </div>\n</div>\n", styles: [".audit-pagination{margin:0 -1.923rem -1.923rem!important;border-top:1px solid #dee2e6}\n"] }]
|
|
1617
|
-
}], ctorParameters: function () { return [{ type: i1$1.ActivatedRoute }, { type: i2.DocumentService }, { type: i3$1.NgxSpinnerService }]; }, propDecorators: { paginationClicked: [{
|
|
1618
|
-
type: Output
|
|
1619
|
-
}] } });
|
|
1620
|
-
|
|
1621
|
-
/*
|
|
1622
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1623
|
-
*
|
|
1624
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1625
|
-
* you may not use this file except in compliance with the License.
|
|
1626
|
-
* You may obtain a copy of the License at
|
|
1627
|
-
*
|
|
1628
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1629
|
-
*
|
|
1630
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1631
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
1632
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1633
|
-
* See the License for the specific language governing permissions and
|
|
1634
|
-
* limitations under the License.
|
|
1635
|
-
*/
|
|
1636
|
-
class DossierDetailTabDocumentenApiDocumentsComponent {
|
|
1637
|
-
constructor(route, documentService, toastrService, uploadProviderService, downloadService, promptService, translateService, configService, userProviderService, fileSortService) {
|
|
1638
|
-
this.route = route;
|
|
1639
|
-
this.documentService = documentService;
|
|
1640
|
-
this.toastrService = toastrService;
|
|
1641
|
-
this.uploadProviderService = uploadProviderService;
|
|
1642
|
-
this.downloadService = downloadService;
|
|
1643
|
-
this.promptService = promptService;
|
|
1644
|
-
this.translateService = translateService;
|
|
1645
|
-
this.configService = configService;
|
|
1646
|
-
this.userProviderService = userProviderService;
|
|
1647
|
-
this.fileSortService = fileSortService;
|
|
1648
|
-
this.maxFileSize = this.configService?.config?.caseFileSizeUploadLimitMB || 5;
|
|
1649
|
-
this.acceptedFiles = this.configService?.config?.caseFileUploadAcceptedFiles || null;
|
|
1650
|
-
this.fields = [
|
|
1651
|
-
{ key: 'fileName', label: 'File name' },
|
|
1652
|
-
{ key: 'sizeInBytes', label: 'Size in bytes' },
|
|
1653
|
-
{ key: 'createdOn', label: 'Created on' },
|
|
1654
|
-
{ key: 'createdBy', label: 'Created by' },
|
|
1655
|
-
];
|
|
1656
|
-
this.uploadProcessLinkedSet = false;
|
|
1657
|
-
this.uploading$ = new BehaviorSubject(false);
|
|
1658
|
-
this.showModal$ = new Subject();
|
|
1659
|
-
this.hideModal$ = new Subject();
|
|
1660
|
-
this.modalDisabled$ = new BehaviorSubject(false);
|
|
1661
|
-
this.fileToBeUploaded$ = new BehaviorSubject(null);
|
|
1662
|
-
this.loading$ = new BehaviorSubject(true);
|
|
1663
|
-
this.refetch$ = new BehaviorSubject(null);
|
|
1664
|
-
this.relatedFiles$ = this.refetch$.pipe(switchMap$1(() => combineLatest([
|
|
1665
|
-
this.documentService.getZakenApiDocuments(this.documentId),
|
|
1666
|
-
this.translateService.stream('key'),
|
|
1667
|
-
])), map$1(([relatedFiles]) => {
|
|
1668
|
-
const translatedFiles = relatedFiles?.map(file => ({
|
|
1669
|
-
...file,
|
|
1670
|
-
createdBy: file.createdBy || this.translateService.instant('list.automaticallyGenerated'),
|
|
1671
|
-
}));
|
|
1672
|
-
return translatedFiles || [];
|
|
1673
|
-
}), map$1(relatedFiles => this.fileSortService.sortRelatedFilesByDateDescending(relatedFiles)), map$1(relatedFiles => {
|
|
1674
|
-
moment.locale(this.translateService.currentLang);
|
|
1675
|
-
return relatedFiles.map(file => ({
|
|
1676
|
-
...file,
|
|
1677
|
-
createdOn: moment(new Date(file.createdOn)).format('L'),
|
|
1678
|
-
}));
|
|
1679
|
-
}), tap$1(() => this.loading$.next(false)), catchError(() => {
|
|
1680
|
-
this.showZaakLinkWarning = true;
|
|
1681
|
-
return of([]);
|
|
1682
|
-
}));
|
|
1683
|
-
this.downloadingFileIndexes$ = new BehaviorSubject([]);
|
|
1684
|
-
const snapshot = this.route.snapshot.paramMap;
|
|
1685
|
-
this.documentId = snapshot.get('documentId') || '';
|
|
1686
|
-
this.documentDefinitionName = snapshot.get('documentDefinitionName') || '';
|
|
1687
|
-
}
|
|
1688
|
-
ngOnInit() {
|
|
1689
|
-
this.refetchDocuments();
|
|
1690
|
-
this.setUploadProcessLinked();
|
|
1691
|
-
this.isUserAdmin();
|
|
1692
|
-
}
|
|
1693
|
-
fileSelected(file) {
|
|
1694
|
-
this.fileToBeUploaded$.next(file);
|
|
1695
|
-
this.showModal$.next(null);
|
|
1696
|
-
}
|
|
1697
|
-
downloadDocument(relatedFile, index) {
|
|
1698
|
-
this.downloadingFileIndexes$.pipe(take$1(1)).subscribe(indexes => {
|
|
1699
|
-
this.downloadingFileIndexes$.next([...indexes, index]);
|
|
1700
|
-
const finished$ = this.downloadService.downloadFile(`/api/v1/documenten-api/${relatedFile.pluginConfigurationId}/files/${relatedFile.fileId}/download`, relatedFile.fileName);
|
|
1701
|
-
finished$.pipe(take$1(1)).subscribe(() => {
|
|
1702
|
-
this.downloadingFileIndexes$.next(this.downloadingFileIndexes$.getValue().filter(downloadIndex => downloadIndex !== index));
|
|
1703
|
-
});
|
|
1704
|
-
});
|
|
1705
|
-
}
|
|
1706
|
-
metadataSet(metadata) {
|
|
1707
|
-
this.uploading$.next(true);
|
|
1708
|
-
this.hideModal$.next(null);
|
|
1709
|
-
this.fileToBeUploaded$
|
|
1710
|
-
.pipe(take$1(1))
|
|
1711
|
-
.pipe(tap$1(file => {
|
|
1712
|
-
this.uploadProviderService
|
|
1713
|
-
.uploadFileWithMetadata(file, this.documentId, metadata)
|
|
1714
|
-
.subscribe(res => {
|
|
1715
|
-
this.refetchDocuments();
|
|
1716
|
-
this.uploading$.next(false);
|
|
1717
|
-
this.fileToBeUploaded$.next(null);
|
|
1718
|
-
});
|
|
1719
|
-
}))
|
|
1720
|
-
.subscribe();
|
|
1721
|
-
}
|
|
1722
|
-
indexesIncludeIndex(indexes, index) {
|
|
1723
|
-
return indexes.includes(index);
|
|
1724
|
-
}
|
|
1725
|
-
isUserAdmin() {
|
|
1726
|
-
this.userProviderService.getUserSubject().subscribe(userIdentity => {
|
|
1727
|
-
this.isAdmin = userIdentity.roles.includes('ROLE_ADMIN');
|
|
1728
|
-
}, error => {
|
|
1729
|
-
this.isAdmin = false;
|
|
1730
|
-
});
|
|
1731
|
-
}
|
|
1732
|
-
refetchDocuments() {
|
|
1733
|
-
this.refetch$.next(null);
|
|
1734
|
-
}
|
|
1735
|
-
setUploadProcessLinked() {
|
|
1736
|
-
this.uploadProviderService.checkUploadProcessLink(this.documentDefinitionName).subscribe(linked => {
|
|
1737
|
-
this.uploadProcessLinked = linked;
|
|
1738
|
-
this.uploadProcessLinkedSet = true;
|
|
1739
|
-
}, () => {
|
|
1740
|
-
this.uploadProcessLinkedSet = true;
|
|
1741
|
-
});
|
|
1742
|
-
}
|
|
1743
|
-
}
|
|
1744
|
-
DossierDetailTabDocumentenApiDocumentsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierDetailTabDocumentenApiDocumentsComponent, deps: [{ token: i1$1.ActivatedRoute }, { token: i2.DocumentService }, { token: i3$2.ToastrService }, { token: i4$1.UploadProviderService }, { token: i4$1.DownloadService }, { token: i3$3.PromptService }, { token: i6.TranslateService }, { token: i1.ConfigService }, { token: i6$1.UserProviderService }, { token: FileSortService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1745
|
-
DossierDetailTabDocumentenApiDocumentsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: DossierDetailTabDocumentenApiDocumentsComponent, selector: "valtimo-dossier-detail-tab-documenten-api-documents", ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 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=\"{loading: loading$ | async} as obs\">\n <div *ngIf=\"uploadProcessLinkedSet && !uploadProcessLinked\">\n <div\n *ngIf=\"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=\"!isAdmin\"\n [translate]=\"'dossier.documenten.noProcessLinked.regularUser'\"\n class=\"bg-warning text-black mb-2 p-3 text-center\"\n ></div>\n </div>\n <div *ngIf=\"showZaakLinkWarning\">\n <div\n [translate]=\"'dossier.documenten.noZaakFound'\"\n class=\"bg-warning text-black mb-2 p-3 text-center\"\n ></div>\n </div>\n\n <valtimo-dropzone\n *ngIf=\"!obs.loading\"\n (fileSelected)=\"fileSelected($event)\"\n [acceptedFiles]=\"acceptedFiles\"\n [camera]=\"false\"\n [disabled]=\"\n !uploadProcessLinkedSet || !uploadProcessLinked || obs.loading || showZaakLinkWarning\n \"\n [hideFilePreview]=\"true\"\n [hideTitle]=\"true\"\n [maxFileSize]=\"maxFileSize\"\n [maxFiles]=\"1\"\n [showMaxFileSize]=\"true\"\n [uploading]=\"uploading$ | async\"\n ></valtimo-dropzone>\n\n <valtimo-widget>\n <valtimo-list\n [ngClass]=\"{hidden: obs.loading}\"\n [fields]=\"fields\"\n [header]=\"true\"\n [isSearchable]=\"true\"\n [items]=\"relatedFiles$ | async\"\n [viewMode]=\"true\"\n [lastColumnTemplate]=\"downloadButton\"\n >\n <div header>\n <h3 class=\"list-header-title\">{{ 'Related documents' | translate }}</h3>\n <h5 class=\"list-header-description\">\n {{ 'Overview of all documents in this dossier' | translate }}\n </h5>\n </div>\n </valtimo-list>\n <ng-container *ngTemplateOutlet=\"loading; context: {loading: obs.loading}\"></ng-container>\n </valtimo-widget>\n</ng-container>\n\n<valtimo-documenten-api-metadata-modal\n (metadata)=\"metadataSet($event)\"\n [disabled$]=\"modalDisabled$\"\n [file$]=\"fileToBeUploaded$\"\n [hide$]=\"hideModal$\"\n [show$]=\"showModal$\"\n></valtimo-documenten-api-metadata-modal>\n\n<ng-template #loading let-loading=\"loading\">\n <div *ngIf=\"loading\" class=\"loading-container\">\n <cds-loading></cds-loading>\n </div>\n</ng-template>\n\n<ng-template #downloadButton let-item=\"item\" let-index=\"index\">\n <div\n class=\"download-button-container\"\n *ngIf=\"{isDownloading: indexesIncludeIndex(downloadingFileIndexes$ | async, index)} as vars\"\n >\n <button\n *ngIf=\"!vars.isDownloading\"\n cdsButton=\"primary\"\n size=\"sm\"\n (click)=\"downloadDocument(item, index)\"\n >\n {{ 'interface.download' | translate\n }}<svg class=\"cds--btn__icon\" cdsIcon=\"download\" size=\"16\"></svg>\n </button>\n <cds-loading size=\"sm\" *ngIf=\"vars.isDownloading\"></cds-loading>\n </div>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2023 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 */.hidden{display:none}.loading-container{padding:var(--cds-grid-margin);display:flex;align-items:center;justify-content:center}.download-button-container{display:flex;width:100%;flex-direction:row;justify-content:flex-end;align-items:center;min-height:32px}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i6$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: i6$2.WidgetComponent, selector: "valtimo-widget", inputs: ["type", "name", "icon", "contrast", "divider", "title", "subtitle", "collapseAble", "collapse", "additionalClasses"] }, { kind: "directive", type: i6.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { kind: "component", type: i6$2.DropzoneComponent, selector: "valtimo-dropzone", inputs: ["title", "hideTitle", "subtitle", "externalError$", "maxFileSize", "showMaxFileSize", "acceptedFiles", "clear$", "disabled", "hideFilePreview", "uploading", "camera", "maxFiles"], outputs: ["fileSelected"] }, { kind: "component", type: i6$2.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"], outputs: ["metadata"] }, { kind: "component", type: i12.Loading, selector: "cds-loading, ibm-loading", inputs: ["title", "isActive", "size", "overlay"] }, { kind: "directive", type: i12.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "directive", type: i12.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }] });
|
|
1746
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierDetailTabDocumentenApiDocumentsComponent, decorators: [{
|
|
1747
|
-
type: Component,
|
|
1748
|
-
args: [{ selector: 'valtimo-dossier-detail-tab-documenten-api-documents', template: "<!--\n ~ Copyright 2015-2023 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=\"{loading: loading$ | async} as obs\">\n <div *ngIf=\"uploadProcessLinkedSet && !uploadProcessLinked\">\n <div\n *ngIf=\"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=\"!isAdmin\"\n [translate]=\"'dossier.documenten.noProcessLinked.regularUser'\"\n class=\"bg-warning text-black mb-2 p-3 text-center\"\n ></div>\n </div>\n <div *ngIf=\"showZaakLinkWarning\">\n <div\n [translate]=\"'dossier.documenten.noZaakFound'\"\n class=\"bg-warning text-black mb-2 p-3 text-center\"\n ></div>\n </div>\n\n <valtimo-dropzone\n *ngIf=\"!obs.loading\"\n (fileSelected)=\"fileSelected($event)\"\n [acceptedFiles]=\"acceptedFiles\"\n [camera]=\"false\"\n [disabled]=\"\n !uploadProcessLinkedSet || !uploadProcessLinked || obs.loading || showZaakLinkWarning\n \"\n [hideFilePreview]=\"true\"\n [hideTitle]=\"true\"\n [maxFileSize]=\"maxFileSize\"\n [maxFiles]=\"1\"\n [showMaxFileSize]=\"true\"\n [uploading]=\"uploading$ | async\"\n ></valtimo-dropzone>\n\n <valtimo-widget>\n <valtimo-list\n [ngClass]=\"{hidden: obs.loading}\"\n [fields]=\"fields\"\n [header]=\"true\"\n [isSearchable]=\"true\"\n [items]=\"relatedFiles$ | async\"\n [viewMode]=\"true\"\n [lastColumnTemplate]=\"downloadButton\"\n >\n <div header>\n <h3 class=\"list-header-title\">{{ 'Related documents' | translate }}</h3>\n <h5 class=\"list-header-description\">\n {{ 'Overview of all documents in this dossier' | translate }}\n </h5>\n </div>\n </valtimo-list>\n <ng-container *ngTemplateOutlet=\"loading; context: {loading: obs.loading}\"></ng-container>\n </valtimo-widget>\n</ng-container>\n\n<valtimo-documenten-api-metadata-modal\n (metadata)=\"metadataSet($event)\"\n [disabled$]=\"modalDisabled$\"\n [file$]=\"fileToBeUploaded$\"\n [hide$]=\"hideModal$\"\n [show$]=\"showModal$\"\n></valtimo-documenten-api-metadata-modal>\n\n<ng-template #loading let-loading=\"loading\">\n <div *ngIf=\"loading\" class=\"loading-container\">\n <cds-loading></cds-loading>\n </div>\n</ng-template>\n\n<ng-template #downloadButton let-item=\"item\" let-index=\"index\">\n <div\n class=\"download-button-container\"\n *ngIf=\"{isDownloading: indexesIncludeIndex(downloadingFileIndexes$ | async, index)} as vars\"\n >\n <button\n *ngIf=\"!vars.isDownloading\"\n cdsButton=\"primary\"\n size=\"sm\"\n (click)=\"downloadDocument(item, index)\"\n >\n {{ 'interface.download' | translate\n }}<svg class=\"cds--btn__icon\" cdsIcon=\"download\" size=\"16\"></svg>\n </button>\n <cds-loading size=\"sm\" *ngIf=\"vars.isDownloading\"></cds-loading>\n </div>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2023 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 */.hidden{display:none}.loading-container{padding:var(--cds-grid-margin);display:flex;align-items:center;justify-content:center}.download-button-container{display:flex;width:100%;flex-direction:row;justify-content:flex-end;align-items:center;min-height:32px}\n"] }]
|
|
1749
|
-
}], ctorParameters: function () { return [{ type: i1$1.ActivatedRoute }, { type: i2.DocumentService }, { type: i3$2.ToastrService }, { type: i4$1.UploadProviderService }, { type: i4$1.DownloadService }, { type: i3$3.PromptService }, { type: i6.TranslateService }, { type: i1.ConfigService }, { type: i6$1.UserProviderService }, { type: FileSortService }]; } });
|
|
1750
|
-
|
|
1751
|
-
/*
|
|
1752
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1753
|
-
*
|
|
1754
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1755
|
-
* you may not use this file except in compliance with the License.
|
|
1756
|
-
* You may obtain a copy of the License at
|
|
1757
|
-
*
|
|
1758
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1759
|
-
*
|
|
1760
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1761
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
1762
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1763
|
-
* See the License for the specific language governing permissions and
|
|
1764
|
-
* limitations under the License.
|
|
1765
|
-
*/
|
|
1766
|
-
class DossierDetailTabS3DocumentsComponent {
|
|
1767
|
-
constructor(route, documentService, toastrService, uploadProviderService, downloadService, promptService, translateService, configService, fileSortService) {
|
|
1768
|
-
this.route = route;
|
|
1769
|
-
this.documentService = documentService;
|
|
1770
|
-
this.toastrService = toastrService;
|
|
1771
|
-
this.uploadProviderService = uploadProviderService;
|
|
1772
|
-
this.downloadService = downloadService;
|
|
1773
|
-
this.promptService = promptService;
|
|
1774
|
-
this.translateService = translateService;
|
|
1775
|
-
this.configService = configService;
|
|
1776
|
-
this.fileSortService = fileSortService;
|
|
1777
|
-
this.maxFileSize = this.configService?.config?.caseFileSizeUploadLimitMB || 5;
|
|
1778
|
-
this.acceptedFiles = this.configService?.config?.caseFileUploadAcceptedFiles || null;
|
|
1779
|
-
this.fields = [
|
|
1780
|
-
{ key: 'fileName', label: 'File name' },
|
|
1781
|
-
{ key: 'sizeInBytes', label: 'Size in bytes' },
|
|
1782
|
-
{ key: 'createdOn', label: 'Created on', viewType: 'date' },
|
|
1783
|
-
{ key: 'createdBy', label: 'Created by' },
|
|
1784
|
-
];
|
|
1785
|
-
this.actions = [
|
|
1786
|
-
{
|
|
1787
|
-
columnName: '',
|
|
1788
|
-
iconClass: 'mdi mdi-open-in-new',
|
|
1789
|
-
callback: this.downloadDocument.bind(this),
|
|
1790
|
-
},
|
|
1791
|
-
{
|
|
1792
|
-
columnName: '',
|
|
1793
|
-
iconClass: 'mdi mdi-delete',
|
|
1794
|
-
callback: this.removeRelatedFile.bind(this),
|
|
1795
|
-
},
|
|
1796
|
-
];
|
|
1797
|
-
this.uploading$ = new BehaviorSubject(false);
|
|
1798
|
-
this.refetch$ = new BehaviorSubject(null);
|
|
1799
|
-
this.relatedFiles$ = this.refetch$.pipe(switchMap$1(() => combineLatest([
|
|
1800
|
-
this.documentService.getDocument(this.documentId),
|
|
1801
|
-
this.translateService.stream('key'),
|
|
1802
|
-
])), map$1(([document]) => {
|
|
1803
|
-
const relatedFiles = document?.relatedFiles || [];
|
|
1804
|
-
const translatedFiles = relatedFiles.map(file => ({
|
|
1805
|
-
...file,
|
|
1806
|
-
createdBy: file.createdBy || this.translateService.instant('list.automaticallyGenerated'),
|
|
1807
|
-
}));
|
|
1808
|
-
return translatedFiles || [];
|
|
1809
|
-
}), map$1(relatedFiles => this.fileSortService.sortRelatedFilesByDateDescending(relatedFiles)));
|
|
1810
|
-
const snapshot = this.route.snapshot.paramMap;
|
|
1811
|
-
this.documentId = snapshot.get('documentId') || '';
|
|
1812
|
-
this.documentDefinitionName = snapshot.get('documentDefinitionName') || '';
|
|
1813
|
-
}
|
|
1814
|
-
ngOnInit() {
|
|
1815
|
-
this.refetchDocuments();
|
|
1816
|
-
}
|
|
1817
|
-
fileSelected(file) {
|
|
1818
|
-
this.uploading$.next(true);
|
|
1819
|
-
this.uploadProviderService
|
|
1820
|
-
.uploadFile(file, this.documentDefinitionName)
|
|
1821
|
-
.pipe(switchMap$1(resourceFile => this.documentService.assignResource(this.documentId, resourceFile.data.resourceId)))
|
|
1822
|
-
.subscribe(() => {
|
|
1823
|
-
this.toastrService.success('Successfully uploaded document to dossier');
|
|
1824
|
-
this.refetchDocuments();
|
|
1825
|
-
this.uploading$.next(false);
|
|
1826
|
-
}, () => {
|
|
1827
|
-
this.toastrService.error('Failed to upload document to dossier');
|
|
1828
|
-
this.uploading$.next(false);
|
|
1829
|
-
});
|
|
1830
|
-
}
|
|
1831
|
-
downloadDocument(relatedFile) {
|
|
1832
|
-
this.uploadProviderService
|
|
1833
|
-
.getResource(relatedFile.fileId)
|
|
1834
|
-
.subscribe((resource) => {
|
|
1835
|
-
this.downloadService.downloadFile(resource.url, resource.resource.name);
|
|
1836
|
-
});
|
|
1837
|
-
}
|
|
1838
|
-
removeRelatedFile(relatedFile) {
|
|
1839
|
-
this.promptService.openPrompt({
|
|
1840
|
-
headerText: this.translateService.instant('dossier.deleteConfirmation.title'),
|
|
1841
|
-
bodyText: this.translateService.instant('dossier.deleteConfirmation.description'),
|
|
1842
|
-
cancelButtonText: this.translateService.instant('dossier.deleteConfirmation.cancel'),
|
|
1843
|
-
confirmButtonText: this.translateService.instant('dossier.deleteConfirmation.delete'),
|
|
1844
|
-
cancelMdiIcon: 'cancel',
|
|
1845
|
-
confirmMdiIcon: 'delete',
|
|
1846
|
-
cancelButtonType: 'secondary',
|
|
1847
|
-
confirmButtonType: 'primary',
|
|
1848
|
-
closeOnConfirm: true,
|
|
1849
|
-
closeOnCancel: true,
|
|
1850
|
-
confirmCallBackFunction: () => {
|
|
1851
|
-
this.documentService.removeResource(this.documentId, relatedFile.fileId).subscribe(() => {
|
|
1852
|
-
this.toastrService.success('Successfully removed document from dossier');
|
|
1853
|
-
this.refetchDocuments();
|
|
1854
|
-
}, () => {
|
|
1855
|
-
this.toastrService.error('Failed to remove document from dossier');
|
|
1856
|
-
});
|
|
1857
|
-
},
|
|
1858
|
-
});
|
|
1859
|
-
}
|
|
1860
|
-
refetchDocuments() {
|
|
1861
|
-
this.refetch$.next(null);
|
|
1862
|
-
}
|
|
1863
|
-
}
|
|
1864
|
-
DossierDetailTabS3DocumentsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierDetailTabS3DocumentsComponent, deps: [{ token: i1$1.ActivatedRoute }, { token: i2.DocumentService }, { token: i3$2.ToastrService }, { token: i4$1.UploadProviderService }, { token: i4$1.DownloadService }, { token: i3$3.PromptService }, { token: i6.TranslateService }, { token: i1.ConfigService }, { token: FileSortService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1865
|
-
DossierDetailTabS3DocumentsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: DossierDetailTabS3DocumentsComponent, selector: "valtimo-dossier-detail-tab-s3-documents", ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 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-dropzone\n (fileSelected)=\"fileSelected($event)\"\n [acceptedFiles]=\"acceptedFiles\"\n [hideFilePreview]=\"true\"\n [hideTitle]=\"true\"\n [maxFileSize]=\"maxFileSize\"\n [showMaxFileSize]=\"true\"\n [camera]=\"false\"\n [uploading]=\"uploading$ | async\"\n></valtimo-dropzone>\n\n<valtimo-widget>\n <valtimo-list\n [fields]=\"fields\"\n [items]=\"relatedFiles$ | async\"\n [header]=\"true\"\n [isSearchable]=\"true\"\n [viewMode]=\"true\"\n [actions]=\"actions\"\n >\n <div header>\n <h3 class=\"list-header-title\">{{ 'Related documents' | translate }}</h3>\n <h5 class=\"list-header-description\">\n {{ 'Overview of all documents in this dossier' | translate }}\n </h5>\n </div>\n </valtimo-list>\n</valtimo-widget>\n", styles: ["/*!\n * Copyright 2015-2023 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: "component", type: i6$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: i6$2.WidgetComponent, selector: "valtimo-widget", inputs: ["type", "name", "icon", "contrast", "divider", "title", "subtitle", "collapseAble", "collapse", "additionalClasses"] }, { kind: "component", type: i6$2.DropzoneComponent, selector: "valtimo-dropzone", inputs: ["title", "hideTitle", "subtitle", "externalError$", "maxFileSize", "showMaxFileSize", "acceptedFiles", "clear$", "disabled", "hideFilePreview", "uploading", "camera", "maxFiles"], outputs: ["fileSelected"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }] });
|
|
1866
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierDetailTabS3DocumentsComponent, decorators: [{
|
|
1867
|
-
type: Component,
|
|
1868
|
-
args: [{ selector: 'valtimo-dossier-detail-tab-s3-documents', template: "<!--\n ~ Copyright 2015-2023 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-dropzone\n (fileSelected)=\"fileSelected($event)\"\n [acceptedFiles]=\"acceptedFiles\"\n [hideFilePreview]=\"true\"\n [hideTitle]=\"true\"\n [maxFileSize]=\"maxFileSize\"\n [showMaxFileSize]=\"true\"\n [camera]=\"false\"\n [uploading]=\"uploading$ | async\"\n></valtimo-dropzone>\n\n<valtimo-widget>\n <valtimo-list\n [fields]=\"fields\"\n [items]=\"relatedFiles$ | async\"\n [header]=\"true\"\n [isSearchable]=\"true\"\n [viewMode]=\"true\"\n [actions]=\"actions\"\n >\n <div header>\n <h3 class=\"list-header-title\">{{ 'Related documents' | translate }}</h3>\n <h5 class=\"list-header-description\">\n {{ 'Overview of all documents in this dossier' | translate }}\n </h5>\n </div>\n </valtimo-list>\n</valtimo-widget>\n", styles: ["/*!\n * Copyright 2015-2023 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"] }]
|
|
1869
|
-
}], ctorParameters: function () { return [{ type: i1$1.ActivatedRoute }, { type: i2.DocumentService }, { type: i3$2.ToastrService }, { type: i4$1.UploadProviderService }, { type: i4$1.DownloadService }, { type: i3$3.PromptService }, { type: i6.TranslateService }, { type: i1.ConfigService }, { type: FileSortService }]; } });
|
|
1870
|
-
|
|
1871
|
-
/*
|
|
1872
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1873
|
-
*
|
|
1874
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1875
|
-
* you may not use this file except in compliance with the License.
|
|
1876
|
-
* You may obtain a copy of the License at
|
|
1877
|
-
*
|
|
1878
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1879
|
-
*
|
|
1880
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1881
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
1882
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1883
|
-
* See the License for the specific language governing permissions and
|
|
1884
|
-
* limitations under the License.
|
|
1885
|
-
*/
|
|
1886
|
-
class DossierDetailTabDocumentsComponent {
|
|
1887
|
-
constructor(configService) {
|
|
1888
|
-
this.configService = configService;
|
|
1889
|
-
this.setConfig(configService.config);
|
|
1890
|
-
}
|
|
1891
|
-
setConfig(config) {
|
|
1892
|
-
const uploadProvider = config.uploadProvider;
|
|
1893
|
-
this.openZaakUploadProvider = uploadProvider === UploadProvider.OPEN_ZAAK;
|
|
1894
|
-
this.documentenApiUploadProvider = uploadProvider === UploadProvider.DOCUMENTEN_API;
|
|
1895
|
-
this.s3UploadProvider = config.uploadProvider === UploadProvider.S3;
|
|
1896
|
-
}
|
|
1897
|
-
}
|
|
1898
|
-
DossierDetailTabDocumentsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierDetailTabDocumentsComponent, deps: [{ token: i1.ConfigService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1899
|
-
DossierDetailTabDocumentsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: DossierDetailTabDocumentsComponent, selector: "valtimo-dossier-detail-tab-documents", ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 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-dossier-detail-tab-s3-documents\n *ngIf=\"s3UploadProvider || openZaakUploadProvider\"\n></valtimo-dossier-detail-tab-s3-documents>\n<valtimo-dossier-detail-tab-documenten-api-documents *ngIf=\"documentenApiUploadProvider\">\n</valtimo-dossier-detail-tab-documenten-api-documents>\n", styles: [""], dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: DossierDetailTabDocumentenApiDocumentsComponent, selector: "valtimo-dossier-detail-tab-documenten-api-documents" }, { kind: "component", type: DossierDetailTabS3DocumentsComponent, selector: "valtimo-dossier-detail-tab-s3-documents" }] });
|
|
1900
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierDetailTabDocumentsComponent, decorators: [{
|
|
1901
|
-
type: Component,
|
|
1902
|
-
args: [{ selector: 'valtimo-dossier-detail-tab-documents', template: "<!--\n ~ Copyright 2015-2023 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-dossier-detail-tab-s3-documents\n *ngIf=\"s3UploadProvider || openZaakUploadProvider\"\n></valtimo-dossier-detail-tab-s3-documents>\n<valtimo-dossier-detail-tab-documenten-api-documents *ngIf=\"documentenApiUploadProvider\">\n</valtimo-dossier-detail-tab-documenten-api-documents>\n" }]
|
|
1903
|
-
}], ctorParameters: function () { return [{ type: i1.ConfigService }]; } });
|
|
1904
|
-
|
|
1905
|
-
/*
|
|
1906
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1907
|
-
*
|
|
1908
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1909
|
-
* you may not use this file except in compliance with the License.
|
|
1910
|
-
* You may obtain a copy of the License at
|
|
1911
|
-
*
|
|
1912
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1913
|
-
*
|
|
1914
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1915
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
1916
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1917
|
-
* See the License for the specific language governing permissions and
|
|
1918
|
-
* limitations under the License.
|
|
1919
|
-
*/
|
|
1920
|
-
const TAB_MAP = new InjectionToken('TabMap');
|
|
1921
|
-
const DEFAULT_TABS = new Map([
|
|
1922
|
-
[DefaultTabs.summary, DossierDetailTabSummaryComponent],
|
|
1923
|
-
[DefaultTabs.progress, DossierDetailTabProgressComponent],
|
|
1924
|
-
[DefaultTabs.audit, DossierDetailTabAuditComponent],
|
|
1925
|
-
[DefaultTabs.documents, DossierDetailTabDocumentsComponent],
|
|
1926
|
-
]);
|
|
1927
|
-
|
|
1928
|
-
/*
|
|
1929
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1930
|
-
*
|
|
1931
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1932
|
-
* you may not use this file except in compliance with the License.
|
|
1933
|
-
* You may obtain a copy of the License at
|
|
1934
|
-
*
|
|
1935
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1936
|
-
*
|
|
1937
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1938
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
1939
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1940
|
-
* See the License for the specific language governing permissions and
|
|
1941
|
-
* limitations under the License.
|
|
1942
|
-
*/
|
|
1943
|
-
class DossierDetailTabObjectTypeComponent {
|
|
1944
|
-
constructor(route, zaakobjectenService, modalService) {
|
|
1945
|
-
this.route = route;
|
|
1946
|
-
this.zaakobjectenService = zaakobjectenService;
|
|
1947
|
-
this.modalService = modalService;
|
|
1948
|
-
this.documentId$ = this.route.params.pipe(map(params => params.documentId));
|
|
1949
|
-
this.objecttypes$ = this.documentId$.pipe(switchMap(documentId => this.zaakobjectenService.getDocumentObjectTypes(documentId)));
|
|
1950
|
-
this.objectName$ = this.route.params.pipe(map(() => {
|
|
1951
|
-
const currentUrl = window.location.href;
|
|
1952
|
-
const splitUrl = currentUrl.split('/');
|
|
1953
|
-
const lastUrlPart = splitUrl[splitUrl.length - 1];
|
|
1954
|
-
return lastUrlPart;
|
|
1955
|
-
}));
|
|
1956
|
-
this.selectedObjecttypeUrl$ = combineLatest([
|
|
1957
|
-
this.objecttypes$,
|
|
1958
|
-
this.objectName$,
|
|
1959
|
-
]).pipe(map(([objectTypes, objectName]) => {
|
|
1960
|
-
const currentType = objectTypes?.find(type => type?.name.toLowerCase() === objectName?.toLowerCase());
|
|
1961
|
-
const currentTypeUrl = currentType?.url;
|
|
1962
|
-
if (objectTypes && objectName && currentTypeUrl)
|
|
1963
|
-
return currentTypeUrl;
|
|
1964
|
-
return '';
|
|
1965
|
-
}));
|
|
1966
|
-
this.loading$ = new BehaviorSubject(true);
|
|
1967
|
-
this.hasData$ = new BehaviorSubject(false);
|
|
1968
|
-
this.objects$ = combineLatest([
|
|
1969
|
-
this.documentId$,
|
|
1970
|
-
this.selectedObjecttypeUrl$,
|
|
1971
|
-
]).pipe(switchMap(([documentId, selectedObjecttypeUrl]) => documentId && selectedObjecttypeUrl
|
|
1972
|
-
? this.zaakobjectenService.getDocumentObjectsOfType(documentId, selectedObjecttypeUrl).pipe(map(objects => objects.map(object => ({ ...object, title: object.title || '-' }))), tap(() => {
|
|
1973
|
-
this.loading$.next(false);
|
|
1974
|
-
this.hasData$.next(true);
|
|
1975
|
-
}))
|
|
1976
|
-
: of(null).pipe(tap(() => {
|
|
1977
|
-
this.loading$.next(false);
|
|
1978
|
-
this.hasData$.next(false);
|
|
1979
|
-
}))));
|
|
1980
|
-
this.columns$ = new BehaviorSubject([
|
|
1981
|
-
{
|
|
1982
|
-
labelTranslationKey: 'dossier.zaakobjecten.index',
|
|
1983
|
-
dataKey: 'index',
|
|
1984
|
-
},
|
|
1985
|
-
{
|
|
1986
|
-
labelTranslationKey: 'dossier.zaakobjecten.registrationAt',
|
|
1987
|
-
dataKey: 'registrationAt',
|
|
1988
|
-
},
|
|
1989
|
-
{
|
|
1990
|
-
labelTranslationKey: 'dossier.zaakobjecten.title',
|
|
1991
|
-
dataKey: 'title',
|
|
1992
|
-
},
|
|
1993
|
-
]);
|
|
1994
|
-
this.objectForm$ = new BehaviorSubject(null);
|
|
1995
|
-
this.noFormDefinitionComponent$ = new BehaviorSubject(false);
|
|
1996
|
-
}
|
|
1997
|
-
rowClicked(object) {
|
|
1998
|
-
this.documentId$.pipe(take$1(1)).subscribe(documentId => {
|
|
1999
|
-
this.zaakobjectenService.getObjectTypeForm(documentId, object.url).subscribe(res => {
|
|
2000
|
-
const definition = res.formDefinition;
|
|
2001
|
-
definition.components = definition.components.map(component => ({
|
|
2002
|
-
...component,
|
|
2003
|
-
disabled: true,
|
|
2004
|
-
}));
|
|
2005
|
-
this.setModalData(definition);
|
|
2006
|
-
}, () => {
|
|
2007
|
-
this.setModalData();
|
|
2008
|
-
});
|
|
2009
|
-
});
|
|
2010
|
-
}
|
|
2011
|
-
hide() {
|
|
2012
|
-
this.modalService.closeModal(() => {
|
|
2013
|
-
this.objectForm$.next(null);
|
|
2014
|
-
});
|
|
2015
|
-
}
|
|
2016
|
-
show() {
|
|
2017
|
-
this.modalService.openModal(this.viewObjectModal);
|
|
2018
|
-
}
|
|
2019
|
-
setModalData(definition) {
|
|
2020
|
-
if (definition) {
|
|
2021
|
-
this.objectForm$.next(definition);
|
|
2022
|
-
this.noFormDefinitionComponent$.next(false);
|
|
2023
|
-
}
|
|
2024
|
-
else {
|
|
2025
|
-
this.noFormDefinitionComponent$.next(true);
|
|
2026
|
-
}
|
|
2027
|
-
this.show();
|
|
2028
|
-
}
|
|
2029
|
-
}
|
|
2030
|
-
DossierDetailTabObjectTypeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierDetailTabObjectTypeComponent, deps: [{ token: i1$1.ActivatedRoute }, { token: ZaakobjectenService }, { token: i3$3.ModalService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2031
|
-
DossierDetailTabObjectTypeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: DossierDetailTabObjectTypeComponent, selector: "valtimo-object-type", viewQueries: [{ propertyName: "viewObjectModal", first: true, predicate: ["viewObjectModal"], descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 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-2023 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: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$2.FormioComponent, selector: "valtimo-form-io", inputs: ["form", "options", "submission", "readOnly", "formRefresh$"], outputs: ["submit", "change"] }, { kind: "component", type: i3$3.ParagraphComponent, selector: "v-paragraph", inputs: ["center", "fullWidth", "margin", "italic", "loading"] }, { kind: "component", type: i3$3.TableComponent, selector: "v-table", inputs: ["items", "columns", "loading", "showEditButtons", "showPagination", "editButtonTranslationKey", "itemsTranslationKey", "noResultsTranslationKey", "mobileBreakpointPx", "amountOfLoadingRows", "collectionSize", "maxPaginationItemSize", "page", "size"], outputs: ["editButtonClicked", "paginationSizeSet", "paginationPageSet"] }, { kind: "component", type: i3$3.ModalComponent, selector: "v-modal", inputs: ["appearingDelayMs", "maxWidthPx", "hideFooter"], outputs: ["closeEvent"] }, { kind: "component", type: i3$3.TitleComponent, selector: "v-title", inputs: ["type", "margin", "fullWidth", "center"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }] });
|
|
2032
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierDetailTabObjectTypeComponent, decorators: [{
|
|
2033
|
-
type: Component,
|
|
2034
|
-
args: [{ selector: 'valtimo-object-type', template: "<!--\n ~ Copyright 2015-2023 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-2023 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"] }]
|
|
2035
|
-
}], ctorParameters: function () { return [{ type: i1$1.ActivatedRoute }, { type: ZaakobjectenService }, { type: i3$3.ModalService }]; }, propDecorators: { viewObjectModal: [{
|
|
2036
|
-
type: ViewChild,
|
|
2037
|
-
args: ['viewObjectModal']
|
|
2038
|
-
}] } });
|
|
2039
|
-
|
|
2040
|
-
/*
|
|
2041
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
2042
|
-
*
|
|
2043
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
2044
|
-
* you may not use this file except in compliance with the License.
|
|
2045
|
-
* You may obtain a copy of the License at
|
|
2046
|
-
*
|
|
2047
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
2048
|
-
*
|
|
2049
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
2050
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
2051
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2052
|
-
* See the License for the specific language governing permissions and
|
|
2053
|
-
* limitations under the License.
|
|
2054
|
-
*/
|
|
2055
|
-
class TabService {
|
|
2056
|
-
constructor(tabMap = DEFAULT_TABS, configService, route, router) {
|
|
2057
|
-
this.configService = configService;
|
|
2058
|
-
this.route = route;
|
|
2059
|
-
this.router = router;
|
|
2060
|
-
this.tabs = [];
|
|
2061
|
-
this.tabMap = tabMap;
|
|
2062
|
-
this.setTabs();
|
|
2063
|
-
this.openRouterSubscription();
|
|
2064
|
-
}
|
|
2065
|
-
getTabs() {
|
|
2066
|
-
return this.tabs;
|
|
2067
|
-
}
|
|
2068
|
-
setTabs(extraTabs) {
|
|
2069
|
-
let i = 0;
|
|
2070
|
-
this.tabs = [];
|
|
2071
|
-
this.allTabs = extraTabs
|
|
2072
|
-
? new Map([...Array.from(this.tabMap.entries()), ...Array.from(extraTabs.entries())])
|
|
2073
|
-
: this.tabMap;
|
|
2074
|
-
this.allTabs.forEach((component, name) => {
|
|
2075
|
-
this.tabs.push(new TabImpl(name, i, component));
|
|
2076
|
-
i++;
|
|
2077
|
-
});
|
|
2078
|
-
}
|
|
2079
|
-
getConfigurableTabs(documentDefinitionName) {
|
|
2080
|
-
if (this.configService?.config?.caseObjectTypes) {
|
|
2081
|
-
const allNamesObjects = this.configService?.config?.caseObjectTypes[documentDefinitionName];
|
|
2082
|
-
const map = new Map();
|
|
2083
|
-
allNamesObjects?.forEach(name => {
|
|
2084
|
-
map.set(name, DossierDetailTabObjectTypeComponent);
|
|
2085
|
-
});
|
|
2086
|
-
this.extraTabs = map;
|
|
2087
|
-
}
|
|
2088
|
-
else {
|
|
2089
|
-
this.extraTabs = new Map();
|
|
2090
|
-
}
|
|
2091
|
-
}
|
|
2092
|
-
openRouterSubscription() {
|
|
2093
|
-
this.router.events.subscribe((event) => {
|
|
2094
|
-
if (event instanceof NavigationEnd) {
|
|
2095
|
-
this.setTabs(this.extraTabs);
|
|
2096
|
-
}
|
|
2097
|
-
});
|
|
2098
|
-
}
|
|
2099
|
-
}
|
|
2100
|
-
TabService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TabService, deps: [{ token: TAB_MAP }, { token: i1.ConfigService }, { token: i1$1.ActivatedRoute }, { token: i1$1.Router }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2101
|
-
TabService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TabService, providedIn: 'root' });
|
|
2102
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TabService, decorators: [{
|
|
2103
|
-
type: Injectable,
|
|
2104
|
-
args: [{
|
|
2105
|
-
providedIn: 'root',
|
|
2106
|
-
}]
|
|
2107
|
-
}], ctorParameters: function () { return [{ type: Map, decorators: [{
|
|
2108
|
-
type: Inject,
|
|
2109
|
-
args: [TAB_MAP]
|
|
2110
|
-
}] }, { type: i1.ConfigService }, { type: i1$1.ActivatedRoute }, { type: i1$1.Router }]; } });
|
|
2111
|
-
|
|
2112
|
-
/*
|
|
2113
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
2114
|
-
*
|
|
2115
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
2116
|
-
* you may not use this file except in compliance with the License.
|
|
2117
|
-
* You may obtain a copy of the License at
|
|
2118
|
-
*
|
|
2119
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
2120
|
-
*
|
|
2121
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
2122
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
2123
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2124
|
-
* See the License for the specific language governing permissions and
|
|
2125
|
-
* limitations under the License.
|
|
2126
|
-
*/
|
|
2127
|
-
class DossierSupportingProcessStartModalComponent {
|
|
2128
|
-
constructor(route, router, processService, processLinkService, documentService, formLinkService, formFlowService, logger, userProviderService) {
|
|
2129
|
-
this.route = route;
|
|
2130
|
-
this.router = router;
|
|
2131
|
-
this.processService = processService;
|
|
2132
|
-
this.processLinkService = processLinkService;
|
|
2133
|
-
this.documentService = documentService;
|
|
2134
|
-
this.formLinkService = formLinkService;
|
|
2135
|
-
this.formFlowService = formFlowService;
|
|
2136
|
-
this.logger = logger;
|
|
2137
|
-
this.userProviderService = userProviderService;
|
|
2138
|
-
this.isAdmin$ = this.userProviderService
|
|
2139
|
-
.getUserSubject()
|
|
2140
|
-
.pipe(map$1(userIdentity => userIdentity?.roles?.includes('ROLE_ADMIN')));
|
|
2141
|
-
this.formSubmit = new EventEmitter();
|
|
2142
|
-
}
|
|
2143
|
-
loadProcessLink() {
|
|
2144
|
-
this.formAssociation = null;
|
|
2145
|
-
this.processLinkId = null;
|
|
2146
|
-
this.formDefinition = null;
|
|
2147
|
-
this.formFlowInstanceId = null;
|
|
2148
|
-
this.processService
|
|
2149
|
-
.getProcessDefinitionStartProcessLink(this.processDefinitionId, this.documentId, null)
|
|
2150
|
-
.pipe(take$1(1))
|
|
2151
|
-
.subscribe(startProcessResult => {
|
|
2152
|
-
if (startProcessResult) {
|
|
2153
|
-
switch (startProcessResult.type) {
|
|
2154
|
-
case 'form':
|
|
2155
|
-
this.formDefinition = startProcessResult.properties.prefilledForm;
|
|
2156
|
-
this.processLinkId = startProcessResult.processLinkId;
|
|
2157
|
-
break;
|
|
2158
|
-
case 'form-flow':
|
|
2159
|
-
this.formFlowInstanceId = startProcessResult.properties.formFlowInstanceId;
|
|
2160
|
-
break;
|
|
2161
|
-
}
|
|
2162
|
-
this.modal.show();
|
|
2163
|
-
}
|
|
2164
|
-
else {
|
|
2165
|
-
// backwards compatibility for form associations
|
|
2166
|
-
this.formLinkService
|
|
2167
|
-
.getStartEventFormDefinitionByProcessDefinitionKey(this.processDefinitionKey, this.documentId)
|
|
2168
|
-
.pipe(take$1(1))
|
|
2169
|
-
.subscribe({
|
|
2170
|
-
next: formDefinitionWithFormAssociation => this.openFormAssociation(formDefinitionWithFormAssociation),
|
|
2171
|
-
error: error => {
|
|
2172
|
-
this.modal.show();
|
|
2173
|
-
},
|
|
2174
|
-
});
|
|
2175
|
-
}
|
|
2176
|
-
});
|
|
2177
|
-
}
|
|
2178
|
-
openFormAssociation(formDefinitionWithFormAssociation) {
|
|
2179
|
-
this.formAssociation = formDefinitionWithFormAssociation.formAssociation;
|
|
2180
|
-
const className = this.formAssociation.formLink.className.split('.');
|
|
2181
|
-
const linkType = className[className.length - 1];
|
|
2182
|
-
switch (linkType) {
|
|
2183
|
-
case 'BpmnElementFormIdLink':
|
|
2184
|
-
this.formDefinition = formDefinitionWithFormAssociation;
|
|
2185
|
-
this.documentService.getDocument(this.documentId).subscribe(document => {
|
|
2186
|
-
this.submission = {
|
|
2187
|
-
data: document.content,
|
|
2188
|
-
};
|
|
2189
|
-
}, () => noop());
|
|
2190
|
-
this.modal.show();
|
|
2191
|
-
break;
|
|
2192
|
-
case 'BpmnElementFormFlowIdLink':
|
|
2193
|
-
this.formFlowService
|
|
2194
|
-
.createInstanceForNewProcess(this.processDefinitionKey, {
|
|
2195
|
-
documentId: this.documentId,
|
|
2196
|
-
documentDefinitionName: null,
|
|
2197
|
-
})
|
|
2198
|
-
.subscribe(result => (this.formFlowInstanceId = result.formFlowInstanceId));
|
|
2199
|
-
this.modal.show();
|
|
2200
|
-
break;
|
|
2201
|
-
case 'BpmnElementUrlLink':
|
|
2202
|
-
const url = this.router.serializeUrl(this.router.createUrlTree([this.formAssociation.formLink.url]));
|
|
2203
|
-
window.open(url, '_blank');
|
|
2204
|
-
break;
|
|
2205
|
-
case 'BpmnElementAngularStateUrlLink':
|
|
2206
|
-
this.route.params.pipe(take$1(1)).subscribe(params => {
|
|
2207
|
-
const documentId = params?.documentId;
|
|
2208
|
-
this.router.navigate([this.formAssociation.formLink.url], {
|
|
2209
|
-
state: { ...(documentId && { documentId }) },
|
|
2210
|
-
});
|
|
2211
|
-
});
|
|
2212
|
-
break;
|
|
2213
|
-
default:
|
|
2214
|
-
this.logger.fatal('Unsupported class name');
|
|
2215
|
-
}
|
|
2216
|
-
}
|
|
2217
|
-
openModal(processDocumentDefinition, documentId) {
|
|
2218
|
-
this.documentId = documentId;
|
|
2219
|
-
this.documentDefinitionName = processDocumentDefinition.id.documentDefinitionId.name;
|
|
2220
|
-
this.processDefinitionKey = processDocumentDefinition.id.processDefinitionKey;
|
|
2221
|
-
this.processDefinitionId = processDocumentDefinition.latestVersionId;
|
|
2222
|
-
this.processName = processDocumentDefinition.processName;
|
|
2223
|
-
this.options = new FormioOptionsImpl();
|
|
2224
|
-
this.options.disableAlerts = true;
|
|
2225
|
-
const formioBeforeSubmit = function (submission, callback) {
|
|
2226
|
-
callback(null, submission);
|
|
2227
|
-
};
|
|
2228
|
-
this.options.setHooks(formioBeforeSubmit);
|
|
2229
|
-
this.loadProcessLink();
|
|
2230
|
-
}
|
|
2231
|
-
onSubmit(submission) {
|
|
2232
|
-
this.formioSubmission = submission;
|
|
2233
|
-
if (this.processLinkId) {
|
|
2234
|
-
this.processLinkService
|
|
2235
|
-
.submitForm(this.processLinkId, submission.data, this.documentId)
|
|
2236
|
-
.subscribe({
|
|
2237
|
-
next: (formSubmissionResult) => {
|
|
2238
|
-
this.formSubmitted();
|
|
2239
|
-
},
|
|
2240
|
-
error: errors => {
|
|
2241
|
-
this.form.showErrors(errors);
|
|
2242
|
-
},
|
|
2243
|
-
});
|
|
2244
|
-
}
|
|
2245
|
-
else {
|
|
2246
|
-
this.formLinkService
|
|
2247
|
-
.onSubmit(this.processDefinitionKey, this.formAssociation.formLink.id, submission.data, this.documentId)
|
|
2248
|
-
.subscribe((formSubmissionResult) => {
|
|
2249
|
-
this.formSubmitted();
|
|
2250
|
-
}, errors => {
|
|
2251
|
-
this.form.showErrors(errors);
|
|
2252
|
-
});
|
|
2253
|
-
}
|
|
2254
|
-
}
|
|
2255
|
-
formSubmitted() {
|
|
2256
|
-
this.modal.hide();
|
|
2257
|
-
this.formSubmit.emit();
|
|
2258
|
-
}
|
|
2259
|
-
gotoFormLinkScreen() {
|
|
2260
|
-
this.modal.hide();
|
|
2261
|
-
this.router.navigate(['form-links'], { queryParams: { process: this.processDefinitionKey } });
|
|
2262
|
-
}
|
|
2263
|
-
}
|
|
2264
|
-
DossierSupportingProcessStartModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierSupportingProcessStartModalComponent, deps: [{ token: i1$1.ActivatedRoute }, { token: i1$1.Router }, { token: i2$2.ProcessService }, { token: i4.ProcessLinkService }, { token: i2.DocumentService }, { token: i4.FormLinkService }, { token: i4.FormFlowService }, { token: i1$2.NGXLogger }, { token: i6$1.UserProviderService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2265
|
-
DossierSupportingProcessStartModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: DossierSupportingProcessStartModalComponent, selector: "valtimo-dossier-supporting-process-start-modal", outputs: { formSubmit: "formSubmit" }, viewQueries: [{ propertyName: "form", first: true, predicate: ["form"], descendants: true }, { propertyName: "modal", first: true, predicate: ["supportingProcessStartModal"], descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 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-modal\n #supportingProcessStartModal\n elementId=\"supportingProcessStartModal\"\n [title]=\"\n (processDefinitionKey | translate) !== processDefinitionKey\n ? (processDefinitionKey | translate)\n : processName\n \"\n>\n <div body *ngIf=\"formDefinition\">\n <valtimo-form-io\n #form\n [submission]=\"submission\"\n [form]=\"formDefinition\"\n [options]=\"options\"\n (submit)=\"onSubmit($event)\"\n >\n </valtimo-form-io>\n </div>\n <div body *ngIf=\"formFlowInstanceId\">\n <valtimo-form-flow\n #formFlow\n [formFlowInstanceId]=\"formFlowInstanceId\"\n (formFlowComplete)=\"formSubmitted()\"\n ></valtimo-form-flow>\n </div>\n <div body *ngIf=\"!formDefinition && !formFlowInstanceId\">\n <div class=\"bg-warning text-black mb-0 p-3 text-center\">\n {{\n (isAdmin$ | async)\n ? ('formManagement.noFormDefinitionFoundAdmin' | translate)\n : ('formManagement.noFormDefinitionFoundUser' | translate)\n }}\n </div>\n <div class=\"mb-0 mt-4 p-3 text-center\">\n <button\n class=\"btn btn-secondary btn-space\"\n type=\"button\"\n (click)=\"gotoFormLinkScreen()\"\n id=\"form-link-button\"\n >\n {{ 'formManagement.gotoFormLinksButton' | translate }}\n </button>\n </div>\n </div>\n</valtimo-modal>\n", styles: ["/*!\n * Copyright 2015-2023 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 */#supportingProcessStartModal .formio-component-submit{text-align:right}\n"], dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$2.FormioComponent, selector: "valtimo-form-io", inputs: ["form", "options", "submission", "readOnly", "formRefresh$"], outputs: ["submit", "change"] }, { kind: "component", type: i6$2.ModalComponent, selector: "valtimo-modal", inputs: ["elementId", "title", "subtitle", "templateBelowSubtitle", "showFooter"] }, { kind: "component", type: i4.FormFlowComponent, selector: "valtimo-form-flow", inputs: ["formIoFormData", "formFlowInstanceId"], outputs: ["formFlowComplete"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None });
|
|
2266
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierSupportingProcessStartModalComponent, decorators: [{
|
|
2267
|
-
type: Component,
|
|
2268
|
-
args: [{ selector: 'valtimo-dossier-supporting-process-start-modal', encapsulation: ViewEncapsulation.None, template: "<!--\n ~ Copyright 2015-2023 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-modal\n #supportingProcessStartModal\n elementId=\"supportingProcessStartModal\"\n [title]=\"\n (processDefinitionKey | translate) !== processDefinitionKey\n ? (processDefinitionKey | translate)\n : processName\n \"\n>\n <div body *ngIf=\"formDefinition\">\n <valtimo-form-io\n #form\n [submission]=\"submission\"\n [form]=\"formDefinition\"\n [options]=\"options\"\n (submit)=\"onSubmit($event)\"\n >\n </valtimo-form-io>\n </div>\n <div body *ngIf=\"formFlowInstanceId\">\n <valtimo-form-flow\n #formFlow\n [formFlowInstanceId]=\"formFlowInstanceId\"\n (formFlowComplete)=\"formSubmitted()\"\n ></valtimo-form-flow>\n </div>\n <div body *ngIf=\"!formDefinition && !formFlowInstanceId\">\n <div class=\"bg-warning text-black mb-0 p-3 text-center\">\n {{\n (isAdmin$ | async)\n ? ('formManagement.noFormDefinitionFoundAdmin' | translate)\n : ('formManagement.noFormDefinitionFoundUser' | translate)\n }}\n </div>\n <div class=\"mb-0 mt-4 p-3 text-center\">\n <button\n class=\"btn btn-secondary btn-space\"\n type=\"button\"\n (click)=\"gotoFormLinkScreen()\"\n id=\"form-link-button\"\n >\n {{ 'formManagement.gotoFormLinksButton' | translate }}\n </button>\n </div>\n </div>\n</valtimo-modal>\n", styles: ["/*!\n * Copyright 2015-2023 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 */#supportingProcessStartModal .formio-component-submit{text-align:right}\n"] }]
|
|
2269
|
-
}], ctorParameters: function () { return [{ type: i1$1.ActivatedRoute }, { type: i1$1.Router }, { type: i2$2.ProcessService }, { type: i4.ProcessLinkService }, { type: i2.DocumentService }, { type: i4.FormLinkService }, { type: i4.FormFlowService }, { type: i1$2.NGXLogger }, { type: i6$1.UserProviderService }]; }, propDecorators: { form: [{
|
|
2270
|
-
type: ViewChild,
|
|
2271
|
-
args: ['form', { static: false }]
|
|
2272
|
-
}], modal: [{
|
|
2273
|
-
type: ViewChild,
|
|
2274
|
-
args: ['supportingProcessStartModal', { static: false }]
|
|
2275
|
-
}], formSubmit: [{
|
|
2276
|
-
type: Output
|
|
2277
|
-
}] } });
|
|
2278
|
-
|
|
2279
|
-
/*
|
|
2280
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
2281
|
-
*
|
|
2282
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
2283
|
-
* you may not use this file except in compliance with the License.
|
|
2284
|
-
* You may obtain a copy of the License at
|
|
2285
|
-
*
|
|
2286
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
2287
|
-
*
|
|
2288
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
2289
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
2290
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2291
|
-
* See the License for the specific language governing permissions and
|
|
2292
|
-
* limitations under the License.
|
|
2293
|
-
*/
|
|
2294
|
-
class DossierAssignUserComponent {
|
|
2295
|
-
constructor(documentService) {
|
|
2296
|
-
this.documentService = documentService;
|
|
2297
|
-
this.hasPermission = true;
|
|
2298
|
-
this.assignmentOfDocumentChanged = new EventEmitter();
|
|
2299
|
-
this.userIdToAssign = null;
|
|
2300
|
-
this.candidateUsersForDocument$ = new BehaviorSubject(undefined);
|
|
2301
|
-
this.disabled$ = new BehaviorSubject(true);
|
|
2302
|
-
this.assignedIdOnServer$ = new BehaviorSubject(null);
|
|
2303
|
-
this.assignedUserFullName$ = new BehaviorSubject(null);
|
|
2304
|
-
this._subscriptions = new Subscription();
|
|
2305
|
-
}
|
|
2306
|
-
ngOnInit() {
|
|
2307
|
-
this._subscriptions.add(this.documentService.getCandidateUsers(this.documentId).subscribe(candidateUsers => {
|
|
2308
|
-
this.candidateUsersForDocument$.next(candidateUsers);
|
|
2309
|
-
if (this.assigneeId) {
|
|
2310
|
-
this.assignedIdOnServer$.next(this.assigneeId);
|
|
2311
|
-
this.userIdToAssign = this.assigneeId;
|
|
2312
|
-
this.assignedUserFullName$.next(this.assigneeFullName);
|
|
2313
|
-
}
|
|
2314
|
-
this.enable();
|
|
2315
|
-
}));
|
|
2316
|
-
}
|
|
2317
|
-
ngOnChanges(changes) {
|
|
2318
|
-
const assigneeId = changes?.assigneeId?.currentValue;
|
|
2319
|
-
const assigneeFullName = changes?.assigneeFullName?.currentValue;
|
|
2320
|
-
if (assigneeId && assigneeFullName) {
|
|
2321
|
-
this.assignedIdOnServer$.next(assigneeId || null);
|
|
2322
|
-
this.userIdToAssign = assigneeId || null;
|
|
2323
|
-
this.assignedUserFullName$.next(assigneeFullName);
|
|
2324
|
-
}
|
|
2325
|
-
else {
|
|
2326
|
-
this.clear();
|
|
2327
|
-
}
|
|
2328
|
-
}
|
|
2329
|
-
ngOnDestroy() {
|
|
2330
|
-
this._subscriptions.unsubscribe();
|
|
2331
|
-
}
|
|
2332
|
-
assignDocument(userId) {
|
|
2333
|
-
this.disable();
|
|
2334
|
-
this.documentService
|
|
2335
|
-
.assignHandlerToDocument(this.documentId, userId)
|
|
2336
|
-
.pipe(tap$1(() => {
|
|
2337
|
-
this.userIdToAssign = userId;
|
|
2338
|
-
this.assignedIdOnServer$.next(userId);
|
|
2339
|
-
this.assignedUserFullName$.next(this.assigneeFullName);
|
|
2340
|
-
this.emitChange();
|
|
2341
|
-
this.enable();
|
|
2342
|
-
}))
|
|
2343
|
-
.subscribe();
|
|
2344
|
-
}
|
|
2345
|
-
unassignDocument() {
|
|
2346
|
-
this.disable();
|
|
2347
|
-
this.documentService
|
|
2348
|
-
.unassignHandlerFromDocument(this.documentId)
|
|
2349
|
-
.pipe(tap$1(() => {
|
|
2350
|
-
this.clear();
|
|
2351
|
-
this.emitChange();
|
|
2352
|
-
this.enable();
|
|
2353
|
-
}))
|
|
2354
|
-
.subscribe();
|
|
2355
|
-
}
|
|
2356
|
-
mapUsersForDropdown(users) {
|
|
2357
|
-
return (users &&
|
|
2358
|
-
users
|
|
2359
|
-
.sort((a, b) => {
|
|
2360
|
-
if (a.lastName && b.lastName) {
|
|
2361
|
-
return a.lastName.localeCompare(b.lastName);
|
|
2362
|
-
}
|
|
2363
|
-
})
|
|
2364
|
-
.map(user => ({ text: user.label, id: user.id })));
|
|
2365
|
-
}
|
|
2366
|
-
clear() {
|
|
2367
|
-
this.assignedIdOnServer$.next(null);
|
|
2368
|
-
this.userIdToAssign = null;
|
|
2369
|
-
}
|
|
2370
|
-
emitChange() {
|
|
2371
|
-
this.assignmentOfDocumentChanged.emit();
|
|
2372
|
-
}
|
|
2373
|
-
enable() {
|
|
2374
|
-
this.disabled$.next(false);
|
|
2375
|
-
}
|
|
2376
|
-
disable() {
|
|
2377
|
-
this.disabled$.next(true);
|
|
2378
|
-
}
|
|
2379
|
-
}
|
|
2380
|
-
DossierAssignUserComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierAssignUserComponent, deps: [{ token: i2.DocumentService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2381
|
-
DossierAssignUserComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: DossierAssignUserComponent, selector: "valtimo-dossier-assign-user", inputs: { documentId: "documentId", assigneeId: "assigneeId", assigneeFullName: "assigneeFullName", hasPermission: "hasPermission" }, outputs: { assignmentOfDocumentChanged: "assignmentOfDocumentChanged" }, usesOnChanges: true, ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 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 candidateUsers: candidateUsersForDocument$ | async,\n idOnServer: assignedIdOnServer$ | async,\n fullName: assignedUserFullName$ | async,\n disabled: disabled$ | async\n } as obs\"\n>\n <div class=\"container-fluid\">\n <div class=\"row\">\n <div class=\"col-12 pl-0 d-flex flex-row align-items-center\">\n <ng-container *ngIf=\"obs.candidateUsers; else loading\">\n <valtimo-searchable-dropdown-select\n [buttonText]=\"'assignDocument.header' | translate\"\n [clearSelectionButtonTitle]=\"'assignDocument.remove' | translate\"\n [disabled]=\"obs.disabled\"\n [hasPermission]=\"hasPermission\"\n [hasSelection]=\"\n userIdToAssign === obs.idOnServer && obs.idOnServer !== null && obs.fullName\n \"\n id=\"dossier-candidates-dropdown\"\n [items]=\"mapUsersForDropdown(obs.candidateUsers)\"\n [noResultsText]=\"'interface.noSearchResults' | translate\"\n [searchText]=\"'interface.typeToSearch' | translate\"\n [selectedText]=\"'assignDocument.assignedTo' | translate\"\n [selectedTextValue]=\"assignedUserFullName$ | async\"\n [style]=\"'underlinedText'\"\n [width]=\"250\"\n (itemSelected)=\"assignDocument($event)\"\n (clearSelection)=\"unassignDocument()\"\n >\n </valtimo-searchable-dropdown-select>\n </ng-container>\n </div>\n </div>\n </div>\n</ng-container>\n\n<ng-template #loading>\n <h5>\n <b>{{ 'assignDocument.fetchingUsers' | translate }}</b>\n </h5>\n</ng-template>\n", styles: [".container-fluid{color:#959595}valtimo-searchable-dropdown-select{font-size:13px}:host::ng-deep #dossier-candidates-dropdown h5{margin-block:0}\n"], dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$2.SearchableDropdownSelectComponent, selector: "valtimo-searchable-dropdown-select", inputs: ["style", "items", "buttonText", "searchText", "noResultsText", "disabled", "selectedText", "selectedTextValue", "clearSelectionButtonTitle", "hasSelection", "width", "hasPermission"], outputs: ["itemSelected", "clearSelection"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }] });
|
|
2382
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierAssignUserComponent, decorators: [{
|
|
2383
|
-
type: Component,
|
|
2384
|
-
args: [{ selector: 'valtimo-dossier-assign-user', template: "<!--\n ~ Copyright 2015-2023 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 candidateUsers: candidateUsersForDocument$ | async,\n idOnServer: assignedIdOnServer$ | async,\n fullName: assignedUserFullName$ | async,\n disabled: disabled$ | async\n } as obs\"\n>\n <div class=\"container-fluid\">\n <div class=\"row\">\n <div class=\"col-12 pl-0 d-flex flex-row align-items-center\">\n <ng-container *ngIf=\"obs.candidateUsers; else loading\">\n <valtimo-searchable-dropdown-select\n [buttonText]=\"'assignDocument.header' | translate\"\n [clearSelectionButtonTitle]=\"'assignDocument.remove' | translate\"\n [disabled]=\"obs.disabled\"\n [hasPermission]=\"hasPermission\"\n [hasSelection]=\"\n userIdToAssign === obs.idOnServer && obs.idOnServer !== null && obs.fullName\n \"\n id=\"dossier-candidates-dropdown\"\n [items]=\"mapUsersForDropdown(obs.candidateUsers)\"\n [noResultsText]=\"'interface.noSearchResults' | translate\"\n [searchText]=\"'interface.typeToSearch' | translate\"\n [selectedText]=\"'assignDocument.assignedTo' | translate\"\n [selectedTextValue]=\"assignedUserFullName$ | async\"\n [style]=\"'underlinedText'\"\n [width]=\"250\"\n (itemSelected)=\"assignDocument($event)\"\n (clearSelection)=\"unassignDocument()\"\n >\n </valtimo-searchable-dropdown-select>\n </ng-container>\n </div>\n </div>\n </div>\n</ng-container>\n\n<ng-template #loading>\n <h5>\n <b>{{ 'assignDocument.fetchingUsers' | translate }}</b>\n </h5>\n</ng-template>\n", styles: [".container-fluid{color:#959595}valtimo-searchable-dropdown-select{font-size:13px}:host::ng-deep #dossier-candidates-dropdown h5{margin-block:0}\n"] }]
|
|
2385
|
-
}], ctorParameters: function () { return [{ type: i2.DocumentService }]; }, propDecorators: { documentId: [{
|
|
2386
|
-
type: Input
|
|
2387
|
-
}], assigneeId: [{
|
|
2388
|
-
type: Input
|
|
2389
|
-
}], assigneeFullName: [{
|
|
2390
|
-
type: Input
|
|
2391
|
-
}], hasPermission: [{
|
|
2392
|
-
type: Input
|
|
2393
|
-
}], assignmentOfDocumentChanged: [{
|
|
2394
|
-
type: Output
|
|
2395
|
-
}] } });
|
|
2396
|
-
|
|
2397
|
-
/*
|
|
2398
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
2399
|
-
*
|
|
2400
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
2401
|
-
* you may not use this file except in compliance with the License.
|
|
2402
|
-
* You may obtain a copy of the License at
|
|
2403
|
-
*
|
|
2404
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
2405
|
-
*
|
|
2406
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
2407
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
2408
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2409
|
-
* See the License for the specific language governing permissions and
|
|
2410
|
-
* limitations under the License.
|
|
2411
|
-
*/
|
|
2412
|
-
class DossierDetailComponent {
|
|
2413
|
-
constructor(componentFactoryResolver, translateService, documentService, processService, route, router, location, tabService, configService, keyCloakService, logger, breadcrumbService, pageTitleService) {
|
|
2414
|
-
this.componentFactoryResolver = componentFactoryResolver;
|
|
2415
|
-
this.translateService = translateService;
|
|
2416
|
-
this.documentService = documentService;
|
|
2417
|
-
this.processService = processService;
|
|
2418
|
-
this.route = route;
|
|
2419
|
-
this.router = router;
|
|
2420
|
-
this.location = location;
|
|
2421
|
-
this.tabService = tabService;
|
|
2422
|
-
this.configService = configService;
|
|
2423
|
-
this.keyCloakService = keyCloakService;
|
|
2424
|
-
this.logger = logger;
|
|
2425
|
-
this.breadcrumbService = breadcrumbService;
|
|
2426
|
-
this.pageTitleService = pageTitleService;
|
|
2427
|
-
this.document = null;
|
|
2428
|
-
this.tabLoader = null;
|
|
2429
|
-
this.processDefinitionListFields = [];
|
|
2430
|
-
this.processDocumentDefinitions = [];
|
|
2431
|
-
this.customDossierHeaderItems = [];
|
|
2432
|
-
this.dossierStatusTabs = null;
|
|
2433
|
-
this.refreshDocument$ = new BehaviorSubject(null);
|
|
2434
|
-
this.assigneeId$ = new BehaviorSubject('');
|
|
2435
|
-
this.document$ = this.refreshDocument$.pipe(switchMap(() => this.route.params), map(params => params?.documentId), switchMap(documentId => documentId ? this.documentService.getDocument(this.documentId) : of(null)), tap(document => {
|
|
2436
|
-
if (document) {
|
|
2437
|
-
this.assigneeId$.next(document.assigneeId);
|
|
2438
|
-
this.document = document;
|
|
2439
|
-
if (this.configService.config.customDossierHeader?.hasOwnProperty(this.documentDefinitionName.toLowerCase()) &&
|
|
2440
|
-
this.customDossierHeaderItems.length === 0) {
|
|
2441
|
-
this.configService.config.customDossierHeader[this.documentDefinitionName.toLowerCase()]?.forEach(item => this.getCustomDossierHeaderItem(item));
|
|
2442
|
-
}
|
|
2443
|
-
}
|
|
2444
|
-
}));
|
|
2445
|
-
this.userId$ = from(this.keyCloakService.isLoggedIn()).pipe(switchMap(() => this.keyCloakService.loadUserProfile()), map(profile => profile?.id));
|
|
2446
|
-
this.isAssigning$ = new BehaviorSubject(false);
|
|
2447
|
-
this.isAssignedToCurrentUser$ = combineLatest([
|
|
2448
|
-
this.assigneeId$,
|
|
2449
|
-
this.userId$,
|
|
2450
|
-
]).pipe(map(([assigneeId, userId]) => assigneeId && userId && assigneeId === userId), startWith(true));
|
|
2451
|
-
this.documentDefinitionName$ = this.route.params.pipe(map(params => params.documentDefinitionName || ''));
|
|
2452
|
-
this.canHaveAssignee$ = this.documentDefinitionName$.pipe(switchMap(documentDefinitionName => this.documentService.getCaseSettings(documentDefinitionName)), map(caseSettings => caseSettings?.canHaveAssignee));
|
|
2453
|
-
this.snapshot = this.route.snapshot.paramMap;
|
|
2454
|
-
this.documentDefinitionName = this.snapshot.get('documentDefinitionName') || '';
|
|
2455
|
-
this.documentId = this.snapshot.get('documentId') || '';
|
|
2456
|
-
this.tabService.getConfigurableTabs(this.documentDefinitionName);
|
|
2457
|
-
}
|
|
2458
|
-
ngOnInit() {
|
|
2459
|
-
this.tabLoader = new TabLoaderImpl(this.tabService.getTabs(), this.componentFactoryResolver, this.viewContainerRef, this.translateService, this.router, this.location);
|
|
2460
|
-
this.documentService
|
|
2461
|
-
.getDocumentDefinition(this.documentDefinitionName)
|
|
2462
|
-
.subscribe(definition => {
|
|
2463
|
-
this.documentDefinitionNameTitle = definition.schema.title;
|
|
2464
|
-
this.setBreadcrumb();
|
|
2465
|
-
});
|
|
2466
|
-
this.initialTabName = this.snapshot.get('tab');
|
|
2467
|
-
this.tabLoader.initial(this.initialTabName);
|
|
2468
|
-
this.getAllAssociatedProcessDefinitions();
|
|
2469
|
-
}
|
|
2470
|
-
ngOnDestroy() {
|
|
2471
|
-
this.breadcrumbService.clearSecondBreadcrumb();
|
|
2472
|
-
}
|
|
2473
|
-
getAllAssociatedProcessDefinitions() {
|
|
2474
|
-
this.documentService
|
|
2475
|
-
.findProcessDocumentDefinitions(this.documentDefinitionName)
|
|
2476
|
-
.subscribe(processDocumentDefinitions => {
|
|
2477
|
-
this.processDocumentDefinitions = processDocumentDefinitions.filter(processDocumentDefinition => processDocumentDefinition.startableByUser);
|
|
2478
|
-
this.processDefinitionListFields = [
|
|
2479
|
-
{
|
|
2480
|
-
key: 'processName',
|
|
2481
|
-
label: 'Proces',
|
|
2482
|
-
},
|
|
2483
|
-
];
|
|
2484
|
-
});
|
|
2485
|
-
}
|
|
2486
|
-
startProcess(processDocumentDefinition) {
|
|
2487
|
-
this.supportingProcessStart.openModal(processDocumentDefinition, this.documentId);
|
|
2488
|
-
}
|
|
2489
|
-
claimAssignee() {
|
|
2490
|
-
this.isAssigning$.next(true);
|
|
2491
|
-
this.userId$
|
|
2492
|
-
.pipe(take(1), switchMap(userId => this.documentService.assignHandlerToDocument(this.documentId, userId)))
|
|
2493
|
-
.subscribe(() => {
|
|
2494
|
-
this.isAssigning$.next(false);
|
|
2495
|
-
this.refreshDocument$.next(null);
|
|
2496
|
-
}, () => {
|
|
2497
|
-
this.isAssigning$.next(false);
|
|
2498
|
-
this.logger.debug('Something went wrong while assigning user to case');
|
|
2499
|
-
});
|
|
2500
|
-
}
|
|
2501
|
-
assignmentOfDocumentChanged() {
|
|
2502
|
-
this.refreshDocument$.next(null);
|
|
2503
|
-
}
|
|
2504
|
-
getCustomDossierHeaderItem(item) {
|
|
2505
|
-
this.customDossierHeaderItems.push({
|
|
2506
|
-
label: item['labelTranslationKey'] || '',
|
|
2507
|
-
columnSize: item['columnSize'] || 3,
|
|
2508
|
-
textSize: item['textSize'] || 'md',
|
|
2509
|
-
customClass: item['customClass'] || '',
|
|
2510
|
-
modifier: item['modifier'] || '',
|
|
2511
|
-
value: item['propertyPaths']?.reduce((prev, curr) => prev + this.getStringFromDocumentPath(item, curr), ''),
|
|
2512
|
-
});
|
|
2513
|
-
}
|
|
2514
|
-
getStringFromDocumentPath(item, path) {
|
|
2515
|
-
const prefix = item['propertyPaths'].indexOf(path) > 0 ? ' ' : '';
|
|
2516
|
-
let string = path.split('.').reduce((o, i) => o[i], this.document.content) || item['noValueText'] || '';
|
|
2517
|
-
const dateFormats = [moment.ISO_8601, 'MM-DD-YYYY', 'DD-MM-YYYY', 'YYYY-MM-DD'];
|
|
2518
|
-
switch (item['modifier']) {
|
|
2519
|
-
case 'age': {
|
|
2520
|
-
if (moment(string, dateFormats, true).isValid()) {
|
|
2521
|
-
string = moment().diff(string, 'years');
|
|
2522
|
-
}
|
|
2523
|
-
break;
|
|
2524
|
-
}
|
|
2525
|
-
default: {
|
|
2526
|
-
if (moment(string, dateFormats, true).isValid()) {
|
|
2527
|
-
string = moment(string).format('DD-MM-YYYY');
|
|
2528
|
-
}
|
|
2529
|
-
}
|
|
2530
|
-
}
|
|
2531
|
-
return prefix + string;
|
|
2532
|
-
}
|
|
2533
|
-
setBreadcrumb() {
|
|
2534
|
-
this.breadcrumbService.setSecondBreadcrumb({
|
|
2535
|
-
route: [`/dossiers/${this.documentDefinitionName}`],
|
|
2536
|
-
content: this.documentDefinitionNameTitle,
|
|
2537
|
-
href: `/dossiers/${this.documentDefinitionName}`,
|
|
2538
|
-
});
|
|
2539
|
-
}
|
|
2540
|
-
}
|
|
2541
|
-
DossierDetailComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierDetailComponent, deps: [{ token: i0.ComponentFactoryResolver }, { token: i6.TranslateService }, { token: i2.DocumentService }, { token: i2$2.ProcessService }, { token: i1$1.ActivatedRoute }, { token: i1$1.Router }, { token: i5.Location }, { token: TabService }, { token: i1.ConfigService }, { token: i8$1.KeycloakService }, { token: i1$2.NGXLogger }, { token: i6$2.BreadcrumbService }, { token: i6$2.PageTitleService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2542
|
-
DossierDetailComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: DossierDetailComponent, selector: "valtimo-dossier-detail", viewQueries: [{ propertyName: "viewContainerRef", first: true, predicate: ["tabContainer"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "supportingProcessStart", first: true, predicate: ["supportingProcessStartModal"], descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 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=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"col-12 px-0 mb-5\">\n <valtimo-widget>\n <div class=\"card-header bg-light card-header-divider pb-2\">\n <div\n class=\"row\"\n *ngIf=\"{canHaveAssignee: canHaveAssignee$ | async, document: document$ | async} as obs\"\n >\n <div class=\"col\">\n <ng-container\n *ngTemplateOutlet=\"\n caseDetailHeader;\n context: {canHaveAssignee: obs.canHaveAssignee, document: obs.document}\n \"\n ></ng-container>\n </div>\n <div class=\"btn-group mt-m3px mb-3 col-auto\">\n <valtimo-extension\n module=\"dossier\"\n page=\"dossier-detail\"\n section=\"card-header\"\n ></valtimo-extension>\n <ng-container\n *ngTemplateOutlet=\"claimButton; context: {canHaveAssignee: obs.canHaveAssignee}\"\n ></ng-container>\n <div class=\"dropdown\">\n <button\n class=\"btn btn-primary dropdown-toggle\"\n type=\"button\"\n id=\"startProcessDropdown\"\n placement=\"bottom\"\n [ngbTooltip]=\"processDocumentDefinitions.length === 0 ? 'No action' : null\"\n [disabled]=\"processDocumentDefinitions.length === 0\"\n data-toggle=\"dropdown\"\n aria-haspopup=\"true\"\n aria-expanded=\"false\"\n >\n <span>{{ 'dossier.startSubProcess' | translate }}</span>\n <i class=\"ml-1 mdi mdi-chevron-down\"></i>\n </button>\n <div\n class=\"dropdown-menu dropdown-menu-right\"\n aria-labelledby=\"startProcessDropdown\"\n >\n <button\n *ngFor=\"let processDocumentDefinition of processDocumentDefinitions\"\n class=\"dropdown-item p\"\n href=\"#\"\n (click)=\"startProcess(processDocumentDefinition)\"\n >\n {{\n (processDocumentDefinition?.id?.processDefinitionKey | translate) !==\n processDocumentDefinition?.id?.processDefinitionKey\n ? (processDocumentDefinition.id.processDefinitionKey | translate)\n : processDocumentDefinition.processName\n }}\n </button>\n </div>\n </div>\n </div>\n </div>\n </div>\n <ul class=\"nav nav-tabs\">\n <li class=\"nav-item\" *ngFor=\"let tab of tabLoader.tabs\">\n <a\n id=\"{{ tab.name }}-tab\"\n class=\"nav-link clickable\"\n [ngClass]=\"{active: tab.isActive()}\"\n data-toggle=\"tab\"\n (click)=\"tabLoader.load(tab)\"\n >\n {{ tabLoader.translateTabName(tab) }}\n </a>\n </li>\n </ul>\n <div class=\"card-body bg-white p-5 position-relative tab-container\">\n <ng-template #tabContainer>Loading...</ng-template>\n <div class=\"clearfix\"></div>\n </div>\n </valtimo-widget>\n </div>\n <valtimo-dossier-supporting-process-start-modal\n (formSubmit)=\"tabLoader.refreshView()\"\n #supportingProcessStartModal\n ></valtimo-dossier-supporting-process-start-modal>\n </div>\n</div>\n\n<ng-template #caseDetailHeader let-canHaveAssignee=\"canHaveAssignee\" let-document=\"document\">\n <div class=\"row\" *ngIf=\"customDossierHeaderItems.length > 0; else defaultTitle\">\n <span\n class=\"mb-0 mt-0 pb-2 align-self-end col-xl-{{ item.columnSize }} col-lg-{{\n item.columnSize * 2\n }} {{ item.customClass }}\"\n [ngClass]=\"{\n h1: item.textSize === 'xl',\n h2: item.textSize === 'lg',\n h3: item.textSize === 'md',\n h4: item.textSize === 'sm',\n h5: item.textSize === 'xs'\n }\"\n *ngFor=\"let item of customDossierHeaderItems\"\n >\n <span *ngIf=\"item.label\">{{ item.label | translate }}</span>\n <span *ngIf=\"item.label && item.value\">: </span>\n <strong>{{ item.value }}</strong>\n </span>\n </div>\n <ng-container\n *ngTemplateOutlet=\"\n caseDetailAssignee;\n context: {canHaveAssignee: canHaveAssignee, document: document}\n \"\n ></ng-container>\n</ng-template>\n\n<ng-template #defaultTitle>\n <div class=\"row ml-0 mr-0\">{{ documentDefinitionNameTitle?.trim() }}</div>\n</ng-template>\n\n<ng-template #caseDetailAssignee let-canHaveAssignee=\"canHaveAssignee\" let-document=\"document\">\n <div class=\"row ml-0 mr-0 mt-1 mb-1\" *ngIf=\"canHaveAssignee && document\">\n <valtimo-dossier-assign-user\n [documentId]=\"document.id\"\n [assigneeId]=\"document.assigneeId\"\n [assigneeFullName]=\"document?.assigneeFullName\"\n (assignmentOfDocumentChanged)=\"assignmentOfDocumentChanged()\"\n ></valtimo-dossier-assign-user>\n </div>\n</ng-template>\n\n<ng-template #claimButton let-canHaveAssignee=\"canHaveAssignee\">\n <div class=\"user-full-name\" *ngIf=\"canHaveAssignee\">\n <button\n class=\"btn btn-space btn-primary mr-1\"\n type=\"button\"\n id=\"\"\n placement=\"bottom\"\n aria-haspopup=\"true\"\n aria-expanded=\"false\"\n (click)=\"claimAssignee()\"\n [disabled]=\"(isAssigning$ | async) || (isAssignedToCurrentUser$ | async)\"\n >\n <span>{{ 'dossier.claimAssigneeCase' | translate }}</span>\n </button>\n </div>\n</ng-template>\n", styles: [".tab-container{min-height:300px}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i6$2.WidgetComponent, selector: "valtimo-widget", inputs: ["type", "name", "icon", "contrast", "divider", "title", "subtitle", "collapseAble", "collapse", "additionalClasses"] }, { kind: "directive", type: i8.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "triggers", "container", "disableTooltip", "tooltipClass", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "component", type: i1.ExtensionComponent, selector: "valtimo-extension", inputs: ["module", "page", "section"] }, { kind: "component", type: DossierSupportingProcessStartModalComponent, selector: "valtimo-dossier-supporting-process-start-modal", outputs: ["formSubmit"] }, { kind: "component", type: DossierAssignUserComponent, selector: "valtimo-dossier-assign-user", inputs: ["documentId", "assigneeId", "assigneeFullName", "hasPermission"], outputs: ["assignmentOfDocumentChanged"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }] });
|
|
2543
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierDetailComponent, decorators: [{
|
|
2544
|
-
type: Component,
|
|
2545
|
-
args: [{ selector: 'valtimo-dossier-detail', template: "<!--\n ~ Copyright 2015-2023 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=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"col-12 px-0 mb-5\">\n <valtimo-widget>\n <div class=\"card-header bg-light card-header-divider pb-2\">\n <div\n class=\"row\"\n *ngIf=\"{canHaveAssignee: canHaveAssignee$ | async, document: document$ | async} as obs\"\n >\n <div class=\"col\">\n <ng-container\n *ngTemplateOutlet=\"\n caseDetailHeader;\n context: {canHaveAssignee: obs.canHaveAssignee, document: obs.document}\n \"\n ></ng-container>\n </div>\n <div class=\"btn-group mt-m3px mb-3 col-auto\">\n <valtimo-extension\n module=\"dossier\"\n page=\"dossier-detail\"\n section=\"card-header\"\n ></valtimo-extension>\n <ng-container\n *ngTemplateOutlet=\"claimButton; context: {canHaveAssignee: obs.canHaveAssignee}\"\n ></ng-container>\n <div class=\"dropdown\">\n <button\n class=\"btn btn-primary dropdown-toggle\"\n type=\"button\"\n id=\"startProcessDropdown\"\n placement=\"bottom\"\n [ngbTooltip]=\"processDocumentDefinitions.length === 0 ? 'No action' : null\"\n [disabled]=\"processDocumentDefinitions.length === 0\"\n data-toggle=\"dropdown\"\n aria-haspopup=\"true\"\n aria-expanded=\"false\"\n >\n <span>{{ 'dossier.startSubProcess' | translate }}</span>\n <i class=\"ml-1 mdi mdi-chevron-down\"></i>\n </button>\n <div\n class=\"dropdown-menu dropdown-menu-right\"\n aria-labelledby=\"startProcessDropdown\"\n >\n <button\n *ngFor=\"let processDocumentDefinition of processDocumentDefinitions\"\n class=\"dropdown-item p\"\n href=\"#\"\n (click)=\"startProcess(processDocumentDefinition)\"\n >\n {{\n (processDocumentDefinition?.id?.processDefinitionKey | translate) !==\n processDocumentDefinition?.id?.processDefinitionKey\n ? (processDocumentDefinition.id.processDefinitionKey | translate)\n : processDocumentDefinition.processName\n }}\n </button>\n </div>\n </div>\n </div>\n </div>\n </div>\n <ul class=\"nav nav-tabs\">\n <li class=\"nav-item\" *ngFor=\"let tab of tabLoader.tabs\">\n <a\n id=\"{{ tab.name }}-tab\"\n class=\"nav-link clickable\"\n [ngClass]=\"{active: tab.isActive()}\"\n data-toggle=\"tab\"\n (click)=\"tabLoader.load(tab)\"\n >\n {{ tabLoader.translateTabName(tab) }}\n </a>\n </li>\n </ul>\n <div class=\"card-body bg-white p-5 position-relative tab-container\">\n <ng-template #tabContainer>Loading...</ng-template>\n <div class=\"clearfix\"></div>\n </div>\n </valtimo-widget>\n </div>\n <valtimo-dossier-supporting-process-start-modal\n (formSubmit)=\"tabLoader.refreshView()\"\n #supportingProcessStartModal\n ></valtimo-dossier-supporting-process-start-modal>\n </div>\n</div>\n\n<ng-template #caseDetailHeader let-canHaveAssignee=\"canHaveAssignee\" let-document=\"document\">\n <div class=\"row\" *ngIf=\"customDossierHeaderItems.length > 0; else defaultTitle\">\n <span\n class=\"mb-0 mt-0 pb-2 align-self-end col-xl-{{ item.columnSize }} col-lg-{{\n item.columnSize * 2\n }} {{ item.customClass }}\"\n [ngClass]=\"{\n h1: item.textSize === 'xl',\n h2: item.textSize === 'lg',\n h3: item.textSize === 'md',\n h4: item.textSize === 'sm',\n h5: item.textSize === 'xs'\n }\"\n *ngFor=\"let item of customDossierHeaderItems\"\n >\n <span *ngIf=\"item.label\">{{ item.label | translate }}</span>\n <span *ngIf=\"item.label && item.value\">: </span>\n <strong>{{ item.value }}</strong>\n </span>\n </div>\n <ng-container\n *ngTemplateOutlet=\"\n caseDetailAssignee;\n context: {canHaveAssignee: canHaveAssignee, document: document}\n \"\n ></ng-container>\n</ng-template>\n\n<ng-template #defaultTitle>\n <div class=\"row ml-0 mr-0\">{{ documentDefinitionNameTitle?.trim() }}</div>\n</ng-template>\n\n<ng-template #caseDetailAssignee let-canHaveAssignee=\"canHaveAssignee\" let-document=\"document\">\n <div class=\"row ml-0 mr-0 mt-1 mb-1\" *ngIf=\"canHaveAssignee && document\">\n <valtimo-dossier-assign-user\n [documentId]=\"document.id\"\n [assigneeId]=\"document.assigneeId\"\n [assigneeFullName]=\"document?.assigneeFullName\"\n (assignmentOfDocumentChanged)=\"assignmentOfDocumentChanged()\"\n ></valtimo-dossier-assign-user>\n </div>\n</ng-template>\n\n<ng-template #claimButton let-canHaveAssignee=\"canHaveAssignee\">\n <div class=\"user-full-name\" *ngIf=\"canHaveAssignee\">\n <button\n class=\"btn btn-space btn-primary mr-1\"\n type=\"button\"\n id=\"\"\n placement=\"bottom\"\n aria-haspopup=\"true\"\n aria-expanded=\"false\"\n (click)=\"claimAssignee()\"\n [disabled]=\"(isAssigning$ | async) || (isAssignedToCurrentUser$ | async)\"\n >\n <span>{{ 'dossier.claimAssigneeCase' | translate }}</span>\n </button>\n </div>\n</ng-template>\n", styles: [".tab-container{min-height:300px}\n"] }]
|
|
2546
|
-
}], ctorParameters: function () { return [{ type: i0.ComponentFactoryResolver }, { type: i6.TranslateService }, { type: i2.DocumentService }, { type: i2$2.ProcessService }, { type: i1$1.ActivatedRoute }, { type: i1$1.Router }, { type: i5.Location }, { type: TabService }, { type: i1.ConfigService }, { type: i8$1.KeycloakService }, { type: i1$2.NGXLogger }, { type: i6$2.BreadcrumbService }, { type: i6$2.PageTitleService }]; }, propDecorators: { viewContainerRef: [{
|
|
2547
|
-
type: ViewChild,
|
|
2548
|
-
args: ['tabContainer', { read: ViewContainerRef, static: true }]
|
|
2549
|
-
}], supportingProcessStart: [{
|
|
2550
|
-
type: ViewChild,
|
|
2551
|
-
args: ['supportingProcessStartModal']
|
|
2552
|
-
}] } });
|
|
2553
|
-
|
|
2554
|
-
/*
|
|
2555
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
2556
|
-
*
|
|
2557
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
2558
|
-
* you may not use this file except in compliance with the License.
|
|
2559
|
-
* You may obtain a copy of the License at
|
|
2560
|
-
*
|
|
2561
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
2562
|
-
*
|
|
2563
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
2564
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
2565
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2566
|
-
* See the License for the specific language governing permissions and
|
|
2567
|
-
* limitations under the License.
|
|
2568
|
-
*/
|
|
2569
|
-
moment.locale(localStorage.getItem('langKey') || '');
|
|
2570
|
-
class DossierDetailTabContactMomentsComponent {
|
|
2571
|
-
constructor(contactMomentService, alertService, translateService) {
|
|
2572
|
-
this.contactMomentService = contactMomentService;
|
|
2573
|
-
this.alertService = alertService;
|
|
2574
|
-
this.translateService = translateService;
|
|
2575
|
-
this.refetchContactMoments$ = new BehaviorSubject('');
|
|
2576
|
-
this.contactMoments$ = this.refetchContactMoments$.pipe(switchMap$1(() => this.contactMomentService.getContactMoments()), map$1(contactMoments => contactMoments.map(contactMoment => {
|
|
2577
|
-
const registratieDatum = moment(contactMoment.registratiedatum);
|
|
2578
|
-
return new TimelineItemImpl(registratieDatum.format('DD MMM YYYY'), registratieDatum.format('HH:mm'), contactMoment.medewerkerIdentificatie.achternaam, contactMoment.kanaal, contactMoment.tekst, null);
|
|
2579
|
-
})));
|
|
2580
|
-
this.text$ = new BehaviorSubject('');
|
|
2581
|
-
this.channel$ = new BehaviorSubject('MAIL');
|
|
2582
|
-
this.requestData$ = combineLatest([this.text$, this.channel$]);
|
|
2583
|
-
this.valid$ = this.requestData$.pipe(map$1(([text, channel]) => !!(text && channel)));
|
|
2584
|
-
this.disabled$ = new BehaviorSubject(false);
|
|
2585
|
-
}
|
|
2586
|
-
textChange(text) {
|
|
2587
|
-
this.text$.next(text);
|
|
2588
|
-
}
|
|
2589
|
-
buttonClick() {
|
|
2590
|
-
this.modal.show();
|
|
2591
|
-
}
|
|
2592
|
-
saveNote() {
|
|
2593
|
-
this.disable();
|
|
2594
|
-
this.requestData$.pipe(take$1(1)).subscribe(([text, channel]) => {
|
|
2595
|
-
this.contactMomentService.saveContactMoment({ kanaal: channel, tekst: text }).subscribe(() => {
|
|
2596
|
-
this.alertService.success(this.translateService.instant('dossier.contactMoments.saveSuccess'));
|
|
2597
|
-
this.enable();
|
|
2598
|
-
this.clear();
|
|
2599
|
-
this.modal.hide();
|
|
2600
|
-
this.refetchContactMoments();
|
|
2601
|
-
}, () => {
|
|
2602
|
-
this.enable();
|
|
2603
|
-
});
|
|
2604
|
-
});
|
|
2605
|
-
}
|
|
2606
|
-
disable() {
|
|
2607
|
-
this.disabled$.next(true);
|
|
2608
|
-
}
|
|
2609
|
-
enable() {
|
|
2610
|
-
this.disabled$.next(false);
|
|
2611
|
-
}
|
|
2612
|
-
clear() {
|
|
2613
|
-
this.text$.next('');
|
|
2614
|
-
}
|
|
2615
|
-
refetchContactMoments() {
|
|
2616
|
-
this.refetchContactMoments$.next('');
|
|
2617
|
-
}
|
|
2618
|
-
}
|
|
2619
|
-
DossierDetailTabContactMomentsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierDetailTabContactMomentsComponent, deps: [{ token: i1$3.ContactMomentService }, { token: i6$2.AlertService }, { token: i6.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2620
|
-
DossierDetailTabContactMomentsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: DossierDetailTabContactMomentsComponent, selector: "valtimo-dossier-detail-tab-contact-moments", viewQueries: [{ propertyName: "modal", first: true, predicate: ["contactMomentsNoteModal"], descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 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: ["/*!\n * Copyright 2015-2023 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 */.contact-moments-container{display:flex;flex-direction:column}.button-container{display:inline;align-self:flex-end}\n"], dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i6$2.TimelineComponent, selector: "valtimo-timeline", inputs: ["items", "actions"] }, { kind: "directive", type: i5$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5$2.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$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5$2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i6$2.ModalComponent, selector: "valtimo-modal", inputs: ["elementId", "title", "subtitle", "templateBelowSubtitle", "showFooter"] }, { kind: "component", type: i6$2.SpinnerComponent, selector: "valtimo-spinner", inputs: ["useBootstrapSpinner", "name", "type", "size", "color", "bdColor", "fullScreen", "noMarginTop"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }] });
|
|
2621
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierDetailTabContactMomentsComponent, decorators: [{
|
|
2622
|
-
type: Component,
|
|
2623
|
-
args: [{ selector: 'valtimo-dossier-detail-tab-contact-moments', template: "<!--\n ~ Copyright 2015-2023 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: ["/*!\n * Copyright 2015-2023 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 */.contact-moments-container{display:flex;flex-direction:column}.button-container{display:inline;align-self:flex-end}\n"] }]
|
|
2624
|
-
}], ctorParameters: function () { return [{ type: i1$3.ContactMomentService }, { type: i6$2.AlertService }, { type: i6.TranslateService }]; }, propDecorators: { modal: [{
|
|
2625
|
-
type: ViewChild,
|
|
2626
|
-
args: ['contactMomentsNoteModal']
|
|
2627
|
-
}] } });
|
|
2628
|
-
|
|
2629
|
-
/*
|
|
2630
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
2631
|
-
*
|
|
2632
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
2633
|
-
* you may not use this file except in compliance with the License.
|
|
2634
|
-
* You may obtain a copy of the License at
|
|
2635
|
-
*
|
|
2636
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
2637
|
-
*
|
|
2638
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
2639
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
2640
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2641
|
-
* See the License for the specific language governing permissions and
|
|
2642
|
-
* limitations under the License.
|
|
2643
|
-
*/
|
|
2644
|
-
class DossierDetailTabZaakobjectenComponent {
|
|
2645
|
-
constructor(route, zaakobjectenService, modalService) {
|
|
2646
|
-
this.route = route;
|
|
2647
|
-
this.zaakobjectenService = zaakobjectenService;
|
|
2648
|
-
this.modalService = modalService;
|
|
2649
|
-
this.documentId$ = this.route.params.pipe(map(params => params.documentId));
|
|
2650
|
-
this.objecttypes$ = this.documentId$.pipe(switchMap(documentId => this.zaakobjectenService.getDocumentObjectTypes(documentId)));
|
|
2651
|
-
this.objecttypeSelectItems$ = this.objecttypes$.pipe(map(objecttypes => objecttypes.map(type => ({ id: type.url, text: type.name || '-' }))));
|
|
2652
|
-
this.selectedObjecttypeUrl$ = new BehaviorSubject(null);
|
|
2653
|
-
this.objects$ = combineLatest([
|
|
2654
|
-
this.documentId$,
|
|
2655
|
-
this.selectedObjecttypeUrl$,
|
|
2656
|
-
]).pipe(switchMap(([documentId, selectedObjecttypeUrl]) => documentId && selectedObjecttypeUrl
|
|
2657
|
-
? this.zaakobjectenService
|
|
2658
|
-
.getDocumentObjectsOfType(documentId, selectedObjecttypeUrl)
|
|
2659
|
-
.pipe(map(objects => objects.map(object => ({ ...object, title: object.title || '-' }))))
|
|
2660
|
-
: of(null)));
|
|
2661
|
-
this.columns$ = new BehaviorSubject([
|
|
2662
|
-
{
|
|
2663
|
-
labelTranslationKey: 'dossier.zaakobjecten.index',
|
|
2664
|
-
dataKey: 'index',
|
|
2665
|
-
},
|
|
2666
|
-
{
|
|
2667
|
-
labelTranslationKey: 'dossier.zaakobjecten.registrationAt',
|
|
2668
|
-
dataKey: 'registrationAt',
|
|
2669
|
-
},
|
|
2670
|
-
{
|
|
2671
|
-
labelTranslationKey: 'dossier.zaakobjecten.title',
|
|
2672
|
-
dataKey: 'title',
|
|
2673
|
-
},
|
|
2674
|
-
]);
|
|
2675
|
-
this.objectForm$ = new BehaviorSubject(null);
|
|
2676
|
-
this.objectName$ = new BehaviorSubject('');
|
|
2677
|
-
this.noFormDefinitionComponent$ = new BehaviorSubject(false);
|
|
2678
|
-
}
|
|
2679
|
-
selectObjectType(objectTypeUrl) {
|
|
2680
|
-
this.selectedObjecttypeUrl$.next(objectTypeUrl);
|
|
2681
|
-
}
|
|
2682
|
-
rowClicked(object, objectTypeSelectItems) {
|
|
2683
|
-
this.documentId$.pipe(take$1(1)).subscribe(documentId => {
|
|
2684
|
-
this.zaakobjectenService.getObjectTypeForm(documentId, object.url).subscribe(res => {
|
|
2685
|
-
const definition = res.formDefinition;
|
|
2686
|
-
definition.components = definition.components.map(component => ({
|
|
2687
|
-
...component,
|
|
2688
|
-
disabled: true,
|
|
2689
|
-
}));
|
|
2690
|
-
this.setModalData(objectTypeSelectItems, definition);
|
|
2691
|
-
}, () => {
|
|
2692
|
-
this.setModalData(objectTypeSelectItems);
|
|
2693
|
-
});
|
|
2694
|
-
});
|
|
2695
|
-
}
|
|
2696
|
-
hide() {
|
|
2697
|
-
this.modalService.closeModal(() => {
|
|
2698
|
-
this.objectName$.next('');
|
|
2699
|
-
this.objectForm$.next(null);
|
|
2700
|
-
});
|
|
2701
|
-
}
|
|
2702
|
-
show() {
|
|
2703
|
-
this.modalService.openModal(this.viewZaakobjectModal);
|
|
2704
|
-
}
|
|
2705
|
-
getObjectTypeName(objectTypeSelectItems) {
|
|
2706
|
-
const selectedObjectTypeUrl = this.selectedObjecttypeUrl$.getValue();
|
|
2707
|
-
const currentTypeSelectItem = objectTypeSelectItems.find(selectItem => selectItem.id === selectedObjectTypeUrl);
|
|
2708
|
-
return currentTypeSelectItem.text;
|
|
2709
|
-
}
|
|
2710
|
-
setModalData(objectTypeSelectItems, definition) {
|
|
2711
|
-
if (definition) {
|
|
2712
|
-
this.objectForm$.next(definition);
|
|
2713
|
-
this.noFormDefinitionComponent$.next(false);
|
|
2714
|
-
}
|
|
2715
|
-
else {
|
|
2716
|
-
this.noFormDefinitionComponent$.next(true);
|
|
2717
|
-
}
|
|
2718
|
-
this.objectName$.next(this.getObjectTypeName(objectTypeSelectItems));
|
|
2719
|
-
this.show();
|
|
2720
|
-
}
|
|
2721
|
-
}
|
|
2722
|
-
DossierDetailTabZaakobjectenComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierDetailTabZaakobjectenComponent, deps: [{ token: i1$1.ActivatedRoute }, { token: ZaakobjectenService }, { token: i3$3.ModalService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2723
|
-
DossierDetailTabZaakobjectenComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: DossierDetailTabZaakobjectenComponent, selector: "valtimo-dossier-detail-tab-zaakobjecten", viewQueries: [{ propertyName: "viewZaakobjectModal", first: true, predicate: ["viewZaakobjectModal"], descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 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-2023 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: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$2.FormioComponent, selector: "valtimo-form-io", inputs: ["form", "options", "submission", "readOnly", "formRefresh$"], outputs: ["submit", "change"] }, { kind: "component", type: i3$3.SelectComponent, selector: "v-select", inputs: ["items", "defaultSelection", "defaultSelectionId", "defaultSelectionIds", "clearable", "disabled", "multiple", "margin", "widthInPx", "notFoundText", "clearAllText", "name", "title", "titleTranslationKey", "clearSelectionSubject$", "tooltip", "required", "loading", "loadingText", "placeholder", "smallMargin"], outputs: ["selectedChange", "clear"] }, { kind: "component", type: i3$3.InputLabelComponent, selector: "v-input-label", inputs: ["name", "title", "titleTranslationKey", "tooltip", "required", "largeMargin", "small"] }, { kind: "component", type: i3$3.ParagraphComponent, selector: "v-paragraph", inputs: ["center", "fullWidth", "margin", "italic", "loading"] }, { kind: "component", type: i3$3.TableComponent, selector: "v-table", inputs: ["items", "columns", "loading", "showEditButtons", "showPagination", "editButtonTranslationKey", "itemsTranslationKey", "noResultsTranslationKey", "mobileBreakpointPx", "amountOfLoadingRows", "collectionSize", "maxPaginationItemSize", "page", "size"], outputs: ["editButtonClicked", "paginationSizeSet", "paginationPageSet"] }, { kind: "component", type: i3$3.ModalComponent, selector: "v-modal", inputs: ["appearingDelayMs", "maxWidthPx", "hideFooter"], outputs: ["closeEvent"] }, { kind: "component", type: i3$3.TitleComponent, selector: "v-title", inputs: ["type", "margin", "fullWidth", "center"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }] });
|
|
2724
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierDetailTabZaakobjectenComponent, decorators: [{
|
|
2725
|
-
type: Component,
|
|
2726
|
-
args: [{ selector: 'valtimo-dossier-detail-tab-zaakobjecten', template: "<!--\n ~ Copyright 2015-2023 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-2023 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"] }]
|
|
2727
|
-
}], ctorParameters: function () { return [{ type: i1$1.ActivatedRoute }, { type: ZaakobjectenService }, { type: i3$3.ModalService }]; }, propDecorators: { viewZaakobjectModal: [{
|
|
2728
|
-
type: ViewChild,
|
|
2729
|
-
args: ['viewZaakobjectModal']
|
|
2730
|
-
}] } });
|
|
2731
|
-
|
|
2732
|
-
/*
|
|
2733
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
2734
|
-
*
|
|
2735
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
2736
|
-
* you may not use this file except in compliance with the License.
|
|
2737
|
-
* You may obtain a copy of the License at
|
|
2738
|
-
*
|
|
2739
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
2740
|
-
*
|
|
2741
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
2742
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
2743
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2744
|
-
* See the License for the specific language governing permissions and
|
|
2745
|
-
* limitations under the License.
|
|
2746
|
-
*/
|
|
2747
|
-
class NotesService {
|
|
2748
|
-
constructor(configService, http) {
|
|
2749
|
-
this.configService = configService;
|
|
2750
|
-
this.http = http;
|
|
2751
|
-
this.VALTIMO_API_ENDPOINT_URI = this.configService.config.valtimoApi.endpointUri;
|
|
2752
|
-
this._showModal$ = new Subject();
|
|
2753
|
-
this._hideModal$ = new Subject();
|
|
2754
|
-
this._refresh$ = new BehaviorSubject(null);
|
|
2755
|
-
this._modalType$ = new BehaviorSubject('add');
|
|
2756
|
-
}
|
|
2757
|
-
getDocumentNotes(documentId, params) {
|
|
2758
|
-
return this.http.get(`${this.VALTIMO_API_ENDPOINT_URI}v1/document/${documentId}/note`, { params });
|
|
2759
|
-
}
|
|
2760
|
-
createDocumentNote(documentId, request) {
|
|
2761
|
-
return this.http.post(`${this.VALTIMO_API_ENDPOINT_URI}v1/document/${documentId}/note`, request);
|
|
2762
|
-
}
|
|
2763
|
-
updateNote(noteId, request) {
|
|
2764
|
-
return this.http.put(`${this.VALTIMO_API_ENDPOINT_URI}v1/note/${noteId}`, request);
|
|
2765
|
-
}
|
|
2766
|
-
deleteNote(noteId) {
|
|
2767
|
-
return this.http.delete(`${this.VALTIMO_API_ENDPOINT_URI}v1/note/${noteId}`);
|
|
2768
|
-
}
|
|
2769
|
-
get showModal$() {
|
|
2770
|
-
return this._showModal$.asObservable();
|
|
2771
|
-
}
|
|
2772
|
-
get hideModal$() {
|
|
2773
|
-
return this._hideModal$.asObservable();
|
|
2774
|
-
}
|
|
2775
|
-
get refresh$() {
|
|
2776
|
-
return this._refresh$.asObservable();
|
|
2777
|
-
}
|
|
2778
|
-
get modalType$() {
|
|
2779
|
-
return this._modalType$.asObservable();
|
|
2780
|
-
}
|
|
2781
|
-
showModal() {
|
|
2782
|
-
this._showModal$.next(null);
|
|
2783
|
-
}
|
|
2784
|
-
hideModal() {
|
|
2785
|
-
this._hideModal$.next(null);
|
|
2786
|
-
}
|
|
2787
|
-
refresh() {
|
|
2788
|
-
this._refresh$.next(null);
|
|
2789
|
-
}
|
|
2790
|
-
setModalType(type) {
|
|
2791
|
-
this._modalType$.next(type);
|
|
2792
|
-
}
|
|
2793
|
-
}
|
|
2794
|
-
NotesService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NotesService, deps: [{ token: i1.ConfigService }, { token: i2$1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2795
|
-
NotesService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NotesService, providedIn: 'root' });
|
|
2796
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NotesService, decorators: [{
|
|
2797
|
-
type: Injectable,
|
|
2798
|
-
args: [{
|
|
2799
|
-
providedIn: 'root',
|
|
2800
|
-
}]
|
|
2801
|
-
}], ctorParameters: function () { return [{ type: i1.ConfigService }, { type: i2$1.HttpClient }]; } });
|
|
2802
|
-
|
|
2803
|
-
/*
|
|
2804
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
2805
|
-
*
|
|
2806
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
2807
|
-
* you may not use this file except in compliance with the License.
|
|
2808
|
-
* You may obtain a copy of the License at
|
|
2809
|
-
*
|
|
2810
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
2811
|
-
*
|
|
2812
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
2813
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
2814
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2815
|
-
* See the License for the specific language governing permissions and
|
|
2816
|
-
* limitations under the License.
|
|
2817
|
-
*/
|
|
2818
|
-
class NoteModalComponent {
|
|
2819
|
-
constructor(notesService, modalService) {
|
|
2820
|
-
this.notesService = notesService;
|
|
2821
|
-
this.modalService = modalService;
|
|
2822
|
-
this.createNoteEvent = new EventEmitter();
|
|
2823
|
-
this.editNoteEvent = new EventEmitter();
|
|
2824
|
-
this.valid$ = new BehaviorSubject(false);
|
|
2825
|
-
this.showForm$ = this.modalService.modalVisible$;
|
|
2826
|
-
this.formData$ = new BehaviorSubject(null);
|
|
2827
|
-
this.modalType$ = this.notesService.modalType$;
|
|
2828
|
-
this.returnToFirstStepSubject$ = new Subject();
|
|
2829
|
-
}
|
|
2830
|
-
ngAfterViewInit() {
|
|
2831
|
-
this.openShowSubscription();
|
|
2832
|
-
this.openHideSubscription();
|
|
2833
|
-
}
|
|
2834
|
-
ngOnDestroy() {
|
|
2835
|
-
this.showSubscription?.unsubscribe();
|
|
2836
|
-
this.hideSubscription?.unsubscribe();
|
|
2837
|
-
}
|
|
2838
|
-
hide() {
|
|
2839
|
-
this.formData$.next(null);
|
|
2840
|
-
this.valid$.next(false);
|
|
2841
|
-
this.modalService.closeModal();
|
|
2842
|
-
}
|
|
2843
|
-
cancel() {
|
|
2844
|
-
this.hide();
|
|
2845
|
-
}
|
|
2846
|
-
save() {
|
|
2847
|
-
combineLatest([this.valid$, this.formData$])
|
|
2848
|
-
.pipe(take$1(1))
|
|
2849
|
-
.subscribe(([valid, formData]) => {
|
|
2850
|
-
if (valid) {
|
|
2851
|
-
this.createNoteEvent.emit(formData);
|
|
2852
|
-
}
|
|
2853
|
-
});
|
|
2854
|
-
}
|
|
2855
|
-
emitNoteData() {
|
|
2856
|
-
combineLatest([this.valid$, this.formData$, this.modalType$])
|
|
2857
|
-
.pipe(take$1(1))
|
|
2858
|
-
.subscribe(([valid, formData, modalType]) => {
|
|
2859
|
-
if (valid) {
|
|
2860
|
-
if (modalType === 'add') {
|
|
2861
|
-
this.createNoteEvent.emit(formData);
|
|
2862
|
-
}
|
|
2863
|
-
else {
|
|
2864
|
-
this.editNoteEvent.emit({ formData, data: this.customData });
|
|
2865
|
-
}
|
|
2866
|
-
}
|
|
2867
|
-
});
|
|
2868
|
-
}
|
|
2869
|
-
openShowSubscription() {
|
|
2870
|
-
this.showSubscription = this.notesService.showModal$.subscribe(() => {
|
|
2871
|
-
this.show();
|
|
2872
|
-
});
|
|
2873
|
-
}
|
|
2874
|
-
openHideSubscription() {
|
|
2875
|
-
this.hideSubscription = this.notesService.hideModal$.subscribe(() => {
|
|
2876
|
-
this.hide();
|
|
2877
|
-
});
|
|
2878
|
-
}
|
|
2879
|
-
show() {
|
|
2880
|
-
this.notesService.modalType$.pipe(take$1(1)).subscribe(() => {
|
|
2881
|
-
this.modalService.openModal(this.noteModal);
|
|
2882
|
-
});
|
|
2883
|
-
}
|
|
2884
|
-
formValueChange(data) {
|
|
2885
|
-
this.formData$.next(data);
|
|
2886
|
-
this.setValid(data);
|
|
2887
|
-
}
|
|
2888
|
-
setValid(data) {
|
|
2889
|
-
this.valid$.next(!!data.content);
|
|
2890
|
-
}
|
|
2891
|
-
}
|
|
2892
|
-
NoteModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NoteModalComponent, deps: [{ token: NotesService }, { token: i3$3.ModalService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2893
|
-
NoteModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: NoteModalComponent, selector: "valtimo-note-modal", inputs: { customData: "customData" }, outputs: { createNoteEvent: "createNoteEvent", editNoteEvent: "editNoteEvent" }, viewQueries: [{ propertyName: "noteModal", first: true, predicate: ["noteModal"], descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 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 #noteModal\n *ngIf=\"{disabled: disabled$ | async, valid: valid$ | async, modalType: modalType$ | async} as obs\"\n>\n <div role=\"header\">\n <div class=\"add-note-title\">\n <v-title [margin]=\"false\">{{\n (obs.modalType === 'add' ? 'dossier.notes.addNote' : 'dossier.notes.modifyNote') | translate\n }}</v-title>\n </div>\n </div>\n <div role=\"content\">\n <ng-container *ngTemplateOutlet=\"form\"></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 <ng-container\n *ngTemplateOutlet=\"\n obs.modalType === 'add' ? addNoteButton : editNoteButton;\n context: {obs: obs}\n \"\n ></ng-container>\n </div>\n </div>\n</v-modal>\n\n<ng-template #addNoteButton let-obs=\"obs\">\n <v-button\n (clickEvent)=\"emitNoteData()\"\n [disabled]=\"obs.disabled || !obs.valid\"\n mdiIcon=\"plus\"\n type=\"success\"\n >\n {{ 'dossier.notes.addNote' | translate }}\n </v-button>\n</ng-template>\n<ng-template #editNoteButton let-obs=\"obs\">\n <v-button\n [disabled]=\"obs.disabled || !obs.valid\"\n (clickEvent)=\"emitNoteData()\"\n mdiIcon=\"pencil\"\n type=\"success\"\n >\n {{ 'dossier.notes.modifyNote' | translate }}\n </v-button>\n</ng-template>\n\n<ng-template #form>\n <ng-container *ngIf=\"showForm$ | async\">\n <v-form (valueChange)=\"formValueChange($event)\">\n <v-input\n type=\"textarea\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'dossier.notes.input.content' | translate\"\n name=\"content\"\n [fullWidth]=\"true\"\n [rows]=\"10\"\n [defaultValue]=\"customData?.summaryTranslationKey || ''\"\n >\n </v-input>\n </v-form>\n </ng-container>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2023 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 */.buttons,.add-note-title{width:100%;display:flex;flex-direction:row;justify-content:space-between}.add-note-title{justify-content:center}\n"], dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i3$3.ModalComponent, selector: "v-modal", inputs: ["appearingDelayMs", "maxWidthPx", "hideFooter"], outputs: ["closeEvent"] }, { kind: "component", type: i3$3.TitleComponent, selector: "v-title", inputs: ["type", "margin", "fullWidth", "center"] }, { kind: "component", type: i3$3.ButtonComponent, selector: "v-button", inputs: ["type", "mdiIcon", "disabled", "title", "titleTranslationKey"], outputs: ["clickEvent"] }, { kind: "component", type: i3$3.InputComponent, selector: "v-input", inputs: ["name", "type", "title", "titleTranslationKey", "defaultValue", "widthPx", "fullWidth", "margin", "smallMargin", "disabled", "step", "min", "maxLength", "tooltip", "required", "hideNumberSpinBox", "smallLabel", "rows", "clear$"], outputs: ["valueChange"] }, { kind: "component", type: i3$3.FormComponent, selector: "v-form", inputs: ["className"], outputs: ["valueChange"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }] });
|
|
2894
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NoteModalComponent, decorators: [{
|
|
2895
|
-
type: Component,
|
|
2896
|
-
args: [{ selector: 'valtimo-note-modal', template: "<!--\n ~ Copyright 2015-2023 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 #noteModal\n *ngIf=\"{disabled: disabled$ | async, valid: valid$ | async, modalType: modalType$ | async} as obs\"\n>\n <div role=\"header\">\n <div class=\"add-note-title\">\n <v-title [margin]=\"false\">{{\n (obs.modalType === 'add' ? 'dossier.notes.addNote' : 'dossier.notes.modifyNote') | translate\n }}</v-title>\n </div>\n </div>\n <div role=\"content\">\n <ng-container *ngTemplateOutlet=\"form\"></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 <ng-container\n *ngTemplateOutlet=\"\n obs.modalType === 'add' ? addNoteButton : editNoteButton;\n context: {obs: obs}\n \"\n ></ng-container>\n </div>\n </div>\n</v-modal>\n\n<ng-template #addNoteButton let-obs=\"obs\">\n <v-button\n (clickEvent)=\"emitNoteData()\"\n [disabled]=\"obs.disabled || !obs.valid\"\n mdiIcon=\"plus\"\n type=\"success\"\n >\n {{ 'dossier.notes.addNote' | translate }}\n </v-button>\n</ng-template>\n<ng-template #editNoteButton let-obs=\"obs\">\n <v-button\n [disabled]=\"obs.disabled || !obs.valid\"\n (clickEvent)=\"emitNoteData()\"\n mdiIcon=\"pencil\"\n type=\"success\"\n >\n {{ 'dossier.notes.modifyNote' | translate }}\n </v-button>\n</ng-template>\n\n<ng-template #form>\n <ng-container *ngIf=\"showForm$ | async\">\n <v-form (valueChange)=\"formValueChange($event)\">\n <v-input\n type=\"textarea\"\n [margin]=\"true\"\n [required]=\"true\"\n [title]=\"'dossier.notes.input.content' | translate\"\n name=\"content\"\n [fullWidth]=\"true\"\n [rows]=\"10\"\n [defaultValue]=\"customData?.summaryTranslationKey || ''\"\n >\n </v-input>\n </v-form>\n </ng-container>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2023 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 */.buttons,.add-note-title{width:100%;display:flex;flex-direction:row;justify-content:space-between}.add-note-title{justify-content:center}\n"] }]
|
|
2897
|
-
}], ctorParameters: function () { return [{ type: NotesService }, { type: i3$3.ModalService }]; }, propDecorators: { noteModal: [{
|
|
2898
|
-
type: ViewChild,
|
|
2899
|
-
args: ['noteModal']
|
|
2900
|
-
}], customData: [{
|
|
2901
|
-
type: Input
|
|
2902
|
-
}], createNoteEvent: [{
|
|
2903
|
-
type: Output
|
|
2904
|
-
}], editNoteEvent: [{
|
|
2905
|
-
type: Output
|
|
2906
|
-
}] } });
|
|
2907
|
-
|
|
2908
|
-
/*
|
|
2909
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
2910
|
-
*
|
|
2911
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
2912
|
-
* you may not use this file except in compliance with the License.
|
|
2913
|
-
* You may obtain a copy of the License at
|
|
2914
|
-
*
|
|
2915
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
2916
|
-
*
|
|
2917
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
2918
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
2919
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2920
|
-
* See the License for the specific language governing permissions and
|
|
2921
|
-
* limitations under the License.
|
|
2922
|
-
*/
|
|
2923
|
-
class DossierDetailTabNotesComponent {
|
|
2924
|
-
constructor(route, notesService, translateService, promptService, toastrService) {
|
|
2925
|
-
this.route = route;
|
|
2926
|
-
this.notesService = notesService;
|
|
2927
|
-
this.translateService = translateService;
|
|
2928
|
-
this.promptService = promptService;
|
|
2929
|
-
this.toastrService = toastrService;
|
|
2930
|
-
this.timelineItems = [];
|
|
2931
|
-
this.actions = [
|
|
2932
|
-
{
|
|
2933
|
-
label: 'Edit',
|
|
2934
|
-
icon: 'mdi-pencil',
|
|
2935
|
-
callback: this.editNote.bind(this),
|
|
2936
|
-
},
|
|
2937
|
-
{
|
|
2938
|
-
label: 'Delete',
|
|
2939
|
-
icon: 'mdi-delete',
|
|
2940
|
-
callback: this.deleteNote.bind(this),
|
|
2941
|
-
},
|
|
2942
|
-
];
|
|
2943
|
-
this.loading$ = new BehaviorSubject(true);
|
|
2944
|
-
this.fields$ = new BehaviorSubject([]);
|
|
2945
|
-
this.customData$ = new BehaviorSubject({});
|
|
2946
|
-
this.documentId$ = this.route.params.pipe(map(params => params.documentId));
|
|
2947
|
-
this.currentPageAndSize$ = new BehaviorSubject({
|
|
2948
|
-
page: 0,
|
|
2949
|
-
size: 10,
|
|
2950
|
-
});
|
|
2951
|
-
this.pageSizes$ = new BehaviorSubject({
|
|
2952
|
-
collectionSize: 0,
|
|
2953
|
-
maxPaginationItemSize: 5,
|
|
2954
|
-
});
|
|
2955
|
-
this.pagination$ = combineLatest([
|
|
2956
|
-
this.currentPageAndSize$,
|
|
2957
|
-
this.pageSizes$,
|
|
2958
|
-
]).pipe(map(([currentPage, sizes]) => ({ ...currentPage, ...sizes, page: currentPage.page + 1 })));
|
|
2959
|
-
this.notes$ = combineLatest([
|
|
2960
|
-
this.documentId$,
|
|
2961
|
-
this.currentPageAndSize$,
|
|
2962
|
-
this.notesService.refresh$,
|
|
2963
|
-
this.notesService.refresh$,
|
|
2964
|
-
]).pipe(tap$1(() => (this.timelineItems = [])), switchMap$1(([documentId, currentPage]) => this.notesService.getDocumentNotes(documentId, {
|
|
2965
|
-
page: currentPage.page,
|
|
2966
|
-
size: currentPage.size,
|
|
2967
|
-
})), tap$1((res) => {
|
|
2968
|
-
this.timelineItems = [];
|
|
2969
|
-
this.pageSizes$.pipe(take$1(1)).subscribe(sizes => {
|
|
2970
|
-
this.pageSizes$.next({ ...sizes, collectionSize: res.totalElements });
|
|
2971
|
-
});
|
|
2972
|
-
}), map(res => res.content.map((note) => {
|
|
2973
|
-
const noteCreatedDate = moment(note.createdDate).locale(this.translateService.currentLang);
|
|
2974
|
-
this.timelineItems.push(new TimelineItemImpl(noteCreatedDate.format('DD MMM YYYY'), noteCreatedDate.format('HH:mm'), note.createdByUserFullName, noteCreatedDate.fromNow(), note.content, {}, { id: note.id }));
|
|
2975
|
-
return {
|
|
2976
|
-
...note,
|
|
2977
|
-
};
|
|
2978
|
-
})), tap$1(() => this.loading$.next(false)));
|
|
2979
|
-
}
|
|
2980
|
-
ngOnInit() {
|
|
2981
|
-
this.translateService.onLangChange.subscribe(() => {
|
|
2982
|
-
this.notesService.refresh();
|
|
2983
|
-
});
|
|
2984
|
-
}
|
|
2985
|
-
paginationClicked(newPageNumber) {
|
|
2986
|
-
this.currentPageAndSize$.pipe(take$1(1)).subscribe(currentPage => {
|
|
2987
|
-
this.currentPageAndSize$.next({ ...currentPage, page: newPageNumber - 1 });
|
|
2988
|
-
});
|
|
2989
|
-
}
|
|
2990
|
-
showAddModal() {
|
|
2991
|
-
this.customData$.next(null);
|
|
2992
|
-
this.notesService.setModalType('add');
|
|
2993
|
-
this.notesService.showModal();
|
|
2994
|
-
}
|
|
2995
|
-
createNewNote(content) {
|
|
2996
|
-
this.documentId$
|
|
2997
|
-
.pipe(take$1(1))
|
|
2998
|
-
.pipe(tap$1(documentId => {
|
|
2999
|
-
this.notesService.createDocumentNote(documentId, content).subscribe(() => {
|
|
3000
|
-
this.notesService.refresh();
|
|
3001
|
-
this.notesService.hideModal();
|
|
3002
|
-
});
|
|
3003
|
-
}))
|
|
3004
|
-
.subscribe();
|
|
3005
|
-
}
|
|
3006
|
-
editNoteEvent(content) {
|
|
3007
|
-
this.notesService.updateNote(content.data.customData.id, content.formData).subscribe(() => {
|
|
3008
|
-
this.notesService.refresh();
|
|
3009
|
-
this.notesService.hideModal();
|
|
3010
|
-
this.toastrService.success(this.translateService.instant('dossier.notes.editedMessage'));
|
|
3011
|
-
});
|
|
3012
|
-
}
|
|
3013
|
-
editNote(data) {
|
|
3014
|
-
this.customData$.next(data);
|
|
3015
|
-
this.notesService.setModalType('modify');
|
|
3016
|
-
this.notesService.showModal();
|
|
3017
|
-
}
|
|
3018
|
-
deleteNote(data) {
|
|
3019
|
-
this.promptService.openPrompt({
|
|
3020
|
-
headerText: this.translateService.instant('dossier.notes.deleteConfirmation.title'),
|
|
3021
|
-
bodyText: this.translateService.instant('dossier.notes.deleteConfirmation.description'),
|
|
3022
|
-
cancelButtonText: this.translateService.instant('dossier.deleteConfirmation.cancel'),
|
|
3023
|
-
confirmButtonText: this.translateService.instant('dossier.deleteConfirmation.delete'),
|
|
3024
|
-
cancelMdiIcon: 'cancel',
|
|
3025
|
-
confirmMdiIcon: 'delete',
|
|
3026
|
-
cancelButtonType: 'secondary',
|
|
3027
|
-
confirmButtonType: 'primary',
|
|
3028
|
-
closeOnConfirm: true,
|
|
3029
|
-
closeOnCancel: true,
|
|
3030
|
-
confirmCallBackFunction: () => {
|
|
3031
|
-
this.notesService.deleteNote(data.customData.id).subscribe(() => {
|
|
3032
|
-
this.notesService.refresh();
|
|
3033
|
-
this.toastrService.success(this.translateService.instant('dossier.notes.deleteConfirmation.deletedMessage'));
|
|
3034
|
-
});
|
|
3035
|
-
},
|
|
3036
|
-
});
|
|
3037
|
-
}
|
|
3038
|
-
}
|
|
3039
|
-
DossierDetailTabNotesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierDetailTabNotesComponent, deps: [{ token: i1$1.ActivatedRoute }, { token: NotesService }, { token: i6.TranslateService }, { token: i3$3.PromptService }, { token: i3$2.ToastrService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3040
|
-
DossierDetailTabNotesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: DossierDetailTabNotesComponent, selector: "valtimo-dossier-detail-tab-notes", ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 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\n class=\"notes\"\n *ngIf=\"{\n notes: notes$ | async,\n pagination: pagination$ | async,\n loading: loading$ | async\n } as obs\"\n>\n <button\n class=\"btn btn-space btn-primary mr-1 add-note\"\n type=\"button\"\n aria-haspopup=\"true\"\n aria-expanded=\"false\"\n (click)=\"showAddModal()\"\n [disabled]=\"obs.loading\"\n >\n <span>{{ 'dossier.notes.addNote' | translate }}</span>\n <i class=\"ml-1 icon mdi mdi-plus\"></i>\n </button>\n\n <div *ngIf=\"timelineItems\">\n <valtimo-timeline [actions]=\"actions\" [items]=\"timelineItems\"></valtimo-timeline>\n </div>\n\n <valtimo-spinner\n [useBootstrapSpinner]=\"false\"\n name=\"auditSpinner\"\n bdColor=\"rgba(125, 125, 125, 0.35)\"\n color=\"#264251\"\n type=\"square-jelly-box\"\n >\n </valtimo-spinner>\n\n <div class=\"d-flex justify-content-end row mr-0 ml-0\" *ngIf=\"obs.pagination\">\n <ngb-pagination\n *ngIf=\"obs.pagination.collectionSize > obs.pagination.size\"\n [collectionSize]=\"obs.pagination.collectionSize\"\n [(page)]=\"obs.pagination.page\"\n [pageSize]=\"obs.pagination.size\"\n [maxSize]=\"obs.pagination.size\"\n [rotate]=\"true\"\n (pageChange)=\"paginationClicked($event)\"\n ></ngb-pagination>\n </div>\n</div>\n\n<valtimo-note-modal\n [customData]=\"customData$ | async\"\n (editNoteEvent)=\"editNoteEvent($event)\"\n (createNoteEvent)=\"createNewNote($event)\"\n></valtimo-note-modal>\n", styles: ["/*!\n * Copyright 2015-2023 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 */.notes{position:relative}.add-note{position:absolute;right:0}\n"], dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$2.TimelineComponent, selector: "valtimo-timeline", inputs: ["items", "actions"] }, { kind: "component", type: i6$2.SpinnerComponent, selector: "valtimo-spinner", inputs: ["useBootstrapSpinner", "name", "type", "size", "color", "bdColor", "fullScreen", "noMarginTop"] }, { kind: "component", type: i8.NgbPagination, selector: "ngb-pagination", inputs: ["disabled", "boundaryLinks", "directionLinks", "ellipses", "rotate", "collectionSize", "maxSize", "page", "pageSize", "size"], outputs: ["pageChange"] }, { kind: "component", type: NoteModalComponent, selector: "valtimo-note-modal", inputs: ["customData"], outputs: ["createNoteEvent", "editNoteEvent"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }] });
|
|
3041
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierDetailTabNotesComponent, decorators: [{
|
|
3042
|
-
type: Component,
|
|
3043
|
-
args: [{ selector: 'valtimo-dossier-detail-tab-notes', template: "<!--\n ~ Copyright 2015-2023 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\n class=\"notes\"\n *ngIf=\"{\n notes: notes$ | async,\n pagination: pagination$ | async,\n loading: loading$ | async\n } as obs\"\n>\n <button\n class=\"btn btn-space btn-primary mr-1 add-note\"\n type=\"button\"\n aria-haspopup=\"true\"\n aria-expanded=\"false\"\n (click)=\"showAddModal()\"\n [disabled]=\"obs.loading\"\n >\n <span>{{ 'dossier.notes.addNote' | translate }}</span>\n <i class=\"ml-1 icon mdi mdi-plus\"></i>\n </button>\n\n <div *ngIf=\"timelineItems\">\n <valtimo-timeline [actions]=\"actions\" [items]=\"timelineItems\"></valtimo-timeline>\n </div>\n\n <valtimo-spinner\n [useBootstrapSpinner]=\"false\"\n name=\"auditSpinner\"\n bdColor=\"rgba(125, 125, 125, 0.35)\"\n color=\"#264251\"\n type=\"square-jelly-box\"\n >\n </valtimo-spinner>\n\n <div class=\"d-flex justify-content-end row mr-0 ml-0\" *ngIf=\"obs.pagination\">\n <ngb-pagination\n *ngIf=\"obs.pagination.collectionSize > obs.pagination.size\"\n [collectionSize]=\"obs.pagination.collectionSize\"\n [(page)]=\"obs.pagination.page\"\n [pageSize]=\"obs.pagination.size\"\n [maxSize]=\"obs.pagination.size\"\n [rotate]=\"true\"\n (pageChange)=\"paginationClicked($event)\"\n ></ngb-pagination>\n </div>\n</div>\n\n<valtimo-note-modal\n [customData]=\"customData$ | async\"\n (editNoteEvent)=\"editNoteEvent($event)\"\n (createNoteEvent)=\"createNewNote($event)\"\n></valtimo-note-modal>\n", styles: ["/*!\n * Copyright 2015-2023 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 */.notes{position:relative}.add-note{position:absolute;right:0}\n"] }]
|
|
3044
|
-
}], ctorParameters: function () { return [{ type: i1$1.ActivatedRoute }, { type: NotesService }, { type: i6.TranslateService }, { type: i3$3.PromptService }, { type: i3$2.ToastrService }]; } });
|
|
3045
|
-
|
|
3046
|
-
/*
|
|
3047
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
3048
|
-
*
|
|
3049
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
3050
|
-
* you may not use this file except in compliance with the License.
|
|
3051
|
-
* You may obtain a copy of the License at
|
|
3052
|
-
*
|
|
3053
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
3054
|
-
*
|
|
3055
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
3056
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
3057
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3058
|
-
* See the License for the specific language governing permissions and
|
|
3059
|
-
* limitations under the License.
|
|
3060
|
-
*/
|
|
3061
|
-
moment.locale(localStorage.getItem('langKey') || '');
|
|
3062
|
-
class DossierUpdateComponent {
|
|
3063
|
-
constructor(taskService, documentService, route, toastr, location, dossierService) {
|
|
3064
|
-
this.taskService = taskService;
|
|
3065
|
-
this.documentService = documentService;
|
|
3066
|
-
this.route = route;
|
|
3067
|
-
this.toastr = toastr;
|
|
3068
|
-
this.location = location;
|
|
3069
|
-
this.customDefinitions = {};
|
|
3070
|
-
const snapshot = this.route.snapshot.paramMap;
|
|
3071
|
-
this.documentDefinitionName = snapshot.get('documentDefinitionName') || '';
|
|
3072
|
-
this.documentId = snapshot.get('documentId') || '';
|
|
3073
|
-
this.taskId = snapshot.get('taskId') || '';
|
|
3074
|
-
this.implementationDefinitions = dossierService.getImplementationEnvironmentDefinitions(this.documentDefinitionName);
|
|
3075
|
-
this.loadDocumentDefinition(this.documentDefinitionName);
|
|
3076
|
-
this.loadDocument(this.documentId);
|
|
3077
|
-
}
|
|
3078
|
-
ngOnInit() {
|
|
3079
|
-
this.getTask(this.taskId);
|
|
3080
|
-
if (this.implementationDefinitions.definitions.detail.summary) {
|
|
3081
|
-
this.customDefinitions = this.implementationDefinitions.definitions.detail.summary;
|
|
3082
|
-
}
|
|
3083
|
-
}
|
|
3084
|
-
loadDocumentDefinition(name) {
|
|
3085
|
-
this.documentService.getDocumentDefinition(name).subscribe(definition => {
|
|
3086
|
-
this.schema = definition.schema;
|
|
3087
|
-
});
|
|
3088
|
-
}
|
|
3089
|
-
loadDocument(id) {
|
|
3090
|
-
this.documentService.getDocument(id).subscribe(document => {
|
|
3091
|
-
this.document = document;
|
|
3092
|
-
});
|
|
3093
|
-
}
|
|
3094
|
-
getTask(id) {
|
|
3095
|
-
this.taskService.getTask(id).subscribe(task => {
|
|
3096
|
-
this.task = task;
|
|
3097
|
-
this.task.task.created = moment(this.task.task.created).format('DD MMM YYYY HH:mm');
|
|
3098
|
-
this.page = {
|
|
3099
|
-
title: this.task.task.name,
|
|
3100
|
-
subtitle: `Created ${moment(this.task.task.created).fromNow()}`,
|
|
3101
|
-
};
|
|
3102
|
-
});
|
|
3103
|
-
}
|
|
3104
|
-
reset() {
|
|
3105
|
-
this.loadDocument(this.documentId);
|
|
3106
|
-
}
|
|
3107
|
-
back() {
|
|
3108
|
-
this.location.back();
|
|
3109
|
-
}
|
|
3110
|
-
save() {
|
|
3111
|
-
const document = {
|
|
3112
|
-
documentId: this.document.id,
|
|
3113
|
-
content: this.document.content,
|
|
3114
|
-
versionBasedOn: this.document.version,
|
|
3115
|
-
};
|
|
3116
|
-
this.documentService.modifyDocument(document).subscribe(result => {
|
|
3117
|
-
this.document = result.document;
|
|
3118
|
-
this.toastr.success('Document aangepast');
|
|
3119
|
-
this.location.back();
|
|
3120
|
-
});
|
|
3121
|
-
}
|
|
3122
|
-
submit(data) {
|
|
3123
|
-
// merge document content with formdata
|
|
3124
|
-
const mergedData = Object.assign({}, this.document.content, data);
|
|
3125
|
-
const documentData = {
|
|
3126
|
-
request: {
|
|
3127
|
-
documentId: this.document.id,
|
|
3128
|
-
content: mergedData,
|
|
3129
|
-
versionBasedOn: this.document.version,
|
|
3130
|
-
},
|
|
3131
|
-
taskId: this.task.task.id,
|
|
3132
|
-
};
|
|
3133
|
-
this.documentService.modifyDocumentAndCompleteTask(documentData).subscribe(result => {
|
|
3134
|
-
this.toastr.success(this.task.task.name + ' has successfully been completed');
|
|
3135
|
-
this.location.back();
|
|
3136
|
-
});
|
|
3137
|
-
}
|
|
3138
|
-
returnZero() {
|
|
3139
|
-
return 0;
|
|
3140
|
-
}
|
|
3141
|
-
}
|
|
3142
|
-
DossierUpdateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierUpdateComponent, deps: [{ token: i3.TaskService }, { token: i2.DocumentService }, { token: i1$1.ActivatedRoute }, { token: i3$2.ToastrService }, { token: i5.Location }, { token: DossierService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3143
|
-
DossierUpdateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: DossierUpdateComponent, selector: "valtimo-dossier-update", ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 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=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"col-12 px-0 mb-5\">\n <valtimo-widget [title]=\"page?.title\" [subtitle]=\"page?.subtitle\" [divider]=\"true\">\n <div class=\"card-body\">\n <!--view with custom definitions-->\n <div *ngIf=\"this.customDefinitions\">\n <div\n class=\"mb-4\"\n *ngFor=\"let definition of this.customDefinitions | keyvalue : returnZero\"\n ></div>\n <div class=\"row pt-3 mt-1\">\n <div class=\"col-sm-12\">\n <div class=\"text-right\">\n <button\n class=\"btn btn-space btn-default float-left\"\n type=\"button\"\n (click)=\"back()\"\n id=\"back-button\"\n >\n Back\n </button>\n <button\n class=\"btn btn-space btn-secondary\"\n type=\"button\"\n (click)=\"reset()\"\n id=\"reset-button\"\n >\n Reset\n </button>\n <button\n class=\"btn btn-space btn-primary\"\n type=\"button\"\n (click)=\"save()\"\n id=\"save-button\"\n >\n Save\n </button>\n <button\n class=\"btn btn-space btn-primary\"\n type=\"submit\"\n (click)=\"submit({})\"\n id=\"submit-button\"\n >\n Submit\n </button>\n </div>\n </div>\n </div>\n </div>\n\n <valtimo-camunda-form\n *ngIf=\"task?.formFields && !this.customDefinitions\"\n (submitted)=\"submit($event)\"\n [formFields]=\"task.formFields\"\n [componentName]=\"task.formLocation\"\n ></valtimo-camunda-form>\n </div>\n </valtimo-widget>\n </div>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$2.WidgetComponent, selector: "valtimo-widget", inputs: ["type", "name", "icon", "contrast", "divider", "title", "subtitle", "collapseAble", "collapse", "additionalClasses"] }, { kind: "component", type: i6$2.CamundaFormComponent, selector: "valtimo-camunda-form", inputs: ["componentName", "formFields"], outputs: ["submitted"] }, { kind: "pipe", type: i5.KeyValuePipe, name: "keyvalue" }] });
|
|
3144
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierUpdateComponent, decorators: [{
|
|
3145
|
-
type: Component,
|
|
3146
|
-
args: [{ selector: 'valtimo-dossier-update', template: "<!--\n ~ Copyright 2015-2023 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=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"col-12 px-0 mb-5\">\n <valtimo-widget [title]=\"page?.title\" [subtitle]=\"page?.subtitle\" [divider]=\"true\">\n <div class=\"card-body\">\n <!--view with custom definitions-->\n <div *ngIf=\"this.customDefinitions\">\n <div\n class=\"mb-4\"\n *ngFor=\"let definition of this.customDefinitions | keyvalue : returnZero\"\n ></div>\n <div class=\"row pt-3 mt-1\">\n <div class=\"col-sm-12\">\n <div class=\"text-right\">\n <button\n class=\"btn btn-space btn-default float-left\"\n type=\"button\"\n (click)=\"back()\"\n id=\"back-button\"\n >\n Back\n </button>\n <button\n class=\"btn btn-space btn-secondary\"\n type=\"button\"\n (click)=\"reset()\"\n id=\"reset-button\"\n >\n Reset\n </button>\n <button\n class=\"btn btn-space btn-primary\"\n type=\"button\"\n (click)=\"save()\"\n id=\"save-button\"\n >\n Save\n </button>\n <button\n class=\"btn btn-space btn-primary\"\n type=\"submit\"\n (click)=\"submit({})\"\n id=\"submit-button\"\n >\n Submit\n </button>\n </div>\n </div>\n </div>\n </div>\n\n <valtimo-camunda-form\n *ngIf=\"task?.formFields && !this.customDefinitions\"\n (submitted)=\"submit($event)\"\n [formFields]=\"task.formFields\"\n [componentName]=\"task.formLocation\"\n ></valtimo-camunda-form>\n </div>\n </valtimo-widget>\n </div>\n </div>\n</div>\n" }]
|
|
3147
|
-
}], ctorParameters: function () { return [{ type: i3.TaskService }, { type: i2.DocumentService }, { type: i1$1.ActivatedRoute }, { type: i3$2.ToastrService }, { type: i5.Location }, { type: DossierService }]; } });
|
|
3148
|
-
|
|
3149
|
-
/*
|
|
3150
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
3151
|
-
*
|
|
3152
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
3153
|
-
* you may not use this file except in compliance with the License.
|
|
3154
|
-
* You may obtain a copy of the License at
|
|
3155
|
-
*
|
|
3156
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
3157
|
-
*
|
|
3158
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
3159
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
3160
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3161
|
-
* See the License for the specific language governing permissions and
|
|
3162
|
-
* limitations under the License.
|
|
3163
|
-
*/
|
|
3164
|
-
const routes = [
|
|
3165
|
-
{
|
|
3166
|
-
path: 'dossiers/:documentDefinitionName',
|
|
3167
|
-
component: DossierListComponent,
|
|
3168
|
-
canActivate: [AuthGuardService],
|
|
3169
|
-
data: { title: 'Dossiers', roles: [ROLE_USER], customPageTitle: true },
|
|
3170
|
-
},
|
|
3171
|
-
{
|
|
3172
|
-
path: 'dossiers/:documentDefinitionName/document/:documentId/:tab',
|
|
3173
|
-
component: DossierDetailComponent,
|
|
3174
|
-
canActivate: [AuthGuardService],
|
|
3175
|
-
data: {
|
|
3176
|
-
title: 'Dossier details',
|
|
3177
|
-
parentPath: 'dossiers/:documentDefinitionName',
|
|
3178
|
-
roles: [ROLE_USER],
|
|
3179
|
-
},
|
|
3180
|
-
},
|
|
3181
|
-
{
|
|
3182
|
-
path: 'dossiers/:documentDefinitionName/document/:documentId/:tab/tasks/:taskId',
|
|
3183
|
-
component: DossierUpdateComponent,
|
|
3184
|
-
canActivate: [AuthGuardService],
|
|
3185
|
-
data: {
|
|
3186
|
-
title: 'Task details',
|
|
3187
|
-
parentPath: 'dossiers/:documentDefinitionName/document/:documentId/:tab',
|
|
3188
|
-
roles: [ROLE_USER],
|
|
3189
|
-
},
|
|
3190
|
-
},
|
|
3191
|
-
];
|
|
3192
|
-
class DossierRoutingModule {
|
|
3193
|
-
}
|
|
3194
|
-
DossierRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3195
|
-
DossierRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: DossierRoutingModule, imports: [CommonModule, i1$1.RouterModule], exports: [RouterModule] });
|
|
3196
|
-
DossierRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierRoutingModule, imports: [CommonModule, RouterModule.forChild(routes), RouterModule] });
|
|
3197
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierRoutingModule, decorators: [{
|
|
3198
|
-
type: NgModule,
|
|
3199
|
-
args: [{
|
|
3200
|
-
imports: [CommonModule, RouterModule.forChild(routes)],
|
|
3201
|
-
exports: [RouterModule],
|
|
3202
|
-
}]
|
|
3203
|
-
}] });
|
|
3204
|
-
|
|
3205
|
-
/*
|
|
3206
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
3207
|
-
*
|
|
3208
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
3209
|
-
* you may not use this file except in compliance with the License.
|
|
3210
|
-
* You may obtain a copy of the License at
|
|
3211
|
-
*
|
|
3212
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
3213
|
-
*
|
|
3214
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
3215
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
3216
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3217
|
-
* See the License for the specific language governing permissions and
|
|
3218
|
-
* limitations under the License.
|
|
3219
|
-
*/
|
|
3220
|
-
class DossierModule {
|
|
3221
|
-
static forRoot(tabsFactory) {
|
|
3222
|
-
return {
|
|
3223
|
-
ngModule: DossierModule,
|
|
3224
|
-
providers: [
|
|
3225
|
-
DossierService,
|
|
3226
|
-
TabService,
|
|
3227
|
-
{
|
|
3228
|
-
provide: TAB_MAP,
|
|
3229
|
-
useFactory: tabsFactory,
|
|
3230
|
-
},
|
|
3231
|
-
{
|
|
3232
|
-
provide: ANALYZE_FOR_ENTRY_COMPONENTS,
|
|
3233
|
-
useValue: Array.from(tabsFactory().values()),
|
|
3234
|
-
multi: true,
|
|
3235
|
-
},
|
|
3236
|
-
],
|
|
3237
|
-
};
|
|
3238
|
-
}
|
|
3239
|
-
}
|
|
3240
|
-
DossierModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3241
|
-
DossierModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: DossierModule, declarations: [DossierListComponent,
|
|
3242
|
-
DossierListActionsComponent,
|
|
3243
|
-
DossierDetailComponent,
|
|
3244
|
-
DossierDetailTabSummaryComponent,
|
|
3245
|
-
DossierDetailTabProgressComponent,
|
|
3246
|
-
DossierDetailTabAuditComponent,
|
|
3247
|
-
DossierDetailTabDocumentsComponent,
|
|
3248
|
-
DossierDetailTabContactMomentsComponent,
|
|
3249
|
-
DossierDetailTabZaakobjectenComponent,
|
|
3250
|
-
DossierDetailTabNotesComponent,
|
|
3251
|
-
DossierUpdateComponent,
|
|
3252
|
-
DossierProcessStartModalComponent,
|
|
3253
|
-
DossierSupportingProcessStartModalComponent,
|
|
3254
|
-
DossierDetailTabObjectTypeComponent,
|
|
3255
|
-
DossierDetailTabDocumentenApiDocumentsComponent,
|
|
3256
|
-
DossierDetailTabS3DocumentsComponent,
|
|
3257
|
-
DossierAssignUserComponent,
|
|
3258
|
-
NoteModalComponent], imports: [CommonModule,
|
|
3259
|
-
DossierRoutingModule,
|
|
3260
|
-
ListModule,
|
|
3261
|
-
WidgetModule,
|
|
3262
|
-
BpmnJsDiagramModule,
|
|
3263
|
-
TimelineModule,
|
|
3264
|
-
CamundaFormModule,
|
|
3265
|
-
ProcessModule,
|
|
3266
|
-
FilterSidebarModule,
|
|
3267
|
-
NgbButtonsModule,
|
|
3268
|
-
DataListModule,
|
|
3269
|
-
FormsModule,
|
|
3270
|
-
FormModule,
|
|
3271
|
-
FormIoModule,
|
|
3272
|
-
ModalModule,
|
|
3273
|
-
SpinnerModule, i6.TranslateModule, TaskModule,
|
|
3274
|
-
ModalModule,
|
|
3275
|
-
NgbTooltipModule,
|
|
3276
|
-
UploaderModule,
|
|
3277
|
-
DropzoneModule,
|
|
3278
|
-
NgbPaginationModule,
|
|
3279
|
-
ConfigModule,
|
|
3280
|
-
SelectModule,
|
|
3281
|
-
InputLabelModule,
|
|
3282
|
-
ParagraphModule,
|
|
3283
|
-
TableModule,
|
|
3284
|
-
ModalModule$1,
|
|
3285
|
-
TitleModule,
|
|
3286
|
-
ButtonModule,
|
|
3287
|
-
DocumentenApiMetadataModalModule,
|
|
3288
|
-
SearchableDropdownSelectModule,
|
|
3289
|
-
SearchFieldsModule,
|
|
3290
|
-
PageModule,
|
|
3291
|
-
FormModule,
|
|
3292
|
-
InputModule,
|
|
3293
|
-
FormModule$1,
|
|
3294
|
-
NgbModule,
|
|
3295
|
-
LoadingModule,
|
|
3296
|
-
ButtonModule$1,
|
|
3297
|
-
IconModule,
|
|
3298
|
-
FormLinkModule], exports: [DossierListComponent, DossierDetailComponent] });
|
|
3299
|
-
DossierModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierModule, imports: [CommonModule,
|
|
3300
|
-
DossierRoutingModule,
|
|
3301
|
-
ListModule,
|
|
3302
|
-
WidgetModule,
|
|
3303
|
-
BpmnJsDiagramModule,
|
|
3304
|
-
TimelineModule,
|
|
3305
|
-
CamundaFormModule,
|
|
3306
|
-
ProcessModule,
|
|
3307
|
-
FilterSidebarModule,
|
|
3308
|
-
NgbButtonsModule,
|
|
3309
|
-
DataListModule,
|
|
3310
|
-
FormsModule,
|
|
3311
|
-
FormModule,
|
|
3312
|
-
FormIoModule,
|
|
3313
|
-
ModalModule,
|
|
3314
|
-
SpinnerModule,
|
|
3315
|
-
TranslateModule.forRoot({
|
|
3316
|
-
loader: {
|
|
3317
|
-
provide: TranslateLoader,
|
|
3318
|
-
useFactory: HttpLoaderFactory,
|
|
3319
|
-
deps: [HttpClient],
|
|
3320
|
-
},
|
|
3321
|
-
}),
|
|
3322
|
-
TaskModule,
|
|
3323
|
-
ModalModule,
|
|
3324
|
-
NgbTooltipModule,
|
|
3325
|
-
UploaderModule,
|
|
3326
|
-
DropzoneModule,
|
|
3327
|
-
NgbPaginationModule,
|
|
3328
|
-
ConfigModule,
|
|
3329
|
-
SelectModule,
|
|
3330
|
-
InputLabelModule,
|
|
3331
|
-
ParagraphModule,
|
|
3332
|
-
TableModule,
|
|
3333
|
-
ModalModule$1,
|
|
3334
|
-
TitleModule,
|
|
3335
|
-
ButtonModule,
|
|
3336
|
-
DocumentenApiMetadataModalModule,
|
|
3337
|
-
SearchableDropdownSelectModule,
|
|
3338
|
-
SearchFieldsModule,
|
|
3339
|
-
PageModule,
|
|
3340
|
-
FormModule,
|
|
3341
|
-
InputModule,
|
|
3342
|
-
FormModule$1,
|
|
3343
|
-
NgbModule,
|
|
3344
|
-
LoadingModule,
|
|
3345
|
-
ButtonModule$1,
|
|
3346
|
-
IconModule,
|
|
3347
|
-
FormLinkModule] });
|
|
3348
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DossierModule, decorators: [{
|
|
3349
|
-
type: NgModule,
|
|
3350
|
-
args: [{
|
|
3351
|
-
declarations: [
|
|
3352
|
-
DossierListComponent,
|
|
3353
|
-
DossierListActionsComponent,
|
|
3354
|
-
DossierDetailComponent,
|
|
3355
|
-
DossierDetailTabSummaryComponent,
|
|
3356
|
-
DossierDetailTabProgressComponent,
|
|
3357
|
-
DossierDetailTabAuditComponent,
|
|
3358
|
-
DossierDetailTabDocumentsComponent,
|
|
3359
|
-
DossierDetailTabContactMomentsComponent,
|
|
3360
|
-
DossierDetailTabZaakobjectenComponent,
|
|
3361
|
-
DossierDetailTabNotesComponent,
|
|
3362
|
-
DossierUpdateComponent,
|
|
3363
|
-
DossierProcessStartModalComponent,
|
|
3364
|
-
DossierSupportingProcessStartModalComponent,
|
|
3365
|
-
DossierDetailTabObjectTypeComponent,
|
|
3366
|
-
DossierDetailTabDocumentenApiDocumentsComponent,
|
|
3367
|
-
DossierDetailTabS3DocumentsComponent,
|
|
3368
|
-
DossierAssignUserComponent,
|
|
3369
|
-
NoteModalComponent,
|
|
3370
|
-
],
|
|
3371
|
-
imports: [
|
|
3372
|
-
CommonModule,
|
|
3373
|
-
DossierRoutingModule,
|
|
3374
|
-
ListModule,
|
|
3375
|
-
WidgetModule,
|
|
3376
|
-
BpmnJsDiagramModule,
|
|
3377
|
-
TimelineModule,
|
|
3378
|
-
CamundaFormModule,
|
|
3379
|
-
ProcessModule,
|
|
3380
|
-
FilterSidebarModule,
|
|
3381
|
-
NgbButtonsModule,
|
|
3382
|
-
DataListModule,
|
|
3383
|
-
FormsModule,
|
|
3384
|
-
FormModule,
|
|
3385
|
-
FormIoModule,
|
|
3386
|
-
ModalModule,
|
|
3387
|
-
SpinnerModule,
|
|
3388
|
-
TranslateModule.forRoot({
|
|
3389
|
-
loader: {
|
|
3390
|
-
provide: TranslateLoader,
|
|
3391
|
-
useFactory: HttpLoaderFactory,
|
|
3392
|
-
deps: [HttpClient],
|
|
3393
|
-
},
|
|
3394
|
-
}),
|
|
3395
|
-
TaskModule,
|
|
3396
|
-
ModalModule,
|
|
3397
|
-
NgbTooltipModule,
|
|
3398
|
-
UploaderModule,
|
|
3399
|
-
DropzoneModule,
|
|
3400
|
-
NgbPaginationModule,
|
|
3401
|
-
ConfigModule,
|
|
3402
|
-
SelectModule,
|
|
3403
|
-
InputLabelModule,
|
|
3404
|
-
ParagraphModule,
|
|
3405
|
-
TableModule,
|
|
3406
|
-
ModalModule$1,
|
|
3407
|
-
TitleModule,
|
|
3408
|
-
ButtonModule,
|
|
3409
|
-
DocumentenApiMetadataModalModule,
|
|
3410
|
-
SearchableDropdownSelectModule,
|
|
3411
|
-
SearchFieldsModule,
|
|
3412
|
-
PageModule,
|
|
3413
|
-
FormModule,
|
|
3414
|
-
InputModule,
|
|
3415
|
-
FormModule$1,
|
|
3416
|
-
NgbModule,
|
|
3417
|
-
LoadingModule,
|
|
3418
|
-
ButtonModule$1,
|
|
3419
|
-
IconModule,
|
|
3420
|
-
FormLinkModule,
|
|
3421
|
-
],
|
|
3422
|
-
exports: [DossierListComponent, DossierDetailComponent],
|
|
3423
|
-
}]
|
|
3424
|
-
}] });
|
|
3425
|
-
|
|
3426
|
-
/*
|
|
3427
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
3428
|
-
*
|
|
3429
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
3430
|
-
* you may not use this file except in compliance with the License.
|
|
3431
|
-
* You may obtain a copy of the License at
|
|
3432
|
-
*
|
|
3433
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
3434
|
-
*
|
|
3435
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
3436
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
3437
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3438
|
-
* See the License for the specific language governing permissions and
|
|
3439
|
-
* limitations under the License.
|
|
3440
|
-
*/
|
|
3441
|
-
|
|
3442
|
-
/**
|
|
3443
|
-
* Generated bundle index. Do not edit.
|
|
3444
|
-
*/
|
|
3445
|
-
|
|
3446
|
-
export { DEFAULT_TABS, DefaultTabs, DossierColumnService, DossierDetailComponent, DossierDetailTabAuditComponent, DossierDetailTabContactMomentsComponent, DossierDetailTabDocumentsComponent, DossierDetailTabNotesComponent, DossierDetailTabProgressComponent, DossierDetailTabSummaryComponent, DossierDetailTabZaakobjectenComponent, DossierListAssigneeService, DossierListComponent, DossierListPaginationService, DossierListSearchService, DossierListService, DossierModule, DossierParameterService, DossierService, FileSortService, TAB_MAP, TabImpl, TabLoaderImpl, TabService, ZaakobjectenService };
|
|
3447
|
-
//# sourceMappingURL=valtimo-dossier.mjs.map
|