@colijnit/sharedcomponents 255.1.10 → 255.1.12
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/colijnit-sharedcomponents.umd.js +46 -17
- package/bundles/colijnit-sharedcomponents.umd.js.map +1 -1
- package/colijnit-sharedcomponents.metadata.json +1 -1
- package/esm2015/lib/components/activity-overview-component/component-activity-overview.component.js +62 -51
- package/esm2015/lib/components/modify-task-form/components/base-activity-summary.component.js +4 -5
- package/esm2015/lib/components/open-activity-list/component-activity-list.component.js +3 -6
- package/esm2015/lib/service/shared-connector.service.js +16 -1
- package/esm2015/lib/service/shared.service.js +6 -1
- package/fesm2015/colijnit-sharedcomponents.js +86 -58
- package/fesm2015/colijnit-sharedcomponents.js.map +1 -1
- package/index.html +2 -2
- package/lib/components/activity-list/style/_layout.scss +10 -8
- package/lib/components/activity-overview-component/style/_layout.scss +20 -4
- package/lib/components/modify-task-form/components/base-activity-summary.component.d.ts +0 -1
- package/lib/service/shared-connector.service.d.ts +2 -0
- package/lib/service/shared.service.d.ts +2 -0
- package/main.fb2a972348d07d7127fb.js +1 -0
- package/package.json +1 -1
- package/{styles.57c23ba3573224ff8f2a.css → styles.8fce26887e7ff9657567.css} +1 -1
- package/main.931714f0ac27b7915073.js +0 -1
|
@@ -37,6 +37,7 @@ import { Report } from '@colijnit/mainapi/build/model/report.bo';
|
|
|
37
37
|
import { Work } from '@colijnit/mainapi/build/model/work.bo';
|
|
38
38
|
import { Remark } from '@colijnit/mainapi/build/model/remark.bo';
|
|
39
39
|
import { Task } from '@colijnit/mainapi/build/model/task.bo';
|
|
40
|
+
import { ActivityWorkflow } from '@colijnit/mainapi/build/model/activity-workflow';
|
|
40
41
|
import { PrintStockStickers } from '@colijnit/sharedapi/build/model/print-stock-stickers';
|
|
41
42
|
import { ArticleExtended } from '@colijnit/articleapi/build/model/article-extended.bo';
|
|
42
43
|
import { ArticleStock as ArticleStock$1 } from '@colijnit/articleapi/build/model/article-stock';
|
|
@@ -818,6 +819,20 @@ class SharedConnectorService {
|
|
|
818
819
|
});
|
|
819
820
|
});
|
|
820
821
|
}
|
|
822
|
+
getWorkflowStatusForActivity(table, key, component) {
|
|
823
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
824
|
+
return new Promise((resolve, reject) => {
|
|
825
|
+
return this.mainConnector.getWorkflowStatusForActivity(table, key, component).then((result) => __awaiter(this, void 0, void 0, function* () {
|
|
826
|
+
if (result && result.validationResult && result.validationResult.success) {
|
|
827
|
+
resolve(this._boFactory.makeWithRawBackendData(ActivityWorkflow, result.resultObject));
|
|
828
|
+
}
|
|
829
|
+
else {
|
|
830
|
+
reject(result.validationMessagesAsString);
|
|
831
|
+
}
|
|
832
|
+
}));
|
|
833
|
+
});
|
|
834
|
+
});
|
|
835
|
+
}
|
|
821
836
|
insertActivity(activity) {
|
|
822
837
|
return __awaiter(this, void 0, void 0, function* () {
|
|
823
838
|
return new Promise((resolve, reject) => {
|
|
@@ -2726,6 +2741,11 @@ class SharedService {
|
|
|
2726
2741
|
return yield this.connector.getRelationSmallObject(relationId);
|
|
2727
2742
|
});
|
|
2728
2743
|
}
|
|
2744
|
+
getWorkflowStatusForActivity(table, key, component) {
|
|
2745
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2746
|
+
return yield this.connector.getWorkflowStatusForActivity(table, key, component);
|
|
2747
|
+
});
|
|
2748
|
+
}
|
|
2729
2749
|
insertActivity(activity) {
|
|
2730
2750
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2731
2751
|
return yield this.connector.insertActivity(activity);
|
|
@@ -12950,8 +12970,7 @@ class ComponentActivityListComponent extends BaseActivityListComponent {
|
|
|
12950
12970
|
if (this.table && this.key) {
|
|
12951
12971
|
const allActivities = yield this.sharedService.getComponentActivitiesWithoutRelationFiltering(this.table, this.key);
|
|
12952
12972
|
if (allActivities) {
|
|
12953
|
-
this.activities = this.noFreeTasks ? allActivities.filter(aa => !aa.task
|
|
12954
|
-
allActivities.filter(aa => aa.activityType !== ActivityType.WorkflowTask);
|
|
12973
|
+
this.activities = this.noFreeTasks ? allActivities.filter(aa => !aa.task) : allActivities;
|
|
12955
12974
|
}
|
|
12956
12975
|
else {
|
|
12957
12976
|
this.activities = [];
|
|
@@ -12963,8 +12982,7 @@ class ComponentActivityListComponent extends BaseActivityListComponent {
|
|
|
12963
12982
|
set activitiesList(allActivities) {
|
|
12964
12983
|
this._activitiesList = allActivities;
|
|
12965
12984
|
if (allActivities) {
|
|
12966
|
-
this.activities = this.noFreeTasks ? allActivities.filter(aa => !aa.task
|
|
12967
|
-
allActivities.filter(aa => aa.activityType !== ActivityType.WorkflowTask);
|
|
12985
|
+
this.activities = this.noFreeTasks ? allActivities.filter(aa => !aa.task) : allActivities;
|
|
12968
12986
|
}
|
|
12969
12987
|
else {
|
|
12970
12988
|
this.activities = [];
|
|
@@ -13207,63 +13225,74 @@ ComponentActivityOverviewComponent.decorators = [
|
|
|
13207
13225
|
selector: "co-component-activity-overview",
|
|
13208
13226
|
template: `
|
|
13209
13227
|
<div class="overview-wrapper">
|
|
13228
|
+
<div class="overview-current">
|
|
13210
13229
|
<div class="overview-wrapper-icons">
|
|
13211
|
-
|
|
13212
|
-
|
|
13213
|
-
|
|
13230
|
+
<co-icon *ngIf="userIsSupervisor && (!isTask || firstTriggerToCloseWF === undefined)" icon="supervisor"
|
|
13231
|
+
class="supervisor-icon big dark"
|
|
13232
|
+
[title]="'MY_TASKS_SUPERVISOR' | localize"></co-icon>
|
|
13214
13233
|
</div>
|
|
13215
13234
|
<div class="overview-wrapper-labels">
|
|
13216
|
-
|
|
13217
|
-
|
|
13218
|
-
|
|
13235
|
+
<div class="activity-label">
|
|
13236
|
+
<span class="label" [textContent]="'CURRENT_STATE' | localize"></span>
|
|
13237
|
+
</div>
|
|
13238
|
+
<div class="activity-title" [textContent]="activityTitle"></div>
|
|
13239
|
+
<!--seems unessecary for current usecases, but left in case this needs an input to switch on or off-->
|
|
13240
|
+
<!--<div class="activity-context-title" [textContent]="activityContextTitle"></div>-->
|
|
13219
13241
|
</div>
|
|
13220
|
-
|
|
13242
|
+
</div>
|
|
13243
|
+
<div class="overview-main">
|
|
13244
|
+
<div class="label-date-activity">
|
|
13245
|
+
<div class="activity-label">
|
|
13246
|
+
<span class="label" [textContent]="'NEXT_STATE' | localize"></span>
|
|
13247
|
+
</div>
|
|
13248
|
+
<div class="overview-wrapper-date">
|
|
13221
13249
|
<div class="date-wrapper" [class.overdue]="overDue">
|
|
13222
|
-
|
|
13223
|
-
|
|
13224
|
-
|
|
13225
|
-
|
|
13226
|
-
|
|
13227
|
-
|
|
13250
|
+
<ng-container *ngIf="!sameDates">
|
|
13251
|
+
<div class="date" [textContent]="targetDate | date:'dd-MM-YYYY'"></div>
|
|
13252
|
+
<div class="date-divider" [textContent]="'-'"></div>
|
|
13253
|
+
</ng-container>
|
|
13254
|
+
<div class="date" [textContent]="deadlineDate | date:'dd-MM-YYYY'"></div>
|
|
13255
|
+
<co-icon class="activity-type-icon"[iconData]="iconCacheService.getIcon(getActivityIcon(activity))"></co-icon>
|
|
13228
13256
|
</div>
|
|
13257
|
+
</div>
|
|
13229
13258
|
</div>
|
|
13230
|
-
|
|
13231
|
-
|
|
13232
|
-
|
|
13233
|
-
|
|
13234
|
-
|
|
13235
|
-
|
|
13236
|
-
|
|
13237
|
-
|
|
13238
|
-
|
|
13239
|
-
|
|
13240
|
-
|
|
13241
|
-
|
|
13242
|
-
|
|
13243
|
-
|
|
13244
|
-
|
|
13245
|
-
|
|
13246
|
-
|
|
13247
|
-
|
|
13248
|
-
|
|
13249
|
-
|
|
13250
|
-
|
|
13251
|
-
|
|
13252
|
-
|
|
13253
|
-
|
|
13254
|
-
|
|
13255
|
-
|
|
13256
|
-
|
|
13257
|
-
|
|
13258
|
-
|
|
13259
|
-
|
|
13260
|
-
|
|
13261
|
-
|
|
13262
|
-
|
|
13263
|
-
|
|
13264
|
-
|
|
13265
|
-
|
|
13266
|
-
|
|
13259
|
+
|
|
13260
|
+
<ng-container *ngIf="isTask && firstTriggerToCloseWF !== undefined">
|
|
13261
|
+
<co-button class="trans-green custom-text button-trigger no-margin" [label]="firstTriggerToCloseWF.description"
|
|
13262
|
+
(click)="handleButtonEndClick()"></co-button>
|
|
13263
|
+
</ng-container>
|
|
13264
|
+
<ng-container *ngIf="openButtonLabel">
|
|
13265
|
+
<co-button class="trans-green default-bg custom-text button-trigger-icon action-hover no-margin"
|
|
13266
|
+
iconClass="custom small" [iconData]="iconCacheService.getIcon(icon.DetailView)" [label]="openButtonLabel | localize"
|
|
13267
|
+
(click)="handleOpenLink($event)"></co-button>
|
|
13268
|
+
</ng-container>
|
|
13269
|
+
<!--TODO reinstate this when we figure out how to trigger a screen change. -->
|
|
13270
|
+
<!--<ng-container *ngIf="urls && urls.length > 0">
|
|
13271
|
+
<button-colijn *ngFor="let url of urls"
|
|
13272
|
+
class="trans-green custom-text button-trigger-icon action-hover no-margin"
|
|
13273
|
+
[icon]="icon.DetailView"
|
|
13274
|
+
[label]="'OPEN_LINK' | localize"
|
|
13275
|
+
iconClass="custom small"
|
|
13276
|
+
(click)="handleOpenLink($event, url)"></button-colijn>
|
|
13277
|
+
</ng-container>-->
|
|
13278
|
+
<ng-container *ngIf="!isTask && hasTriggers">
|
|
13279
|
+
<co-button class="trans-green custom-text action-hover button-trigger no-margin" *ngFor="let trigger of workFlow.manualGenericTriggers"
|
|
13280
|
+
[class.button-trigger-icon]="trigger.isTaskTrigger"
|
|
13281
|
+
[label]="trigger.triggerButtonName"
|
|
13282
|
+
[iconData]="trigger.isTaskTrigger ? iconCacheService.getIcon(icon.Account): null"
|
|
13283
|
+
iconClass="custom small"
|
|
13284
|
+
(click)="handleGenericTriggerClick(trigger)"
|
|
13285
|
+
></co-button>
|
|
13286
|
+
<co-button class="trans-green custom-text action-hover button-trigger no-margin" *ngFor="let trigger of workFlow.manualTriggersWithoutTaskTriggers"
|
|
13287
|
+
[class.high-prio]="trigger.overDue"
|
|
13288
|
+
[class.button-trigger-icon]="trigger.isTaskTrigger"
|
|
13289
|
+
[label]="trigger.triggerButtonName"
|
|
13290
|
+
[iconData]="trigger.isTaskTrigger ? iconCacheService.getIcon(icon.DetailView): null"
|
|
13291
|
+
iconClass="custom small"
|
|
13292
|
+
(click)="handleTriggerClick(trigger)"
|
|
13293
|
+
></co-button>
|
|
13294
|
+
</ng-container>
|
|
13295
|
+
</div>
|
|
13267
13296
|
</div>
|
|
13268
13297
|
<!--TODO reinstate this when we figure out how to trigger a screen change. -->
|
|
13269
13298
|
<!-- <formbuilder-user-form *ngIf="showCreateForm"
|
|
@@ -13324,7 +13353,6 @@ class BaseActivitySummaryComponent {
|
|
|
13324
13353
|
this.expanded = false;
|
|
13325
13354
|
this.noBorder = false;
|
|
13326
13355
|
this.readonly = false;
|
|
13327
|
-
this.prepareWorkflowOperation = OperationWithAlwaysSuccessCallback;
|
|
13328
13356
|
this.loadTaskOperation = OperationWithAlwaysSuccessCallback;
|
|
13329
13357
|
this.activityChange = new EventEmitter();
|
|
13330
13358
|
this.showWorkLog = new EventEmitter();
|
|
@@ -13373,7 +13401,7 @@ class BaseActivitySummaryComponent {
|
|
|
13373
13401
|
return;
|
|
13374
13402
|
}
|
|
13375
13403
|
}
|
|
13376
|
-
const result = yield this._sharedService.fireTrigger(this.workFlow.
|
|
13404
|
+
const result = yield this._sharedService.fireTrigger(this.workFlow.workflowProcessId, this.workFlow.sequence, trigger.triggerId);
|
|
13377
13405
|
if (result.success) {
|
|
13378
13406
|
yield this.updateActivityTask(this.editActivity.task);
|
|
13379
13407
|
yield this.prepareWorkflow();
|
|
@@ -13395,7 +13423,8 @@ class BaseActivitySummaryComponent {
|
|
|
13395
13423
|
prepareWorkflow() {
|
|
13396
13424
|
return __awaiter(this, void 0, void 0, function* () {
|
|
13397
13425
|
if (this.table && this.key) {
|
|
13398
|
-
yield this.
|
|
13426
|
+
this.workFlow = yield this._sharedService.getWorkflowStatusForActivity(this.table, this.key, "Taak");
|
|
13427
|
+
this.readonly = this.readonly || (this.workFlow && this.workFlow.ended);
|
|
13399
13428
|
}
|
|
13400
13429
|
});
|
|
13401
13430
|
}
|
|
@@ -13429,7 +13458,6 @@ BaseActivitySummaryComponent.propDecorators = {
|
|
|
13429
13458
|
expanded: [{ type: Input }],
|
|
13430
13459
|
noBorder: [{ type: HostBinding, args: ["class.no-border",] }, { type: Input }],
|
|
13431
13460
|
readonly: [{ type: Input }],
|
|
13432
|
-
prepareWorkflowOperation: [{ type: Input }],
|
|
13433
13461
|
loadTaskOperation: [{ type: Input }],
|
|
13434
13462
|
triggerToFireOnSave: [{ type: Input }],
|
|
13435
13463
|
activityChange: [{ type: Output }],
|