@valtimo/task 11.0.0 → 11.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/task-detail-modal/task-detail-modal.component.mjs +81 -72
- package/esm2022/lib/task-list/task-list.component.mjs +2 -2
- package/fesm2022/valtimo-task.mjs +118 -108
- package/fesm2022/valtimo-task.mjs.map +1 -1
- package/lib/task-detail-modal/task-detail-modal.component.d.ts +25 -28
- package/lib/task-detail-modal/task-detail-modal.component.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Injectable, EventEmitter, Component, Input, Output, ViewEncapsulation, ViewChild, NgModule } from '@angular/core';
|
|
3
|
-
import * as
|
|
3
|
+
import * as i5 from '@valtimo/security';
|
|
4
4
|
import { InterceptorSkip, AuthGuardService } from '@valtimo/security';
|
|
5
5
|
import * as i1 from '@angular/common/http';
|
|
6
6
|
import { HttpClient } from '@angular/common/http';
|
|
@@ -14,22 +14,22 @@ import * as i10 from '@ng-bootstrap/ng-bootstrap';
|
|
|
14
14
|
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
|
|
15
15
|
import * as i8$1 from '@ngx-translate/core';
|
|
16
16
|
import { TranslateModule, TranslateLoader } from '@ngx-translate/core';
|
|
17
|
-
import * as
|
|
17
|
+
import * as i6 from '@valtimo/components';
|
|
18
18
|
import { FormioOptionsImpl, CarbonListModule, PageHeaderModule, WidgetModule, SpinnerModule, SearchableDropdownSelectModule, CamundaFormModule, FormIoModule, ModalModule } from '@valtimo/components';
|
|
19
|
-
import * as
|
|
19
|
+
import * as i2$1 from '@valtimo/form-link';
|
|
20
20
|
import { FormLinkModule } from '@valtimo/form-link';
|
|
21
21
|
import * as i11 from 'carbon-components-angular';
|
|
22
22
|
import { LinkModule, TabsModule, ContentSwitcherModule } from 'carbon-components-angular';
|
|
23
|
-
import * as
|
|
23
|
+
import * as i1$1 from 'ngx-toastr';
|
|
24
24
|
import { ToastrModule } from 'ngx-toastr';
|
|
25
|
-
import { BehaviorSubject, Subscription, take, combineLatest, tap,
|
|
25
|
+
import { BehaviorSubject, Subscription, take, combineLatest, tap, distinctUntilChanged, switchMap, of } from 'rxjs';
|
|
26
26
|
import moment from 'moment';
|
|
27
|
-
import
|
|
28
|
-
import * as i3 from '@
|
|
29
|
-
import * as i5 from '@angular/router';
|
|
27
|
+
import { map, take as take$1 } from 'rxjs/operators';
|
|
28
|
+
import * as i3 from '@angular/router';
|
|
30
29
|
import { RouterModule } from '@angular/router';
|
|
31
|
-
import
|
|
30
|
+
import * as i7 from '@valtimo/document';
|
|
32
31
|
import * as i3$1 from 'ngx-logger';
|
|
32
|
+
import * as i4 from '@valtimo/access-control';
|
|
33
33
|
|
|
34
34
|
/*
|
|
35
35
|
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
@@ -276,7 +276,7 @@ class AssignUserToTaskComponent {
|
|
|
276
276
|
this.disabled$.next(true);
|
|
277
277
|
}
|
|
278
278
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AssignUserToTaskComponent, deps: [{ token: TaskService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
279
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: AssignUserToTaskComponent, selector: "valtimo-assign-user-to-task", inputs: { taskId: "taskId", assigneeEmail: "assigneeEmail" }, outputs: { assignmentOfTaskChanged: "assignmentOfTaskChanged" }, 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: candidateUsersForTask$ | async,\n disabled: disabled$ | async,\n emailOnServer: assignedEmailOnServer$ | async\n } as obs\"\n>\n <div class=\"container-fluid\">\n <div class=\"row mt-2 mb-2\">\n <div class=\"col-12 pl-0 d-flex flex-row align-items-center\">\n <valtimo-searchable-dropdown-select\n *ngIf=\"obs.candidateUsers; else loading\"\n [style]=\"'underlinedText'\"\n [items]=\"mapUsersForDropdown(obs.candidateUsers)\"\n [buttonText]=\"'assignTask.header' | translate\"\n [searchText]=\"'interface.typeToSearch' | translate\"\n [noResultsText]=\"'interface.noSearchResults' | translate\"\n [disabled]=\"obs.disabled\"\n [selectedText]=\"'assignTask.assignedTo' | translate\"\n [selectedTextValue]=\"assignedUserFullName$ | async\"\n [clearSelectionButtonTitle]=\"'assignTask.remove' | translate\"\n [hasSelection]=\"userEmailToAssign === obs.emailOnServer && obs.emailOnServer !== null\"\n [width]=\"250\"\n (itemSelected)=\"assignTask($event)\"\n (clearSelection)=\"unassignTask()\"\n >\n </valtimo-searchable-dropdown-select>\n </div>\n </div>\n </div>\n</ng-container>\n\n<ng-template #loading>\n <h5>\n <b>{{ 'assignTask.fetchingUsers' | translate }}</b>\n </h5>\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 */.container-fluid{color:#959595}i{font-size:13px}\n"], dependencies: [{ kind: "directive", type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type:
|
|
279
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: AssignUserToTaskComponent, selector: "valtimo-assign-user-to-task", inputs: { taskId: "taskId", assigneeEmail: "assigneeEmail" }, outputs: { assignmentOfTaskChanged: "assignmentOfTaskChanged" }, 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: candidateUsersForTask$ | async,\n disabled: disabled$ | async,\n emailOnServer: assignedEmailOnServer$ | async\n } as obs\"\n>\n <div class=\"container-fluid\">\n <div class=\"row mt-2 mb-2\">\n <div class=\"col-12 pl-0 d-flex flex-row align-items-center\">\n <valtimo-searchable-dropdown-select\n *ngIf=\"obs.candidateUsers; else loading\"\n [style]=\"'underlinedText'\"\n [items]=\"mapUsersForDropdown(obs.candidateUsers)\"\n [buttonText]=\"'assignTask.header' | translate\"\n [searchText]=\"'interface.typeToSearch' | translate\"\n [noResultsText]=\"'interface.noSearchResults' | translate\"\n [disabled]=\"obs.disabled\"\n [selectedText]=\"'assignTask.assignedTo' | translate\"\n [selectedTextValue]=\"assignedUserFullName$ | async\"\n [clearSelectionButtonTitle]=\"'assignTask.remove' | translate\"\n [hasSelection]=\"userEmailToAssign === obs.emailOnServer && obs.emailOnServer !== null\"\n [width]=\"250\"\n (itemSelected)=\"assignTask($event)\"\n (clearSelection)=\"unassignTask()\"\n >\n </valtimo-searchable-dropdown-select>\n </div>\n </div>\n </div>\n</ng-container>\n\n<ng-template #loading>\n <h5>\n <b>{{ 'assignTask.fetchingUsers' | translate }}</b>\n </h5>\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 */.container-fluid{color:#959595}i{font-size:13px}\n"], dependencies: [{ kind: "directive", type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6.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: i8.AsyncPipe, name: "async" }, { kind: "pipe", type: i8$1.TranslatePipe, name: "translate" }] }); }
|
|
280
280
|
}
|
|
281
281
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AssignUserToTaskComponent, decorators: [{
|
|
282
282
|
type: Component,
|
|
@@ -289,39 +289,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
289
289
|
type: Output
|
|
290
290
|
}] } });
|
|
291
291
|
|
|
292
|
-
/*
|
|
293
|
-
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
294
|
-
*
|
|
295
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
296
|
-
* you may not use this file except in compliance with the License.
|
|
297
|
-
* You may obtain a copy of the License at
|
|
298
|
-
*
|
|
299
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
300
|
-
*
|
|
301
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
302
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
303
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
304
|
-
* See the License for the specific language governing permissions and
|
|
305
|
-
* limitations under the License.
|
|
306
|
-
*/
|
|
307
|
-
var PERMISSION_ACTION;
|
|
308
|
-
(function (PERMISSION_ACTION) {
|
|
309
|
-
PERMISSION_ACTION["assign"] = "assign";
|
|
310
|
-
PERMISSION_ACTION["view"] = "view";
|
|
311
|
-
})(PERMISSION_ACTION || (PERMISSION_ACTION = {}));
|
|
312
|
-
var TASK_DETAIL_PERMISSION_RESOURCE;
|
|
313
|
-
(function (TASK_DETAIL_PERMISSION_RESOURCE) {
|
|
314
|
-
TASK_DETAIL_PERMISSION_RESOURCE["task"] = "com.ritense.valtimo.camunda.domain.CamundaTask";
|
|
315
|
-
})(TASK_DETAIL_PERMISSION_RESOURCE || (TASK_DETAIL_PERMISSION_RESOURCE = {}));
|
|
316
|
-
const CAN_ASSIGN_TASK_PERMISSION = {
|
|
317
|
-
action: PERMISSION_ACTION.assign,
|
|
318
|
-
resource: TASK_DETAIL_PERMISSION_RESOURCE.task,
|
|
319
|
-
};
|
|
320
|
-
const CAN_VIEW_TASK_PERMISSION = {
|
|
321
|
-
action: PERMISSION_ACTION.view,
|
|
322
|
-
resource: TASK_DETAIL_PERMISSION_RESOURCE.task,
|
|
323
|
-
};
|
|
324
|
-
|
|
325
292
|
/*
|
|
326
293
|
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
327
294
|
*
|
|
@@ -339,33 +306,37 @@ const CAN_VIEW_TASK_PERMISSION = {
|
|
|
339
306
|
*/
|
|
340
307
|
moment.locale(localStorage.getItem('langKey') || '');
|
|
341
308
|
class TaskDetailModalComponent {
|
|
342
|
-
constructor(
|
|
343
|
-
this.
|
|
344
|
-
this.modalService = modalService;
|
|
345
|
-
this.permissionService = permissionService;
|
|
309
|
+
constructor(toastr, processLinkService, router, taskService, userProviderService, modalService, stateService, documentService, translateService) {
|
|
310
|
+
this.toastr = toastr;
|
|
346
311
|
this.processLinkService = processLinkService;
|
|
347
312
|
this.router = router;
|
|
348
|
-
this.stateService = stateService;
|
|
349
313
|
this.taskService = taskService;
|
|
350
|
-
this.toastr = toastr;
|
|
351
|
-
this.translateService = translateService;
|
|
352
314
|
this.userProviderService = userProviderService;
|
|
315
|
+
this.modalService = modalService;
|
|
316
|
+
this.stateService = stateService;
|
|
317
|
+
this.documentService = documentService;
|
|
318
|
+
this.translateService = translateService;
|
|
353
319
|
this.formSubmit = new EventEmitter();
|
|
354
320
|
this.assignmentOfTaskChanged = new EventEmitter();
|
|
355
|
-
this.
|
|
356
|
-
this.
|
|
357
|
-
this.
|
|
358
|
-
this.
|
|
359
|
-
this.
|
|
360
|
-
this.
|
|
361
|
-
this.processLinkIsFormFlow$ = this._taskProcessLinkType$.pipe(map(type => type === 'form-flow'));
|
|
321
|
+
this.task$ = new BehaviorSubject(null);
|
|
322
|
+
this.formDefinition$ = new BehaviorSubject(undefined);
|
|
323
|
+
this.formFlowInstanceId$ = new BehaviorSubject(undefined);
|
|
324
|
+
this.page$ = new BehaviorSubject(null);
|
|
325
|
+
this.formioOptions$ = new BehaviorSubject(null);
|
|
326
|
+
this.errorMessage$ = new BehaviorSubject(undefined);
|
|
362
327
|
this.isAdmin$ = this.userProviderService
|
|
363
328
|
.getUserSubject()
|
|
364
329
|
.pipe(map(userIdentity => userIdentity?.roles?.includes('ROLE_ADMIN')));
|
|
330
|
+
this.formIoFormData$ = new BehaviorSubject(null);
|
|
365
331
|
this.loading$ = new BehaviorSubject(true);
|
|
332
|
+
this.taskProcessLinkType$ = new BehaviorSubject(null);
|
|
333
|
+
this.processLinkIsForm$ = this.taskProcessLinkType$.pipe(map(type => type === 'form'));
|
|
334
|
+
this.processLinkIsFormFlow$ = this.taskProcessLinkType$.pipe(map(type => type === 'form-flow'));
|
|
335
|
+
this.processLinkId$ = new BehaviorSubject(undefined);
|
|
366
336
|
this._subscriptions = new Subscription();
|
|
367
|
-
|
|
368
|
-
|
|
337
|
+
const options = new FormioOptionsImpl();
|
|
338
|
+
options.disableAlerts = true;
|
|
339
|
+
this.formioOptions$.next(options);
|
|
369
340
|
}
|
|
370
341
|
ngAfterViewInit() {
|
|
371
342
|
this._subscriptions.add(this.modal.modalShowing$
|
|
@@ -382,21 +353,19 @@ class TaskDetailModalComponent {
|
|
|
382
353
|
this._subscriptions.unsubscribe();
|
|
383
354
|
}
|
|
384
355
|
openTaskDetails(task) {
|
|
385
|
-
this.canAssign$ = this.permissionService.requestPermission(CAN_ASSIGN_TASK_PERMISSION, {
|
|
386
|
-
resource: TASK_DETAIL_PERMISSION_RESOURCE.task,
|
|
387
|
-
identifier: task.id,
|
|
388
|
-
});
|
|
389
356
|
this.resetTaskProcessLinkType();
|
|
390
357
|
this.resetFormDefinition();
|
|
391
358
|
this.getTaskProcessLink(task.id);
|
|
392
359
|
this.setDocumentDefinitionNameInService(task);
|
|
393
|
-
|
|
394
|
-
this.
|
|
395
|
-
this.
|
|
360
|
+
const documentId = task.businessKey;
|
|
361
|
+
this.stateService.setDocumentId(documentId);
|
|
362
|
+
this.task$.next(task);
|
|
363
|
+
this.page$.next({
|
|
396
364
|
title: task.name,
|
|
397
365
|
subtitle: `${this.translateService.instant('taskDetail.taskCreated')} ${task.created}`,
|
|
398
|
-
};
|
|
399
|
-
|
|
366
|
+
});
|
|
367
|
+
//only load from formlink when process link failed for backwards compatibility
|
|
368
|
+
if (!this.taskProcessLinkType$.getValue()) {
|
|
400
369
|
this.modal.show();
|
|
401
370
|
}
|
|
402
371
|
}
|
|
@@ -409,31 +378,39 @@ class TaskDetailModalComponent {
|
|
|
409
378
|
this.formIoFormData$.next(event.data);
|
|
410
379
|
}
|
|
411
380
|
}
|
|
412
|
-
completeTask() {
|
|
413
|
-
this.toastr.success(`${this.task?.name} ${this.translateService.instant('taskDetail.taskCompleted')}`);
|
|
414
|
-
this.modal.hide();
|
|
415
|
-
this.task = null;
|
|
416
|
-
this.formSubmit.emit();
|
|
417
|
-
}
|
|
418
381
|
onSubmit(submission) {
|
|
419
382
|
if (submission.data) {
|
|
420
383
|
this.formIoFormData$.next(submission.data);
|
|
421
384
|
}
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
this.
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
385
|
+
combineLatest([this.processLinkId$, this.taskProcessLinkType$, this.task$])
|
|
386
|
+
.pipe(take$1(1))
|
|
387
|
+
.subscribe(([processLinkId, taskProcessLinkType, task]) => {
|
|
388
|
+
if (taskProcessLinkType === 'form') {
|
|
389
|
+
if (processLinkId) {
|
|
390
|
+
this.processLinkService
|
|
391
|
+
.submitForm(processLinkId, submission.data, task.businessKey, task.id)
|
|
392
|
+
.subscribe({
|
|
393
|
+
next: (_) => {
|
|
394
|
+
this.completeTask();
|
|
395
|
+
},
|
|
396
|
+
error: errors => {
|
|
397
|
+
this.form.showErrors(errors);
|
|
398
|
+
},
|
|
399
|
+
});
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
});
|
|
403
|
+
}
|
|
404
|
+
completeTask() {
|
|
405
|
+
this.task$.pipe(take$1(1)).subscribe(task => {
|
|
406
|
+
this.toastr.success(`${task.name} ${this.translateService.instant('taskDetail.taskCompleted')}`);
|
|
407
|
+
this.modal.hide();
|
|
408
|
+
this.task$.next(null);
|
|
409
|
+
this.formSubmit.emit();
|
|
410
|
+
});
|
|
434
411
|
}
|
|
435
412
|
resetFormDefinition() {
|
|
436
|
-
this.formDefinition
|
|
413
|
+
this.formDefinition$.next(null);
|
|
437
414
|
this.loading$.next(true);
|
|
438
415
|
}
|
|
439
416
|
getTaskProcessLink(taskId) {
|
|
@@ -442,13 +419,13 @@ class TaskDetailModalComponent {
|
|
|
442
419
|
if (res != null) {
|
|
443
420
|
switch (res?.type) {
|
|
444
421
|
case 'form':
|
|
445
|
-
this.
|
|
446
|
-
this.
|
|
422
|
+
this.taskProcessLinkType$.next('form');
|
|
423
|
+
this.processLinkId$.next(res.processLinkId);
|
|
447
424
|
this.setFormDefinitionAndOpenModal(res.properties.prefilledForm);
|
|
448
425
|
break;
|
|
449
426
|
case 'form-flow':
|
|
450
|
-
this.
|
|
451
|
-
this.formFlowInstanceId
|
|
427
|
+
this.taskProcessLinkType$.next('form-flow');
|
|
428
|
+
this.formFlowInstanceId$.next(res.properties.formFlowInstanceId);
|
|
452
429
|
break;
|
|
453
430
|
}
|
|
454
431
|
this.loading$.next(false);
|
|
@@ -466,23 +443,23 @@ class TaskDetailModalComponent {
|
|
|
466
443
|
this.taskService.getTaskProcessLinkV1(taskId).subscribe(resV1 => {
|
|
467
444
|
switch (resV1?.type) {
|
|
468
445
|
case 'form':
|
|
469
|
-
this.
|
|
446
|
+
this.taskProcessLinkType$.next('form');
|
|
470
447
|
break;
|
|
471
448
|
case 'form-flow':
|
|
472
|
-
this.
|
|
473
|
-
this.formFlowInstanceId
|
|
449
|
+
this.taskProcessLinkType$.next('form-flow');
|
|
450
|
+
this.formFlowInstanceId$.next(resV1.properties.formFlowInstanceId);
|
|
474
451
|
break;
|
|
475
452
|
}
|
|
476
453
|
this.loading$.next(false);
|
|
477
454
|
});
|
|
478
455
|
}
|
|
479
456
|
resetTaskProcessLinkType() {
|
|
480
|
-
this.
|
|
481
|
-
this.
|
|
457
|
+
this.taskProcessLinkType$.next(null);
|
|
458
|
+
this.processLinkId$.next(null);
|
|
482
459
|
}
|
|
483
460
|
setFormDefinitionAndOpenModal(formDefinition) {
|
|
484
|
-
this.
|
|
485
|
-
this.formDefinition
|
|
461
|
+
this.taskProcessLinkType$.next('form');
|
|
462
|
+
this.formDefinition$.next(formDefinition);
|
|
486
463
|
this.modal.show();
|
|
487
464
|
}
|
|
488
465
|
setDocumentDefinitionNameInService(task) {
|
|
@@ -494,13 +471,13 @@ class TaskDetailModalComponent {
|
|
|
494
471
|
this.stateService.setDocumentDefinitionName(documentDefinitionName);
|
|
495
472
|
});
|
|
496
473
|
}
|
|
497
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TaskDetailModalComponent, deps: [{ token: i1$1.
|
|
498
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TaskDetailModalComponent, selector: "valtimo-task-detail-modal", outputs: { formSubmit: "formSubmit", assignmentOfTaskChanged: "assignmentOfTaskChanged" }, viewQueries: [{ propertyName: "form", first: true, predicate: ["form"], descendants: true }, { propertyName: "formFlow", first: true, predicate: ["formFlow"], descendants: true }, { propertyName: "modal", first: true, predicate: ["taskDetailModal"], 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 #taskDetailModal\n *ngIf=\"{\n loading: loading$ | async\n } as obs\"\n elementId=\"taskDetailModal\"\n [title]=\"page?.title\"\n [subtitle]=\"page?.subtitle\"\n [templateBelowSubtitle]=\"assignUserToTask\"\n>\n <div body *ngIf=\"formDefinition &&
|
|
474
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TaskDetailModalComponent, deps: [{ token: i1$1.ToastrService }, { token: i2$1.ProcessLinkService }, { token: i3.Router }, { token: TaskService }, { token: i5.UserProviderService }, { token: i6.ValtimoModalService }, { token: i6.FormIoStateService }, { token: i7.DocumentService }, { token: i8$1.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
475
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TaskDetailModalComponent, selector: "valtimo-task-detail-modal", outputs: { formSubmit: "formSubmit", assignmentOfTaskChanged: "assignmentOfTaskChanged" }, viewQueries: [{ propertyName: "form", first: true, predicate: ["form"], descendants: true }, { propertyName: "formFlow", first: true, predicate: ["formFlow"], descendants: true }, { propertyName: "modal", first: true, predicate: ["taskDetailModal"], 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 #taskDetailModal\n *ngIf=\"{\n loading: loading$ | async,\n page: page$ | async,\n task: task$ | async,\n formDefinition: formDefinition$ | async,\n processLinkIsForm: processLinkIsForm$ | async,\n formioOptions: formioOptions$ | async,\n processLinkIsFormFlow: processLinkIsFormFlow$ | async,\n formFlowInstanceId: formFlowInstanceId$ | async,\n errorMessage: errorMessage$ | async\n } as obs\"\n elementId=\"taskDetailModal\"\n [title]=\"obs.page?.title\"\n [subtitle]=\"obs.page?.subtitle\"\n [templateBelowSubtitle]=\"assignUserToTask\"\n>\n <div body *ngIf=\"obs.formDefinition && obs.processLinkIsForm\">\n <valtimo-form-io\n #form\n [form]=\"obs.formDefinition\"\n (submit)=\"onSubmit($event)\"\n (change)=\"onChange($event)\"\n [options]=\"obs.formioOptions\"\n ></valtimo-form-io>\n </div>\n <div body *ngIf=\"obs.processLinkIsFormFlow\">\n <valtimo-form-flow\n #formFlow\n [formIoFormData]=\"formIoFormData$\"\n [formFlowInstanceId]=\"obs.formFlowInstanceId\"\n (formFlowComplete)=\"completeTask()\"\n ></valtimo-form-flow>\n </div>\n <div body *ngIf=\"obs.loading\">\n <div class=\"text-black mb-0 p-3 text-center\">\n {{ 'formManagement.loading' | translate }}\n </div>\n </div>\n <div\n body\n *ngIf=\"\n obs.loading === false && !obs.formDefinition && !obs.formFlowInstanceId && !obs.errorMessage\n \"\n >\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>\n <div body *ngIf=\"obs.errorMessage\">\n <div class=\"bg-danger text-black mb-0 p-3 text-center\">\n {{ obs.errorMessage }}\n </div>\n </div>\n <div footer>\n <div class=\"mb-0 p-3 text-center\" *ngIf=\"!!obs.formDefinition\">\n <button\n class=\"btn btn-secondary btn-space\"\n type=\"button\"\n (click)=\"gotoProcessLinkScreen()\"\n id=\"process-link-button\"\n >\n {{ 'formManagement.gotoProcessLinksButton' | translate }}\n </button>\n </div>\n </div>\n</valtimo-modal>\n\n<ng-template #assignUserToTask>\n <ng-container *ngIf=\"task$ | async as task\">\n <valtimo-assign-user-to-task\n *ngIf=\"task && assignmentOfTaskChanged\"\n [taskId]=\"task.id\"\n [assigneeEmail]=\"task.assignee\"\n (assignmentOfTaskChanged)=\"assignmentOfTaskChanged.emit()\"\n ></valtimo-assign-user-to-task>\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 */#taskDetailModal .formio-component-submit{text-align:right}\n"], dependencies: [{ kind: "directive", type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6.FormioComponent, selector: "valtimo-form-io", inputs: ["options", "submission", "form", "readOnly", "formRefresh$"], outputs: ["submit", "change"] }, { kind: "component", type: i6.ModalComponent, selector: "valtimo-modal", inputs: ["elementId", "title", "subtitle", "templateBelowSubtitle", "showFooter"] }, { kind: "component", type: i2$1.FormFlowComponent, selector: "valtimo-form-flow", inputs: ["formIoFormData", "formFlowInstanceId"], outputs: ["formFlowComplete"] }, { kind: "component", type: AssignUserToTaskComponent, selector: "valtimo-assign-user-to-task", inputs: ["taskId", "assigneeEmail"], outputs: ["assignmentOfTaskChanged"] }, { kind: "pipe", type: i8.AsyncPipe, name: "async" }, { kind: "pipe", type: i8$1.TranslatePipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
499
476
|
}
|
|
500
477
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TaskDetailModalComponent, decorators: [{
|
|
501
478
|
type: Component,
|
|
502
|
-
args: [{ selector: 'valtimo-task-detail-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 #taskDetailModal\n *ngIf=\"{\n loading: loading$ | async\n } as obs\"\n elementId=\"taskDetailModal\"\n [title]=\"page?.title\"\n [subtitle]=\"page?.subtitle\"\n [templateBelowSubtitle]=\"assignUserToTask\"\n>\n <div body *ngIf=\"formDefinition &&
|
|
503
|
-
}], ctorParameters: function () { return [{ type: i1$1.
|
|
479
|
+
args: [{ selector: 'valtimo-task-detail-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 #taskDetailModal\n *ngIf=\"{\n loading: loading$ | async,\n page: page$ | async,\n task: task$ | async,\n formDefinition: formDefinition$ | async,\n processLinkIsForm: processLinkIsForm$ | async,\n formioOptions: formioOptions$ | async,\n processLinkIsFormFlow: processLinkIsFormFlow$ | async,\n formFlowInstanceId: formFlowInstanceId$ | async,\n errorMessage: errorMessage$ | async\n } as obs\"\n elementId=\"taskDetailModal\"\n [title]=\"obs.page?.title\"\n [subtitle]=\"obs.page?.subtitle\"\n [templateBelowSubtitle]=\"assignUserToTask\"\n>\n <div body *ngIf=\"obs.formDefinition && obs.processLinkIsForm\">\n <valtimo-form-io\n #form\n [form]=\"obs.formDefinition\"\n (submit)=\"onSubmit($event)\"\n (change)=\"onChange($event)\"\n [options]=\"obs.formioOptions\"\n ></valtimo-form-io>\n </div>\n <div body *ngIf=\"obs.processLinkIsFormFlow\">\n <valtimo-form-flow\n #formFlow\n [formIoFormData]=\"formIoFormData$\"\n [formFlowInstanceId]=\"obs.formFlowInstanceId\"\n (formFlowComplete)=\"completeTask()\"\n ></valtimo-form-flow>\n </div>\n <div body *ngIf=\"obs.loading\">\n <div class=\"text-black mb-0 p-3 text-center\">\n {{ 'formManagement.loading' | translate }}\n </div>\n </div>\n <div\n body\n *ngIf=\"\n obs.loading === false && !obs.formDefinition && !obs.formFlowInstanceId && !obs.errorMessage\n \"\n >\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>\n <div body *ngIf=\"obs.errorMessage\">\n <div class=\"bg-danger text-black mb-0 p-3 text-center\">\n {{ obs.errorMessage }}\n </div>\n </div>\n <div footer>\n <div class=\"mb-0 p-3 text-center\" *ngIf=\"!!obs.formDefinition\">\n <button\n class=\"btn btn-secondary btn-space\"\n type=\"button\"\n (click)=\"gotoProcessLinkScreen()\"\n id=\"process-link-button\"\n >\n {{ 'formManagement.gotoProcessLinksButton' | translate }}\n </button>\n </div>\n </div>\n</valtimo-modal>\n\n<ng-template #assignUserToTask>\n <ng-container *ngIf=\"task$ | async as task\">\n <valtimo-assign-user-to-task\n *ngIf=\"task && assignmentOfTaskChanged\"\n [taskId]=\"task.id\"\n [assigneeEmail]=\"task.assignee\"\n (assignmentOfTaskChanged)=\"assignmentOfTaskChanged.emit()\"\n ></valtimo-assign-user-to-task>\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 */#taskDetailModal .formio-component-submit{text-align:right}\n"] }]
|
|
480
|
+
}], ctorParameters: function () { return [{ type: i1$1.ToastrService }, { type: i2$1.ProcessLinkService }, { type: i3.Router }, { type: TaskService }, { type: i5.UserProviderService }, { type: i6.ValtimoModalService }, { type: i6.FormIoStateService }, { type: i7.DocumentService }, { type: i8$1.TranslateService }]; }, propDecorators: { form: [{
|
|
504
481
|
type: ViewChild,
|
|
505
482
|
args: ['form']
|
|
506
483
|
}], formFlow: [{
|
|
@@ -515,6 +492,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
515
492
|
type: Output
|
|
516
493
|
}] } });
|
|
517
494
|
|
|
495
|
+
/*
|
|
496
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
497
|
+
*
|
|
498
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
499
|
+
* you may not use this file except in compliance with the License.
|
|
500
|
+
* You may obtain a copy of the License at
|
|
501
|
+
*
|
|
502
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
503
|
+
*
|
|
504
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
505
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
506
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
507
|
+
* See the License for the specific language governing permissions and
|
|
508
|
+
* limitations under the License.
|
|
509
|
+
*/
|
|
510
|
+
var PERMISSION_ACTION;
|
|
511
|
+
(function (PERMISSION_ACTION) {
|
|
512
|
+
PERMISSION_ACTION["assign"] = "assign";
|
|
513
|
+
PERMISSION_ACTION["view"] = "view";
|
|
514
|
+
})(PERMISSION_ACTION || (PERMISSION_ACTION = {}));
|
|
515
|
+
var TASK_DETAIL_PERMISSION_RESOURCE;
|
|
516
|
+
(function (TASK_DETAIL_PERMISSION_RESOURCE) {
|
|
517
|
+
TASK_DETAIL_PERMISSION_RESOURCE["task"] = "com.ritense.valtimo.camunda.domain.CamundaTask";
|
|
518
|
+
})(TASK_DETAIL_PERMISSION_RESOURCE || (TASK_DETAIL_PERMISSION_RESOURCE = {}));
|
|
519
|
+
const CAN_ASSIGN_TASK_PERMISSION = {
|
|
520
|
+
action: PERMISSION_ACTION.assign,
|
|
521
|
+
resource: TASK_DETAIL_PERMISSION_RESOURCE.task,
|
|
522
|
+
};
|
|
523
|
+
const CAN_VIEW_TASK_PERMISSION = {
|
|
524
|
+
action: PERMISSION_ACTION.view,
|
|
525
|
+
resource: TASK_DETAIL_PERMISSION_RESOURCE.task,
|
|
526
|
+
};
|
|
527
|
+
|
|
518
528
|
/*
|
|
519
529
|
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
520
530
|
*
|
|
@@ -662,7 +672,7 @@ class TaskListComponent {
|
|
|
662
672
|
.pipe(take$1(1))
|
|
663
673
|
.subscribe(document => {
|
|
664
674
|
this.router.navigate([
|
|
665
|
-
`/dossiers/${document.definitionId?.name}/document/${currentTask.businessKey}
|
|
675
|
+
`/dossiers/${document.definitionId?.name}/document/${currentTask.businessKey}`,
|
|
666
676
|
]);
|
|
667
677
|
});
|
|
668
678
|
}
|
|
@@ -737,13 +747,13 @@ class TaskListComponent {
|
|
|
737
747
|
closeTranslationSubscription() {
|
|
738
748
|
this._translationSubscription?.unsubscribe();
|
|
739
749
|
}
|
|
740
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TaskListComponent, deps: [{ token: i2.ConfigService }, { token:
|
|
741
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TaskListComponent, selector: "valtimo-task-list", 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\n class=\"main-content\"\n *ngIf=\"{loadingTasks: loadingTasks$ | async, activeTab: activeTab$ | async} as obs\"\n>\n <div class=\"container-fluid\">\n <ng-container\n *ngTemplateOutlet=\"tasksList; context: {show: !obs.loadingTasks, activeTab: obs.activeTab}\"\n ></ng-container>\n\n <ng-container\n *ngTemplateOutlet=\"\n tasksListLoading;\n context: {show: obs.loadingTasks, activeTab: obs.activeTab}\n \"\n ></ng-container>\n\n <valtimo-task-detail-modal\n #taskDetail\n (formSubmit)=\"getTasks(currentTaskType)\"\n (assignmentOfTaskChanged)=\"getTasks(currentTaskType)\"\n ></valtimo-task-detail-modal>\n </div>\n</div>\n\n<ng-template #configuredTabs let-activeTab=\"activeTab\">\n <cds-tabs type=\"contained\" class=\"valtimo-carbon-list__tabs\">\n <cds-tab\n *ngFor=\"let tab of visibleTabs\"\n [heading]=\"'task-list.' + tab + '.title' | translate\"\n [active]=\"activeTab === tab\"\n (selected)=\"tabChange(tab)\"\n ></cds-tab>\n </cds-tabs>\n</ng-template>\n\n<ng-template #caseLinkWithTaskLock let-data=\"data\">\n <a\n class=\"float-left\"\n cdsLink\n href=\"javascript:void(0)\"\n (click)=\"openRelatedCase($event, data.index)\"\n >\n {{ 'task-list.goToCase' | translate }}\n </a>\n <div *ngIf=\"tasks[currentTaskType].tasks[data.index].isLocked\">\n <span\n class=\"float-right badge badge-pill badge-secondary bg-grey\"\n ngbTooltip=\"{{ 'task-list.taskLocked' | translate }}\"\n >\n <i class=\"icon mdi mdi-lock\"></i>\n </span>\n </div>\n</ng-template>\n\n<ng-template #tasksList let-show=\"show\" let-activeTab=\"activeTab\">\n <valtimo-carbon-list\n [ngClass]=\"{'hide-tasks-list': !show}\"\n [fields]=\"tasks[currentTaskType].fields\"\n [header]=\"false\"\n [items]=\"tasks[currentTaskType].tasks\"\n [lastColumnTemplate]=\"caseLinkWithTaskLock\"\n [pagination]=\"tasks[currentTaskType].pagination\"\n paginationIdentifier=\"taskList\"\n (paginationClicked)=\"paginationClicked($event, currentTaskType)\"\n (paginationSet)=\"paginationSet($event)\"\n (rowClicked)=\"rowOpenTaskClick($event)\"\n (sortChanged)=\"sortChanged($event)\"\n >\n <div tabs>\n <cds-tabs\n *ngIf=\"visibleTabs === null; else configuredTabs; context: {activeTab: activeTab}\"\n type=\"contained\"\n class=\"valtimo-carbon-list__tabs\"\n >\n <cds-tab\n [heading]=\"'task-list.mine.title' | translate\"\n (selected)=\"tabChange('mine')\"\n [active]=\"activeTab === 'mine'\"\n >\n </cds-tab>\n\n <cds-tab\n [heading]=\"'task-list.open.title' | translate\"\n (selected)=\"tabChange('open')\"\n [active]=\"activeTab === 'open'\"\n >\n </cds-tab>\n\n <cds-tab\n [heading]=\"'task-list.all.title' | translate\"\n (selected)=\"tabChange('all')\"\n [active]=\"activeTab === 'all'\"\n >\n </cds-tab>\n </cds-tabs>\n </div>\n\n <valtimo-no-results\n [description]=\"'task-list.' + currentTaskType + '.noResultsDescription' | translate\"\n [title]=\"'task-list.' + currentTaskType + '.noResultsTitle' | translate\"\n >\n </valtimo-no-results>\n </valtimo-carbon-list>\n</ng-template>\n\n<ng-template #tasksListLoading let-show=\"show\" let-activeTab=\"activeTab\">\n <valtimo-carbon-list [ngClass]=\"{'hide-tasks-list': !show}\" [loading]=\"true\">\n <div tabs>\n <cds-tabs *ngIf=\"visibleTabs === null\" type=\"contained\" class=\"valtimo-carbon-list__tabs\">\n <cds-tab [heading]=\"'task-list.mine.title' | translate\" [active]=\"activeTab === 'mine'\">\n </cds-tab>\n\n <cds-tab [heading]=\"'task-list.open.title' | translate\" [active]=\"activeTab === 'open'\">\n </cds-tab>\n\n <cds-tab [heading]=\"'task-list.all.title' | translate\" [active]=\"activeTab === 'all'\">\n </cds-tab>\n </cds-tabs>\n\n <cds-tabs type=\"contained\" class=\"valtimo-carbon-list__tabs\" *ngIf=\"visibleTabs\">\n <cds-tab\n *ngFor=\"let tab of visibleTabs\"\n [heading]=\"'task-list.' + tab + '.title' | translate\"\n [active]=\"activeTab === tab\"\n ></cds-tab>\n </cds-tabs>\n </div>\n </valtimo-carbon-list>\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 */.hide-tasks-list{display:none}\n"], dependencies: [{ kind: "directive", type: i8.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i8.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i8.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type:
|
|
750
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TaskListComponent, deps: [{ token: i2.ConfigService }, { token: i7.DocumentService }, { token: i3$1.NGXLogger }, { token: i4.PermissionService }, { token: i3.Router }, { token: TaskService }, { token: i8$1.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
751
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TaskListComponent, selector: "valtimo-task-list", 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\n class=\"main-content\"\n *ngIf=\"{loadingTasks: loadingTasks$ | async, activeTab: activeTab$ | async} as obs\"\n>\n <div class=\"container-fluid\">\n <ng-container\n *ngTemplateOutlet=\"tasksList; context: {show: !obs.loadingTasks, activeTab: obs.activeTab}\"\n ></ng-container>\n\n <ng-container\n *ngTemplateOutlet=\"\n tasksListLoading;\n context: {show: obs.loadingTasks, activeTab: obs.activeTab}\n \"\n ></ng-container>\n\n <valtimo-task-detail-modal\n #taskDetail\n (formSubmit)=\"getTasks(currentTaskType)\"\n (assignmentOfTaskChanged)=\"getTasks(currentTaskType)\"\n ></valtimo-task-detail-modal>\n </div>\n</div>\n\n<ng-template #configuredTabs let-activeTab=\"activeTab\">\n <cds-tabs type=\"contained\" class=\"valtimo-carbon-list__tabs\">\n <cds-tab\n *ngFor=\"let tab of visibleTabs\"\n [heading]=\"'task-list.' + tab + '.title' | translate\"\n [active]=\"activeTab === tab\"\n (selected)=\"tabChange(tab)\"\n ></cds-tab>\n </cds-tabs>\n</ng-template>\n\n<ng-template #caseLinkWithTaskLock let-data=\"data\">\n <a\n class=\"float-left\"\n cdsLink\n href=\"javascript:void(0)\"\n (click)=\"openRelatedCase($event, data.index)\"\n >\n {{ 'task-list.goToCase' | translate }}\n </a>\n <div *ngIf=\"tasks[currentTaskType].tasks[data.index].isLocked\">\n <span\n class=\"float-right badge badge-pill badge-secondary bg-grey\"\n ngbTooltip=\"{{ 'task-list.taskLocked' | translate }}\"\n >\n <i class=\"icon mdi mdi-lock\"></i>\n </span>\n </div>\n</ng-template>\n\n<ng-template #tasksList let-show=\"show\" let-activeTab=\"activeTab\">\n <valtimo-carbon-list\n [ngClass]=\"{'hide-tasks-list': !show}\"\n [fields]=\"tasks[currentTaskType].fields\"\n [header]=\"false\"\n [items]=\"tasks[currentTaskType].tasks\"\n [lastColumnTemplate]=\"caseLinkWithTaskLock\"\n [pagination]=\"tasks[currentTaskType].pagination\"\n paginationIdentifier=\"taskList\"\n (paginationClicked)=\"paginationClicked($event, currentTaskType)\"\n (paginationSet)=\"paginationSet($event)\"\n (rowClicked)=\"rowOpenTaskClick($event)\"\n (sortChanged)=\"sortChanged($event)\"\n >\n <div tabs>\n <cds-tabs\n *ngIf=\"visibleTabs === null; else configuredTabs; context: {activeTab: activeTab}\"\n type=\"contained\"\n class=\"valtimo-carbon-list__tabs\"\n >\n <cds-tab\n [heading]=\"'task-list.mine.title' | translate\"\n (selected)=\"tabChange('mine')\"\n [active]=\"activeTab === 'mine'\"\n >\n </cds-tab>\n\n <cds-tab\n [heading]=\"'task-list.open.title' | translate\"\n (selected)=\"tabChange('open')\"\n [active]=\"activeTab === 'open'\"\n >\n </cds-tab>\n\n <cds-tab\n [heading]=\"'task-list.all.title' | translate\"\n (selected)=\"tabChange('all')\"\n [active]=\"activeTab === 'all'\"\n >\n </cds-tab>\n </cds-tabs>\n </div>\n\n <valtimo-no-results\n [description]=\"'task-list.' + currentTaskType + '.noResultsDescription' | translate\"\n [title]=\"'task-list.' + currentTaskType + '.noResultsTitle' | translate\"\n >\n </valtimo-no-results>\n </valtimo-carbon-list>\n</ng-template>\n\n<ng-template #tasksListLoading let-show=\"show\" let-activeTab=\"activeTab\">\n <valtimo-carbon-list [ngClass]=\"{'hide-tasks-list': !show}\" [loading]=\"true\">\n <div tabs>\n <cds-tabs *ngIf=\"visibleTabs === null\" type=\"contained\" class=\"valtimo-carbon-list__tabs\">\n <cds-tab [heading]=\"'task-list.mine.title' | translate\" [active]=\"activeTab === 'mine'\">\n </cds-tab>\n\n <cds-tab [heading]=\"'task-list.open.title' | translate\" [active]=\"activeTab === 'open'\">\n </cds-tab>\n\n <cds-tab [heading]=\"'task-list.all.title' | translate\" [active]=\"activeTab === 'all'\">\n </cds-tab>\n </cds-tabs>\n\n <cds-tabs type=\"contained\" class=\"valtimo-carbon-list__tabs\" *ngIf=\"visibleTabs\">\n <cds-tab\n *ngFor=\"let tab of visibleTabs\"\n [heading]=\"'task-list.' + tab + '.title' | translate\"\n [active]=\"activeTab === tab\"\n ></cds-tab>\n </cds-tabs>\n </div>\n </valtimo-carbon-list>\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 */.hide-tasks-list{display:none}\n"], dependencies: [{ kind: "directive", type: i8.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i8.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i8.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i6.CarbonListComponent, selector: "valtimo-carbon-list", inputs: ["items", "fields", "tableTranslations", "paginatorConfig", "pagination", "loading", "actions", "header", "initialSortState", "isSearchable", "enableSingleSelection", "lastColumnTemplate", "paginationIdentifier", "showSelectionColumn", "striped"], outputs: ["rowClicked", "paginationClicked", "paginationSet", "search", "sortChanged"] }, { kind: "component", type: i6.CarbonNoResultsComponent, selector: "valtimo-no-results", inputs: ["action", "description", "illustration", "title"] }, { kind: "directive", type: i10.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "triggers", "container", "disableTooltip", "tooltipClass", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "directive", type: i11.Link, selector: "[cdsLink], [ibmLink]", inputs: ["inline", "disabled"] }, { kind: "component", type: i11.Tabs, selector: "cds-tabs, ibm-tabs", inputs: ["position", "cacheActive", "followFocus", "isNavigation", "ariaLabel", "ariaLabelledby", "type", "theme", "skeleton"] }, { kind: "component", type: i11.Tab, selector: "cds-tab, ibm-tab", inputs: ["heading", "title", "context", "active", "disabled", "tabIndex", "id", "cacheActive"], outputs: ["selected"] }, { kind: "component", type: TaskDetailModalComponent, selector: "valtimo-task-detail-modal", outputs: ["formSubmit", "assignmentOfTaskChanged"] }, { kind: "pipe", type: i8.AsyncPipe, name: "async" }, { kind: "pipe", type: i8$1.TranslatePipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
742
752
|
}
|
|
743
753
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TaskListComponent, decorators: [{
|
|
744
754
|
type: Component,
|
|
745
755
|
args: [{ selector: 'valtimo-task-list', 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\n class=\"main-content\"\n *ngIf=\"{loadingTasks: loadingTasks$ | async, activeTab: activeTab$ | async} as obs\"\n>\n <div class=\"container-fluid\">\n <ng-container\n *ngTemplateOutlet=\"tasksList; context: {show: !obs.loadingTasks, activeTab: obs.activeTab}\"\n ></ng-container>\n\n <ng-container\n *ngTemplateOutlet=\"\n tasksListLoading;\n context: {show: obs.loadingTasks, activeTab: obs.activeTab}\n \"\n ></ng-container>\n\n <valtimo-task-detail-modal\n #taskDetail\n (formSubmit)=\"getTasks(currentTaskType)\"\n (assignmentOfTaskChanged)=\"getTasks(currentTaskType)\"\n ></valtimo-task-detail-modal>\n </div>\n</div>\n\n<ng-template #configuredTabs let-activeTab=\"activeTab\">\n <cds-tabs type=\"contained\" class=\"valtimo-carbon-list__tabs\">\n <cds-tab\n *ngFor=\"let tab of visibleTabs\"\n [heading]=\"'task-list.' + tab + '.title' | translate\"\n [active]=\"activeTab === tab\"\n (selected)=\"tabChange(tab)\"\n ></cds-tab>\n </cds-tabs>\n</ng-template>\n\n<ng-template #caseLinkWithTaskLock let-data=\"data\">\n <a\n class=\"float-left\"\n cdsLink\n href=\"javascript:void(0)\"\n (click)=\"openRelatedCase($event, data.index)\"\n >\n {{ 'task-list.goToCase' | translate }}\n </a>\n <div *ngIf=\"tasks[currentTaskType].tasks[data.index].isLocked\">\n <span\n class=\"float-right badge badge-pill badge-secondary bg-grey\"\n ngbTooltip=\"{{ 'task-list.taskLocked' | translate }}\"\n >\n <i class=\"icon mdi mdi-lock\"></i>\n </span>\n </div>\n</ng-template>\n\n<ng-template #tasksList let-show=\"show\" let-activeTab=\"activeTab\">\n <valtimo-carbon-list\n [ngClass]=\"{'hide-tasks-list': !show}\"\n [fields]=\"tasks[currentTaskType].fields\"\n [header]=\"false\"\n [items]=\"tasks[currentTaskType].tasks\"\n [lastColumnTemplate]=\"caseLinkWithTaskLock\"\n [pagination]=\"tasks[currentTaskType].pagination\"\n paginationIdentifier=\"taskList\"\n (paginationClicked)=\"paginationClicked($event, currentTaskType)\"\n (paginationSet)=\"paginationSet($event)\"\n (rowClicked)=\"rowOpenTaskClick($event)\"\n (sortChanged)=\"sortChanged($event)\"\n >\n <div tabs>\n <cds-tabs\n *ngIf=\"visibleTabs === null; else configuredTabs; context: {activeTab: activeTab}\"\n type=\"contained\"\n class=\"valtimo-carbon-list__tabs\"\n >\n <cds-tab\n [heading]=\"'task-list.mine.title' | translate\"\n (selected)=\"tabChange('mine')\"\n [active]=\"activeTab === 'mine'\"\n >\n </cds-tab>\n\n <cds-tab\n [heading]=\"'task-list.open.title' | translate\"\n (selected)=\"tabChange('open')\"\n [active]=\"activeTab === 'open'\"\n >\n </cds-tab>\n\n <cds-tab\n [heading]=\"'task-list.all.title' | translate\"\n (selected)=\"tabChange('all')\"\n [active]=\"activeTab === 'all'\"\n >\n </cds-tab>\n </cds-tabs>\n </div>\n\n <valtimo-no-results\n [description]=\"'task-list.' + currentTaskType + '.noResultsDescription' | translate\"\n [title]=\"'task-list.' + currentTaskType + '.noResultsTitle' | translate\"\n >\n </valtimo-no-results>\n </valtimo-carbon-list>\n</ng-template>\n\n<ng-template #tasksListLoading let-show=\"show\" let-activeTab=\"activeTab\">\n <valtimo-carbon-list [ngClass]=\"{'hide-tasks-list': !show}\" [loading]=\"true\">\n <div tabs>\n <cds-tabs *ngIf=\"visibleTabs === null\" type=\"contained\" class=\"valtimo-carbon-list__tabs\">\n <cds-tab [heading]=\"'task-list.mine.title' | translate\" [active]=\"activeTab === 'mine'\">\n </cds-tab>\n\n <cds-tab [heading]=\"'task-list.open.title' | translate\" [active]=\"activeTab === 'open'\">\n </cds-tab>\n\n <cds-tab [heading]=\"'task-list.all.title' | translate\" [active]=\"activeTab === 'all'\">\n </cds-tab>\n </cds-tabs>\n\n <cds-tabs type=\"contained\" class=\"valtimo-carbon-list__tabs\" *ngIf=\"visibleTabs\">\n <cds-tab\n *ngFor=\"let tab of visibleTabs\"\n [heading]=\"'task-list.' + tab + '.title' | translate\"\n [active]=\"activeTab === tab\"\n ></cds-tab>\n </cds-tabs>\n </div>\n </valtimo-carbon-list>\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 */.hide-tasks-list{display:none}\n"] }]
|
|
746
|
-
}], ctorParameters: function () { return [{ type: i2.ConfigService }, { type:
|
|
756
|
+
}], ctorParameters: function () { return [{ type: i2.ConfigService }, { type: i7.DocumentService }, { type: i3$1.NGXLogger }, { type: i4.PermissionService }, { type: i3.Router }, { type: TaskService }, { type: i8$1.TranslateService }]; }, propDecorators: { taskDetail: [{
|
|
747
757
|
type: ViewChild,
|
|
748
758
|
args: ['taskDetail']
|
|
749
759
|
}] } });
|
|
@@ -773,7 +783,7 @@ const routes = [
|
|
|
773
783
|
];
|
|
774
784
|
class TaskRoutingModule {
|
|
775
785
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TaskRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
776
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: TaskRoutingModule, imports: [CommonModule,
|
|
786
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: TaskRoutingModule, imports: [CommonModule, i3.RouterModule], exports: [RouterModule] }); }
|
|
777
787
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TaskRoutingModule, imports: [CommonModule, RouterModule.forChild(routes), RouterModule] }); }
|
|
778
788
|
}
|
|
779
789
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TaskRoutingModule, decorators: [{
|
|
@@ -811,7 +821,7 @@ class TaskModule {
|
|
|
811
821
|
SearchableDropdownSelectModule,
|
|
812
822
|
CamundaFormModule,
|
|
813
823
|
BrowserAnimationsModule,
|
|
814
|
-
FormsModule,
|
|
824
|
+
FormsModule, i1$1.ToastrModule, i8$1.TranslateModule, NgbModule,
|
|
815
825
|
FormIoModule,
|
|
816
826
|
ModalModule,
|
|
817
827
|
LinkModule,
|