@valtimo/task 4.15.2 → 4.16.0-next-main.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/valtimo-task.umd.js +168 -51
- package/bundles/valtimo-task.umd.js.map +1 -1
- package/bundles/valtimo-task.umd.min.js +1 -1
- package/bundles/valtimo-task.umd.min.js.map +1 -1
- package/esm2015/lib/assign-user-to-task/assign-user-to-task.component.js +7 -4
- package/esm2015/lib/models/index.js +21 -0
- package/esm2015/lib/models/task-definition.model.js +16 -0
- package/esm2015/lib/models/task-list.model.js +29 -0
- package/esm2015/lib/models/task.model.js +16 -0
- package/esm2015/lib/task-detail-modal/task-detail-modal.component.js +20 -11
- package/esm2015/lib/task-list/task-list.component.js +23 -12
- package/esm2015/lib/task-routing.module.js +6 -9
- package/esm2015/lib/task.module.js +8 -8
- package/esm2015/lib/task.service.js +2 -2
- package/esm2015/public_api.js +2 -1
- package/esm2015/valtimo-task.js +1 -1
- package/fesm2015/valtimo-task.js +136 -39
- package/fesm2015/valtimo-task.js.map +1 -1
- package/lib/assign-user-to-task/assign-user-to-task.component.d.ts +2 -1
- package/lib/models/index.d.ts +3 -0
- package/lib/models/task-definition.model.d.ts +6 -0
- package/lib/models/task-list.model.d.ts +11 -0
- package/lib/models/task.model.d.ts +38 -0
- package/lib/task-detail-modal/task-detail-modal.component.d.ts +9 -8
- package/lib/task-list/task-list.component.d.ts +1 -1
- package/lib/task.service.d.ts +2 -2
- package/package.json +1 -4
- package/public_api.d.ts +1 -0
- package/valtimo-task.metadata.json +1 -1
|
@@ -1,8 +1,88 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common/http'), require('@valtimo/config'), require('@angular/common'), require('@angular/forms'), require('@angular/platform-browser/animations'), require('@ng-bootstrap/ng-bootstrap'), require('@ngx-translate/core'), require('@valtimo/components'), require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@valtimo/task', ['exports', '@angular/core', '@angular/common/http', '@valtimo/config', '@angular/common', '@angular/forms', '@angular/platform-browser/animations', '@ng-bootstrap/ng-bootstrap', '@ngx-translate/core', '@valtimo/components', '
|
|
4
|
-
(global = global || self, factory((global.valtimo = global.valtimo || {}, global.valtimo.task = {}), global.ng.core, global.ng.common.http, global.config, global.ng.common, global.ng.forms, global.ng.platformBrowser.animations, global.ngBootstrap, global.core$1, global.components, global.
|
|
5
|
-
}(this, (function (exports, i0, i1, i2, common, forms, animations, ngBootstrap, core, components,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common/http'), require('@valtimo/config'), require('@angular/common'), require('@angular/forms'), require('@angular/platform-browser/animations'), require('@ng-bootstrap/ng-bootstrap'), require('@ngx-translate/core'), require('@valtimo/components'), require('ngx-toastr'), require('@angular/router'), require('@valtimo/form-link'), require('moment'), require('ngx-logger'), require('rxjs/operators'), require('rxjs'), require('@valtimo/security')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@valtimo/task', ['exports', '@angular/core', '@angular/common/http', '@valtimo/config', '@angular/common', '@angular/forms', '@angular/platform-browser/animations', '@ng-bootstrap/ng-bootstrap', '@ngx-translate/core', '@valtimo/components', 'ngx-toastr', '@angular/router', '@valtimo/form-link', 'moment', 'ngx-logger', 'rxjs/operators', 'rxjs', '@valtimo/security'], factory) :
|
|
4
|
+
(global = global || self, factory((global.valtimo = global.valtimo || {}, global.valtimo.task = {}), global.ng.core, global.ng.common.http, global.config, global.ng.common, global.ng.forms, global.ng.platformBrowser.animations, global.ngBootstrap, global.core$1, global.components, global.ngxToastr, global.ng.router, global.formLink, global.moment, global.ngxLogger, global.rxjs.operators, global.rxjs, global.security));
|
|
5
|
+
}(this, (function (exports, i0, i1, i2, common, forms, animations, ngBootstrap, core, components, ngxToastr, router, formLink, momentImported, ngxLogger, operators, rxjs, security) { 'use strict';
|
|
6
|
+
|
|
7
|
+
/*
|
|
8
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
9
|
+
*
|
|
10
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
11
|
+
* you may not use this file except in compliance with the License.
|
|
12
|
+
* You may obtain a copy of the License at
|
|
13
|
+
*
|
|
14
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
15
|
+
*
|
|
16
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
17
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
18
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
19
|
+
* See the License for the specific language governing permissions and
|
|
20
|
+
* limitations under the License.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
/*
|
|
24
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
25
|
+
*
|
|
26
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
27
|
+
* you may not use this file except in compliance with the License.
|
|
28
|
+
* You may obtain a copy of the License at
|
|
29
|
+
*
|
|
30
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
31
|
+
*
|
|
32
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
33
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
34
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
35
|
+
* See the License for the specific language governing permissions and
|
|
36
|
+
* limitations under the License.
|
|
37
|
+
*/
|
|
38
|
+
|
|
39
|
+
/*
|
|
40
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
41
|
+
*
|
|
42
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
43
|
+
* you may not use this file except in compliance with the License.
|
|
44
|
+
* You may obtain a copy of the License at
|
|
45
|
+
*
|
|
46
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
47
|
+
*
|
|
48
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
49
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
50
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
51
|
+
* See the License for the specific language governing permissions and
|
|
52
|
+
* limitations under the License.
|
|
53
|
+
*/
|
|
54
|
+
var TaskList = /** @class */ (function () {
|
|
55
|
+
function TaskList() {
|
|
56
|
+
this.tasks = [];
|
|
57
|
+
this.fields = [];
|
|
58
|
+
this.pagination = {
|
|
59
|
+
collectionSize: 0,
|
|
60
|
+
page: 1,
|
|
61
|
+
size: 10,
|
|
62
|
+
maxPaginationItemSize: 5,
|
|
63
|
+
};
|
|
64
|
+
this.page = 0;
|
|
65
|
+
}
|
|
66
|
+
return TaskList;
|
|
67
|
+
}());
|
|
68
|
+
|
|
69
|
+
/*
|
|
70
|
+
*
|
|
71
|
+
* * Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
72
|
+
* *
|
|
73
|
+
* * Licensed under EUPL, Version 1.2 (the "License");
|
|
74
|
+
* * you may not use this file except in compliance with the License.
|
|
75
|
+
* * You may obtain a copy of the License at
|
|
76
|
+
* *
|
|
77
|
+
* * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
78
|
+
* *
|
|
79
|
+
* * Unless required by applicable law or agreed to in writing, software
|
|
80
|
+
* * distributed under the License is distributed on an "AS IS" basis,
|
|
81
|
+
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
82
|
+
* * See the License for the specific language governing permissions and
|
|
83
|
+
* * limitations under the License.
|
|
84
|
+
*
|
|
85
|
+
*/
|
|
6
86
|
|
|
7
87
|
/*
|
|
8
88
|
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
@@ -45,7 +125,7 @@
|
|
|
45
125
|
TaskService.prototype.completeTask = function (id, variables) {
|
|
46
126
|
return this.http.post(this.valtimoEndpointUri + 'task/' + id + '/complete', {
|
|
47
127
|
variables: variables,
|
|
48
|
-
filesToDelete: []
|
|
128
|
+
filesToDelete: [],
|
|
49
129
|
});
|
|
50
130
|
};
|
|
51
131
|
return TaskService;
|
|
@@ -77,17 +157,18 @@
|
|
|
77
157
|
var moment = momentImported;
|
|
78
158
|
moment.locale(localStorage.getItem('langKey') || '');
|
|
79
159
|
var TaskDetailModalComponent = /** @class */ (function () {
|
|
80
|
-
function TaskDetailModalComponent(toastr, formLinkService, router, logger) {
|
|
160
|
+
function TaskDetailModalComponent(toastr, formLinkService, router, logger, route) {
|
|
81
161
|
this.toastr = toastr;
|
|
82
162
|
this.formLinkService = formLinkService;
|
|
83
163
|
this.router = router;
|
|
84
164
|
this.logger = logger;
|
|
165
|
+
this.route = route;
|
|
85
166
|
this.task = null;
|
|
86
167
|
this.page = null;
|
|
87
168
|
this.formSubmit = new i0.EventEmitter();
|
|
88
169
|
this.assignmentOfTaskChanged = new i0.EventEmitter();
|
|
89
170
|
this.errorMessage = null;
|
|
90
|
-
this.formioOptions = new
|
|
171
|
+
this.formioOptions = new components.FormioOptionsImpl();
|
|
91
172
|
this.formioOptions.disableAlerts = true;
|
|
92
173
|
}
|
|
93
174
|
TaskDetailModalComponent.prototype.resetFormDefinition = function () {
|
|
@@ -100,7 +181,7 @@
|
|
|
100
181
|
this.task = task;
|
|
101
182
|
this.page = {
|
|
102
183
|
title: task.name,
|
|
103
|
-
subtitle: "Created " + moment(task.created).fromNow()
|
|
184
|
+
subtitle: "Created " + moment(task.created).fromNow(),
|
|
104
185
|
};
|
|
105
186
|
this.formLinkService
|
|
106
187
|
.getPreFilledFormDefinitionByFormLinkId(task.processDefinitionKey, task.businessKey, task.taskDefinitionKey, task.id // taskInstanceId
|
|
@@ -119,7 +200,13 @@
|
|
|
119
200
|
window.open(url, '_blank');
|
|
120
201
|
break;
|
|
121
202
|
case 'BpmnElementAngularStateUrlLink':
|
|
122
|
-
_this.
|
|
203
|
+
_this.route.params.pipe(operators.take(1)).subscribe(function (params) {
|
|
204
|
+
var taskId = task === null || task === void 0 ? void 0 : task.id;
|
|
205
|
+
var documentId = params === null || params === void 0 ? void 0 : params.documentId;
|
|
206
|
+
_this.router.navigate([formDefinition.formAssociation.formLink.url], {
|
|
207
|
+
state: Object.assign(Object.assign({}, (taskId && { taskId: taskId })), (documentId && { documentId: documentId })),
|
|
208
|
+
});
|
|
209
|
+
});
|
|
123
210
|
break;
|
|
124
211
|
default:
|
|
125
212
|
_this.logger.fatal('Unsupported class name');
|
|
@@ -154,7 +241,7 @@
|
|
|
154
241
|
TaskDetailModalComponent.decorators = [
|
|
155
242
|
{ type: i0.Component, args: [{
|
|
156
243
|
selector: 'valtimo-task-detail-modal',
|
|
157
|
-
template: "<!--\n ~ Copyright 2015-2020 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 elementId=\"taskDetailModal\"\n [title]=\"page?.title\"\n [subtitle]=\"page?.subtitle\"\n [templateBelowSubtitle]=\"assignUserToTask\"\n>\n <div body *ngIf=\"formDefinition\">\n <valtimo-form-io\n #form\n [form]=\"formDefinition\"\n (submit)=\"onSubmit($event)\"\n [options]=\"formioOptions\"\n ></valtimo-form-io>\n </div>\n <div body *ngIf=\"!formDefinition && !errorMessage\">\n <div
|
|
244
|
+
template: "<!--\n ~ Copyright 2015-2020 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 elementId=\"taskDetailModal\"\n [title]=\"page?.title\"\n [subtitle]=\"page?.subtitle\"\n [templateBelowSubtitle]=\"assignUserToTask\"\n>\n <div body *ngIf=\"formDefinition\">\n <valtimo-form-io\n #form\n [form]=\"formDefinition\"\n (submit)=\"onSubmit($event)\"\n [options]=\"formioOptions\"\n ></valtimo-form-io>\n </div>\n <div body *ngIf=\"!formDefinition && !errorMessage\">\n <div\n class=\"bg-warning text-black mb-0 p-3 text-center\"\n [translate]=\"'formManagement.noFormDefinitionFound'\"\n ></div>\n </div>\n <div body *ngIf=\"errorMessage\">\n <div class=\"bg-danger text-black mb-0 p-3 text-center\">\n {{ errorMessage }}\n </div>\n </div>\n <div footer>\n <div class=\"mb-0 p-3 text-center\" *ngIf=\"!formDefinition\">\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\n<ng-template #assignUserToTask>\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-template>\n",
|
|
158
245
|
encapsulation: i0.ViewEncapsulation.None,
|
|
159
246
|
styles: ["/*!\n * Copyright 2015-2020 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}"]
|
|
160
247
|
},] }
|
|
@@ -163,7 +250,8 @@
|
|
|
163
250
|
{ type: ngxToastr.ToastrService },
|
|
164
251
|
{ type: formLink.FormLinkService },
|
|
165
252
|
{ type: router.Router },
|
|
166
|
-
{ type: ngxLogger.NGXLogger }
|
|
253
|
+
{ type: ngxLogger.NGXLogger },
|
|
254
|
+
{ type: router.ActivatedRoute }
|
|
167
255
|
]; };
|
|
168
256
|
TaskDetailModalComponent.propDecorators = {
|
|
169
257
|
form: [{ type: i0.ViewChild, args: ['form',] }],
|
|
@@ -196,6 +284,8 @@
|
|
|
196
284
|
return extendStatics(d, b);
|
|
197
285
|
};
|
|
198
286
|
function __extends(d, b) {
|
|
287
|
+
if (typeof b !== "function" && b !== null)
|
|
288
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
199
289
|
extendStatics(d, b);
|
|
200
290
|
function __() { this.constructor = d; }
|
|
201
291
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -381,11 +471,13 @@
|
|
|
381
471
|
}
|
|
382
472
|
return ar;
|
|
383
473
|
}
|
|
474
|
+
/** @deprecated */
|
|
384
475
|
function __spread() {
|
|
385
476
|
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
386
477
|
ar = ar.concat(__read(arguments[i]));
|
|
387
478
|
return ar;
|
|
388
479
|
}
|
|
480
|
+
/** @deprecated */
|
|
389
481
|
function __spreadArrays() {
|
|
390
482
|
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
391
483
|
s += arguments[i].length;
|
|
@@ -394,7 +486,17 @@
|
|
|
394
486
|
r[k] = a[j];
|
|
395
487
|
return r;
|
|
396
488
|
}
|
|
397
|
-
|
|
489
|
+
function __spreadArray(to, from, pack) {
|
|
490
|
+
if (pack || arguments.length === 2)
|
|
491
|
+
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
492
|
+
if (ar || !(i in from)) {
|
|
493
|
+
if (!ar)
|
|
494
|
+
ar = Array.prototype.slice.call(from, 0, i);
|
|
495
|
+
ar[i] = from[i];
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
499
|
+
}
|
|
398
500
|
function __await(v) {
|
|
399
501
|
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
400
502
|
}
|
|
@@ -459,18 +561,21 @@
|
|
|
459
561
|
function __importDefault(mod) {
|
|
460
562
|
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
461
563
|
}
|
|
462
|
-
function __classPrivateFieldGet(receiver,
|
|
463
|
-
if (!
|
|
464
|
-
throw new TypeError("
|
|
465
|
-
|
|
466
|
-
|
|
564
|
+
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
565
|
+
if (kind === "a" && !f)
|
|
566
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
567
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
568
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
569
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
467
570
|
}
|
|
468
|
-
function __classPrivateFieldSet(receiver,
|
|
469
|
-
if (
|
|
470
|
-
throw new TypeError("
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
571
|
+
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
572
|
+
if (kind === "m")
|
|
573
|
+
throw new TypeError("Private method is not writable");
|
|
574
|
+
if (kind === "a" && !f)
|
|
575
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
576
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
577
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
578
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
474
579
|
}
|
|
475
580
|
|
|
476
581
|
var moment$1 = momentImported;
|
|
@@ -482,9 +587,9 @@
|
|
|
482
587
|
this.logger = logger;
|
|
483
588
|
this.translateService = translateService;
|
|
484
589
|
this.tasks = {
|
|
485
|
-
mine: new
|
|
486
|
-
open: new
|
|
487
|
-
all: new
|
|
590
|
+
mine: new TaskList(),
|
|
591
|
+
open: new TaskList(),
|
|
592
|
+
all: new TaskList(),
|
|
488
593
|
};
|
|
489
594
|
this.currentTaskType = 'mine';
|
|
490
595
|
this.listTitle = null;
|
|
@@ -495,7 +600,10 @@
|
|
|
495
600
|
this.getTasks(type);
|
|
496
601
|
};
|
|
497
602
|
TaskListComponent.prototype.paginationSet = function () {
|
|
498
|
-
this.tasks.mine.pagination.size =
|
|
603
|
+
this.tasks.mine.pagination.size =
|
|
604
|
+
this.tasks.all.pagination.size =
|
|
605
|
+
this.tasks.open.pagination.size =
|
|
606
|
+
this.tasks[this.currentTaskType].pagination.size;
|
|
499
607
|
this.getTasks(this.currentTaskType);
|
|
500
608
|
};
|
|
501
609
|
TaskListComponent.prototype.clearPagination = function (type) {
|
|
@@ -525,7 +633,7 @@
|
|
|
525
633
|
var params;
|
|
526
634
|
this.translationSubscription = rxjs.combineLatest([
|
|
527
635
|
this.translateService.stream("task-list." + type + ".title"),
|
|
528
|
-
this.translateService.stream("task-list." + type + ".description")
|
|
636
|
+
this.translateService.stream("task-list." + type + ".description"),
|
|
529
637
|
]).subscribe(function (_a) {
|
|
530
638
|
var _b = __read(_a, 2), title = _b[0], description = _b[1];
|
|
531
639
|
_this.listTitle = title;
|
|
@@ -533,11 +641,19 @@
|
|
|
533
641
|
});
|
|
534
642
|
switch (type) {
|
|
535
643
|
case 'mine':
|
|
536
|
-
params = {
|
|
644
|
+
params = {
|
|
645
|
+
page: this.tasks.mine.page,
|
|
646
|
+
size: this.tasks.mine.pagination.size,
|
|
647
|
+
filter: 'mine',
|
|
648
|
+
};
|
|
537
649
|
this.currentTaskType = 'mine';
|
|
538
650
|
break;
|
|
539
651
|
case 'open':
|
|
540
|
-
params = {
|
|
652
|
+
params = {
|
|
653
|
+
page: this.tasks.open.page,
|
|
654
|
+
size: this.tasks.open.pagination.size,
|
|
655
|
+
filter: 'open',
|
|
656
|
+
};
|
|
541
657
|
this.currentTaskType = 'open';
|
|
542
658
|
break;
|
|
543
659
|
case 'all':
|
|
@@ -559,20 +675,20 @@
|
|
|
559
675
|
_this.tasks[type].fields = [
|
|
560
676
|
{
|
|
561
677
|
key: 'created',
|
|
562
|
-
label: 'Created on'
|
|
678
|
+
label: 'Created on',
|
|
563
679
|
},
|
|
564
680
|
{
|
|
565
681
|
key: 'name',
|
|
566
|
-
label: 'Name'
|
|
682
|
+
label: 'Name',
|
|
567
683
|
},
|
|
568
684
|
{
|
|
569
685
|
key: 'valtimoAssignee.fullName',
|
|
570
|
-
label: 'Assignee'
|
|
686
|
+
label: 'Assignee',
|
|
571
687
|
},
|
|
572
688
|
{
|
|
573
689
|
key: 'due',
|
|
574
|
-
label: 'Due date'
|
|
575
|
-
}
|
|
690
|
+
label: 'Due date',
|
|
691
|
+
},
|
|
576
692
|
];
|
|
577
693
|
});
|
|
578
694
|
};
|
|
@@ -622,14 +738,14 @@
|
|
|
622
738
|
* See the License for the specific language governing permissions and
|
|
623
739
|
* limitations under the License.
|
|
624
740
|
*/
|
|
625
|
-
var ɵ0 = { title: 'Tasks', roles: [
|
|
741
|
+
var ɵ0 = { title: 'Tasks', roles: [i2.ROLE_USER] };
|
|
626
742
|
var routes = [
|
|
627
743
|
{
|
|
628
744
|
path: 'tasks',
|
|
629
745
|
component: TaskListComponent,
|
|
630
746
|
canActivate: [security.AuthGuardService],
|
|
631
|
-
data: ɵ0
|
|
632
|
-
}
|
|
747
|
+
data: ɵ0,
|
|
748
|
+
},
|
|
633
749
|
];
|
|
634
750
|
var TaskRoutingModule = /** @class */ (function () {
|
|
635
751
|
function TaskRoutingModule() {
|
|
@@ -639,11 +755,8 @@
|
|
|
639
755
|
TaskRoutingModule.decorators = [
|
|
640
756
|
{ type: i0.NgModule, args: [{
|
|
641
757
|
declarations: [],
|
|
642
|
-
imports: [
|
|
643
|
-
|
|
644
|
-
router.RouterModule.forChild(routes),
|
|
645
|
-
],
|
|
646
|
-
exports: [router.RouterModule]
|
|
758
|
+
imports: [common.CommonModule, router.RouterModule.forChild(routes)],
|
|
759
|
+
exports: [router.RouterModule],
|
|
647
760
|
},] }
|
|
648
761
|
];
|
|
649
762
|
|
|
@@ -687,7 +800,10 @@
|
|
|
687
800
|
AssignUserToTaskComponent.prototype.assignTask = function (userEmail) {
|
|
688
801
|
var _this = this;
|
|
689
802
|
this.disable();
|
|
690
|
-
rxjs.combineLatest([
|
|
803
|
+
rxjs.combineLatest([
|
|
804
|
+
this.candidateUsersForTask$,
|
|
805
|
+
this.taskService.assignTask(this.taskId, { assignee: userEmail }),
|
|
806
|
+
])
|
|
691
807
|
.pipe(operators.take(1), operators.tap(function (_b) {
|
|
692
808
|
var _c = __read(_b, 1), candidateUsers = _c[0];
|
|
693
809
|
_this.userEmailToAssign = userEmail;
|
|
@@ -742,7 +858,7 @@
|
|
|
742
858
|
AssignUserToTaskComponent.decorators = [
|
|
743
859
|
{ type: i0.Component, args: [{
|
|
744
860
|
selector: 'valtimo-assign-user-to-task',
|
|
745
|
-
template: "<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 <ng-container *ngIf=\"obs.candidateUsers; else loading\">\n <valtimo-searchable-dropdown-select\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 </ng-container>\n </div>\n </div>\n </div>\n</ng-container>\n\n<ng-template #loading>\n <h5
|
|
861
|
+
template: "<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 <ng-container *ngIf=\"obs.candidateUsers; else loading\">\n <valtimo-searchable-dropdown-select\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 </ng-container>\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",
|
|
746
862
|
styles: [".container-fluid{color:#959595}i{font-size:13px}"]
|
|
747
863
|
},] }
|
|
748
864
|
];
|
|
@@ -770,7 +886,7 @@
|
|
|
770
886
|
* See the License for the specific language governing permissions and
|
|
771
887
|
* limitations under the License.
|
|
772
888
|
*/
|
|
773
|
-
var ɵ0$1 =
|
|
889
|
+
var ɵ0$1 = i2.HttpLoaderFactory;
|
|
774
890
|
var TaskModule = /** @class */ (function () {
|
|
775
891
|
function TaskModule() {
|
|
776
892
|
}
|
|
@@ -792,20 +908,20 @@
|
|
|
792
908
|
forms.FormsModule,
|
|
793
909
|
ngxToastr.ToastrModule.forRoot({
|
|
794
910
|
positionClass: 'toast-bottom-full-width',
|
|
795
|
-
preventDuplicates: true
|
|
911
|
+
preventDuplicates: true,
|
|
796
912
|
}),
|
|
797
913
|
core.TranslateModule.forRoot({
|
|
798
914
|
loader: {
|
|
799
915
|
provide: core.TranslateLoader,
|
|
800
916
|
useFactory: ɵ0$1,
|
|
801
|
-
deps: [i1.HttpClient]
|
|
802
|
-
}
|
|
917
|
+
deps: [i1.HttpClient],
|
|
918
|
+
},
|
|
803
919
|
}),
|
|
804
920
|
ngBootstrap.NgbModule,
|
|
805
921
|
components.FormIoModule,
|
|
806
|
-
components.ModalModule
|
|
922
|
+
components.ModalModule,
|
|
807
923
|
],
|
|
808
|
-
exports: [TaskListComponent, TaskDetailModalComponent, AssignUserToTaskComponent]
|
|
924
|
+
exports: [TaskListComponent, TaskDetailModalComponent, AssignUserToTaskComponent],
|
|
809
925
|
},] }
|
|
810
926
|
];
|
|
811
927
|
|
|
@@ -830,6 +946,7 @@
|
|
|
830
946
|
*/
|
|
831
947
|
|
|
832
948
|
exports.TaskDetailModalComponent = TaskDetailModalComponent;
|
|
949
|
+
exports.TaskList = TaskList;
|
|
833
950
|
exports.TaskListComponent = TaskListComponent;
|
|
834
951
|
exports.TaskModule = TaskModule;
|
|
835
952
|
exports.TaskService = TaskService;
|