@colijnit/sharedcomponents 1.0.10 → 1.0.13
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-sharedcomponents.umd.js +1574 -44
- package/bundles/colijnit-sharedcomponents.umd.js.map +1 -1
- package/colijnit-sharedcomponents.d.ts +7 -0
- package/colijnit-sharedcomponents.metadata.json +1 -1
- package/esm2015/colijnit-sharedcomponents.js +8 -1
- package/esm2015/lib/components/send-method-dialog/enums/send-option.js +8 -0
- package/esm2015/lib/components/send-method-dialog/send-method-dialog.component.js +221 -0
- package/esm2015/lib/components/send-method-dialog/send-method-dialog.module.js +27 -0
- package/esm2015/lib/components/stock/stock-information/stock-information.component.js +55 -0
- package/esm2015/lib/components/stock/stock-information-grid/stock-information-grid.component.js +258 -0
- package/esm2015/lib/components/stock/stock-location/stock-location.component.js +68 -0
- package/esm2015/lib/components/stock/stock-transfer/co-drop-down-list-fields.interface.js +2 -0
- package/esm2015/lib/components/stock/stock-transfer/stock-transfer.component.js +98 -0
- package/esm2015/lib/components/stock/stock.component.js +111 -0
- package/esm2015/lib/components/stock/stock.module.js +45 -0
- package/esm2015/lib/enum/icon.enum.js +23 -0
- package/esm2015/lib/factory/business-object-factory.js +120 -0
- package/esm2015/lib/factory/decorators/boolean.decorator.js +102 -0
- package/esm2015/lib/factory/decorators/complex-array.decorator.js +55 -0
- package/esm2015/lib/factory/decorators/complex-field.decorator.js +57 -0
- package/esm2015/lib/factory/decorators/date-field.decorator.js +36 -0
- package/esm2015/lib/factory/decorators/string-number.decorator.js +43 -0
- package/esm2015/lib/model/business-object.js +81 -0
- package/esm2015/lib/model/icon-svg.js +22 -0
- package/esm2015/lib/service/icon-cache.service.js +51 -0
- package/esm2015/lib/service/ione-connector-adapter.service.js +162 -0
- package/esm2015/lib/service/stock.service.js +41 -0
- package/esm2015/lib/utils/array-utils.js +183 -0
- package/esm2015/lib/utils/is-nill.function.js +5 -0
- package/esm2015/public-api.js +5 -1
- package/fesm2015/colijnit-sharedcomponents.js +1815 -2
- package/fesm2015/colijnit-sharedcomponents.js.map +1 -1
- package/lib/components/send-method-dialog/enums/send-option.d.ts +6 -0
- package/lib/components/send-method-dialog/send-method-dialog.component.d.ts +41 -0
- package/lib/components/send-method-dialog/send-method-dialog.module.d.ts +2 -0
- package/lib/components/send-method-dialog/style/_layout.scss +192 -0
- package/lib/components/send-method-dialog/style/_material-definition.scss +1 -0
- package/lib/components/send-method-dialog/style/_theme.scss +7 -0
- package/lib/components/send-method-dialog/style/material.scss +4 -0
- package/lib/components/stock/stock-information/stock-information.component.d.ts +11 -0
- package/lib/components/stock/stock-information-grid/stock-information-grid.component.d.ts +47 -0
- package/lib/components/stock/stock-location/stock-location.component.d.ts +16 -0
- package/lib/components/stock/stock-transfer/co-drop-down-list-fields.interface.d.ts +4 -0
- package/lib/components/stock/stock-transfer/stock-transfer.component.d.ts +21 -0
- package/lib/components/stock/stock.component.d.ts +32 -0
- package/lib/components/stock/stock.module.d.ts +2 -0
- package/lib/components/stock/style/_layout.scss +206 -0
- package/lib/components/stock/style/_material-definition.scss +20 -0
- package/lib/components/stock/style/_theme.scss +8 -0
- package/lib/components/stock/style/material.scss +4 -0
- package/lib/enum/icon.enum.d.ts +21 -0
- package/lib/factory/business-object-factory.d.ts +23 -0
- package/lib/factory/decorators/boolean.decorator.d.ts +43 -0
- package/lib/factory/decorators/complex-array.decorator.d.ts +25 -0
- package/lib/factory/decorators/complex-field.decorator.d.ts +25 -0
- package/lib/factory/decorators/date-field.decorator.d.ts +17 -0
- package/lib/factory/decorators/string-number.decorator.d.ts +22 -0
- package/lib/model/business-object.d.ts +7 -0
- package/lib/model/icon-svg.d.ts +4 -0
- package/lib/service/icon-cache.service.d.ts +18 -0
- package/lib/service/ione-connector-adapter.service.d.ts +26 -0
- package/lib/service/stock.service.d.ts +17 -0
- package/lib/utils/array-utils.d.ts +57 -0
- package/lib/utils/is-nill.function.d.ts +1 -0
- package/package.json +6 -5
- package/public-api.d.ts +4 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/animations'), require('pdf-lib'), require('pdfjs-dist/legacy/build/pdf'), require('pdfjs-dist/build/pdf.worker.entry'), require('@angular/common'), require('signature_pad')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@colijnit/sharedcomponents', ['exports', '@angular/core', '@angular/animations', 'pdf-lib', 'pdfjs-dist/legacy/build/pdf', 'pdfjs-dist/build/pdf.worker.entry', '@angular/common', 'signature_pad'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.colijnit = global.colijnit || {}, global.colijnit.sharedcomponents = {}), global.ng.core, global.ng.animations, global.pdfLib, global.PDFJS, global.pdfjsWorker, global.ng.common, global.SignaturePad));
|
|
5
|
-
})(this, (function (exports,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/animations'), require('pdf-lib'), require('pdfjs-dist/legacy/build/pdf'), require('pdfjs-dist/build/pdf.worker.entry'), require('@angular/common'), require('signature_pad'), require('@colijnit/articleapi/build/articles'), require('@colijnit/sharedapi/build/sharedapi'), require('@colijnit/sharedapi/build/model/report/printer.bo'), require('@colijnit/articleapi/build/utils/function/not-nill.function'), require('@colijnit/articleapi/build/utils/object-utils'), require('@colijnit/articleapi/build/enum/yes-no-db-type.enum'), require('@colijnit/articleapi/build/enum/true-false-db-type.enum'), require('@colijnit/articleapi/build/enum/one-zero-bool-db-type.enum'), require('@colijnit/articleapi/build/enum/db-boolean-value-type.enum'), require('@colijnit/articleapi/build/utils/date-utils'), require('@colijnit/articleapi/build/utils/number-utils'), require('@colijnit/articleapi/build/utils/function/is-nill.function'), require('@colijnit/articleapi/build/factory/decorators/map-property.decorator'), require('@colijnit/articleapi/build/factory/decorators/boolean.decorator'), require('@colijnit/articleapi/build/factory/decorators/json.decorator'), require('@colijnit/articleapi/build/factory/decorators/complex-array.decorator'), require('@colijnit/articleapi/build/model/print-stock-stickers'), require('@colijnit/articleapi/build/model/article-flat.bo'), require('@colijnit/articleapi/build/articles-public'), require('@colijnit/sharedapi/build/model/report/print-job'), require('@colijnit/articleapi/build/model/article-stock.bo'), require('@colijnit/articleapi/build/model/article-stock'), require('@colijnit/corecomponents_v12'), require('@angular/platform-browser'), require('@colijnit/sharedapi/build/model/print-stock-stickers')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@colijnit/sharedcomponents', ['exports', '@angular/core', '@angular/animations', 'pdf-lib', 'pdfjs-dist/legacy/build/pdf', 'pdfjs-dist/build/pdf.worker.entry', '@angular/common', 'signature_pad', '@colijnit/articleapi/build/articles', '@colijnit/sharedapi/build/sharedapi', '@colijnit/sharedapi/build/model/report/printer.bo', '@colijnit/articleapi/build/utils/function/not-nill.function', '@colijnit/articleapi/build/utils/object-utils', '@colijnit/articleapi/build/enum/yes-no-db-type.enum', '@colijnit/articleapi/build/enum/true-false-db-type.enum', '@colijnit/articleapi/build/enum/one-zero-bool-db-type.enum', '@colijnit/articleapi/build/enum/db-boolean-value-type.enum', '@colijnit/articleapi/build/utils/date-utils', '@colijnit/articleapi/build/utils/number-utils', '@colijnit/articleapi/build/utils/function/is-nill.function', '@colijnit/articleapi/build/factory/decorators/map-property.decorator', '@colijnit/articleapi/build/factory/decorators/boolean.decorator', '@colijnit/articleapi/build/factory/decorators/json.decorator', '@colijnit/articleapi/build/factory/decorators/complex-array.decorator', '@colijnit/articleapi/build/model/print-stock-stickers', '@colijnit/articleapi/build/model/article-flat.bo', '@colijnit/articleapi/build/articles-public', '@colijnit/sharedapi/build/model/report/print-job', '@colijnit/articleapi/build/model/article-stock.bo', '@colijnit/articleapi/build/model/article-stock', '@colijnit/corecomponents_v12', '@angular/platform-browser', '@colijnit/sharedapi/build/model/print-stock-stickers'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.colijnit = global.colijnit || {}, global.colijnit.sharedcomponents = {}), global.ng.core, global.ng.animations, global.pdfLib, global.PDFJS, global.pdfjsWorker, global.ng.common, global.SignaturePad, global.articles, global.sharedapi, global.printer_bo, global.notNill_function, global.objectUtils, global.yesNoDbType_enum, global.trueFalseDbType_enum, global.oneZeroBoolDbType_enum, global.dbBooleanValueType_enum, global.dateUtils, global.numberUtils, global.isNill_function, global.mapProperty_decorator, global.boolean_decorator, global.json_decorator, global.complexArray_decorator, global.printStockStickers, global.articleFlat_bo, global.articlesPublic, global.printJob, global.articleStock_bo, global.articleStock, global.corecomponents_v12, global.ng.platformBrowser, global.printStockStickers$1));
|
|
5
|
+
})(this, (function (exports, i0, animations, pdfLib, PDFJS, pdfjsWorker, common, SignaturePad, articles, sharedapi, printer_bo, notNill_function, objectUtils, yesNoDbType_enum, trueFalseDbType_enum, oneZeroBoolDbType_enum, dbBooleanValueType_enum, dateUtils, numberUtils, isNill_function, mapProperty_decorator, boolean_decorator, json_decorator, complexArray_decorator, printStockStickers, articleFlat_bo, articlesPublic, printJob, articleStock_bo, articleStock, corecomponents_v12, i1, printStockStickers$1) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -24,9 +24,11 @@
|
|
|
24
24
|
return Object.freeze(n);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
27
28
|
var PDFJS__namespace = /*#__PURE__*/_interopNamespace(PDFJS);
|
|
28
29
|
var pdfjsWorker__default = /*#__PURE__*/_interopDefaultLegacy(pdfjsWorker);
|
|
29
30
|
var SignaturePad__default = /*#__PURE__*/_interopDefaultLegacy(SignaturePad);
|
|
31
|
+
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
30
32
|
|
|
31
33
|
/******************************************************************************
|
|
32
34
|
Copyright (c) Microsoft Corporation.
|
|
@@ -361,8 +363,8 @@
|
|
|
361
363
|
this.clearButtonLabel = 'CLEAR';
|
|
362
364
|
this.signDocumentButtonLabel = 'SIGN_DOCUMENT';
|
|
363
365
|
this.cancelButtonLabel = 'CANCEL';
|
|
364
|
-
this.pdfSaved = new
|
|
365
|
-
this.cancelClick = new
|
|
366
|
+
this.pdfSaved = new i0.EventEmitter();
|
|
367
|
+
this.cancelClick = new i0.EventEmitter();
|
|
366
368
|
this.showSignaturePopup = false;
|
|
367
369
|
this.showSigBuyer = false;
|
|
368
370
|
this.showSigSeller = false;
|
|
@@ -578,7 +580,7 @@
|
|
|
578
580
|
return DocsignComponent;
|
|
579
581
|
}());
|
|
580
582
|
DocsignComponent.decorators = [
|
|
581
|
-
{ type:
|
|
583
|
+
{ type: i0.Component, args: [{
|
|
582
584
|
selector: "ione-docsign",
|
|
583
585
|
template: "\n <iframe #iframe></iframe>\n <ione-signatures *ngIf=\"showSignatures\" @showHideSignature\n [showFirstSignature]=\"showSigBuyer\"\n [firstSignatureTitle]=\"firstSignatureLabel\"\n [showSecondSignature]=\"showSigSeller\"\n [secondSignatureTitle]=\"secondSignatureLabel\"\n [saveButtonLabel]=\"saveButtonLabel\"\n [clearButtonLabel]=\"clearButtonLabel\"\n (saveFirstSignature)=\"saveFirstSignature($event)\"\n (saveSecondSignature)=\"saveSecondSignature($event)\"\n ></ione-signatures>\n <input type=\"button\" *ngIf=\"(showSigBuyer || showSigSeller) && !showSignatures\" class=\"button button-sign-document\"\n [value]=\"signDocumentButtonLabel\"\n (click)=\"showSignatures = true\"\n />\n <input type=\"button\" class=\"button button-cancel\"\n [value]=\"cancelButtonLabel\"\n (click)=\"cancelClick.emit($event)\"\n />\n ",
|
|
584
586
|
animations: [
|
|
@@ -588,30 +590,30 @@
|
|
|
588
590
|
animations.transition("void <=> *", animations.animate("200ms ease-in-out")),
|
|
589
591
|
])
|
|
590
592
|
],
|
|
591
|
-
encapsulation:
|
|
593
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
592
594
|
},] }
|
|
593
595
|
];
|
|
594
596
|
DocsignComponent.propDecorators = {
|
|
595
|
-
iframe: [{ type:
|
|
596
|
-
pdf: [{ type:
|
|
597
|
-
firstSignatureLabel: [{ type:
|
|
598
|
-
firstSignatureField: [{ type:
|
|
599
|
-
secondSignatureLabel: [{ type:
|
|
600
|
-
secondSignatureField: [{ type:
|
|
601
|
-
saveButtonLabel: [{ type:
|
|
602
|
-
clearButtonLabel: [{ type:
|
|
603
|
-
signDocumentButtonLabel: [{ type:
|
|
604
|
-
cancelButtonLabel: [{ type:
|
|
605
|
-
pdfSaved: [{ type:
|
|
606
|
-
cancelClick: [{ type:
|
|
607
|
-
showClass: [{ type:
|
|
597
|
+
iframe: [{ type: i0.ViewChild, args: ["iframe", { read: i0.ElementRef },] }],
|
|
598
|
+
pdf: [{ type: i0.Input }],
|
|
599
|
+
firstSignatureLabel: [{ type: i0.Input }],
|
|
600
|
+
firstSignatureField: [{ type: i0.Input }],
|
|
601
|
+
secondSignatureLabel: [{ type: i0.Input }],
|
|
602
|
+
secondSignatureField: [{ type: i0.Input }],
|
|
603
|
+
saveButtonLabel: [{ type: i0.Input }],
|
|
604
|
+
clearButtonLabel: [{ type: i0.Input }],
|
|
605
|
+
signDocumentButtonLabel: [{ type: i0.Input }],
|
|
606
|
+
cancelButtonLabel: [{ type: i0.Input }],
|
|
607
|
+
pdfSaved: [{ type: i0.Output }],
|
|
608
|
+
cancelClick: [{ type: i0.Output }],
|
|
609
|
+
showClass: [{ type: i0.HostBinding, args: ['class.ione-docsign',] }]
|
|
608
610
|
};
|
|
609
611
|
|
|
610
612
|
var SignatureComponent = /** @class */ (function () {
|
|
611
613
|
function SignatureComponent() {
|
|
612
614
|
this.saveButtonLabel = 'SAVE';
|
|
613
615
|
this.clearButtonLabel = 'CLEAR';
|
|
614
|
-
this.save = new
|
|
616
|
+
this.save = new i0.EventEmitter();
|
|
615
617
|
}
|
|
616
618
|
Object.defineProperty(SignatureComponent.prototype, "content", {
|
|
617
619
|
set: function (content) {
|
|
@@ -658,19 +660,19 @@
|
|
|
658
660
|
return SignatureComponent;
|
|
659
661
|
}());
|
|
660
662
|
SignatureComponent.decorators = [
|
|
661
|
-
{ type:
|
|
663
|
+
{ type: i0.Component, args: [{
|
|
662
664
|
selector: "ione-signature",
|
|
663
665
|
template: "\n <div class=\"signature-wrapper\">\n <div class=\"signature-header\">\n <span *ngIf=\"title\" class=\"title\" [textContent]=\"title\"></span>\n <div class=\"button-wrapper\">\n <input type=\"button\" (click)=\"handleSave($event)\" [value]=\"saveButtonLabel\"/>\n <input type=\"button\" (click)=\"handleClear($event)\" [value]=\"clearButtonLabel\">\n </div>\n </div>\n <div class=\"canvas\">\n <canvas #signature></canvas>\n </div>\n </div>\n ",
|
|
664
|
-
encapsulation:
|
|
666
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
665
667
|
},] }
|
|
666
668
|
];
|
|
667
669
|
SignatureComponent.propDecorators = {
|
|
668
|
-
content: [{ type:
|
|
669
|
-
title: [{ type:
|
|
670
|
-
saveButtonLabel: [{ type:
|
|
671
|
-
clearButtonLabel: [{ type:
|
|
672
|
-
save: [{ type:
|
|
673
|
-
showClass: [{ type:
|
|
670
|
+
content: [{ type: i0.ViewChild, args: ["signature", { read: i0.ElementRef },] }],
|
|
671
|
+
title: [{ type: i0.Input }],
|
|
672
|
+
saveButtonLabel: [{ type: i0.Input }],
|
|
673
|
+
clearButtonLabel: [{ type: i0.Input }],
|
|
674
|
+
save: [{ type: i0.Output }],
|
|
675
|
+
showClass: [{ type: i0.HostBinding, args: ["class.ione-signature",] }]
|
|
674
676
|
};
|
|
675
677
|
|
|
676
678
|
var SignaturesComponent = /** @class */ (function () {
|
|
@@ -679,8 +681,8 @@
|
|
|
679
681
|
this.showSecondSignature = false;
|
|
680
682
|
this.saveButtonLabel = 'SAVE';
|
|
681
683
|
this.clearButtonLabel = 'CLEAR';
|
|
682
|
-
this.saveFirstSignature = new
|
|
683
|
-
this.saveSecondSignature = new
|
|
684
|
+
this.saveFirstSignature = new i0.EventEmitter();
|
|
685
|
+
this.saveSecondSignature = new i0.EventEmitter();
|
|
684
686
|
}
|
|
685
687
|
SignaturesComponent.prototype.showClass = function () {
|
|
686
688
|
return true;
|
|
@@ -688,22 +690,22 @@
|
|
|
688
690
|
return SignaturesComponent;
|
|
689
691
|
}());
|
|
690
692
|
SignaturesComponent.decorators = [
|
|
691
|
-
{ type:
|
|
693
|
+
{ type: i0.Component, args: [{
|
|
692
694
|
selector: "ione-signatures",
|
|
693
695
|
template: "\n <ione-signature *ngIf=\"showFirstSignature\"\n [title]=\"firstSignatureTitle\"\n [saveButtonLabel]=\"saveButtonLabel\"\n [clearButtonLabel]=\"clearButtonLabel\"\n (save)=\"saveFirstSignature.emit($event)\"></ione-signature>\n <ione-signature *ngIf=\"showSecondSignature\"\n [title]=\"secondSignatureTitle\"\n [saveButtonLabel]=\"saveButtonLabel\"\n [clearButtonLabel]=\"clearButtonLabel\"\n (save)=\"saveSecondSignature.emit($event)\"></ione-signature>\n ",
|
|
694
|
-
encapsulation:
|
|
696
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
695
697
|
},] }
|
|
696
698
|
];
|
|
697
699
|
SignaturesComponent.propDecorators = {
|
|
698
|
-
showFirstSignature: [{ type:
|
|
699
|
-
firstSignatureTitle: [{ type:
|
|
700
|
-
showSecondSignature: [{ type:
|
|
701
|
-
secondSignatureTitle: [{ type:
|
|
702
|
-
saveButtonLabel: [{ type:
|
|
703
|
-
clearButtonLabel: [{ type:
|
|
704
|
-
saveFirstSignature: [{ type:
|
|
705
|
-
saveSecondSignature: [{ type:
|
|
706
|
-
showClass: [{ type:
|
|
700
|
+
showFirstSignature: [{ type: i0.Input }],
|
|
701
|
+
firstSignatureTitle: [{ type: i0.Input }],
|
|
702
|
+
showSecondSignature: [{ type: i0.Input }],
|
|
703
|
+
secondSignatureTitle: [{ type: i0.Input }],
|
|
704
|
+
saveButtonLabel: [{ type: i0.Input }],
|
|
705
|
+
clearButtonLabel: [{ type: i0.Input }],
|
|
706
|
+
saveFirstSignature: [{ type: i0.Output }],
|
|
707
|
+
saveSecondSignature: [{ type: i0.Output }],
|
|
708
|
+
showClass: [{ type: i0.HostBinding, args: ["class.ione-signatures",] }]
|
|
707
709
|
};
|
|
708
710
|
|
|
709
711
|
var DocsignModule = /** @class */ (function () {
|
|
@@ -712,7 +714,7 @@
|
|
|
712
714
|
return DocsignModule;
|
|
713
715
|
}());
|
|
714
716
|
DocsignModule.decorators = [
|
|
715
|
-
{ type:
|
|
717
|
+
{ type: i0.NgModule, args: [{
|
|
716
718
|
imports: [
|
|
717
719
|
common.CommonModule
|
|
718
720
|
],
|
|
@@ -727,6 +729,1523 @@
|
|
|
727
729
|
},] }
|
|
728
730
|
];
|
|
729
731
|
|
|
732
|
+
var PROP_META_KEY$3 = "complexField";
|
|
733
|
+
/**
|
|
734
|
+
* !! just a TAG DECORATOR for now, there is no code that uses this meta data within the ione connector lib itself.
|
|
735
|
+
*/
|
|
736
|
+
/**
|
|
737
|
+
* Property decorator for properties of businessobject classes that are other strongly typed businessobjects.
|
|
738
|
+
* Ensures that the BusinessObjectFactoryService makes properly typed objects from incoming raw persistence data. Otherwise we couldn't add methods
|
|
739
|
+
* to our own businessobjects and use them, since all fields would be flat data without methods after BusinessObjectFactoryService creation.
|
|
740
|
+
*
|
|
741
|
+
* Usage:
|
|
742
|
+
*
|
|
743
|
+
* @ComplexField(Transaction)
|
|
744
|
+
* public transaction: Transaction
|
|
745
|
+
*
|
|
746
|
+
* Also keeps track of a "complexFieldProps" metadata on the class-level, as a reflect-metadata workaround to be able to
|
|
747
|
+
* retrieve all properties that have the @ComplexField(..) decorator (impossible with current Reflect API).
|
|
748
|
+
*/
|
|
749
|
+
function ComplexField(type) {
|
|
750
|
+
return function (target, propertyKey) {
|
|
751
|
+
if (!target || !propertyKey) {
|
|
752
|
+
return;
|
|
753
|
+
}
|
|
754
|
+
// warn the programmer if given type was undefined; it's probably an import order glitch that caused this, because decorators seem
|
|
755
|
+
// to be immediately processed when a class is first imported
|
|
756
|
+
if (!type) {
|
|
757
|
+
// eslint-disable-next-line no-console
|
|
758
|
+
console.warn("@ComplexField(type): type was UNDEFINED. Called on prop (" + objectUtils.ObjectUtils.GetClassName(target) + ", " + propertyKey + "). " +
|
|
759
|
+
"Class will not properly serialize and deserialize now. We've always been able to fix this by CHANGING IMPORT ORDERS " +
|
|
760
|
+
"where both classes and their dependencies are used, e.g. factory, repository or models..");
|
|
761
|
+
return;
|
|
762
|
+
}
|
|
763
|
+
Reflect.defineMetadata(PROP_META_KEY$3, type, target, propertyKey);
|
|
764
|
+
};
|
|
765
|
+
}
|
|
766
|
+
// Utility function holder of the ComplexFieldDecorator decorator.
|
|
767
|
+
var ComplexFieldDecorator = /** @class */ (function () {
|
|
768
|
+
function ComplexFieldDecorator() {
|
|
769
|
+
}
|
|
770
|
+
/**
|
|
771
|
+
* Returns whether given property (as a string) on given object is a complex field. A complex field is a field that is decorated
|
|
772
|
+
* with the @ComplexField decorator.
|
|
773
|
+
*/
|
|
774
|
+
ComplexFieldDecorator.IsComplexField = function (target, propertyKey) {
|
|
775
|
+
if (!target || !propertyKey || typeof target !== "object") {
|
|
776
|
+
return false;
|
|
777
|
+
}
|
|
778
|
+
return (notNill_function.notNill(Reflect.getMetadata(PROP_META_KEY$3, target, propertyKey)));
|
|
779
|
+
};
|
|
780
|
+
// Returns the VALUE of the @ComplexField(VALUE) property decorator on the given propertyKey on the given modelObject.
|
|
781
|
+
ComplexFieldDecorator.GetComplexFieldType = function (target, propertyKey) {
|
|
782
|
+
if (!target || !propertyKey || typeof target !== "object") {
|
|
783
|
+
return undefined;
|
|
784
|
+
}
|
|
785
|
+
return Reflect.getMetadata(PROP_META_KEY$3, target, propertyKey);
|
|
786
|
+
};
|
|
787
|
+
return ComplexFieldDecorator;
|
|
788
|
+
}());
|
|
789
|
+
|
|
790
|
+
var PROP_META_KEY$2 = "complexArray";
|
|
791
|
+
/**
|
|
792
|
+
* !! just a TAG DECORATOR for now, there is no code that uses this meta data within the ione connector lib itself.
|
|
793
|
+
*/
|
|
794
|
+
/**
|
|
795
|
+
* Property decorator for properties of businessobject classes that are an array of other strongly typed businessobjects.
|
|
796
|
+
* Ensures that the BusinessObjectFactoryService makes properly typed objects from incoming raw persistence data. Otherwise we couldn't add methods
|
|
797
|
+
* to our own businessobjects and use them, since all fields would be flat data without methods after BusinessObjectFactoryService creation.
|
|
798
|
+
*
|
|
799
|
+
* Usage:
|
|
800
|
+
*
|
|
801
|
+
* @ComplexArray(TransactionLine)
|
|
802
|
+
* public transactionLines: TransactionLine[]
|
|
803
|
+
*/
|
|
804
|
+
function ComplexArray(type) {
|
|
805
|
+
return function (target, propertyKey) {
|
|
806
|
+
if (!target || !propertyKey || typeof target !== "object") {
|
|
807
|
+
return;
|
|
808
|
+
}
|
|
809
|
+
// warn the programmer if given type was undefined; it's probably an import order glitch that caused this, because decorators seem
|
|
810
|
+
// to be immediately processed when a class is first imported
|
|
811
|
+
if (!type) {
|
|
812
|
+
console.warn("@ComplexArray(type): type was UNDEFINED. Called on prop (" + objectUtils.ObjectUtils.GetClassName(target) + ", " + propertyKey + "). " +
|
|
813
|
+
"Class will not properly serialize and deserialize now. We've always been able to fix this by CHANGING IMPORT ORDERS " +
|
|
814
|
+
"where both classes and their dependencies are used, e.g. factory, repository or models..");
|
|
815
|
+
return;
|
|
816
|
+
}
|
|
817
|
+
Reflect.defineMetadata(PROP_META_KEY$2, type, target, propertyKey);
|
|
818
|
+
};
|
|
819
|
+
}
|
|
820
|
+
// Utility function holder of the ComplexArrayDecorator decorator.
|
|
821
|
+
var ComplexArrayDecorator = /** @class */ (function () {
|
|
822
|
+
function ComplexArrayDecorator() {
|
|
823
|
+
}
|
|
824
|
+
/**
|
|
825
|
+
* Returns whether given property (as a string) on given object is a complex array. A complex array is an array field that is decorated
|
|
826
|
+
* with the @ComplexArray decorator.
|
|
827
|
+
*/
|
|
828
|
+
ComplexArrayDecorator.IsComplexArray = function (target, propertyKey) {
|
|
829
|
+
if (!target || !propertyKey || typeof target !== "object") {
|
|
830
|
+
return false;
|
|
831
|
+
}
|
|
832
|
+
return (notNill_function.notNill(Reflect.getMetadata(PROP_META_KEY$2, target, propertyKey)));
|
|
833
|
+
};
|
|
834
|
+
/**
|
|
835
|
+
* Returns the VALUE of the @ComplexArray(VALUE) property decorator on the given propertyKey on the given modelobject.
|
|
836
|
+
*/
|
|
837
|
+
ComplexArrayDecorator.GetComplexArrayType = function (target, propertyKey) {
|
|
838
|
+
if (!target || !propertyKey || typeof target !== "object") {
|
|
839
|
+
return undefined;
|
|
840
|
+
}
|
|
841
|
+
return Reflect.getMetadata(PROP_META_KEY$2, target, propertyKey);
|
|
842
|
+
};
|
|
843
|
+
return ComplexArrayDecorator;
|
|
844
|
+
}());
|
|
845
|
+
|
|
846
|
+
var PROP_META_KEY_JN = "booleanTextJN";
|
|
847
|
+
var PROP_META_KEY_TF = "booleanTextTF";
|
|
848
|
+
var PROP_META_KEY_10 = "booleanText10";
|
|
849
|
+
/**
|
|
850
|
+
* There are 'J', 'T', 'N', 'F', 0 and 1 'boolean values' in the database. These should be translated to true and false boolean values in
|
|
851
|
+
* our client application.
|
|
852
|
+
*
|
|
853
|
+
* The values 'J' and 'N' seem to be most commonly used. This is the default setting when using this decorator.
|
|
854
|
+
* You can pass 'T' or 1 for the other variants as follows:
|
|
855
|
+
*
|
|
856
|
+
* Usage:
|
|
857
|
+
*
|
|
858
|
+
* @BooleanText() or @BooleanText("J") (the default, uses YesNoDbType char values)
|
|
859
|
+
* public foo: boolean // 'J' and 'N' become true and false after BusinessObjectFactoryService and -SerializerService processing
|
|
860
|
+
*
|
|
861
|
+
* @BooleanText('T') (uses TrueFalseDbType char values)
|
|
862
|
+
* public bar: boolean // 'T' and 'F' become true and false after BusinessObjectFactoryService and -SerializerService processing
|
|
863
|
+
*
|
|
864
|
+
* @BooleanText(1)
|
|
865
|
+
* public baz: boolean // 1 and 0 become true and false after BusinessObjectFactoryService and -SerializerService processing
|
|
866
|
+
*/
|
|
867
|
+
function BooleanText(type) {
|
|
868
|
+
return function (target, propertyKey) {
|
|
869
|
+
if (!target || !propertyKey) {
|
|
870
|
+
return;
|
|
871
|
+
}
|
|
872
|
+
// by default, it's a J N boolean text
|
|
873
|
+
if (!type || type === "J") {
|
|
874
|
+
Reflect.defineMetadata(PROP_META_KEY_JN, true, target, propertyKey);
|
|
875
|
+
}
|
|
876
|
+
else if (type === "T") {
|
|
877
|
+
Reflect.defineMetadata(PROP_META_KEY_TF, true, target, propertyKey);
|
|
878
|
+
}
|
|
879
|
+
else if (type === 1) {
|
|
880
|
+
Reflect.defineMetadata(PROP_META_KEY_10, true, target, propertyKey);
|
|
881
|
+
}
|
|
882
|
+
};
|
|
883
|
+
}
|
|
884
|
+
// Utility function holder of the BooleanTextDecorator decorator.
|
|
885
|
+
var BooleanTextDecorator = /** @class */ (function () {
|
|
886
|
+
function BooleanTextDecorator() {
|
|
887
|
+
}
|
|
888
|
+
/**
|
|
889
|
+
* Returns whether given property (as a string) on given object is a boolean text field. That is, it's a field that is decorated
|
|
890
|
+
* with the @BooleanText decorator.
|
|
891
|
+
*/
|
|
892
|
+
BooleanTextDecorator.IsBooleanTextField = function (target, propertyKey) {
|
|
893
|
+
if (!target || !propertyKey || typeof target !== "object") {
|
|
894
|
+
return false;
|
|
895
|
+
}
|
|
896
|
+
return (Reflect.getMetadata(PROP_META_KEY_JN, target, propertyKey) === true
|
|
897
|
+
||
|
|
898
|
+
Reflect.getMetadata(PROP_META_KEY_TF, target, propertyKey) === true
|
|
899
|
+
||
|
|
900
|
+
Reflect.getMetadata(PROP_META_KEY_10, target, propertyKey) === true);
|
|
901
|
+
};
|
|
902
|
+
/**
|
|
903
|
+
* Returns the logical true or false value of given character ('J', 'N', 'T' or 'F') or number (0 or 1).
|
|
904
|
+
* Returns UNDEFINED if given boolChar was not recognised as a boolean text.
|
|
905
|
+
*/
|
|
906
|
+
BooleanTextDecorator.GetLogicalBooleanValue = function (dbBoolChar) {
|
|
907
|
+
return dbBooleanValueType_enum.GetLogicalBooleanValue(dbBoolChar);
|
|
908
|
+
};
|
|
909
|
+
/**
|
|
910
|
+
* Returns the boolean character / number of given logical bool property on target object. Uses its @BooleanText() annotation to decide
|
|
911
|
+
* what character / number to return.
|
|
912
|
+
* Used in BusinessObjectSerializerServiceService to convert logical bools to their original boolean character.
|
|
913
|
+
* @returns {string|number} The original, reverse-engineered boolean character (or number) of given object property, or undefined.
|
|
914
|
+
*/
|
|
915
|
+
BooleanTextDecorator.GetDbBooleanValue = function (target, propertyKey) {
|
|
916
|
+
if (!target || !propertyKey || typeof target !== "object") {
|
|
917
|
+
return undefined;
|
|
918
|
+
}
|
|
919
|
+
var dbBoolVal = undefined;
|
|
920
|
+
var curBoolVal = target[propertyKey];
|
|
921
|
+
if (BooleanTextDecorator._IsJaNeeProp(target, propertyKey)) {
|
|
922
|
+
dbBoolVal = yesNoDbType_enum.GetYesNoDbBooleanValue(curBoolVal);
|
|
923
|
+
}
|
|
924
|
+
else if (BooleanTextDecorator._IsTrueFalseProp(target, propertyKey)) {
|
|
925
|
+
dbBoolVal = trueFalseDbType_enum.GetTrueFalseDbBooleanValue(curBoolVal);
|
|
926
|
+
}
|
|
927
|
+
else if (BooleanTextDecorator._IsZeroOneProp(target, propertyKey)) {
|
|
928
|
+
dbBoolVal = oneZeroBoolDbType_enum.GetOneZeroDbBooleanValue(curBoolVal);
|
|
929
|
+
}
|
|
930
|
+
return dbBoolVal;
|
|
931
|
+
};
|
|
932
|
+
BooleanTextDecorator._IsJaNeeProp = function (target, propertyKey) {
|
|
933
|
+
return BooleanTextDecorator._IsProp(PROP_META_KEY_JN, target, propertyKey);
|
|
934
|
+
};
|
|
935
|
+
BooleanTextDecorator._IsTrueFalseProp = function (target, propertyKey) {
|
|
936
|
+
return BooleanTextDecorator._IsProp(PROP_META_KEY_TF, target, propertyKey);
|
|
937
|
+
};
|
|
938
|
+
BooleanTextDecorator._IsZeroOneProp = function (target, propertyKey) {
|
|
939
|
+
return BooleanTextDecorator._IsProp(PROP_META_KEY_10, target, propertyKey);
|
|
940
|
+
};
|
|
941
|
+
BooleanTextDecorator._IsProp = function (prop, target, propertyKey) {
|
|
942
|
+
return !!target && !!propertyKey && typeof target === "object" && Reflect.hasMetadata(prop, target, propertyKey);
|
|
943
|
+
};
|
|
944
|
+
return BooleanTextDecorator;
|
|
945
|
+
}());
|
|
946
|
+
|
|
947
|
+
var PROP_META_KEY$1 = "dateField";
|
|
948
|
+
/**
|
|
949
|
+
* !! just a TAG DECORATOR for now, there is no code that uses this meta data within the ione connector lib itself.
|
|
950
|
+
*/
|
|
951
|
+
/**
|
|
952
|
+
* Property decorator for properties of businessobject classes that are of type Date, but are sent to us as strings.
|
|
953
|
+
* Ensures that the BusinessObjectFactory makes proper JavaScript Date objects from incoming strings for @DateField() decorated properties.
|
|
954
|
+
*
|
|
955
|
+
* Usage:
|
|
956
|
+
*
|
|
957
|
+
* @DateField()
|
|
958
|
+
* public expectedDeliveryDate: Date
|
|
959
|
+
*/
|
|
960
|
+
function DateField() {
|
|
961
|
+
return function (target, propertyKey) {
|
|
962
|
+
if (!target || !propertyKey) {
|
|
963
|
+
return;
|
|
964
|
+
}
|
|
965
|
+
Reflect.defineMetadata(PROP_META_KEY$1, undefined, target, propertyKey);
|
|
966
|
+
};
|
|
967
|
+
}
|
|
968
|
+
// Utility function holder of the @DateField() decorator.
|
|
969
|
+
var DateFieldFieldDecorator = /** @class */ (function () {
|
|
970
|
+
function DateFieldFieldDecorator() {
|
|
971
|
+
}
|
|
972
|
+
// Returns whether given property (as a string) on given object is decorated with @DateField().
|
|
973
|
+
DateFieldFieldDecorator.IsDateField = function (target, propertyKey) {
|
|
974
|
+
if (!target || !propertyKey || typeof target !== "object") {
|
|
975
|
+
return false;
|
|
976
|
+
}
|
|
977
|
+
return Reflect.hasMetadata(PROP_META_KEY$1, target, propertyKey);
|
|
978
|
+
};
|
|
979
|
+
DateFieldFieldDecorator.StringAsDate = function (str) {
|
|
980
|
+
return dateUtils.DateUtils.StringAsDate(str);
|
|
981
|
+
};
|
|
982
|
+
return DateFieldFieldDecorator;
|
|
983
|
+
}());
|
|
984
|
+
|
|
985
|
+
var PROP_META_KEY = "stringNumber";
|
|
986
|
+
/**
|
|
987
|
+
* !! just a TAG DECORATOR for now, there is no code that uses this meta data within the ione connector lib itself.
|
|
988
|
+
*/
|
|
989
|
+
/**
|
|
990
|
+
* Decorator for properties of businessobjects that are sent to us as strings from the database, but which we want to use as a number in the client.
|
|
991
|
+
*
|
|
992
|
+
* Can be handy for incongruent backend api cases, where id data types are communicated wrongly via strings instead of numbers
|
|
993
|
+
* (e.g. on EmployeeFullObject.district, points to a District which has a number id, but in employee it's a string representation of that number...)
|
|
994
|
+
*
|
|
995
|
+
* Used by business object factory and -serializer.
|
|
996
|
+
*
|
|
997
|
+
* Usage:
|
|
998
|
+
*
|
|
999
|
+
* @StringNumber()
|
|
1000
|
+
* public rights: UserRightType
|
|
1001
|
+
*/
|
|
1002
|
+
function StringNumber() {
|
|
1003
|
+
return function (target, propertyKey) {
|
|
1004
|
+
if (!target || !propertyKey) {
|
|
1005
|
+
return;
|
|
1006
|
+
}
|
|
1007
|
+
Reflect.defineMetadata(PROP_META_KEY, undefined, target, propertyKey);
|
|
1008
|
+
};
|
|
1009
|
+
}
|
|
1010
|
+
// Utility function holder of the @StringNumber() decorator.
|
|
1011
|
+
var StringNumberDecorator = /** @class */ (function () {
|
|
1012
|
+
function StringNumberDecorator() {
|
|
1013
|
+
}
|
|
1014
|
+
// Returns whether given property (as a string) on given object is decorated with @StringNumber().
|
|
1015
|
+
StringNumberDecorator.IsStringNumber = function (target, propertyKey) {
|
|
1016
|
+
if (!target || !propertyKey || typeof target !== "object") {
|
|
1017
|
+
return false;
|
|
1018
|
+
}
|
|
1019
|
+
return Reflect.hasMetadata(PROP_META_KEY, target, propertyKey);
|
|
1020
|
+
};
|
|
1021
|
+
StringNumberDecorator.StringAsNumber = function (str) {
|
|
1022
|
+
return numberUtils.NumberUtils.ParseFloatKeepPrecision(str);
|
|
1023
|
+
};
|
|
1024
|
+
StringNumberDecorator.NumberAsString = function (nr) {
|
|
1025
|
+
return "" + nr;
|
|
1026
|
+
};
|
|
1027
|
+
return StringNumberDecorator;
|
|
1028
|
+
}());
|
|
1029
|
+
|
|
1030
|
+
// @returns true iff given value equals null or equals undefined
|
|
1031
|
+
function isNill(value) {
|
|
1032
|
+
return value === null || value === undefined;
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1035
|
+
var ArrayUtils = /** @class */ (function () {
|
|
1036
|
+
function ArrayUtils() {
|
|
1037
|
+
}
|
|
1038
|
+
/**
|
|
1039
|
+
* Returns whether at least one element in given array could be found by given finder function.
|
|
1040
|
+
*
|
|
1041
|
+
* @param {T[]} array
|
|
1042
|
+
* @param {(element: T) => boolean} finder A finder function that takes an element of the array and returns a boolean that represents
|
|
1043
|
+
* the 'found status' for that element; whether it should have been found or not.
|
|
1044
|
+
*/
|
|
1045
|
+
ArrayUtils.ContainsAnElementFoundBy = function (array, finder) {
|
|
1046
|
+
if (!array || !finder) {
|
|
1047
|
+
return false;
|
|
1048
|
+
}
|
|
1049
|
+
return notNill_function.notNill(this.Find(array, finder));
|
|
1050
|
+
};
|
|
1051
|
+
/**
|
|
1052
|
+
* Cross-browser Array.find() function. Returns the first item in given array for which the foundBy function returns true. Returns
|
|
1053
|
+
* undefined when none was found.
|
|
1054
|
+
*
|
|
1055
|
+
* Example usage:
|
|
1056
|
+
* const foundItem: BusinessObject = ArrayUtils.Find<BusinessObject>(modelArray, (modelItem: BusinessObject) => <br>
|
|
1057
|
+
* (return modelItem.getId() === '1')
|
|
1058
|
+
* * });
|
|
1059
|
+
*
|
|
1060
|
+
* @param array The array with items to search in.
|
|
1061
|
+
* @param foundBy The finder function applied on each items of the array, when that returns true, the item is considered found.
|
|
1062
|
+
*/
|
|
1063
|
+
ArrayUtils.Find = function (array, foundBy) {
|
|
1064
|
+
if (!array || !foundBy) {
|
|
1065
|
+
return undefined;
|
|
1066
|
+
}
|
|
1067
|
+
for (var i = 0, len = array.length; i < len; i++) {
|
|
1068
|
+
var itemCur = array[i];
|
|
1069
|
+
if (foundBy(itemCur)) {
|
|
1070
|
+
return itemCur;
|
|
1071
|
+
}
|
|
1072
|
+
}
|
|
1073
|
+
return undefined;
|
|
1074
|
+
};
|
|
1075
|
+
// @returns empty array when nothing found, otherwise array with found items
|
|
1076
|
+
ArrayUtils.FindAll = function (array, foundBy) {
|
|
1077
|
+
var answer = [];
|
|
1078
|
+
if (!array || !foundBy) {
|
|
1079
|
+
return answer;
|
|
1080
|
+
}
|
|
1081
|
+
for (var i = 0, len = array.length; i < len; i++) {
|
|
1082
|
+
var itemCur = array[i];
|
|
1083
|
+
if (foundBy(itemCur)) {
|
|
1084
|
+
answer.push(itemCur);
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
return answer;
|
|
1088
|
+
};
|
|
1089
|
+
// returns a simple clone of given array, using array.slice(0)
|
|
1090
|
+
ArrayUtils.CloneArray = function (array) {
|
|
1091
|
+
var answer = [];
|
|
1092
|
+
if (array) {
|
|
1093
|
+
answer = array.slice(0);
|
|
1094
|
+
}
|
|
1095
|
+
return answer;
|
|
1096
|
+
};
|
|
1097
|
+
/**
|
|
1098
|
+
* Returns a 'semi deep clone' of given array. Its first-level members are object-shallow-cloned (optionally with a strongly typed constructor),
|
|
1099
|
+
* or just as plain object (see param arrayItemsClass).
|
|
1100
|
+
* @param array
|
|
1101
|
+
* @param arrayItemsClass If provided, the cloned array's first-level items will be strongly typed to / constructed as this class. Otherwise
|
|
1102
|
+
* it'll be a plain object.
|
|
1103
|
+
* @param deepClone Set to true if array items contain FUNCTIONS that need to be cloned..
|
|
1104
|
+
* @returns {Array} semi-deep clone of given array
|
|
1105
|
+
*/
|
|
1106
|
+
ArrayUtils.CloneArrayAndItsItems = function (array, arrayItemsClass, deepClone) {
|
|
1107
|
+
if (deepClone === void 0) { deepClone = false; }
|
|
1108
|
+
var cloneArray = [];
|
|
1109
|
+
if (array) {
|
|
1110
|
+
for (var i = 0, len = array.length; i < len; i++) {
|
|
1111
|
+
if (deepClone) {
|
|
1112
|
+
cloneArray.push(objectUtils.ObjectUtils.GetDeepClone(array[i]));
|
|
1113
|
+
}
|
|
1114
|
+
else {
|
|
1115
|
+
cloneArray.push(objectUtils.ObjectUtils.GetShallowClone(array[i], arrayItemsClass));
|
|
1116
|
+
}
|
|
1117
|
+
}
|
|
1118
|
+
}
|
|
1119
|
+
else {
|
|
1120
|
+
return [];
|
|
1121
|
+
}
|
|
1122
|
+
return cloneArray;
|
|
1123
|
+
};
|
|
1124
|
+
/**
|
|
1125
|
+
* Removes element at given index from given array. Doesn't just set it to null like JavaScripts standard 'delete' does, but really
|
|
1126
|
+
* removes the element using splice().
|
|
1127
|
+
*
|
|
1128
|
+
* @param {number} index
|
|
1129
|
+
* @param {any[]} array in-out
|
|
1130
|
+
* @returns {boolean} True if and only if the element on given index is succesfully removed from given array.
|
|
1131
|
+
*/
|
|
1132
|
+
ArrayUtils.RemoveElementAtIndex = function (index, array) {
|
|
1133
|
+
if (numberUtils.NumberUtils.IsNaN(index) || index < 0 || !Array.isArray(array) || array.length === 0) {
|
|
1134
|
+
return false;
|
|
1135
|
+
}
|
|
1136
|
+
if (index in array) {
|
|
1137
|
+
array.splice(index, 1);
|
|
1138
|
+
return true;
|
|
1139
|
+
}
|
|
1140
|
+
else {
|
|
1141
|
+
return false;
|
|
1142
|
+
}
|
|
1143
|
+
};
|
|
1144
|
+
/**
|
|
1145
|
+
* Removes given element from given array. Doesn't just set it to null like JavaScripts standard 'delete' does, but really removes the
|
|
1146
|
+
* element using splice(). Also works on associative arrays.
|
|
1147
|
+
*
|
|
1148
|
+
* @param {T} element The element to remove.
|
|
1149
|
+
* @param {T[]} array The array to remove the element from.
|
|
1150
|
+
* @returns {boolean} True iff given element was truly successfully removed from given array.
|
|
1151
|
+
*/
|
|
1152
|
+
ArrayUtils.RemoveElement = function (element, array) {
|
|
1153
|
+
if (!Array.isArray(array)) {
|
|
1154
|
+
return false;
|
|
1155
|
+
}
|
|
1156
|
+
var index = array.indexOf(element);
|
|
1157
|
+
return ArrayUtils.RemoveElementAtIndex(index, array);
|
|
1158
|
+
};
|
|
1159
|
+
// Checks if given array is defined, and is an array, and has length > 0, and, optionally checks that the first element is of type given clazz.
|
|
1160
|
+
ArrayUtils.IsArrayWithElements = function (arrayToCheck, classItemsMustBeInstanceOf) {
|
|
1161
|
+
if (isNill_function.isNill(arrayToCheck)) {
|
|
1162
|
+
return false;
|
|
1163
|
+
}
|
|
1164
|
+
if (Array.isArray(arrayToCheck) && arrayToCheck.length > 0) {
|
|
1165
|
+
if (classItemsMustBeInstanceOf) {
|
|
1166
|
+
return arrayToCheck[0] instanceof classItemsMustBeInstanceOf;
|
|
1167
|
+
}
|
|
1168
|
+
else {
|
|
1169
|
+
return true;
|
|
1170
|
+
}
|
|
1171
|
+
}
|
|
1172
|
+
else {
|
|
1173
|
+
return false;
|
|
1174
|
+
}
|
|
1175
|
+
};
|
|
1176
|
+
// Removes all elements from given array for which given filter function holds true. Returns true if at least one removed, else false.
|
|
1177
|
+
ArrayUtils.RemoveElementsByFilter = function (array, filterFunction) {
|
|
1178
|
+
if (!ArrayUtils.IsArrayWithElements(array) || !filterFunction) {
|
|
1179
|
+
return false;
|
|
1180
|
+
}
|
|
1181
|
+
var atLeastOneRemoved = false;
|
|
1182
|
+
var len = array.length;
|
|
1183
|
+
for (var i = len - 1; i >= 0; i--) {
|
|
1184
|
+
var item = array[i];
|
|
1185
|
+
if (filterFunction.call(this, item) === true) {
|
|
1186
|
+
array.splice(i, 1);
|
|
1187
|
+
atLeastOneRemoved = true;
|
|
1188
|
+
}
|
|
1189
|
+
}
|
|
1190
|
+
return atLeastOneRemoved;
|
|
1191
|
+
};
|
|
1192
|
+
ArrayUtils.MoveElement = function (element, toIndex, array) {
|
|
1193
|
+
if (!Array.isArray(array) || isNill_function.isNill(toIndex)) {
|
|
1194
|
+
return false;
|
|
1195
|
+
}
|
|
1196
|
+
var fromIndex = array.indexOf(element);
|
|
1197
|
+
var toIndexCorrected = numberUtils.NumberUtils.GetNearestNumberWithinBounds(toIndex, 0, array.length - 1);
|
|
1198
|
+
if (fromIndex === -1 || array[toIndexCorrected] === element) {
|
|
1199
|
+
// element did not exist in given array, or already existed on given toIndex
|
|
1200
|
+
return false;
|
|
1201
|
+
}
|
|
1202
|
+
array.splice(toIndexCorrected, 0, array.splice(fromIndex, 1)[0]);
|
|
1203
|
+
return true;
|
|
1204
|
+
};
|
|
1205
|
+
// PRE: elements exists in given array. POST: given elementToPlace has a lower index than given afterThisElement. Array is in-out manipulated.
|
|
1206
|
+
ArrayUtils.PlaceElementAfterOther = function (array, elementToPlace, afterThisElement) {
|
|
1207
|
+
if (array) {
|
|
1208
|
+
var afterThisElIdx = array.indexOf(afterThisElement);
|
|
1209
|
+
var elToPlaceIdx = array.indexOf(elementToPlace);
|
|
1210
|
+
if (afterThisElIdx >= elToPlaceIdx) {
|
|
1211
|
+
ArrayUtils.MoveElement(elementToPlace, afterThisElIdx + 1, array);
|
|
1212
|
+
}
|
|
1213
|
+
}
|
|
1214
|
+
};
|
|
1215
|
+
return ArrayUtils;
|
|
1216
|
+
}());
|
|
1217
|
+
|
|
1218
|
+
/**
|
|
1219
|
+
* This type represents the concept of a business object ID type. ID's of business objects can be a primary number, a simple string or a
|
|
1220
|
+
* object for a composite key.
|
|
1221
|
+
*
|
|
1222
|
+
* Simply to prevent type declarations of 'number | string | Object' for BO ID data all over the application.
|
|
1223
|
+
*/
|
|
1224
|
+
var BusinessObject = /** @class */ (function () {
|
|
1225
|
+
function BusinessObject() {
|
|
1226
|
+
}
|
|
1227
|
+
// Overridable. Returns the ID of the model. Concrete model classes often override this method to provide their specific ID getter.
|
|
1228
|
+
BusinessObject.prototype.getId = function () {
|
|
1229
|
+
return this.id;
|
|
1230
|
+
};
|
|
1231
|
+
BusinessObject.prototype.setOwnMappedPropsFromRawData = function (rawData) {
|
|
1232
|
+
var _this = this;
|
|
1233
|
+
if (rawData === void 0) { rawData = {}; }
|
|
1234
|
+
if (!rawData) {
|
|
1235
|
+
return;
|
|
1236
|
+
}
|
|
1237
|
+
Object.keys(this).forEach(function (key) {
|
|
1238
|
+
// check if property needs to be mapped
|
|
1239
|
+
if (mapProperty_decorator.MapPropertyDecorator.IsMapProperty(_this, key)) {
|
|
1240
|
+
var mapKeys = mapProperty_decorator.MapPropertyDecorator.GetMapProperty(_this, key).split(",");
|
|
1241
|
+
var len = mapKeys.length;
|
|
1242
|
+
for (var i = 0; i < len; i++) {
|
|
1243
|
+
// eslint-disable-next-line
|
|
1244
|
+
var mapKey = mapKeys[i].trim();
|
|
1245
|
+
var objProp = rawData[mapKey];
|
|
1246
|
+
var decorated = false;
|
|
1247
|
+
if (rawData.hasOwnProperty(mapKey)) {
|
|
1248
|
+
if (boolean_decorator.BooleanTextDecorator.IsBooleanTextField(_this, key)) {
|
|
1249
|
+
_this[key] = boolean_decorator.BooleanTextDecorator.GetLogicalBooleanValue(objProp);
|
|
1250
|
+
decorated = true;
|
|
1251
|
+
}
|
|
1252
|
+
if (json_decorator.JsonFieldFieldDecorator.IsJsonField(_this, key)) {
|
|
1253
|
+
_this[key] = json_decorator.JsonFieldFieldDecorator.StringAsJson(objProp);
|
|
1254
|
+
decorated = true;
|
|
1255
|
+
}
|
|
1256
|
+
if (complexArray_decorator.ComplexArrayDecorator.IsComplexArray(_this, key)) {
|
|
1257
|
+
var arrayClass = complexArray_decorator.ComplexArrayDecorator.GetComplexArrayType(_this, key);
|
|
1258
|
+
// eslint-disable-next-line
|
|
1259
|
+
var origArray = _this[key];
|
|
1260
|
+
// eslint-disable-next-line
|
|
1261
|
+
var newArray = [];
|
|
1262
|
+
// eslint-disable-next-line @typescript-eslint/prefer-for-of
|
|
1263
|
+
for (var j = 0; j < origArray.length; j++) {
|
|
1264
|
+
// eslint-disable-next-line
|
|
1265
|
+
var item = new arrayClass(origArray[j]);
|
|
1266
|
+
newArray.push(item);
|
|
1267
|
+
}
|
|
1268
|
+
_this[key] = newArray;
|
|
1269
|
+
}
|
|
1270
|
+
else {
|
|
1271
|
+
if (!decorated) {
|
|
1272
|
+
_this[key] = objProp;
|
|
1273
|
+
}
|
|
1274
|
+
}
|
|
1275
|
+
break;
|
|
1276
|
+
}
|
|
1277
|
+
}
|
|
1278
|
+
}
|
|
1279
|
+
else {
|
|
1280
|
+
if (rawData.hasOwnProperty(key)) {
|
|
1281
|
+
var objProp = rawData[key];
|
|
1282
|
+
if (boolean_decorator.BooleanTextDecorator.IsBooleanTextField(_this, key)) {
|
|
1283
|
+
_this[key] = boolean_decorator.BooleanTextDecorator.GetLogicalBooleanValue(objProp);
|
|
1284
|
+
}
|
|
1285
|
+
else if (json_decorator.JsonFieldFieldDecorator.IsJsonField(_this, key)) {
|
|
1286
|
+
_this[key] = json_decorator.JsonFieldFieldDecorator.StringAsJson(objProp);
|
|
1287
|
+
}
|
|
1288
|
+
else {
|
|
1289
|
+
_this[key] = objProp;
|
|
1290
|
+
}
|
|
1291
|
+
}
|
|
1292
|
+
}
|
|
1293
|
+
});
|
|
1294
|
+
};
|
|
1295
|
+
return BusinessObject;
|
|
1296
|
+
}());
|
|
1297
|
+
|
|
1298
|
+
// Factory service creates businessobjects, using their decorators in the process.
|
|
1299
|
+
var BusinessObjectFactory = /** @class */ (function () {
|
|
1300
|
+
function BusinessObjectFactory() {
|
|
1301
|
+
}
|
|
1302
|
+
/**
|
|
1303
|
+
* Creates and returns a new business data object instance of given class, with all given data properties applied to it in a
|
|
1304
|
+
* complex-aware style. That is, all properties on given class that are decorated with @ComplexField(..) or @ComplexArray(..) decorators
|
|
1305
|
+
* become strongly typed business objects, with methods that are usable and such.
|
|
1306
|
+
*
|
|
1307
|
+
* @param modelClass
|
|
1308
|
+
* @param {Object} rawData The object with all (possibly raw/flat/not alive) data to be applied to the created model object
|
|
1309
|
+
*/
|
|
1310
|
+
BusinessObjectFactory.prototype.makeWithRawBackendData = function (modelClass, rawData) {
|
|
1311
|
+
if (!modelClass) {
|
|
1312
|
+
return undefined;
|
|
1313
|
+
}
|
|
1314
|
+
if (typeof modelClass !== typeof BusinessObject) {
|
|
1315
|
+
return undefined;
|
|
1316
|
+
}
|
|
1317
|
+
var model = new modelClass();
|
|
1318
|
+
this._copyAllPropertiesDecoratorProcessedFrom(rawData, model);
|
|
1319
|
+
return model;
|
|
1320
|
+
};
|
|
1321
|
+
// see makeWithRawBackendData, this is a loop-wrapper around that method
|
|
1322
|
+
BusinessObjectFactory.prototype.makeBOArrayFromRawBackendDataArray = function (modelClass, arrayOfRawDatas) {
|
|
1323
|
+
if (!modelClass) {
|
|
1324
|
+
return undefined;
|
|
1325
|
+
}
|
|
1326
|
+
var trueClientBos = [];
|
|
1327
|
+
if (arrayOfRawDatas) {
|
|
1328
|
+
for (var i = 0, len = arrayOfRawDatas.length; i < len; i++) {
|
|
1329
|
+
trueClientBos.push(this.makeWithRawBackendData(modelClass, arrayOfRawDatas[i]));
|
|
1330
|
+
}
|
|
1331
|
+
}
|
|
1332
|
+
return trueClientBos;
|
|
1333
|
+
};
|
|
1334
|
+
BusinessObjectFactory.prototype.instantiateNewBo = function (modelClass) {
|
|
1335
|
+
return this.makeWithRawBackendData(modelClass, {});
|
|
1336
|
+
};
|
|
1337
|
+
/**
|
|
1338
|
+
* Applies all properties of given 'source' object to the given 'destination' businessobject, if destination has that property.
|
|
1339
|
+
* Works with the @ComplexField(), @ComplexArray, @BooleanText, @CoInject and @DateField annotations of given destination model.
|
|
1340
|
+
*
|
|
1341
|
+
* @param sourceData Raw data to copy to destination model
|
|
1342
|
+
* @param {BusinessObject} destinationModel InOut: The annotated businessobject to apply source properties to
|
|
1343
|
+
*/
|
|
1344
|
+
BusinessObjectFactory.prototype._copyAllPropertiesDecoratorProcessedFrom = function (sourceData, destinationModel) {
|
|
1345
|
+
if (!sourceData || !destinationModel) {
|
|
1346
|
+
return;
|
|
1347
|
+
}
|
|
1348
|
+
// process all source data into destinationModel
|
|
1349
|
+
for (var srcPropKey in sourceData) {
|
|
1350
|
+
if (!sourceData.hasOwnProperty(srcPropKey)) {
|
|
1351
|
+
continue;
|
|
1352
|
+
}
|
|
1353
|
+
var srcPropVal = sourceData[srcPropKey];
|
|
1354
|
+
if (ComplexFieldDecorator.IsComplexField(destinationModel, srcPropKey)) {
|
|
1355
|
+
var classOfField = ComplexFieldDecorator.GetComplexFieldType(destinationModel, srcPropKey);
|
|
1356
|
+
destinationModel[srcPropKey] = this.makeWithRawBackendData(classOfField, srcPropVal);
|
|
1357
|
+
}
|
|
1358
|
+
else if (ComplexArrayDecorator.IsComplexArray(destinationModel, srcPropKey)) {
|
|
1359
|
+
var sourceArray = srcPropVal;
|
|
1360
|
+
if (!sourceArray) {
|
|
1361
|
+
continue;
|
|
1362
|
+
}
|
|
1363
|
+
var classOfArrayItems = ComplexArrayDecorator.GetComplexArrayType(destinationModel, srcPropKey);
|
|
1364
|
+
var tempArray = [];
|
|
1365
|
+
for (var i = 0, len = sourceArray.length; i < len; i++) {
|
|
1366
|
+
tempArray.push(this.makeWithRawBackendData(classOfArrayItems, sourceArray[i]));
|
|
1367
|
+
}
|
|
1368
|
+
destinationModel[srcPropKey] = tempArray;
|
|
1369
|
+
}
|
|
1370
|
+
else if (BooleanTextDecorator.IsBooleanTextField(destinationModel, srcPropKey)) {
|
|
1371
|
+
// logical 'true' and 'false' also allowed as incoming values for @BooleanText() properties: then just copy their value
|
|
1372
|
+
if (typeof srcPropVal === "boolean") {
|
|
1373
|
+
destinationModel[srcPropKey] = srcPropVal;
|
|
1374
|
+
// here, it should be a 'J' or 'N' (or 'T' or 'F'): assign the associated boolean value
|
|
1375
|
+
}
|
|
1376
|
+
else {
|
|
1377
|
+
destinationModel[srcPropKey] = BooleanTextDecorator.GetLogicalBooleanValue(srcPropVal);
|
|
1378
|
+
}
|
|
1379
|
+
}
|
|
1380
|
+
else if (DateFieldFieldDecorator.IsDateField(destinationModel, srcPropKey)) {
|
|
1381
|
+
destinationModel[srcPropKey] = DateFieldFieldDecorator.StringAsDate(srcPropVal);
|
|
1382
|
+
}
|
|
1383
|
+
else if (StringNumberDecorator.IsStringNumber(destinationModel, srcPropKey)) {
|
|
1384
|
+
destinationModel[srcPropKey] = StringNumberDecorator.StringAsNumber(srcPropVal);
|
|
1385
|
+
}
|
|
1386
|
+
// non-decorated prop
|
|
1387
|
+
else {
|
|
1388
|
+
if (isNill(srcPropVal)) {
|
|
1389
|
+
destinationModel[srcPropKey] = undefined;
|
|
1390
|
+
}
|
|
1391
|
+
else if (Array.isArray(srcPropVal)) {
|
|
1392
|
+
destinationModel[srcPropKey] = ArrayUtils.CloneArray(srcPropVal);
|
|
1393
|
+
}
|
|
1394
|
+
else if (typeof srcPropVal === "object") {
|
|
1395
|
+
if (srcPropVal instanceof Map) { //just copy the value in case of maps
|
|
1396
|
+
destinationModel[srcPropKey] = srcPropVal;
|
|
1397
|
+
}
|
|
1398
|
+
else {
|
|
1399
|
+
destinationModel[srcPropKey] = Object.assign({}, srcPropVal);
|
|
1400
|
+
}
|
|
1401
|
+
}
|
|
1402
|
+
else {
|
|
1403
|
+
destinationModel[srcPropKey] = srcPropVal;
|
|
1404
|
+
}
|
|
1405
|
+
}
|
|
1406
|
+
}
|
|
1407
|
+
};
|
|
1408
|
+
return BusinessObjectFactory;
|
|
1409
|
+
}());
|
|
1410
|
+
|
|
1411
|
+
var IoneConnectorAdapterService = /** @class */ (function () {
|
|
1412
|
+
function IoneConnectorAdapterService() {
|
|
1413
|
+
this._boFactory = new BusinessObjectFactory();
|
|
1414
|
+
}
|
|
1415
|
+
IoneConnectorAdapterService.prototype.connect = function (options) {
|
|
1416
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1417
|
+
return __generator(this, function (_a) {
|
|
1418
|
+
this.options = options;
|
|
1419
|
+
this.connector = new articles.Articles(options);
|
|
1420
|
+
this.sharedConnector = new sharedapi.Sharedapi(options);
|
|
1421
|
+
this.options.session = this.connector.session && this.sharedConnector.session;
|
|
1422
|
+
return [2 /*return*/];
|
|
1423
|
+
});
|
|
1424
|
+
});
|
|
1425
|
+
};
|
|
1426
|
+
IoneConnectorAdapterService.prototype.disconnect = function () {
|
|
1427
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1428
|
+
return __generator(this, function (_a) {
|
|
1429
|
+
this.options = undefined;
|
|
1430
|
+
return [2 /*return*/];
|
|
1431
|
+
});
|
|
1432
|
+
});
|
|
1433
|
+
};
|
|
1434
|
+
IoneConnectorAdapterService.prototype.getAllPrinters = function (showAll) {
|
|
1435
|
+
if (showAll === void 0) { showAll = true; }
|
|
1436
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1437
|
+
var _this = this;
|
|
1438
|
+
return __generator(this, function (_a) {
|
|
1439
|
+
return [2 /*return*/, new Promise(function (resolve, reject) {
|
|
1440
|
+
return _this.sharedConnector.listAllPrinters(showAll).then(function (result) {
|
|
1441
|
+
if (result.validationResult && result.validationResult.success) {
|
|
1442
|
+
if (result.resultObject) {
|
|
1443
|
+
resolve(_this._boFactory.makeBOArrayFromRawBackendDataArray(printer_bo.Printer, result.resultObject));
|
|
1444
|
+
}
|
|
1445
|
+
}
|
|
1446
|
+
else {
|
|
1447
|
+
reject(result.validationMessagesAsString);
|
|
1448
|
+
}
|
|
1449
|
+
});
|
|
1450
|
+
})];
|
|
1451
|
+
});
|
|
1452
|
+
});
|
|
1453
|
+
};
|
|
1454
|
+
IoneConnectorAdapterService.prototype.getPrintStockStickers = function (request) {
|
|
1455
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1456
|
+
var _this = this;
|
|
1457
|
+
return __generator(this, function (_a) {
|
|
1458
|
+
return [2 /*return*/, new Promise(function (resolve, reject) {
|
|
1459
|
+
return _this.sharedConnector.getPrintStockStickers(request).then(function (result) {
|
|
1460
|
+
if (result.validationResult && result.validationResult.success) {
|
|
1461
|
+
if (result.resultObject) {
|
|
1462
|
+
resolve(_this._boFactory.makeWithRawBackendData(printStockStickers.PrintStockStickers, result.resultObject));
|
|
1463
|
+
}
|
|
1464
|
+
}
|
|
1465
|
+
else {
|
|
1466
|
+
reject(result.validationMessagesAsString);
|
|
1467
|
+
}
|
|
1468
|
+
});
|
|
1469
|
+
})];
|
|
1470
|
+
});
|
|
1471
|
+
});
|
|
1472
|
+
};
|
|
1473
|
+
// public async getPrintLayouts(defaultPrinterName: PrintJob): Promise<PrintJob> {
|
|
1474
|
+
// return new Promise((resolve: Function, reject: Function) => {
|
|
1475
|
+
// return this.sharedConnector.getPrintTemplates(defaultPrinterName).then((result: DataServiceResponse) => {
|
|
1476
|
+
// if (result.validationResult && result.validationResult.success) {
|
|
1477
|
+
// if (result.resultObject) {
|
|
1478
|
+
// resolve(this._boFactory.makeWithRawBackendData(PrintJob, result.resultObject));
|
|
1479
|
+
// }
|
|
1480
|
+
// } else {
|
|
1481
|
+
// reject(result.validationMessagesAsString);
|
|
1482
|
+
// }
|
|
1483
|
+
// })
|
|
1484
|
+
// })
|
|
1485
|
+
// }
|
|
1486
|
+
IoneConnectorAdapterService.prototype.getStockHistory = function (request) {
|
|
1487
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1488
|
+
var _this = this;
|
|
1489
|
+
return __generator(this, function (_a) {
|
|
1490
|
+
return [2 /*return*/, new Promise(function (resolve, reject) {
|
|
1491
|
+
return _this.connector.getStockHistory(request).then(function (result) {
|
|
1492
|
+
if (result.validationResult && result.validationResult.success) {
|
|
1493
|
+
if (result.resultObject) {
|
|
1494
|
+
resolve(_this._boFactory.makeWithRawBackendData(printJob.PrintJob, result.resultObject));
|
|
1495
|
+
}
|
|
1496
|
+
}
|
|
1497
|
+
else {
|
|
1498
|
+
reject(result.validationMessagesAsString);
|
|
1499
|
+
}
|
|
1500
|
+
});
|
|
1501
|
+
})];
|
|
1502
|
+
});
|
|
1503
|
+
});
|
|
1504
|
+
};
|
|
1505
|
+
IoneConnectorAdapterService.prototype.getArticleFullObject = function (goodId) {
|
|
1506
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1507
|
+
var _this = this;
|
|
1508
|
+
return __generator(this, function (_a) {
|
|
1509
|
+
return [2 /*return*/, new Promise(function (resolve, reject) {
|
|
1510
|
+
return _this.connector.getArticleFullObject(goodId).then(function (result) {
|
|
1511
|
+
// if (result.validationResult && result.validationResult.success) {
|
|
1512
|
+
// if (result.resultObject) {
|
|
1513
|
+
// resolve(this._boFactory.makeWithRawBackendData(ArticleExtended, result.resultObject));
|
|
1514
|
+
// }
|
|
1515
|
+
// } else {
|
|
1516
|
+
// reject(result.validationMessagesAsString);
|
|
1517
|
+
// }
|
|
1518
|
+
});
|
|
1519
|
+
})];
|
|
1520
|
+
});
|
|
1521
|
+
});
|
|
1522
|
+
};
|
|
1523
|
+
IoneConnectorAdapterService.prototype.getArticleFlatObject = function (goodId) {
|
|
1524
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1525
|
+
var _this = this;
|
|
1526
|
+
return __generator(this, function (_a) {
|
|
1527
|
+
return [2 /*return*/, new Promise(function (resolve, reject) {
|
|
1528
|
+
return _this.connector.getArticleFullObject(goodId).then(function (result) {
|
|
1529
|
+
if (result.validationResult && result.validationResult.success) {
|
|
1530
|
+
if (result.resultObject) {
|
|
1531
|
+
resolve(_this._boFactory.makeWithRawBackendData(articleFlat_bo.ArticleFlat, result.resultObject));
|
|
1532
|
+
}
|
|
1533
|
+
}
|
|
1534
|
+
else {
|
|
1535
|
+
reject(result.validationMessagesAsString);
|
|
1536
|
+
}
|
|
1537
|
+
});
|
|
1538
|
+
})];
|
|
1539
|
+
});
|
|
1540
|
+
});
|
|
1541
|
+
};
|
|
1542
|
+
IoneConnectorAdapterService.prototype.getStockInformation = function (data) {
|
|
1543
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1544
|
+
var _this = this;
|
|
1545
|
+
return __generator(this, function (_a) {
|
|
1546
|
+
return [2 /*return*/, new Promise(function (resolve, reject) {
|
|
1547
|
+
return _this.connector.getStockInformation(data).then(function (result) {
|
|
1548
|
+
if (result.validationResult && result.validationResult.success) {
|
|
1549
|
+
if (result.resultObjects) {
|
|
1550
|
+
resolve(_this._boFactory.makeBOArrayFromRawBackendDataArray(articleStock_bo.ArticleStockBo, result.resultObjects));
|
|
1551
|
+
}
|
|
1552
|
+
}
|
|
1553
|
+
else {
|
|
1554
|
+
reject(result.validationMessagesAsString);
|
|
1555
|
+
}
|
|
1556
|
+
});
|
|
1557
|
+
})];
|
|
1558
|
+
});
|
|
1559
|
+
});
|
|
1560
|
+
};
|
|
1561
|
+
IoneConnectorAdapterService.prototype.getWarehouses = function (goodId) {
|
|
1562
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1563
|
+
var _this = this;
|
|
1564
|
+
return __generator(this, function (_a) {
|
|
1565
|
+
return [2 /*return*/, new Promise(function (resolve, reject) {
|
|
1566
|
+
return _this.connector.getWarehouses(goodId).then(function (result) {
|
|
1567
|
+
if (result.validationResult && result.validationResult.success) {
|
|
1568
|
+
if (result.resultObject) {
|
|
1569
|
+
resolve(_this._boFactory.makeWithRawBackendData(articlesPublic.ArticlesPublic, result.resultObject));
|
|
1570
|
+
}
|
|
1571
|
+
}
|
|
1572
|
+
else {
|
|
1573
|
+
reject(result.validationMessagesAsString);
|
|
1574
|
+
}
|
|
1575
|
+
});
|
|
1576
|
+
})];
|
|
1577
|
+
});
|
|
1578
|
+
});
|
|
1579
|
+
};
|
|
1580
|
+
return IoneConnectorAdapterService;
|
|
1581
|
+
}());
|
|
1582
|
+
IoneConnectorAdapterService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function IoneConnectorAdapterService_Factory() { return new IoneConnectorAdapterService(); }, token: IoneConnectorAdapterService, providedIn: "root" });
|
|
1583
|
+
IoneConnectorAdapterService.decorators = [
|
|
1584
|
+
{ type: i0.Injectable, args: [{
|
|
1585
|
+
providedIn: "root"
|
|
1586
|
+
},] }
|
|
1587
|
+
];
|
|
1588
|
+
IoneConnectorAdapterService.ctorParameters = function () { return []; };
|
|
1589
|
+
|
|
1590
|
+
var StockService = /** @class */ (function () {
|
|
1591
|
+
function StockService(_connector) {
|
|
1592
|
+
this._connector = _connector;
|
|
1593
|
+
}
|
|
1594
|
+
StockService.prototype.connectConnector = function (options) {
|
|
1595
|
+
this._connector.connect(options);
|
|
1596
|
+
};
|
|
1597
|
+
StockService.prototype.getPrintStockStickers = function (data) {
|
|
1598
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1599
|
+
return __generator(this, function (_a) {
|
|
1600
|
+
switch (_a.label) {
|
|
1601
|
+
case 0: return [4 /*yield*/, this._connector.getPrintStockStickers(data)];
|
|
1602
|
+
case 1:
|
|
1603
|
+
_a.sent();
|
|
1604
|
+
return [2 /*return*/];
|
|
1605
|
+
}
|
|
1606
|
+
});
|
|
1607
|
+
});
|
|
1608
|
+
};
|
|
1609
|
+
StockService.prototype.getAllPrinters = function (showAll) {
|
|
1610
|
+
if (showAll === void 0) { showAll = true; }
|
|
1611
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1612
|
+
return __generator(this, function (_a) {
|
|
1613
|
+
switch (_a.label) {
|
|
1614
|
+
case 0: return [4 /*yield*/, this._connector.getAllPrinters(showAll)];
|
|
1615
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
1616
|
+
}
|
|
1617
|
+
});
|
|
1618
|
+
});
|
|
1619
|
+
};
|
|
1620
|
+
// public async getPrintTemplates(defaultPrinterName: PrintJob): Promise<PrintJob> {
|
|
1621
|
+
// return await this._connector.getPrintLayouts(defaultPrinterName);
|
|
1622
|
+
// }
|
|
1623
|
+
StockService.prototype.getStockHistory = function (data) {
|
|
1624
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1625
|
+
return __generator(this, function (_a) {
|
|
1626
|
+
switch (_a.label) {
|
|
1627
|
+
case 0: return [4 /*yield*/, this._connector.getStockHistory(data)];
|
|
1628
|
+
case 1:
|
|
1629
|
+
_a.sent();
|
|
1630
|
+
return [2 /*return*/];
|
|
1631
|
+
}
|
|
1632
|
+
});
|
|
1633
|
+
});
|
|
1634
|
+
};
|
|
1635
|
+
StockService.prototype.getStockInformation = function (data) {
|
|
1636
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1637
|
+
return __generator(this, function (_a) {
|
|
1638
|
+
switch (_a.label) {
|
|
1639
|
+
case 0: return [4 /*yield*/, this._connector.getStockInformation(data)];
|
|
1640
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
1641
|
+
}
|
|
1642
|
+
});
|
|
1643
|
+
});
|
|
1644
|
+
};
|
|
1645
|
+
return StockService;
|
|
1646
|
+
}());
|
|
1647
|
+
StockService.decorators = [
|
|
1648
|
+
{ type: i0.Injectable }
|
|
1649
|
+
];
|
|
1650
|
+
StockService.ctorParameters = function () { return [
|
|
1651
|
+
{ type: IoneConnectorAdapterService }
|
|
1652
|
+
]; };
|
|
1653
|
+
|
|
1654
|
+
var StockComponent = /** @class */ (function () {
|
|
1655
|
+
function StockComponent(stockService) {
|
|
1656
|
+
this.stockService = stockService;
|
|
1657
|
+
this.handleStickerClicked = new i0.EventEmitter();
|
|
1658
|
+
this.showStockInformationGrid = true;
|
|
1659
|
+
this.showStockLocation = false;
|
|
1660
|
+
this.showStockTransfer = false;
|
|
1661
|
+
}
|
|
1662
|
+
Object.defineProperty(StockComponent.prototype, "options", {
|
|
1663
|
+
set: function (value) {
|
|
1664
|
+
this.stockService.connectConnector(value);
|
|
1665
|
+
},
|
|
1666
|
+
enumerable: false,
|
|
1667
|
+
configurable: true
|
|
1668
|
+
});
|
|
1669
|
+
Object.defineProperty(StockComponent.prototype, "article", {
|
|
1670
|
+
set: function (article) {
|
|
1671
|
+
this.articleExtended = article;
|
|
1672
|
+
this.getStockInformation(article);
|
|
1673
|
+
},
|
|
1674
|
+
enumerable: false,
|
|
1675
|
+
configurable: true
|
|
1676
|
+
});
|
|
1677
|
+
;
|
|
1678
|
+
StockComponent.prototype.showClass = function () {
|
|
1679
|
+
return true;
|
|
1680
|
+
};
|
|
1681
|
+
// ngAfterViewInit() {
|
|
1682
|
+
// if(this.article) {
|
|
1683
|
+
// this.getStockInformation(this.article as any);
|
|
1684
|
+
// }
|
|
1685
|
+
// }
|
|
1686
|
+
StockComponent.prototype.backToStockLinesClicked = function () {
|
|
1687
|
+
this.showStockLocation = false;
|
|
1688
|
+
this.showStockInformationGrid = true;
|
|
1689
|
+
};
|
|
1690
|
+
StockComponent.prototype.handleStockTransferClick = function (event) {
|
|
1691
|
+
this.stockTransferArticle = event;
|
|
1692
|
+
this.showStockTransfer = !this.showStockTransfer;
|
|
1693
|
+
this.showStockInformationGrid = !this.showStockInformationGrid;
|
|
1694
|
+
this.stockService.stockStickers = new printStockStickers.PrintStockStickers();
|
|
1695
|
+
};
|
|
1696
|
+
StockComponent.prototype.backToStock = function () {
|
|
1697
|
+
this.showStockTransfer = !this.showStockTransfer;
|
|
1698
|
+
this.showStockInformationGrid = !this.showStockInformationGrid;
|
|
1699
|
+
};
|
|
1700
|
+
StockComponent.prototype.loadStockHistory = function (data) {
|
|
1701
|
+
this.stockService.getStockHistory(data);
|
|
1702
|
+
};
|
|
1703
|
+
StockComponent.prototype.buttonClick = function () {
|
|
1704
|
+
this.getStockInformation(this.article);
|
|
1705
|
+
};
|
|
1706
|
+
StockComponent.prototype.getStockInformation = function (data) {
|
|
1707
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1708
|
+
var articleData, _a;
|
|
1709
|
+
return __generator(this, function (_b) {
|
|
1710
|
+
switch (_b.label) {
|
|
1711
|
+
case 0:
|
|
1712
|
+
articleData = new articleStock.ArticleStock();
|
|
1713
|
+
articleData.goodId = data.goodId.toString();
|
|
1714
|
+
articleData.viewKind = "M";
|
|
1715
|
+
_a = this;
|
|
1716
|
+
return [4 /*yield*/, this.stockService.getStockInformation(articleData)];
|
|
1717
|
+
case 1:
|
|
1718
|
+
_a.stockInformation = _b.sent();
|
|
1719
|
+
return [2 /*return*/];
|
|
1720
|
+
}
|
|
1721
|
+
});
|
|
1722
|
+
});
|
|
1723
|
+
};
|
|
1724
|
+
StockComponent.prototype.getStockLocationInformation = function (data) {
|
|
1725
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1726
|
+
var _a;
|
|
1727
|
+
return __generator(this, function (_b) {
|
|
1728
|
+
switch (_b.label) {
|
|
1729
|
+
case 0:
|
|
1730
|
+
_a = this;
|
|
1731
|
+
return [4 /*yield*/, this.stockService.getStockInformation(data)];
|
|
1732
|
+
case 1:
|
|
1733
|
+
_a.stockLocationInformation = _b.sent();
|
|
1734
|
+
return [2 /*return*/];
|
|
1735
|
+
}
|
|
1736
|
+
});
|
|
1737
|
+
});
|
|
1738
|
+
};
|
|
1739
|
+
return StockComponent;
|
|
1740
|
+
}());
|
|
1741
|
+
StockComponent.decorators = [
|
|
1742
|
+
{ type: i0.Component, args: [{
|
|
1743
|
+
selector: "co-stock",
|
|
1744
|
+
template: "\n <div class=\"stock-info-container\">\n <co-stock-information [article]=\"articleExtended\"\n [articleStock]=\"\">\n\n </co-stock-information>\n <hr>\n <co-stock-information-grid *ngIf=\"showStockInformationGrid\"\n [stockLocationData]=\"stockLocationInformation\"\n (locationLineClicked)=\"getStockLocationInformation($event)\"\n [articleStockInformation]=\"stockInformation\"\n (transferIconClicked)=\"handleStockTransferClick($event)\">\n </co-stock-information-grid>\n <co-stock-location *ngIf=\"showStockLocation\"\n (backToStockLines)=\"backToStockLinesClicked()\">\n\n </co-stock-location>\n <co-stock-transfer *ngIf=\"showStockTransfer\"\n (handleCancelClicked)=\"backToStock()\"\n [article]=\"stockTransferArticle\"\n [stockSticker]=\"stockService.stockStickers\"\n (handleStickerClicked)=\"handleStickerClicked.emit($event)\"\n [articleWarehouse]=\"articleWarehouse\"\n [allWarehouses]=\"allWarehouses\"\n >\n </co-stock-transfer>\n </div>\n ",
|
|
1745
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
1746
|
+
},] }
|
|
1747
|
+
];
|
|
1748
|
+
StockComponent.ctorParameters = function () { return [
|
|
1749
|
+
{ type: StockService }
|
|
1750
|
+
]; };
|
|
1751
|
+
StockComponent.propDecorators = {
|
|
1752
|
+
stock: [{ type: i0.ViewChild, args: [StockComponent,] }],
|
|
1753
|
+
handleStickerClicked: [{ type: i0.Output }],
|
|
1754
|
+
options: [{ type: i0.Input }],
|
|
1755
|
+
article: [{ type: i0.Input }],
|
|
1756
|
+
articleWarehouse: [{ type: i0.Input }],
|
|
1757
|
+
allWarehouses: [{ type: i0.Input }],
|
|
1758
|
+
showClass: [{ type: i0.HostBinding, args: ["class.co-stock",] }]
|
|
1759
|
+
};
|
|
1760
|
+
|
|
1761
|
+
var StockInformationComponent = /** @class */ (function () {
|
|
1762
|
+
function StockInformationComponent() {
|
|
1763
|
+
this.stockStatus = "medium";
|
|
1764
|
+
this.show = false;
|
|
1765
|
+
this.hideOrShowLocationTab = false;
|
|
1766
|
+
}
|
|
1767
|
+
return StockInformationComponent;
|
|
1768
|
+
}());
|
|
1769
|
+
StockInformationComponent.decorators = [
|
|
1770
|
+
{ type: i0.Component, args: [{
|
|
1771
|
+
selector: "co-stock-information",
|
|
1772
|
+
template: "\n <div class=\"stock-info\" *ngIf=\"article\">\n <div class=\"stock-info-row\" >\n <div class=\"stock-info-row-image\">\n <div class=\"stock-image\">\n <co-image class=\"stock-image\" [source]=\"article.imageData\"></co-image>\n </div>\n </div>\n <div class=\"stock-good-info\">\n <div>\n <span [textContent]=\"article.description\"></span>\n </div>\n <div>\n <span [textContent]=\"article.articleNumber\"></span>\n </div>\n </div>\n </div>\n <div class=\"stock-status\">\n <label [textContent]=\"'STOCK_STATUS'\"></label>\n <span [textContent]=\"article.stockStatus\"></span>\n </div>\n <div class=\"stock-status\">\n <label [textContent]=\"'AMOUNT_IN_STOCK'\"></label>\n <span [textContent]=\"article.stockAvailable\"></span>\n </div>\n <div class=\"stock-status\">\n <label [textContent]=\"'AMOUNT_AVAILABLE'\"></label>\n <span [textContent]=\"\"></span>\n </div>\n <div class=\"stock-status\">\n <label [textContent]=\"'AMOUNT_LATER_AVAILABLE'\"></label>\n <span [textContent]=\"\"></span>\n </div>\n </div>\n ",
|
|
1773
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
1774
|
+
},] }
|
|
1775
|
+
];
|
|
1776
|
+
StockInformationComponent.ctorParameters = function () { return []; };
|
|
1777
|
+
StockInformationComponent.propDecorators = {
|
|
1778
|
+
article: [{ type: i0.Input }],
|
|
1779
|
+
articleStock: [{ type: i0.Input }]
|
|
1780
|
+
};
|
|
1781
|
+
|
|
1782
|
+
/** AUTO GENERATED FILE. DO NOT CHANGE.. OR YOU WILL SUFFER THE CONSEQUENCES OF YOUR ACTIONS **/
|
|
1783
|
+
var IconSvg = {
|
|
1784
|
+
"arrow_fat_right": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><polygon points=\"37.5 25 25.2 12.7 25.2 20.35 12.5 20.35 12.5 29.66 25.2 29.66 25.2 37.3 37.5 25\" fill=\"#484f60\"/></svg>",
|
|
1785
|
+
"arrow_point_down": "<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" x=\"0px\" y=\"0px\" viewBox=\"-280 371 51 51\" enable-background=\"new -280 371 51 51\" ><path fill=\"#29363E\" d=\"M-248.3,392.2c0.3,0,0.6,0.1,0.8,0.3c0.5,0.5,0.5,1.2,0,1.6l-6.2,6.2c-0.2,0.2-0.5,0.3-0.8,0.3c-0.3,0-0.6-0.1-0.8-0.3l-6.2-6.2c-0.2-0.2-0.3-0.5-0.3-0.8c0-0.3,0.1-0.6,0.3-0.8c0.2-0.2,0.5-0.3,0.8-0.3c0.3,0,0.6,0.1,0.8,0.3l5.4,5.4l5.4-5.4C-248.9,392.4-248.6,392.2-248.3,392.2z\"/></svg>",
|
|
1786
|
+
"arrow_point_left": "<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" x=\"0px\" y=\"0px\" viewBox=\"0 0 51 51\" enable-background=\"new 0 0 51 51\" ><path fill=\"#484F5F\" d=\"M31.9,36.7l-14.7-9.6C17.1,27,17,26.9,17,26.7v-2.4c0-0.2,0.1-0.3,0.2-0.4l14.7-9.6c0.2-0.2,0.5-0.1,0.7,0.1l1.4,2.1c0.2,0.2,0.1,0.5-0.1,0.7l-12,7.8c-0.3,0.2-0.3,0.6,0,0.8l12,7.8c0.2,0.2,0.3,0.5,0.1,0.7l-1.4,2.1C32.4,36.8,32.1,36.8,31.9,36.7z\"/></svg>",
|
|
1787
|
+
"arrow_point_right": "<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" x=\"0px\" y=\"0px\" viewBox=\"0 0 51 51\" enable-background=\"new 0 0 51 51\" ><path fill=\"#484F5F\" d=\"M19.1,14.3l14.7,9.6c0.1,0.1,0.2,0.2,0.2,0.4v2.4c0,0.2-0.1,0.3-0.2,0.4l-14.7,9.6c-0.2,0.2-0.5,0.1-0.7-0.1l-1.4-2.1c-0.2-0.2-0.1-0.5,0.1-0.7l12-7.8c0.3-0.2,0.3-0.6,0-0.8l-12-7.8c-0.2-0.2-0.3-0.5-0.1-0.7l1.4-2.1C18.6,14.2,18.9,14.2,19.1,14.3z\"/></svg>",
|
|
1788
|
+
"calendar_day": "<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" x=\"0px\" y=\"0px\" viewBox=\"0 0 50 50\" enable-background=\"new 0 0 50 50\" ><g><path fill=\"#022D42\" d=\"M35.4,13.7H14.6c-0.6,0-1,0.5-1,1V20h22.9v-5.2C36.4,14.2,36,13.7,35.4,13.7z M19,18.8c-1,0-1.8-0.8-1.8-1.8c0-1,0.8-1.8,1.8-1.8c1,0,1.8,0.8,1.8,1.8C20.8,18,20,18.8,19,18.8z M31,18.8c-1,0-1.8-0.8-1.8-1.8c0-1,0.8-1.8,1.8-1.8s1.8,0.8,1.8,1.8C32.7,18,32,18.8,31,18.8z\"/><path fill=\"#022D42\" d=\"M35.4,22.3v12.6L31.3,39H14.6c0,0,0,0,0,0V22.3H35.4 M36.4,21.3H13.6V39c0,0.6,0.5,1,1,1h17.2l4.7-4.7V21.3L36.4,21.3z\"/><rect x=\"18.2\" y=\"10\" fill=\"#022D42\" width=\"1.6\" height=\"5.2\"/><rect x=\"30.2\" y=\"10\" fill=\"#022D42\" width=\"1.6\" height=\"5.2\"/><rect x=\"18.6\" y=\"30.5\" fill=\"#022D42\" width=\"3.4\" height=\"3.4\"/><rect x=\"19.1\" y=\"24.8\" opacity=\"0.1\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"19.1\" y=\"27.9\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"19.1\" y=\"34.1\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"22.2\" y=\"24.8\" opacity=\"0.1\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"22.2\" y=\"27.9\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"22.2\" y=\"31\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"22.2\" y=\"34.1\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"25.4\" y=\"31\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"25.4\" y=\"24.8\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"25.4\" y=\"27.9\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"25.4\" y=\"34.1\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"31.6\" y=\"31\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"31.6\" y=\"24.8\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"31.6\" y=\"27.9\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"28.5\" y=\"27.9\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"28.5\" y=\"24.8\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"28.5\" y=\"31\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"28.5\" y=\"34.1\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"16\" y=\"24.8\" opacity=\"0.1\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"16\" y=\"27.9\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"16\" y=\"31\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"16\" y=\"34.1\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/></g></svg>",
|
|
1789
|
+
"cancel": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><polygon points=\"36 35.16 30.45 35.16 14 14.84 19.55 14.84 36 35.16\" fill=\"#484f60\"/><polygon points=\"14 35.16 19.55 35.16 36 14.84 30.45 14.84 14 35.16\" fill=\"#484f60\"/></svg>",
|
|
1790
|
+
"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>",
|
|
1791
|
+
"edit_pencil": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><polygon points=\"12.54 38.16 12 37.62 14.85 29.64 20.52 35.31 12.54 38.16\" fill=\"#484f60\"/><rect x=\"16.33\" y=\"20.52\" width=\"17.99\" height=\"8.64\" transform=\"translate(-10.15 25.18) rotate(-45)\" fill=\"#484f60\"/><path d=\"M37.54,18.73,36,20.32l-6.11-6.1,1.59-1.59a1.55,1.55,0,0,1,2.2,0l3.91,3.9A1.55,1.55,0,0,1,37.54,18.73Z\" fill=\"#484f60\"/></svg>",
|
|
1792
|
+
"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>",
|
|
1793
|
+
"pdf": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M31.42,40.17H13.88c-2.16,0-2.72-.56-2.72-2.72V12.88c0-2.15.56-2.71,2.72-2.71h11.6l8.66,8.88v3.43H32.8V19.6l-7.88-8.09h-11c-1.38,0-1.38,0-1.38,1.37V37.45c0,1.37,0,1.37,1.38,1.37H31.42c1.38,0,1.38,0,1.38-1.37V35h1.34v2.43C34.14,39.61,33.58,40.17,31.42,40.17Z\" fill=\"#484f60\"/><path d=\"M27.83,26.63v4.24h1a3.57,3.57,0,0,0,.78-.06,1.22,1.22,0,0,0,.52-.26,1.44,1.44,0,0,0,.34-.62,4.13,4.13,0,0,0,.13-1.18,3.79,3.79,0,0,0-.13-1.14,1.51,1.51,0,0,0-.37-.62,1.14,1.14,0,0,0-.6-.3,5.93,5.93,0,0,0-1.06-.06Z\" fill=\"#484f60\"/><path d=\"M21.86,26.63v1.82h.71a3.57,3.57,0,0,0,1-.1A.88.88,0,0,0,24,28a.84.84,0,0,0,.14-.5.8.8,0,0,0-.2-.57.88.88,0,0,0-.52-.29,6.36,6.36,0,0,0-.93,0Z\" fill=\"#484f60\"/><path d=\"M19.14,24.27v9h19.7v-9Zm6.12,4.24a1.68,1.68,0,0,1-.54.63,1.9,1.9,0,0,1-.67.3,6.57,6.57,0,0,1-1.34.1h-.85V32H20.57V25.54h2.07a7.75,7.75,0,0,1,1.54.1,1.73,1.73,0,0,1,.93.63,2,2,0,0,1,.37,1.25A2,2,0,0,1,25.26,28.51Zm6.45,1.66A2.91,2.91,0,0,1,31,31.31a2.28,2.28,0,0,1-.91.51A4,4,0,0,1,29,32H26.54V25.54H28.9a4.21,4.21,0,0,1,1.22.13,2.08,2.08,0,0,1,1,.59,2.79,2.79,0,0,1,.61,1,4.76,4.76,0,0,1,.21,1.52A4.19,4.19,0,0,1,31.71,30.17Zm5.7-3.54h-3.1v1.52H37v1.08H34.31V32H33V25.54h4.39Z\" fill=\"#484f60\"/><path d=\"M25.2,10.84v6.44c0,1.78.27,2,2,2h6.23Z\" fill=\"#484f60\"/></svg>",
|
|
1794
|
+
"plus_round": "<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" x=\"0px\" y=\"0px\" viewBox=\"-288 379 35 35\" enable-background=\"new -288 379 35 35\" ><path fill=\"#29363E\" d=\"M-270.5,381.5c-8.3,0-15,6.7-15,15c0,8.3,6.7,15,15,15s15-6.7,15-15C-255.5,388.2-262.2,381.5-270.5,381.5z M-261.1,397.3c0,0.9-0.7,1.6-1.6,1.6h-5.5v5.5c0,0.9-0.7,1.6-1.6,1.6h-1.6c-0.9,0-1.6-0.7-1.6-1.6v-5.5h-5.5c-0.9,0-1.6-0.7-1.6-1.6v-1.6c0-0.9,0.7-1.6,1.6-1.6h5.5v-5.5c0-0.9,0.7-1.6,1.6-1.6h1.6c0.9,0,1.6,0.7,1.6,1.6v5.5h5.5c0.9,0,1.6,0.7,1.6,1.6V397.3z\"/></svg>",
|
|
1795
|
+
"print": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M38,16.5H12a2,2,0,0,0-2,2v9a2,2,0,0,0,2,2h2v-5H36v5h2a2,2,0,0,0,2-2v-9A2,2,0,0,0,38,16.5ZM37,21a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,37,21Z\" fill=\"#484f60\"/><path d=\"M35,11.5v5H15v-5H35m1-1H14v7H36v-7Z\" fill=\"#484f60\"/><path d=\"M35,25.5v13H15v-13H35m1-1H14v15H36v-15Z\" fill=\"#484f60\"/><rect x=\"17\" y=\"28.3\" width=\"16\" height=\"0.8\" fill=\"#484f60\"/><rect x=\"17\" y=\"31.5\" width=\"16\" height=\"0.8\" fill=\"#484f60\"/><rect x=\"17\" y=\"34.7\" width=\"16\" height=\"0.8\" fill=\"#484f60\"/></svg>",
|
|
1796
|
+
"signature_field": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M20.1,25.42a1.1,1.1,0,1,1,1.27,1.45l-3.3,9.07A63.13,63.13,0,0,1,28,28.3l1.26-12-8.26-3-6.77,10A62.4,62.4,0,0,1,17,35.54l3.3-9.07A1.12,1.12,0,0,1,20.1,25.42Z\" fill=\"#484f60\"/><rect x=\"21.62\" y=\"11.43\" width=\"8.79\" height=\"2.34\" transform=\"translate(5.88 -8.14) rotate(20)\" fill=\"#484f60\"/><path d=\"M18.11,37.48c1.44,2.65,4.58,2.94,7.23,2.1,1.41-.44,2.2-1.49,3.44-2.06,2.42-1.1,3.13,1.2,5.36,1.37.42,0,2-.65,1.54-.68-2.55-.19-2.93-3.13-5.51-2.65a4.9,4.9,0,0,0-1.64.71c-.77.49-1.31,1.62-2.07,2l-4.61.56A3.38,3.38,0,0,1,20,37c-.22-.41-2,.28-1.85.5Z\" fill=\"#484f60\"/></svg>",
|
|
1797
|
+
"tag": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M40,29.15v-.68a5.28,5.28,0,0,0-1.34-3.25L24.78,11.34A5.34,5.34,0,0,0,21.53,10H11.9A1.91,1.91,0,0,0,10,11.9v9.63a5.28,5.28,0,0,0,1.34,3.25L25.22,38.66A5.28,5.28,0,0,0,28.47,40h.68a5.28,5.28,0,0,0,3.24-1.34l6.27-6.27A5.28,5.28,0,0,0,40,29.15ZM13.13,16.72a2.54,2.54,0,1,1,3.59,0A2.55,2.55,0,0,1,13.13,16.72Zm15.9,19L17.84,24.55l1.34-1.34L30.37,34.4Zm2.69-2.69L20.52,21.87l1.35-1.35,11.19,11.2Zm2.68-2.69L23.21,19.18l1.34-1.34L35.75,29Z\" fill=\"#484f60\"/></svg>",
|
|
1798
|
+
"thick_lines": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><rect x=\"10\" y=\"12.67\" width=\"30\" height=\"7\" fill=\"#484f60\"/><rect x=\"10\" y=\"21.67\" width=\"30\" height=\"7\" fill=\"#484f60\"/><rect x=\"10\" y=\"30.67\" width=\"30\" height=\"7\" fill=\"#484f60\"/></svg>",
|
|
1799
|
+
"thin_lines": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><rect x=\"10\" y=\"14.17\" width=\"30\" height=\"4\" fill=\"#484f60\"/><rect x=\"10\" y=\"20.17\" width=\"30\" height=\"4\" fill=\"#484f60\"/><rect x=\"10\" y=\"26.17\" width=\"30\" height=\"4\" fill=\"#484f60\"/><rect x=\"10\" y=\"32.17\" width=\"30\" height=\"4\" fill=\"#484f60\"/></svg>",
|
|
1800
|
+
"txt": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M31.42,40.17H13.87c-2.15,0-2.71-.56-2.71-2.72V12.88c0-2.15.56-2.71,2.71-2.71H25.48l8.66,8.88v3.43H32.8V19.6l-7.88-8.09H13.87c-1.37,0-1.37,0-1.37,1.37V37.45c0,1.37,0,1.37,1.37,1.37H31.42c1.38,0,1.38,0,1.38-1.37V35h1.34v2.43C34.14,39.61,33.58,40.17,31.42,40.17Z\" fill=\"#484f60\"/><path d=\"M25.2,10.84v6.44c0,1.78.27,2,2,2h6.23Z\" fill=\"#484f60\"/><path d=\"M19.14,24.27v9h19.7v-9Zm6.68,2.36h-1.9V32h-1.3V26.63h-1.9V25.54h5.1ZM30.4,32,29,29.74,27.55,32H26l2.19-3.34-2-3.07h1.52L29,27.6l1.26-2.06h1.5l-2,3.12L32,32Zm6.86-5.32h-1.9V32H34.07V26.63H32.16V25.54h5.1Z\" fill=\"#484f60\"/></svg>",
|
|
1801
|
+
"xml": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M31.42,40.17H13.87c-2.15,0-2.71-.56-2.71-2.72V12.88c0-2.15.56-2.71,2.71-2.71H25.48l8.66,8.88v3.43H32.8V19.6l-7.88-8.09H13.87c-1.37,0-1.37,0-1.37,1.37V37.45c0,1.37,0,1.37,1.37,1.37H31.42c1.38,0,1.38,0,1.38-1.37V35h1.34v2.43C34.14,39.61,33.58,40.17,31.42,40.17Z\" fill=\"#484f60\"/><path d=\"M25.2,10.84v6.44c0,1.78.27,2,2,2h6.23Z\" fill=\"#484f60\"/><path d=\"M19.14,24.27v9h19.7v-9Zm5.36,7.41-1.3-2-1.3,2H20.48l2-3.06-1.81-2.8h1.38l1.18,1.88,1.15-1.88h1.37l-1.83,2.85,2,3Zm7.67,0h-1.1V27.07l-1.16,4.61H28.77l-1.16-4.61v4.61H26.52V25.82h1.76l1.07,4,1-4h1.77Zm5.33,0H33.38V25.87h1.18v4.82H37.5Z\" fill=\"#484f60\"/></svg>"
|
|
1802
|
+
};
|
|
1803
|
+
|
|
1804
|
+
var IconCacheService = /** @class */ (function () {
|
|
1805
|
+
function IconCacheService(_sanitizer) {
|
|
1806
|
+
this._sanitizer = _sanitizer;
|
|
1807
|
+
this._iconCache = {};
|
|
1808
|
+
this.setIconCache();
|
|
1809
|
+
}
|
|
1810
|
+
Object.defineProperty(IconCacheService.prototype, "iconCache", {
|
|
1811
|
+
/**
|
|
1812
|
+
* All the icons as a large JSON object, from the all-icons.json file.
|
|
1813
|
+
* The object has property keys that are the icon names, and property values with the data string of the actual svg icon.
|
|
1814
|
+
*/
|
|
1815
|
+
get: function () {
|
|
1816
|
+
return this._iconCache;
|
|
1817
|
+
},
|
|
1818
|
+
enumerable: false,
|
|
1819
|
+
configurable: true
|
|
1820
|
+
});
|
|
1821
|
+
IconCacheService.prototype.getIcon = function (iconName) {
|
|
1822
|
+
if (iconName) {
|
|
1823
|
+
return this._iconCache[iconName.toLowerCase()];
|
|
1824
|
+
}
|
|
1825
|
+
};
|
|
1826
|
+
IconCacheService.prototype.getIconAsBase64 = function (iconName) {
|
|
1827
|
+
var icon = IconSvg[iconName];
|
|
1828
|
+
var base64Data = window.btoa(icon);
|
|
1829
|
+
return this._sanitizer.bypassSecurityTrustUrl("data:image/svg+xml;base64," + base64Data);
|
|
1830
|
+
};
|
|
1831
|
+
IconCacheService.prototype.getRawIcon = function (iconName) {
|
|
1832
|
+
if (iconName) {
|
|
1833
|
+
return IconSvg[iconName.toLowerCase()];
|
|
1834
|
+
}
|
|
1835
|
+
};
|
|
1836
|
+
IconCacheService.prototype.setIconCache = function () {
|
|
1837
|
+
for (var key in IconSvg) {
|
|
1838
|
+
if (IconSvg.hasOwnProperty(key) && typeof IconSvg[key] !== "function") {
|
|
1839
|
+
this._iconCache[key.toLowerCase()] = this._sanitizer.bypassSecurityTrustHtml(IconSvg[key]);
|
|
1840
|
+
}
|
|
1841
|
+
}
|
|
1842
|
+
};
|
|
1843
|
+
return IconCacheService;
|
|
1844
|
+
}());
|
|
1845
|
+
IconCacheService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function IconCacheService_Factory() { return new IconCacheService(i0__namespace.ɵɵinject(i1__namespace.DomSanitizer)); }, token: IconCacheService, providedIn: "root" });
|
|
1846
|
+
IconCacheService.decorators = [
|
|
1847
|
+
{ type: i0.Injectable, args: [{
|
|
1848
|
+
providedIn: "root"
|
|
1849
|
+
},] }
|
|
1850
|
+
];
|
|
1851
|
+
IconCacheService.ctorParameters = function () { return [
|
|
1852
|
+
{ type: i1.DomSanitizer }
|
|
1853
|
+
]; };
|
|
1854
|
+
|
|
1855
|
+
/** AUTO GENERATED FILE. DO NOT CHANGE.. OR YOU WILL SUFFER THE CONSEQUENCES OF YOUR ACTIONS **/
|
|
1856
|
+
var Icon;
|
|
1857
|
+
(function (Icon) {
|
|
1858
|
+
Icon["ArrowFatRight"] = "arrow_fat_right";
|
|
1859
|
+
Icon["ArrowPointDown"] = "arrow_point_down";
|
|
1860
|
+
Icon["ArrowPointLeft"] = "arrow_point_left";
|
|
1861
|
+
Icon["ArrowPointRight"] = "arrow_point_right";
|
|
1862
|
+
Icon["CalendarDay"] = "calendar_day";
|
|
1863
|
+
Icon["Cancel"] = "cancel";
|
|
1864
|
+
Icon["DeliveryTruck"] = "delivery_truck";
|
|
1865
|
+
Icon["EditPencil"] = "edit_pencil";
|
|
1866
|
+
Icon["Email"] = "email";
|
|
1867
|
+
Icon["Pdf"] = "pdf";
|
|
1868
|
+
Icon["PlusRound"] = "plus_round";
|
|
1869
|
+
Icon["Print"] = "print";
|
|
1870
|
+
Icon["SignatureField"] = "signature_field";
|
|
1871
|
+
Icon["Tag"] = "tag";
|
|
1872
|
+
Icon["ThickLines"] = "thick_lines";
|
|
1873
|
+
Icon["ThinLines"] = "thin_lines";
|
|
1874
|
+
Icon["Txt"] = "txt";
|
|
1875
|
+
Icon["Xml"] = "xml";
|
|
1876
|
+
})(Icon || (Icon = {}));
|
|
1877
|
+
|
|
1878
|
+
var StockInformationGridComponent = /** @class */ (function () {
|
|
1879
|
+
function StockInformationGridComponent(iconCacheService, _stockService) {
|
|
1880
|
+
this.iconCacheService = iconCacheService;
|
|
1881
|
+
this._stockService = _stockService;
|
|
1882
|
+
this.icons = Icon;
|
|
1883
|
+
this.locationLineClicked = new i0.EventEmitter();
|
|
1884
|
+
this.transferIconClicked = new i0.EventEmitter();
|
|
1885
|
+
this.show = false;
|
|
1886
|
+
this.hideOrShowLocationTab = false;
|
|
1887
|
+
this.showStockHistory = false;
|
|
1888
|
+
this.showSendMethodDialog = false;
|
|
1889
|
+
this.data = [
|
|
1890
|
+
{ test: "test" }
|
|
1891
|
+
];
|
|
1892
|
+
this.inOrderInformation = [
|
|
1893
|
+
{ inOrder: "275432", customer: "Test customer", orderDate: "date", orderAmount: "2", warehouseNumber: "8", warehouseDescription: "A nice warehouse", amountInStock: "17", commission: "4014321" },
|
|
1894
|
+
{ inOrder: "275432", customer: "Test customer", orderDate: "date", orderAmount: "2", warehouseNumber: "8", warehouseDescription: "A nice warehouse", amountInStock: "17", commission: "4014321" },
|
|
1895
|
+
{ inOrder: "275432", customer: "Test customer", orderDate: "date", orderAmount: "2", warehouseNumber: "8", warehouseDescription: "A nice warehouse", amountInStock: "17", commission: "4014321" },
|
|
1896
|
+
{ inOrder: "275432", customer: "Test customer", orderDate: "date", orderAmount: "2", warehouseNumber: "8", warehouseDescription: "A nice warehouse", amountInStock: "17", commission: "4014321" },
|
|
1897
|
+
{ inOrder: "275432", customer: "Test customer", orderDate: "date", orderAmount: "2", warehouseNumber: "8", warehouseDescription: "A nice warehouse", amountInStock: "17", commission: "4014321" },
|
|
1898
|
+
];
|
|
1899
|
+
this.orderInformation = [];
|
|
1900
|
+
this.hideOrShowTabs = true;
|
|
1901
|
+
this.dataWareHouseCode = 0;
|
|
1902
|
+
this.dataWareHouseFields = { text: "warehouseDescription", value: "warehouseNumber" };
|
|
1903
|
+
this.articleStockSearchInfo = new articleStock.ArticleStock();
|
|
1904
|
+
this.tabs = [
|
|
1905
|
+
"STOCK",
|
|
1906
|
+
"IN_ORDER2",
|
|
1907
|
+
"ORDERS1"
|
|
1908
|
+
];
|
|
1909
|
+
this.activeTab = this.tabs[0];
|
|
1910
|
+
}
|
|
1911
|
+
Object.defineProperty(StockInformationGridComponent.prototype, "activeTabText", {
|
|
1912
|
+
get: function () {
|
|
1913
|
+
switch (this.activeTab) {
|
|
1914
|
+
case this.tabs[0]:
|
|
1915
|
+
return "Voorraadregels";
|
|
1916
|
+
case this.tabs[1]:
|
|
1917
|
+
return "Gevonden in order(s)";
|
|
1918
|
+
case this.tabs[2]:
|
|
1919
|
+
return "Gevonden in bestellingen";
|
|
1920
|
+
default:
|
|
1921
|
+
return "Voorraadlocatie regels";
|
|
1922
|
+
}
|
|
1923
|
+
},
|
|
1924
|
+
enumerable: false,
|
|
1925
|
+
configurable: true
|
|
1926
|
+
});
|
|
1927
|
+
StockInformationGridComponent.prototype.handleTabClick = function (tabData) {
|
|
1928
|
+
this.activeTab = tabData;
|
|
1929
|
+
};
|
|
1930
|
+
StockInformationGridComponent.prototype.onLocationClick = function (data) {
|
|
1931
|
+
this.articleStockSearchInfo.goodId = data.goodId.toString();
|
|
1932
|
+
this.articleStockSearchInfo.wareHouseNo = data.warehouseNo.toString();
|
|
1933
|
+
this.articleStockSearchInfo.viewKind = "D";
|
|
1934
|
+
this.locationLineClicked.emit(this.articleStockSearchInfo);
|
|
1935
|
+
this.hideOrShowTabs = false;
|
|
1936
|
+
this.hideOrShowLocationTab = true;
|
|
1937
|
+
};
|
|
1938
|
+
StockInformationGridComponent.prototype.onPopupClose = function () {
|
|
1939
|
+
this.show = false;
|
|
1940
|
+
};
|
|
1941
|
+
StockInformationGridComponent.prototype.handleHistoryClick = function () {
|
|
1942
|
+
// console.warn('Not yet implemented');
|
|
1943
|
+
// this.showStockHistory = true;
|
|
1944
|
+
};
|
|
1945
|
+
StockInformationGridComponent.prototype.handleCloseClick = function () {
|
|
1946
|
+
this.onPopupClose();
|
|
1947
|
+
};
|
|
1948
|
+
StockInformationGridComponent.prototype.handleStockTransferClick = function (event) {
|
|
1949
|
+
this.transferIconClicked.emit(event);
|
|
1950
|
+
};
|
|
1951
|
+
StockInformationGridComponent.prototype.handleBackToStockClick = function () {
|
|
1952
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1953
|
+
return __generator(this, function (_a) {
|
|
1954
|
+
this.activeTab = this.tabs[0];
|
|
1955
|
+
this.hideOrShowTabs = true;
|
|
1956
|
+
this.hideOrShowLocationTab = false;
|
|
1957
|
+
return [2 /*return*/];
|
|
1958
|
+
});
|
|
1959
|
+
});
|
|
1960
|
+
};
|
|
1961
|
+
StockInformationGridComponent.prototype.openSendMethodDialog = function () {
|
|
1962
|
+
this.showSendMethodDialog = !this.showSendMethodDialog;
|
|
1963
|
+
};
|
|
1964
|
+
StockInformationGridComponent.prototype.printStockStickers = function () {
|
|
1965
|
+
this.printSticker = new printStockStickers$1.PrintStockStickers();
|
|
1966
|
+
this.printSticker.goodId = 10;
|
|
1967
|
+
this._stockService.getPrintStockStickers(this.printSticker);
|
|
1968
|
+
};
|
|
1969
|
+
StockInformationGridComponent.prototype.onOkClick = function () {
|
|
1970
|
+
};
|
|
1971
|
+
StockInformationGridComponent.prototype.onCancelClick = function () {
|
|
1972
|
+
};
|
|
1973
|
+
return StockInformationGridComponent;
|
|
1974
|
+
}());
|
|
1975
|
+
StockInformationGridComponent.decorators = [
|
|
1976
|
+
{ type: i0.Component, args: [{
|
|
1977
|
+
selector: "co-stock-information-grid",
|
|
1978
|
+
template: "\n <div class=\"tab-link show\" *ngIf=\"hideOrShowTabs\">\n <span class=\"tab-link-buttons\"\n *ngFor=\"let tab of tabs\"\n (click)=\"handleTabClick(tab)\"\n [textContent]=\"tab\"\n [class.active]=\"tab === activeTab\"\n ></span>\n </div>\n\n <div class=\"stock-line\">\n <div [textContent]=\"activeTabText\"></div>\n\n </div>\n\n <div class=\"stock-grid\">\n <co-simple-grid *ngIf=\"activeTab === tabs[0] && hideOrShowTabs\"\n [data]=\"articleStockInformation\"\n >\n <co-simple-grid-column [headerText]=\"'WAREHOUSE'\" [field]=\"'warehouseNo'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'DESCRIPTION'\" [field]=\"'warehouseName'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'STOCK'\" [field]=\"'technicalStock'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'AVAILABLE_STOCK'\" [field]=\"'availableStock'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'ECONOMICAL_STOCK'\" [field]=\"'economicalStock'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'LOCATION'\" [field]=\"'locationNo'\">\n <ng-template #template let-row=\"row\">\n <span [textContent]=\"'bekijken'\" (click)=\"onLocationClick(row)\"></span>\n </ng-template>\n </co-simple-grid-column>\n </co-simple-grid>\n\n <co-simple-grid *ngIf=\"activeTab === tabs[1]\"\n [data]=\"inOrderInformation\"\n >\n <co-simple-grid-column [headerText]=\"'IN_ORDER2'\" [field]=\"'inOrder'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'CUSTOMER'\" [field]=\"'customer'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'DATE'\" [field]=\"'orderDate'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'AMOUNT'\" [field]=\"'orderAmount'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'WAREHOUSE'\" [field]=\"'warehouseNumber'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'DESCRIPTION'\" [field]=\"'warehouseDescription'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'STOCK'\" [field]=\"'amountInStock'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'COMMISSION2'\" [field]=\"'commission'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'TRANSFER'\" [field]=\"'transfer'\">\n <ng-template #template let-row=\"row\">\n <co-icon class=\"menu-icon\" [iconData]=\"iconCacheService.getIcon(icons.DeliveryTruck)\" (click)=\"handleStockTransferClick($event)\"></co-icon>\n </ng-template>\n </co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'STICKER'\" [field]=\"'sticker'\">\n <ng-template #template let-row=\"row\">\n <co-icon class=\"menu-icon\" [iconData]=\"iconCacheService.getIcon(icons.Print)\" (click)=\"openSendMethodDialog()\"></co-icon>\n </ng-template>\n </co-simple-grid-column>\n </co-simple-grid>\n\n <co-simple-grid *ngIf=\"activeTab === tabs[2]\"\n [data]=\"orderInformation\"\n >\n <co-simple-grid-column [headerText]=\"'PURCHASE_ORDER_NR'\" [field]=\"'purchaseOrderNo'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'DATE'\" [field]=\"'orderDate'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'AMOUNT'\" [field]=\"'orderAmount'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'RESERVED'\" [field]=\"'reserved'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'FREE_STOCK'\" [field]=\"'freeStock'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'DELIVERY_DATE1'\" [field]=\"'deliveryDate'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'RESERVE'\" [field]=\"'reservation'\"></co-simple-grid-column>\n </co-simple-grid>\n </div>\n\n <div class=\"stock-grid\" *ngIf=\"hideOrShowLocationTab\">\n <div class=\"stock-location-group\">\n <div class=\"stock-location-left-group\">\n <span class=\"stock-button-back\" [textContent]=\"'BACK_TO_STOCK_LINES'\" (click)=\"handleBackToStockClick()\"></span>\n </div>\n <div class=\"stock-location-right-group\">\n <co-input-combo-box [(model)]=\"dataWareHouseCode\"\n [fields]=\"dataWareHouseFields\"\n [placeholder]=\"'WAREHOUSE'\"\n [required]=\"true\"\n ></co-input-combo-box>\n </div>\n </div>\n\n<!-- TODO move to own component stock-location-->\n <co-simple-grid [data]=\"stockLocationData\"\n >\n <div class=\"stock-location-group\">\n <div class=\"stock-location-left-group\">\n <co-button class=\"stock-lines-button\" [textContent]=\"'BACK_TO_STOCK_LINES'\" (click)=\"handleBackToStockClick()\"></co-button>\n </div>\n </div>\n <co-simple-grid-column [headerText]=\"'WAREHOUSE'\" [field]=\"'warehouseName'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'BATCH'\" [field]=\"'batchNo'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'SERIAL_NO'\" [field]=\"'serialNo'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'STOCK'\" [field]=\"'notAssignedStock'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'ALLOCATED'\" [field]=\"'economicalStock'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'AVAILABLE_STOCK'\" [field]=\"'availableStock'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'TRANSFER'\" [field]=\"'transfer'\">\n <ng-template #template let-row=\"row\">\n <co-icon class=\"menu-icon\" [iconData]=\"iconCacheService.getIcon(icons.DeliveryTruck)\" (click)=\"handleStockTransferClick(row)\"></co-icon>\n </ng-template>\n </co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'STICKER'\" [field]=\"'sticker'\">\n <ng-template #template let-row=\"row\">\n <co-icon class=\"menu-icon\" [iconData]=\"iconCacheService.getIcon(icons.Print)\" (click)=\"openSendMethodDialog()\"></co-icon>\n </ng-template>\n </co-simple-grid-column>\n </co-simple-grid>\n </div>\n\n <div class=\"stock-grid\" *ngIf=\"showStockHistory\">\n <co-simple-grid [data]=\"stockHistoryInformation\"\n >\n <co-simple-grid-column [headerText]=\"'WAREHOUSE'\" [field]=\"'location'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'BATCH'\" [field]=\"'batch'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'SERIAL_NO'\" [field]=\"'serialNo'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'STOCK'\" [field]=\"'amountInStock'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'ALLOCATED'\" [field]=\"'allocated'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'AVAILABLE_STOCK'\" [field]=\"'amountAvailable'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'STICKER'\" [field]=\"'sticker'\">\n <ng-template #template let-row=\"row\">\n <co-icon class=\"menu-icon\" [iconData]=\"iconCacheService.getIcon(icons.Print)\" (click)=\"openSendMethodDialog()\"></co-icon>\n </ng-template>\n </co-simple-grid-column>\n </co-simple-grid>\n </div>\n\n <div class=\"stock-button-toolbar\">\n <div class=\"stock-button-left-group\">\n <co-button [label]=\"'HISTORY'\" (click)=\"handleHistoryClick()\"></co-button>\n </div>\n <div class=\"stock-button-middle-group\">\n <div class=\"button-left\">\n <co-button [textContent]=\"'Ok'\" (click)=\"onOkClick()\"></co-button>\n </div>\n <div class=\"button-right\">\n <co-button [textContent]=\"'Annuleren'\" (click)=\"onCancelClick()\"></co-button>\n </div>\n </div>\n </div>\n <ione-send-method-dialog\n [showDialog]=\"showSendMethodDialog\"\n (printButtonClicked)=\"printStockStickers()\"\n ></ione-send-method-dialog>\n ",
|
|
1979
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
1980
|
+
},] }
|
|
1981
|
+
];
|
|
1982
|
+
StockInformationGridComponent.ctorParameters = function () { return [
|
|
1983
|
+
{ type: IconCacheService },
|
|
1984
|
+
{ type: StockService }
|
|
1985
|
+
]; };
|
|
1986
|
+
StockInformationGridComponent.propDecorators = {
|
|
1987
|
+
stock: [{ type: i0.ViewChild, args: [StockInformationGridComponent,] }],
|
|
1988
|
+
articleStockInformation: [{ type: i0.Input }],
|
|
1989
|
+
stockHistoryInformation: [{ type: i0.Input }],
|
|
1990
|
+
stockLocationData: [{ type: i0.Input }],
|
|
1991
|
+
locationLineClicked: [{ type: i0.Output }],
|
|
1992
|
+
transferIconClicked: [{ type: i0.Output }]
|
|
1993
|
+
};
|
|
1994
|
+
|
|
1995
|
+
var StockLocationComponent = /** @class */ (function () {
|
|
1996
|
+
function StockLocationComponent() {
|
|
1997
|
+
this.backToStockLines = new i0.EventEmitter();
|
|
1998
|
+
this.MAX_GRID_ROWS = 10;
|
|
1999
|
+
this.stockLocationColumns = [];
|
|
2000
|
+
this.stockLocation = [
|
|
2001
|
+
{ location: "title 1", batch: "1", serieNo: "1", amountInStock: "1", allocated: "1", amountAvailable: "1" },
|
|
2002
|
+
{ location: "title 2", amountInStock: "2" },
|
|
2003
|
+
{ location: "title 3", amountInStock: "3" },
|
|
2004
|
+
{ location: "title 4", amountInStock: "4" },
|
|
2005
|
+
{ location: "title 5", amountInStock: "5" },
|
|
2006
|
+
];
|
|
2007
|
+
this.stockLocationColumns.push({ field: "location", headerText: "WAREHOUSE", editType: "none" }, { field: "batch", headerText: "BATCH" }, { field: "serieNo", headerText: "SERIAL_NO" }, { field: "amountInStock", headerText: "STOCK", textAlign: "Right", editType: "numericEdit" }, { field: "allocated", headerText: "ALLOCATED", textAlign: "Right" }, { field: "amountAvailable", headerText: "AVAILABLE_STOCK", textAlign: "Right" }, { field: "PhysicalStock", headerText: "PHYSICAL_STOCK", textAlign: "Right" }, { field: "Valuta", headerText: "VALUTA", textAlign: "Right" }, { field: "PurchasePrice", headerText: "PURSCHASE_PRICE", textAlign: "Right" }, { field: "SupplierNo", headerText: "SUPPLIER_NO", textAlign: "Right" }, { field: "Transfer", headerText: "TRANSFER" }, { field: "sticker", headerText: "STICKER" });
|
|
2008
|
+
}
|
|
2009
|
+
StockLocationComponent.prototype.backToStockInformation = function () {
|
|
2010
|
+
this.backToStockLines.emit();
|
|
2011
|
+
};
|
|
2012
|
+
StockLocationComponent.prototype.onStickerClick = function (event) {
|
|
2013
|
+
};
|
|
2014
|
+
StockLocationComponent.prototype.onOkClick = function () {
|
|
2015
|
+
};
|
|
2016
|
+
StockLocationComponent.prototype.onCancelClick = function () {
|
|
2017
|
+
};
|
|
2018
|
+
StockLocationComponent.prototype.onSelectWarehouse = function (event) {
|
|
2019
|
+
};
|
|
2020
|
+
return StockLocationComponent;
|
|
2021
|
+
}());
|
|
2022
|
+
StockLocationComponent.decorators = [
|
|
2023
|
+
{ type: i0.Component, args: [{
|
|
2024
|
+
selector: "co-stock-location",
|
|
2025
|
+
template: "\n <div class=\"stock-location-wrapper\">\n <div class=\"buttons-wrapper\">\n <div class=\"stock-button-left-group\">\n <span class=\"stock-button-back\" [textContent]=\"'BACK_TO_STOCK_LINES'\" (click)=\"backToStockInformation()\"></span>\n </div>\n <div class=\"dropdown-wrapper\">\n <co-drop-down-list\n [collection]=\"allWarehouses\"\n [placeholder]=\"'WAREHOUSES'\"\n (modelChange)=\"onSelectWarehouse($event)\"\n ></co-drop-down-list>\n </div>\n </div>\n\n <div class=\"stock-grid\">\n\n </div>\n <div class=\"button-wrapper\">\n <div class=\"button-left\">\n <co-button (click)=\"onOkClick()\"></co-button>\n </div>\n <div class=\"button-right\">\n <co-button (click)=\"onCancelClick()\"></co-button>\n </div>\n </div>\n </div>\n\n ",
|
|
2026
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
2027
|
+
},] }
|
|
2028
|
+
];
|
|
2029
|
+
StockLocationComponent.ctorParameters = function () { return []; };
|
|
2030
|
+
StockLocationComponent.propDecorators = {
|
|
2031
|
+
stockLocationInformation: [{ type: i0.Input }],
|
|
2032
|
+
backToStockLines: [{ type: i0.Output }]
|
|
2033
|
+
};
|
|
2034
|
+
|
|
2035
|
+
var StockTransferComponent = /** @class */ (function () {
|
|
2036
|
+
function StockTransferComponent(_stockService) {
|
|
2037
|
+
this._stockService = _stockService;
|
|
2038
|
+
this.handleCancelClicked = new i0.EventEmitter();
|
|
2039
|
+
this.handleStickerClicked = new i0.EventEmitter();
|
|
2040
|
+
this.allWarehousesDropdownFields = { value: "warehouseNo", text: "description" };
|
|
2041
|
+
this.showSendMethodDialog = false;
|
|
2042
|
+
}
|
|
2043
|
+
StockTransferComponent.prototype.handleOkClick = function () {
|
|
2044
|
+
};
|
|
2045
|
+
StockTransferComponent.prototype.handleCancelClick = function () {
|
|
2046
|
+
this.handleCancelClicked.emit();
|
|
2047
|
+
};
|
|
2048
|
+
StockTransferComponent.prototype.handleSelectedWarehouse = function (event) {
|
|
2049
|
+
};
|
|
2050
|
+
StockTransferComponent.prototype.handleStickerClick = function () {
|
|
2051
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2052
|
+
return __generator(this, function (_a) {
|
|
2053
|
+
this.handleStickerClicked.emit();
|
|
2054
|
+
this.showSendMethodDialog = true;
|
|
2055
|
+
return [2 /*return*/];
|
|
2056
|
+
});
|
|
2057
|
+
});
|
|
2058
|
+
};
|
|
2059
|
+
return StockTransferComponent;
|
|
2060
|
+
}());
|
|
2061
|
+
StockTransferComponent.decorators = [
|
|
2062
|
+
{ type: i0.Component, args: [{
|
|
2063
|
+
selector: "co-stock-transfer",
|
|
2064
|
+
template: "\n <div class=\"stock-transfer\">\n <div class=\"stock-transfer-columns\">\n <h1 [textContent]=\"'Nog niet geimplmenteerd'\"></h1>\n <div *ngIf=\"article\" class=\"stock-transfer-left-column\">\n <co-input-text disabled\n [(model)]=\"article.warehouseNo\"\n [textContent]=\"article.warehouseNo\"\n [placeholder]=\"'Standaard magazijn'\">\n </co-input-text>\n <co-input-text disabled\n [(model)]=\"article.locationNo\"\n [textContent]=\"article.locationNo\"\n [placeholder]=\"'Standaard locatie'\">\n </co-input-text>\n <co-input-text disabled\n [(model)]=\"stockSticker.batch\"\n [placeholder]=\"'Batch'\">\n </co-input-text>\n <co-input-text disabled\n [(model)]=\"stockSticker.serial\"\n [placeholder]=\"'Serie'\">\n </co-input-text>\n <co-input-text\n [(model)]=\"article.amountAssigned\"\n [placeholder]=\"'Aantal'\">\n\n </co-input-text>\n </div>\n\n <div class=\"stock-transfer-right-column\">\n <co-drop-down-list [collection]=\"allWarehouses\"\n [fields]=\"allWarehousesDropdownFields\"\n (modelChange)=\"handleSelectedWarehouse($event)\"\n >\n </co-drop-down-list>\n <co-drop-down-list>\n\n </co-drop-down-list>\n <co-input-text [placeholder]=\"'Voorraadstatus'\">\n\n </co-input-text>\n <co-input-text [placeholder]=\"'Omschrijving'\">\n\n </co-input-text>\n </div>\n </div>\n\n <div class=\"ok-cancel-buttons\">\n <co-button [textContent]=\"'Ok'\" (click)=\"handleOkClick()\"></co-button>\n <co-button [textContent]=\"'Annuleren'\" (click)=\"handleCancelClick()\"></co-button>\n <co-button [textContent]=\"'Sticker'\" (click)=\"handleStickerClick()\"></co-button>\n </div>\n </div>\n ",
|
|
2065
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
2066
|
+
},] }
|
|
2067
|
+
];
|
|
2068
|
+
StockTransferComponent.ctorParameters = function () { return [
|
|
2069
|
+
{ type: StockService }
|
|
2070
|
+
]; };
|
|
2071
|
+
StockTransferComponent.propDecorators = {
|
|
2072
|
+
stockSticker: [{ type: i0.Input }],
|
|
2073
|
+
article: [{ type: i0.Input }],
|
|
2074
|
+
articleWarehouse: [{ type: i0.Input }],
|
|
2075
|
+
allWarehouses: [{ type: i0.Input }],
|
|
2076
|
+
handleCancelClicked: [{ type: i0.Output }],
|
|
2077
|
+
handleStickerClicked: [{ type: i0.Output }]
|
|
2078
|
+
};
|
|
2079
|
+
|
|
2080
|
+
var SendOption;
|
|
2081
|
+
(function (SendOption) {
|
|
2082
|
+
SendOption[SendOption["Email"] = 0] = "Email";
|
|
2083
|
+
SendOption[SendOption["Print"] = 1] = "Print";
|
|
2084
|
+
SendOption[SendOption["Pdf"] = 2] = "Pdf";
|
|
2085
|
+
SendOption[SendOption["Xml"] = 3] = "Xml";
|
|
2086
|
+
})(SendOption || (SendOption = {}));
|
|
2087
|
+
|
|
2088
|
+
var SendMethodDialogComponent = /** @class */ (function () {
|
|
2089
|
+
function SendMethodDialogComponent(iconCacheService, _stockService) {
|
|
2090
|
+
this.iconCacheService = iconCacheService;
|
|
2091
|
+
this._stockService = _stockService;
|
|
2092
|
+
this.icons = Icon;
|
|
2093
|
+
this.sendOption = SendOption;
|
|
2094
|
+
this.sendOptions = [
|
|
2095
|
+
{ option: SendOption.Email,
|
|
2096
|
+
iconName: this.icons.Email },
|
|
2097
|
+
{ option: SendOption.Print,
|
|
2098
|
+
iconName: this.icons.Print },
|
|
2099
|
+
{ option: SendOption.Pdf,
|
|
2100
|
+
iconName: this.icons.Pdf },
|
|
2101
|
+
{ option: SendOption.Xml,
|
|
2102
|
+
iconName: this.icons.Xml }
|
|
2103
|
+
];
|
|
2104
|
+
this.activeSendOption = SendOption.Email;
|
|
2105
|
+
this.amountToPrint = 1;
|
|
2106
|
+
this.showStandardPrinterOptions = false;
|
|
2107
|
+
this.showPrinterSelections = false;
|
|
2108
|
+
this.showExitButton = true;
|
|
2109
|
+
this.emails = ['lars.vdv@colijn-it.nl', 'david@colijn-it.nl', 'ruben@colijn-it.nl'];
|
|
2110
|
+
this.models = [false, false, true];
|
|
2111
|
+
this.layouts = ['Layout 1', 'Layout 2', 'Layout 3'];
|
|
2112
|
+
this.showDialog = false;
|
|
2113
|
+
this.startSignatureClicked = new i0.EventEmitter();
|
|
2114
|
+
this.printButtonClicked = new i0.EventEmitter();
|
|
2115
|
+
}
|
|
2116
|
+
SendMethodDialogComponent.prototype.showClass = function () {
|
|
2117
|
+
return true;
|
|
2118
|
+
};
|
|
2119
|
+
SendMethodDialogComponent.prototype.getPrinters = function () {
|
|
2120
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2121
|
+
var _this = this;
|
|
2122
|
+
return __generator(this, function (_a) {
|
|
2123
|
+
return [2 /*return*/, this._stockService.getAllPrinters(true).then(function (list) {
|
|
2124
|
+
_this.printerList = list;
|
|
2125
|
+
})];
|
|
2126
|
+
});
|
|
2127
|
+
});
|
|
2128
|
+
};
|
|
2129
|
+
SendMethodDialogComponent.prototype.closeDialogClick = function () {
|
|
2130
|
+
this.showDialog = false;
|
|
2131
|
+
};
|
|
2132
|
+
SendMethodDialogComponent.prototype.handleSignatureStart = function () {
|
|
2133
|
+
this.startSignatureClicked.emit();
|
|
2134
|
+
};
|
|
2135
|
+
SendMethodDialogComponent.prototype.handlePrintClicked = function () {
|
|
2136
|
+
this.printButtonClicked.emit();
|
|
2137
|
+
};
|
|
2138
|
+
SendMethodDialogComponent.prototype.togglePrinterSelection = function () {
|
|
2139
|
+
this.getPrinters();
|
|
2140
|
+
if (!this.showPrinterSelections) {
|
|
2141
|
+
this.showPrinterSelections = true;
|
|
2142
|
+
this.headerTitle = 'Printer selectie';
|
|
2143
|
+
}
|
|
2144
|
+
else {
|
|
2145
|
+
this.showPrinterSelections = false;
|
|
2146
|
+
this.headerTitle = 'Verzendopties';
|
|
2147
|
+
}
|
|
2148
|
+
};
|
|
2149
|
+
SendMethodDialogComponent.prototype.loadLayouts = function () {
|
|
2150
|
+
var printJob$1 = new printJob.PrintJob();
|
|
2151
|
+
// this.printLayouts = this._stockService.getPrintTemplates(printJob);
|
|
2152
|
+
};
|
|
2153
|
+
SendMethodDialogComponent.prototype.onPrinterClicked = function (printer) {
|
|
2154
|
+
this.defaultPrinter = printer.name;
|
|
2155
|
+
this.showPrinterSelections = !this.showPrinterSelections;
|
|
2156
|
+
};
|
|
2157
|
+
return SendMethodDialogComponent;
|
|
2158
|
+
}());
|
|
2159
|
+
SendMethodDialogComponent.decorators = [
|
|
2160
|
+
{ type: i0.Component, args: [{
|
|
2161
|
+
selector: "ione-send-method-dialog",
|
|
2162
|
+
template: "\n <div class=\"send-method-dialog-wrapper\">\n <co-dialog-wizard id=\"sendOptionsDialog\" *ngIf=\"showDialog\" [showCloseIcon]=\"showExitButton\" (closeClick)=\"closeDialogClick()\">\n <ng-container header>\n <span [textContent]=\"headerTitle\"></span>\n </ng-container>\n <div class=\"dialog-content-wrapper\">\n <div class=\"main-content-container\" *ngIf=\"!showPrinterSelections\">\n <div class=\"send-options-wrapper\">\n <div class=\"custom-button-wrapper\" *ngFor=\"let sendOption of sendOptions\"\n [class.selected-option]=\"sendOption.option === activeSendOption\"\n (click)=\"activeSendOption = sendOption.option\">\n <co-icon [iconData]=\"iconCacheService.getIcon(sendOption.iconName)\"></co-icon>\n </div>\n </div>\n\n <div class=\"email-option-content\" *ngIf=\"activeSendOption === sendOption.Email || activeSendOption === sendOption.Pdf\">\n <div class=\"emails-container\" *ngIf=\"activeSendOption === sendOption.Email\">\n <co-input-checkbox\n *ngFor=\"let email, let index of emails\"\n [name]=\"email\"\n [(model)]=\"models[index]\"\n [label]=\"email\"\n [cssClass]=\"'input-checkbox-wrapper'\"\n ></co-input-checkbox>\n </div>\n\n <div class=\"lov-wrapper\">\n <co-input-combo-box\n [(model)]=\"selectedLayout\"\n [collection]=\"layouts\"\n [forceReadonly]=\"true\"\n placeholder=\"Layout\"\n ></co-input-combo-box>\n </div>\n\n <div class=\"signature-button-wrapper\">\n <div class=\"custom-button-wrapper signature-button\" (click)=\"handleSignatureStart()\">\n <co-icon [iconData]=\"iconCacheService.getIcon(icons.SignatureField)\"></co-icon>\n </div>\n </div>\n </div>\n\n <div class=\"email-option-content\" *ngIf=\"activeSendOption === sendOption.Print\">\n <div class=\"lov-wrapper\">\n <co-input-combo-box\n [(model)]=\"selectedLayout\"\n [collection]=\"layouts\"\n [forceReadonly]=\"true\"\n placeholder=\"Layout\"\n ></co-input-combo-box>\n </div>\n\n <div class=\"lov-wrapper clickable\" (click)=\"togglePrinterSelection()\">\n <div class=\"selected-printer-wrapper\">\n <div class=\"printer-option-list-item\">\n <co-icon class=\"printer-icon\" [iconData]=\"iconCacheService.getIcon(icons.Print)\"></co-icon>\n <div class=\"printer-details\" *ngIf=\"printerList\">\n <span class=\"printer-name\" [textContent]=\"defaultPrinter\"></span>\n <span class=\"printer-status\" [textContent]=\"defaultPrinter.acceptingJobs\"></span>\n </div>\n </div>\n <co-icon class=\"select-printer-arrow\" [iconData]=\"iconCacheService.getIcon(icons.ArrowPointRight)\"></co-icon>\n </div>\n </div>\n\n <div class=\"standard-printer-wrapper\">\n <div class=\"standard-printer-link\" (click)=\"showStandardPrinterOptions = !showStandardPrinterOptions\">\n <co-icon class=\"arrow-icon\" [iconData]=\"iconCacheService.getIcon(icons.ArrowFatRight)\"></co-icon>\n <span class=\"standard-printer-message\" [textContent]=\"'Standaard printer voor lay-out instellen'\"></span>\n </div>\n\n <div class=\"standard-printer-selections\" *ngIf=\"showStandardPrinterOptions\">\n <co-input-checkbox\n [(model)]=\"models[0]\"\n [label]=\"'Per gebruiker instellen'\"\n [cssClass]=\"'input-checkbox-wrapper'\"\n ></co-input-checkbox>\n <co-input-checkbox\n [(model)]=\"models[1]\"\n [label]=\"'Voor alle gebruikers instellen'\"\n [cssClass]=\"'input-checkbox-wrapper'\"\n ></co-input-checkbox>\n </div>\n </div>\n\n <div class=\"print-footer-wrapper\">\n <div class=\"input-number-wrapper\">\n <co-input-number-picker class=\"number-picker\"\n [step]=\"1\" [(model)]=\"amountToPrint\" [min]=\"1\"\n [ngModelOptions]=\"{debounce: 1}\">\n </co-input-number-picker>\n </div>\n <div class=\"custom-button-wrapper print-button\" (click)=\"handlePrintClicked()\">\n <span [textContent]=\"'Print'\"></span>\n </div>\n <div class=\"custom-button-wrapper signature-button\" (click)=\"handleSignatureStart()\">\n <co-icon [iconData]=\"iconCacheService.getIcon(icons.SignatureField)\"></co-icon>\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"printer-content-container\" @slideInOut *ngIf=\"showPrinterSelections\">\n <div class=\"selected-printer-wrapper selection clickable\" *ngFor=\"let printers of printerList\" (click)=\"onPrinterClicked(printers)\">\n <div class=\"printer-option-list-item\">\n <co-icon class=\"printer-icon\" [iconData]=\"iconCacheService.getIcon(icons.Print)\"></co-icon>\n <div class=\"printer-details\">\n <span class=\"printer-name\" [textContent]=\"printers.name\"></span>\n <span class=\"printer-status\" [textContent]=\"printers.acceptingJobs\"></span>\n </div>\n </div>\n <co-icon class=\"select-printer-arrow\" *ngIf=\"!showPrinterSelections\"\n [iconData]=\"iconCacheService.getIcon(icons.ArrowPointRight)\"></co-icon>\n </div>\n </div>\n </div>\n </co-dialog-wizard>\n </div>\n ",
|
|
2163
|
+
encapsulation: i0.ViewEncapsulation.None,
|
|
2164
|
+
animations: [
|
|
2165
|
+
animations.trigger('slideInOut', [
|
|
2166
|
+
animations.state('*', animations.style({ transform: 'translateX(0%)', width: '100%', opacity: '1' })),
|
|
2167
|
+
animations.state('void', animations.style({ transform: 'translateX(150%)', opacity: '0' })),
|
|
2168
|
+
animations.transition('void => *', animations.animate(250))
|
|
2169
|
+
])
|
|
2170
|
+
]
|
|
2171
|
+
},] }
|
|
2172
|
+
];
|
|
2173
|
+
SendMethodDialogComponent.ctorParameters = function () { return [
|
|
2174
|
+
{ type: IconCacheService },
|
|
2175
|
+
{ type: StockService }
|
|
2176
|
+
]; };
|
|
2177
|
+
SendMethodDialogComponent.propDecorators = {
|
|
2178
|
+
showDialog: [{ type: i0.Input }],
|
|
2179
|
+
headerTitle: [{ type: i0.Input }],
|
|
2180
|
+
printerList: [{ type: i0.Input }],
|
|
2181
|
+
startSignatureClicked: [{ type: i0.Output }],
|
|
2182
|
+
printButtonClicked: [{ type: i0.Output }],
|
|
2183
|
+
showClass: [{ type: i0.HostBinding, args: ["class.ione-send-method-dialog",] }]
|
|
2184
|
+
};
|
|
2185
|
+
|
|
2186
|
+
var SendMethodDialogModule = /** @class */ (function () {
|
|
2187
|
+
function SendMethodDialogModule() {
|
|
2188
|
+
}
|
|
2189
|
+
return SendMethodDialogModule;
|
|
2190
|
+
}());
|
|
2191
|
+
SendMethodDialogModule.decorators = [
|
|
2192
|
+
{ type: i0.NgModule, args: [{
|
|
2193
|
+
declarations: [
|
|
2194
|
+
SendMethodDialogComponent
|
|
2195
|
+
],
|
|
2196
|
+
imports: [
|
|
2197
|
+
common.CommonModule,
|
|
2198
|
+
corecomponents_v12.CoDialogPromptModule,
|
|
2199
|
+
corecomponents_v12.InputCheckboxModule,
|
|
2200
|
+
corecomponents_v12.InputComboBoxModule,
|
|
2201
|
+
corecomponents_v12.IconModule,
|
|
2202
|
+
corecomponents_v12.InputNumberPickerModule,
|
|
2203
|
+
corecomponents_v12.CoDialogWizardModule,
|
|
2204
|
+
corecomponents_v12.ButtonModule
|
|
2205
|
+
],
|
|
2206
|
+
exports: [
|
|
2207
|
+
SendMethodDialogComponent
|
|
2208
|
+
]
|
|
2209
|
+
},] }
|
|
2210
|
+
];
|
|
2211
|
+
|
|
2212
|
+
var StockModule = /** @class */ (function () {
|
|
2213
|
+
function StockModule() {
|
|
2214
|
+
}
|
|
2215
|
+
return StockModule;
|
|
2216
|
+
}());
|
|
2217
|
+
StockModule.decorators = [
|
|
2218
|
+
{ type: i0.NgModule, args: [{
|
|
2219
|
+
imports: [
|
|
2220
|
+
corecomponents_v12.InputComboBoxModule,
|
|
2221
|
+
corecomponents_v12.CoGridModule,
|
|
2222
|
+
corecomponents_v12.ButtonModule,
|
|
2223
|
+
common.CommonModule,
|
|
2224
|
+
corecomponents_v12.InputRadioButtonModule,
|
|
2225
|
+
corecomponents_v12.DropDownModule,
|
|
2226
|
+
corecomponents_v12.SimpleGridModule,
|
|
2227
|
+
corecomponents_v12.ImageModule,
|
|
2228
|
+
corecomponents_v12.InputTextModule,
|
|
2229
|
+
SendMethodDialogModule,
|
|
2230
|
+
corecomponents_v12.IconModule
|
|
2231
|
+
],
|
|
2232
|
+
declarations: [
|
|
2233
|
+
StockComponent,
|
|
2234
|
+
StockInformationComponent,
|
|
2235
|
+
StockInformationGridComponent,
|
|
2236
|
+
StockLocationComponent,
|
|
2237
|
+
StockTransferComponent
|
|
2238
|
+
],
|
|
2239
|
+
exports: [
|
|
2240
|
+
StockComponent
|
|
2241
|
+
],
|
|
2242
|
+
providers: [
|
|
2243
|
+
StockService,
|
|
2244
|
+
IoneConnectorAdapterService
|
|
2245
|
+
]
|
|
2246
|
+
},] }
|
|
2247
|
+
];
|
|
2248
|
+
|
|
730
2249
|
/*
|
|
731
2250
|
* Public API Surface of sharedcomponents
|
|
732
2251
|
*/
|
|
@@ -737,8 +2256,19 @@
|
|
|
737
2256
|
|
|
738
2257
|
exports.DocsignComponent = DocsignComponent;
|
|
739
2258
|
exports.DocsignModule = DocsignModule;
|
|
2259
|
+
exports.SendMethodDialogComponent = SendMethodDialogComponent;
|
|
2260
|
+
exports.SendMethodDialogModule = SendMethodDialogModule;
|
|
2261
|
+
exports.StockComponent = StockComponent;
|
|
2262
|
+
exports.StockModule = StockModule;
|
|
740
2263
|
exports["ɵa"] = SignatureComponent;
|
|
741
2264
|
exports["ɵb"] = SignaturesComponent;
|
|
2265
|
+
exports["ɵc"] = StockService;
|
|
2266
|
+
exports["ɵd"] = IoneConnectorAdapterService;
|
|
2267
|
+
exports["ɵe"] = IconCacheService;
|
|
2268
|
+
exports["ɵf"] = StockInformationComponent;
|
|
2269
|
+
exports["ɵg"] = StockInformationGridComponent;
|
|
2270
|
+
exports["ɵh"] = StockLocationComponent;
|
|
2271
|
+
exports["ɵi"] = StockTransferComponent;
|
|
742
2272
|
|
|
743
2273
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
744
2274
|
|