@colijnit/sharedcomponents 255.1.1 → 255.1.2
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/3rdpartylicenses.txt +1408 -0
- package/bundles/colijnit-sharedcomponents.umd.js +363 -177
- package/bundles/colijnit-sharedcomponents.umd.js.map +1 -1
- package/colijnit-sharedcomponents.metadata.json +1 -1
- package/esm2015/lib/components/modify-task-form/components/notification-summary-block/notification-summary-block.component.js +39 -3
- package/esm2015/lib/components/modify-task-form/components/notification-summary-block/notification-summary-block.module.js +4 -2
- package/esm2015/lib/components/role-email-selector/role-email-selector.component.js +7 -3
- package/esm2015/lib/components/stock/components/stock-tab/stock-tab.component.js +13 -4
- package/esm2015/lib/components/stock/stock-tabs/stock-tabs.component.js +21 -14
- package/esm2015/lib/components/stock/stock.module.js +4 -3
- package/esm2015/lib/components/tab-bar/tab-bar.component.js +18 -8
- package/esm2015/lib/components/tab-bar/tab-bar.module.js +3 -2
- package/esm2015/lib/components/tab-bar/tab.interface.js +1 -1
- package/esm2015/lib/components/task-creator/task-creator.component.js +29 -5
- package/esm2015/lib/enum/shared-cfg-name.enum.js +19 -0
- package/esm2015/lib/service/shared-connector.service.js +43 -1
- package/esm2015/lib/service/shared.service.js +23 -4
- package/favicon.ico +0 -0
- package/fesm2015/colijnit-sharedcomponents.js +330 -165
- package/fesm2015/colijnit-sharedcomponents.js.map +1 -1
- package/index.html +12 -0
- package/lib/components/modify-task-form/components/notification-summary-block/notification-summary-block.component.d.ts +6 -1
- package/lib/components/role-email-selector/role-email-selector.component.d.ts +2 -0
- package/lib/components/stock/components/stock-tab/stock-tab.component.d.ts +2 -0
- package/lib/components/stock/stock-tabs/stock-tabs.component.d.ts +3 -1
- package/lib/components/tab-bar/tab.interface.d.ts +2 -0
- package/lib/enum/shared-cfg-name.enum.d.ts +14 -0
- package/lib/service/shared-connector.service.d.ts +4 -0
- package/lib/service/shared.service.d.ts +7 -1
- package/main.1563225a677bc57172bb.js +1 -0
- package/package.json +1 -1
- package/polyfills.907fe9d1887c5de17993.js +1 -0
- package/runtime.8aac21847ed3d3829cca.js +1 -0
- package/styles.2f5ba4f7c6fe9f5b1c3f.css +1 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __awaiter, __decorate } from 'tslib';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { EventEmitter, Component, ViewEncapsulation, ViewChild, ElementRef, Input, Output, HostBinding, NgModule, Injectable, ChangeDetectorRef, Inject, LOCALE_ID, ViewChildren, HostListener, Pipe, Renderer2, NgZone, Directive, ViewContainerRef, ComponentFactoryResolver,
|
|
3
|
+
import { EventEmitter, Component, ViewEncapsulation, ViewChild, ElementRef, Input, Output, HostBinding, NgModule, Injectable, ChangeDetectorRef, Inject, LOCALE_ID, forwardRef, ViewChildren, HostListener, Pipe, Renderer2, NgZone, Directive, ViewContainerRef, ComponentFactoryResolver, ContentChild } from '@angular/core';
|
|
4
4
|
import { trigger, state, style, transition, animate } from '@angular/animations';
|
|
5
5
|
import { PDFDocument } from 'pdf-lib';
|
|
6
6
|
import * as PDFJS from 'pdfjs-dist/legacy/build/pdf';
|
|
@@ -44,7 +44,7 @@ import { ArticleExtendedRequest } from '@colijnit/articleapi/build/model/article
|
|
|
44
44
|
import * as i1 from '@angular/platform-browser';
|
|
45
45
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
46
46
|
import { ArticleStockManagement } from '@colijnit/articleapi/build/model/article-stock-management';
|
|
47
|
-
import { IconModule, InputCheckboxModule, CoDialogModule, ButtonModule, ListOfValuesModule, OverlayService, ClickoutsideModule, OverlayModule, InputRadioButtonModule, SimpleGridModule, ImageModule, InputTextModule, InputNumberPickerModule, CoDialogWizardModule, InputTextareaModule, PopupModule, InputDatePickerModule, ResponsiveTextModule, InputSearchModule, PromptService, FormComponent,
|
|
47
|
+
import { IconModule, InputCheckboxModule, CoDialogModule, ButtonModule, SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME, BaseModuleScreenConfigService, ListOfValuesModule, ScreenConfigurationModule, OverlayService, ClickoutsideModule, OverlayModule, InputRadioButtonModule, SimpleGridModule, ImageModule, InputTextModule, InputNumberPickerModule, CoDialogWizardModule, InputTextareaModule, PopupModule, InputDatePickerModule, ResponsiveTextModule, InputSearchModule, PromptService, FormComponent, CoOrientation, CoreComponentsTranslationModule, TemplateWrapperModule, FormModule, FormMasterService, IconCacheService as IconCacheService$1, CoreDialogService, InputDateRangePickerModule, CollapsibleModule, ColorSequenceService, ListOfIconsModule } from '@colijnit/corecomponents_v12';
|
|
48
48
|
import { ArticleTransaction as ArticleTransaction$1 } from '@colijnit/articleapi/build/model/article-transaction';
|
|
49
49
|
import { PrintPriceStickers } from '@colijnit/sharedapi/build/model/print-price-stickers.bo';
|
|
50
50
|
import { SelectReportTemplatesRequest } from '@colijnit/mainapi/build/model/select-report-templates-request';
|
|
@@ -81,11 +81,12 @@ import { ValidationResult } from '@colijnit/ioneconnector/build/model/validation
|
|
|
81
81
|
import { DomainName } from '@colijnit/mainapi/build/enum/domain-name.enum';
|
|
82
82
|
import { PriorityType } from '@colijnit/mainapi/build/enum/priority-type.enum';
|
|
83
83
|
import { RelationRequest } from '@colijnit/relationapi/build/model/relation-request';
|
|
84
|
+
import { WorkflowCategoryType } from '@colijnit/mainapi/build/enum/workflow-category.enum';
|
|
85
|
+
import { ReportType } from '@colijnit/mainapi/build/enum/report-type.enum';
|
|
86
|
+
import { StringUtils as StringUtils$1 } from '@colijnit/ioneconnector/build/utils/string-utils';
|
|
84
87
|
import { Period } from '@colijnit/mainapi/build/enum/period.enum';
|
|
85
88
|
import { activityEmailRequestData } from '@colijnit/mainapi/build/model/activity-email-request-data';
|
|
86
|
-
import { ReportType } from '@colijnit/mainapi/build/enum/report-type.enum';
|
|
87
89
|
import { ActivityEmailHistory } from '@colijnit/mainapi/build/model/activity-email-history.bo';
|
|
88
|
-
import { StringUtils as StringUtils$1 } from '@colijnit/ioneconnector/build/utils/string-utils';
|
|
89
90
|
|
|
90
91
|
class DocsignComponent {
|
|
91
92
|
constructor() {
|
|
@@ -1351,6 +1352,48 @@ class SharedConnectorService {
|
|
|
1351
1352
|
});
|
|
1352
1353
|
});
|
|
1353
1354
|
}
|
|
1355
|
+
insertEmailHistoryForRemark(remarkId, history) {
|
|
1356
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1357
|
+
return new Promise((resolve, reject) => {
|
|
1358
|
+
return this.mainConnector.insertEmailHistoryForRemark(remarkId, history).then((result) => {
|
|
1359
|
+
if (result.validationResult && result.validationResult.success) {
|
|
1360
|
+
resolve(result.resultObject);
|
|
1361
|
+
}
|
|
1362
|
+
else {
|
|
1363
|
+
reject(result.validationMessagesAsString);
|
|
1364
|
+
}
|
|
1365
|
+
});
|
|
1366
|
+
});
|
|
1367
|
+
});
|
|
1368
|
+
}
|
|
1369
|
+
insertEmailHistoryForWork(workId, history) {
|
|
1370
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1371
|
+
return new Promise((resolve, reject) => {
|
|
1372
|
+
return this.mainConnector.insertEmailHistoryForWork(workId, history).then((result) => {
|
|
1373
|
+
if (result.validationResult && result.validationResult.success) {
|
|
1374
|
+
resolve(result.resultObject);
|
|
1375
|
+
}
|
|
1376
|
+
else {
|
|
1377
|
+
reject(result.validationMessagesAsString);
|
|
1378
|
+
}
|
|
1379
|
+
});
|
|
1380
|
+
});
|
|
1381
|
+
});
|
|
1382
|
+
}
|
|
1383
|
+
insertEmailHistoryForTask(taskId, history) {
|
|
1384
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1385
|
+
return new Promise((resolve, reject) => {
|
|
1386
|
+
return this.mainConnector.insertEmailHistoryForTask(taskId, history).then((result) => {
|
|
1387
|
+
if (result.validationResult && result.validationResult.success) {
|
|
1388
|
+
resolve(result.resultObject);
|
|
1389
|
+
}
|
|
1390
|
+
else {
|
|
1391
|
+
reject(result.validationMessagesAsString);
|
|
1392
|
+
}
|
|
1393
|
+
});
|
|
1394
|
+
});
|
|
1395
|
+
});
|
|
1396
|
+
}
|
|
1354
1397
|
getWorkflowProcessInfoPerStatus(worlflowCategory) {
|
|
1355
1398
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1356
1399
|
return new Promise((resolve, reject) => {
|
|
@@ -2622,10 +2665,11 @@ StockTransferComponent.propDecorators = {
|
|
|
2622
2665
|
};
|
|
2623
2666
|
|
|
2624
2667
|
class SharedService {
|
|
2625
|
-
constructor(locale, options, connector) {
|
|
2668
|
+
constructor(locale, options, connector, dictionary) {
|
|
2626
2669
|
this.locale = locale;
|
|
2627
2670
|
this.options = options;
|
|
2628
2671
|
this.connector = connector;
|
|
2672
|
+
this.dictionary = dictionary;
|
|
2629
2673
|
}
|
|
2630
2674
|
init(options) {
|
|
2631
2675
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -2790,6 +2834,21 @@ class SharedService {
|
|
|
2790
2834
|
emailJob.locale = this.locale;
|
|
2791
2835
|
return emailJob;
|
|
2792
2836
|
}
|
|
2837
|
+
insertEmailHistoryForRemark(remarkId, history) {
|
|
2838
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2839
|
+
return yield this.connector.insertEmailHistoryForRemark(remarkId, history);
|
|
2840
|
+
});
|
|
2841
|
+
}
|
|
2842
|
+
insertEmailHistoryForWork(remarkId, history) {
|
|
2843
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2844
|
+
return yield this.connector.insertEmailHistoryForRemark(remarkId, history);
|
|
2845
|
+
});
|
|
2846
|
+
}
|
|
2847
|
+
insertEmailHistoryForTask(remarkId, history) {
|
|
2848
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2849
|
+
return yield this.connector.insertEmailHistoryForRemark(remarkId, history);
|
|
2850
|
+
});
|
|
2851
|
+
}
|
|
2793
2852
|
getWorkflowProcessInfoPerStatus(workflowCategory) {
|
|
2794
2853
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2795
2854
|
return yield this.connector.getWorkflowProcessInfoPerStatus(workflowCategory);
|
|
@@ -2815,7 +2874,7 @@ class SharedService {
|
|
|
2815
2874
|
});
|
|
2816
2875
|
}
|
|
2817
2876
|
}
|
|
2818
|
-
SharedService.ɵprov = i0.ɵɵdefineInjectable({ factory: function SharedService_Factory() { return new SharedService(i0.ɵɵinject(i0.LOCALE_ID), i0.ɵɵinject(OptionsService), i0.ɵɵinject(SharedConnectorService)); }, token: SharedService, providedIn: "root" });
|
|
2877
|
+
SharedService.ɵprov = i0.ɵɵdefineInjectable({ factory: function SharedService_Factory() { return new SharedService(i0.ɵɵinject(i0.LOCALE_ID), i0.ɵɵinject(OptionsService), i0.ɵɵinject(SharedConnectorService), i0.ɵɵinject(DictionaryService)); }, token: SharedService, providedIn: "root" });
|
|
2819
2878
|
SharedService.decorators = [
|
|
2820
2879
|
{ type: Injectable, args: [{
|
|
2821
2880
|
providedIn: "root"
|
|
@@ -2824,7 +2883,8 @@ SharedService.decorators = [
|
|
|
2824
2883
|
SharedService.ctorParameters = () => [
|
|
2825
2884
|
{ type: LanguageCode, decorators: [{ type: Inject, args: [LOCALE_ID,] }] },
|
|
2826
2885
|
{ type: OptionsService },
|
|
2827
|
-
{ type: SharedConnectorService }
|
|
2886
|
+
{ type: SharedConnectorService },
|
|
2887
|
+
{ type: DictionaryService }
|
|
2828
2888
|
];
|
|
2829
2889
|
|
|
2830
2890
|
class SendMethodService {
|
|
@@ -3698,8 +3758,28 @@ StockChangeAmountComponent.propDecorators = {
|
|
|
3698
3758
|
closeStockChangeAmount: [{ type: Output }]
|
|
3699
3759
|
};
|
|
3700
3760
|
|
|
3761
|
+
var SharedCfgName;
|
|
3762
|
+
(function (SharedCfgName) {
|
|
3763
|
+
/* Shared general */
|
|
3764
|
+
/* Shared stock */
|
|
3765
|
+
SharedCfgName["Overview"] = "overview";
|
|
3766
|
+
SharedCfgName["OverviewDetails"] = "overviewDetails";
|
|
3767
|
+
SharedCfgName["StockForecast"] = "stockForecast";
|
|
3768
|
+
SharedCfgName["InventoryForecast"] = "inventoryForecast";
|
|
3769
|
+
SharedCfgName["InventoryDetails"] = "inventoryDetails";
|
|
3770
|
+
SharedCfgName["InOrder"] = "inOrder";
|
|
3771
|
+
SharedCfgName["History"] = "history";
|
|
3772
|
+
/* Shared Stock History */
|
|
3773
|
+
SharedCfgName["HistoryStock"] = "historyStock";
|
|
3774
|
+
SharedCfgName["HistoryOrderStock"] = "historyOrderStock";
|
|
3775
|
+
SharedCfgName["HistoryOrderCommission"] = "historyOrderCommission";
|
|
3776
|
+
SharedCfgName["HistoryOrder"] = "historyOrder";
|
|
3777
|
+
SharedCfgName["HistoryAssign"] = "historyAssign";
|
|
3778
|
+
})(SharedCfgName || (SharedCfgName = {}));
|
|
3779
|
+
|
|
3701
3780
|
class StockTabComponent {
|
|
3702
3781
|
constructor() {
|
|
3782
|
+
this.sharedCfgName = SharedCfgName;
|
|
3703
3783
|
this.articleStockInformation = [];
|
|
3704
3784
|
this.locationClicked = new EventEmitter();
|
|
3705
3785
|
}
|
|
@@ -3721,14 +3801,20 @@ StockTabComponent.decorators = [
|
|
|
3721
3801
|
<co-simple-grid-column [headerText]="'STOCK' | localize" [field]="'technicalStock'" [order]="12"></co-simple-grid-column>
|
|
3722
3802
|
<co-simple-grid-column [headerText]="'AVAILABLE_STOCK' | localize" [field]="'availableStock'" [order]="13"></co-simple-grid-column>
|
|
3723
3803
|
<co-simple-grid-column [headerText]="'ECONOMICAL_STOCK' | localize" [field]="'economicalStock'" [order]="14"></co-simple-grid-column>
|
|
3724
|
-
<co-simple-grid-column [headerText]="'DETAILS' | localize" [field]="'locationNo'" [order]="15">
|
|
3804
|
+
<co-simple-grid-column [headerText]="'DETAILS' | localize" [field]="'locationNo'" [order]="15" [screenConfigurationObject]="sharedCfgName.Overview">
|
|
3725
3805
|
<ng-template #template let-row="row">
|
|
3726
3806
|
<span class="location-link" [textContent]="'OPEN_DETAILS' | localize" (click)="onLocationClick(row)"></span>
|
|
3727
3807
|
</ng-template>
|
|
3728
3808
|
</co-simple-grid-column>
|
|
3729
3809
|
</co-simple-grid>
|
|
3730
3810
|
`,
|
|
3731
|
-
encapsulation: ViewEncapsulation.None
|
|
3811
|
+
encapsulation: ViewEncapsulation.None,
|
|
3812
|
+
providers: [
|
|
3813
|
+
{
|
|
3814
|
+
provide: SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME,
|
|
3815
|
+
useExisting: forwardRef(() => StockTabComponent)
|
|
3816
|
+
}
|
|
3817
|
+
]
|
|
3732
3818
|
},] }
|
|
3733
3819
|
];
|
|
3734
3820
|
StockTabComponent.propDecorators = {
|
|
@@ -3800,10 +3886,11 @@ OrderTabComponent.propDecorators = {
|
|
|
3800
3886
|
};
|
|
3801
3887
|
|
|
3802
3888
|
class StockTabsComponent {
|
|
3803
|
-
constructor(_stockService, _localizeService, _changeDetector) {
|
|
3889
|
+
constructor(_stockService, _localizeService, _changeDetector, _screenConfigService) {
|
|
3804
3890
|
this._stockService = _stockService;
|
|
3805
3891
|
this._localizeService = _localizeService;
|
|
3806
3892
|
this._changeDetector = _changeDetector;
|
|
3893
|
+
this._screenConfigService = _screenConfigService;
|
|
3807
3894
|
this.icons = Icon;
|
|
3808
3895
|
this.stockInformation = [];
|
|
3809
3896
|
this.warehouses = [];
|
|
@@ -3827,27 +3914,30 @@ class StockTabsComponent {
|
|
|
3827
3914
|
}
|
|
3828
3915
|
ngOnInit() {
|
|
3829
3916
|
this.tabs = [
|
|
3830
|
-
{ title: this._localizeService.get('OVERVIEW'), active: true },
|
|
3831
|
-
{ title: this._localizeService.get('STOCK_FORECAST'), active: false },
|
|
3832
|
-
{ title: this._localizeService.get('STOCK_DETAILS'), active: false },
|
|
3833
|
-
{ title: this._localizeService.get('ALREADY_IN_ORDER'), active: false },
|
|
3834
|
-
{ title: this._localizeService.get('IN_ORDER'), active: false },
|
|
3835
|
-
{ title: this._localizeService.get('HISTORY'), active: false },
|
|
3917
|
+
{ title: this._localizeService.get('OVERVIEW'), active: true, cfg: SharedCfgName.OverviewDetails },
|
|
3918
|
+
{ title: this._localizeService.get('STOCK_FORECAST'), active: false, cfg: SharedCfgName.StockForecast },
|
|
3919
|
+
{ title: this._localizeService.get('STOCK_DETAILS'), active: false, cfg: SharedCfgName.InventoryForecast },
|
|
3920
|
+
{ title: this._localizeService.get('ALREADY_IN_ORDER'), active: false, cfg: SharedCfgName.InventoryDetails },
|
|
3921
|
+
{ title: this._localizeService.get('IN_ORDER'), active: false, cfg: SharedCfgName.InOrder },
|
|
3922
|
+
{ title: this._localizeService.get('HISTORY'), active: false, cfg: SharedCfgName.History },
|
|
3836
3923
|
];
|
|
3837
3924
|
this.historyTabs = [
|
|
3838
|
-
{ title: this._localizeService.get('STOCK'), active: true },
|
|
3925
|
+
{ title: this._localizeService.get('STOCK'), active: true, cfg: SharedCfgName.HistoryStock },
|
|
3839
3926
|
{
|
|
3840
3927
|
title: this._localizeService.get('ORDER_STOCK'),
|
|
3841
|
-
active: false
|
|
3928
|
+
active: false,
|
|
3929
|
+
cfg: SharedCfgName.HistoryOrderStock
|
|
3842
3930
|
},
|
|
3843
3931
|
{
|
|
3844
3932
|
title: this._localizeService.get('ORDER_COMMISSION'),
|
|
3845
|
-
active: false
|
|
3933
|
+
active: false,
|
|
3934
|
+
cfg: SharedCfgName.HistoryOrderCommission
|
|
3846
3935
|
},
|
|
3847
|
-
{ title: this._localizeService.get('ORDER'), active: false },
|
|
3936
|
+
{ title: this._localizeService.get('ORDER'), active: false, cfg: SharedCfgName.HistoryOrder },
|
|
3848
3937
|
{
|
|
3849
3938
|
title: this._localizeService.get('ALLOCATION'),
|
|
3850
|
-
active: false
|
|
3939
|
+
active: false,
|
|
3940
|
+
cfg: SharedCfgName.HistoryAssign
|
|
3851
3941
|
},
|
|
3852
3942
|
];
|
|
3853
3943
|
}
|
|
@@ -4035,7 +4125,8 @@ StockTabsComponent.decorators = [
|
|
|
4035
4125
|
StockTabsComponent.ctorParameters = () => [
|
|
4036
4126
|
{ type: StockService },
|
|
4037
4127
|
{ type: LocalizeService },
|
|
4038
|
-
{ type: ChangeDetectorRef }
|
|
4128
|
+
{ type: ChangeDetectorRef },
|
|
4129
|
+
{ type: BaseModuleScreenConfigService }
|
|
4039
4130
|
];
|
|
4040
4131
|
StockTabsComponent.propDecorators = {
|
|
4041
4132
|
stockInformation: [{ type: Input }],
|
|
@@ -4495,19 +4586,28 @@ TabBarComponent.decorators = [
|
|
|
4495
4586
|
</div>
|
|
4496
4587
|
<div class="tab-bar">
|
|
4497
4588
|
<div class="tab-bar-primary">
|
|
4498
|
-
<
|
|
4499
|
-
|
|
4500
|
-
|
|
4589
|
+
<div class="tab-primary" *ngFor="let tab of tabs" [screenConfigurationObject]="tab.cfg">
|
|
4590
|
+
<button [class.active]="tab.active" (click)="selectTab(tab)">
|
|
4591
|
+
<span [textContent]="tab.title"></span>
|
|
4592
|
+
</button>
|
|
4593
|
+
</div>
|
|
4594
|
+
|
|
4501
4595
|
</div>
|
|
4502
4596
|
<div class="secondary-tab-bar" *ngIf="ActivateSecondaryTabs">
|
|
4503
|
-
<button *ngFor="let tab of secondaryTabs" [class.active]="tab.active" (click)="selectSecondaryTab(tab)">
|
|
4504
|
-
|
|
4597
|
+
<button *ngFor="let tab of secondaryTabs" [screenConfigurationObject]="tab.cfg" [class.active]="tab.active" (click)="selectSecondaryTab(tab)">
|
|
4598
|
+
<span [textContent]="tab.title"></span>
|
|
4505
4599
|
</button>
|
|
4506
4600
|
</div>
|
|
4507
4601
|
</div>
|
|
4508
4602
|
</div>
|
|
4509
4603
|
`,
|
|
4510
|
-
encapsulation: ViewEncapsulation.None
|
|
4604
|
+
encapsulation: ViewEncapsulation.None,
|
|
4605
|
+
providers: [
|
|
4606
|
+
{
|
|
4607
|
+
provide: SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME,
|
|
4608
|
+
useExisting: forwardRef(() => TabBarComponent)
|
|
4609
|
+
}
|
|
4610
|
+
]
|
|
4511
4611
|
},] }
|
|
4512
4612
|
];
|
|
4513
4613
|
TabBarComponent.ctorParameters = () => [
|
|
@@ -4533,6 +4633,7 @@ TabBarModule.decorators = [
|
|
|
4533
4633
|
imports: [
|
|
4534
4634
|
CommonModule,
|
|
4535
4635
|
ListOfValuesModule,
|
|
4636
|
+
ScreenConfigurationModule,
|
|
4536
4637
|
],
|
|
4537
4638
|
declarations: [
|
|
4538
4639
|
TabBarComponent
|
|
@@ -5355,7 +5456,8 @@ StockModule.decorators = [
|
|
|
5355
5456
|
ListOfValuesModule,
|
|
5356
5457
|
LocalizationModule,
|
|
5357
5458
|
PopupModule,
|
|
5358
|
-
InputDatePickerModule
|
|
5459
|
+
InputDatePickerModule,
|
|
5460
|
+
ScreenConfigurationModule
|
|
5359
5461
|
],
|
|
5360
5462
|
declarations: [
|
|
5361
5463
|
StockComponent,
|
|
@@ -13870,6 +13972,7 @@ class NotificationSummaryBlockComponent extends BaseActivitySummaryComponent {
|
|
|
13870
13972
|
this.dialogService = dialogService;
|
|
13871
13973
|
this.sharedService = sharedService;
|
|
13872
13974
|
this.Icon = Icon;
|
|
13975
|
+
this.WorkflowCategoryType = WorkflowCategoryType;
|
|
13873
13976
|
this.listItems = [];
|
|
13874
13977
|
}
|
|
13875
13978
|
showClass() {
|
|
@@ -13883,8 +13986,39 @@ class NotificationSummaryBlockComponent extends BaseActivitySummaryComponent {
|
|
|
13883
13986
|
});
|
|
13884
13987
|
}
|
|
13885
13988
|
handleSendEmail(event) {
|
|
13886
|
-
this
|
|
13887
|
-
|
|
13989
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
13990
|
+
this.handleSave(event);
|
|
13991
|
+
let templates = yield this.sharedService.getDefaultEmailReportTemplatesForBranch('10', ReportType.TaskMessage);
|
|
13992
|
+
if (templates.length != 0) {
|
|
13993
|
+
let template = this.findDefault(templates);
|
|
13994
|
+
if (template) {
|
|
13995
|
+
yield this.sharedService.emailViaTemplate(template, this.createEmailAddressString(this.editActivity.task.emailAddresses), null, null, this.createEmailSubject(), "", null, { taak_id: this.editActivity.task.taskId + "" });
|
|
13996
|
+
}
|
|
13997
|
+
}
|
|
13998
|
+
});
|
|
13999
|
+
}
|
|
14000
|
+
createEmailAddressString(addresses) {
|
|
14001
|
+
if (addresses.length === 0) {
|
|
14002
|
+
return '';
|
|
14003
|
+
}
|
|
14004
|
+
else {
|
|
14005
|
+
return addresses.join(';');
|
|
14006
|
+
}
|
|
14007
|
+
}
|
|
14008
|
+
createEmailSubject() {
|
|
14009
|
+
let subject = "- ";
|
|
14010
|
+
subject += (this.editActivity.task.workflowCategory ? this.editActivity.task.workflowCategory : this.dictionaryService.get("TASK")) + " " +
|
|
14011
|
+
(this.editActivity.task.workflowCategory ? this.editActivity.task.reference : this.editActivity.task.taskId);
|
|
14012
|
+
return subject;
|
|
14013
|
+
}
|
|
14014
|
+
findDefault(reportList) {
|
|
14015
|
+
let defaultTemplate = null;
|
|
14016
|
+
reportList.forEach(r => {
|
|
14017
|
+
if (r.isDefault) {
|
|
14018
|
+
defaultTemplate = r;
|
|
14019
|
+
}
|
|
14020
|
+
});
|
|
14021
|
+
return defaultTemplate;
|
|
13888
14022
|
}
|
|
13889
14023
|
}
|
|
13890
14024
|
NotificationSummaryBlockComponent.decorators = [
|
|
@@ -13903,6 +14037,8 @@ NotificationSummaryBlockComponent.decorators = [
|
|
|
13903
14037
|
</ng-template>
|
|
13904
14038
|
<ng-template #editTemplate>
|
|
13905
14039
|
<div fxLayout="column">
|
|
14040
|
+
<co-role-email-selector [(model)]="editActivity?.task.emailAddresses" [key]="editActivity?.task.taskId.toString()" [workflowCategoryType]="WorkflowCategoryType.Task"></co-role-email-selector>
|
|
14041
|
+
|
|
13906
14042
|
<co-list-of-values [readonly]="readonly" [multiselect]="true"
|
|
13907
14043
|
[collection]="listItems" [displayField]="'role'"
|
|
13908
14044
|
[(model)]="editActivity.task.emailAddresses">
|
|
@@ -13927,6 +14063,139 @@ NotificationSummaryBlockComponent.propDecorators = {
|
|
|
13927
14063
|
showClass: [{ type: HostBinding, args: ["class.co-notification-summary-block",] }]
|
|
13928
14064
|
};
|
|
13929
14065
|
|
|
14066
|
+
class RoleEmailSelectorComponent {
|
|
14067
|
+
constructor(iconService, sharedService) {
|
|
14068
|
+
this.iconService = iconService;
|
|
14069
|
+
this.sharedService = sharedService;
|
|
14070
|
+
this.icons = Icon;
|
|
14071
|
+
this.recipientLabel = 'RECIPIENTS';
|
|
14072
|
+
this.extraLabel = 'EXTRA_EMAIL_ADDRESSES';
|
|
14073
|
+
this.modelChange = new EventEmitter();
|
|
14074
|
+
this.emailAddressesAvailable = [];
|
|
14075
|
+
this._model = [];
|
|
14076
|
+
}
|
|
14077
|
+
set model(value) {
|
|
14078
|
+
this._model = value;
|
|
14079
|
+
}
|
|
14080
|
+
get model() {
|
|
14081
|
+
return this._model;
|
|
14082
|
+
}
|
|
14083
|
+
set key(value) {
|
|
14084
|
+
this._key = value;
|
|
14085
|
+
this.fetchRoleEmailAddresses();
|
|
14086
|
+
}
|
|
14087
|
+
;
|
|
14088
|
+
get key() {
|
|
14089
|
+
return this._key;
|
|
14090
|
+
}
|
|
14091
|
+
;
|
|
14092
|
+
set workflowCategoryType(value) {
|
|
14093
|
+
this._workflowCategoryType = value;
|
|
14094
|
+
this.fetchRoleEmailAddresses();
|
|
14095
|
+
}
|
|
14096
|
+
;
|
|
14097
|
+
get workflowCategoryType() {
|
|
14098
|
+
return this._workflowCategoryType;
|
|
14099
|
+
}
|
|
14100
|
+
;
|
|
14101
|
+
showClass() {
|
|
14102
|
+
return true;
|
|
14103
|
+
}
|
|
14104
|
+
ngOnInit() {
|
|
14105
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
14106
|
+
this.fetchRoleEmailAddresses();
|
|
14107
|
+
});
|
|
14108
|
+
}
|
|
14109
|
+
fetchRoleEmailAddresses() {
|
|
14110
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
14111
|
+
if (this.workflowCategoryType !== undefined && this.key !== undefined) {
|
|
14112
|
+
this.emailAddressesAvailable = yield this.sharedService.getRoleEmailAddressesByWorkflowCategoryAndKey(this._workflowCategoryType, this._key);
|
|
14113
|
+
}
|
|
14114
|
+
});
|
|
14115
|
+
}
|
|
14116
|
+
roleChosen(role) {
|
|
14117
|
+
if (!role) {
|
|
14118
|
+
return;
|
|
14119
|
+
}
|
|
14120
|
+
const len = role.emailAddresses.length;
|
|
14121
|
+
for (let i = 0; i < len; i++) {
|
|
14122
|
+
if (this.model.indexOf(role.emailAddresses[i]) === -1 && StringUtils$1.IsValidEmail(role.emailAddresses[i])) {
|
|
14123
|
+
this.model.push(role.emailAddresses[i]);
|
|
14124
|
+
this.modelChange.emit(this.model);
|
|
14125
|
+
}
|
|
14126
|
+
}
|
|
14127
|
+
}
|
|
14128
|
+
addEmail(email) {
|
|
14129
|
+
if (this.model.indexOf(email) === -1 && StringUtils$1.IsValidEmail(email)) {
|
|
14130
|
+
this.model.push(email);
|
|
14131
|
+
this.modelChange.emit(this.model);
|
|
14132
|
+
}
|
|
14133
|
+
}
|
|
14134
|
+
removeOptionFromModel(email) {
|
|
14135
|
+
if (this.model.indexOf(email) > -1) {
|
|
14136
|
+
this.model.splice(email.indexOf(email), 1);
|
|
14137
|
+
}
|
|
14138
|
+
}
|
|
14139
|
+
}
|
|
14140
|
+
RoleEmailSelectorComponent.decorators = [
|
|
14141
|
+
{ type: Component, args: [{
|
|
14142
|
+
selector: "co-role-email-selector",
|
|
14143
|
+
template: `
|
|
14144
|
+
<co-list-of-values [multiselect]="false" [label]="recipientLabel | localize"
|
|
14145
|
+
[collection]="emailAddressesAvailable" [displayField]="'role'"
|
|
14146
|
+
(modelChange)="roleChosen($event)">
|
|
14147
|
+
</co-list-of-values>
|
|
14148
|
+
<co-input-text #inp [placeholder]="extraLabel | localize"
|
|
14149
|
+
[rightIconData]="iconService.getIcon(icons.PaperPlaneTopSolid)"
|
|
14150
|
+
(rightIconClick)="addEmail(inp.model)"></co-input-text>
|
|
14151
|
+
|
|
14152
|
+
<div class="chips-wrapper">
|
|
14153
|
+
<div class="chips" *ngFor="let email of model">
|
|
14154
|
+
<span class="chips-description" [textContent]="email"></span>
|
|
14155
|
+
<co-icon class="remove-chip-icon" [iconData]="iconService.getIcon(icons.CrossSkinny)" (click)="removeOptionFromModel(email)"></co-icon>
|
|
14156
|
+
</div>
|
|
14157
|
+
</div>
|
|
14158
|
+
|
|
14159
|
+
`
|
|
14160
|
+
},] }
|
|
14161
|
+
];
|
|
14162
|
+
RoleEmailSelectorComponent.ctorParameters = () => [
|
|
14163
|
+
{ type: IconCacheService },
|
|
14164
|
+
{ type: SharedService }
|
|
14165
|
+
];
|
|
14166
|
+
RoleEmailSelectorComponent.propDecorators = {
|
|
14167
|
+
recipientLabel: [{ type: Input }],
|
|
14168
|
+
extraLabel: [{ type: Input }],
|
|
14169
|
+
model: [{ type: Input }],
|
|
14170
|
+
key: [{ type: Input }],
|
|
14171
|
+
workflowCategoryType: [{ type: Input }],
|
|
14172
|
+
modelChange: [{ type: Output }],
|
|
14173
|
+
showClass: [{ type: HostBinding, args: ["class.co-role-email-selector",] }]
|
|
14174
|
+
};
|
|
14175
|
+
|
|
14176
|
+
class RoleEmailSelectorModule {
|
|
14177
|
+
}
|
|
14178
|
+
RoleEmailSelectorModule.decorators = [
|
|
14179
|
+
{ type: NgModule, args: [{
|
|
14180
|
+
imports: [
|
|
14181
|
+
ListOfValuesModule,
|
|
14182
|
+
InputTextModule,
|
|
14183
|
+
LocalizationModule,
|
|
14184
|
+
IconModule,
|
|
14185
|
+
CommonModule,
|
|
14186
|
+
],
|
|
14187
|
+
declarations: [
|
|
14188
|
+
RoleEmailSelectorComponent
|
|
14189
|
+
],
|
|
14190
|
+
exports: [
|
|
14191
|
+
RoleEmailSelectorComponent
|
|
14192
|
+
],
|
|
14193
|
+
providers: [
|
|
14194
|
+
BusinessObjectFactory
|
|
14195
|
+
]
|
|
14196
|
+
},] }
|
|
14197
|
+
];
|
|
14198
|
+
|
|
13930
14199
|
class NotificationSummaryBlockModule {
|
|
13931
14200
|
}
|
|
13932
14201
|
NotificationSummaryBlockModule.decorators = [
|
|
@@ -13935,7 +14204,8 @@ NotificationSummaryBlockModule.decorators = [
|
|
|
13935
14204
|
ActivitySummaryBlockModule,
|
|
13936
14205
|
ListOfValuesModule,
|
|
13937
14206
|
ButtonModule,
|
|
13938
|
-
CommonModule
|
|
14207
|
+
CommonModule,
|
|
14208
|
+
RoleEmailSelectorModule
|
|
13939
14209
|
],
|
|
13940
14210
|
declarations: [
|
|
13941
14211
|
NotificationSummaryBlockComponent
|
|
@@ -15191,7 +15461,19 @@ class TaskCreatorComponent {
|
|
|
15191
15461
|
return __awaiter(this, void 0, void 0, function* () {
|
|
15192
15462
|
const emailsSent = yield this.sharedService.emailViaTemplate(template, this.createEmailAddressString(this.emailAddresses), this.createEmailAddressString(this.bccEmailAddresses), this.senderAddress, this.createEmailSubject(), "", null /*this.createAttachmentsStringArray()*/, this.createEmailParams());
|
|
15193
15463
|
if (emailsSent) {
|
|
15194
|
-
|
|
15464
|
+
let history = new ActivityEmailHistory();
|
|
15465
|
+
history.emailAddresses = this.createEmailAddressString(this.emailAddresses);
|
|
15466
|
+
history.emailDateTime = new Date();
|
|
15467
|
+
history.message = 'Email Content created via Report';
|
|
15468
|
+
if (this.chosenActivityType === this.optionCollection[0]) {
|
|
15469
|
+
yield this.sharedService.insertEmailHistoryForRemark(this.createdRemark.remarkId, history);
|
|
15470
|
+
}
|
|
15471
|
+
else if (this.chosenActivityType === this.optionCollection[1]) {
|
|
15472
|
+
yield this.sharedService.insertEmailHistoryForWork(this.createdWork.workId, history);
|
|
15473
|
+
}
|
|
15474
|
+
else {
|
|
15475
|
+
yield this.sharedService.insertEmailHistoryForTask(this.createdTask.taskId, history);
|
|
15476
|
+
}
|
|
15195
15477
|
}
|
|
15196
15478
|
});
|
|
15197
15479
|
}
|
|
@@ -15301,12 +15583,24 @@ TaskCreatorComponent.decorators = [
|
|
|
15301
15583
|
<co-files-upload (documentsAdded)="addedDocument($event)" (documentDeleted)="deletedDocument"
|
|
15302
15584
|
[documents]="documents" [useWithoutSettingProps]="true"></co-files-upload>
|
|
15303
15585
|
</co-dialog>
|
|
15304
|
-
<co-dialog *ngIf="showEmailDialog" (closeClick)="emailDialogClosed()">
|
|
15586
|
+
<co-dialog *ngIf="showEmailDialog" (closeClick)="emailDialogClosed()" [footerTemplate]="footerTemplate">
|
|
15305
15587
|
<co-role-email-selector [(model)]="emailAddresses" [key]="remarkAndWorkKey" [workflowCategoryType]="workflowCategoryType"></co-role-email-selector>
|
|
15306
|
-
<co-role-email-selector [(model)]="bccEmailAddresses" [key]="remarkAndWorkKey" [workflowCategoryType]="workflowCategoryType"></co-role-email-selector>
|
|
15307
|
-
|
|
15588
|
+
<co-role-email-selector [(model)]="bccEmailAddresses" [key]="remarkAndWorkKey" [workflowCategoryType]="workflowCategoryType" [recipientLabel]="'BCC_RECIPIENT'" [extraLabel]="'BCC_EXTRA_EMAIL_ADDRESSES'"></co-role-email-selector>
|
|
15589
|
+
<!--TODO: reimplement once we have the backend functionality for this-->
|
|
15590
|
+
<!--<co-input-text [readonly]="false" [label]="'SENDER' | localize" [(model)]="senderAddress"></co-input-text>-->
|
|
15591
|
+
|
|
15308
15592
|
</co-dialog>
|
|
15309
15593
|
|
|
15594
|
+
<ng-template #footerTemplate>
|
|
15595
|
+
<div class="co-dialog-footer-button-wrapper">
|
|
15596
|
+
<co-button class="save-button"
|
|
15597
|
+
[iconData]="iconService.getIcon(icons.CheckDuotone)"
|
|
15598
|
+
(click)="emailDialogClosed()"></co-button>
|
|
15599
|
+
<co-button class="close-button"
|
|
15600
|
+
[iconData]="iconService.getIcon(icons.CrossSkinny)"
|
|
15601
|
+
(click)="emailDialogClosed()"></co-button>
|
|
15602
|
+
</div>
|
|
15603
|
+
</ng-template>
|
|
15310
15604
|
`
|
|
15311
15605
|
},] }
|
|
15312
15606
|
];
|
|
@@ -15328,135 +15622,6 @@ TaskCreatorComponent.propDecorators = {
|
|
|
15328
15622
|
showClass: [{ type: HostBinding, args: ["class.co-task-creator",] }]
|
|
15329
15623
|
};
|
|
15330
15624
|
|
|
15331
|
-
class RoleEmailSelectorComponent {
|
|
15332
|
-
constructor(iconService, sharedService) {
|
|
15333
|
-
this.iconService = iconService;
|
|
15334
|
-
this.sharedService = sharedService;
|
|
15335
|
-
this.icons = Icon;
|
|
15336
|
-
this.modelChange = new EventEmitter();
|
|
15337
|
-
this.emailAddressesAvailable = [];
|
|
15338
|
-
this._model = [];
|
|
15339
|
-
}
|
|
15340
|
-
set model(value) {
|
|
15341
|
-
this._model = value;
|
|
15342
|
-
}
|
|
15343
|
-
get model() {
|
|
15344
|
-
return this._model;
|
|
15345
|
-
}
|
|
15346
|
-
set key(value) {
|
|
15347
|
-
this._key = value;
|
|
15348
|
-
this.fetchRoleEmailAddresses();
|
|
15349
|
-
}
|
|
15350
|
-
;
|
|
15351
|
-
get key() {
|
|
15352
|
-
return this._key;
|
|
15353
|
-
}
|
|
15354
|
-
;
|
|
15355
|
-
set workflowCategoryType(value) {
|
|
15356
|
-
this._workflowCategoryType = value;
|
|
15357
|
-
this.fetchRoleEmailAddresses();
|
|
15358
|
-
}
|
|
15359
|
-
;
|
|
15360
|
-
get workflowCategoryType() {
|
|
15361
|
-
return this._workflowCategoryType;
|
|
15362
|
-
}
|
|
15363
|
-
;
|
|
15364
|
-
showClass() {
|
|
15365
|
-
return true;
|
|
15366
|
-
}
|
|
15367
|
-
ngOnInit() {
|
|
15368
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
15369
|
-
this.fetchRoleEmailAddresses();
|
|
15370
|
-
});
|
|
15371
|
-
}
|
|
15372
|
-
fetchRoleEmailAddresses() {
|
|
15373
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
15374
|
-
if (this.workflowCategoryType !== undefined && this.key !== undefined) {
|
|
15375
|
-
this.emailAddressesAvailable = yield this.sharedService.getRoleEmailAddressesByWorkflowCategoryAndKey(this._workflowCategoryType, this._key);
|
|
15376
|
-
}
|
|
15377
|
-
});
|
|
15378
|
-
}
|
|
15379
|
-
roleChosen(role) {
|
|
15380
|
-
if (!role) {
|
|
15381
|
-
return;
|
|
15382
|
-
}
|
|
15383
|
-
const len = role.emailAddresses.length;
|
|
15384
|
-
for (let i = 0; i < len; i++) {
|
|
15385
|
-
if (this.model.indexOf(role.emailAddresses[i]) === -1 && StringUtils$1.IsValidEmail(role.emailAddresses[i])) {
|
|
15386
|
-
this.model.push(role.emailAddresses[i]);
|
|
15387
|
-
this.modelChange.emit(this.model);
|
|
15388
|
-
}
|
|
15389
|
-
}
|
|
15390
|
-
}
|
|
15391
|
-
addEmail(email) {
|
|
15392
|
-
if (this.model.indexOf(email) === -1 && StringUtils$1.IsValidEmail(email)) {
|
|
15393
|
-
this.model.push(email);
|
|
15394
|
-
this.modelChange.emit(this.model);
|
|
15395
|
-
}
|
|
15396
|
-
}
|
|
15397
|
-
removeOptionFromModel(email) {
|
|
15398
|
-
if (this.model.indexOf(email) > -1) {
|
|
15399
|
-
this.model.splice(email.indexOf(email), 1);
|
|
15400
|
-
}
|
|
15401
|
-
}
|
|
15402
|
-
}
|
|
15403
|
-
RoleEmailSelectorComponent.decorators = [
|
|
15404
|
-
{ type: Component, args: [{
|
|
15405
|
-
selector: "co-role-email-selector",
|
|
15406
|
-
template: `
|
|
15407
|
-
<co-list-of-values [multiselect]="false" [label]="'RECIPIENTS' | localize"
|
|
15408
|
-
[collection]="emailAddressesAvailable" [displayField]="'role'"
|
|
15409
|
-
(modelChange)="roleChosen($event)">
|
|
15410
|
-
</co-list-of-values>
|
|
15411
|
-
<co-input-text #inp [placeholder]="'EXTRA_EMAIL_ADDRESSES' | localize"
|
|
15412
|
-
[rightIconData]="iconService.getIcon(icons.PaperPlaneTopSolid)"
|
|
15413
|
-
(rightIconClick)="addEmail(inp.model)"></co-input-text>
|
|
15414
|
-
|
|
15415
|
-
<div class="chips-wrapper">
|
|
15416
|
-
<div class="chips" *ngFor="let email of model">
|
|
15417
|
-
<span class="chips-description" [textContent]="email"></span>
|
|
15418
|
-
<co-icon class="remove-chip-icon" [iconData]="iconService.getIcon(icons.CrossSkinny)" (click)="removeOptionFromModel(email)"></co-icon>
|
|
15419
|
-
</div>
|
|
15420
|
-
</div>
|
|
15421
|
-
|
|
15422
|
-
`
|
|
15423
|
-
},] }
|
|
15424
|
-
];
|
|
15425
|
-
RoleEmailSelectorComponent.ctorParameters = () => [
|
|
15426
|
-
{ type: IconCacheService },
|
|
15427
|
-
{ type: SharedService }
|
|
15428
|
-
];
|
|
15429
|
-
RoleEmailSelectorComponent.propDecorators = {
|
|
15430
|
-
model: [{ type: Input }],
|
|
15431
|
-
key: [{ type: Input }],
|
|
15432
|
-
workflowCategoryType: [{ type: Input }],
|
|
15433
|
-
modelChange: [{ type: Output }],
|
|
15434
|
-
showClass: [{ type: HostBinding, args: ["class.co-role-email-selector",] }]
|
|
15435
|
-
};
|
|
15436
|
-
|
|
15437
|
-
class RoleEmailSelectorModule {
|
|
15438
|
-
}
|
|
15439
|
-
RoleEmailSelectorModule.decorators = [
|
|
15440
|
-
{ type: NgModule, args: [{
|
|
15441
|
-
imports: [
|
|
15442
|
-
ListOfValuesModule,
|
|
15443
|
-
InputTextModule,
|
|
15444
|
-
LocalizationModule,
|
|
15445
|
-
IconModule,
|
|
15446
|
-
CommonModule,
|
|
15447
|
-
],
|
|
15448
|
-
declarations: [
|
|
15449
|
-
RoleEmailSelectorComponent
|
|
15450
|
-
],
|
|
15451
|
-
exports: [
|
|
15452
|
-
RoleEmailSelectorComponent
|
|
15453
|
-
],
|
|
15454
|
-
providers: [
|
|
15455
|
-
BusinessObjectFactory
|
|
15456
|
-
]
|
|
15457
|
-
},] }
|
|
15458
|
-
];
|
|
15459
|
-
|
|
15460
15625
|
class TaskCreatorModule {
|
|
15461
15626
|
}
|
|
15462
15627
|
TaskCreatorModule.decorators = [
|