@colijnit/transaction 257.1.33 → 257.1.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/colijnit-transaction.umd.js +115 -48
- package/bundles/colijnit-transaction.umd.js.map +1 -1
- package/colijnit-transaction.metadata.json +1 -1
- package/esm2015/lib/component/add-product/add-product.component.js +77 -43
- package/esm2015/lib/component/transaction-line-image-and-description/transaction-line-image-and-description.component.js +7 -3
- package/esm2015/lib/component/transaction-quick-access/transaction-quick-access-order-purchase/transaction-quick-access-order-purchase.component.js +44 -28
- package/esm2015/lib/component/transaction-quick-access/transaction-quick-access-purchase-order-overview/transaction-quick-access-purchase-order-overview.component.js +2 -1
- package/esm2015/lib/transaction-version.js +3 -3
- package/fesm2015/colijnit-transaction.js +130 -75
- package/fesm2015/colijnit-transaction.js.map +1 -1
- package/lib/component/add-product/add-product.component.d.ts +4 -0
- package/lib/component/transaction-quick-access/transaction-quick-access-order-purchase/transaction-quick-access-order-purchase.component.d.ts +6 -0
- package/package.json +3 -3
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
function Version() {
|
|
34
34
|
this.name = "@colijnit/transaction";
|
|
35
35
|
this.description = "Colijn IT transaction package";
|
|
36
|
-
this.symVer = "257.1.
|
|
37
|
-
this.publishDate = "
|
|
36
|
+
this.symVer = "257.1.35";
|
|
37
|
+
this.publishDate = "27-3-2025 09:42:01";
|
|
38
38
|
}
|
|
39
39
|
return Version;
|
|
40
40
|
}());
|
|
@@ -23595,6 +23595,10 @@
|
|
|
23595
23595
|
TransactionLineImageAndDescriptionComponent.prototype.transactionLineSet = function () {
|
|
23596
23596
|
_super.prototype.transactionLineSet.call(this);
|
|
23597
23597
|
this._loadLineImage();
|
|
23598
|
+
if (this.transactionLine.configurationReadable) {
|
|
23599
|
+
// @ts-ignore
|
|
23600
|
+
this.transactionLine.configurationReadable = this.transactionLine.configurationReadable.replaceAll('\n', '<br>');
|
|
23601
|
+
}
|
|
23598
23602
|
};
|
|
23599
23603
|
TransactionLineImageAndDescriptionComponent.prototype.visibilitySet = function () {
|
|
23600
23604
|
_super.prototype.visibilitySet.call(this);
|
|
@@ -23619,7 +23623,7 @@
|
|
|
23619
23623
|
TransactionLineImageAndDescriptionComponent.decorators = [
|
|
23620
23624
|
{ type: i0.Component, args: [{
|
|
23621
23625
|
selector: "co-transaction-line-image-and-description",
|
|
23622
|
-
template: "\n <div *ngIf=\"!transactionLine.isPayment\" class=\"transaction-line-image\" [class.preview]=\"preview\" [screenConfigurationObject]=\"imageAndDescriptionConfigNames?.image\" screenConfigNativeElement>\n <co-image-display [model]=\"image\"></co-image-display>\n </div>\n <co-icon *ngIf=\"transactionLine.isPayment\" class=\"payment-line-icon\" [iconData]=\"iconCacheService.getIcon(icons.UpFromLineRegular)\">\n </co-icon>\n\n <div class=\"transaction-line-description\">\n <div class=\"description-wrapper\">\n <div class=\"colorBlock\" *ngIf=\"transactionLine.color\" [style.background-color]=\"transactionLine.color\"></div>\n <co-transaction-line-description class=\"transaction-line-description-description\"\n [configNames]=\"imageAndDescriptionConfigNames\"\n [defaultEditMode]=\"false\"\n [showLabel]=\"false\"\n [showPurchaseDesc]=\"showPurchaseDesc\"\n [customerPortal]=\"customerPortal\"\n ></co-transaction-line-description>\n <div class=\"transaction-line-article-number-wrapper\" *ngIf=\"!popUpView && !customerPortal\">\n <span *ngIf=\"showDivider\">|</span>\n <span [textContent]=\"transactionLine.articleNumber\" [screenConfigurationObject]=\"imageAndDescriptionConfigNames?.articleNr\" screenConfigNativeElement></span>\n <co-icon class=\"delete-icon\" [iconData]=\"iconCacheService.getIcon(icons.TrashCanLight)\"\n [screenConfigurationObject]=\"imageAndDescriptionConfigNames?.deleteBtn\" screenConfigNativeElement\n (click)=\"deleteTransactionLineClick($event)\"></co-icon>\n </div>\n\n </div>\n <div *ngIf=\"!preview && !popUpView && (transactionLine.articleBoundConcatenatedText || transactionLine.configurationReadable)\"\n class=\"article-text-wrapper\"\n [screenConfigurationObject]=\"imageAndDescriptionConfigNames?.articleText\"\n screenConfigNativeElement>\n <div [ngClass]=\"{'article-text-expand': true, 'large-article': !expanded && !customerPortal}\" class=\"co-small-scrollbar\">\n <div class=\"article-text\" *ngFor=\"let text of transactionLine.articleTextAsArray\">\n <
|
|
23626
|
+
template: "\n <div *ngIf=\"!transactionLine.isPayment\" class=\"transaction-line-image\" [class.preview]=\"preview\" [screenConfigurationObject]=\"imageAndDescriptionConfigNames?.image\" screenConfigNativeElement>\n <co-image-display [model]=\"image\"></co-image-display>\n </div>\n <co-icon *ngIf=\"transactionLine.isPayment\" class=\"payment-line-icon\" [iconData]=\"iconCacheService.getIcon(icons.UpFromLineRegular)\">\n </co-icon>\n\n <div class=\"transaction-line-description\">\n <div class=\"description-wrapper\">\n <div class=\"colorBlock\" *ngIf=\"transactionLine.color\" [style.background-color]=\"transactionLine.color\"></div>\n <co-transaction-line-description class=\"transaction-line-description-description\"\n [configNames]=\"imageAndDescriptionConfigNames\"\n [defaultEditMode]=\"false\"\n [showLabel]=\"false\"\n [showPurchaseDesc]=\"showPurchaseDesc\"\n [customerPortal]=\"customerPortal\"\n ></co-transaction-line-description>\n <div class=\"transaction-line-article-number-wrapper\" *ngIf=\"!popUpView && !customerPortal\">\n <span *ngIf=\"showDivider\">|</span>\n <span [textContent]=\"transactionLine.articleNumber\" [screenConfigurationObject]=\"imageAndDescriptionConfigNames?.articleNr\" screenConfigNativeElement></span>\n <co-icon class=\"delete-icon\" [iconData]=\"iconCacheService.getIcon(icons.TrashCanLight)\"\n [screenConfigurationObject]=\"imageAndDescriptionConfigNames?.deleteBtn\" screenConfigNativeElement\n (click)=\"deleteTransactionLineClick($event)\"></co-icon>\n </div>\n\n </div>\n <div *ngIf=\"!preview && !popUpView && (transactionLine.articleBoundConcatenatedText || transactionLine.configurationReadable)\"\n class=\"article-text-wrapper\"\n [screenConfigurationObject]=\"imageAndDescriptionConfigNames?.articleText\"\n screenConfigNativeElement>\n <div [ngClass]=\"{'article-text-expand': true, 'large-article': !expanded && !customerPortal}\" class=\"co-small-scrollbar\">\n <div class=\"article-text\" *ngFor=\"let text of transactionLine.articleTextAsArray\">\n <div [innerHTML]=\"text | safeHtml\" (dblclick)=\"handleOpenArticleText()\"></div>\n </div>\n <div *ngIf=\"!popUpView && transactionLine.configurationReadable\" class=\"configuration-text\">\n <div [innerHTML]=\"transactionLine.configurationReadable\"></div>\n </div>\n </div>\n <div class=\"expand-wrapper\" (click)=\"expandClicked()\" *ngIf=\"!customerPortal\">\n <span class=\"expand-text\" [textContent]=\"!expanded ? ('SHOW_MORE' | localize) : ('SHOW_LESS' | localize)\"></span>\n <co-icon [iconData]=\"expanded ? iconCacheService.getIcon(icons.ChevronUpRegular) : iconCacheService.getIcon(icons.ChevronDownRegular) \"></co-icon>\n </div>\n </div>\n </div>\n ",
|
|
23623
23627
|
providers: [{
|
|
23624
23628
|
provide: corecomponents_v12.SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME,
|
|
23625
23629
|
useExisting: i0.forwardRef(function () { return TransactionLineImageAndDescriptionComponent; })
|
|
@@ -26656,8 +26660,11 @@
|
|
|
26656
26660
|
_this.reportDocumentPrintRequest = new reportingDocumentPrintSignDocBaseRequest.ReportingDocumentPrintSignDocBaseRequest();
|
|
26657
26661
|
_this.reportDocumentPdfRequest = new reportingDocumentPdfBaseRequest.ReportingDocumentPdfBaseRequest();
|
|
26658
26662
|
_this.batchTransactionSendingRequest = new batchTransactionSendingRequest.BatchTransactionSendingRequest();
|
|
26663
|
+
_this.printPurchaseOrderForSalesOrderRequest = new printPurchaseOrderForSalesOrderRequest.PrintPurchaseOrderForSalesOrderRequest();
|
|
26659
26664
|
_this.useDefaultLayout = false;
|
|
26660
26665
|
_this.useDefaultShippingMethods = false;
|
|
26666
|
+
_this.saveDefaultPrinterForUser = false;
|
|
26667
|
+
_this.saveDefaultPrinterForAllUsers = false;
|
|
26661
26668
|
_this.printerList = [];
|
|
26662
26669
|
_this.defaultSendMethodInitialized = false;
|
|
26663
26670
|
_this._subs = [];
|
|
@@ -26705,43 +26712,45 @@
|
|
|
26705
26712
|
TransactionQuickAccessOrderPurchaseComponent.prototype.handleSendMethodOkClick = function (methodData) {
|
|
26706
26713
|
var _a, _b, _c, _d;
|
|
26707
26714
|
return __awaiter(this, void 0, void 0, function () {
|
|
26708
|
-
var methodString;
|
|
26709
26715
|
return __generator(this, function (_e) {
|
|
26710
26716
|
switch (_e.label) {
|
|
26711
26717
|
case 0:
|
|
26712
26718
|
this.showSendMethodDialog = false;
|
|
26713
|
-
if (!(methodData.sendMethod === 'COMBINED')) return [3 /*break*/, 2];
|
|
26714
26719
|
this.useDefaultLayout = methodData.useDefaultLayout;
|
|
26715
26720
|
this.useDefaultShippingMethods = methodData.useDefaultShippingMethods;
|
|
26721
|
+
this.saveDefaultPrinterForUser = methodData.saveDefaultPrinterForUser;
|
|
26722
|
+
this.saveDefaultPrinterForAllUsers = methodData.saveDefaultPrinterForAllUsers;
|
|
26716
26723
|
if (!this.useDefaultShippingMethods) {
|
|
26717
26724
|
this.overruledEmail = methodData.overruledEmail;
|
|
26718
26725
|
this.overruledEdi = methodData.overruledEdi;
|
|
26719
26726
|
this.overruledPrint = methodData.overruledPrint;
|
|
26720
26727
|
}
|
|
26728
|
+
if (!this.useDefaultLayout) {
|
|
26729
|
+
this.reportIdForPrinting = methodData.reportIdForPrinting.reportId;
|
|
26730
|
+
this.reportIdForEmail = methodData.reportIdForEmail.reportId;
|
|
26731
|
+
}
|
|
26721
26732
|
if (methodData.printerName) {
|
|
26722
26733
|
this.selectedPrinter = this.printerList.find(function (p) { return p.name === methodData.printerName; }) || null;
|
|
26723
26734
|
}
|
|
26724
|
-
this.
|
|
26725
|
-
this.
|
|
26726
|
-
this.
|
|
26735
|
+
this.printPurchaseOrderForSalesOrderRequest.useRelationSpecificReports = this.useDefaultLayout;
|
|
26736
|
+
this.printPurchaseOrderForSalesOrderRequest.useRelationSpecificSendMethods = this.useDefaultShippingMethods;
|
|
26737
|
+
this.printPurchaseOrderForSalesOrderRequest.saveDefaultPrinterForUser = this.saveDefaultPrinterForUser;
|
|
26738
|
+
this.printPurchaseOrderForSalesOrderRequest.saveDefaultPrinterForAllUsers = this.saveDefaultPrinterForAllUsers;
|
|
26739
|
+
this.printPurchaseOrderForSalesOrderRequest.printerName = ((_a = this.selectedPrinter) === null || _a === void 0 ? void 0 : _a.name) || null;
|
|
26727
26740
|
if (!this.useDefaultShippingMethods) {
|
|
26728
|
-
this.
|
|
26729
|
-
this.
|
|
26730
|
-
this.
|
|
26741
|
+
this.printPurchaseOrderForSalesOrderRequest.overruleSendMethodForEmail = (_b = this.overruledEmail) === null || _b === void 0 ? void 0 : _b.code;
|
|
26742
|
+
this.printPurchaseOrderForSalesOrderRequest.overruleSendMethodForPrinting = (_c = this.overruledPrint) === null || _c === void 0 ? void 0 : _c.code;
|
|
26743
|
+
this.printPurchaseOrderForSalesOrderRequest.overruleSendMethodForEDI = (_d = this.overruledEdi) === null || _d === void 0 ? void 0 : _d.code;
|
|
26744
|
+
}
|
|
26745
|
+
if (!this.useDefaultLayout) {
|
|
26746
|
+
this.printPurchaseOrderForSalesOrderRequest.reportIdForPrinting = this.reportIdForPrinting;
|
|
26747
|
+
this.printPurchaseOrderForSalesOrderRequest.reportIdForEmail = this.reportIdForEmail;
|
|
26731
26748
|
}
|
|
26732
26749
|
return [4 /*yield*/, this.printDocument(this.reportDocumentPrintRequest)];
|
|
26733
26750
|
case 1:
|
|
26734
26751
|
_e.sent();
|
|
26735
26752
|
this._setDefaultMethod(this.defaultSendMethod);
|
|
26736
|
-
return [
|
|
26737
|
-
case 2:
|
|
26738
|
-
methodString = methodData.toString();
|
|
26739
|
-
return [4 /*yield*/, this.printDocument(this.reportDocumentPrintRequest)];
|
|
26740
|
-
case 3:
|
|
26741
|
-
_e.sent();
|
|
26742
|
-
this._setDefaultMethod(methodString);
|
|
26743
|
-
_e.label = 4;
|
|
26744
|
-
case 4: return [2 /*return*/];
|
|
26753
|
+
return [2 /*return*/];
|
|
26745
26754
|
}
|
|
26746
26755
|
});
|
|
26747
26756
|
});
|
|
@@ -26832,8 +26841,15 @@
|
|
|
26832
26841
|
switch (_e.label) {
|
|
26833
26842
|
case 0:
|
|
26834
26843
|
printPurchaseOrderForSalesOrderRequest$1 = Object.assign(new printPurchaseOrderForSalesOrderRequest.PrintPurchaseOrderForSalesOrderRequest(), request);
|
|
26835
|
-
(_a = printPurchaseOrderForSalesOrderRequest
|
|
26836
|
-
(_b = printPurchaseOrderForSalesOrderRequest
|
|
26844
|
+
printPurchaseOrderForSalesOrderRequest$1.useRelationSpecificReports = (_a = this.printPurchaseOrderForSalesOrderRequest.useRelationSpecificReports) !== null && _a !== void 0 ? _a : true;
|
|
26845
|
+
printPurchaseOrderForSalesOrderRequest$1.useRelationSpecificSendMethods = (_b = this.printPurchaseOrderForSalesOrderRequest.useRelationSpecificSendMethods) !== null && _b !== void 0 ? _b : true;
|
|
26846
|
+
printPurchaseOrderForSalesOrderRequest$1.reportIdForPrinting = this.printPurchaseOrderForSalesOrderRequest.reportIdForPrinting;
|
|
26847
|
+
printPurchaseOrderForSalesOrderRequest$1.reportIdForEmail = this.printPurchaseOrderForSalesOrderRequest.reportIdForEmail;
|
|
26848
|
+
printPurchaseOrderForSalesOrderRequest$1.overruleSendMethodForEmail = this.printPurchaseOrderForSalesOrderRequest.overruleSendMethodForEmail;
|
|
26849
|
+
printPurchaseOrderForSalesOrderRequest$1.overruleSendMethodForPrinting = this.printPurchaseOrderForSalesOrderRequest.overruleSendMethodForPrinting;
|
|
26850
|
+
printPurchaseOrderForSalesOrderRequest$1.overruleSendMethodForEDI = this.printPurchaseOrderForSalesOrderRequest.overruleSendMethodForEDI;
|
|
26851
|
+
printPurchaseOrderForSalesOrderRequest$1.saveDefaultPrinterForUser = this.printPurchaseOrderForSalesOrderRequest.saveDefaultPrinterForUser;
|
|
26852
|
+
printPurchaseOrderForSalesOrderRequest$1.saveDefaultPrinterForAllUsers = this.printPurchaseOrderForSalesOrderRequest.saveDefaultPrinterForAllUsers;
|
|
26837
26853
|
return [4 /*yield*/, this.transactionService.generateAndSendPurchaseOrdersForSalesOrder(printPurchaseOrderForSalesOrderRequest$1, this.transactionInfo.version)];
|
|
26838
26854
|
case 1:
|
|
26839
26855
|
_e.sent();
|
|
@@ -26847,7 +26863,7 @@
|
|
|
26847
26863
|
TransactionQuickAccessOrderPurchaseComponent.decorators = [
|
|
26848
26864
|
{ type: i0.Component, args: [{
|
|
26849
26865
|
selector: 'co-transaction-quick-access-order-purchase',
|
|
26850
|
-
template: "\n <div class=\"quick-access-content-wrapper\" *ngIf=\"canGenerate && transactionInfo.transactionDefinitive\">\n <div class=\"select-all-wrapper\">\n <co-input-checkbox\n [label]=\"'SELECT_ALL_LINES' | localize\"\n (modelChange)=\"handleSelectAllLines($event)\">\n </co-input-checkbox>\n </div>\n <co-quick-send-button\n [defaultMethodIcon]=\"defaultSendMethodIcon\"\n [showLoader]=\"showLoader\"\n (sendIconClicked)=\"handleSend(defaultSendMethod)\"\n (openSendMethodDialog)=\"openSendDialog()\">\n </co-quick-send-button>\n\n <span class=\"button\" [class.selected]=\"transactionHeaderService.reservationMode\">\n <co-icon (click)=\"handleReservationModeClick()\" [iconData]=\"iconCacheService.getIcon(icons.PalletBoxesRotate)\"></co-icon>\n </span>\n </div>\n\n <co-send-method-dialog *ngIf=\"showSendMethodDialog\"\n [headerTitle]=\"'CREATE_PURCHASE_ORDER' | localize\"\n [printerList]=\"printerList\"\n [defaultSendMethod]=\"defaultSendMethod\"\n [visibleMethods]=\"[sendMethodType.Print, sendMethodType.Email]\"\n [emailAddresses]=\"emailAddresses\"\n [emailLayouts]=\"emailLayouts\"\n [printLayouts]=\"printLayouts\"\n [defaultPrinterName]=\"defaultPrinterName\"\n [isDocSignEnabled]=\"true\"\n [pdfDoc]=\"pdfDoc\"\n [(reportingDocumentEmailRequest)]=\"reportDocumentEmailRequest\"\n [(reportingDocumentPrintRequest)]=\"reportDocumentPrintRequest\"\n [(reportingDocumentPdfRequest)]=\"reportDocumentPdfRequest\"\n (closeClick)=\"showSendMethodDialog = false\"\n (okClick)=\"handleSendMethodOkClick($event)\"\n [usePurchaseSendMethod]=\"true\"\n ></co-send-method-dialog>\n ",
|
|
26866
|
+
template: "\n <div class=\"quick-access-content-wrapper\" *ngIf=\"canGenerate && transactionInfo.transactionDefinitive\">\n <div class=\"select-all-wrapper\">\n <co-input-checkbox\n [label]=\"'SELECT_ALL_LINES' | localize\"\n (modelChange)=\"handleSelectAllLines($event)\">\n </co-input-checkbox>\n </div>\n <co-quick-send-button\n [defaultMethodIcon]=\"defaultSendMethodIcon\"\n [showLoader]=\"showLoader\"\n (sendIconClicked)=\"handleSend(defaultSendMethod)\"\n (openSendMethodDialog)=\"openSendDialog()\">\n </co-quick-send-button>\n\n <span class=\"button\" [class.selected]=\"transactionHeaderService.reservationMode\">\n <co-icon (click)=\"handleReservationModeClick()\" [iconData]=\"iconCacheService.getIcon(icons.PalletBoxesRotate)\"></co-icon>\n </span>\n </div>\n\n <co-send-method-dialog *ngIf=\"showSendMethodDialog\"\n [headerTitle]=\"'CREATE_PURCHASE_ORDER' | localize\"\n [printerList]=\"printerList\"\n [defaultSendMethod]=\"defaultSendMethod\"\n [visibleMethods]=\"[sendMethodType.Print, sendMethodType.Email]\"\n [emailAddresses]=\"emailAddresses\"\n [emailLayouts]=\"emailLayouts\"\n [printLayouts]=\"printLayouts\"\n [defaultPrinterName]=\"defaultPrinterName\"\n [disablePdfPreview]=\"true\"\n [isDocSignEnabled]=\"true\"\n [pdfDoc]=\"pdfDoc\"\n [(reportingDocumentEmailRequest)]=\"reportDocumentEmailRequest\"\n [(reportingDocumentPrintRequest)]=\"reportDocumentPrintRequest\"\n [(reportingDocumentPdfRequest)]=\"reportDocumentPdfRequest\"\n (closeClick)=\"showSendMethodDialog = false\"\n (okClick)=\"handleSendMethodOkClick($event)\"\n [usePurchaseSendMethod]=\"true\"\n ></co-send-method-dialog>\n ",
|
|
26851
26867
|
encapsulation: i0.ViewEncapsulation.None
|
|
26852
26868
|
},] }
|
|
26853
26869
|
];
|
|
@@ -27292,7 +27308,7 @@
|
|
|
27292
27308
|
TransactionQuickAccessPurchaseOrderOverviewComponent.decorators = [
|
|
27293
27309
|
{ type: i0.Component, args: [{
|
|
27294
27310
|
selector: "co-transaction-quick-access-purchase-order-overview",
|
|
27295
|
-
template: "\n <co-quick-send-button\n [defaultMethodIcon]=\"defaultSendMethodIcon\"\n [showLoader]=\"showLoader\"\n (sendIconClicked)=\"handleSend(defaultSendMethod)\"\n (openSendMethodDialog)=\"showSendMethodDialog = true\"\n ></co-quick-send-button>\n <co-transaction-send-documents\n [historicReports]=\"historicReports\"\n [transactionTypeCategory]=\"transactionTypeCategory.PurchaseOrderOverview\"\n ></co-transaction-send-documents>\n <co-dialog-catalog *ngIf=\"showCatalog\"\n [options]=\"catalogOptions\"\n [parameters]=\"catalogParameters\"\n [showNavigation]=\"true\"\n (closeClick)=\"showCatalog = false\"\n (articleClicked)=\"handleCatalogArticleClick($event)\"\n >\n </co-dialog-catalog>\n <co-send-method-dialog *ngIf=\"showSendMethodDialog\"\n [headerTitle]=\"'Verzendmethode'\"\n [printerList]=\"printerList\"\n [defaultSendMethod]=\"defaultSendMethod\"\n [visibleMethods]=\"[sendMethodType.Print, sendMethodType.Email, sendMethodType.Pdf, sendMethodType.WebService]\"\n [emailAddresses]=\"emailAddresses\"\n [emailLayouts]=\"emailLayouts\"\n [printLayouts]=\"printLayouts\"\n [isDocSignEnabled]=\"true\"\n [(reportingDocumentEmailRequest)]=\"reportDocumentEmailRequest\"\n [(reportingDocumentPrintRequest)]=\"reportDocumentPrintRequest\"\n [(reportingDocumentPdfRequest)]=\"reportDocumentPdfRequest\"\n (closeClick)=\"showSendMethodDialog = false\"\n (okClick)=\"handleSendMethodOkClick($event)\"\n ></co-send-method-dialog>\n ",
|
|
27311
|
+
template: "\n <co-quick-send-button\n [defaultMethodIcon]=\"defaultSendMethodIcon\"\n [showLoader]=\"showLoader\"\n (sendIconClicked)=\"handleSend(defaultSendMethod)\"\n (openSendMethodDialog)=\"showSendMethodDialog = true\"\n ></co-quick-send-button>\n <co-transaction-send-documents\n [historicReports]=\"historicReports\"\n [transactionTypeCategory]=\"transactionTypeCategory.PurchaseOrderOverview\"\n ></co-transaction-send-documents>\n <co-dialog-catalog *ngIf=\"showCatalog\"\n [options]=\"catalogOptions\"\n [parameters]=\"catalogParameters\"\n [showNavigation]=\"true\"\n (closeClick)=\"showCatalog = false\"\n (articleClicked)=\"handleCatalogArticleClick($event)\"\n >\n </co-dialog-catalog>\n <co-send-method-dialog *ngIf=\"showSendMethodDialog\"\n [headerTitle]=\"'Verzendmethode'\"\n [printerList]=\"printerList\"\n [defaultSendMethod]=\"defaultSendMethod\"\n [visibleMethods]=\"[sendMethodType.Print, sendMethodType.Email, sendMethodType.Pdf, sendMethodType.WebService]\"\n [emailAddresses]=\"emailAddresses\"\n [emailLayouts]=\"emailLayouts\"\n [printLayouts]=\"printLayouts\"\n [disablePdfPreview]=\"true\"\n [isDocSignEnabled]=\"true\"\n [(reportingDocumentEmailRequest)]=\"reportDocumentEmailRequest\"\n [(reportingDocumentPrintRequest)]=\"reportDocumentPrintRequest\"\n [(reportingDocumentPdfRequest)]=\"reportDocumentPdfRequest\"\n (closeClick)=\"showSendMethodDialog = false\"\n (okClick)=\"handleSendMethodOkClick($event)\"\n ></co-send-method-dialog>\n ",
|
|
27296
27312
|
encapsulation: i0.ViewEncapsulation.None
|
|
27297
27313
|
},] }
|
|
27298
27314
|
];
|
|
@@ -57854,6 +57870,7 @@
|
|
|
57854
57870
|
this.showRelatedProductsPopup = false;
|
|
57855
57871
|
this.cartPlusIcon = this.iconService.getIcon(this.icons.CartPlusRegular);
|
|
57856
57872
|
this.cartMinIcon = this.iconService.getIcon(this.icons.CartMinusRegular);
|
|
57873
|
+
this.pendingAddArticleAction = false;
|
|
57857
57874
|
this._showCatalog = false;
|
|
57858
57875
|
this._subs = [];
|
|
57859
57876
|
}
|
|
@@ -57893,7 +57910,9 @@
|
|
|
57893
57910
|
}
|
|
57894
57911
|
this.searchText = text;
|
|
57895
57912
|
this._prepareCatalogRequest();
|
|
57896
|
-
this.
|
|
57913
|
+
this._changeDetector.detectChanges();
|
|
57914
|
+
this.searchText = "";
|
|
57915
|
+
if (!!this.pendingAddArticleAction) return [3 /*break*/, 13];
|
|
57897
57916
|
return [4 /*yield*/, this.transactionService.getArticleListWithBarcodeArticleNrEanCode(text)];
|
|
57898
57917
|
case 1:
|
|
57899
57918
|
fullMatchSearch = _a.sent();
|
|
@@ -57904,7 +57923,9 @@
|
|
|
57904
57923
|
if (!(article.goodType === "B")) return [3 /*break*/, 3];
|
|
57905
57924
|
this.showCatalogDialog();
|
|
57906
57925
|
return [3 /*break*/, 5];
|
|
57907
|
-
case 3:
|
|
57926
|
+
case 3:
|
|
57927
|
+
this.pendingAddArticleAction = true;
|
|
57928
|
+
return [4 /*yield*/, this.handleAddArticle(article)];
|
|
57908
57929
|
case 4:
|
|
57909
57930
|
_a.sent();
|
|
57910
57931
|
_a.label = 5;
|
|
@@ -57919,7 +57940,9 @@
|
|
|
57919
57940
|
if (!(article.goodType === "B")) return [3 /*break*/, 9];
|
|
57920
57941
|
this.showCatalogDialog();
|
|
57921
57942
|
return [3 /*break*/, 11];
|
|
57922
|
-
case 9:
|
|
57943
|
+
case 9:
|
|
57944
|
+
this.pendingAddArticleAction = true;
|
|
57945
|
+
return [4 /*yield*/, this.handleAddArticle(article)];
|
|
57923
57946
|
case 10:
|
|
57924
57947
|
_a.sent();
|
|
57925
57948
|
_a.label = 11;
|
|
@@ -57945,9 +57968,13 @@
|
|
|
57945
57968
|
return [4 /*yield*/, this.transactionService.addArticle(article.articleNumber, this.return ? -1 : 1)];
|
|
57946
57969
|
case 1:
|
|
57947
57970
|
success = _a.sent();
|
|
57948
|
-
if (
|
|
57971
|
+
if (success) {
|
|
57972
|
+
this.searchText = "";
|
|
57973
|
+
}
|
|
57974
|
+
else {
|
|
57949
57975
|
this.transactionService.rollback();
|
|
57950
57976
|
}
|
|
57977
|
+
this.pendingAddArticleAction = false;
|
|
57951
57978
|
return [3 /*break*/, 3];
|
|
57952
57979
|
case 2:
|
|
57953
57980
|
this.addArticle.next({
|
|
@@ -57957,6 +57984,7 @@
|
|
|
57957
57984
|
belowLineNr: 0,
|
|
57958
57985
|
lastArticle: true
|
|
57959
57986
|
});
|
|
57987
|
+
this.pendingAddArticleAction = false;
|
|
57960
57988
|
_a.label = 3;
|
|
57961
57989
|
case 3: return [2 /*return*/];
|
|
57962
57990
|
}
|
|
@@ -57965,7 +57993,6 @@
|
|
|
57965
57993
|
};
|
|
57966
57994
|
AddProductComponent.prototype.handleAddArticleClick = function (data) {
|
|
57967
57995
|
return __awaiter(this, void 0, void 0, function () {
|
|
57968
|
-
var article, articleNr;
|
|
57969
57996
|
return __generator(this, function (_a) {
|
|
57970
57997
|
switch (_a.label) {
|
|
57971
57998
|
case 0:
|
|
@@ -57973,18 +58000,65 @@
|
|
|
57973
58000
|
// this.showCatalog = false;
|
|
57974
58001
|
// }
|
|
57975
58002
|
this.showCatalog = false;
|
|
57976
|
-
if (!this.handleAddArticleInternally) return [3 /*break*/,
|
|
58003
|
+
if (!this.handleAddArticleInternally) return [3 /*break*/, 2];
|
|
58004
|
+
return [4 /*yield*/, this._handleArticleTypeOnAdd(data)];
|
|
58005
|
+
case 1:
|
|
58006
|
+
_a.sent();
|
|
58007
|
+
return [3 /*break*/, 3];
|
|
58008
|
+
case 2:
|
|
58009
|
+
if (data && data.article instanceof articleExtended_bo.ArticleExtended) {
|
|
58010
|
+
this.addArticle.next({
|
|
58011
|
+
article: data.article,
|
|
58012
|
+
quantity: this.getActualQuantity(data.quantity),
|
|
58013
|
+
aboveLineNr: 0,
|
|
58014
|
+
belowLineNr: 0,
|
|
58015
|
+
lastArticle: true
|
|
58016
|
+
});
|
|
58017
|
+
}
|
|
58018
|
+
_a.label = 3;
|
|
58019
|
+
case 3: return [2 /*return*/];
|
|
58020
|
+
}
|
|
58021
|
+
});
|
|
58022
|
+
});
|
|
58023
|
+
};
|
|
58024
|
+
AddProductComponent.prototype._tryAddArticle = function (articleNr, quantity) {
|
|
58025
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
58026
|
+
var success;
|
|
58027
|
+
return __generator(this, function (_a) {
|
|
58028
|
+
switch (_a.label) {
|
|
58029
|
+
case 0: return [4 /*yield*/, this.transactionService.addArticle(articleNr, quantity, 0, 0, true, true)];
|
|
58030
|
+
case 1:
|
|
58031
|
+
success = _a.sent();
|
|
58032
|
+
console.log(success);
|
|
58033
|
+
if (success) {
|
|
58034
|
+
this.searchText = "";
|
|
58035
|
+
}
|
|
58036
|
+
else {
|
|
58037
|
+
// keep the search text
|
|
58038
|
+
this.searchText = this.inputSearchText.model;
|
|
58039
|
+
}
|
|
58040
|
+
return [2 /*return*/];
|
|
58041
|
+
}
|
|
58042
|
+
});
|
|
58043
|
+
});
|
|
58044
|
+
};
|
|
58045
|
+
AddProductComponent.prototype._handleArticleTypeOnAdd = function (data) {
|
|
58046
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
58047
|
+
var article, articleNr;
|
|
58048
|
+
return __generator(this, function (_a) {
|
|
58049
|
+
switch (_a.label) {
|
|
58050
|
+
case 0:
|
|
57977
58051
|
if (!(data && data.article)) return [3 /*break*/, 7];
|
|
57978
58052
|
if (!(typeof data.article === 'string')) return [3 /*break*/, 5];
|
|
57979
58053
|
article = JSON.parse(data.article);
|
|
57980
58054
|
if (!article.selectorData.compositions) return [3 /*break*/, 2];
|
|
57981
|
-
return [4 /*yield*/, this.
|
|
58055
|
+
return [4 /*yield*/, this._tryAddArticle(article.selectorData.compositions[0].compositionArticleNo, data.quantity)];
|
|
57982
58056
|
case 1:
|
|
57983
58057
|
_a.sent();
|
|
57984
58058
|
return [3 /*break*/, 4];
|
|
57985
58059
|
case 2:
|
|
57986
58060
|
if (!article.selectorData.articleNr) return [3 /*break*/, 4];
|
|
57987
|
-
return [4 /*yield*/, this.
|
|
58061
|
+
return [4 /*yield*/, this._tryAddArticle(article.selectorData.articleNr, data.quantity)];
|
|
57988
58062
|
case 3:
|
|
57989
58063
|
_a.sent();
|
|
57990
58064
|
_a.label = 4;
|
|
@@ -57998,23 +58072,11 @@
|
|
|
57998
58072
|
articleNr = data.article.hasOwnProperty('articleNr') ? data.article['articleNr'] : data.article['articleNo'];
|
|
57999
58073
|
}
|
|
58000
58074
|
if (!articleNr) return [3 /*break*/, 7];
|
|
58001
|
-
return [4 /*yield*/, this.
|
|
58075
|
+
return [4 /*yield*/, this._tryAddArticle(articleNr, data.quantity)];
|
|
58002
58076
|
case 6:
|
|
58003
58077
|
_a.sent();
|
|
58004
58078
|
_a.label = 7;
|
|
58005
|
-
case 7: return [
|
|
58006
|
-
case 8:
|
|
58007
|
-
if (data && data.article instanceof articleExtended_bo.ArticleExtended) {
|
|
58008
|
-
this.addArticle.next({
|
|
58009
|
-
article: data.article,
|
|
58010
|
-
quantity: this.getActualQuantity(data.quantity),
|
|
58011
|
-
aboveLineNr: 0,
|
|
58012
|
-
belowLineNr: 0,
|
|
58013
|
-
lastArticle: true
|
|
58014
|
-
});
|
|
58015
|
-
}
|
|
58016
|
-
_a.label = 9;
|
|
58017
|
-
case 9: return [2 /*return*/];
|
|
58079
|
+
case 7: return [2 /*return*/];
|
|
58018
58080
|
}
|
|
58019
58081
|
});
|
|
58020
58082
|
});
|
|
@@ -58044,6 +58106,11 @@
|
|
|
58044
58106
|
};
|
|
58045
58107
|
AddProductComponent.prototype.showCatalogDialog = function () {
|
|
58046
58108
|
this.showCatalog = true;
|
|
58109
|
+
this.pendingAddArticleAction = false;
|
|
58110
|
+
};
|
|
58111
|
+
AddProductComponent.prototype.handleCloseCatalogueClick = function () {
|
|
58112
|
+
this.showCatalog = false;
|
|
58113
|
+
this.searchText = "";
|
|
58047
58114
|
};
|
|
58048
58115
|
AddProductComponent.prototype.handleCartIconClick = function (event) {
|
|
58049
58116
|
this.return = !this.return;
|
|
@@ -58053,7 +58120,7 @@
|
|
|
58053
58120
|
this.searchText = this.inputSearchText.model;
|
|
58054
58121
|
}
|
|
58055
58122
|
this._prepareCatalogRequest();
|
|
58056
|
-
this.searchText = undefined;
|
|
58123
|
+
// this.searchText = undefined;
|
|
58057
58124
|
this.showCatalogDialog();
|
|
58058
58125
|
};
|
|
58059
58126
|
AddProductComponent.prototype.handleIFrameFeedback = function (iFrameFeedbackObject) {
|
|
@@ -58110,7 +58177,7 @@
|
|
|
58110
58177
|
AddProductComponent.decorators = [
|
|
58111
58178
|
{ type: i0.Component, args: [{
|
|
58112
58179
|
selector: 'co-add-product',
|
|
58113
|
-
template: "\n <co-input-scanner\n #inputSearch\n [customCssClass]=\"'no-focus-line'\"\n [(model)]=\"searchText\"\n [placeholder]=\"'SEARCH_ADD_ARTICLE' | localize\"\n [centerLabel]=\"true\"\n [useLeftIcon]=\"true\"\n [leftIconData]=\"return ? cartMinIcon : cartPlusIcon\"\n [useRightIcon]=\"true\"\n (leftIconClick)=\"handleCartIconClick($event)\"\n (rightIconClick)=\"handleSearchIconClick()\"\n (barCodeScanned)=\"handleSearch($event)\"\n (search)=\"handleSearch($event)\"\n (isFocused)=\"handleInputFocus($event)\"\n ></co-input-scanner>\n <co-dialog-catalog *ngIf=\"showCatalog\"\n [options]=\"catalogOptions\"\n [parameters]=\"catalogParameters\"\n [handleAddArticleInternally]=\"handleAddArticleInternally\"\n [showNavigation]=\"true\"\n [isReturn]=\"return\"\n [showRelatedProductsPopup]=\"showRelatedProductsPopup\"\n [transaction]=\"transactionService.currentTransaction\"\n (closeClick)=\"
|
|
58180
|
+
template: "\n <co-input-scanner\n #inputSearch\n [customCssClass]=\"'no-focus-line'\"\n [(model)]=\"searchText\"\n [placeholder]=\"'SEARCH_ADD_ARTICLE' | localize\"\n [centerLabel]=\"true\"\n [useLeftIcon]=\"true\"\n [leftIconData]=\"return ? cartMinIcon : cartPlusIcon\"\n [useRightIcon]=\"true\"\n (leftIconClick)=\"handleCartIconClick($event)\"\n (rightIconClick)=\"handleSearchIconClick()\"\n (barCodeScanned)=\"handleSearch($event)\"\n (search)=\"handleSearch($event)\"\n (isFocused)=\"handleInputFocus($event)\"\n ></co-input-scanner>\n <co-dialog-catalog *ngIf=\"showCatalog\"\n [options]=\"catalogOptions\"\n [parameters]=\"catalogParameters\"\n [handleAddArticleInternally]=\"handleAddArticleInternally\"\n [showNavigation]=\"true\"\n [isReturn]=\"return\"\n [showRelatedProductsPopup]=\"showRelatedProductsPopup\"\n [transaction]=\"transactionService.currentTransaction\"\n (closeClick)=\"handleCloseCatalogueClick()\"\n (articleClicked)=\"handleCatalogArticleClick($event)\"\n (addArticleClicked)=\"handleAddArticleClick($event)\"\n (addCatFarmArticleClicked)=\"handleAddCatFarmArticleClick($event)\"\n (iFrameFeedback)=\"handleIFrameFeedback($event)\"\n >\n </co-dialog-catalog>\n ",
|
|
58114
58181
|
encapsulation: i0.ViewEncapsulation.None
|
|
58115
58182
|
},] }
|
|
58116
58183
|
];
|