@valtimo/task 4.15.3-next-main.16 → 4.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/valtimo-task.umd.js +928 -847
- 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 +124 -124
- 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 +127 -127
- package/esm2015/lib/task-list/task-list.component.js +166 -166
- package/esm2015/lib/task-routing.module.js +41 -41
- package/esm2015/lib/task.module.js +66 -66
- package/esm2015/lib/task.service.js +60 -60
- package/esm2015/public_api.js +24 -23
- package/esm2015/valtimo-task.js +7 -7
- package/fesm2015/valtimo-task.js +620 -542
- package/fesm2015/valtimo-task.js.map +1 -1
- package/lib/assign-user-to-task/assign-user-to-task.component.d.ts +27 -26
- 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 +31 -31
- package/lib/task-list/task-list.component.d.ts +32 -32
- package/lib/task-routing.module.d.ts +2 -2
- package/lib/task.module.d.ts +2 -2
- package/lib/task.service.d.ts +16 -16
- package/package.json +1 -1
- package/public_api.d.ts +5 -4
- package/valtimo-task.d.ts +6 -6
- package/valtimo-task.metadata.json +1 -1
package/fesm2015/valtimo-task.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { ɵɵdefineInjectable, ɵɵinject, Injectable, EventEmitter, Component, ViewEncapsulation, ViewChild, Output, NgModule, Input } from '@angular/core';
|
|
2
2
|
import { HttpClient } from '@angular/common/http';
|
|
3
|
-
import { ConfigService } from '@valtimo/config';
|
|
3
|
+
import { ConfigService, ROLE_USER, HttpLoaderFactory } from '@valtimo/config';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import { FormsModule } from '@angular/forms';
|
|
6
6
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
7
7
|
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
|
|
8
8
|
import { TranslateService, TranslateModule, TranslateLoader } from '@ngx-translate/core';
|
|
9
|
-
import { ListModule, PageHeaderModule, WidgetModule, SpinnerModule, SearchableDropdownSelectModule, CamundaFormModule, FormIoModule, ModalModule } from '@valtimo/components';
|
|
10
|
-
import { FormioOptionsImpl, TaskList, ROLE_USER, HttpLoaderFactory } from '@valtimo/contract';
|
|
9
|
+
import { FormioOptionsImpl, ListModule, PageHeaderModule, WidgetModule, SpinnerModule, SearchableDropdownSelectModule, CamundaFormModule, FormIoModule, ModalModule } from '@valtimo/components';
|
|
11
10
|
import { ToastrService, ToastrModule } from 'ngx-toastr';
|
|
12
11
|
import { Router, ActivatedRoute, RouterModule } from '@angular/router';
|
|
13
12
|
import { FormLinkService } from '@valtimo/form-link';
|
|
@@ -17,559 +16,638 @@ import { take, tap } from 'rxjs/operators';
|
|
|
17
16
|
import { combineLatest, BehaviorSubject } from 'rxjs';
|
|
18
17
|
import { AuthGuardService } from '@valtimo/security';
|
|
19
18
|
|
|
20
|
-
/*
|
|
21
|
-
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
22
|
-
*
|
|
23
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
24
|
-
* you may not use this file except in compliance with the License.
|
|
25
|
-
* You may obtain a copy of the License at
|
|
26
|
-
*
|
|
27
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
28
|
-
*
|
|
29
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
30
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
31
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
32
|
-
* See the License for the specific language governing permissions and
|
|
33
|
-
* limitations under the License.
|
|
34
|
-
*/
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
19
|
+
/*
|
|
20
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
21
|
+
*
|
|
22
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
23
|
+
* you may not use this file except in compliance with the License.
|
|
24
|
+
* You may obtain a copy of the License at
|
|
25
|
+
*
|
|
26
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
27
|
+
*
|
|
28
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
29
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
30
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
31
|
+
* See the License for the specific language governing permissions and
|
|
32
|
+
* limitations under the License.
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
/*
|
|
36
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
37
|
+
*
|
|
38
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
39
|
+
* you may not use this file except in compliance with the License.
|
|
40
|
+
* You may obtain a copy of the License at
|
|
41
|
+
*
|
|
42
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
43
|
+
*
|
|
44
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
45
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
46
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
47
|
+
* See the License for the specific language governing permissions and
|
|
48
|
+
* limitations under the License.
|
|
49
|
+
*/
|
|
50
|
+
|
|
51
|
+
/*
|
|
52
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
53
|
+
*
|
|
54
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
55
|
+
* you may not use this file except in compliance with the License.
|
|
56
|
+
* You may obtain a copy of the License at
|
|
57
|
+
*
|
|
58
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
59
|
+
*
|
|
60
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
61
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
62
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
63
|
+
* See the License for the specific language governing permissions and
|
|
64
|
+
* limitations under the License.
|
|
65
|
+
*/
|
|
66
|
+
class TaskList {
|
|
67
|
+
constructor() {
|
|
68
|
+
this.tasks = [];
|
|
69
|
+
this.fields = [];
|
|
70
|
+
this.pagination = {
|
|
71
|
+
collectionSize: 0,
|
|
72
|
+
page: 1,
|
|
73
|
+
size: 10,
|
|
74
|
+
maxPaginationItemSize: 5,
|
|
75
|
+
};
|
|
76
|
+
this.page = 0;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/*
|
|
81
|
+
*
|
|
82
|
+
* * Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
83
|
+
* *
|
|
84
|
+
* * Licensed under EUPL, Version 1.2 (the "License");
|
|
85
|
+
* * you may not use this file except in compliance with the License.
|
|
86
|
+
* * You may obtain a copy of the License at
|
|
87
|
+
* *
|
|
88
|
+
* * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
89
|
+
* *
|
|
90
|
+
* * Unless required by applicable law or agreed to in writing, software
|
|
91
|
+
* * distributed under the License is distributed on an "AS IS" basis,
|
|
92
|
+
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
93
|
+
* * See the License for the specific language governing permissions and
|
|
94
|
+
* * limitations under the License.
|
|
95
|
+
*
|
|
96
|
+
*/
|
|
97
|
+
|
|
98
|
+
/*
|
|
99
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
100
|
+
*
|
|
101
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
102
|
+
* you may not use this file except in compliance with the License.
|
|
103
|
+
* You may obtain a copy of the License at
|
|
104
|
+
*
|
|
105
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
106
|
+
*
|
|
107
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
108
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
109
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
110
|
+
* See the License for the specific language governing permissions and
|
|
111
|
+
* limitations under the License.
|
|
112
|
+
*/
|
|
113
|
+
class TaskService {
|
|
114
|
+
constructor(http, configService) {
|
|
115
|
+
this.http = http;
|
|
116
|
+
this.valtimoEndpointUri = configService.config.valtimoApi.endpointUri;
|
|
117
|
+
}
|
|
118
|
+
queryTasks(params) {
|
|
119
|
+
return this.http.get(`${this.valtimoEndpointUri}task`, { observe: 'response', params: params });
|
|
120
|
+
}
|
|
121
|
+
getTasks() {
|
|
122
|
+
return this.http.get(`${this.valtimoEndpointUri}task?filter=all`);
|
|
123
|
+
}
|
|
124
|
+
getTask(id) {
|
|
125
|
+
return this.http.get(this.valtimoEndpointUri + 'task/' + id);
|
|
126
|
+
}
|
|
127
|
+
getCandidateUsers(id) {
|
|
128
|
+
return this.http.get(this.valtimoEndpointUri + 'task/' + id + '/candidate-user');
|
|
129
|
+
}
|
|
130
|
+
assignTask(id, assigneeRequest) {
|
|
131
|
+
return this.http.post(this.valtimoEndpointUri + 'task/' + id + '/assign', assigneeRequest);
|
|
132
|
+
}
|
|
133
|
+
unassignTask(id) {
|
|
134
|
+
return this.http.post(this.valtimoEndpointUri + 'task/' + id + '/unassign', null);
|
|
135
|
+
}
|
|
136
|
+
completeTask(id, variables) {
|
|
137
|
+
return this.http.post(this.valtimoEndpointUri + 'task/' + id + '/complete', {
|
|
138
|
+
variables: variables,
|
|
139
|
+
filesToDelete: [],
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
TaskService.ɵprov = ɵɵdefineInjectable({ factory: function TaskService_Factory() { return new TaskService(ɵɵinject(HttpClient), ɵɵinject(ConfigService)); }, token: TaskService, providedIn: "root" });
|
|
144
|
+
TaskService.decorators = [
|
|
145
|
+
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
146
|
+
];
|
|
147
|
+
TaskService.ctorParameters = () => [
|
|
148
|
+
{ type: HttpClient },
|
|
149
|
+
{ type: ConfigService }
|
|
72
150
|
];
|
|
73
151
|
|
|
74
|
-
/*
|
|
75
|
-
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
76
|
-
*
|
|
77
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
78
|
-
* you may not use this file except in compliance with the License.
|
|
79
|
-
* You may obtain a copy of the License at
|
|
80
|
-
*
|
|
81
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
82
|
-
*
|
|
83
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
84
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
85
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
86
|
-
* See the License for the specific language governing permissions and
|
|
87
|
-
* limitations under the License.
|
|
88
|
-
*/
|
|
89
|
-
const moment = momentImported;
|
|
90
|
-
moment.locale(localStorage.getItem('langKey') || '');
|
|
91
|
-
class TaskDetailModalComponent {
|
|
92
|
-
constructor(toastr, formLinkService, router, logger, route) {
|
|
93
|
-
this.toastr = toastr;
|
|
94
|
-
this.formLinkService = formLinkService;
|
|
95
|
-
this.router = router;
|
|
96
|
-
this.logger = logger;
|
|
97
|
-
this.route = route;
|
|
98
|
-
this.task = null;
|
|
99
|
-
this.page = null;
|
|
100
|
-
this.formSubmit = new EventEmitter();
|
|
101
|
-
this.assignmentOfTaskChanged = new EventEmitter();
|
|
102
|
-
this.errorMessage = null;
|
|
103
|
-
this.formioOptions = new FormioOptionsImpl();
|
|
104
|
-
this.formioOptions.disableAlerts = true;
|
|
105
|
-
}
|
|
106
|
-
resetFormDefinition() {
|
|
107
|
-
// reset formDefinition in order to reload form-io component
|
|
108
|
-
this.formDefinition = null;
|
|
109
|
-
}
|
|
110
|
-
openTaskDetails(task) {
|
|
111
|
-
this.resetFormDefinition();
|
|
112
|
-
this.task = task;
|
|
113
|
-
this.page = {
|
|
114
|
-
title: task.name,
|
|
115
|
-
subtitle: `Created ${moment(task.created).fromNow()}`,
|
|
116
|
-
};
|
|
117
|
-
this.formLinkService
|
|
118
|
-
.getPreFilledFormDefinitionByFormLinkId(task.processDefinitionKey, task.businessKey, task.taskDefinitionKey, task.id // taskInstanceId
|
|
119
|
-
)
|
|
120
|
-
.subscribe(formDefinition => {
|
|
121
|
-
this.formAssociation = formDefinition.formAssociation;
|
|
122
|
-
const className = this.formAssociation.formLink.className.split('.');
|
|
123
|
-
const linkType = className[className.length - 1];
|
|
124
|
-
switch (linkType) {
|
|
125
|
-
case 'BpmnElementFormIdLink':
|
|
126
|
-
this.formDefinition = formDefinition;
|
|
127
|
-
this.modal.show();
|
|
128
|
-
break;
|
|
129
|
-
case 'BpmnElementUrlLink':
|
|
130
|
-
const url = this.router.serializeUrl(this.router.createUrlTree([formDefinition.formAssociation.formLink.url]));
|
|
131
|
-
window.open(url, '_blank');
|
|
132
|
-
break;
|
|
133
|
-
case 'BpmnElementAngularStateUrlLink':
|
|
134
|
-
this.route.params.pipe(take(1)).subscribe(params => {
|
|
135
|
-
const taskId = task === null || task === void 0 ? void 0 : task.id;
|
|
136
|
-
const documentId = params === null || params === void 0 ? void 0 : params.documentId;
|
|
137
|
-
this.router.navigate([formDefinition.formAssociation.formLink.url], {
|
|
138
|
-
state: Object.assign(Object.assign({}, (taskId && { taskId })), (documentId && { documentId })),
|
|
139
|
-
});
|
|
140
|
-
});
|
|
141
|
-
break;
|
|
142
|
-
default:
|
|
143
|
-
this.logger.fatal('Unsupported class name');
|
|
144
|
-
}
|
|
145
|
-
}, errors => {
|
|
146
|
-
var _a;
|
|
147
|
-
if ((_a = errors === null || errors === void 0 ? void 0 : errors.error) === null || _a === void 0 ? void 0 : _a.detail) {
|
|
148
|
-
this.errorMessage = errors.error.detail;
|
|
149
|
-
}
|
|
150
|
-
this.modal.show();
|
|
151
|
-
});
|
|
152
|
-
}
|
|
153
|
-
gotoFormLinkScreen() {
|
|
154
|
-
this.modal.hide();
|
|
155
|
-
this.router.navigate(['form-links']);
|
|
156
|
-
}
|
|
157
|
-
onSubmit(submission) {
|
|
158
|
-
this.formLinkService
|
|
159
|
-
.onSubmit(this.task.processDefinitionKey, this.formAssociation.formLink.id, submission.data, this.task.businessKey, this.task.id)
|
|
160
|
-
.subscribe((formSubmissionResult) => {
|
|
161
|
-
this.toastr.success(this.task.name + ' has successfully been completed');
|
|
162
|
-
this.modal.hide();
|
|
163
|
-
this.task = null;
|
|
164
|
-
this.formSubmit.emit();
|
|
165
|
-
}, errors => {
|
|
166
|
-
this.form.showErrors(errors);
|
|
167
|
-
});
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
TaskDetailModalComponent.decorators = [
|
|
171
|
-
{ type: Component, args: [{
|
|
172
|
-
selector: 'valtimo-task-detail-modal',
|
|
173
|
-
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",
|
|
174
|
-
encapsulation: ViewEncapsulation.None,
|
|
175
|
-
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}"]
|
|
176
|
-
},] }
|
|
177
|
-
];
|
|
178
|
-
TaskDetailModalComponent.ctorParameters = () => [
|
|
179
|
-
{ type: ToastrService },
|
|
180
|
-
{ type: FormLinkService },
|
|
181
|
-
{ type: Router },
|
|
182
|
-
{ type: NGXLogger },
|
|
183
|
-
{ type: ActivatedRoute }
|
|
184
|
-
];
|
|
185
|
-
TaskDetailModalComponent.propDecorators = {
|
|
186
|
-
form: [{ type: ViewChild, args: ['form',] }],
|
|
187
|
-
modal: [{ type: ViewChild, args: ['taskDetailModal',] }],
|
|
188
|
-
formSubmit: [{ type: Output }],
|
|
189
|
-
assignmentOfTaskChanged: [{ type: Output }]
|
|
152
|
+
/*
|
|
153
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
154
|
+
*
|
|
155
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
156
|
+
* you may not use this file except in compliance with the License.
|
|
157
|
+
* You may obtain a copy of the License at
|
|
158
|
+
*
|
|
159
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
160
|
+
*
|
|
161
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
162
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
163
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
164
|
+
* See the License for the specific language governing permissions and
|
|
165
|
+
* limitations under the License.
|
|
166
|
+
*/
|
|
167
|
+
const moment = momentImported;
|
|
168
|
+
moment.locale(localStorage.getItem('langKey') || '');
|
|
169
|
+
class TaskDetailModalComponent {
|
|
170
|
+
constructor(toastr, formLinkService, router, logger, route) {
|
|
171
|
+
this.toastr = toastr;
|
|
172
|
+
this.formLinkService = formLinkService;
|
|
173
|
+
this.router = router;
|
|
174
|
+
this.logger = logger;
|
|
175
|
+
this.route = route;
|
|
176
|
+
this.task = null;
|
|
177
|
+
this.page = null;
|
|
178
|
+
this.formSubmit = new EventEmitter();
|
|
179
|
+
this.assignmentOfTaskChanged = new EventEmitter();
|
|
180
|
+
this.errorMessage = null;
|
|
181
|
+
this.formioOptions = new FormioOptionsImpl();
|
|
182
|
+
this.formioOptions.disableAlerts = true;
|
|
183
|
+
}
|
|
184
|
+
resetFormDefinition() {
|
|
185
|
+
// reset formDefinition in order to reload form-io component
|
|
186
|
+
this.formDefinition = null;
|
|
187
|
+
}
|
|
188
|
+
openTaskDetails(task) {
|
|
189
|
+
this.resetFormDefinition();
|
|
190
|
+
this.task = task;
|
|
191
|
+
this.page = {
|
|
192
|
+
title: task.name,
|
|
193
|
+
subtitle: `Created ${moment(task.created).fromNow()}`,
|
|
194
|
+
};
|
|
195
|
+
this.formLinkService
|
|
196
|
+
.getPreFilledFormDefinitionByFormLinkId(task.processDefinitionKey, task.businessKey, task.taskDefinitionKey, task.id // taskInstanceId
|
|
197
|
+
)
|
|
198
|
+
.subscribe(formDefinition => {
|
|
199
|
+
this.formAssociation = formDefinition.formAssociation;
|
|
200
|
+
const className = this.formAssociation.formLink.className.split('.');
|
|
201
|
+
const linkType = className[className.length - 1];
|
|
202
|
+
switch (linkType) {
|
|
203
|
+
case 'BpmnElementFormIdLink':
|
|
204
|
+
this.formDefinition = formDefinition;
|
|
205
|
+
this.modal.show();
|
|
206
|
+
break;
|
|
207
|
+
case 'BpmnElementUrlLink':
|
|
208
|
+
const url = this.router.serializeUrl(this.router.createUrlTree([formDefinition.formAssociation.formLink.url]));
|
|
209
|
+
window.open(url, '_blank');
|
|
210
|
+
break;
|
|
211
|
+
case 'BpmnElementAngularStateUrlLink':
|
|
212
|
+
this.route.params.pipe(take(1)).subscribe(params => {
|
|
213
|
+
const taskId = task === null || task === void 0 ? void 0 : task.id;
|
|
214
|
+
const documentId = params === null || params === void 0 ? void 0 : params.documentId;
|
|
215
|
+
this.router.navigate([formDefinition.formAssociation.formLink.url], {
|
|
216
|
+
state: Object.assign(Object.assign({}, (taskId && { taskId })), (documentId && { documentId })),
|
|
217
|
+
});
|
|
218
|
+
});
|
|
219
|
+
break;
|
|
220
|
+
default:
|
|
221
|
+
this.logger.fatal('Unsupported class name');
|
|
222
|
+
}
|
|
223
|
+
}, errors => {
|
|
224
|
+
var _a;
|
|
225
|
+
if ((_a = errors === null || errors === void 0 ? void 0 : errors.error) === null || _a === void 0 ? void 0 : _a.detail) {
|
|
226
|
+
this.errorMessage = errors.error.detail;
|
|
227
|
+
}
|
|
228
|
+
this.modal.show();
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
gotoFormLinkScreen() {
|
|
232
|
+
this.modal.hide();
|
|
233
|
+
this.router.navigate(['form-links']);
|
|
234
|
+
}
|
|
235
|
+
onSubmit(submission) {
|
|
236
|
+
this.formLinkService
|
|
237
|
+
.onSubmit(this.task.processDefinitionKey, this.formAssociation.formLink.id, submission.data, this.task.businessKey, this.task.id)
|
|
238
|
+
.subscribe((formSubmissionResult) => {
|
|
239
|
+
this.toastr.success(this.task.name + ' has successfully been completed');
|
|
240
|
+
this.modal.hide();
|
|
241
|
+
this.task = null;
|
|
242
|
+
this.formSubmit.emit();
|
|
243
|
+
}, errors => {
|
|
244
|
+
this.form.showErrors(errors);
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
TaskDetailModalComponent.decorators = [
|
|
249
|
+
{ type: Component, args: [{
|
|
250
|
+
selector: 'valtimo-task-detail-modal',
|
|
251
|
+
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",
|
|
252
|
+
encapsulation: ViewEncapsulation.None,
|
|
253
|
+
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}"]
|
|
254
|
+
},] }
|
|
255
|
+
];
|
|
256
|
+
TaskDetailModalComponent.ctorParameters = () => [
|
|
257
|
+
{ type: ToastrService },
|
|
258
|
+
{ type: FormLinkService },
|
|
259
|
+
{ type: Router },
|
|
260
|
+
{ type: NGXLogger },
|
|
261
|
+
{ type: ActivatedRoute }
|
|
262
|
+
];
|
|
263
|
+
TaskDetailModalComponent.propDecorators = {
|
|
264
|
+
form: [{ type: ViewChild, args: ['form',] }],
|
|
265
|
+
modal: [{ type: ViewChild, args: ['taskDetailModal',] }],
|
|
266
|
+
formSubmit: [{ type: Output }],
|
|
267
|
+
assignmentOfTaskChanged: [{ type: Output }]
|
|
190
268
|
};
|
|
191
269
|
|
|
192
|
-
/*
|
|
193
|
-
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
194
|
-
*
|
|
195
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
196
|
-
* you may not use this file except in compliance with the License.
|
|
197
|
-
* You may obtain a copy of the License at
|
|
198
|
-
*
|
|
199
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
200
|
-
*
|
|
201
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
202
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
203
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
204
|
-
* See the License for the specific language governing permissions and
|
|
205
|
-
* limitations under the License.
|
|
206
|
-
*/
|
|
207
|
-
const moment$1 = momentImported;
|
|
208
|
-
moment$1.locale(localStorage.getItem('langKey') || '');
|
|
209
|
-
class TaskListComponent {
|
|
210
|
-
constructor(taskService, router, logger, translateService) {
|
|
211
|
-
this.taskService = taskService;
|
|
212
|
-
this.router = router;
|
|
213
|
-
this.logger = logger;
|
|
214
|
-
this.translateService = translateService;
|
|
215
|
-
this.tasks = {
|
|
216
|
-
mine: new TaskList(),
|
|
217
|
-
open: new TaskList(),
|
|
218
|
-
all: new TaskList(),
|
|
219
|
-
};
|
|
220
|
-
this.currentTaskType = 'mine';
|
|
221
|
-
this.listTitle = null;
|
|
222
|
-
this.listDescription = null;
|
|
223
|
-
}
|
|
224
|
-
paginationClicked(page, type) {
|
|
225
|
-
this.tasks[type].page = page - 1;
|
|
226
|
-
this.getTasks(type);
|
|
227
|
-
}
|
|
228
|
-
paginationSet() {
|
|
229
|
-
this.tasks.mine.pagination.size =
|
|
230
|
-
this.tasks.all.pagination.size =
|
|
231
|
-
this.tasks.open.pagination.size =
|
|
232
|
-
this.tasks[this.currentTaskType].pagination.size;
|
|
233
|
-
this.getTasks(this.currentTaskType);
|
|
234
|
-
}
|
|
235
|
-
clearPagination(type) {
|
|
236
|
-
this.tasks[type].page = 0;
|
|
237
|
-
}
|
|
238
|
-
tabChange(tab) {
|
|
239
|
-
this.clearPagination(this.currentTaskType);
|
|
240
|
-
switch (tab.nextId) {
|
|
241
|
-
case 'ngb-tab-0':
|
|
242
|
-
this.getTasks('mine');
|
|
243
|
-
break;
|
|
244
|
-
case 'ngb-tab-1':
|
|
245
|
-
this.getTasks('open');
|
|
246
|
-
break;
|
|
247
|
-
case 'ngb-tab-2':
|
|
248
|
-
this.getTasks('all');
|
|
249
|
-
break;
|
|
250
|
-
default:
|
|
251
|
-
this.logger.fatal('Unreachable case');
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
showTask(task) {
|
|
255
|
-
this.router.navigate(['tasks', task.id]);
|
|
256
|
-
}
|
|
257
|
-
getTasks(type) {
|
|
258
|
-
let params;
|
|
259
|
-
this.translationSubscription = combineLatest([
|
|
260
|
-
this.translateService.stream(`task-list.${type}.title`),
|
|
261
|
-
this.translateService.stream(`task-list.${type}.description`),
|
|
262
|
-
]).subscribe(([title, description]) => {
|
|
263
|
-
this.listTitle = title;
|
|
264
|
-
this.listDescription = description;
|
|
265
|
-
});
|
|
266
|
-
switch (type) {
|
|
267
|
-
case 'mine':
|
|
268
|
-
params = {
|
|
269
|
-
page: this.tasks.mine.page,
|
|
270
|
-
size: this.tasks.mine.pagination.size,
|
|
271
|
-
filter: 'mine',
|
|
272
|
-
};
|
|
273
|
-
this.currentTaskType = 'mine';
|
|
274
|
-
break;
|
|
275
|
-
case 'open':
|
|
276
|
-
params = {
|
|
277
|
-
page: this.tasks.open.page,
|
|
278
|
-
size: this.tasks.open.pagination.size,
|
|
279
|
-
filter: 'open',
|
|
280
|
-
};
|
|
281
|
-
this.currentTaskType = 'open';
|
|
282
|
-
break;
|
|
283
|
-
case 'all':
|
|
284
|
-
params = { page: this.tasks.all.page, size: this.tasks.open.pagination.size, filter: 'all' };
|
|
285
|
-
this.currentTaskType = 'all';
|
|
286
|
-
break;
|
|
287
|
-
default:
|
|
288
|
-
this.logger.fatal('Unreachable case');
|
|
289
|
-
}
|
|
290
|
-
this.taskService.queryTasks(params).subscribe((results) => {
|
|
291
|
-
this.tasks[type].pagination.collectionSize = results.headers.get('x-total-count');
|
|
292
|
-
this.tasks[type].tasks = results.body;
|
|
293
|
-
this.tasks[type].tasks.map((task) => {
|
|
294
|
-
task.created = moment$1(task.created).format('DD MMM YYYY HH:mm');
|
|
295
|
-
if (task.due) {
|
|
296
|
-
task.due = moment$1(task.due).format('DD MMM YYYY HH:mm');
|
|
297
|
-
}
|
|
298
|
-
});
|
|
299
|
-
this.tasks[type].fields = [
|
|
300
|
-
{
|
|
301
|
-
key: 'created',
|
|
302
|
-
label: 'Created on',
|
|
303
|
-
},
|
|
304
|
-
{
|
|
305
|
-
key: 'name',
|
|
306
|
-
label: 'Name',
|
|
307
|
-
},
|
|
308
|
-
{
|
|
309
|
-
key: 'valtimoAssignee.fullName',
|
|
310
|
-
label: 'Assignee',
|
|
311
|
-
},
|
|
312
|
-
{
|
|
313
|
-
key: 'due',
|
|
314
|
-
label: 'Due date',
|
|
315
|
-
},
|
|
316
|
-
];
|
|
317
|
-
});
|
|
318
|
-
}
|
|
319
|
-
rowOpenTaskClick(task) {
|
|
320
|
-
if (!task.endTime) {
|
|
321
|
-
this.taskDetail.openTaskDetails(task);
|
|
322
|
-
}
|
|
323
|
-
else {
|
|
324
|
-
return false;
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
ngOnDestroy() {
|
|
328
|
-
this.translationSubscription.unsubscribe();
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
TaskListComponent.decorators = [
|
|
332
|
-
{ type: Component, args: [{
|
|
333
|
-
selector: 'valtimo-task-list',
|
|
334
|
-
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<div class=\"main-content\">\n <div class=\"container-fluid\">\n <valtimo-widget>\n <valtimo-list\n [items]=\"tasks[currentTaskType].tasks\"\n [fields]=\"tasks[currentTaskType].fields\"\n [pagination]=\"tasks[currentTaskType].pagination\"\n [viewMode]=\"true\"\n (paginationClicked)=\"paginationClicked($event, currentTaskType)\"\n (paginationSet)=\"paginationSet()\"\n paginationIdentifier=\"taskList\"\n [isSearchable]=\"true\"\n [header]=\"true\"\n (rowClicked)=\"rowOpenTaskClick($event)\"\n >\n <div header>\n <h3 class=\"list-header-title\">{{ listTitle }}</h3>\n <h5 class=\"list-header-description\">{{ listDescription }}</h5>\n </div>\n <div tabs>\n <ngb-tabset [destroyOnHide]=\"false\" (tabChange)=\"tabChange($event)\">\n <ngb-tab id=\"ngb-tab-0\" [title]=\"'task-list.mine.title' | translate\"> </ngb-tab>\n <ngb-tab id=\"ngb-tab-1\" [title]=\"'task-list.open.title' | translate\"> </ngb-tab>\n <ngb-tab id=\"ngb-tab-2\" [title]=\"'task-list.all.title' | translate\"> </ngb-tab>\n </ngb-tabset>\n </div>\n </valtimo-list>\n </valtimo-widget>\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",
|
|
335
|
-
encapsulation: ViewEncapsulation.None,
|
|
336
|
-
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 */.tab-content{margin:0;padding:0}.nav.nav-tabs{background-color:#f5f5f5}"]
|
|
337
|
-
},] }
|
|
338
|
-
];
|
|
339
|
-
TaskListComponent.ctorParameters = () => [
|
|
340
|
-
{ type: TaskService },
|
|
341
|
-
{ type: Router },
|
|
342
|
-
{ type: NGXLogger },
|
|
343
|
-
{ type: TranslateService }
|
|
344
|
-
];
|
|
345
|
-
TaskListComponent.propDecorators = {
|
|
346
|
-
taskDetail: [{ type: ViewChild, args: ['taskDetail',] }]
|
|
270
|
+
/*
|
|
271
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
272
|
+
*
|
|
273
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
274
|
+
* you may not use this file except in compliance with the License.
|
|
275
|
+
* You may obtain a copy of the License at
|
|
276
|
+
*
|
|
277
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
278
|
+
*
|
|
279
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
280
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
281
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
282
|
+
* See the License for the specific language governing permissions and
|
|
283
|
+
* limitations under the License.
|
|
284
|
+
*/
|
|
285
|
+
const moment$1 = momentImported;
|
|
286
|
+
moment$1.locale(localStorage.getItem('langKey') || '');
|
|
287
|
+
class TaskListComponent {
|
|
288
|
+
constructor(taskService, router, logger, translateService) {
|
|
289
|
+
this.taskService = taskService;
|
|
290
|
+
this.router = router;
|
|
291
|
+
this.logger = logger;
|
|
292
|
+
this.translateService = translateService;
|
|
293
|
+
this.tasks = {
|
|
294
|
+
mine: new TaskList(),
|
|
295
|
+
open: new TaskList(),
|
|
296
|
+
all: new TaskList(),
|
|
297
|
+
};
|
|
298
|
+
this.currentTaskType = 'mine';
|
|
299
|
+
this.listTitle = null;
|
|
300
|
+
this.listDescription = null;
|
|
301
|
+
}
|
|
302
|
+
paginationClicked(page, type) {
|
|
303
|
+
this.tasks[type].page = page - 1;
|
|
304
|
+
this.getTasks(type);
|
|
305
|
+
}
|
|
306
|
+
paginationSet() {
|
|
307
|
+
this.tasks.mine.pagination.size =
|
|
308
|
+
this.tasks.all.pagination.size =
|
|
309
|
+
this.tasks.open.pagination.size =
|
|
310
|
+
this.tasks[this.currentTaskType].pagination.size;
|
|
311
|
+
this.getTasks(this.currentTaskType);
|
|
312
|
+
}
|
|
313
|
+
clearPagination(type) {
|
|
314
|
+
this.tasks[type].page = 0;
|
|
315
|
+
}
|
|
316
|
+
tabChange(tab) {
|
|
317
|
+
this.clearPagination(this.currentTaskType);
|
|
318
|
+
switch (tab.nextId) {
|
|
319
|
+
case 'ngb-tab-0':
|
|
320
|
+
this.getTasks('mine');
|
|
321
|
+
break;
|
|
322
|
+
case 'ngb-tab-1':
|
|
323
|
+
this.getTasks('open');
|
|
324
|
+
break;
|
|
325
|
+
case 'ngb-tab-2':
|
|
326
|
+
this.getTasks('all');
|
|
327
|
+
break;
|
|
328
|
+
default:
|
|
329
|
+
this.logger.fatal('Unreachable case');
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
showTask(task) {
|
|
333
|
+
this.router.navigate(['tasks', task.id]);
|
|
334
|
+
}
|
|
335
|
+
getTasks(type) {
|
|
336
|
+
let params;
|
|
337
|
+
this.translationSubscription = combineLatest([
|
|
338
|
+
this.translateService.stream(`task-list.${type}.title`),
|
|
339
|
+
this.translateService.stream(`task-list.${type}.description`),
|
|
340
|
+
]).subscribe(([title, description]) => {
|
|
341
|
+
this.listTitle = title;
|
|
342
|
+
this.listDescription = description;
|
|
343
|
+
});
|
|
344
|
+
switch (type) {
|
|
345
|
+
case 'mine':
|
|
346
|
+
params = {
|
|
347
|
+
page: this.tasks.mine.page,
|
|
348
|
+
size: this.tasks.mine.pagination.size,
|
|
349
|
+
filter: 'mine',
|
|
350
|
+
};
|
|
351
|
+
this.currentTaskType = 'mine';
|
|
352
|
+
break;
|
|
353
|
+
case 'open':
|
|
354
|
+
params = {
|
|
355
|
+
page: this.tasks.open.page,
|
|
356
|
+
size: this.tasks.open.pagination.size,
|
|
357
|
+
filter: 'open',
|
|
358
|
+
};
|
|
359
|
+
this.currentTaskType = 'open';
|
|
360
|
+
break;
|
|
361
|
+
case 'all':
|
|
362
|
+
params = { page: this.tasks.all.page, size: this.tasks.open.pagination.size, filter: 'all' };
|
|
363
|
+
this.currentTaskType = 'all';
|
|
364
|
+
break;
|
|
365
|
+
default:
|
|
366
|
+
this.logger.fatal('Unreachable case');
|
|
367
|
+
}
|
|
368
|
+
this.taskService.queryTasks(params).subscribe((results) => {
|
|
369
|
+
this.tasks[type].pagination.collectionSize = results.headers.get('x-total-count');
|
|
370
|
+
this.tasks[type].tasks = results.body;
|
|
371
|
+
this.tasks[type].tasks.map((task) => {
|
|
372
|
+
task.created = moment$1(task.created).format('DD MMM YYYY HH:mm');
|
|
373
|
+
if (task.due) {
|
|
374
|
+
task.due = moment$1(task.due).format('DD MMM YYYY HH:mm');
|
|
375
|
+
}
|
|
376
|
+
});
|
|
377
|
+
this.tasks[type].fields = [
|
|
378
|
+
{
|
|
379
|
+
key: 'created',
|
|
380
|
+
label: 'Created on',
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
key: 'name',
|
|
384
|
+
label: 'Name',
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
key: 'valtimoAssignee.fullName',
|
|
388
|
+
label: 'Assignee',
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
key: 'due',
|
|
392
|
+
label: 'Due date',
|
|
393
|
+
},
|
|
394
|
+
];
|
|
395
|
+
});
|
|
396
|
+
}
|
|
397
|
+
rowOpenTaskClick(task) {
|
|
398
|
+
if (!task.endTime) {
|
|
399
|
+
this.taskDetail.openTaskDetails(task);
|
|
400
|
+
}
|
|
401
|
+
else {
|
|
402
|
+
return false;
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
ngOnDestroy() {
|
|
406
|
+
this.translationSubscription.unsubscribe();
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
TaskListComponent.decorators = [
|
|
410
|
+
{ type: Component, args: [{
|
|
411
|
+
selector: 'valtimo-task-list',
|
|
412
|
+
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<div class=\"main-content\">\n <div class=\"container-fluid\">\n <valtimo-widget>\n <valtimo-list\n [items]=\"tasks[currentTaskType].tasks\"\n [fields]=\"tasks[currentTaskType].fields\"\n [pagination]=\"tasks[currentTaskType].pagination\"\n [viewMode]=\"true\"\n (paginationClicked)=\"paginationClicked($event, currentTaskType)\"\n (paginationSet)=\"paginationSet()\"\n paginationIdentifier=\"taskList\"\n [isSearchable]=\"true\"\n [header]=\"true\"\n (rowClicked)=\"rowOpenTaskClick($event)\"\n >\n <div header>\n <h3 class=\"list-header-title\">{{ listTitle }}</h3>\n <h5 class=\"list-header-description\">{{ listDescription }}</h5>\n </div>\n <div tabs>\n <ngb-tabset [destroyOnHide]=\"false\" (tabChange)=\"tabChange($event)\">\n <ngb-tab id=\"ngb-tab-0\" [title]=\"'task-list.mine.title' | translate\"> </ngb-tab>\n <ngb-tab id=\"ngb-tab-1\" [title]=\"'task-list.open.title' | translate\"> </ngb-tab>\n <ngb-tab id=\"ngb-tab-2\" [title]=\"'task-list.all.title' | translate\"> </ngb-tab>\n </ngb-tabset>\n </div>\n </valtimo-list>\n </valtimo-widget>\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",
|
|
413
|
+
encapsulation: ViewEncapsulation.None,
|
|
414
|
+
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 */.tab-content{margin:0;padding:0}.nav.nav-tabs{background-color:#f5f5f5}"]
|
|
415
|
+
},] }
|
|
416
|
+
];
|
|
417
|
+
TaskListComponent.ctorParameters = () => [
|
|
418
|
+
{ type: TaskService },
|
|
419
|
+
{ type: Router },
|
|
420
|
+
{ type: NGXLogger },
|
|
421
|
+
{ type: TranslateService }
|
|
422
|
+
];
|
|
423
|
+
TaskListComponent.propDecorators = {
|
|
424
|
+
taskDetail: [{ type: ViewChild, args: ['taskDetail',] }]
|
|
347
425
|
};
|
|
348
426
|
|
|
349
|
-
/*
|
|
350
|
-
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
351
|
-
*
|
|
352
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
353
|
-
* you may not use this file except in compliance with the License.
|
|
354
|
-
* You may obtain a copy of the License at
|
|
355
|
-
*
|
|
356
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
357
|
-
*
|
|
358
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
359
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
360
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
361
|
-
* See the License for the specific language governing permissions and
|
|
362
|
-
* limitations under the License.
|
|
363
|
-
*/
|
|
364
|
-
const ɵ0 = { title: 'Tasks', roles: [ROLE_USER] };
|
|
365
|
-
const routes = [
|
|
366
|
-
{
|
|
367
|
-
path: 'tasks',
|
|
368
|
-
component: TaskListComponent,
|
|
369
|
-
canActivate: [AuthGuardService],
|
|
370
|
-
data: ɵ0,
|
|
371
|
-
},
|
|
372
|
-
];
|
|
373
|
-
class TaskRoutingModule {
|
|
374
|
-
}
|
|
375
|
-
TaskRoutingModule.decorators = [
|
|
376
|
-
{ type: NgModule, args: [{
|
|
377
|
-
declarations: [],
|
|
378
|
-
imports: [CommonModule, RouterModule.forChild(routes)],
|
|
379
|
-
exports: [RouterModule],
|
|
380
|
-
},] }
|
|
427
|
+
/*
|
|
428
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
429
|
+
*
|
|
430
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
431
|
+
* you may not use this file except in compliance with the License.
|
|
432
|
+
* You may obtain a copy of the License at
|
|
433
|
+
*
|
|
434
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
435
|
+
*
|
|
436
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
437
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
438
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
439
|
+
* See the License for the specific language governing permissions and
|
|
440
|
+
* limitations under the License.
|
|
441
|
+
*/
|
|
442
|
+
const ɵ0 = { title: 'Tasks', roles: [ROLE_USER] };
|
|
443
|
+
const routes = [
|
|
444
|
+
{
|
|
445
|
+
path: 'tasks',
|
|
446
|
+
component: TaskListComponent,
|
|
447
|
+
canActivate: [AuthGuardService],
|
|
448
|
+
data: ɵ0,
|
|
449
|
+
},
|
|
450
|
+
];
|
|
451
|
+
class TaskRoutingModule {
|
|
452
|
+
}
|
|
453
|
+
TaskRoutingModule.decorators = [
|
|
454
|
+
{ type: NgModule, args: [{
|
|
455
|
+
declarations: [],
|
|
456
|
+
imports: [CommonModule, RouterModule.forChild(routes)],
|
|
457
|
+
exports: [RouterModule],
|
|
458
|
+
},] }
|
|
381
459
|
];
|
|
382
460
|
|
|
383
|
-
/*
|
|
384
|
-
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
385
|
-
*
|
|
386
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
387
|
-
* you may not use this file except in compliance with the License.
|
|
388
|
-
* You may obtain a copy of the License at
|
|
389
|
-
*
|
|
390
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
391
|
-
*
|
|
392
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
393
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
394
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
395
|
-
* See the License for the specific language governing permissions and
|
|
396
|
-
* limitations under the License.
|
|
397
|
-
*/
|
|
398
|
-
class AssignUserToTaskComponent {
|
|
399
|
-
constructor(taskService) {
|
|
400
|
-
this.taskService = taskService;
|
|
401
|
-
this.assignmentOfTaskChanged = new EventEmitter();
|
|
402
|
-
this.candidateUsersForTask$ = new BehaviorSubject(undefined);
|
|
403
|
-
this.disabled$ = new BehaviorSubject(true);
|
|
404
|
-
this.assignedEmailOnServer$ = new BehaviorSubject(null);
|
|
405
|
-
this.userEmailToAssign = null;
|
|
406
|
-
this.assignedUserFullName$ = new BehaviorSubject(null);
|
|
407
|
-
}
|
|
408
|
-
ngOnInit() {
|
|
409
|
-
this.taskService.getCandidateUsers(this.taskId).subscribe(candidateUsers => {
|
|
410
|
-
this.candidateUsersForTask$.next(candidateUsers);
|
|
411
|
-
if (this.assigneeEmail) {
|
|
412
|
-
this.assignedEmailOnServer$.next(this.assigneeEmail);
|
|
413
|
-
this.userEmailToAssign = this.assigneeEmail;
|
|
414
|
-
this.assignedUserFullName$.next(this.getAssignedUserName(candidateUsers, this.assigneeEmail));
|
|
415
|
-
}
|
|
416
|
-
this.enable();
|
|
417
|
-
});
|
|
418
|
-
}
|
|
419
|
-
ngOnChanges(changes) {
|
|
420
|
-
const assigneeEmail = changes.assigneeEmail;
|
|
421
|
-
if (assigneeEmail) {
|
|
422
|
-
this.candidateUsersForTask$.pipe(take(1)).subscribe(candidateUsers => {
|
|
423
|
-
const currentUserEmail = assigneeEmail.currentValue;
|
|
424
|
-
this.assignedEmailOnServer$.next(currentUserEmail || null);
|
|
425
|
-
this.userEmailToAssign = currentUserEmail || null;
|
|
426
|
-
this.assignedUserFullName$.next(this.getAssignedUserName(candidateUsers, currentUserEmail));
|
|
427
|
-
});
|
|
428
|
-
}
|
|
429
|
-
else {
|
|
430
|
-
this.clear();
|
|
431
|
-
}
|
|
432
|
-
}
|
|
433
|
-
assignTask(userEmail) {
|
|
434
|
-
this.disable();
|
|
435
|
-
combineLatest([
|
|
436
|
-
this.candidateUsersForTask$,
|
|
437
|
-
this.taskService.assignTask(this.taskId, { assignee: userEmail }),
|
|
438
|
-
])
|
|
439
|
-
.pipe(take(1), tap(([candidateUsers]) => {
|
|
440
|
-
this.userEmailToAssign = userEmail;
|
|
441
|
-
this.assignedEmailOnServer$.next(userEmail);
|
|
442
|
-
this.assignedUserFullName$.next(this.getAssignedUserName(candidateUsers, userEmail));
|
|
443
|
-
this.emitChange();
|
|
444
|
-
this.enable();
|
|
445
|
-
}))
|
|
446
|
-
.subscribe();
|
|
447
|
-
}
|
|
448
|
-
unassignTask() {
|
|
449
|
-
this.disable();
|
|
450
|
-
this.taskService
|
|
451
|
-
.unassignTask(this.taskId)
|
|
452
|
-
.pipe(tap(() => {
|
|
453
|
-
this.clear();
|
|
454
|
-
this.emitChange();
|
|
455
|
-
this.enable();
|
|
456
|
-
}))
|
|
457
|
-
.subscribe();
|
|
458
|
-
}
|
|
459
|
-
getAssignedUserName(users, userEmail) {
|
|
460
|
-
if (users && userEmail) {
|
|
461
|
-
const findUser = users.find(user => user.email === userEmail);
|
|
462
|
-
return findUser ? findUser.fullName : '';
|
|
463
|
-
}
|
|
464
|
-
return '';
|
|
465
|
-
}
|
|
466
|
-
mapUsersForDropdown(users) {
|
|
467
|
-
return (users &&
|
|
468
|
-
users
|
|
469
|
-
.map(user => { var _a; return (Object.assign(Object.assign({}, user), { lastName: ((_a = user.lastName) === null || _a === void 0 ? void 0 : _a.split(' ').splice(-1)[0]) || '' })); })
|
|
470
|
-
.sort((a, b) => a.lastName.localeCompare(b.lastName))
|
|
471
|
-
.map(user => ({ text: user.fullName, id: user.email })));
|
|
472
|
-
}
|
|
473
|
-
clear() {
|
|
474
|
-
this.assignedEmailOnServer$.next(null);
|
|
475
|
-
this.userEmailToAssign = null;
|
|
476
|
-
}
|
|
477
|
-
emitChange() {
|
|
478
|
-
this.assignmentOfTaskChanged.emit();
|
|
479
|
-
}
|
|
480
|
-
enable() {
|
|
481
|
-
this.disabled$.next(false);
|
|
482
|
-
}
|
|
483
|
-
disable() {
|
|
484
|
-
this.disabled$.next(true);
|
|
485
|
-
}
|
|
486
|
-
}
|
|
487
|
-
AssignUserToTaskComponent.decorators = [
|
|
488
|
-
{ type: Component, args: [{
|
|
489
|
-
selector: 'valtimo-assign-user-to-task',
|
|
490
|
-
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",
|
|
491
|
-
styles: [".container-fluid{color:#959595}i{font-size:13px}"]
|
|
492
|
-
},] }
|
|
493
|
-
];
|
|
494
|
-
AssignUserToTaskComponent.ctorParameters = () => [
|
|
495
|
-
{ type: TaskService }
|
|
496
|
-
];
|
|
497
|
-
AssignUserToTaskComponent.propDecorators = {
|
|
498
|
-
taskId: [{ type: Input }],
|
|
499
|
-
assigneeEmail: [{ type: Input }],
|
|
500
|
-
assignmentOfTaskChanged: [{ type: Output }]
|
|
461
|
+
/*
|
|
462
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
463
|
+
*
|
|
464
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
465
|
+
* you may not use this file except in compliance with the License.
|
|
466
|
+
* You may obtain a copy of the License at
|
|
467
|
+
*
|
|
468
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
469
|
+
*
|
|
470
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
471
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
472
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
473
|
+
* See the License for the specific language governing permissions and
|
|
474
|
+
* limitations under the License.
|
|
475
|
+
*/
|
|
476
|
+
class AssignUserToTaskComponent {
|
|
477
|
+
constructor(taskService) {
|
|
478
|
+
this.taskService = taskService;
|
|
479
|
+
this.assignmentOfTaskChanged = new EventEmitter();
|
|
480
|
+
this.candidateUsersForTask$ = new BehaviorSubject(undefined);
|
|
481
|
+
this.disabled$ = new BehaviorSubject(true);
|
|
482
|
+
this.assignedEmailOnServer$ = new BehaviorSubject(null);
|
|
483
|
+
this.userEmailToAssign = null;
|
|
484
|
+
this.assignedUserFullName$ = new BehaviorSubject(null);
|
|
485
|
+
}
|
|
486
|
+
ngOnInit() {
|
|
487
|
+
this.taskService.getCandidateUsers(this.taskId).subscribe(candidateUsers => {
|
|
488
|
+
this.candidateUsersForTask$.next(candidateUsers);
|
|
489
|
+
if (this.assigneeEmail) {
|
|
490
|
+
this.assignedEmailOnServer$.next(this.assigneeEmail);
|
|
491
|
+
this.userEmailToAssign = this.assigneeEmail;
|
|
492
|
+
this.assignedUserFullName$.next(this.getAssignedUserName(candidateUsers, this.assigneeEmail));
|
|
493
|
+
}
|
|
494
|
+
this.enable();
|
|
495
|
+
});
|
|
496
|
+
}
|
|
497
|
+
ngOnChanges(changes) {
|
|
498
|
+
const assigneeEmail = changes.assigneeEmail;
|
|
499
|
+
if (assigneeEmail) {
|
|
500
|
+
this.candidateUsersForTask$.pipe(take(1)).subscribe(candidateUsers => {
|
|
501
|
+
const currentUserEmail = assigneeEmail.currentValue;
|
|
502
|
+
this.assignedEmailOnServer$.next(currentUserEmail || null);
|
|
503
|
+
this.userEmailToAssign = currentUserEmail || null;
|
|
504
|
+
this.assignedUserFullName$.next(this.getAssignedUserName(candidateUsers, currentUserEmail));
|
|
505
|
+
});
|
|
506
|
+
}
|
|
507
|
+
else {
|
|
508
|
+
this.clear();
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
assignTask(userEmail) {
|
|
512
|
+
this.disable();
|
|
513
|
+
combineLatest([
|
|
514
|
+
this.candidateUsersForTask$,
|
|
515
|
+
this.taskService.assignTask(this.taskId, { assignee: userEmail }),
|
|
516
|
+
])
|
|
517
|
+
.pipe(take(1), tap(([candidateUsers]) => {
|
|
518
|
+
this.userEmailToAssign = userEmail;
|
|
519
|
+
this.assignedEmailOnServer$.next(userEmail);
|
|
520
|
+
this.assignedUserFullName$.next(this.getAssignedUserName(candidateUsers, userEmail));
|
|
521
|
+
this.emitChange();
|
|
522
|
+
this.enable();
|
|
523
|
+
}))
|
|
524
|
+
.subscribe();
|
|
525
|
+
}
|
|
526
|
+
unassignTask() {
|
|
527
|
+
this.disable();
|
|
528
|
+
this.taskService
|
|
529
|
+
.unassignTask(this.taskId)
|
|
530
|
+
.pipe(tap(() => {
|
|
531
|
+
this.clear();
|
|
532
|
+
this.emitChange();
|
|
533
|
+
this.enable();
|
|
534
|
+
}))
|
|
535
|
+
.subscribe();
|
|
536
|
+
}
|
|
537
|
+
getAssignedUserName(users, userEmail) {
|
|
538
|
+
if (users && userEmail) {
|
|
539
|
+
const findUser = users.find(user => user.email === userEmail);
|
|
540
|
+
return findUser ? findUser.fullName : '';
|
|
541
|
+
}
|
|
542
|
+
return '';
|
|
543
|
+
}
|
|
544
|
+
mapUsersForDropdown(users) {
|
|
545
|
+
return (users &&
|
|
546
|
+
users
|
|
547
|
+
.map(user => { var _a; return (Object.assign(Object.assign({}, user), { lastName: ((_a = user.lastName) === null || _a === void 0 ? void 0 : _a.split(' ').splice(-1)[0]) || '' })); })
|
|
548
|
+
.sort((a, b) => a.lastName.localeCompare(b.lastName))
|
|
549
|
+
.map(user => ({ text: user.fullName, id: user.email })));
|
|
550
|
+
}
|
|
551
|
+
clear() {
|
|
552
|
+
this.assignedEmailOnServer$.next(null);
|
|
553
|
+
this.userEmailToAssign = null;
|
|
554
|
+
}
|
|
555
|
+
emitChange() {
|
|
556
|
+
this.assignmentOfTaskChanged.emit();
|
|
557
|
+
}
|
|
558
|
+
enable() {
|
|
559
|
+
this.disabled$.next(false);
|
|
560
|
+
}
|
|
561
|
+
disable() {
|
|
562
|
+
this.disabled$.next(true);
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
AssignUserToTaskComponent.decorators = [
|
|
566
|
+
{ type: Component, args: [{
|
|
567
|
+
selector: 'valtimo-assign-user-to-task',
|
|
568
|
+
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",
|
|
569
|
+
styles: [".container-fluid{color:#959595}i{font-size:13px}"]
|
|
570
|
+
},] }
|
|
571
|
+
];
|
|
572
|
+
AssignUserToTaskComponent.ctorParameters = () => [
|
|
573
|
+
{ type: TaskService }
|
|
574
|
+
];
|
|
575
|
+
AssignUserToTaskComponent.propDecorators = {
|
|
576
|
+
taskId: [{ type: Input }],
|
|
577
|
+
assigneeEmail: [{ type: Input }],
|
|
578
|
+
assignmentOfTaskChanged: [{ type: Output }]
|
|
501
579
|
};
|
|
502
580
|
|
|
503
|
-
/*
|
|
504
|
-
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
505
|
-
*
|
|
506
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
507
|
-
* you may not use this file except in compliance with the License.
|
|
508
|
-
* You may obtain a copy of the License at
|
|
509
|
-
*
|
|
510
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
511
|
-
*
|
|
512
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
513
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
514
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
515
|
-
* See the License for the specific language governing permissions and
|
|
516
|
-
* limitations under the License.
|
|
517
|
-
*/
|
|
518
|
-
const ɵ0$1 = HttpLoaderFactory;
|
|
519
|
-
class TaskModule {
|
|
520
|
-
}
|
|
521
|
-
TaskModule.decorators = [
|
|
522
|
-
{ type: NgModule, args: [{
|
|
523
|
-
declarations: [TaskListComponent, TaskDetailModalComponent, AssignUserToTaskComponent],
|
|
524
|
-
imports: [
|
|
525
|
-
CommonModule,
|
|
526
|
-
TaskRoutingModule,
|
|
527
|
-
ListModule,
|
|
528
|
-
PageHeaderModule,
|
|
529
|
-
WidgetModule,
|
|
530
|
-
SpinnerModule,
|
|
531
|
-
SearchableDropdownSelectModule,
|
|
532
|
-
CamundaFormModule,
|
|
533
|
-
BrowserAnimationsModule,
|
|
534
|
-
FormsModule,
|
|
535
|
-
ToastrModule.forRoot({
|
|
536
|
-
positionClass: 'toast-bottom-full-width',
|
|
537
|
-
preventDuplicates: true,
|
|
538
|
-
}),
|
|
539
|
-
TranslateModule.forRoot({
|
|
540
|
-
loader: {
|
|
541
|
-
provide: TranslateLoader,
|
|
542
|
-
useFactory: ɵ0$1,
|
|
543
|
-
deps: [HttpClient],
|
|
544
|
-
},
|
|
545
|
-
}),
|
|
546
|
-
NgbModule,
|
|
547
|
-
FormIoModule,
|
|
548
|
-
ModalModule,
|
|
549
|
-
],
|
|
550
|
-
exports: [TaskListComponent, TaskDetailModalComponent, AssignUserToTaskComponent],
|
|
551
|
-
},] }
|
|
581
|
+
/*
|
|
582
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
583
|
+
*
|
|
584
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
585
|
+
* you may not use this file except in compliance with the License.
|
|
586
|
+
* You may obtain a copy of the License at
|
|
587
|
+
*
|
|
588
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
589
|
+
*
|
|
590
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
591
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
592
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
593
|
+
* See the License for the specific language governing permissions and
|
|
594
|
+
* limitations under the License.
|
|
595
|
+
*/
|
|
596
|
+
const ɵ0$1 = HttpLoaderFactory;
|
|
597
|
+
class TaskModule {
|
|
598
|
+
}
|
|
599
|
+
TaskModule.decorators = [
|
|
600
|
+
{ type: NgModule, args: [{
|
|
601
|
+
declarations: [TaskListComponent, TaskDetailModalComponent, AssignUserToTaskComponent],
|
|
602
|
+
imports: [
|
|
603
|
+
CommonModule,
|
|
604
|
+
TaskRoutingModule,
|
|
605
|
+
ListModule,
|
|
606
|
+
PageHeaderModule,
|
|
607
|
+
WidgetModule,
|
|
608
|
+
SpinnerModule,
|
|
609
|
+
SearchableDropdownSelectModule,
|
|
610
|
+
CamundaFormModule,
|
|
611
|
+
BrowserAnimationsModule,
|
|
612
|
+
FormsModule,
|
|
613
|
+
ToastrModule.forRoot({
|
|
614
|
+
positionClass: 'toast-bottom-full-width',
|
|
615
|
+
preventDuplicates: true,
|
|
616
|
+
}),
|
|
617
|
+
TranslateModule.forRoot({
|
|
618
|
+
loader: {
|
|
619
|
+
provide: TranslateLoader,
|
|
620
|
+
useFactory: ɵ0$1,
|
|
621
|
+
deps: [HttpClient],
|
|
622
|
+
},
|
|
623
|
+
}),
|
|
624
|
+
NgbModule,
|
|
625
|
+
FormIoModule,
|
|
626
|
+
ModalModule,
|
|
627
|
+
],
|
|
628
|
+
exports: [TaskListComponent, TaskDetailModalComponent, AssignUserToTaskComponent],
|
|
629
|
+
},] }
|
|
552
630
|
];
|
|
553
631
|
|
|
554
|
-
/*
|
|
555
|
-
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
556
|
-
*
|
|
557
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
558
|
-
* you may not use this file except in compliance with the License.
|
|
559
|
-
* You may obtain a copy of the License at
|
|
560
|
-
*
|
|
561
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
562
|
-
*
|
|
563
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
564
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
565
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
566
|
-
* See the License for the specific language governing permissions and
|
|
567
|
-
* limitations under the License.
|
|
632
|
+
/*
|
|
633
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
634
|
+
*
|
|
635
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
636
|
+
* you may not use this file except in compliance with the License.
|
|
637
|
+
* You may obtain a copy of the License at
|
|
638
|
+
*
|
|
639
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
640
|
+
*
|
|
641
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
642
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
643
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
644
|
+
* See the License for the specific language governing permissions and
|
|
645
|
+
* limitations under the License.
|
|
568
646
|
*/
|
|
569
647
|
|
|
570
|
-
/**
|
|
571
|
-
* Generated bundle index. Do not edit.
|
|
648
|
+
/**
|
|
649
|
+
* Generated bundle index. Do not edit.
|
|
572
650
|
*/
|
|
573
651
|
|
|
574
|
-
export { TaskDetailModalComponent, TaskListComponent, TaskModule, TaskService, ɵ0$1 as ɵ0, AssignUserToTaskComponent as ɵa, TaskRoutingModule as ɵb };
|
|
652
|
+
export { TaskDetailModalComponent, TaskList, TaskListComponent, TaskModule, TaskService, ɵ0$1 as ɵ0, AssignUserToTaskComponent as ɵa, TaskRoutingModule as ɵb };
|
|
575
653
|
//# sourceMappingURL=valtimo-task.js.map
|