@valtimo/task 5.2.0 → 5.5.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/esm2020/lib/assign-user-to-task/assign-user-to-task.component.mjs +5 -5
- package/esm2020/lib/models/index.mjs +12 -14
- package/esm2020/lib/task-detail-modal/task-detail-modal.component.mjs +4 -4
- package/esm2020/lib/task-list/task-list.component.mjs +50 -9
- package/esm2020/lib/task-routing.module.mjs +5 -5
- package/esm2020/lib/task.module.mjs +5 -5
- package/esm2020/lib/task.service.mjs +8 -4
- package/fesm2015/valtimo-task.mjs +78 -39
- package/fesm2015/valtimo-task.mjs.map +1 -1
- package/fesm2020/valtimo-task.mjs +82 -39
- package/fesm2020/valtimo-task.mjs.map +1 -1
- package/lib/models/index.d.ts.map +1 -1
- package/lib/task-detail-modal/task-detail-modal.component.d.ts +1 -1
- package/lib/task-detail-modal/task-detail-modal.component.d.ts.map +1 -1
- package/lib/task-list/task-list.component.d.ts +7 -0
- package/lib/task-list/task-list.component.d.ts.map +1 -1
- package/lib/task.service.d.ts +3 -1
- package/lib/task.service.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -87,21 +87,19 @@ class TaskList {
|
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
/*
|
|
90
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
91
|
+
*
|
|
92
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
93
|
+
* you may not use this file except in compliance with the License.
|
|
94
|
+
* You may obtain a copy of the License at
|
|
90
95
|
*
|
|
91
|
-
*
|
|
92
|
-
* *
|
|
93
|
-
* * Licensed under EUPL, Version 1.2 (the "License");
|
|
94
|
-
* * you may not use this file except in compliance with the License.
|
|
95
|
-
* * You may obtain a copy of the License at
|
|
96
|
-
* *
|
|
97
|
-
* * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
98
|
-
* *
|
|
99
|
-
* * Unless required by applicable law or agreed to in writing, software
|
|
100
|
-
* * distributed under the License is distributed on an "AS IS" basis,
|
|
101
|
-
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
102
|
-
* * See the License for the specific language governing permissions and
|
|
103
|
-
* * limitations under the License.
|
|
96
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
104
97
|
*
|
|
98
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
99
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
100
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
101
|
+
* See the License for the specific language governing permissions and
|
|
102
|
+
* limitations under the License.
|
|
105
103
|
*/
|
|
106
104
|
|
|
107
105
|
/*
|
|
@@ -122,6 +120,7 @@ class TaskList {
|
|
|
122
120
|
class TaskService {
|
|
123
121
|
constructor(http, configService) {
|
|
124
122
|
this.http = http;
|
|
123
|
+
this.configService = configService;
|
|
125
124
|
this.valtimoEndpointUri = configService.config.valtimoApi.endpointUri;
|
|
126
125
|
}
|
|
127
126
|
queryTasks(params) {
|
|
@@ -151,10 +150,13 @@ class TaskService {
|
|
|
151
150
|
getTaskProcessLink(taskId) {
|
|
152
151
|
return this.http.get(`${this.valtimoEndpointUri}process-link/task/${taskId}`);
|
|
153
152
|
}
|
|
153
|
+
getConfigCustomTaskList() {
|
|
154
|
+
return this.configService.config.customTaskList;
|
|
155
|
+
}
|
|
154
156
|
}
|
|
155
|
-
TaskService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.
|
|
156
|
-
TaskService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.
|
|
157
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.
|
|
157
|
+
TaskService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TaskService, deps: [{ token: i1.HttpClient }, { token: i2.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
158
|
+
TaskService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TaskService, providedIn: 'root' });
|
|
159
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TaskService, decorators: [{
|
|
158
160
|
type: Injectable,
|
|
159
161
|
args: [{ providedIn: 'root' }]
|
|
160
162
|
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: i2.ConfigService }]; } });
|
|
@@ -263,11 +265,11 @@ class AssignUserToTaskComponent {
|
|
|
263
265
|
this.disabled$.next(true);
|
|
264
266
|
}
|
|
265
267
|
}
|
|
266
|
-
AssignUserToTaskComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.
|
|
267
|
-
AssignUserToTaskComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.
|
|
268
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.
|
|
268
|
+
AssignUserToTaskComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AssignUserToTaskComponent, deps: [{ token: TaskService }], target: i0.ɵɵFactoryTarget.Component });
|
|
269
|
+
AssignUserToTaskComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: AssignUserToTaskComponent, selector: "valtimo-assign-user-to-task", inputs: { taskId: "taskId", assigneeEmail: "assigneeEmail" }, outputs: { assignmentOfTaskChanged: "assignmentOfTaskChanged" }, usesOnChanges: true, ngImport: i0, 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<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", 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 */.container-fluid{color:#959595}i{font-size:13px}\n"], components: [{ type: i6.SearchableDropdownSelectComponent, selector: "valtimo-searchable-dropdown-select", inputs: ["style", "items", "buttonText", "searchText", "noResultsText", "disabled", "selectedText", "selectedTextValue", "clearSelectionButtonTitle", "hasSelection", "width"], outputs: ["itemSelected", "clearSelection"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i3.AsyncPipe, "translate": i4.TranslatePipe } });
|
|
270
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AssignUserToTaskComponent, decorators: [{
|
|
269
271
|
type: Component,
|
|
270
|
-
args: [{ selector: 'valtimo-assign-user-to-task', 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", styles: [".container-fluid{color:#959595}i{font-size:13px}\n"] }]
|
|
272
|
+
args: [{ selector: 'valtimo-assign-user-to-task', 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<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", 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 */.container-fluid{color:#959595}i{font-size:13px}\n"] }]
|
|
271
273
|
}], ctorParameters: function () { return [{ type: TaskService }]; }, propDecorators: { taskId: [{
|
|
272
274
|
type: Input
|
|
273
275
|
}], assigneeEmail: [{
|
|
@@ -442,9 +444,9 @@ class TaskDetailModalComponent {
|
|
|
442
444
|
});
|
|
443
445
|
}
|
|
444
446
|
}
|
|
445
|
-
TaskDetailModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.
|
|
446
|
-
TaskDetailModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.
|
|
447
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.
|
|
447
|
+
TaskDetailModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TaskDetailModalComponent, deps: [{ token: i1$1.ToastrService }, { token: i2$1.FormLinkService }, { token: i2$1.FormFlowService }, { token: i3$1.Router }, { token: i4$1.NGXLogger }, { token: i3$1.ActivatedRoute }, { token: TaskService }], target: i0.ɵɵFactoryTarget.Component });
|
|
448
|
+
TaskDetailModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: TaskDetailModalComponent, selector: "valtimo-task-detail-modal", outputs: { formSubmit: "formSubmit", assignmentOfTaskChanged: "assignmentOfTaskChanged" }, viewQueries: [{ propertyName: "form", first: true, predicate: ["form"], descendants: true }, { propertyName: "modal", first: true, predicate: ["taskDetailModal"], descendants: true }], ngImport: i0, 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 && ((processLinkIsForm$ | async) || (formFlowStepTypeIsForm$ | async))\">\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", 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}\n"], components: [{ type: i6.ModalComponent, selector: "valtimo-modal", inputs: ["elementId", "title", "subtitle", "templateBelowSubtitle", "showFooter"] }, { type: i6.FormioComponent, selector: "valtimo-form-io", inputs: ["form", "options", "submission", "formRefresh$"], outputs: ["submit", "change"] }, { type: AssignUserToTaskComponent, selector: "valtimo-assign-user-to-task", inputs: ["taskId", "assigneeEmail"], outputs: ["assignmentOfTaskChanged"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }], pipes: { "async": i3.AsyncPipe, "translate": i4.TranslatePipe }, encapsulation: i0.ViewEncapsulation.None });
|
|
449
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TaskDetailModalComponent, decorators: [{
|
|
448
450
|
type: Component,
|
|
449
451
|
args: [{ selector: 'valtimo-task-detail-modal', encapsulation: ViewEncapsulation.None, 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 && ((processLinkIsForm$ | async) || (formFlowStepTypeIsForm$ | async))\">\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", 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}\n"] }]
|
|
450
452
|
}], ctorParameters: function () { return [{ type: i1$1.ToastrService }, { type: i2$1.FormLinkService }, { type: i2$1.FormFlowService }, { type: i3$1.Router }, { type: i4$1.NGXLogger }, { type: i3$1.ActivatedRoute }, { type: TaskService }]; }, propDecorators: { form: [{
|
|
@@ -489,6 +491,8 @@ class TaskListComponent {
|
|
|
489
491
|
this.currentTaskType = 'mine';
|
|
490
492
|
this.listTitle = null;
|
|
491
493
|
this.listDescription = null;
|
|
494
|
+
this.sortState = null;
|
|
495
|
+
this.setDefaultSorting();
|
|
492
496
|
}
|
|
493
497
|
paginationClicked(page, type) {
|
|
494
498
|
this.tasks[type].page = page - 1;
|
|
@@ -556,6 +560,9 @@ class TaskListComponent {
|
|
|
556
560
|
default:
|
|
557
561
|
this.logger.fatal('Unreachable case');
|
|
558
562
|
}
|
|
563
|
+
if (this.sortState) {
|
|
564
|
+
params.sort = this.getSortString(this.sortState);
|
|
565
|
+
}
|
|
559
566
|
this.taskService.queryTasks(params).subscribe((results) => {
|
|
560
567
|
this.tasks[type].pagination.collectionSize = results.headers.get('x-total-count');
|
|
561
568
|
this.tasks[type].tasks = results.body;
|
|
@@ -565,26 +572,52 @@ class TaskListComponent {
|
|
|
565
572
|
task.due = moment(task.due).format('DD MMM YYYY HH:mm');
|
|
566
573
|
}
|
|
567
574
|
});
|
|
575
|
+
if (this.taskService.getConfigCustomTaskList()) {
|
|
576
|
+
this.customTaskListFields(type);
|
|
577
|
+
}
|
|
578
|
+
else {
|
|
579
|
+
this.defaultTaskListFields(type);
|
|
580
|
+
}
|
|
581
|
+
});
|
|
582
|
+
}
|
|
583
|
+
defaultTaskListFields(type) {
|
|
584
|
+
this.translationSubscription = combineLatest([
|
|
585
|
+
this.translateService.stream(`task-list.fieldLabels.created`),
|
|
586
|
+
this.translateService.stream(`task-list.fieldLabels.name`),
|
|
587
|
+
this.translateService.stream(`task-list.fieldLabels.valtimoAssignee.fullName`),
|
|
588
|
+
this.translateService.stream(`task-list.fieldLabels.due`),
|
|
589
|
+
]).subscribe(([created, name, assignee, due]) => {
|
|
568
590
|
this.tasks[type].fields = [
|
|
569
591
|
{
|
|
570
592
|
key: 'created',
|
|
571
|
-
label:
|
|
593
|
+
label: created,
|
|
572
594
|
},
|
|
573
595
|
{
|
|
574
596
|
key: 'name',
|
|
575
|
-
label:
|
|
597
|
+
label: name,
|
|
576
598
|
},
|
|
577
599
|
{
|
|
578
600
|
key: 'valtimoAssignee.fullName',
|
|
579
|
-
label:
|
|
601
|
+
label: assignee,
|
|
580
602
|
},
|
|
581
603
|
{
|
|
582
604
|
key: 'due',
|
|
583
|
-
label:
|
|
605
|
+
label: due,
|
|
584
606
|
},
|
|
585
607
|
];
|
|
586
608
|
});
|
|
587
609
|
}
|
|
610
|
+
customTaskListFields(type) {
|
|
611
|
+
const customTaskListFields = this.taskService.getConfigCustomTaskList().fields;
|
|
612
|
+
this.translationSubscription = combineLatest(customTaskListFields.map(column => this.translateService.stream(`task-list.fieldLabels.${column.translationKey}`))).subscribe(labels => {
|
|
613
|
+
this.tasks[type].fields = customTaskListFields.map((column, index) => ({
|
|
614
|
+
key: column.propertyName,
|
|
615
|
+
label: labels[index],
|
|
616
|
+
sortable: column.sortable,
|
|
617
|
+
...(column.viewType && { viewType: column.viewType }),
|
|
618
|
+
}));
|
|
619
|
+
});
|
|
620
|
+
}
|
|
588
621
|
rowOpenTaskClick(task) {
|
|
589
622
|
if (!task.endTime) {
|
|
590
623
|
this.taskDetail.openTaskDetails(task);
|
|
@@ -593,15 +626,25 @@ class TaskListComponent {
|
|
|
593
626
|
return false;
|
|
594
627
|
}
|
|
595
628
|
}
|
|
629
|
+
setDefaultSorting() {
|
|
630
|
+
this.sortState = this.taskService.getConfigCustomTaskList()?.defaultSortedColumn || null;
|
|
631
|
+
}
|
|
632
|
+
sortChanged(sortState) {
|
|
633
|
+
this.sortState = sortState;
|
|
634
|
+
this.getTasks(this.currentTaskType);
|
|
635
|
+
}
|
|
636
|
+
getSortString(sort) {
|
|
637
|
+
return `${sort.state.name},${sort.state.direction}`;
|
|
638
|
+
}
|
|
596
639
|
ngOnDestroy() {
|
|
597
640
|
this.translationSubscription.unsubscribe();
|
|
598
641
|
}
|
|
599
642
|
}
|
|
600
|
-
TaskListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.
|
|
601
|
-
TaskListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.
|
|
602
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.
|
|
643
|
+
TaskListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TaskListComponent, deps: [{ token: TaskService }, { token: i3$1.Router }, { token: i4$1.NGXLogger }, { token: i4.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
644
|
+
TaskListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: TaskListComponent, selector: "valtimo-task-list", viewQueries: [{ propertyName: "taskDetail", first: true, predicate: ["taskDetail"], descendants: true }], ngImport: i0, 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 (sortChanged)=\"sortChanged($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 <ul ngbNav [destroyOnHide]=\"false\" (navChange)=\"tabChange($event)\" class=\"nav-tabs\">\n <li [ngbNavItem]=\"1\" [title]=\"'task-list.mine.title' | translate\">\n <a ngbNavLink>{{ 'task-list.mine.title' | translate }}</a>\n </li>\n <li [ngbNavItem]=\"2\" [title]=\"'task-list.open.title' | translate\">\n <a ngbNavLink>{{ 'task-list.open.title' | translate }}</a>\n </li>\n <li [ngbNavItem]=\"3\" [title]=\"'task-list.all.title' | translate\">\n <a ngbNavLink>{{ 'task-list.all.title' | translate }}</a>\n </li>\n </ul>\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", 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{padding:0;margin:0}.nav.nav-tabs{background-color:#f5f5f5}\n"], components: [{ type: i6.WidgetComponent, selector: "valtimo-widget", inputs: ["type", "name", "icon", "contrast", "divider", "title", "subtitle", "collapseAble", "collapse", "additionalClasses"] }, { type: i6.ListComponent, selector: "valtimo-list", inputs: ["items", "fields", "pagination", "viewMode", "isSearchable", "header", "actions", "paginationIdentifier", "initialSortState"], outputs: ["rowClicked", "paginationClicked", "paginationSet", "search", "sortChanged"] }, { type: TaskDetailModalComponent, selector: "valtimo-task-detail-modal", outputs: ["formSubmit", "assignmentOfTaskChanged"] }], directives: [{ type: i7.NgbNav, selector: "[ngbNav]", inputs: ["activeId", "animation", "destroyOnHide", "orientation", "roles", "keyboard"], outputs: ["activeIdChange", "shown", "hidden", "navChange"], exportAs: ["ngbNav"] }, { type: i7.NgbNavItem, selector: "[ngbNavItem]", inputs: ["destroyOnHide", "disabled", "domId", "ngbNavItem"], outputs: ["shown", "hidden"], exportAs: ["ngbNavItem"] }, { type: i7.NgbNavLink, selector: "a[ngbNavLink]" }], pipes: { "translate": i4.TranslatePipe }, encapsulation: i0.ViewEncapsulation.None });
|
|
645
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TaskListComponent, decorators: [{
|
|
603
646
|
type: Component,
|
|
604
|
-
args: [{ selector: 'valtimo-task-list', encapsulation: ViewEncapsulation.None, 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 <ul ngbNav [destroyOnHide]=\"false\" (navChange)=\"tabChange($event)\" class=\"nav-tabs\">\n <li [ngbNavItem]=\"1\" [title]=\"'task-list.mine.title' | translate\">\n <a ngbNavLink>{{ 'task-list.mine.title' | translate }}</a>\n </li>\n <li [ngbNavItem]=\"2\" [title]=\"'task-list.open.title' | translate\">\n <a ngbNavLink>{{ 'task-list.open.title' | translate }}</a>\n </li>\n <li [ngbNavItem]=\"3\" [title]=\"'task-list.all.title' | translate\">\n <a ngbNavLink>{{ 'task-list.all.title' | translate }}</a>\n </li>\n </ul>\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", 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{padding:0;margin:0}.nav.nav-tabs{background-color:#f5f5f5}\n"] }]
|
|
647
|
+
args: [{ selector: 'valtimo-task-list', encapsulation: ViewEncapsulation.None, 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 (sortChanged)=\"sortChanged($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 <ul ngbNav [destroyOnHide]=\"false\" (navChange)=\"tabChange($event)\" class=\"nav-tabs\">\n <li [ngbNavItem]=\"1\" [title]=\"'task-list.mine.title' | translate\">\n <a ngbNavLink>{{ 'task-list.mine.title' | translate }}</a>\n </li>\n <li [ngbNavItem]=\"2\" [title]=\"'task-list.open.title' | translate\">\n <a ngbNavLink>{{ 'task-list.open.title' | translate }}</a>\n </li>\n <li [ngbNavItem]=\"3\" [title]=\"'task-list.all.title' | translate\">\n <a ngbNavLink>{{ 'task-list.all.title' | translate }}</a>\n </li>\n </ul>\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", 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{padding:0;margin:0}.nav.nav-tabs{background-color:#f5f5f5}\n"] }]
|
|
605
648
|
}], ctorParameters: function () { return [{ type: TaskService }, { type: i3$1.Router }, { type: i4$1.NGXLogger }, { type: i4.TranslateService }]; }, propDecorators: { taskDetail: [{
|
|
606
649
|
type: ViewChild,
|
|
607
650
|
args: ['taskDetail']
|
|
@@ -632,10 +675,10 @@ const routes = [
|
|
|
632
675
|
];
|
|
633
676
|
class TaskRoutingModule {
|
|
634
677
|
}
|
|
635
|
-
TaskRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.
|
|
636
|
-
TaskRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.
|
|
637
|
-
TaskRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.
|
|
638
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.
|
|
678
|
+
TaskRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TaskRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
679
|
+
TaskRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TaskRoutingModule, imports: [CommonModule, i3$1.RouterModule], exports: [RouterModule] });
|
|
680
|
+
TaskRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TaskRoutingModule, imports: [[CommonModule, RouterModule.forChild(routes)], RouterModule] });
|
|
681
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TaskRoutingModule, decorators: [{
|
|
639
682
|
type: NgModule,
|
|
640
683
|
args: [{
|
|
641
684
|
declarations: [],
|
|
@@ -661,8 +704,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImpor
|
|
|
661
704
|
*/
|
|
662
705
|
class TaskModule {
|
|
663
706
|
}
|
|
664
|
-
TaskModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.
|
|
665
|
-
TaskModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.
|
|
707
|
+
TaskModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TaskModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
708
|
+
TaskModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TaskModule, declarations: [TaskListComponent, TaskDetailModalComponent, AssignUserToTaskComponent], imports: [CommonModule,
|
|
666
709
|
TaskRoutingModule,
|
|
667
710
|
ListModule,
|
|
668
711
|
PageHeaderModule,
|
|
@@ -674,7 +717,7 @@ TaskModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13
|
|
|
674
717
|
FormsModule, i1$1.ToastrModule, i4.TranslateModule, NgbModule,
|
|
675
718
|
FormIoModule,
|
|
676
719
|
ModalModule], exports: [TaskListComponent, TaskDetailModalComponent, AssignUserToTaskComponent] });
|
|
677
|
-
TaskModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.
|
|
720
|
+
TaskModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TaskModule, imports: [[
|
|
678
721
|
CommonModule,
|
|
679
722
|
TaskRoutingModule,
|
|
680
723
|
ListModule,
|
|
@@ -700,7 +743,7 @@ TaskModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13
|
|
|
700
743
|
FormIoModule,
|
|
701
744
|
ModalModule,
|
|
702
745
|
]] });
|
|
703
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.
|
|
746
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TaskModule, decorators: [{
|
|
704
747
|
type: NgModule,
|
|
705
748
|
args: [{
|
|
706
749
|
declarations: [TaskListComponent, TaskDetailModalComponent, AssignUserToTaskComponent],
|