@colijnit/sharedcomponents 254.1.4 → 254.1.6

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 (40) hide show
  1. package/3rdpartylicenses.txt +1408 -0
  2. package/bundles/colijnit-sharedcomponents.umd.js +546 -158
  3. package/bundles/colijnit-sharedcomponents.umd.js.map +1 -1
  4. package/colijnit-sharedcomponents.metadata.json +1 -1
  5. package/esm2015/lib/components/activity-list/activity-list.component.js +21 -6
  6. package/esm2015/lib/components/activity-overview-component/component-activity-overview.component.js +29 -3
  7. package/esm2015/lib/components/role-email-selector/role-email-selector.component.js +112 -0
  8. package/esm2015/lib/components/role-email-selector/role-email-selector.module.js +29 -0
  9. package/esm2015/lib/components/task-creator/task-creator.component.js +205 -125
  10. package/esm2015/lib/components/task-creator/task-creator.module.js +6 -3
  11. package/esm2015/lib/enum/icon.enum.js +3 -1
  12. package/esm2015/lib/model/icon-svg.js +3 -1
  13. package/esm2015/lib/service/shared-connector.service.js +46 -1
  14. package/esm2015/lib/service/shared.service.js +22 -5
  15. package/esm2015/public-api.js +3 -1
  16. package/favicon.ico +0 -0
  17. package/fesm2015/colijnit-sharedcomponents.js +454 -140
  18. package/fesm2015/colijnit-sharedcomponents.js.map +1 -1
  19. package/index.html +12 -0
  20. package/lib/components/activity-list/activity-list.component.d.ts +5 -1
  21. package/lib/components/activity-list/style/_layout.scss +2 -1
  22. package/lib/components/activity-overview-component/component-activity-overview.component.d.ts +6 -0
  23. package/lib/components/activity-overview-component/style/_layout.scss +2 -1
  24. package/lib/components/role-email-selector/role-email-selector.component.d.ts +29 -0
  25. package/lib/components/role-email-selector/role-email-selector.module.d.ts +2 -0
  26. package/lib/components/role-email-selector/style/_layout.scss +40 -0
  27. package/lib/components/role-email-selector/style/_material-definition.scss +15 -0
  28. package/lib/components/role-email-selector/style/_theme.scss +4 -0
  29. package/lib/components/role-email-selector/style/material.scss +4 -0
  30. package/lib/components/task-creator/style/_layout.scss +22 -0
  31. package/lib/components/task-creator/task-creator.component.d.ts +33 -16
  32. package/lib/enum/icon.enum.d.ts +2 -0
  33. package/lib/service/shared-connector.service.d.ts +6 -0
  34. package/lib/service/shared.service.d.ts +6 -1
  35. package/main.a153b9974c5f3e2988db.js +1 -0
  36. package/package.json +3 -3
  37. package/polyfills.907fe9d1887c5de17993.js +1 -0
  38. package/public-api.d.ts +2 -0
  39. package/runtime.8aac21847ed3d3829cca.js +1 -0
  40. package/styles.ba4c8c9a3a37cb1c0c3a.css +1 -0
@@ -34,6 +34,9 @@ import { Activity } from '@colijnit/mainapi/build/model/activity.bo';
34
34
  import { WorkflowProcessInfoPerStatus } from '@colijnit/mainapi/build/model/workflow-process-info-per-status';
35
35
  import { RelationSmallObject } from '@colijnit/mainapi/build/model/relation-small-object.bo';
36
36
  import { Report } from '@colijnit/mainapi/build/model/report.bo';
37
+ import { Work } from '@colijnit/mainapi/build/model/work.bo';
38
+ import { Remark } from '@colijnit/mainapi/build/model/remark.bo';
39
+ import { Task } from '@colijnit/mainapi/build/model/task.bo';
37
40
  import { PrintStockStickers } from '@colijnit/sharedapi/build/model/print-stock-stickers';
38
41
  import { ArticleExtended } from '@colijnit/articleapi/build/model/article-extended.bo';
39
42
  import { ArticleStock as ArticleStock$1 } from '@colijnit/articleapi/build/model/article-stock';
@@ -72,7 +75,6 @@ import { ActivityListViewModel } from '@colijnit/mainapi/build/model/activity-li
72
75
  import { ActivityViewModel } from '@colijnit/mainapi/build/model/activity-view-model';
73
76
  import { PersonalActivityTabEnum } from '@colijnit/mainapi/build/enum/personal-activity-tab.enum';
74
77
  import { ActivitySortType } from '@colijnit/mainapi/build/enum/activity-sort-type.enum';
75
- import { Task } from '@colijnit/mainapi/build/model/task.bo';
76
78
  import { TableName as TableName$1 } from '@colijnit/mainapi/build/enum/table-name.enum';
77
79
  import { TagCategory } from '@colijnit/mainapi/build/enum/tab-category.enum';
78
80
  import { ValidationResult } from '@colijnit/ioneconnector/build/model/validation-result';
@@ -80,10 +82,10 @@ import { DomainName } from '@colijnit/mainapi/build/enum/domain-name.enum';
80
82
  import { PriorityType } from '@colijnit/mainapi/build/enum/priority-type.enum';
81
83
  import { RelationRequest } from '@colijnit/relationapi/build/model/relation-request';
82
84
  import { Period } from '@colijnit/mainapi/build/enum/period.enum';
83
- import { Remark } from '@colijnit/mainapi/build/model/remark.bo';
84
- import { Work } from '@colijnit/mainapi/build/model/work.bo';
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';
88
+ import { StringUtils as StringUtils$1 } from '@colijnit/ioneconnector/build/utils/string-utils';
87
89
 
88
90
  class DocsignComponent {
89
91
  constructor() {
@@ -824,6 +826,48 @@ class SharedConnectorService {
824
826
  });
825
827
  });
826
828
  }
829
+ insertWork(activity) {
830
+ return __awaiter(this, void 0, void 0, function* () {
831
+ return new Promise((resolve, reject) => {
832
+ return this.mainConnector.insertActivity(activity).then((result) => __awaiter(this, void 0, void 0, function* () {
833
+ if (result && result.validationResult && result.validationResult.success) {
834
+ resolve(this._boFactory.makeWithRawBackendData(Work, result.resultObject));
835
+ }
836
+ else {
837
+ reject(result.validationMessagesAsString);
838
+ }
839
+ }));
840
+ });
841
+ });
842
+ }
843
+ insertRemark(activity) {
844
+ return __awaiter(this, void 0, void 0, function* () {
845
+ return new Promise((resolve, reject) => {
846
+ return this.mainConnector.insertActivity(activity).then((result) => __awaiter(this, void 0, void 0, function* () {
847
+ if (result && result.validationResult && result.validationResult.success) {
848
+ resolve(this._boFactory.makeWithRawBackendData(Remark, result.resultObject));
849
+ }
850
+ else {
851
+ reject(result.validationMessagesAsString);
852
+ }
853
+ }));
854
+ });
855
+ });
856
+ }
857
+ insertTask(activity) {
858
+ return __awaiter(this, void 0, void 0, function* () {
859
+ return new Promise((resolve, reject) => {
860
+ return this.mainConnector.insertActivity(activity).then((result) => __awaiter(this, void 0, void 0, function* () {
861
+ if (result && result.validationResult && result.validationResult.success) {
862
+ resolve(this._boFactory.makeWithRawBackendData(Task, result.resultObject));
863
+ }
864
+ else {
865
+ reject(result.validationMessagesAsString);
866
+ }
867
+ }));
868
+ });
869
+ });
870
+ }
827
871
  updateActivity(activity) {
828
872
  return __awaiter(this, void 0, void 0, function* () {
829
873
  return new Promise((resolve, reject) => {
@@ -1534,9 +1578,11 @@ var Icon;
1534
1578
  Icon["DeleteLeftRegular"] = "delete_left_regular";
1535
1579
  Icon["DeliveryTruck"] = "delivery_truck";
1536
1580
  Icon["DetailView"] = "detail_view";
1581
+ Icon["DiagramProjectRegular"] = "diagram_project_regular";
1537
1582
  Icon["Dropzone"] = "dropzone";
1538
1583
  Icon["EditPenRegular"] = "edit_pen_regular";
1539
1584
  Icon["Email"] = "email";
1585
+ Icon["EmailRegular"] = "email_regular";
1540
1586
  Icon["Employee"] = "employee";
1541
1587
  Icon["EnvelopeRegular"] = "envelope_regular";
1542
1588
  Icon["EyeRegular"] = "eye_regular";
@@ -1595,9 +1641,11 @@ const IconSvg = {
1595
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>",
1596
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>",
1597
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>",
1598
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>",
1599
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>",
1600
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>",
1601
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>",
1602
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>",
1603
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>",
@@ -2640,6 +2688,21 @@ class SharedService {
2640
2688
  return yield this.connector.insertActivity(activity);
2641
2689
  });
2642
2690
  }
2691
+ insertWork(activity) {
2692
+ return __awaiter(this, void 0, void 0, function* () {
2693
+ return yield this.connector.insertWork(activity);
2694
+ });
2695
+ }
2696
+ insertRemark(activity) {
2697
+ return __awaiter(this, void 0, void 0, function* () {
2698
+ return yield this.connector.insertRemark(activity);
2699
+ });
2700
+ }
2701
+ insertTask(activity) {
2702
+ return __awaiter(this, void 0, void 0, function* () {
2703
+ return yield this.connector.insertTask(activity);
2704
+ });
2705
+ }
2643
2706
  updateActivity(activity) {
2644
2707
  return __awaiter(this, void 0, void 0, function* () {
2645
2708
  return yield this.connector.updateActivity(activity);
@@ -2707,19 +2770,21 @@ class SharedService {
2707
2770
  return yield this.connector.getReportTemplates(reportTemplatesRequest);
2708
2771
  });
2709
2772
  }
2710
- emailViaTemplate(template, emailTo, subject = "", message = "", attachments = [], parameters = {}) {
2773
+ emailViaTemplate(template, emailTo, emailBcc, reply, subject = "", message = "", attachments = [], parameters = {}) {
2711
2774
  return __awaiter(this, void 0, void 0, function* () {
2712
2775
  const subjectAddition = subject.trim();
2713
- const emailJob = this._createEmailJob(template, emailTo, subjectAddition, message, attachments, parameters);
2776
+ const emailJob = this._createEmailJob(template, emailTo, emailBcc, reply, subjectAddition, message, attachments, parameters);
2714
2777
  return this.connector.emailReport(emailJob);
2715
2778
  });
2716
2779
  }
2717
- _createEmailJob(report, emailTo, subject, message, attachments, parameters = {}) {
2780
+ _createEmailJob(report, emailTo, emailBcc, reply, subject, message, attachments, parameters = {}) {
2718
2781
  const emailJob = new EmailJob();
2719
2782
  emailJob.emailTo = emailTo;
2783
+ emailJob.emailBcc = emailBcc;
2784
+ emailJob.reply = reply;
2720
2785
  emailJob.subject = subject;
2721
2786
  emailJob.message = message;
2722
- emailJob.attachments = attachments;
2787
+ //emailJob.attachments = attachments;
2723
2788
  emailJob.reportId = report.reportId;
2724
2789
  emailJob.parameterValues = parameters;
2725
2790
  emailJob.locale = this.locale;
@@ -11392,13 +11457,23 @@ class ActivityListComponent {
11392
11457
  this.RelationKind = RelationKind;
11393
11458
  this.ActivityType = ActivityType;
11394
11459
  this.TimeUtils = TimeUtils;
11395
- this.activities = [];
11396
11460
  this.remarkIcon = Icon.CommentRegular;
11397
11461
  this.workIcon = Icon.PersonDiggingRegular;
11462
+ this.statusIcon = Icon.DiagramProjectRegular;
11463
+ this.taskIcon = Icon.Task;
11398
11464
  }
11399
11465
  showClass() {
11400
11466
  return true;
11401
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
+ }
11402
11477
  ngOnInit() {
11403
11478
  return __awaiter(this, void 0, void 0, function* () {
11404
11479
  });
@@ -11422,13 +11497,15 @@ class ActivityListComponent {
11422
11497
  switch (activity.activityType) {
11423
11498
  case ActivityType.Remark:
11424
11499
  return this.remarkIcon;
11425
- case ActivityType.StateChange:
11426
11500
  case ActivityType.WorkflowStatus:
11427
11501
  case ActivityType.Work:
11428
- case ActivityType.Task:
11429
11502
  case ActivityType.WorkflowTask:
11430
11503
  case ActivityType.Form:
11431
11504
  return this.workIcon;
11505
+ case ActivityType.StateChange:
11506
+ return this.statusIcon;
11507
+ case ActivityType.Task:
11508
+ return this.taskIcon;
11432
11509
  }
11433
11510
  }
11434
11511
  showAttachments(activity) {
@@ -11472,7 +11549,8 @@ ActivityListComponent.decorators = [
11472
11549
  </div>
11473
11550
  <div class="activity-display-content" [class.customer-reply-content]="(getRelationKind(activity.author) === RelationKind.Customer)">
11474
11551
  <div class="activity-display-body">
11475
- <span>{{activity.subDescription}}</span>
11552
+ <span *ngIf="activity.activityType !== ActivityType.StateChange">{{activity.subDescription}}</span>
11553
+ <span *ngIf="activity.activityType === ActivityType.StateChange">{{activity.activityTitle}}</span>
11476
11554
  </div>
11477
11555
  <div class="activity-display-footer">
11478
11556
  <!--TODO discuss with Rob is we can gather the info needed to see which workflow triggers have previously been activated for this trigger-->
@@ -11506,7 +11584,9 @@ ActivityListComponent.propDecorators = {
11506
11584
  showClass: [{ type: HostBinding, args: ["class.co-activity-list",] }],
11507
11585
  activities: [{ type: Input }],
11508
11586
  remarkIcon: [{ type: Input }],
11509
- workIcon: [{ type: Input }]
11587
+ workIcon: [{ type: Input }],
11588
+ statusIcon: [{ type: Input }],
11589
+ taskIcon: [{ type: Input }]
11510
11590
  };
11511
11591
 
11512
11592
  class ActivityListModule {
@@ -12961,10 +13041,29 @@ class ComponentActivityOverviewComponent extends BaseActivityOverviewComponent {
12961
13041
  this.dictionaryService = dictionaryService;
12962
13042
  this.sharedService = sharedService;
12963
13043
  this.Icon = Icon;
13044
+ this.remarkIcon = Icon.CommentRegular;
13045
+ this.workIcon = Icon.PersonDiggingRegular;
13046
+ this.statusIcon = Icon.DiagramProjectRegular;
13047
+ this.taskIcon = Icon.Task;
12964
13048
  }
12965
13049
  showClass() {
12966
13050
  return true;
12967
13051
  }
13052
+ getActivityIcon(activity) {
13053
+ switch (activity.activityType) {
13054
+ case ActivityType.Remark:
13055
+ return this.remarkIcon;
13056
+ case ActivityType.WorkflowStatus:
13057
+ case ActivityType.Work:
13058
+ case ActivityType.WorkflowTask:
13059
+ case ActivityType.Form:
13060
+ return this.workIcon;
13061
+ case ActivityType.StateChange:
13062
+ return this.statusIcon;
13063
+ case ActivityType.Task:
13064
+ return this.taskIcon;
13065
+ }
13066
+ }
12968
13067
  }
12969
13068
  ComponentActivityOverviewComponent.decorators = [
12970
13069
  { type: Component, args: [{
@@ -12978,7 +13077,8 @@ ComponentActivityOverviewComponent.decorators = [
12978
13077
  </div>
12979
13078
  <div class="overview-wrapper-labels">
12980
13079
  <div class="activity-title" [textContent]="activityTitle"></div>
12981
- <div class="activity-context-title" [textContent]="activityContextTitle"></div>
13080
+ <!--seems unessecary for current usecases, but left in case this needs an input to switch on or off-->
13081
+ <!--<div class="activity-context-title" [textContent]="activityContextTitle"></div>-->
12982
13082
  </div>
12983
13083
  <div class="overview-wrapper-date">
12984
13084
  <div class="date-wrapper" [class.overdue]="overDue">
@@ -12987,6 +13087,7 @@ ComponentActivityOverviewComponent.decorators = [
12987
13087
  <div class="date-divider" [textContent]="'-'"></div>
12988
13088
  </ng-container>
12989
13089
  <div class="date" [textContent]="deadlineDate | date:'dd-MM-YYYY'"></div>
13090
+ <co-icon class="activity-type-icon"[iconData]="iconCacheService.getIcon(getActivityIcon(activity))"></co-icon>
12990
13091
  </div>
12991
13092
  </div>
12992
13093
  </div>
@@ -13071,6 +13172,10 @@ ComponentActivityOverviewComponent.ctorParameters = () => [
13071
13172
  { type: SharedService }
13072
13173
  ];
13073
13174
  ComponentActivityOverviewComponent.propDecorators = {
13175
+ remarkIcon: [{ type: Input }],
13176
+ workIcon: [{ type: Input }],
13177
+ statusIcon: [{ type: Input }],
13178
+ taskIcon: [{ type: Input }],
13074
13179
  showClass: [{ type: HostBinding, args: ["class.co-component-activity-overview",] }]
13075
13180
  };
13076
13181
 
@@ -14876,18 +14981,26 @@ WorkflowInfoTilesModule.decorators = [
14876
14981
  ];
14877
14982
 
14878
14983
  class TaskCreatorComponent {
14879
- constructor(iconService, sharedService) {
14984
+ constructor(iconService, dictionaryService, sharedService, _dialogService) {
14880
14985
  this.iconService = iconService;
14986
+ this.dictionaryService = dictionaryService;
14881
14987
  this.sharedService = sharedService;
14988
+ this._dialogService = _dialogService;
14882
14989
  this.icons = Icon;
14883
14990
  this.table = TableName$1.Transactions;
14884
14991
  this.activityCreated = new EventEmitter();
14992
+ this.optionCollection = [
14993
+ { icon: this.iconService.getIcon(this.icons.CommentRegular), label: this.dictionaryService.get('REMARK', true) },
14994
+ { icon: this.iconService.getIcon(this.icons.PersonDiggingRegular), label: this.dictionaryService.get('WORK', true) },
14995
+ { icon: this.iconService.getIcon(this.icons.Task), label: this.dictionaryService.get('TASK', true) },
14996
+ ];
14885
14997
  this.showFilesDialog = false;
14886
14998
  this.documents = [];
14887
14999
  this.showEmailDialog = false;
14888
- this.emailAddressesAvailable = [];
15000
+ this.senderAddress = '';
15001
+ this.emailAddresses = [];
15002
+ this.bccEmailAddresses = [];
14889
15003
  this.emailRequest = null;
14890
- this.optionCollection = [{ id: 'Opmerking' }, { id: 'Werkzaamheid' }, { id: 'Taak' }];
14891
15004
  this.remarkText = "";
14892
15005
  this.workDescription = "";
14893
15006
  this.taskName = "";
@@ -14898,59 +15011,64 @@ class TaskCreatorComponent {
14898
15011
  }
14899
15012
  ngOnInit() {
14900
15013
  return __awaiter(this, void 0, void 0, function* () {
14901
- this.chosenActivityType = this.optionCollection[1];
14902
- this.emailAddressesAvailable = yield this.sharedService.getRoleEmailAddressesByWorkflowCategoryAndKey('SERVICE_ORDER', this.RemarkAndWorkKey);
14903
- this.senderAddress = yield this.sharedService.getEmailSenderByWorkflowCategoryAndKey('SERVICE_ORDER', this.RemarkAndWorkKey);
15014
+ this.chosenActivityType = this.optionCollection[0];
15015
+ this.senderAddress = yield this.sharedService.getEmailSenderByWorkflowCategoryAndKey('SERVICE_ORDER', this.remarkAndWorkKey);
15016
+ });
15017
+ }
15018
+ itemSelected(item) {
15019
+ this.chosenActivityType = item;
15020
+ }
15021
+ addedDocument(docs) {
15022
+ return __awaiter(this, void 0, void 0, function* () {
15023
+ this.documents = this.documents.concat(docs);
15024
+ });
15025
+ }
15026
+ deletedDocument(doc) {
15027
+ return __awaiter(this, void 0, void 0, function* () {
15028
+ ArrayUtils.RemoveElement(doc, this.documents);
14904
15029
  });
14905
15030
  }
14906
15031
  createRemarkClicked() {
14907
15032
  return __awaiter(this, void 0, void 0, function* () {
14908
15033
  this.createForm.submit();
14909
15034
  if (this.createForm.isValid()) {
14910
- let remark = new Remark();
14911
- remark.author = this.author;
14912
- remark.author.image = undefined;
14913
- if (this.documents.length !== 0) {
14914
- remark.documents = this.documents;
14915
- }
14916
- remark.remark = this.remarkText;
14917
- remark.dateTime = new Date();
14918
- remark.table = this.table;
14919
- remark.key = this.RemarkAndWorkKey;
14920
- remark.read = false;
14921
- remark.current = true;
15035
+ let remark = this.createRemark();
14922
15036
  let activity = new Activity();
14923
15037
  activity.activityType = ActivityType.Remark;
14924
15038
  activity.remark = remark;
14925
- let remarkMade = yield this.sharedService.insertActivity(activity);
14926
- if (remarkMade) {
14927
- this.activityCreated.emit();
14928
- //await this.sendEmailIfNeccesary();
14929
- this.clearFields();
15039
+ this.createdRemark = yield this.sharedService.insertRemark(activity);
15040
+ if (this.createdRemark) {
15041
+ this.handleAfterCreation();
14930
15042
  }
14931
15043
  }
14932
15044
  });
14933
15045
  }
15046
+ emailDialogClosed() {
15047
+ if (this.emailAddresses.length >= 0) {
15048
+ this.emailRequest = new activityEmailRequestData;
15049
+ this.emailRequest.table = this.table;
15050
+ this.emailRequest.key = this.remarkAndWorkKey;
15051
+ this.emailRequest.senderAddress = this.senderAddress;
15052
+ this.emailRequest.sendAddresses = this.emailAddresses;
15053
+ this.emailRequest.ccAddresses = this.bccEmailAddresses;
15054
+ }
15055
+ else {
15056
+ this.emailRequest = null;
15057
+ }
15058
+ this.showEmailDialog = false;
15059
+ }
14934
15060
  createWorkClicked() {
14935
15061
  return __awaiter(this, void 0, void 0, function* () {
14936
15062
  this.createForm.submit();
14937
15063
  if (this.createForm.isValid()) {
14938
- let work = new Work();
14939
- work.executive = this.author;
14940
- work.executive.image = undefined;
14941
- work.documents = this.documents;
14942
- work.workedTime = 0;
14943
- work.workDescription = this.workDescription;
14944
- work.dateTime = new Date();
14945
- work.table = this.table;
14946
- work.key = this.RemarkAndWorkKey;
15064
+ let work = this.createWork();
14947
15065
  let activity = new Activity();
14948
15066
  activity.activityType = ActivityType.Work;
14949
15067
  activity.work = work;
14950
- let workMade = yield this.sharedService.insertActivity(activity);
14951
- if (workMade) {
15068
+ this.createdWork = yield this.sharedService.insertWork(activity);
15069
+ if (this.createdWork) {
14952
15070
  this.activityCreated.emit();
14953
- //await this.sendEmailIfNeccesary();
15071
+ yield this.sendEmailIfNeccesary();
14954
15072
  this.clearFields();
14955
15073
  }
14956
15074
  }
@@ -14960,73 +15078,80 @@ class TaskCreatorComponent {
14960
15078
  return __awaiter(this, void 0, void 0, function* () {
14961
15079
  this.createForm.submit();
14962
15080
  if (this.createForm.isValid()) {
14963
- let task = new Task();
14964
- task.executive = this.author;
14965
- task.executive.image = undefined;
14966
- task.documents = this.documents;
14967
- task.name = this.taskName;
14968
- task.description = this.taskDescription;
14969
- task.creationDateTime = new Date();
14970
- task.dateDefinate = false;
14971
- task.needsPlanning = true;
14972
- task.priority = 0;
14973
- task.workflowCategory = this.workflowCategoryType;
14974
- task.reference = this.TaskKey;
15081
+ const task = this.createTask();
14975
15082
  let activity = new Activity();
14976
15083
  activity.activityType = ActivityType.Task;
14977
15084
  activity.task = task;
14978
- let taskMade = yield this.sharedService.insertActivity(activity);
14979
- if (taskMade) {
15085
+ this.createdTask = yield this.sharedService.insertTask(activity);
15086
+ if (this.createdTask) {
14980
15087
  this.activityCreated.emit();
14981
- //await this.sendEmailIfNeccesary();
15088
+ yield this.sendEmailIfNeccesary();
14982
15089
  this.clearFields();
14983
15090
  }
14984
15091
  }
14985
15092
  });
14986
15093
  }
14987
- addedDocument(docs) {
14988
- return __awaiter(this, void 0, void 0, function* () {
14989
- this.documents = this.documents.concat(docs);
14990
- });
14991
- }
14992
- deletedDocument(doc) {
14993
- return __awaiter(this, void 0, void 0, function* () {
14994
- ArrayUtils.RemoveElement(doc, this.documents);
15094
+ createRemark() {
15095
+ let remark = new Remark();
15096
+ remark.author = this.author;
15097
+ remark.author.image = undefined;
15098
+ remark.documents = this.documents;
15099
+ remark.remark = this.remarkText;
15100
+ remark.dateTime = new Date();
15101
+ remark.table = this.table;
15102
+ remark.key = this.remarkAndWorkKey;
15103
+ remark.read = false;
15104
+ remark.current = true;
15105
+ return remark;
15106
+ }
15107
+ createWork() {
15108
+ let work = new Work();
15109
+ work.executive = this.author;
15110
+ work.executive.image = undefined;
15111
+ work.documents = this.documents;
15112
+ work.workedTime = 0;
15113
+ work.workDescription = this.workDescription;
15114
+ work.dateTime = new Date();
15115
+ work.table = this.table;
15116
+ work.key = this.remarkAndWorkKey;
15117
+ return work;
15118
+ }
15119
+ createTask() {
15120
+ let task = new Task();
15121
+ task.executive = this.author;
15122
+ task.executive.image = undefined;
15123
+ task.reporter = this.author;
15124
+ task.reporter.image = undefined;
15125
+ task.documents = this.documents;
15126
+ task.name = this.taskName;
15127
+ task.description = this.taskDescription;
15128
+ task.creationDateTime = new Date();
15129
+ task.dateDefinate = false;
15130
+ task.needsPlanning = true;
15131
+ task.priority = 0;
15132
+ task.workflowCategory = this.workflowCategoryType;
15133
+ task.reference = this.taskKey;
15134
+ task.emailAddresses = this.emailAddresses;
15135
+ return task;
15136
+ }
15137
+ handleAfterCreation() {
15138
+ return __awaiter(this, void 0, void 0, function* () {
15139
+ this.activityCreated.emit();
15140
+ yield this.sendEmailIfNeccesary();
15141
+ this.clearFields();
14995
15142
  });
14996
15143
  }
14997
- emailDialogClosed() {
14998
- if (this.emailAddresses.length >= 0) {
14999
- this.emailRequest = new activityEmailRequestData;
15000
- this.emailRequest.table = this.table;
15001
- this.emailRequest.key = this.RemarkAndWorkKey;
15002
- this.emailRequest.senderAddress = this.senderAddress;
15003
- this.emailRequest.sendAddresses = this.createAddressList(this.emailAddresses);
15004
- this.emailRequest.ccAddresses = this.createAddressList(this.ccEmailAddresses);
15005
- }
15006
- else {
15007
- this.emailRequest = null;
15008
- }
15009
- this.showEmailDialog = false;
15010
- }
15011
- createAddressList(addresses) {
15012
- let addressStrings = [];
15013
- if (addresses && addresses.length !== 0) {
15014
- addresses.forEach(r => {
15015
- r.emailAddresses.forEach(e => {
15016
- addressStrings.push(e);
15017
- });
15018
- });
15019
- }
15020
- return addressStrings;
15021
- }
15022
15144
  sendEmailIfNeccesary() {
15023
15145
  return __awaiter(this, void 0, void 0, function* () {
15024
- if (this.emailRequest) {
15146
+ if (this.emailAddresses.length > 0) {
15025
15147
  let templates = yield this.sharedService.getDefaultEmailReportTemplatesForBranch(this.branchNo, this.findReportType());
15026
15148
  if (templates.length != 0) {
15027
15149
  let template = this.findDefault(templates);
15028
15150
  if (template) {
15029
- this.startEmailing(template);
15151
+ yield this.startEmailing(template);
15152
+ }
15153
+ else {
15154
+ this._dialogService.showError('NO_DEFAULT_EMAIL_TEMPLATE_FOR_REPORT');
15030
15155
  }
15031
15156
  }
15032
15157
  }
@@ -15043,13 +15168,6 @@ class TaskCreatorComponent {
15043
15168
  return ReportType.TaskMessage;
15044
15169
  }
15045
15170
  }
15046
- startEmailing(template) {
15047
- return __awaiter(this, void 0, void 0, function* () {
15048
- this.emailRequest.sendAddresses.forEach(a => {
15049
- this.sharedService.emailViaTemplate(template, a, 'emailtiteeeel', "", [], {});
15050
- });
15051
- });
15052
- }
15053
15171
  findDefault(reportList) {
15054
15172
  let defaultTemplate = null;
15055
15173
  reportList.forEach(r => {
@@ -15059,6 +15177,75 @@ class TaskCreatorComponent {
15059
15177
  });
15060
15178
  return defaultTemplate;
15061
15179
  }
15180
+ startEmailing(template) {
15181
+ return __awaiter(this, void 0, void 0, function* () {
15182
+ const emailsSent = yield this.sharedService.emailViaTemplate(template, this.createEmailAddressString(this.emailAddresses), this.createEmailAddressString(this.bccEmailAddresses), this.senderAddress, this.createEmailSubject(), "", null /*this.createAttachmentsStringArray()*/, this.createEmailParams());
15183
+ if (emailsSent) {
15184
+ //registerSentEmails
15185
+ }
15186
+ });
15187
+ }
15188
+ registerSentEmails() {
15189
+ return __awaiter(this, void 0, void 0, function* () {
15190
+ let history = new ActivityEmailHistory();
15191
+ history.emailAddresses = this.createEmailAddressString(this.emailAddresses) + ';' + this.createEmailAddressString(this.bccEmailAddresses);
15192
+ //history.attachments = this.createAttachmentsStringArray();
15193
+ history.message = '';
15194
+ history.emailDateTime = new Date();
15195
+ });
15196
+ }
15197
+ createEmailAddressString(addresses) {
15198
+ if (addresses.length === 0) {
15199
+ return '';
15200
+ }
15201
+ else {
15202
+ return addresses.join(';');
15203
+ }
15204
+ }
15205
+ createEmailSubject() {
15206
+ let subject = "- ";
15207
+ if (this.createdRemark) {
15208
+ subject += this.dictionaryService.get("REMARK") + " " + this.createdRemark.remarkId;
15209
+ }
15210
+ else if (this.createdWork) {
15211
+ subject += this.dictionaryService.get("WORK") + " " + this.createdWork.workId;
15212
+ }
15213
+ else if (this.createdTask) {
15214
+ subject += (this.createdTask.workflowCategory ? this.createdTask.workflowCategory : this.dictionaryService.get("TASK")) + " " +
15215
+ (this.createdTask.workflowCategory ? this.createdTask.reference : this.createdTask.taskId);
15216
+ }
15217
+ return subject;
15218
+ }
15219
+ createAttachmentsArray() {
15220
+ let attachments = [];
15221
+ if (this.documents.length === 0) {
15222
+ return;
15223
+ }
15224
+ else {
15225
+ this.documents.forEach(d => {
15226
+ /*let attachment: CoEmailAttachment = new CoEmailAttachment();
15227
+ attachment.filename = d.fileName;
15228
+ if (d.fileName.split(".").length > 1) {
15229
+ const str: string[] = d.fileName.split(".");
15230
+ attachment.extension = str[str.length - 1];
15231
+ }
15232
+ const textEncoder = new TextEncoder();
15233
+ attachment.body = textEncoder.encode("Your string here");*/
15234
+ });
15235
+ return attachments;
15236
+ }
15237
+ }
15238
+ createEmailParams() {
15239
+ if (this.createdRemark) {
15240
+ return { opmerking_id: this.createdRemark.remarkId + "" };
15241
+ }
15242
+ else if (this.createdWork) {
15243
+ return { werkzh_id: this.createdWork.workId + "" };
15244
+ }
15245
+ else if (this.createdTask) {
15246
+ return { taak_id: this.createdTask.taskId + "" };
15247
+ }
15248
+ }
15062
15249
  clearFields() {
15063
15250
  this.remarkText = "";
15064
15251
  this.workDescription = "";
@@ -15066,36 +15253,36 @@ class TaskCreatorComponent {
15066
15253
  this.taskDescription = "";
15067
15254
  this.senderAddress = "";
15068
15255
  this.emailAddresses = [];
15069
- this.ccEmailAddresses = [];
15256
+ this.bccEmailAddresses = [];
15070
15257
  this.emailRequest = null;
15258
+ this.createdWork = undefined;
15259
+ this.createdRemark = undefined;
15260
+ this.createdTask = undefined;
15071
15261
  }
15072
15262
  }
15073
15263
  TaskCreatorComponent.decorators = [
15074
15264
  { type: Component, args: [{
15075
15265
  selector: "co-task-creator",
15076
15266
  template: `
15077
- <div class="input-fields">
15078
- <co-form #createForm>
15079
- <co-list-of-values [collection]="optionCollection" [(model)]="chosenActivityType"
15080
- [displayField]="'id'"></co-list-of-values>
15081
- <co-input-text *ngIf="chosenActivityType === optionCollection[0]" [required]="chosenActivityType === optionCollection[0]"
15082
- [placeholder]="'REMARK' | localize" [(model)]="remarkText"
15267
+ <co-form #createForm class="input-fields">
15268
+ <co-list-of-icons [collection]="optionCollection" (itemSelected)="itemSelected($event)"></co-list-of-icons>
15269
+ <co-input-text *ngIf="chosenActivityType === optionCollection[0]" [required]="chosenActivityType === optionCollection[0]"
15270
+ [placeholder]="'REMARK' | localize" [(model)]="remarkText"
15271
+ [rightIconData]="iconService.getIcon(icons.PaperPlaneTopSolid)"
15272
+ (rightIconClick)="createRemarkClicked()"></co-input-text>
15273
+ <co-input-text *ngIf="chosenActivityType === optionCollection[1]" [required]="chosenActivityType === optionCollection[1]"
15274
+ [placeholder]="'DESCRIPTION' | localize" [(model)]="workDescription"
15275
+ [rightIconData]="iconService.getIcon(icons.PaperPlaneTopSolid)"
15276
+ (rightIconClick)="createWorkClicked()"></co-input-text>
15277
+ <div class="task-input-fields" *ngIf="chosenActivityType === optionCollection[2]">
15278
+ <co-input-text [(model)]="taskName" [placeholder]="'NAME' | localize" [required]="chosenActivityType === optionCollection[2]"
15083
15279
  [rightIconData]="iconService.getIcon(icons.PaperPlaneTopSolid)"
15084
- (rightIconClick)="createRemarkClicked()"></co-input-text>
15085
- <co-input-text *ngIf="chosenActivityType === optionCollection[1]" [required]="chosenActivityType === optionCollection[1]"
15086
- [placeholder]="'DESCRIPTION' | localize" [(model)]="workDescription"
15087
- [rightIconData]="iconService.getIcon(icons.PaperPlaneTopSolid)"
15088
- (rightIconClick)="createWorkClicked()"></co-input-text>
15089
- <div class="task-input-fields" *ngIf="chosenActivityType === optionCollection[2]">
15090
- <co-input-text [(model)]="taskName" [placeholder]="'NAME' | localize" [required]="chosenActivityType === optionCollection[2]"
15091
- [rightIconData]="iconService.getIcon(icons.PaperPlaneTopSolid)"
15092
- (rightIconClick)="createTaskClicked()"></co-input-text>
15093
- <co-input-text [(model)]="taskDescription" [placeholder]="'DESCRIPTION' | localize" [required]="chosenActivityType === optionCollection[2]"></co-input-text>
15094
- </div>
15095
- </co-form>
15096
- </div>
15280
+ (rightIconClick)="createTaskClicked()"></co-input-text>
15281
+ <co-input-text [(model)]="taskDescription" [placeholder]="'DESCRIPTION' | localize" [required]="chosenActivityType === optionCollection[2]"></co-input-text>
15282
+ </div>
15283
+ </co-form>
15097
15284
  <div class="extras-buttons">
15098
- <co-button [iconData]="iconService.getIcon(icons.Email)" (click)="showEmailDialog = true"></co-button>
15285
+ <co-button [iconData]="iconService.getIcon(icons.EmailRegular)" (click)="showEmailDialog = true"></co-button>
15099
15286
  <co-button [iconData]="iconService.getIcon(icons.PaperclipRegular)" (click)="showFilesDialog = true"
15100
15287
  [label]="documents.length === 0 ? '' : documents.length.toString()" ></co-button>
15101
15288
  </div>
@@ -15105,15 +15292,9 @@ TaskCreatorComponent.decorators = [
15105
15292
  [documents]="documents" [useWithoutSettingProps]="true"></co-files-upload>
15106
15293
  </co-dialog>
15107
15294
  <co-dialog *ngIf="showEmailDialog" (closeClick)="emailDialogClosed()">
15108
- <co-list-of-values [multiselect]="true" [label]="'RECIPIENTS' | localize"
15109
- [collection]="emailAddressesAvailable" [displayField]="'role'"
15110
- [(model)]="emailAddresses">
15111
- </co-list-of-values>
15112
- <co-list-of-values [multiselect]="true" [label]="'BCC' | localize"
15113
- [collection]="emailAddressesAvailable" [displayField]="'role'"
15114
- [(model)]="ccEmailAddresses">
15115
- </co-list-of-values>
15116
- <co-input-text [readonly]="false" [label]="'SENDER' | localize" [model]="senderAddress"></co-input-text>
15295
+ <co-role-email-selector [(model)]="emailAddresses" [key]="remarkAndWorkKey" [workflowCategoryType]="workflowCategoryType"></co-role-email-selector>
15296
+ <co-role-email-selector [(model)]="bccEmailAddresses" [key]="remarkAndWorkKey" [workflowCategoryType]="workflowCategoryType"></co-role-email-selector>
15297
+ <co-input-text [readonly]="false" [label]="'SENDER' | localize" [(model)]="senderAddress"></co-input-text>
15117
15298
  </co-dialog>
15118
15299
 
15119
15300
  `
@@ -15121,20 +15302,151 @@ TaskCreatorComponent.decorators = [
15121
15302
  ];
15122
15303
  TaskCreatorComponent.ctorParameters = () => [
15123
15304
  { type: IconCacheService },
15124
- { type: SharedService }
15305
+ { type: DictionaryService },
15306
+ { type: SharedService },
15307
+ { type: CoreDialogService }
15125
15308
  ];
15126
15309
  TaskCreatorComponent.propDecorators = {
15127
15310
  createForm: [{ type: ViewChild, args: [FormComponent,] }],
15128
15311
  author: [{ type: Input }],
15129
15312
  branchNo: [{ type: Input }],
15130
15313
  table: [{ type: Input }],
15131
- RemarkAndWorkKey: [{ type: Input }],
15132
- TaskKey: [{ type: Input }],
15314
+ remarkAndWorkKey: [{ type: Input }],
15315
+ taskKey: [{ type: Input }],
15133
15316
  workflowCategoryType: [{ type: Input }],
15134
15317
  activityCreated: [{ type: Output }],
15135
15318
  showClass: [{ type: HostBinding, args: ["class.co-task-creator",] }]
15136
15319
  };
15137
15320
 
15321
+ class RoleEmailSelectorComponent {
15322
+ constructor(iconService, sharedService) {
15323
+ this.iconService = iconService;
15324
+ this.sharedService = sharedService;
15325
+ this.icons = Icon;
15326
+ this.modelChange = new EventEmitter();
15327
+ this.emailAddressesAvailable = [];
15328
+ this._model = [];
15329
+ }
15330
+ set model(value) {
15331
+ this._model = value;
15332
+ }
15333
+ get model() {
15334
+ return this._model;
15335
+ }
15336
+ set key(value) {
15337
+ this._key = value;
15338
+ this.fetchRoleEmailAddresses();
15339
+ }
15340
+ ;
15341
+ get key() {
15342
+ return this._key;
15343
+ }
15344
+ ;
15345
+ set workflowCategoryType(value) {
15346
+ this._workflowCategoryType = value;
15347
+ this.fetchRoleEmailAddresses();
15348
+ }
15349
+ ;
15350
+ get workflowCategoryType() {
15351
+ return this._workflowCategoryType;
15352
+ }
15353
+ ;
15354
+ showClass() {
15355
+ return true;
15356
+ }
15357
+ ngOnInit() {
15358
+ return __awaiter(this, void 0, void 0, function* () {
15359
+ this.fetchRoleEmailAddresses();
15360
+ });
15361
+ }
15362
+ fetchRoleEmailAddresses() {
15363
+ return __awaiter(this, void 0, void 0, function* () {
15364
+ if (this.workflowCategoryType !== undefined && this.key !== undefined) {
15365
+ this.emailAddressesAvailable = yield this.sharedService.getRoleEmailAddressesByWorkflowCategoryAndKey(this._workflowCategoryType, this._key);
15366
+ }
15367
+ });
15368
+ }
15369
+ roleChosen(role) {
15370
+ if (!role) {
15371
+ return;
15372
+ }
15373
+ const len = role.emailAddresses.length;
15374
+ for (let i = 0; i < len; i++) {
15375
+ if (this.model.indexOf(role.emailAddresses[i]) === -1 && StringUtils$1.IsValidEmail(role.emailAddresses[i])) {
15376
+ this.model.push(role.emailAddresses[i]);
15377
+ this.modelChange.emit(this.model);
15378
+ }
15379
+ }
15380
+ }
15381
+ addEmail(email) {
15382
+ if (this.model.indexOf(email) === -1 && StringUtils$1.IsValidEmail(email)) {
15383
+ this.model.push(email);
15384
+ this.modelChange.emit(this.model);
15385
+ }
15386
+ }
15387
+ removeOptionFromModel(email) {
15388
+ if (this.model.indexOf(email) > -1) {
15389
+ this.model.splice(email.indexOf(email), 1);
15390
+ }
15391
+ }
15392
+ }
15393
+ RoleEmailSelectorComponent.decorators = [
15394
+ { type: Component, args: [{
15395
+ selector: "co-role-email-selector",
15396
+ template: `
15397
+ <co-list-of-values [multiselect]="false" [label]="'RECIPIENTS' | localize"
15398
+ [collection]="emailAddressesAvailable" [displayField]="'role'"
15399
+ (modelChange)="roleChosen($event)">
15400
+ </co-list-of-values>
15401
+ <co-input-text #inp [placeholder]="'EXTRA_EMAIL_ADDRESSES' | localize"
15402
+ [rightIconData]="iconService.getIcon(icons.PaperPlaneTopSolid)"
15403
+ (rightIconClick)="addEmail(inp.model)"></co-input-text>
15404
+
15405
+ <div class="chips-wrapper">
15406
+ <div class="chips" *ngFor="let email of model">
15407
+ <span class="chips-description" [textContent]="email"></span>
15408
+ <co-icon class="remove-chip-icon" [iconData]="iconService.getIcon(icons.CrossSkinny)" (click)="removeOptionFromModel(email)"></co-icon>
15409
+ </div>
15410
+ </div>
15411
+
15412
+ `
15413
+ },] }
15414
+ ];
15415
+ RoleEmailSelectorComponent.ctorParameters = () => [
15416
+ { type: IconCacheService },
15417
+ { type: SharedService }
15418
+ ];
15419
+ RoleEmailSelectorComponent.propDecorators = {
15420
+ model: [{ type: Input }],
15421
+ key: [{ type: Input }],
15422
+ workflowCategoryType: [{ type: Input }],
15423
+ modelChange: [{ type: Output }],
15424
+ showClass: [{ type: HostBinding, args: ["class.co-role-email-selector",] }]
15425
+ };
15426
+
15427
+ class RoleEmailSelectorModule {
15428
+ }
15429
+ RoleEmailSelectorModule.decorators = [
15430
+ { type: NgModule, args: [{
15431
+ imports: [
15432
+ ListOfValuesModule,
15433
+ InputTextModule,
15434
+ LocalizationModule,
15435
+ IconModule,
15436
+ CommonModule,
15437
+ ],
15438
+ declarations: [
15439
+ RoleEmailSelectorComponent
15440
+ ],
15441
+ exports: [
15442
+ RoleEmailSelectorComponent
15443
+ ],
15444
+ providers: [
15445
+ BusinessObjectFactory
15446
+ ]
15447
+ },] }
15448
+ ];
15449
+
15138
15450
  class TaskCreatorModule {
15139
15451
  }
15140
15452
  TaskCreatorModule.decorators = [
@@ -15148,7 +15460,9 @@ TaskCreatorModule.decorators = [
15148
15460
  FilesUploadModule,
15149
15461
  LocalizationModule,
15150
15462
  ListOfIconsModule,
15151
- FormModule
15463
+ FormModule,
15464
+ IconModule,
15465
+ RoleEmailSelectorModule
15152
15466
  ],
15153
15467
  declarations: [
15154
15468
  TaskCreatorComponent
@@ -15170,5 +15484,5 @@ TaskCreatorModule.decorators = [
15170
15484
  * Generated bundle index. Do not edit.
15171
15485
  */
15172
15486
 
15173
- export { ActivityListComponent, ActivityListModule, AgendaEvent, AgendaEventPerDay, CalendarView, CoLinearGaugeComponent, CoLinearGaugeModule, ComponentActivityListComponent, ComponentActivityListModule, DatePlanningComponent, DatePlanningModule, DocsignComponent, DocsignModule, FilesUploadComponent, FilesUploadModule, KeyPadComponent, KeyPadModule, LayoutSwitcherComponent, LayoutSwitcherModule, SendMethodDialogComponent, SendMethodDialogModule, SharedService, SimpleTagsComponent, SimpleTagsFormComponent, SimpleTagsFormModule, SimpleTagsModule, StatusbarComponent, StatusbarModule, StockComponent, StockModule, TaskCreatorComponent, TaskCreatorModule, Translation, WorkflowInfoTilesComponent, WorkflowInfoTilesModule, sendMethodsWithIcon, SignatureComponent as ɵa, SignaturesComponent as ɵb, StockStatusbarComponent as ɵba, LocalizationModule as ɵbb, LocalizePipe as ɵbc, StockInformationComponent as ɵbd, StockInformationGridComponent as ɵbe, StockTransferComponent as ɵbf, StockChangeAmountComponent as ɵbg, StockTabComponent as ɵbh, OrderTabComponent as ɵbi, StockTabsComponent as ɵbj, StockHistoryTabsComponent as ɵbk, OrderStockTabComponent as ɵbl, StockLocationComponent as ɵbm, StockHistoryComponent as ɵbn, OrderSupplyStockHistoryComponent as ɵbo, OrderCommissionStockHistoryComponent as ɵbp, OrderStockHistoryComponent as ɵbq, AllocationStockHistoryComponent as ɵbr, StockPrognoseComponent as ɵbs, StockLocationPopupComponent as ɵbt, SendMethod as ɵbu, Icon as ɵbv, CalendarAllYearsComponent as ɵbw, CalendarAllMonthsComponent as ɵbx, CalendarHeaderComponent as ɵby, CalendarComponent as ɵbz, StockService as ɵc, CalendarViewComponent as ɵca, AgendaHeaderComponent as ɵcb, AgendaViewComponent as ɵcc, AgendaMonthViewComponent as ɵcd, AgendaBaseViewComponent as ɵce, AgendaDayViewComponent as ɵcf, AgendaWeekViewComponent as ɵcg, AgendaWeekSelectViewComponent as ɵch, AgendaHourViewComponent as ɵci, AgendaHourCellComponent as ɵcj, AgendaHourViewLabelsComponent as ɵck, AgendaHalfHourCellComponent as ɵcl, AgendaEventsComponent as ɵcm, AgendaEventComponent as ɵcn, ViewSelectComponent as ɵco, AgendaSelectEventComponent as ɵcp, MASTER_PIPES as ɵcq, ArrayNumberPipe as ɵcr, UCfirstPipe as ɵcs, FileTypeImagePipe as ɵct, BaseFileUploadComponent as ɵcu, InputBoolean as ɵcv, ImageDisplayModule as ɵcw, ImageDisplayComponent as ɵcx, FileUploadModule as ɵcy, TileRenderModule as ɵcz, SharedConnectorService as ɵd, TileRenderComponent as ɵda, FileUploadComponent as ɵdb, FileUploadPopupModule as ɵdc, MultiplePropertyTogglerModule as ɵdd, MultiplePropertyTogglerComponent as ɵde, FileUploadPopupComponent as ɵdf, AppFileDropzoneModule as ɵdg, AppFileDropzoneComponent as ɵdh, DragDropContainerComponent as ɵdi, DragDropService as ɵdj, BaseActivityListComponent as ɵdk, PersonalActivityOverviewComponent as ɵdl, BaseActivityOverviewComponent as ɵdm, TaskModifierComponent as ɵdn, ModifyTaskFormComponent as ɵdo, PersonalActivityOverviewModule as ɵdp, ComponentActivityOverviewModule as ɵdq, TaskModifyerModule as ɵdr, ModifyTaskFormModule as ɵds, TaskDetailsModule as ɵdt, TaskDetailsComponent as ɵdu, BaseActivitySummaryComponent as ɵdv, ExecutiveSummaryBlockModule as ɵdw, ActivitySummaryBlockModule as ɵdx, ActivitySummaryBlockComponent as ɵdy, ExecutiveSummaryBlockComponent as ɵdz, OptionsService as ɵe, StatusSummaryBlockModule as ɵea, StatusSummaryBlockComponent as ɵeb, CreationSummaryBlockModule as ɵec, CreationSummaryBlockComponent as ɵed, NotificationSummaryBlockModule as ɵee, NotificationSummaryBlockComponent as ɵef, ComponentActivityOverviewComponent as ɵeg, ActivityListHeaderModule as ɵeh, WorkflowNotificationToggleModule as ɵei, DirectivesModule as ɵej, AbsoluteOverlayTemplateDirective as ɵek, AppAbsoluteOverlayOutletService as ɵel, AlignWithDirective as ɵem, ClickOutsideDirective as ɵen, WorkflowNotificationToggleComponent as ɵeo, WorkflowNotificationTogglePopupComponent as ɵep, PeriodFilterModule as ɵeq, PeriodFilterComponent as ɵer, PeriodFilterPopupComponent as ɵes, ActivityListHeaderComponent as ɵet, WorkflowInfoTileModule as ɵeu, WorkflowInfoTileComponent as ɵev, DictionaryService as ɵf, LocalizeService as ɵg, IconCacheService as ɵh, LanguageCode as ɵi, SendMethodService as ɵj, SendMethodEmailModule as ɵk, LayoutSelectionModule as ɵl, LayoutSelectionComponent as ɵm, SignatureButtonModule as ɵn, SignatureButtonComponent as ɵo, SendMethodEmailComponent as ɵp, SendMethodPrinterModule as ɵq, PrinterSelectionModule as ɵr, PrinterSelectionComponent as ɵs, SendMethodPrinterComponent as ɵt, SendMethodPdfModule as ɵu, SendMethodPdfComponent as ɵv, TabBarModule as ɵw, TabBarComponent as ɵx, StatusbarPopupComponent as ɵy, StockStatusbarModule as ɵz };
15487
+ export { ActivityListComponent, ActivityListModule, AgendaEvent, AgendaEventPerDay, CalendarView, CoLinearGaugeComponent, CoLinearGaugeModule, ComponentActivityListComponent, ComponentActivityListModule, DatePlanningComponent, DatePlanningModule, DocsignComponent, DocsignModule, FilesUploadComponent, FilesUploadModule, KeyPadComponent, KeyPadModule, LayoutSwitcherComponent, LayoutSwitcherModule, RoleEmailSelectorComponent, RoleEmailSelectorModule, SendMethodDialogComponent, SendMethodDialogModule, SharedService, SimpleTagsComponent, SimpleTagsFormComponent, SimpleTagsFormModule, SimpleTagsModule, StatusbarComponent, StatusbarModule, StockComponent, StockModule, TaskCreatorComponent, TaskCreatorModule, Translation, WorkflowInfoTilesComponent, WorkflowInfoTilesModule, sendMethodsWithIcon, SignatureComponent as ɵa, SignaturesComponent as ɵb, StockStatusbarComponent as ɵba, LocalizationModule as ɵbb, LocalizePipe as ɵbc, StockInformationComponent as ɵbd, StockInformationGridComponent as ɵbe, StockTransferComponent as ɵbf, StockChangeAmountComponent as ɵbg, StockTabComponent as ɵbh, OrderTabComponent as ɵbi, StockTabsComponent as ɵbj, StockHistoryTabsComponent as ɵbk, OrderStockTabComponent as ɵbl, StockLocationComponent as ɵbm, StockHistoryComponent as ɵbn, OrderSupplyStockHistoryComponent as ɵbo, OrderCommissionStockHistoryComponent as ɵbp, OrderStockHistoryComponent as ɵbq, AllocationStockHistoryComponent as ɵbr, StockPrognoseComponent as ɵbs, StockLocationPopupComponent as ɵbt, SendMethod as ɵbu, Icon as ɵbv, CalendarAllYearsComponent as ɵbw, CalendarAllMonthsComponent as ɵbx, CalendarHeaderComponent as ɵby, CalendarComponent as ɵbz, StockService as ɵc, CalendarViewComponent as ɵca, AgendaHeaderComponent as ɵcb, AgendaViewComponent as ɵcc, AgendaMonthViewComponent as ɵcd, AgendaBaseViewComponent as ɵce, AgendaDayViewComponent as ɵcf, AgendaWeekViewComponent as ɵcg, AgendaWeekSelectViewComponent as ɵch, AgendaHourViewComponent as ɵci, AgendaHourCellComponent as ɵcj, AgendaHourViewLabelsComponent as ɵck, AgendaHalfHourCellComponent as ɵcl, AgendaEventsComponent as ɵcm, AgendaEventComponent as ɵcn, ViewSelectComponent as ɵco, AgendaSelectEventComponent as ɵcp, MASTER_PIPES as ɵcq, ArrayNumberPipe as ɵcr, UCfirstPipe as ɵcs, FileTypeImagePipe as ɵct, BaseFileUploadComponent as ɵcu, InputBoolean as ɵcv, ImageDisplayModule as ɵcw, ImageDisplayComponent as ɵcx, FileUploadModule as ɵcy, TileRenderModule as ɵcz, SharedConnectorService as ɵd, TileRenderComponent as ɵda, FileUploadComponent as ɵdb, FileUploadPopupModule as ɵdc, MultiplePropertyTogglerModule as ɵdd, MultiplePropertyTogglerComponent as ɵde, FileUploadPopupComponent as ɵdf, AppFileDropzoneModule as ɵdg, AppFileDropzoneComponent as ɵdh, DragDropContainerComponent as ɵdi, DragDropService as ɵdj, BaseActivityListComponent as ɵdk, PersonalActivityOverviewComponent as ɵdl, BaseActivityOverviewComponent as ɵdm, TaskModifierComponent as ɵdn, ModifyTaskFormComponent as ɵdo, PersonalActivityOverviewModule as ɵdp, ComponentActivityOverviewModule as ɵdq, TaskModifyerModule as ɵdr, ModifyTaskFormModule as ɵds, TaskDetailsModule as ɵdt, TaskDetailsComponent as ɵdu, BaseActivitySummaryComponent as ɵdv, ExecutiveSummaryBlockModule as ɵdw, ActivitySummaryBlockModule as ɵdx, ActivitySummaryBlockComponent as ɵdy, ExecutiveSummaryBlockComponent as ɵdz, OptionsService as ɵe, StatusSummaryBlockModule as ɵea, StatusSummaryBlockComponent as ɵeb, CreationSummaryBlockModule as ɵec, CreationSummaryBlockComponent as ɵed, NotificationSummaryBlockModule as ɵee, NotificationSummaryBlockComponent as ɵef, ComponentActivityOverviewComponent as ɵeg, ActivityListHeaderModule as ɵeh, WorkflowNotificationToggleModule as ɵei, DirectivesModule as ɵej, AbsoluteOverlayTemplateDirective as ɵek, AppAbsoluteOverlayOutletService as ɵel, AlignWithDirective as ɵem, ClickOutsideDirective as ɵen, WorkflowNotificationToggleComponent as ɵeo, WorkflowNotificationTogglePopupComponent as ɵep, PeriodFilterModule as ɵeq, PeriodFilterComponent as ɵer, PeriodFilterPopupComponent as ɵes, ActivityListHeaderComponent as ɵet, WorkflowInfoTileModule as ɵeu, WorkflowInfoTileComponent as ɵev, DictionaryService as ɵf, LocalizeService as ɵg, IconCacheService as ɵh, LanguageCode as ɵi, SendMethodService as ɵj, SendMethodEmailModule as ɵk, LayoutSelectionModule as ɵl, LayoutSelectionComponent as ɵm, SignatureButtonModule as ɵn, SignatureButtonComponent as ɵo, SendMethodEmailComponent as ɵp, SendMethodPrinterModule as ɵq, PrinterSelectionModule as ɵr, PrinterSelectionComponent as ɵs, SendMethodPrinterComponent as ɵt, SendMethodPdfModule as ɵu, SendMethodPdfComponent as ɵv, TabBarModule as ɵw, TabBarComponent as ɵx, StatusbarPopupComponent as ɵy, StockStatusbarModule as ɵz };
15174
15488
  //# sourceMappingURL=colijnit-sharedcomponents.js.map