@colijnit/sharedcomponents 254.1.5 → 254.1.7

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.
Files changed (25) hide show
  1. package/bundles/colijnit-sharedcomponents.umd.js +172 -98
  2. package/bundles/colijnit-sharedcomponents.umd.js.map +1 -1
  3. package/colijnit-sharedcomponents.metadata.json +1 -1
  4. package/esm2015/lib/components/activity-list/activity-list.component.js +27 -9
  5. package/esm2015/lib/components/activity-overview-component/component-activity-overview.component.js +29 -3
  6. package/esm2015/lib/components/task-creator/task-creator.component.js +94 -69
  7. package/esm2015/lib/enum/icon.enum.js +3 -1
  8. package/esm2015/lib/model/icon-svg.js +3 -1
  9. package/esm2015/lib/service/shared.service.js +2 -2
  10. package/fesm2015/colijnit-sharedcomponents.js +149 -77
  11. package/fesm2015/colijnit-sharedcomponents.js.map +1 -1
  12. package/index.html +2 -2
  13. package/lib/components/activity-list/activity-list.component.d.ts +5 -1
  14. package/lib/components/activity-list/style/_layout.scss +17 -2
  15. package/lib/components/activity-overview-component/component-activity-overview.component.d.ts +6 -0
  16. package/lib/components/activity-overview-component/style/_layout.scss +2 -1
  17. package/lib/components/task-creator/style/_layout.scss +22 -0
  18. package/lib/components/task-creator/task-creator.component.d.ts +12 -10
  19. package/lib/enum/icon.enum.d.ts +2 -0
  20. package/lib/service/shared.service.d.ts +1 -1
  21. package/lib/style/_variables.scss +1 -1
  22. package/main.77b4740be9a9b2b46cce.js +1 -0
  23. package/package.json +3 -3
  24. package/{styles.ccda7309f28016f3304b.css → styles.d0261e97459fa67ab440.css} +1 -1
  25. package/main.9761831eb5f539b50eb2.js +0 -1
@@ -84,6 +84,7 @@ import { RelationRequest } from '@colijnit/relationapi/build/model/relation-requ
84
84
  import { Period } from '@colijnit/mainapi/build/enum/period.enum';
85
85
  import { activityEmailRequestData } from '@colijnit/mainapi/build/model/activity-email-request-data';
86
86
  import { ReportType } from '@colijnit/mainapi/build/enum/report-type.enum';
87
+ import { ActivityEmailHistory } from '@colijnit/mainapi/build/model/activity-email-history.bo';
87
88
  import { StringUtils as StringUtils$1 } from '@colijnit/ioneconnector/build/utils/string-utils';
88
89
 
89
90
  class DocsignComponent {
@@ -1577,9 +1578,11 @@ var Icon;
1577
1578
  Icon["DeleteLeftRegular"] = "delete_left_regular";
1578
1579
  Icon["DeliveryTruck"] = "delivery_truck";
1579
1580
  Icon["DetailView"] = "detail_view";
1581
+ Icon["DiagramProjectRegular"] = "diagram_project_regular";
1580
1582
  Icon["Dropzone"] = "dropzone";
1581
1583
  Icon["EditPenRegular"] = "edit_pen_regular";
1582
1584
  Icon["Email"] = "email";
1585
+ Icon["EmailRegular"] = "email_regular";
1583
1586
  Icon["Employee"] = "employee";
1584
1587
  Icon["EnvelopeRegular"] = "envelope_regular";
1585
1588
  Icon["EyeRegular"] = "eye_regular";
@@ -1638,9 +1641,11 @@ const IconSvg = {
1638
1641
  "delete_left_regular": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 576 512\"><path d=\"M432.1 208.1L385.9 256L432.1 303C442.3 312.4 442.3 327.6 432.1 336.1C423.6 346.3 408.4 346.3 399 336.1L352 289.9L304.1 336.1C295.6 346.3 280.4 346.3 271 336.1C261.7 327.6 261.7 312.4 271 303L318.1 256L271 208.1C261.7 199.6 261.7 184.4 271 175C280.4 165.7 295.6 165.7 304.1 175L352 222.1L399 175C408.4 165.7 423.6 165.7 432.1 175C442.3 184.4 442.3 199.6 432.1 208.1V208.1zM512 64C547.3 64 576 92.65 576 128V384C576 419.3 547.3 448 512 448H205.3C188.3 448 172 441.3 160 429.3L9.372 278.6C3.371 272.6 0 264.5 0 256C0 247.5 3.372 239.4 9.372 233.4L160 82.75C172 70.74 188.3 64 205.3 64L512 64zM528 128C528 119.2 520.8 112 512 112H205.3C201 112 196.9 113.7 193.9 116.7L54.63 256L193.9 395.3C196.9 398.3 201 400 205.3 400H512C520.8 400 528 392.8 528 384V128z\"/></svg>",
1639
1642
  "delivery_truck": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><rect x=\"15.35\" y=\"16.56\" width=\"15.14\" height=\"10.94\" transform=\"translate(-1.83 2.08) rotate(-5)\" fill=\"#484f60\"/><path d=\"M38.5,18.1l-6.9.61L32.41,28l-7.63.67a3.76,3.76,0,0,1,1.43,2.25l7.25-.63A3.83,3.83,0,0,1,41,29.6l1-.1-.52-6Zm.29,5.84-3.91.34a.51.51,0,0,1-.55-.46L34,20.1a.49.49,0,0,1,.45-.54l2.27-.2a.5.5,0,0,1,.48.25l2,3.59A.5.5,0,0,1,38.79,23.94Z\" fill=\"#484f60\"/><path d=\"M19.66,29.09a3.8,3.8,0,0,0-1,2.46l-.74.07-1.82-.94L16,29.41Z\" fill=\"#484f60\"/><path d=\"M34.56,30.62a2.74,2.74,0,1,0,2.49-3A2.73,2.73,0,0,0,34.56,30.62Z\" fill=\"#484f60\"/><path d=\"M19.74,31.91a2.74,2.74,0,1,0,2.49-3A2.74,2.74,0,0,0,19.74,31.91Z\" fill=\"#484f60\"/><rect x=\"7.96\" y=\"17.63\" width=\"5\" height=\"1\" transform=\"translate(-1.54 0.98) rotate(-5)\" fill=\"#484f60\"/><rect x=\"11.02\" y=\"29.71\" width=\"3\" height=\"1\" transform=\"translate(-2.59 1.21) rotate(-5)\" fill=\"#484f60\"/><rect x=\"9.48\" y=\"23.53\" width=\"4\" height=\"1\" transform=\"matrix(1, -0.09, 0.09, 1, -2.05, 1.09)\" fill=\"#484f60\"/></svg>",
1640
1643
  "detail_view": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 30 30\"><g ><g><polygon points=\"24.55 16.18 24.55 27.49 2.44 27.49 2.44 5.38 14.69 5.38 15.59 4.48 14.04 2.94 0 2.94 0 29.93 26.99 29.93 26.99 15.88 25.92 14.81 24.55 16.18\" fill=\"#484f60\"/><polygon points=\"30 .4 17.92 .4 22 4.48 12.24 16.23 14.16 18.15 25.92 8.4 30 12.48 30 .4\" fill=\"#484f60\"/></g></g></svg>",
1644
+ "diagram_project_regular": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 576 512\"><path d=\"M136 80c4.4 0 8 3.6 8 8v80c0 4.4-3.6 8-8 8H56c-4.4 0-8-3.6-8-8V88c0-4.4 3.6-8 8-8h80zM56 32C25.1 32 0 57.1 0 88v80c0 30.9 25.1 56 56 56h80c5.6 0 11.1-.8 16.2-2.4l75.9 101.2c-2.7 6.5-4.1 13.7-4.1 21.2v80c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56V344c0-30.9-25.1-56-56-56H280c-5.6 0-11.1 .8-16.2 2.4L187.9 189.2c2.7-6.5 4.1-13.7 4.1-21.2V152H384v16c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56V88c0-30.9-25.1-56-56-56H440c-30.9 0-56 25.1-56 56v16H192V88c0-30.9-25.1-56-56-56H56zM360 336c4.4 0 8 3.6 8 8v80c0 4.4-3.6 8-8 8H280c-4.4 0-8-3.6-8-8V344c0-4.4 3.6-8 8-8h80zM440 80h80c4.4 0 8 3.6 8 8v80c0 4.4-3.6 8-8 8H440c-4.4 0-8-3.6-8-8V88c0-4.4 3.6-8 8-8z\"/></svg>",
1641
1645
  "dropzone": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 30 30\"><g ><g><rect x=\"2\" y=\"1.67\" width=\"14\" height=\"6\" rx=\"2\" ry=\"2\" fill=\"#484f60\" opacity=\".5\"/><path d=\"M16.52,13.16l-.94-.47-1.61-2.53-1.23-1.62-.65-.85-1.53-1.59-2.06-1.17h-1.15l-.7,.7,.41,.91,2.47,2.2,.56,1.2,1.7,2.71,.82,2.26,.06,.74,.09,2.38-.23-.85-.97-.94-.79-.97-1.76-1.76-1.06-.35-.88,.24-.7,.62,1.32,1.44,1.56,1.97,2.14,3.73,2.2,2,1.82,1.14,2.44,1.06,1.91,1,2,1.03,.23,1.29,6.02-5.99v-.91s-.91-1-1-1.03c-.09-.03-.82-1.65-.82-1.65l-.47-1.91-.35-.97-1.32-1.67-.85-1.12-.5-.82-.88-1.14-.79-.77-1.33-.86-.22,.42,1.39,2.12-.94-.47-.86-1.48-1.33-1.38-1.06-.16-.03,.6,2.1,3.09-.94-.47-1.8-2.9-1.21-.86-1.29,.12,.18,.56,2.85,4.14Z\" fill=\"#484f60\"/><path d=\"M16,1.67h-1c1.1,0,2,.9,2,2v2c0,1.1-.9,2-2,2h1c1.1,0,2-.9,2-2V3.67c0-1.1-.9-2-2-2Z\" fill=\"#484f60\" opacity=\".5\"/><path d=\"M18,1.67h-1c1.1,0,2,.9,2,2v2c0,1.1-.9,2-2,2h1c1.1,0,2-.9,2-2V3.67c0-1.1-.9-2-2-2Z\" fill=\"#484f60\" opacity=\".25\"/><path d=\"M20,1.67h-1c1.1,0,2,.9,2,2v2c0,1.1-.9,2-2,2h1c1.1,0,2-.9,2-2V3.67c0-1.1-.9-2-2-2Z\" fill=\"#484f60\" opacity=\".1\"/></g></g></svg>",
1642
1646
  "edit_pen_regular": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><path d=\"M441 58.9L453.1 71c9.4 9.4 9.4 24.6 0 33.9L424 134.1 377.9 88 407 58.9c9.4-9.4 24.6-9.4 33.9 0zM209.8 256.2L344 121.9 390.1 168 255.8 302.2c-2.9 2.9-6.5 5-10.4 6.1l-58.5 16.7 16.7-58.5c1.1-3.9 3.2-7.5 6.1-10.4zM373.1 25L175.8 222.2c-8.7 8.7-15 19.4-18.3 31.1l-28.6 100c-2.4 8.4-.1 17.4 6.1 23.6s15.2 8.5 23.6 6.1l100-28.6c11.8-3.4 22.5-9.7 31.1-18.3L487 138.9c28.1-28.1 28.1-73.7 0-101.8L474.9 25C446.8-3.1 401.2-3.1 373.1 25zM88 64C39.4 64 0 103.4 0 152V424c0 48.6 39.4 88 88 88H360c48.6 0 88-39.4 88-88V312c0-13.3-10.7-24-24-24s-24 10.7-24 24V424c0 22.1-17.9 40-40 40H88c-22.1 0-40-17.9-40-40V152c0-22.1 17.9-40 40-40H200c13.3 0 24-10.7 24-24s-10.7-24-24-24H88z\"/></svg>",
1643
1647
  "email": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M31.79,38.45A17.82,17.82,0,0,1,23.86,40,13.09,13.09,0,0,1,10.41,26.42C10.41,17.63,16.83,10,26.53,10c7.63,0,13.06,5.21,13.06,12.46,0,6.33-3.53,10.3-8.19,10.3a3.42,3.42,0,0,1-3.71-3.32h-.08A6.5,6.5,0,0,1,22,32.76c-2.75,0-4.82-2.11-4.82-5.65a9.85,9.85,0,0,1,10.13-10,12.89,12.89,0,0,1,5.13,1l-1.3,8c-.43,2.54-.13,3.71,1.08,3.75,1.85.09,4.18-2.28,4.18-7.28,0-5.65-3.62-10-10.3-10S13.73,17.76,13.73,26c0,7.25,4.57,11.3,11,11.3A14.81,14.81,0,0,0,31,36ZM28,20.65a5.34,5.34,0,0,0-1.33-.18c-2.85,0-5.09,2.81-5.09,6.12,0,1.64.73,2.68,2.16,2.68,1.59,0,3.27-2,3.66-4.53Z\" fill=\"#484f60\"/></svg>",
1648
+ "email_regular": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><path d=\"M256 64C150 64 64 150 64 256s86 192 192 192c17.7 0 32 14.3 32 32s-14.3 32-32 32C114.6 512 0 397.4 0 256S114.6 0 256 0S512 114.6 512 256v32c0 53-43 96-96 96c-29.3 0-55.6-13.2-73.2-33.9C320 371.1 289.5 384 256 384c-70.7 0-128-57.3-128-128s57.3-128 128-128c27.9 0 53.7 8.9 74.7 24.1c5.7-5 13.1-8.1 21.3-8.1c17.7 0 32 14.3 32 32v80 32c0 17.7 14.3 32 32 32s32-14.3 32-32V256c0-106-86-192-192-192zm64 192a64 64 0 1 0 -128 0 64 64 0 1 0 128 0z\"/></svg>",
1644
1649
  "employee": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 30 30\"><g ><path d=\"M15,2c-3.59,0-6.5,2.91-6.5,6.5s2.91,6.5,6.5,6.5,6.5-2.91,6.5-6.5-2.91-6.5-6.5-6.5Zm-.68,20.92l-3.58-5.37c-4.04,.67-7.12,4.18-7.12,8.41v.41c0,.9,.73,1.62,1.62,1.62H24.75c.9,0,1.62-.73,1.62-1.62v-.41c0-4.23-3.08-7.74-7.12-8.41l-3.58,5.37c-.32,.48-1.03,.48-1.35,0Z\" fill=\"#484f60\"/></g></svg>",
1645
1650
  "envelope_regular": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><path d=\"M64 112c-8.8 0-16 7.2-16 16v22.1L220.5 291.7c20.7 17 50.4 17 71.1 0L464 150.1V128c0-8.8-7.2-16-16-16H64zM48 212.2V384c0 8.8 7.2 16 16 16H448c8.8 0 16-7.2 16-16V212.2L322 328.8c-38.4 31.5-93.7 31.5-132 0L48 212.2zM0 128C0 92.7 28.7 64 64 64H448c35.3 0 64 28.7 64 64V384c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V128z\"/></svg>",
1646
1651
  "eye_regular": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 576 512\"><path d=\"M288 80c-65.2 0-118.8 29.6-159.9 67.7C89.6 183.5 63 226 49.4 256c13.6 30 40.2 72.5 78.6 108.3C169.2 402.4 222.8 432 288 432s118.8-29.6 159.9-67.7C486.4 328.5 513 286 526.6 256c-13.6-30-40.2-72.5-78.6-108.3C406.8 109.6 353.2 80 288 80zM95.4 112.6C142.5 68.8 207.2 32 288 32s145.5 36.8 192.6 80.6c46.8 43.5 78.1 95.4 93 131.1c3.3 7.9 3.3 16.7 0 24.6c-14.9 35.7-46.2 87.7-93 131.1C433.5 443.2 368.8 480 288 480s-145.5-36.8-192.6-80.6C48.6 356 17.3 304 2.5 268.3c-3.3-7.9-3.3-16.7 0-24.6C17.3 208 48.6 156 95.4 112.6zM288 336c44.2 0 80-35.8 80-80s-35.8-80-80-80c-.7 0-1.3 0-2 0c1.3 5.1 2 10.5 2 16c0 35.3-28.7 64-64 64c-5.5 0-10.9-.7-16-2c0 .7 0 1.3 0 2c0 44.2 35.8 80 80 80zm0-208a128 128 0 1 1 0 256 128 128 0 1 1 0-256z\"/></svg>",
@@ -2779,7 +2784,7 @@ class SharedService {
2779
2784
  emailJob.reply = reply;
2780
2785
  emailJob.subject = subject;
2781
2786
  emailJob.message = message;
2782
- emailJob.attachments = attachments;
2787
+ //emailJob.attachments = attachments;
2783
2788
  emailJob.reportId = report.reportId;
2784
2789
  emailJob.parameterValues = parameters;
2785
2790
  emailJob.locale = this.locale;
@@ -11452,13 +11457,23 @@ class ActivityListComponent {
11452
11457
  this.RelationKind = RelationKind;
11453
11458
  this.ActivityType = ActivityType;
11454
11459
  this.TimeUtils = TimeUtils;
11455
- this.activities = [];
11456
11460
  this.remarkIcon = Icon.CommentRegular;
11457
11461
  this.workIcon = Icon.PersonDiggingRegular;
11462
+ this.statusIcon = Icon.DiagramProjectRegular;
11463
+ this.taskIcon = Icon.Task;
11458
11464
  }
11459
11465
  showClass() {
11460
11466
  return true;
11461
11467
  }
11468
+ set activities(value) {
11469
+ if (value && value.length > 0) {
11470
+ value.sort((a, b) => a.lastActionDateTime < b.lastActionDateTime ? 1 : -1);
11471
+ }
11472
+ this._activities = value;
11473
+ }
11474
+ get activities() {
11475
+ return this._activities;
11476
+ }
11462
11477
  ngOnInit() {
11463
11478
  return __awaiter(this, void 0, void 0, function* () {
11464
11479
  });
@@ -11482,13 +11497,15 @@ class ActivityListComponent {
11482
11497
  switch (activity.activityType) {
11483
11498
  case ActivityType.Remark:
11484
11499
  return this.remarkIcon;
11485
- case ActivityType.StateChange:
11486
11500
  case ActivityType.WorkflowStatus:
11487
11501
  case ActivityType.Work:
11488
- case ActivityType.Task:
11489
11502
  case ActivityType.WorkflowTask:
11490
11503
  case ActivityType.Form:
11491
11504
  return this.workIcon;
11505
+ case ActivityType.StateChange:
11506
+ return this.statusIcon;
11507
+ case ActivityType.Task:
11508
+ return this.taskIcon;
11492
11509
  }
11493
11510
  }
11494
11511
  showAttachments(activity) {
@@ -11532,13 +11549,17 @@ ActivityListComponent.decorators = [
11532
11549
  </div>
11533
11550
  <div class="activity-display-content" [class.customer-reply-content]="(getRelationKind(activity.author) === RelationKind.Customer)">
11534
11551
  <div class="activity-display-body">
11535
- <span>{{activity.subDescription}}</span>
11552
+ <span *ngIf="activity.activityType !== ActivityType.StateChange">{{activity.subDescription}}</span>
11553
+ <span *ngIf="activity.activityType === ActivityType.StateChange">{{activity.activityTitle}}</span>
11536
11554
  </div>
11537
11555
  <div class="activity-display-footer">
11538
11556
  <!--TODO discuss with Rob is we can gather the info needed to see which workflow triggers have previously been activated for this trigger-->
11539
- <!--<div *ngIf="showState(activity)" class="activity-state">
11540
- <span *ngIf="showAttachments(activity)">{{activity.documents.length}}</span>
11541
- </div>-->
11557
+ <div class="activity-fired-triggers" *ngIf="activity.activityType === ActivityType.StateChange && activity.stateChange.firedTriggerNames &&
11558
+ activity.stateChange.firedTriggerNames.length > 0" >
11559
+ <div *ngFor="let triggerName of activity.stateChange?.firedTriggerNames">
11560
+ <span>{{triggerName}}</span>
11561
+ </div>
11562
+ </div>
11542
11563
  <co-icon *ngIf="showAttachments(activity)" [iconData]="iconCacheService.getIcon(Icon.PaperclipRegular)" (click)="openActivityPopup(activity)"></co-icon>
11543
11564
  <span *ngIf="showAttachments(activity)">{{activity.documents.length}}</span>
11544
11565
  <co-icon *ngIf="showWorkedTime(activity)"
@@ -11566,7 +11587,9 @@ ActivityListComponent.propDecorators = {
11566
11587
  showClass: [{ type: HostBinding, args: ["class.co-activity-list",] }],
11567
11588
  activities: [{ type: Input }],
11568
11589
  remarkIcon: [{ type: Input }],
11569
- workIcon: [{ type: Input }]
11590
+ workIcon: [{ type: Input }],
11591
+ statusIcon: [{ type: Input }],
11592
+ taskIcon: [{ type: Input }]
11570
11593
  };
11571
11594
 
11572
11595
  class ActivityListModule {
@@ -13021,10 +13044,29 @@ class ComponentActivityOverviewComponent extends BaseActivityOverviewComponent {
13021
13044
  this.dictionaryService = dictionaryService;
13022
13045
  this.sharedService = sharedService;
13023
13046
  this.Icon = Icon;
13047
+ this.remarkIcon = Icon.CommentRegular;
13048
+ this.workIcon = Icon.PersonDiggingRegular;
13049
+ this.statusIcon = Icon.DiagramProjectRegular;
13050
+ this.taskIcon = Icon.Task;
13024
13051
  }
13025
13052
  showClass() {
13026
13053
  return true;
13027
13054
  }
13055
+ getActivityIcon(activity) {
13056
+ switch (activity.activityType) {
13057
+ case ActivityType.Remark:
13058
+ return this.remarkIcon;
13059
+ case ActivityType.WorkflowStatus:
13060
+ case ActivityType.Work:
13061
+ case ActivityType.WorkflowTask:
13062
+ case ActivityType.Form:
13063
+ return this.workIcon;
13064
+ case ActivityType.StateChange:
13065
+ return this.statusIcon;
13066
+ case ActivityType.Task:
13067
+ return this.taskIcon;
13068
+ }
13069
+ }
13028
13070
  }
13029
13071
  ComponentActivityOverviewComponent.decorators = [
13030
13072
  { type: Component, args: [{
@@ -13038,7 +13080,8 @@ ComponentActivityOverviewComponent.decorators = [
13038
13080
  </div>
13039
13081
  <div class="overview-wrapper-labels">
13040
13082
  <div class="activity-title" [textContent]="activityTitle"></div>
13041
- <div class="activity-context-title" [textContent]="activityContextTitle"></div>
13083
+ <!--seems unessecary for current usecases, but left in case this needs an input to switch on or off-->
13084
+ <!--<div class="activity-context-title" [textContent]="activityContextTitle"></div>-->
13042
13085
  </div>
13043
13086
  <div class="overview-wrapper-date">
13044
13087
  <div class="date-wrapper" [class.overdue]="overDue">
@@ -13047,6 +13090,7 @@ ComponentActivityOverviewComponent.decorators = [
13047
13090
  <div class="date-divider" [textContent]="'-'"></div>
13048
13091
  </ng-container>
13049
13092
  <div class="date" [textContent]="deadlineDate | date:'dd-MM-YYYY'"></div>
13093
+ <co-icon class="activity-type-icon"[iconData]="iconCacheService.getIcon(getActivityIcon(activity))"></co-icon>
13050
13094
  </div>
13051
13095
  </div>
13052
13096
  </div>
@@ -13131,6 +13175,10 @@ ComponentActivityOverviewComponent.ctorParameters = () => [
13131
13175
  { type: SharedService }
13132
13176
  ];
13133
13177
  ComponentActivityOverviewComponent.propDecorators = {
13178
+ remarkIcon: [{ type: Input }],
13179
+ workIcon: [{ type: Input }],
13180
+ statusIcon: [{ type: Input }],
13181
+ taskIcon: [{ type: Input }],
13134
13182
  showClass: [{ type: HostBinding, args: ["class.co-component-activity-overview",] }]
13135
13183
  };
13136
13184
 
@@ -14936,10 +14984,11 @@ WorkflowInfoTilesModule.decorators = [
14936
14984
  ];
14937
14985
 
14938
14986
  class TaskCreatorComponent {
14939
- constructor(iconService, dictionaryService, sharedService) {
14987
+ constructor(iconService, dictionaryService, sharedService, _dialogService) {
14940
14988
  this.iconService = iconService;
14941
14989
  this.dictionaryService = dictionaryService;
14942
14990
  this.sharedService = sharedService;
14991
+ this._dialogService = _dialogService;
14943
14992
  this.icons = Icon;
14944
14993
  this.table = TableName$1.Transactions;
14945
14994
  this.activityCreated = new EventEmitter();
@@ -14972,6 +15021,16 @@ class TaskCreatorComponent {
14972
15021
  itemSelected(item) {
14973
15022
  this.chosenActivityType = item;
14974
15023
  }
15024
+ addedDocument(docs) {
15025
+ return __awaiter(this, void 0, void 0, function* () {
15026
+ this.documents = this.documents.concat(docs);
15027
+ });
15028
+ }
15029
+ deletedDocument(doc) {
15030
+ return __awaiter(this, void 0, void 0, function* () {
15031
+ ArrayUtils.RemoveElement(doc, this.documents);
15032
+ });
15033
+ }
14975
15034
  createRemarkClicked() {
14976
15035
  return __awaiter(this, void 0, void 0, function* () {
14977
15036
  this.createForm.submit();
@@ -14987,6 +15046,20 @@ class TaskCreatorComponent {
14987
15046
  }
14988
15047
  });
14989
15048
  }
15049
+ emailDialogClosed() {
15050
+ if (this.emailAddresses.length >= 0) {
15051
+ this.emailRequest = new activityEmailRequestData;
15052
+ this.emailRequest.table = this.table;
15053
+ this.emailRequest.key = this.remarkAndWorkKey;
15054
+ this.emailRequest.senderAddress = this.senderAddress;
15055
+ this.emailRequest.sendAddresses = this.emailAddresses;
15056
+ this.emailRequest.ccAddresses = this.bccEmailAddresses;
15057
+ }
15058
+ else {
15059
+ this.emailRequest = null;
15060
+ }
15061
+ this.showEmailDialog = false;
15062
+ }
14990
15063
  createWorkClicked() {
14991
15064
  return __awaiter(this, void 0, void 0, function* () {
14992
15065
  this.createForm.submit();
@@ -15021,30 +15094,6 @@ class TaskCreatorComponent {
15021
15094
  }
15022
15095
  });
15023
15096
  }
15024
- addedDocument(docs) {
15025
- return __awaiter(this, void 0, void 0, function* () {
15026
- this.documents = this.documents.concat(docs);
15027
- });
15028
- }
15029
- deletedDocument(doc) {
15030
- return __awaiter(this, void 0, void 0, function* () {
15031
- ArrayUtils.RemoveElement(doc, this.documents);
15032
- });
15033
- }
15034
- emailDialogClosed() {
15035
- if (this.emailAddresses.length >= 0) {
15036
- this.emailRequest = new activityEmailRequestData;
15037
- this.emailRequest.table = this.table;
15038
- this.emailRequest.key = this.remarkAndWorkKey;
15039
- this.emailRequest.senderAddress = this.senderAddress;
15040
- this.emailRequest.sendAddresses = this.emailAddresses;
15041
- this.emailRequest.ccAddresses = this.bccEmailAddresses;
15042
- }
15043
- else {
15044
- this.emailRequest = null;
15045
- }
15046
- this.showEmailDialog = false;
15047
- }
15048
15097
  createRemark() {
15049
15098
  let remark = new Remark();
15050
15099
  remark.author = this.author;
@@ -15095,19 +15144,6 @@ class TaskCreatorComponent {
15095
15144
  this.clearFields();
15096
15145
  });
15097
15146
  }
15098
- clearFields() {
15099
- this.remarkText = "";
15100
- this.workDescription = "";
15101
- this.taskName = "";
15102
- this.taskDescription = "";
15103
- this.senderAddress = "";
15104
- this.emailAddresses = [];
15105
- this.bccEmailAddresses = [];
15106
- this.emailRequest = null;
15107
- this.createdWork = undefined;
15108
- this.createdRemark = undefined;
15109
- this.createdTask = undefined;
15110
- }
15111
15147
  sendEmailIfNeccesary() {
15112
15148
  return __awaiter(this, void 0, void 0, function* () {
15113
15149
  if (this.emailAddresses.length > 0) {
@@ -15115,17 +15151,15 @@ class TaskCreatorComponent {
15115
15151
  if (templates.length != 0) {
15116
15152
  let template = this.findDefault(templates);
15117
15153
  if (template) {
15118
- this.startEmailing(template);
15154
+ yield this.startEmailing(template);
15155
+ }
15156
+ else {
15157
+ this._dialogService.showError('NO_DEFAULT_EMAIL_TEMPLATE_FOR_REPORT');
15119
15158
  }
15120
15159
  }
15121
15160
  }
15122
15161
  });
15123
15162
  }
15124
- startEmailing(template) {
15125
- return __awaiter(this, void 0, void 0, function* () {
15126
- yield this.sharedService.emailViaTemplate(template, this.createEmailAddressString(this.emailAddresses), this.createEmailAddressString(this.bccEmailAddresses), this.senderAddress, this.createEmailSubject(), "", this.createAttachmentsStringArray(), this.createEmailParams());
15127
- });
15128
- }
15129
15163
  findReportType() {
15130
15164
  if (this.chosenActivityType === this.optionCollection[0]) {
15131
15165
  return ReportType.RemarkMessage;
@@ -15146,15 +15180,29 @@ class TaskCreatorComponent {
15146
15180
  });
15147
15181
  return defaultTemplate;
15148
15182
  }
15149
- createEmailParams() {
15150
- if (this.createdRemark) {
15151
- return { opmerking_id: this.createdRemark.remarkId + "" };
15152
- }
15153
- else if (this.createdWork) {
15154
- return { werkzh_id: this.createdWork.workId + "" };
15183
+ startEmailing(template) {
15184
+ return __awaiter(this, void 0, void 0, function* () {
15185
+ const emailsSent = yield this.sharedService.emailViaTemplate(template, this.createEmailAddressString(this.emailAddresses), this.createEmailAddressString(this.bccEmailAddresses), this.senderAddress, this.createEmailSubject(), "", null /*this.createAttachmentsStringArray()*/, this.createEmailParams());
15186
+ if (emailsSent) {
15187
+ //registerSentEmails
15188
+ }
15189
+ });
15190
+ }
15191
+ registerSentEmails() {
15192
+ return __awaiter(this, void 0, void 0, function* () {
15193
+ let history = new ActivityEmailHistory();
15194
+ history.emailAddresses = this.createEmailAddressString(this.emailAddresses) + ';' + this.createEmailAddressString(this.bccEmailAddresses);
15195
+ //history.attachments = this.createAttachmentsStringArray();
15196
+ history.message = '';
15197
+ history.emailDateTime = new Date();
15198
+ });
15199
+ }
15200
+ createEmailAddressString(addresses) {
15201
+ if (addresses.length === 0) {
15202
+ return '';
15155
15203
  }
15156
- else if (this.createdTask) {
15157
- return { taak_id: this.createdTask.taskId + "" };
15204
+ else {
15205
+ return addresses.join(';');
15158
15206
  }
15159
15207
  }
15160
15208
  createEmailSubject() {
@@ -15171,26 +15219,49 @@ class TaskCreatorComponent {
15171
15219
  }
15172
15220
  return subject;
15173
15221
  }
15174
- createEmailAddressString(addresses) {
15175
- if (addresses.length === 0) {
15176
- return '';
15177
- }
15178
- else {
15179
- return addresses.join(';');
15180
- }
15181
- }
15182
- createAttachmentsStringArray() {
15222
+ createAttachmentsArray() {
15223
+ let attachments = [];
15183
15224
  if (this.documents.length === 0) {
15184
- return [];
15225
+ return;
15185
15226
  }
15186
15227
  else {
15187
- let attachments = [];
15188
15228
  this.documents.forEach(d => {
15189
- attachments.push(d.documentBody);
15229
+ /*let attachment: CoEmailAttachment = new CoEmailAttachment();
15230
+ attachment.filename = d.fileName;
15231
+ if (d.fileName.split(".").length > 1) {
15232
+ const str: string[] = d.fileName.split(".");
15233
+ attachment.extension = str[str.length - 1];
15234
+ }
15235
+ const textEncoder = new TextEncoder();
15236
+ attachment.body = textEncoder.encode("Your string here");*/
15190
15237
  });
15191
15238
  return attachments;
15192
15239
  }
15193
15240
  }
15241
+ createEmailParams() {
15242
+ if (this.createdRemark) {
15243
+ return { opmerking_id: this.createdRemark.remarkId + "" };
15244
+ }
15245
+ else if (this.createdWork) {
15246
+ return { werkzh_id: this.createdWork.workId + "" };
15247
+ }
15248
+ else if (this.createdTask) {
15249
+ return { taak_id: this.createdTask.taskId + "" };
15250
+ }
15251
+ }
15252
+ clearFields() {
15253
+ this.remarkText = "";
15254
+ this.workDescription = "";
15255
+ this.taskName = "";
15256
+ this.taskDescription = "";
15257
+ this.senderAddress = "";
15258
+ this.emailAddresses = [];
15259
+ this.bccEmailAddresses = [];
15260
+ this.emailRequest = null;
15261
+ this.createdWork = undefined;
15262
+ this.createdRemark = undefined;
15263
+ this.createdTask = undefined;
15264
+ }
15194
15265
  }
15195
15266
  TaskCreatorComponent.decorators = [
15196
15267
  { type: Component, args: [{
@@ -15214,7 +15285,7 @@ TaskCreatorComponent.decorators = [
15214
15285
  </div>
15215
15286
  </co-form>
15216
15287
  <div class="extras-buttons">
15217
- <co-button [iconData]="iconService.getIcon(icons.Email)" (click)="showEmailDialog = true"></co-button>
15288
+ <co-button [iconData]="iconService.getIcon(icons.EmailRegular)" (click)="showEmailDialog = true"></co-button>
15218
15289
  <co-button [iconData]="iconService.getIcon(icons.PaperclipRegular)" (click)="showFilesDialog = true"
15219
15290
  [label]="documents.length === 0 ? '' : documents.length.toString()" ></co-button>
15220
15291
  </div>
@@ -15226,7 +15297,7 @@ TaskCreatorComponent.decorators = [
15226
15297
  <co-dialog *ngIf="showEmailDialog" (closeClick)="emailDialogClosed()">
15227
15298
  <co-role-email-selector [(model)]="emailAddresses" [key]="remarkAndWorkKey" [workflowCategoryType]="workflowCategoryType"></co-role-email-selector>
15228
15299
  <co-role-email-selector [(model)]="bccEmailAddresses" [key]="remarkAndWorkKey" [workflowCategoryType]="workflowCategoryType"></co-role-email-selector>
15229
- <co-input-text [readonly]="false" [label]="'SENDER' | localize" [model]="senderAddress"></co-input-text>-->
15300
+ <co-input-text [readonly]="false" [label]="'SENDER' | localize" [(model)]="senderAddress"></co-input-text>
15230
15301
  </co-dialog>
15231
15302
 
15232
15303
  `
@@ -15235,7 +15306,8 @@ TaskCreatorComponent.decorators = [
15235
15306
  TaskCreatorComponent.ctorParameters = () => [
15236
15307
  { type: IconCacheService },
15237
15308
  { type: DictionaryService },
15238
- { type: SharedService }
15309
+ { type: SharedService },
15310
+ { type: CoreDialogService }
15239
15311
  ];
15240
15312
  TaskCreatorComponent.propDecorators = {
15241
15313
  createForm: [{ type: ViewChild, args: [FormComponent,] }],