@colijnit/sharedcomponents 260.1.3 → 260.1.4
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/{103.16299d7a4742c74e622f.js → 729.7933323f8da0a530fd0f.js} +1 -1
- package/bundles/colijnit-sharedcomponents.umd.js +57 -11
- package/bundles/colijnit-sharedcomponents.umd.js.map +1 -1
- package/colijnit-sharedcomponents.metadata.json +1 -1
- package/esm2015/lib/components/task-creator/task-creator.component.js +108 -74
- package/esm2015/lib/components/task-creator/task-creator.module.js +2 -2
- package/fesm2015/colijnit-sharedcomponents.js +107 -73
- package/fesm2015/colijnit-sharedcomponents.js.map +1 -1
- package/index.html +2 -2
- package/lib/components/task-creator/task-creator.component.d.ts +11 -0
- package/{main.0fede440659af08dfbbf.js → main.05f04e77b1b4468bd751.js} +1 -1
- package/package.json +2 -2
- package/runtime.dfb2da895094a2c6c0f4.js +1 -0
- package/styles.3f618234e2ebfcaf5caa.css +1 -0
- package/runtime.275b78aac2b14b7fa6ad.js +0 -1
- package/styles.e8050dd6bc2e98376c40.css +0 -1
|
@@ -17214,12 +17214,12 @@ class TaskCreatorComponent {
|
|
|
17214
17214
|
this._formMasterService = _formMasterService;
|
|
17215
17215
|
this.icons = Icon;
|
|
17216
17216
|
this.table = TableName$1.Transactions;
|
|
17217
|
+
this.allowEmailing = true;
|
|
17217
17218
|
this.activityCreated = new EventEmitter();
|
|
17218
|
-
this.optionCollection = [
|
|
17219
|
-
|
|
17220
|
-
|
|
17221
|
-
|
|
17222
|
-
];
|
|
17219
|
+
this.optionCollection = [];
|
|
17220
|
+
this.remarkListItem = { icon: this.iconService.getIcon(this.icons.CommentRegular), label: this.dictionaryService.get('REMARK', true) };
|
|
17221
|
+
this.workListItem = { icon: this.iconService.getIcon(this.icons.PersonDiggingRegular), label: this.dictionaryService.get('WORK', true) };
|
|
17222
|
+
this.taskListItem = { icon: this.iconService.getIcon(this.icons.ListUlRegular), label: this.dictionaryService.get('TASK', true) };
|
|
17223
17223
|
this.showFilesDialog = false;
|
|
17224
17224
|
this.documents = [];
|
|
17225
17225
|
this.oldDocuments = [];
|
|
@@ -17232,16 +17232,46 @@ class TaskCreatorComponent {
|
|
|
17232
17232
|
this.workDescription = "";
|
|
17233
17233
|
this.taskName = "";
|
|
17234
17234
|
this.taskDescription = "";
|
|
17235
|
+
this._allowRemarkCreation = true;
|
|
17236
|
+
this._allowWorkCreation = true;
|
|
17237
|
+
this._allowTaskCreation = true;
|
|
17238
|
+
}
|
|
17239
|
+
set allowRemarkCreation(allow) {
|
|
17240
|
+
this._allowRemarkCreation = allow;
|
|
17241
|
+
this.setupOptionCollection();
|
|
17242
|
+
}
|
|
17243
|
+
set allowWorkCreation(allow) {
|
|
17244
|
+
this._allowWorkCreation = allow;
|
|
17245
|
+
this.setupOptionCollection();
|
|
17246
|
+
}
|
|
17247
|
+
set allowTaskCreation(allow) {
|
|
17248
|
+
this._allowTaskCreation = allow;
|
|
17249
|
+
this.setupOptionCollection();
|
|
17235
17250
|
}
|
|
17236
17251
|
showClass() {
|
|
17237
17252
|
return true;
|
|
17238
17253
|
}
|
|
17239
17254
|
ngOnInit() {
|
|
17240
17255
|
return __awaiter(this, void 0, void 0, function* () {
|
|
17241
|
-
this.
|
|
17256
|
+
this.setupOptionCollection();
|
|
17242
17257
|
this.senderAddress = yield this.sharedService.getEmailSenderByWorkflowCategoryAndKey('SERVICE_ORDER', this.remarkAndWorkKey);
|
|
17243
17258
|
});
|
|
17244
17259
|
}
|
|
17260
|
+
setupOptionCollection() {
|
|
17261
|
+
this.optionCollection = [];
|
|
17262
|
+
if (this._allowRemarkCreation) {
|
|
17263
|
+
this.optionCollection.push(this.remarkListItem);
|
|
17264
|
+
}
|
|
17265
|
+
if (this._allowWorkCreation) {
|
|
17266
|
+
this.optionCollection.push(this.workListItem);
|
|
17267
|
+
}
|
|
17268
|
+
if (this._allowTaskCreation) {
|
|
17269
|
+
this.optionCollection.push(this.taskListItem);
|
|
17270
|
+
}
|
|
17271
|
+
if (this.optionCollection.length > 0) {
|
|
17272
|
+
this.chosenActivityType = this.optionCollection[0];
|
|
17273
|
+
}
|
|
17274
|
+
}
|
|
17245
17275
|
itemSelected(item) {
|
|
17246
17276
|
this.chosenActivityType = item;
|
|
17247
17277
|
}
|
|
@@ -17378,10 +17408,10 @@ class TaskCreatorComponent {
|
|
|
17378
17408
|
});
|
|
17379
17409
|
}
|
|
17380
17410
|
findReportType() {
|
|
17381
|
-
if (this.chosenActivityType === this.
|
|
17411
|
+
if (this.chosenActivityType === this.remarkListItem) {
|
|
17382
17412
|
return ReportType.RemarkMessage;
|
|
17383
17413
|
}
|
|
17384
|
-
else if (this.chosenActivityType === this.
|
|
17414
|
+
else if (this.chosenActivityType === this.workListItem) {
|
|
17385
17415
|
return ReportType.WorkMessage;
|
|
17386
17416
|
}
|
|
17387
17417
|
else {
|
|
@@ -17409,10 +17439,10 @@ class TaskCreatorComponent {
|
|
|
17409
17439
|
history.emailAddresses = this._createEmailAddressString(this.emailAddresses);
|
|
17410
17440
|
history.emailDateTime = new Date();
|
|
17411
17441
|
history.message = 'Email Content created via Report';
|
|
17412
|
-
if (this.chosenActivityType === this.
|
|
17442
|
+
if (this.chosenActivityType === this.remarkListItem) {
|
|
17413
17443
|
yield this.sharedService.insertEmailHistoryForRemark(history);
|
|
17414
17444
|
}
|
|
17415
|
-
else if (this.chosenActivityType === this.
|
|
17445
|
+
else if (this.chosenActivityType === this.workListItem) {
|
|
17416
17446
|
yield this.sharedService.insertEmailHistoryForWork(history);
|
|
17417
17447
|
}
|
|
17418
17448
|
else {
|
|
@@ -17471,69 +17501,69 @@ class TaskCreatorComponent {
|
|
|
17471
17501
|
TaskCreatorComponent.decorators = [
|
|
17472
17502
|
{ type: Component, args: [{
|
|
17473
17503
|
selector: "co-task-creator",
|
|
17474
|
-
template: `
|
|
17475
|
-
<div class="task-creator-wrapper">
|
|
17476
|
-
<div class="top-rows">
|
|
17477
|
-
<co-email-selector [(emailAddresses)]="emailAddresses" [(bccEmailAddresses)]="bccEmailAddresses"
|
|
17478
|
-
[key]="remarkAndWorkKey" [workflowCategoryType]="workflowCategoryType"></co-email-selector>
|
|
17479
|
-
<co-form #createForm class="creator-remarks input-fields">
|
|
17480
|
-
<co-list-of-icons [collection]="optionCollection" (itemSelected)="itemSelected($event)"></co-list-of-icons>
|
|
17481
|
-
<co-input-textarea *ngIf="chosenActivityType ===
|
|
17482
|
-
[required]="chosenActivityType ===
|
|
17483
|
-
[placeholder]="'REMARK' | sharedLocalize" [(model)]="remarkText"
|
|
17484
|
-
class="large-remark"></co-input-textarea>
|
|
17485
|
-
<co-input-textarea *ngIf="chosenActivityType ===
|
|
17486
|
-
[required]="chosenActivityType ===
|
|
17487
|
-
[placeholder]="'DESCRIPTION' | sharedLocalize" [(model)]="workDescription"
|
|
17488
|
-
class="large-remark"></co-input-textarea>
|
|
17489
|
-
<div class="task-input-fields" *ngIf="chosenActivityType ===
|
|
17490
|
-
<co-input-text [(model)]="taskName" [placeholder]="'NAME' | sharedLocalize"
|
|
17491
|
-
[required]="chosenActivityType ===
|
|
17492
|
-
<co-input-textarea [(model)]="taskDescription" [placeholder]="'DESCRIPTION' | sharedLocalize"
|
|
17493
|
-
class="large-remark"
|
|
17494
|
-
[required]="chosenActivityType ===
|
|
17495
|
-
</div>
|
|
17496
|
-
</co-form>
|
|
17497
|
-
</div>
|
|
17498
|
-
<div class="extras-buttons">
|
|
17499
|
-
<co-button [iconData]="iconService.getIcon(icons.PaperclipRegular)" (click)="openAttachmentDialog()"
|
|
17500
|
-
[label]="documents.length === 0 ? '' : documents.length.toString()"></co-button>
|
|
17501
|
-
<co-button *ngIf="chosenActivityType ===
|
|
17502
|
-
[iconData]="iconService.getIcon(icons.PaperPlaneTopSolid)"
|
|
17503
|
-
(click)="createRemarkClicked()"></co-button>
|
|
17504
|
-
<co-button *ngIf="chosenActivityType ===
|
|
17505
|
-
[iconData]="iconService.getIcon(icons.PaperPlaneTopSolid)"
|
|
17506
|
-
(click)="createWorkClicked()"></co-button>
|
|
17507
|
-
<co-button *ngIf="chosenActivityType ===
|
|
17508
|
-
[iconData]="iconService.getIcon(icons.PaperPlaneTopSolid)"
|
|
17509
|
-
(click)="createTaskClicked()"></co-button>
|
|
17510
|
-
</div>
|
|
17511
|
-
</div>
|
|
17512
|
-
<co-dialog *ngIf="showFilesDialog" (closeClick)="attachmentDialogCancelled()"
|
|
17513
|
-
[headerTemplate]="attachmentHeaderTemplate"
|
|
17514
|
-
[footerTemplate]="attachmentFooterTemplate">
|
|
17515
|
-
|
|
17516
|
-
<ng-template #attachmentHeaderTemplate>
|
|
17517
|
-
<div class="co-dialog-wrapper-popup-title">
|
|
17518
|
-
<co-icon [iconData]="iconService.getIcon(icons.PaperclipRegular)"></co-icon>
|
|
17519
|
-
<div class="co-dialog-header-title" [textContent]="'ATTACHMENTS' | sharedLocalize"></div>
|
|
17520
|
-
</div>
|
|
17521
|
-
</ng-template>
|
|
17522
|
-
<co-files-upload (documentsAdded)="addedDocument($event)" (documentDeleted)="deletedDocument"
|
|
17523
|
-
[documents]="documents" [useWithoutSettingProps]="true"></co-files-upload>
|
|
17524
|
-
</co-dialog>
|
|
17525
|
-
|
|
17526
|
-
|
|
17527
|
-
<ng-template #attachmentFooterTemplate>
|
|
17528
|
-
<div class="co-dialog-footer-button-wrapper">
|
|
17529
|
-
<co-button class="save-button"
|
|
17530
|
-
[iconData]="iconService.getIcon(icons.CheckDuotone)"
|
|
17531
|
-
(click)="attachmentDialogClosed()"></co-button>
|
|
17532
|
-
<co-button class="close-button"
|
|
17533
|
-
[iconData]="iconService.getIcon(icons.CrossSkinny)"
|
|
17534
|
-
(click)="attachmentDialogCancelled()"></co-button>
|
|
17535
|
-
</div>
|
|
17536
|
-
</ng-template>
|
|
17504
|
+
template: `
|
|
17505
|
+
<div class="task-creator-wrapper">
|
|
17506
|
+
<div class="top-rows">
|
|
17507
|
+
<co-email-selector [(emailAddresses)]="emailAddresses" [(bccEmailAddresses)]="bccEmailAddresses" *ngIf="allowEmailing"
|
|
17508
|
+
[key]="remarkAndWorkKey" [workflowCategoryType]="workflowCategoryType"></co-email-selector>
|
|
17509
|
+
<co-form #createForm class="creator-remarks input-fields">
|
|
17510
|
+
<co-list-of-icons [collection]="optionCollection" (itemSelected)="itemSelected($event)"></co-list-of-icons>
|
|
17511
|
+
<co-input-textarea *ngIf="chosenActivityType === remarkListItem"
|
|
17512
|
+
[required]="chosenActivityType === remarkListItem"
|
|
17513
|
+
[placeholder]="'REMARK' | sharedLocalize" [(model)]="remarkText"
|
|
17514
|
+
class="large-remark"></co-input-textarea>
|
|
17515
|
+
<co-input-textarea *ngIf="chosenActivityType === workListItem"
|
|
17516
|
+
[required]="chosenActivityType === workListItem"
|
|
17517
|
+
[placeholder]="'DESCRIPTION' | sharedLocalize" [(model)]="workDescription"
|
|
17518
|
+
class="large-remark"></co-input-textarea>
|
|
17519
|
+
<div class="task-input-fields" *ngIf="chosenActivityType === taskListItem">
|
|
17520
|
+
<co-input-text [(model)]="taskName" [placeholder]="'NAME' | sharedLocalize"
|
|
17521
|
+
[required]="chosenActivityType === taskListItem"></co-input-text>
|
|
17522
|
+
<co-input-textarea [(model)]="taskDescription" [placeholder]="'DESCRIPTION' | sharedLocalize"
|
|
17523
|
+
class="large-remark"
|
|
17524
|
+
[required]="chosenActivityType === taskListItem"></co-input-textarea>
|
|
17525
|
+
</div>
|
|
17526
|
+
</co-form>
|
|
17527
|
+
</div>
|
|
17528
|
+
<div class="extras-buttons">
|
|
17529
|
+
<co-button [iconData]="iconService.getIcon(icons.PaperclipRegular)" (click)="openAttachmentDialog()"
|
|
17530
|
+
[label]="documents.length === 0 ? '' : documents.length.toString()"></co-button>
|
|
17531
|
+
<co-button *ngIf="chosenActivityType === remarkListItem"
|
|
17532
|
+
[iconData]="iconService.getIcon(icons.PaperPlaneTopSolid)"
|
|
17533
|
+
(click)="createRemarkClicked()"></co-button>
|
|
17534
|
+
<co-button *ngIf="chosenActivityType === workListItem"
|
|
17535
|
+
[iconData]="iconService.getIcon(icons.PaperPlaneTopSolid)"
|
|
17536
|
+
(click)="createWorkClicked()"></co-button>
|
|
17537
|
+
<co-button *ngIf="chosenActivityType === taskListItem"
|
|
17538
|
+
[iconData]="iconService.getIcon(icons.PaperPlaneTopSolid)"
|
|
17539
|
+
(click)="createTaskClicked()"></co-button>
|
|
17540
|
+
</div>
|
|
17541
|
+
</div>
|
|
17542
|
+
<co-dialog *ngIf="showFilesDialog" (closeClick)="attachmentDialogCancelled()"
|
|
17543
|
+
[headerTemplate]="attachmentHeaderTemplate"
|
|
17544
|
+
[footerTemplate]="attachmentFooterTemplate">
|
|
17545
|
+
|
|
17546
|
+
<ng-template #attachmentHeaderTemplate>
|
|
17547
|
+
<div class="co-dialog-wrapper-popup-title">
|
|
17548
|
+
<co-icon [iconData]="iconService.getIcon(icons.PaperclipRegular)"></co-icon>
|
|
17549
|
+
<div class="co-dialog-header-title" [textContent]="'ATTACHMENTS' | sharedLocalize"></div>
|
|
17550
|
+
</div>
|
|
17551
|
+
</ng-template>
|
|
17552
|
+
<co-files-upload (documentsAdded)="addedDocument($event)" (documentDeleted)="deletedDocument"
|
|
17553
|
+
[documents]="documents" [useWithoutSettingProps]="true"></co-files-upload>
|
|
17554
|
+
</co-dialog>
|
|
17555
|
+
|
|
17556
|
+
|
|
17557
|
+
<ng-template #attachmentFooterTemplate>
|
|
17558
|
+
<div class="co-dialog-footer-button-wrapper">
|
|
17559
|
+
<co-button class="save-button"
|
|
17560
|
+
[iconData]="iconService.getIcon(icons.CheckDuotone)"
|
|
17561
|
+
(click)="attachmentDialogClosed()"></co-button>
|
|
17562
|
+
<co-button class="close-button"
|
|
17563
|
+
[iconData]="iconService.getIcon(icons.CrossSkinny)"
|
|
17564
|
+
(click)="attachmentDialogCancelled()"></co-button>
|
|
17565
|
+
</div>
|
|
17566
|
+
</ng-template>
|
|
17537
17567
|
`,
|
|
17538
17568
|
providers: [
|
|
17539
17569
|
FormMasterService,
|
|
@@ -17559,6 +17589,10 @@ TaskCreatorComponent.propDecorators = {
|
|
|
17559
17589
|
remarkAndWorkKey: [{ type: Input }],
|
|
17560
17590
|
taskKey: [{ type: Input }],
|
|
17561
17591
|
workflowCategoryType: [{ type: Input }],
|
|
17592
|
+
allowRemarkCreation: [{ type: Input }],
|
|
17593
|
+
allowWorkCreation: [{ type: Input }],
|
|
17594
|
+
allowTaskCreation: [{ type: Input }],
|
|
17595
|
+
allowEmailing: [{ type: Input }],
|
|
17562
17596
|
activityCreated: [{ type: Output }],
|
|
17563
17597
|
showClass: [{ type: HostBinding, args: ["class.co-task-creator",] }],
|
|
17564
17598
|
hidden: [{ type: HostBinding, args: ['class.co-shared-hidden',] }]
|