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