@colijnit/transaction 12.1.2 → 12.1.3
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/app/component/core/base/transaction-base.component.d.ts +10 -0
- package/app/component/{shopping-cart → core}/characteristic-answer/characteristic-answer.component.d.ts +0 -0
- package/app/component/core/warehouse/warehouse.component.d.ts +35 -0
- package/app/component/service-order/service-order.component.d.ts +9 -4
- package/app/component/service-order/transaction-manager/transaction-manager.component.d.ts +63 -0
- package/app/component/shopping-cart/shopping-cart-manager/shopping-cart-manager.component.d.ts +1 -1
- package/app/service/transaction.service.d.ts +14 -8
- package/bundles/colijnit-transaction.umd.js +850 -115
- package/bundles/colijnit-transaction.umd.js.map +1 -1
- package/colijnit-transaction.d.ts +20 -18
- package/colijnit-transaction.metadata.json +1 -1
- package/esm2015/app/component/core/base/transaction-base.component.js +35 -12
- package/esm2015/app/component/core/characteristic-answer/characteristic-answer.component.js +100 -0
- package/esm2015/app/component/core/warehouse/warehouse.component.js +133 -0
- package/esm2015/app/component/service-order/ione-service-order-module.js +7 -2
- package/esm2015/app/component/service-order/service-order.component.js +35 -6
- package/esm2015/app/component/service-order/transaction-article-text/transaction-article-text.component.js +16 -5
- package/esm2015/app/component/service-order/transaction-manager/transaction-manager.component.js +305 -0
- package/esm2015/app/component/shopping-cart/ione-shopping-cart.module.js +3 -3
- package/esm2015/app/component/shopping-cart/shopping-cart-manager/shopping-cart-manager.component.js +1 -1
- package/esm2015/app/service/transaction.service.js +72 -23
- package/esm2015/assets/dictionary/text.properties.js +5 -1
- package/esm2015/colijnit-transaction.js +21 -19
- package/fesm2015/colijnit-transaction.js +584 -45
- package/fesm2015/colijnit-transaction.js.map +1 -1
- package/package.json +1 -1
- package/esm2015/app/component/shopping-cart/characteristic-answer/characteristic-answer.component.js +0 -99
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('@colijnit/ioneconnector/build/model/options'), require('@colijnit/transactionapi/build/model/customer-full-object.bo'), require('@colijnit/transactionapi/build/model/transaction-info-response.bo'), require('@colijnit/transactionapi/build/model/relation-privacy-setting.bo'), require('@colijnit/transactionapi/build/model/get-postal-code-retrieval-output-params'), require('@colijnit/transactionapi/build/model/relation-list-object.bo'), require('@colijnit/transactionapi/build/model/article-full-object'), require('@colijnit/transactionapi/build/model/line-operation-response.bo'), require('@colijnit/transactionapi/build/transaction'), require('@colijnit/transactionapi/build/utils/function/not-nill.function'), require('@colijnit/transactionapi/build/utils/object-utils'), require('@colijnit/transactionapi/build/enum/yes-no-db-type.enum'), require('@colijnit/transactionapi/build/enum/true-false-db-type.enum'), require('@colijnit/transactionapi/build/enum/one-zero-bool-db-type.enum'), require('@colijnit/transactionapi/build/enum/db-boolean-value-type.enum'), require('@colijnit/transactionapi/build/utils/date-utils'), require('@colijnit/transactionapi/build/utils/number-utils'), require('@colijnit/transactionapi/build/utils/function/is-nill.function'), require('@colijnit/transactionapi/build/factory/decorators/map-property.decorator'), require('@colijnit/transactionapi/build/factory/decorators/boolean.decorator'), require('@colijnit/transactionapi/build/factory/decorators/json.decorator'), require('@colijnit/transactionapi/build/factory/decorators/complex-array.decorator'), require('@colijnit/transactionapi/build/utils/image-utils'), require('@colijnit/transactionapi/build/model/nul-relation-object'), require('@colijnit/transactionapi/build/enum/transaction-kind.enum'), require('@colijnit/transactionapi/build/enum/sequence-name.enum'), require('@colijnit/transactionapi/build/utils/array-utils'), require('@colijnit/transactionapi/build/model/set-transaction-delivery-options-request.bo'), require('@colijnit/transactionapi/build/model/transaction-total.bo'), require('@colijnit/transactionapi/build/enum/transaction-line-type.enum'), require('@colijnit/transactionapi/build/model/line-operation-status.bo'), require('@colijnit/transactionapi/build/model/transaction-info.bo'), require('@colijnit/transactionapi/build/enum/pending-reason-type.enum'), require('@colijnit/transactionapi/build/enum/communication-type.enum'), require('@colijnit/transactionapi/build/model/contact-option.bo'), require('@colijnit/transactionapi/build/enum/relation-name-kind.enum'), require('@colijnit/transactionapi/build/enum/address-type.enum'), require('@colijnit/transactionapi/build/enum/gender-type.enum'), require('@colijnit/transactionapi/build/utils/business-object-utils'), require('@colijnit/
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@colijnit/transaction', ['exports', '@angular/core', 'rxjs', '@colijnit/ioneconnector/build/model/options', '@colijnit/transactionapi/build/model/customer-full-object.bo', '@colijnit/transactionapi/build/model/transaction-info-response.bo', '@colijnit/transactionapi/build/model/relation-privacy-setting.bo', '@colijnit/transactionapi/build/model/get-postal-code-retrieval-output-params', '@colijnit/transactionapi/build/model/relation-list-object.bo', '@colijnit/transactionapi/build/model/article-full-object', '@colijnit/transactionapi/build/model/line-operation-response.bo', '@colijnit/transactionapi/build/transaction', '@colijnit/transactionapi/build/utils/function/not-nill.function', '@colijnit/transactionapi/build/utils/object-utils', '@colijnit/transactionapi/build/enum/yes-no-db-type.enum', '@colijnit/transactionapi/build/enum/true-false-db-type.enum', '@colijnit/transactionapi/build/enum/one-zero-bool-db-type.enum', '@colijnit/transactionapi/build/enum/db-boolean-value-type.enum', '@colijnit/transactionapi/build/utils/date-utils', '@colijnit/transactionapi/build/utils/number-utils', '@colijnit/transactionapi/build/utils/function/is-nill.function', '@colijnit/transactionapi/build/factory/decorators/map-property.decorator', '@colijnit/transactionapi/build/factory/decorators/boolean.decorator', '@colijnit/transactionapi/build/factory/decorators/json.decorator', '@colijnit/transactionapi/build/factory/decorators/complex-array.decorator', '@colijnit/transactionapi/build/utils/image-utils', '@colijnit/transactionapi/build/model/nul-relation-object', '@colijnit/transactionapi/build/enum/transaction-kind.enum', '@colijnit/transactionapi/build/enum/sequence-name.enum', '@colijnit/transactionapi/build/utils/array-utils', '@colijnit/transactionapi/build/model/set-transaction-delivery-options-request.bo', '@colijnit/transactionapi/build/model/transaction-total.bo', '@colijnit/transactionapi/build/enum/transaction-line-type.enum', '@colijnit/transactionapi/build/model/line-operation-status.bo', '@colijnit/transactionapi/build/model/transaction-info.bo', '@colijnit/transactionapi/build/enum/pending-reason-type.enum', '@colijnit/transactionapi/build/enum/communication-type.enum', '@colijnit/transactionapi/build/model/contact-option.bo', '@colijnit/transactionapi/build/enum/relation-name-kind.enum', '@colijnit/transactionapi/build/enum/address-type.enum', '@colijnit/transactionapi/build/enum/gender-type.enum', '@colijnit/transactionapi/build/utils/business-object-utils', '@colijnit/
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.colijnit = global.colijnit || {}, global.colijnit.transaction = {}), global.ng.core, global.rxjs, global.options, global.customerFullObject_bo, global.transactionInfoResponse_bo, global.relationPrivacySetting_bo, global.getPostalCodeRetrievalOutputParams, global.relationListObject_bo, global.articleFullObject, global.lineOperationResponse_bo, global.transaction, 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.imageUtils, global.nulRelationObject, global.transactionKind_enum, global.sequenceName_enum, global.arrayUtils, global.setTransactionDeliveryOptionsRequest_bo, global.transactionTotal_bo, global.transactionLineType_enum, global.lineOperationStatus_bo, global.transactionInfo_bo, global.pendingReasonType_enum, global.communicationType_enum, global.contactOption_bo, global.relationNameKind_enum, global.addressType_enum, global.genderType_enum, global.businessObjectUtils, global.
|
|
5
|
-
})(this, (function (exports, i0, rxjs, options, customerFullObject_bo, transactionInfoResponse_bo, relationPrivacySetting_bo, getPostalCodeRetrievalOutputParams, relationListObject_bo, articleFullObject, lineOperationResponse_bo, transaction, notNill_function, objectUtils, yesNoDbType_enum, trueFalseDbType_enum, oneZeroBoolDbType_enum, dbBooleanValueType_enum, dateUtils, numberUtils, isNill_function, mapProperty_decorator, boolean_decorator, json_decorator, complexArray_decorator, imageUtils, nulRelationObject, transactionKind_enum, sequenceName_enum, arrayUtils, setTransactionDeliveryOptionsRequest_bo, transactionTotal_bo, transactionLineType_enum, lineOperationStatus_bo, transactionInfo_bo, pendingReasonType_enum, communicationType_enum, contactOption_bo, relationNameKind_enum, addressType_enum, genderType_enum, businessObjectUtils,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('@colijnit/ioneconnector/build/model/options'), require('@colijnit/transactionapi/build/model/customer-full-object.bo'), require('@colijnit/transactionapi/build/model/transaction-info-response.bo'), require('@colijnit/transactionapi/build/model/relation-privacy-setting.bo'), require('@colijnit/transactionapi/build/model/get-postal-code-retrieval-output-params'), require('@colijnit/transactionapi/build/model/relation-list-object.bo'), require('@colijnit/transactionapi/build/model/article-full-object'), require('@colijnit/transactionapi/build/model/line-operation-response.bo'), require('@colijnit/transactionapi/build/transaction'), require('@colijnit/transactionapi/build/utils/function/not-nill.function'), require('@colijnit/transactionapi/build/utils/object-utils'), require('@colijnit/transactionapi/build/enum/yes-no-db-type.enum'), require('@colijnit/transactionapi/build/enum/true-false-db-type.enum'), require('@colijnit/transactionapi/build/enum/one-zero-bool-db-type.enum'), require('@colijnit/transactionapi/build/enum/db-boolean-value-type.enum'), require('@colijnit/transactionapi/build/utils/date-utils'), require('@colijnit/transactionapi/build/utils/number-utils'), require('@colijnit/transactionapi/build/utils/function/is-nill.function'), require('@colijnit/transactionapi/build/factory/decorators/map-property.decorator'), require('@colijnit/transactionapi/build/factory/decorators/boolean.decorator'), require('@colijnit/transactionapi/build/factory/decorators/json.decorator'), require('@colijnit/transactionapi/build/factory/decorators/complex-array.decorator'), require('@colijnit/transactionapi/build/utils/image-utils'), require('@colijnit/transactionapi/build/model/nul-relation-object'), require('@colijnit/transactionapi/build/enum/transaction-kind.enum'), require('@colijnit/transactionapi/build/enum/sequence-name.enum'), require('@colijnit/transactionapi/build/utils/array-utils'), require('@colijnit/transactionapi/build/model/set-transaction-delivery-options-request.bo'), require('@colijnit/transactionapi/build/model/transaction-total.bo'), require('@colijnit/transactionapi/build/enum/transaction-line-type.enum'), require('@colijnit/transactionapi/build/model/line-operation-status.bo'), require('@colijnit/transactionapi/build/model/transaction-info.bo'), require('@colijnit/transactionapi/build/enum/pending-reason-type.enum'), require('@colijnit/corecomponents_v12'), require('@colijnit/transactionapi/build/enum/communication-type.enum'), require('@colijnit/transactionapi/build/model/contact-option.bo'), require('@colijnit/transactionapi/build/enum/relation-name-kind.enum'), require('@colijnit/transactionapi/build/enum/address-type.enum'), require('@colijnit/transactionapi/build/enum/gender-type.enum'), require('@colijnit/transactionapi/build/utils/business-object-utils'), require('@colijnit/transactionapi/build/utils/function-utils'), require('@colijnit/transactionapi/build/model/address.bo'), require('@angular/flex-layout'), require('@angular/material/stepper'), require('@angular/common'), require('@angular/platform-browser'), require('@colijnit/transactionapi/build/model/resolve-pending-reason-request.bo'), require('@colijnit/transactionapi/build/enum/sort-direction'), require('@colijnit/transactionapi/build/enum/sort-type.enum'), require('@colijnit/transactionapi/build/enum/refcode/stock-status.enum'), require('@angular/animations'), require('@colijnit/transactionapi/build/model/relation-request'), require('@syncfusion/ej2-angular-splitbuttons'), require('@syncfusion/ej2-angular-buttons'), require('@syncfusion/ej2-angular-dropdowns'), require('@syncfusion/ej2-navigations'), require('@syncfusion/ej2-angular-navigations'), require('@colijnit/transactionapi/build/model/transaction-line-info.bo')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@colijnit/transaction', ['exports', '@angular/core', 'rxjs', '@colijnit/ioneconnector/build/model/options', '@colijnit/transactionapi/build/model/customer-full-object.bo', '@colijnit/transactionapi/build/model/transaction-info-response.bo', '@colijnit/transactionapi/build/model/relation-privacy-setting.bo', '@colijnit/transactionapi/build/model/get-postal-code-retrieval-output-params', '@colijnit/transactionapi/build/model/relation-list-object.bo', '@colijnit/transactionapi/build/model/article-full-object', '@colijnit/transactionapi/build/model/line-operation-response.bo', '@colijnit/transactionapi/build/transaction', '@colijnit/transactionapi/build/utils/function/not-nill.function', '@colijnit/transactionapi/build/utils/object-utils', '@colijnit/transactionapi/build/enum/yes-no-db-type.enum', '@colijnit/transactionapi/build/enum/true-false-db-type.enum', '@colijnit/transactionapi/build/enum/one-zero-bool-db-type.enum', '@colijnit/transactionapi/build/enum/db-boolean-value-type.enum', '@colijnit/transactionapi/build/utils/date-utils', '@colijnit/transactionapi/build/utils/number-utils', '@colijnit/transactionapi/build/utils/function/is-nill.function', '@colijnit/transactionapi/build/factory/decorators/map-property.decorator', '@colijnit/transactionapi/build/factory/decorators/boolean.decorator', '@colijnit/transactionapi/build/factory/decorators/json.decorator', '@colijnit/transactionapi/build/factory/decorators/complex-array.decorator', '@colijnit/transactionapi/build/utils/image-utils', '@colijnit/transactionapi/build/model/nul-relation-object', '@colijnit/transactionapi/build/enum/transaction-kind.enum', '@colijnit/transactionapi/build/enum/sequence-name.enum', '@colijnit/transactionapi/build/utils/array-utils', '@colijnit/transactionapi/build/model/set-transaction-delivery-options-request.bo', '@colijnit/transactionapi/build/model/transaction-total.bo', '@colijnit/transactionapi/build/enum/transaction-line-type.enum', '@colijnit/transactionapi/build/model/line-operation-status.bo', '@colijnit/transactionapi/build/model/transaction-info.bo', '@colijnit/transactionapi/build/enum/pending-reason-type.enum', '@colijnit/corecomponents_v12', '@colijnit/transactionapi/build/enum/communication-type.enum', '@colijnit/transactionapi/build/model/contact-option.bo', '@colijnit/transactionapi/build/enum/relation-name-kind.enum', '@colijnit/transactionapi/build/enum/address-type.enum', '@colijnit/transactionapi/build/enum/gender-type.enum', '@colijnit/transactionapi/build/utils/business-object-utils', '@colijnit/transactionapi/build/utils/function-utils', '@colijnit/transactionapi/build/model/address.bo', '@angular/flex-layout', '@angular/material/stepper', '@angular/common', '@angular/platform-browser', '@colijnit/transactionapi/build/model/resolve-pending-reason-request.bo', '@colijnit/transactionapi/build/enum/sort-direction', '@colijnit/transactionapi/build/enum/sort-type.enum', '@colijnit/transactionapi/build/enum/refcode/stock-status.enum', '@angular/animations', '@colijnit/transactionapi/build/model/relation-request', '@syncfusion/ej2-angular-splitbuttons', '@syncfusion/ej2-angular-buttons', '@syncfusion/ej2-angular-dropdowns', '@syncfusion/ej2-navigations', '@syncfusion/ej2-angular-navigations', '@colijnit/transactionapi/build/model/transaction-line-info.bo'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.colijnit = global.colijnit || {}, global.colijnit.transaction = {}), global.ng.core, global.rxjs, global.options, global.customerFullObject_bo, global.transactionInfoResponse_bo, global.relationPrivacySetting_bo, global.getPostalCodeRetrievalOutputParams, global.relationListObject_bo, global.articleFullObject, global.lineOperationResponse_bo, global.transaction, 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.imageUtils, global.nulRelationObject, global.transactionKind_enum, global.sequenceName_enum, global.arrayUtils, global.setTransactionDeliveryOptionsRequest_bo, global.transactionTotal_bo, global.transactionLineType_enum, global.lineOperationStatus_bo, global.transactionInfo_bo, global.pendingReasonType_enum, global.corecomponents_v12, global.communicationType_enum, global.contactOption_bo, global.relationNameKind_enum, global.addressType_enum, global.genderType_enum, global.businessObjectUtils, global.functionUtils, global.address_bo, global.ng.flexLayout, global.ng.material.stepper, global.ng.common, global.ng.platformBrowser, global.resolvePendingReasonRequest_bo, global.sortDirection, global.sortType_enum, global.stockStatus_enum, global.ng.animations, global.relationRequest, global.ej2AngularSplitbuttons, global.ej2AngularButtons, global.ej2AngularDropdowns, global.ej2Navigations, global.ej2AngularNavigations, global.transactionLineInfo_bo));
|
|
5
|
+
})(this, (function (exports, i0, rxjs, options, customerFullObject_bo, transactionInfoResponse_bo, relationPrivacySetting_bo, getPostalCodeRetrievalOutputParams, relationListObject_bo, articleFullObject, lineOperationResponse_bo, transaction, notNill_function, objectUtils, yesNoDbType_enum, trueFalseDbType_enum, oneZeroBoolDbType_enum, dbBooleanValueType_enum, dateUtils, numberUtils, isNill_function, mapProperty_decorator, boolean_decorator, json_decorator, complexArray_decorator, imageUtils, nulRelationObject, transactionKind_enum, sequenceName_enum, arrayUtils, setTransactionDeliveryOptionsRequest_bo, transactionTotal_bo, transactionLineType_enum, lineOperationStatus_bo, transactionInfo_bo, pendingReasonType_enum, corecomponents_v12, communicationType_enum, contactOption_bo, relationNameKind_enum, addressType_enum, genderType_enum, businessObjectUtils, functionUtils, address_bo, flexLayout, stepper, common, platformBrowser, resolvePendingReasonRequest_bo, sortDirection, sortType_enum, stockStatus_enum, animations, relationRequest, ej2AngularSplitbuttons, ej2AngularButtons, ej2AngularDropdowns, ej2Navigations, ej2AngularNavigations, transactionLineInfo_bo) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopNamespace(e) {
|
|
8
8
|
if (e && e.__esModule) return e;
|
|
@@ -1729,8 +1729,9 @@
|
|
|
1729
1729
|
IOneConnectorAdapterService.ctorParameters = function () { return []; };
|
|
1730
1730
|
|
|
1731
1731
|
var TransactionService = /** @class */ (function () {
|
|
1732
|
-
function TransactionService(_connector) {
|
|
1732
|
+
function TransactionService(_connector, _prompt) {
|
|
1733
1733
|
this._connector = _connector;
|
|
1734
|
+
this._prompt = _prompt;
|
|
1734
1735
|
this.transactionUpdated = new i0.EventEmitter();
|
|
1735
1736
|
this.transactionLoaded = new i0.EventEmitter();
|
|
1736
1737
|
this.applicationUser = false;
|
|
@@ -1800,6 +1801,11 @@
|
|
|
1800
1801
|
enumerable: false,
|
|
1801
1802
|
configurable: true
|
|
1802
1803
|
});
|
|
1804
|
+
TransactionService.prototype.pendingLineOperationStatus = function (lineOperationStatuses) {
|
|
1805
|
+
var status = lineOperationStatuses.find(function (line) { return line.pendingReasonType !== pendingReasonType_enum.PendingReasonType.NONE
|
|
1806
|
+
&& line.pendingReasonType !== pendingReasonType_enum.PendingReasonType.NON_CRITICAL_DISCONTINUATION; });
|
|
1807
|
+
return status;
|
|
1808
|
+
};
|
|
1803
1809
|
TransactionService.prototype.getArticleFullObject = function (goodId) {
|
|
1804
1810
|
return __awaiter(this, void 0, void 0, function () {
|
|
1805
1811
|
return __generator(this, function (_a) {
|
|
@@ -1973,13 +1979,13 @@
|
|
|
1973
1979
|
});
|
|
1974
1980
|
});
|
|
1975
1981
|
};
|
|
1976
|
-
TransactionService.prototype.resolvePendingLineReason = function (pendingLineValues) {
|
|
1982
|
+
TransactionService.prototype.resolvePendingLineReason = function (pendingLineValues, remember) {
|
|
1977
1983
|
var _this = this;
|
|
1984
|
+
if (remember === void 0) { remember = true; }
|
|
1978
1985
|
return new Promise(function (resolve) {
|
|
1979
1986
|
_this._connector.resolvePendingLineReason(pendingLineValues).then(function (response) { return __awaiter(_this, void 0, void 0, function () {
|
|
1980
1987
|
return __generator(this, function (_a) {
|
|
1981
|
-
this.
|
|
1982
|
-
this._rememberCurrentTransactionLineStatus(response);
|
|
1988
|
+
this._rememberResponse(remember, response);
|
|
1983
1989
|
resolve(response);
|
|
1984
1990
|
return [2 /*return*/];
|
|
1985
1991
|
});
|
|
@@ -2057,6 +2063,34 @@
|
|
|
2057
2063
|
});
|
|
2058
2064
|
});
|
|
2059
2065
|
};
|
|
2066
|
+
TransactionService.prototype.saveTransactionByUuid = function (transactionUuid) {
|
|
2067
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2068
|
+
var _this = this;
|
|
2069
|
+
return __generator(this, function (_a) {
|
|
2070
|
+
return [2 /*return*/, new Promise(function (resolve, reject) {
|
|
2071
|
+
_this._connector.saveTransaction(transactionUuid)
|
|
2072
|
+
.then(function (response) { return __awaiter(_this, void 0, void 0, function () {
|
|
2073
|
+
return __generator(this, function (_a) {
|
|
2074
|
+
if (response.isSuccess) {
|
|
2075
|
+
this.transactionLoaded.emit(response);
|
|
2076
|
+
resolve(true);
|
|
2077
|
+
}
|
|
2078
|
+
else {
|
|
2079
|
+
reject(false);
|
|
2080
|
+
}
|
|
2081
|
+
return [2 /*return*/];
|
|
2082
|
+
});
|
|
2083
|
+
}); })
|
|
2084
|
+
.catch(function (reason) {
|
|
2085
|
+
if (reason) {
|
|
2086
|
+
_this._prompt.showError(reason.getFullErrorString());
|
|
2087
|
+
}
|
|
2088
|
+
reject(false);
|
|
2089
|
+
});
|
|
2090
|
+
})];
|
|
2091
|
+
});
|
|
2092
|
+
});
|
|
2093
|
+
};
|
|
2060
2094
|
TransactionService.prototype.addRelationToTransaction = function (relationId) {
|
|
2061
2095
|
return __awaiter(this, void 0, void 0, function () {
|
|
2062
2096
|
var success;
|
|
@@ -2259,7 +2293,37 @@
|
|
|
2259
2293
|
});
|
|
2260
2294
|
});
|
|
2261
2295
|
};
|
|
2262
|
-
TransactionService.prototype.
|
|
2296
|
+
TransactionService.prototype.addArticleToTransaction = function (transactionUuid, articleNo, amount, warehouseNo, commissionCode, isReturn, aboveLineNr, belowLineNr) {
|
|
2297
|
+
if (amount === void 0) { amount = 1; }
|
|
2298
|
+
if (warehouseNo === void 0) { warehouseNo = 1; }
|
|
2299
|
+
if (commissionCode === void 0) { commissionCode = "2"; }
|
|
2300
|
+
if (isReturn === void 0) { isReturn = false; }
|
|
2301
|
+
if (aboveLineNr === void 0) { aboveLineNr = 0; }
|
|
2302
|
+
if (belowLineNr === void 0) { belowLineNr = 0; }
|
|
2303
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2304
|
+
var _this = this;
|
|
2305
|
+
return __generator(this, function (_a) {
|
|
2306
|
+
return [2 /*return*/, new Promise(function (resolve, reject) {
|
|
2307
|
+
_this._connector.addTransactionLine(transactionUuid, transactionLineType_enum.TransactionLineType.ArticleLine, articleNo, amount, warehouseNo, commissionCode, isReturn, aboveLineNr, belowLineNr)
|
|
2308
|
+
.then(function (response) { return __awaiter(_this, void 0, void 0, function () {
|
|
2309
|
+
return __generator(this, function (_a) {
|
|
2310
|
+
resolve(response);
|
|
2311
|
+
return [2 /*return*/];
|
|
2312
|
+
});
|
|
2313
|
+
}); }, function (error) {
|
|
2314
|
+
_this._prompt.showError(error);
|
|
2315
|
+
reject(error);
|
|
2316
|
+
})
|
|
2317
|
+
.catch(function (reason) {
|
|
2318
|
+
_this._prompt.showError(reason.getFullErrorString());
|
|
2319
|
+
resolve(null);
|
|
2320
|
+
});
|
|
2321
|
+
})];
|
|
2322
|
+
});
|
|
2323
|
+
});
|
|
2324
|
+
};
|
|
2325
|
+
TransactionService.prototype.addTransactionLine = function (lineType, articleNo, amount, warehouseNo, commissionCode, isReturn, aboveLineNr, belowLineNr, remember) {
|
|
2326
|
+
if (remember === void 0) { remember = true; }
|
|
2263
2327
|
return __awaiter(this, void 0, void 0, function () {
|
|
2264
2328
|
var _this = this;
|
|
2265
2329
|
return __generator(this, function (_a) {
|
|
@@ -2267,8 +2331,7 @@
|
|
|
2267
2331
|
_this._connector.addTransactionLine(_this.currentTransaction.uuid, lineType, articleNo, amount, warehouseNo, commissionCode, isReturn, aboveLineNr, belowLineNr)
|
|
2268
2332
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () {
|
|
2269
2333
|
return __generator(this, function (_a) {
|
|
2270
|
-
this.
|
|
2271
|
-
this._rememberCurrentTransactionLineStatus(response);
|
|
2334
|
+
this._rememberResponse(remember, response);
|
|
2272
2335
|
resolve(response);
|
|
2273
2336
|
return [2 /*return*/];
|
|
2274
2337
|
});
|
|
@@ -2282,7 +2345,8 @@
|
|
|
2282
2345
|
});
|
|
2283
2346
|
});
|
|
2284
2347
|
};
|
|
2285
|
-
TransactionService.prototype.addTextLineToTransaction = function (showOnDocuments, text, amount, articleBound, refArticleLineNr, aboveLineNr, belowLineNr) {
|
|
2348
|
+
TransactionService.prototype.addTextLineToTransaction = function (showOnDocuments, text, amount, articleBound, refArticleLineNr, aboveLineNr, belowLineNr, remember) {
|
|
2349
|
+
if (remember === void 0) { remember = true; }
|
|
2286
2350
|
return __awaiter(this, void 0, void 0, function () {
|
|
2287
2351
|
var _this = this;
|
|
2288
2352
|
return __generator(this, function (_a) {
|
|
@@ -2290,8 +2354,7 @@
|
|
|
2290
2354
|
_this._connector.addTextLineToTransaction(_this.currentTransaction.uuid, showOnDocuments, text, amount, articleBound, refArticleLineNr, aboveLineNr, belowLineNr)
|
|
2291
2355
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () {
|
|
2292
2356
|
return __generator(this, function (_a) {
|
|
2293
|
-
this.
|
|
2294
|
-
this._rememberCurrentTransactionLineStatus(response);
|
|
2357
|
+
this._rememberResponse(remember, response);
|
|
2295
2358
|
resolve(response);
|
|
2296
2359
|
return [2 /*return*/];
|
|
2297
2360
|
});
|
|
@@ -2305,14 +2368,14 @@
|
|
|
2305
2368
|
});
|
|
2306
2369
|
});
|
|
2307
2370
|
};
|
|
2308
|
-
TransactionService.prototype.changeLineSequence = function (lineUuid, aboveLineNr, belowLineNr) {
|
|
2371
|
+
TransactionService.prototype.changeLineSequence = function (lineUuid, aboveLineNr, belowLineNr, remember) {
|
|
2309
2372
|
var _this = this;
|
|
2373
|
+
if (remember === void 0) { remember = true; }
|
|
2310
2374
|
return new Promise(function (resolve, reject) {
|
|
2311
2375
|
_this._connector.changeLineSequence(_this.currentTransaction.uuid, lineUuid, aboveLineNr, belowLineNr)
|
|
2312
2376
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () {
|
|
2313
2377
|
return __generator(this, function (_a) {
|
|
2314
|
-
this.
|
|
2315
|
-
this._rememberCurrentTransactionLineStatus(response);
|
|
2378
|
+
this._rememberResponse(remember, response);
|
|
2316
2379
|
resolve(response);
|
|
2317
2380
|
return [2 /*return*/];
|
|
2318
2381
|
});
|
|
@@ -2324,7 +2387,8 @@
|
|
|
2324
2387
|
});
|
|
2325
2388
|
});
|
|
2326
2389
|
};
|
|
2327
|
-
TransactionService.prototype.cancelAddTransactionLine = function (lineUuid) {
|
|
2390
|
+
TransactionService.prototype.cancelAddTransactionLine = function (lineUuid, remember) {
|
|
2391
|
+
if (remember === void 0) { remember = true; }
|
|
2328
2392
|
return __awaiter(this, void 0, void 0, function () {
|
|
2329
2393
|
var _this = this;
|
|
2330
2394
|
return __generator(this, function (_a) {
|
|
@@ -2332,7 +2396,9 @@
|
|
|
2332
2396
|
_this._connector.cancelAddTransactionLine(lineUuid)
|
|
2333
2397
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () {
|
|
2334
2398
|
return __generator(this, function (_a) {
|
|
2335
|
-
|
|
2399
|
+
if (remember) {
|
|
2400
|
+
this._rememberCurrentTransaction(response);
|
|
2401
|
+
}
|
|
2336
2402
|
if (response.isSuccess) {
|
|
2337
2403
|
resolve(response);
|
|
2338
2404
|
}
|
|
@@ -2349,7 +2415,8 @@
|
|
|
2349
2415
|
});
|
|
2350
2416
|
});
|
|
2351
2417
|
};
|
|
2352
|
-
TransactionService.prototype.deleteTransactionLine = function (transactionUuid, TransactionLineUuid) {
|
|
2418
|
+
TransactionService.prototype.deleteTransactionLine = function (transactionUuid, TransactionLineUuid, remember) {
|
|
2419
|
+
if (remember === void 0) { remember = true; }
|
|
2353
2420
|
return __awaiter(this, void 0, void 0, function () {
|
|
2354
2421
|
var _this = this;
|
|
2355
2422
|
return __generator(this, function (_a) {
|
|
@@ -2357,8 +2424,7 @@
|
|
|
2357
2424
|
_this._connector.deleteTransactionLine(transactionUuid, TransactionLineUuid)
|
|
2358
2425
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () {
|
|
2359
2426
|
return __generator(this, function (_a) {
|
|
2360
|
-
this.
|
|
2361
|
-
this._rememberCurrentTransactionLineStatus(response);
|
|
2427
|
+
this._rememberResponse(remember, response);
|
|
2362
2428
|
if (response.isSuccess) {
|
|
2363
2429
|
resolve(response);
|
|
2364
2430
|
}
|
|
@@ -2375,7 +2441,8 @@
|
|
|
2375
2441
|
});
|
|
2376
2442
|
});
|
|
2377
2443
|
};
|
|
2378
|
-
TransactionService.prototype.changeTransactionLineQuantity = function (lineUuid, newQuantity) {
|
|
2444
|
+
TransactionService.prototype.changeTransactionLineQuantity = function (lineUuid, newQuantity, remember) {
|
|
2445
|
+
if (remember === void 0) { remember = true; }
|
|
2379
2446
|
return __awaiter(this, void 0, void 0, function () {
|
|
2380
2447
|
var _this = this;
|
|
2381
2448
|
return __generator(this, function (_a) {
|
|
@@ -2384,8 +2451,7 @@
|
|
|
2384
2451
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () {
|
|
2385
2452
|
return __generator(this, function (_a) {
|
|
2386
2453
|
if (response.isSuccess) {
|
|
2387
|
-
this.
|
|
2388
|
-
this._rememberCurrentTransactionLineStatus(response);
|
|
2454
|
+
this._rememberResponse(remember, response);
|
|
2389
2455
|
}
|
|
2390
2456
|
resolve(response);
|
|
2391
2457
|
return [2 /*return*/];
|
|
@@ -2499,13 +2565,20 @@
|
|
|
2499
2565
|
transactionDeliveryOptionsRequest.invoiceAddress = this._currentTransaction.invoiceAddress.nawNr;
|
|
2500
2566
|
return transactionDeliveryOptionsRequest;
|
|
2501
2567
|
};
|
|
2568
|
+
TransactionService.prototype._rememberResponse = function (remember, response) {
|
|
2569
|
+
if (remember) {
|
|
2570
|
+
this._rememberCurrentTransaction(response);
|
|
2571
|
+
this._rememberCurrentTransactionLineStatus(response);
|
|
2572
|
+
}
|
|
2573
|
+
};
|
|
2502
2574
|
return TransactionService;
|
|
2503
2575
|
}());
|
|
2504
2576
|
TransactionService.decorators = [
|
|
2505
2577
|
{ type: i0.Injectable }
|
|
2506
2578
|
];
|
|
2507
2579
|
TransactionService.ctorParameters = function () { return [
|
|
2508
|
-
{ type: IOneConnectorAdapterService }
|
|
2580
|
+
{ type: IOneConnectorAdapterService },
|
|
2581
|
+
{ type: corecomponents_v12.PromptService }
|
|
2509
2582
|
]; };
|
|
2510
2583
|
|
|
2511
2584
|
var LanguageCode;
|
|
@@ -2609,6 +2682,7 @@
|
|
|
2609
2682
|
"ARTICLE_DESCRIPTION": "Artikelomschrijving",
|
|
2610
2683
|
"ARTICLE_IN_OUT_COLLECTION": "Status van artikel is '|~'. Weet u zeker dat u door wilt gaan?",
|
|
2611
2684
|
"ARTICLE_NR": "Artikelnummer",
|
|
2685
|
+
"ARTICLE_UNKNOWN": "Onbekend artikel",
|
|
2612
2686
|
"ASSEMBLY_COSTS": "Montagekosten",
|
|
2613
2687
|
"ASSEMBLY_DATE": "Montagedatum",
|
|
2614
2688
|
"AMOUNT": "Aantal",
|
|
@@ -2748,6 +2822,7 @@
|
|
|
2748
2822
|
"VAT": "Btw",
|
|
2749
2823
|
"VAT_AMOUNT": "BTW-bedrag",
|
|
2750
2824
|
"VALUE": "Waarde",
|
|
2825
|
+
"WHERE_ARE_YOU_LOOKING_FOR": "Waar ben je naar op zoek?",
|
|
2751
2826
|
"WAREHOUSE": "Magazijn",
|
|
2752
2827
|
"YOUR_DATA": "Uw gegevens",
|
|
2753
2828
|
},
|
|
@@ -2770,6 +2845,7 @@
|
|
|
2770
2845
|
"ARTICLE_DESCRIPTION": "Article description",
|
|
2771
2846
|
"ARTICLE_IN_OUT_COLLECTION": "Status of article is '|~'. Are you sure to proceed?",
|
|
2772
2847
|
"ARTICLE_NR": "Article number",
|
|
2848
|
+
"ARTICLE_UNKNOWN": "Article unknown",
|
|
2773
2849
|
"ASSEMBLY_COSTS": "Assembly costs",
|
|
2774
2850
|
"ASSEMBLY_DATE": "Assembly date",
|
|
2775
2851
|
"AMOUNT": "Amount",
|
|
@@ -2902,6 +2978,7 @@
|
|
|
2902
2978
|
"VAT": "VAT",
|
|
2903
2979
|
"VAT_AMOUNT": "VAT amount",
|
|
2904
2980
|
"WAREHOUSE": "Warehouse",
|
|
2981
|
+
"WHERE_ARE_YOU_LOOKING_FOR": "Where are you looking for?",
|
|
2905
2982
|
"YOUR_DATA": "Your data",
|
|
2906
2983
|
},
|
|
2907
2984
|
};
|
|
@@ -6068,6 +6145,7 @@
|
|
|
6068
6145
|
}());
|
|
6069
6146
|
CharacteristicAnswerComponent.decorators = [
|
|
6070
6147
|
{ type: i0.Component, args: [{
|
|
6148
|
+
// eslint-disable-next-line @angular-eslint/component-selector
|
|
6071
6149
|
selector: "characteristic-answer",
|
|
6072
6150
|
template: "\n <co-dialog\n #characteristic\n [showCloseIcon]=\"false\"\n >\n <ng-container header>\n <div>\n <span class=\"characteristic-title\"\n [textContent]=\"getTranslationWithColon('ARTICLE')\"\n ></span>\n <span [textContent]=\"title\"></span>\n </div>\n </ng-container>\n\n <ng-container>\n <div>\n <div class=\"characteristic-header\">\n <span class=\"characteristic-title\"\n [textContent]=\"getTranslationWithColon('CHARACTERISTIC_QUESTION')\"\n ></span>\n </div>\n <div class=\"characteristic-header\">\n <span [textContent]=\"question | localize\"></span>\n </div>\n <div *ngIf=\"characteristicOptions\" class=\"npm characteristic-options\">\n <co-input-combo-box [(model)]=\"value\"\n [source]=\"characteristics\"\n [fields]=\"characteristicsFields\"\n [placeholder]=\"'VALUE' | localize\"\n [required]=\"true\"\n ></co-input-combo-box>\n </div>\n <div *ngIf=\"!characteristicOptions\" class=\"characteristic-value\">\n <co-input-text\n [(model)]=\"value\"\n [placeholder]=\"'VALUE' | localize \"\n required\n ></co-input-text>\n </div>\n </div>\n </ng-container>\n\n <ng-container footer>\n <div class=\"flex-center\">\n <co-button [label]=\"'OK' | localize\" (click)=\"onCharacteristicOkClick()\"></co-button>\n </div>\n </ng-container>\n </co-dialog>\n ",
|
|
6073
6151
|
styles: ["html,body{height:100%}body{margin:0;font-family:Roboto,\"Helvetica Neue\",sans-serif}.flex-center{display:flex}.flex-center{flex-direction:row}.flex-center{align-items:center!important;justify-content:center!important}.triangle{border-radius:3px}.full-width{width:100%}.flex-center{margin:10px 0}.characteristic-title{font-weight:bold;font-size:20px;margin-right:10px}.characteristic-value{font-weight:bold;font-size:20px}.characteristic-header{display:flex;justify-content:center}\n"]
|
|
@@ -6128,7 +6206,7 @@
|
|
|
6128
6206
|
entryComponents: [
|
|
6129
6207
|
IoneShoppingCartComponent
|
|
6130
6208
|
],
|
|
6131
|
-
exports: [IoneShoppingCartComponent, StockStatusIndicatorComponent],
|
|
6209
|
+
exports: [IoneShoppingCartComponent, StockStatusIndicatorComponent, CharacteristicAnswerComponent],
|
|
6132
6210
|
bootstrap: [IoneShoppingCartComponent]
|
|
6133
6211
|
},] }
|
|
6134
6212
|
];
|
|
@@ -6260,6 +6338,8 @@
|
|
|
6260
6338
|
this.customer = nulRelationObject.NULL_CUSTOMER_FULL_OBJECT;
|
|
6261
6339
|
this._isService = false;
|
|
6262
6340
|
this.basedOnProduct = false;
|
|
6341
|
+
this._lineOperationStatuses = [];
|
|
6342
|
+
this._transactionLines = [];
|
|
6263
6343
|
}
|
|
6264
6344
|
Object.defineProperty(TransactionBaseComponent.prototype, "transaction", {
|
|
6265
6345
|
get: function () {
|
|
@@ -6267,8 +6347,20 @@
|
|
|
6267
6347
|
},
|
|
6268
6348
|
set: function (value) {
|
|
6269
6349
|
this._transaction = value;
|
|
6270
|
-
if (this._transaction
|
|
6271
|
-
|
|
6350
|
+
if (this._transaction) {
|
|
6351
|
+
if (this._transaction.transactionInfo) {
|
|
6352
|
+
this._transactionInfo = this._transaction.transactionInfo;
|
|
6353
|
+
this._isService = this._transaction.transactionInfo.transactionKind === transactionKind_enum.TransactionKind.ServiceOrder;
|
|
6354
|
+
}
|
|
6355
|
+
if (this._transaction.transactionLines) {
|
|
6356
|
+
this.transactionLines = this._transaction.transactionLines;
|
|
6357
|
+
}
|
|
6358
|
+
if (this._transaction.transactionTotal) {
|
|
6359
|
+
this._transactionTotal = this._transaction.transactionTotal;
|
|
6360
|
+
}
|
|
6361
|
+
if (this._transaction.lineOperationStatuses) {
|
|
6362
|
+
this.lineOperationStatuses = this._transaction.lineOperationStatuses;
|
|
6363
|
+
}
|
|
6272
6364
|
}
|
|
6273
6365
|
},
|
|
6274
6366
|
enumerable: false,
|
|
@@ -6276,27 +6368,40 @@
|
|
|
6276
6368
|
});
|
|
6277
6369
|
Object.defineProperty(TransactionBaseComponent.prototype, "transactionInfo", {
|
|
6278
6370
|
get: function () {
|
|
6279
|
-
|
|
6280
|
-
|
|
6281
|
-
|
|
6371
|
+
return this._transactionInfo;
|
|
6372
|
+
},
|
|
6373
|
+
set: function (value) {
|
|
6374
|
+
this._transactionInfo = value;
|
|
6282
6375
|
},
|
|
6283
6376
|
enumerable: false,
|
|
6284
6377
|
configurable: true
|
|
6285
6378
|
});
|
|
6286
6379
|
Object.defineProperty(TransactionBaseComponent.prototype, "transactionLines", {
|
|
6287
6380
|
get: function () {
|
|
6288
|
-
|
|
6289
|
-
|
|
6290
|
-
|
|
6381
|
+
return this._transactionLines;
|
|
6382
|
+
},
|
|
6383
|
+
set: function (value) {
|
|
6384
|
+
this._transactionLines = value;
|
|
6291
6385
|
},
|
|
6292
6386
|
enumerable: false,
|
|
6293
6387
|
configurable: true
|
|
6294
6388
|
});
|
|
6295
6389
|
Object.defineProperty(TransactionBaseComponent.prototype, "transactionTotal", {
|
|
6296
6390
|
get: function () {
|
|
6297
|
-
|
|
6298
|
-
|
|
6299
|
-
|
|
6391
|
+
return this._transactionTotal;
|
|
6392
|
+
},
|
|
6393
|
+
set: function (value) {
|
|
6394
|
+
this._transactionTotal = value;
|
|
6395
|
+
},
|
|
6396
|
+
enumerable: false,
|
|
6397
|
+
configurable: true
|
|
6398
|
+
});
|
|
6399
|
+
Object.defineProperty(TransactionBaseComponent.prototype, "lineOperationStatuses", {
|
|
6400
|
+
get: function () {
|
|
6401
|
+
return this._lineOperationStatuses;
|
|
6402
|
+
},
|
|
6403
|
+
set: function (value) {
|
|
6404
|
+
this._lineOperationStatuses = value;
|
|
6300
6405
|
},
|
|
6301
6406
|
enumerable: false,
|
|
6302
6407
|
configurable: true
|
|
@@ -6425,6 +6530,13 @@
|
|
|
6425
6530
|
customer: [{ type: i0.Input }]
|
|
6426
6531
|
};
|
|
6427
6532
|
|
|
6533
|
+
// import {
|
|
6534
|
+
// ToolbarService,
|
|
6535
|
+
// LinkService,
|
|
6536
|
+
// ImageService,
|
|
6537
|
+
// HtmlEditorService,
|
|
6538
|
+
// RichTextEditor
|
|
6539
|
+
// } from '@syncfusion/ej2-angular-richtexteditor';
|
|
6428
6540
|
var TransactionArticleTextComponent = /** @class */ (function (_super) {
|
|
6429
6541
|
__extends(TransactionArticleTextComponent, _super);
|
|
6430
6542
|
function TransactionArticleTextComponent(service) {
|
|
@@ -6487,7 +6599,7 @@
|
|
|
6487
6599
|
{ type: i0.Component, args: [{
|
|
6488
6600
|
// eslint-disable-next-line @angular-eslint/component-selector
|
|
6489
6601
|
selector: "transaction-article-text",
|
|
6490
|
-
template: "\n <co-dialog [visible]=\"visible\" (close)=\"onPopupClose()\">\n <ng-container header>{{ subHeader }}</ng-container>\n <ng-container content>\n <div class=\"tags-join-content\" fxLayout fxLayoutGap=\"10px\">\n <div class=\"column-separator\">\n
|
|
6602
|
+
template: "\n <co-dialog [visible]=\"visible\" (close)=\"onPopupClose()\">\n <ng-container header>{{ subHeader }}</ng-container>\n <ng-container content>\n <div class=\"tags-join-content\" fxLayout fxLayoutGap=\"10px\">\n <div class=\"column-separator\">\n <co-input-text placeholder=\"Titel\"></co-input-text>\n<!-- <ejs-richtexteditor-->\n<!-- #rte-->\n<!-- id=\"Rte\"-->\n<!-- >-->\n<!-- </ejs-richtexteditor>-->\n </div>\n <div style=\"margin-left:5px;\">\n <div style=\"margin-top:16px;\">\n <ejs-dropdownlist\n [dataSource]=\"collection\"\n [fields]=\"fields\"\n placeholder=\"Standaardteksten\"\n ></ejs-dropdownlist>\n\n </div>\n <div style=\"margin-top:20px;\">\n <co-input-checkbox\n label=\"Artikelgebonden tekst\"\n name=\"articleBoundText\">\n </co-input-checkbox>\n </div>\n <div style=\"margin-top:20px;\">\n <label>Bestemd voor documenten</label>\n <ejs-chiplist id=\"chip-default\">\n <e-chips>\n <e-chip text=\"Apple\" cssClass=\"e-primary\"></e-chip>\n <e-chip text=\"Microsoft\" cssClass=\"e-info\"></e-chip>\n <e-chip text=\"Google\" cssClass=\"e-success\"></e-chip>\n <e-chip text=\"Tesla\" cssClass=\"e-warning\"></e-chip>\n <e-chip text=\"Intel\" cssClass=\"e-danger\"></e-chip>\n </e-chips>\n </ejs-chiplist>\n </div>\n </div>\n </div>\n </ng-container>\n <ng-container footer>\n <div class=\"footer\" fxLayout fxLayoutAlign=\"center center\" fxLayoutGap=\"10px\" style=\"margin-top:30px;\">\n <co-button label=\"OK\" (click)=\"onOkClick()\"></co-button>\n <co-button label=\"CANCEL\" (click)=\"hide()\"></co-button>\n <co-button label=\"OVERVIEW\" (click)=\"onOverview()\"></co-button>\n<!-- <co-button label=\"TEST\" (click)=\"onTest()\"></co-button>-->\n </div>\n </ng-container>\n </co-dialog>\n\n <co-dialog [visible]=\"overviewSelected\" (close)=\"hideOverview()\">\n <ng-container header>Artikelgebonden teksten {{ subHeader }}</ng-container>\n <ng-container content>\n <div class=\"tags-join-content\" fxLayout fxLayoutGap=\"10px\">\n <div class=\"column-separator\" style=\"width:75%\">\n<!-- <grid [data]=\"articleTexts\" detailLink (detailLinkClick)=\"onDetailLinkClick($event)\">-->\n<!-- <grid-column key=\"title\" header=\"TITLE\" width=\"100px;\"></grid-column>-->\n<!-- <grid-column key=\"description\" header=\"DESCRIPTION\" width=\"200px\"></grid-column>-->\n<!-- </grid>-->\n </div>\n <div style=\"margin-left:5px;\">\n <div style=\"margin-top:20px;\">\n\n <co-input-checkbox\n label=\"Artikelgebonden tekst\"\n name=\"articleBoundText\"\n value=\"true\"\n ></co-input-checkbox>\n </div>\n <div style=\"margin-top:20px;\">\n <label>Bestemd voor documenten</label>\n <ejs-chiplist id=\"chip-default\">\n <e-chips>\n <e-chip text=\"Apple\" cssClass=\"e-primary\"></e-chip>\n <e-chip text=\"Microsoft\" cssClass=\"e-info\"></e-chip>\n <e-chip text=\"Google\" cssClass=\"e-success\"></e-chip>\n <e-chip text=\"Tesla\" cssClass=\"e-warning\"></e-chip>\n <e-chip text=\"Intel\" cssClass=\"e-danger\"></e-chip>\n </e-chips>\n </ejs-chiplist>\n </div>\n </div>\n </div>\n </ng-container>\n <ng-container footer>\n <div class=\"footer\" fxLayout fxPosition=\"row\" fxLayoutAlign=\"center center\" fxLayoutGap=\"10px\" style=\"margin-top:30px;\">\n <co-button label=\"OK\" (click)=\"onOkOverviewClick()\"></co-button>\n <co-button label=\"CANCEL\" (click)=\"hideOverview()\"></co-button>\n </div>\n </ng-container>\n </co-dialog>\n\n <co-dialog [visible]=\"editArtikelText\" (close)=\"hideEditArtikelText()\">\n <ng-container header>{{ subHeader }}</ng-container>\n <ng-container content>\n <div class=\"tags-join-content\" fxLayout fxLayoutGap=\"10px\">\n <div class=\"column-separator\">\n <co-input-text placeholder=\"Titel\"></co-input-text>\n<!-- <co-text-editor-->\n<!-- label=\"Artikeltekst\"-->\n<!-- ></co-text-editor>-->\n </div>\n </div>\n </ng-container>\n <ng-container footer>\n <div class=\"footer\" fxLayout fxLayoutAlign=\"center center\" fxLayoutGap=\"10px\" style=\"margin-top:30px;\">\n <co-button label=\"OK\" (click)=\"onOkEditArtikelTextClick()\"></co-button>\n <co-button label=\"CANCEL\" (click)=\"hideEditArtikelText()\"></co-button>\n </div>\n </ng-container>\n </co-dialog>\n ",
|
|
6491
6603
|
styles: [""]
|
|
6492
6604
|
},] }
|
|
6493
6605
|
];
|
|
@@ -6498,91 +6610,563 @@
|
|
|
6498
6610
|
subHeader: [{ type: i0.Input }]
|
|
6499
6611
|
};
|
|
6500
6612
|
|
|
6501
|
-
var
|
|
6502
|
-
__extends(
|
|
6503
|
-
function
|
|
6613
|
+
var TransactionManagerComponent = /** @class */ (function (_super) {
|
|
6614
|
+
__extends(TransactionManagerComponent, _super);
|
|
6615
|
+
function TransactionManagerComponent(service, transactionEvents, promptService, _dictionaryService) {
|
|
6504
6616
|
var _this = _super.call(this, service) || this;
|
|
6505
6617
|
_this.service = service;
|
|
6506
6618
|
_this.transactionEvents = transactionEvents;
|
|
6507
|
-
_this.
|
|
6508
|
-
_this.
|
|
6509
|
-
_this.
|
|
6510
|
-
_this.
|
|
6511
|
-
_this.
|
|
6512
|
-
_this.
|
|
6513
|
-
_this.
|
|
6514
|
-
_this.contextMenuItems = [];
|
|
6515
|
-
_this.isRouteOptimizationConfigured = false;
|
|
6516
|
-
_this.activeViewMode = ContentViewMode.List;
|
|
6517
|
-
_this.floatButtonSelected = false;
|
|
6619
|
+
_this.promptService = promptService;
|
|
6620
|
+
_this._dictionaryService = _dictionaryService;
|
|
6621
|
+
_this.linesChanged = new i0.EventEmitter();
|
|
6622
|
+
_this.articleAdded = new i0.EventEmitter();
|
|
6623
|
+
_this.columns = [];
|
|
6624
|
+
_this._inOutCollection = [];
|
|
6625
|
+
_this._showCharacteristic = false;
|
|
6518
6626
|
_this._subs = [];
|
|
6627
|
+
_this._subs.push(_this.service.transactionLoaded.subscribe(function (transactionInfoResponse) {
|
|
6628
|
+
if (transactionInfoResponse.isSuccess) {
|
|
6629
|
+
_this.transaction = transactionInfoResponse;
|
|
6630
|
+
}
|
|
6631
|
+
}));
|
|
6519
6632
|
return _this;
|
|
6520
6633
|
}
|
|
6521
|
-
Object.defineProperty(
|
|
6634
|
+
Object.defineProperty(TransactionManagerComponent.prototype, "amountOfLines", {
|
|
6522
6635
|
get: function () {
|
|
6523
|
-
return this.
|
|
6636
|
+
return numberUtils.NumberUtils.NrOrDefault(this.service.articleAmount, 0);
|
|
6524
6637
|
},
|
|
6525
6638
|
enumerable: false,
|
|
6526
6639
|
configurable: true
|
|
6527
6640
|
});
|
|
6528
|
-
Object.defineProperty(
|
|
6641
|
+
Object.defineProperty(TransactionManagerComponent.prototype, "showCharacteristicDialog", {
|
|
6529
6642
|
get: function () {
|
|
6530
|
-
return this.
|
|
6643
|
+
return this._showCharacteristic;
|
|
6644
|
+
},
|
|
6645
|
+
set: function (value) {
|
|
6646
|
+
this._showCharacteristic = value;
|
|
6531
6647
|
},
|
|
6532
6648
|
enumerable: false,
|
|
6533
6649
|
configurable: true
|
|
6534
6650
|
});
|
|
6535
|
-
|
|
6651
|
+
TransactionManagerComponent.prototype.ngOnDestroy = function () {
|
|
6652
|
+
this._subs.forEach(function (sub) { return sub.unsubscribe(); });
|
|
6653
|
+
};
|
|
6654
|
+
TransactionManagerComponent.prototype.addArticleLine = function (transactionUuid, sku, amount, lineNr, beforeOrAfter) {
|
|
6655
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
6656
|
+
var goodId;
|
|
6657
|
+
return __generator(this, function (_a) {
|
|
6658
|
+
switch (_a.label) {
|
|
6659
|
+
case 0: return [4 /*yield*/, this.service.getGoodIdFromArticleNr(sku)];
|
|
6660
|
+
case 1:
|
|
6661
|
+
goodId = _a.sent();
|
|
6662
|
+
if (!goodId) return [3 /*break*/, 4];
|
|
6663
|
+
return [4 /*yield*/, this._loadArticle(goodId)];
|
|
6664
|
+
case 2:
|
|
6665
|
+
_a.sent();
|
|
6666
|
+
return [4 /*yield*/, this._handleAddArticleLineAt(amount, lineNr, beforeOrAfter)];
|
|
6667
|
+
case 3:
|
|
6668
|
+
_a.sent();
|
|
6669
|
+
return [3 /*break*/, 5];
|
|
6670
|
+
case 4:
|
|
6671
|
+
this.promptService.showError(this._dictionaryService.get("ARTICLE_UNKNOWN"));
|
|
6672
|
+
_a.label = 5;
|
|
6673
|
+
case 5: return [2 /*return*/];
|
|
6674
|
+
}
|
|
6675
|
+
});
|
|
6676
|
+
});
|
|
6677
|
+
};
|
|
6678
|
+
TransactionManagerComponent.prototype.changeLineSequence = function (fromIndex, toIndex) {
|
|
6536
6679
|
return __awaiter(this, void 0, void 0, function () {
|
|
6680
|
+
var fromLine, toLine, aboveLineNr, belowLineNr;
|
|
6537
6681
|
var _this = this;
|
|
6538
6682
|
return __generator(this, function (_a) {
|
|
6539
|
-
|
|
6540
|
-
|
|
6541
|
-
|
|
6542
|
-
|
|
6543
|
-
|
|
6544
|
-
|
|
6683
|
+
switch (_a.label) {
|
|
6684
|
+
case 0:
|
|
6685
|
+
fromLine = this._getTransactionLineInfoByIndex(fromIndex);
|
|
6686
|
+
toLine = this._getTransactionLineInfoByIndex(toIndex);
|
|
6687
|
+
if (fromIndex > toIndex) {
|
|
6688
|
+
aboveLineNr = toLine.lineNr;
|
|
6545
6689
|
}
|
|
6546
|
-
|
|
6547
|
-
|
|
6548
|
-
|
|
6549
|
-
|
|
6550
|
-
|
|
6551
|
-
|
|
6552
|
-
|
|
6553
|
-
|
|
6554
|
-
|
|
6690
|
+
else {
|
|
6691
|
+
belowLineNr = toLine.lineNr;
|
|
6692
|
+
}
|
|
6693
|
+
return [4 /*yield*/, this.service.changeLineSequence(fromLine.uuid, aboveLineNr, belowLineNr, false)
|
|
6694
|
+
.then(function (value) {
|
|
6695
|
+
_this.handleLineOperationStatus(value);
|
|
6696
|
+
}, function (error) { return _this.promptService.showError(error); })];
|
|
6697
|
+
case 1:
|
|
6698
|
+
_a.sent();
|
|
6699
|
+
return [2 /*return*/];
|
|
6700
|
+
}
|
|
6701
|
+
});
|
|
6702
|
+
});
|
|
6703
|
+
};
|
|
6704
|
+
TransactionManagerComponent.prototype.showStockManager = function (line) {
|
|
6705
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
6706
|
+
return __generator(this, function (_a) {
|
|
6707
|
+
this.warehouse.selectedWarehouseNr = line.warehouseNumber;
|
|
6708
|
+
this.warehouse.amount = line.amount;
|
|
6709
|
+
this.warehouse.commissionCode = line.commissionCode;
|
|
6710
|
+
this.warehouse.message = this.currentOperationStatus.pendingReason;
|
|
6711
|
+
this.warehouse.show(line.articleNumber);
|
|
6555
6712
|
return [2 /*return*/];
|
|
6556
6713
|
});
|
|
6557
6714
|
});
|
|
6558
6715
|
};
|
|
6559
|
-
|
|
6560
|
-
|
|
6716
|
+
TransactionManagerComponent.prototype.warehouseOkClick = function () {
|
|
6717
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
6718
|
+
var _this = this;
|
|
6719
|
+
return __generator(this, function (_a) {
|
|
6720
|
+
switch (_a.label) {
|
|
6721
|
+
case 0:
|
|
6722
|
+
if (this.warehouse.commissionCode !== undefined) {
|
|
6723
|
+
this.currentReason.commissionCode = this.warehouse.commissionCode;
|
|
6724
|
+
}
|
|
6725
|
+
if (this.warehouse.amount !== undefined) {
|
|
6726
|
+
this.currentReason.quantity = this.warehouse.amount;
|
|
6727
|
+
}
|
|
6728
|
+
if (this.warehouse.selectedWarehouseNr !== undefined) {
|
|
6729
|
+
this.currentReason.warehouseNr = this.warehouse.selectedWarehouseNr;
|
|
6730
|
+
}
|
|
6731
|
+
if (!this.currentReason) return [3 /*break*/, 2];
|
|
6732
|
+
return [4 /*yield*/, this.service.resolvePendingLineReason(this.currentReason, false)
|
|
6733
|
+
.then(function (value) {
|
|
6734
|
+
_this.handleLineOperationStatus(value);
|
|
6735
|
+
})];
|
|
6736
|
+
case 1:
|
|
6737
|
+
_a.sent();
|
|
6738
|
+
_a.label = 2;
|
|
6739
|
+
case 2: return [2 /*return*/];
|
|
6740
|
+
}
|
|
6741
|
+
});
|
|
6742
|
+
});
|
|
6561
6743
|
};
|
|
6562
|
-
|
|
6563
|
-
return
|
|
6564
|
-
|
|
6565
|
-
|
|
6566
|
-
|
|
6567
|
-
|
|
6568
|
-
|
|
6569
|
-
|
|
6744
|
+
TransactionManagerComponent.prototype.warehouseCancelClick = function () {
|
|
6745
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
6746
|
+
return __generator(this, function (_a) {
|
|
6747
|
+
switch (_a.label) {
|
|
6748
|
+
case 0:
|
|
6749
|
+
if (!this.currentReason) return [3 /*break*/, 2];
|
|
6750
|
+
return [4 /*yield*/, this._cancelArticle(this.currentReason.lineUuid)];
|
|
6751
|
+
case 1:
|
|
6752
|
+
_a.sent();
|
|
6753
|
+
_a.label = 2;
|
|
6754
|
+
case 2: return [2 /*return*/];
|
|
6755
|
+
}
|
|
6756
|
+
});
|
|
6757
|
+
});
|
|
6570
6758
|
};
|
|
6571
|
-
|
|
6572
|
-
return
|
|
6759
|
+
TransactionManagerComponent.prototype.handleCharacteristicAnswerOkClick = function (answer) {
|
|
6760
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
6761
|
+
var _this = this;
|
|
6762
|
+
return __generator(this, function (_a) {
|
|
6763
|
+
switch (_a.label) {
|
|
6764
|
+
case 0:
|
|
6765
|
+
this.currentReason = new resolvePendingReasonRequest_bo.ResolvePendingLineReasonRequest(this.currentOperationStatus.uuid, this.currentOperationStatus.pendingReason, this.currentOperationStatus.pendingReasonType);
|
|
6766
|
+
this.currentReason.textualUserInput = answer;
|
|
6767
|
+
return [4 /*yield*/, this.service.resolvePendingLineReason(this.currentReason, false)
|
|
6768
|
+
.then(function (value) {
|
|
6769
|
+
_this.handleLineOperationStatus(value);
|
|
6770
|
+
})];
|
|
6771
|
+
case 1:
|
|
6772
|
+
_a.sent();
|
|
6773
|
+
return [2 /*return*/];
|
|
6774
|
+
}
|
|
6775
|
+
});
|
|
6776
|
+
});
|
|
6573
6777
|
};
|
|
6574
|
-
|
|
6575
|
-
|
|
6778
|
+
TransactionManagerComponent.prototype._handleAddArticle = function (amount) {
|
|
6779
|
+
if (amount === void 0) { amount = 1; }
|
|
6780
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
6781
|
+
var _this = this;
|
|
6782
|
+
return __generator(this, function (_a) {
|
|
6783
|
+
switch (_a.label) {
|
|
6784
|
+
case 0: return [4 /*yield*/, this.service.addTransactionLine(transactionLineType_enum.TransactionLineType.ArticleLine, this.newArticleNr, amount, this.newArticle.standardWareHouse, this.newArticle.commissionCode, false, 0, 0, false)
|
|
6785
|
+
.then(function (value) {
|
|
6786
|
+
_this.handleLineOperationStatus(value);
|
|
6787
|
+
}, function (error) { return _this.promptService.showError(error); })];
|
|
6788
|
+
case 1:
|
|
6789
|
+
_a.sent();
|
|
6790
|
+
return [2 /*return*/];
|
|
6791
|
+
}
|
|
6792
|
+
});
|
|
6793
|
+
});
|
|
6576
6794
|
};
|
|
6577
|
-
|
|
6578
|
-
|
|
6795
|
+
TransactionManagerComponent.prototype._handleAddArticleLineAt = function (amount, lineNr, beforeOrAfter) {
|
|
6796
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
6797
|
+
var _this = this;
|
|
6798
|
+
return __generator(this, function (_a) {
|
|
6799
|
+
switch (_a.label) {
|
|
6800
|
+
case 0: return [4 /*yield*/, this.service.addArticleToTransaction(this.transactionInfo.uuid, this.newArticleNr, amount, this.newArticle.standardWareHouse, this.newArticle.commissionCode, false, beforeOrAfter === PositionGridRow.Before ? lineNr : undefined, beforeOrAfter === PositionGridRow.After ? lineNr : undefined)
|
|
6801
|
+
.then(function (value) {
|
|
6802
|
+
_this.lineOperationStatuses = value.lineOperationStatuses;
|
|
6803
|
+
_this.handleLineOperationStatus(value);
|
|
6804
|
+
}, function (error) { return _this.promptService.showError(error); })];
|
|
6805
|
+
case 1:
|
|
6806
|
+
_a.sent();
|
|
6807
|
+
return [2 /*return*/];
|
|
6808
|
+
}
|
|
6809
|
+
});
|
|
6810
|
+
});
|
|
6579
6811
|
};
|
|
6580
|
-
|
|
6581
|
-
if (this.
|
|
6582
|
-
this.
|
|
6812
|
+
TransactionManagerComponent.prototype._getWareHouseNoFromArticle = function () {
|
|
6813
|
+
if (this.newArticle !== undefined && this.newArticle.stockLocations !== undefined && this.newArticle.stockLocations.length) {
|
|
6814
|
+
return this.newArticle.stockLocations[0].warehouseNr;
|
|
6583
6815
|
}
|
|
6816
|
+
return 0;
|
|
6584
6817
|
};
|
|
6585
|
-
|
|
6818
|
+
TransactionManagerComponent.prototype.isLineOperationStatus = function (lineOperationStatuses) {
|
|
6819
|
+
this.currentOperationStatus = this.service.pendingLineOperationStatus(lineOperationStatuses);
|
|
6820
|
+
if (this.currentOperationStatus !== undefined) {
|
|
6821
|
+
return true;
|
|
6822
|
+
}
|
|
6823
|
+
return false;
|
|
6824
|
+
};
|
|
6825
|
+
TransactionManagerComponent.prototype._confirmAction = function () {
|
|
6826
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
6827
|
+
var pendingReasonText, _a;
|
|
6828
|
+
var _this = this;
|
|
6829
|
+
return __generator(this, function (_b) {
|
|
6830
|
+
switch (_b.label) {
|
|
6831
|
+
case 0:
|
|
6832
|
+
this.currentReason = new resolvePendingReasonRequest_bo.ResolvePendingLineReasonRequest(this.currentOperationStatus.uuid, this.currentOperationStatus.pendingReason, this.currentOperationStatus.pendingReasonType);
|
|
6833
|
+
return [4 /*yield*/, this._getPendingReasonText(this.currentOperationStatus.pendingReason)];
|
|
6834
|
+
case 1:
|
|
6835
|
+
pendingReasonText = _b.sent();
|
|
6836
|
+
_a = this.currentReason;
|
|
6837
|
+
return [4 /*yield*/, this.promptService.showYesNo(pendingReasonText, " ")];
|
|
6838
|
+
case 2:
|
|
6839
|
+
_a.confirmation = _b.sent();
|
|
6840
|
+
return [4 /*yield*/, this.service.resolvePendingLineReason(this.currentReason, false)
|
|
6841
|
+
.then(function (value) {
|
|
6842
|
+
_this.handleLineOperationStatus(value);
|
|
6843
|
+
})];
|
|
6844
|
+
case 3:
|
|
6845
|
+
_b.sent();
|
|
6846
|
+
return [2 /*return*/];
|
|
6847
|
+
}
|
|
6848
|
+
});
|
|
6849
|
+
});
|
|
6850
|
+
};
|
|
6851
|
+
TransactionManagerComponent.prototype._showInformation = function () {
|
|
6852
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
6853
|
+
var pendingReasonText;
|
|
6854
|
+
var _this = this;
|
|
6855
|
+
return __generator(this, function (_a) {
|
|
6856
|
+
switch (_a.label) {
|
|
6857
|
+
case 0:
|
|
6858
|
+
this.currentReason = new resolvePendingReasonRequest_bo.ResolvePendingLineReasonRequest(this.currentOperationStatus.uuid, this.currentOperationStatus.pendingReason, this.currentOperationStatus.pendingReasonType);
|
|
6859
|
+
return [4 /*yield*/, this._getPendingReasonText(this.currentOperationStatus.pendingReason)];
|
|
6860
|
+
case 1:
|
|
6861
|
+
pendingReasonText = _a.sent();
|
|
6862
|
+
return [4 /*yield*/, this.promptService.showOkModal(pendingReasonText, " ")];
|
|
6863
|
+
case 2:
|
|
6864
|
+
_a.sent();
|
|
6865
|
+
return [4 /*yield*/, this.service.resolvePendingLineReason(this.currentReason, false)
|
|
6866
|
+
.then(function (value) {
|
|
6867
|
+
_this.handleLineOperationStatus(value);
|
|
6868
|
+
})];
|
|
6869
|
+
case 3:
|
|
6870
|
+
_a.sent();
|
|
6871
|
+
return [2 /*return*/];
|
|
6872
|
+
}
|
|
6873
|
+
});
|
|
6874
|
+
});
|
|
6875
|
+
};
|
|
6876
|
+
TransactionManagerComponent.prototype._getPendingReasonText = function (pendingReason) {
|
|
6877
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
6878
|
+
var _a, _b, _c;
|
|
6879
|
+
return __generator(this, function (_d) {
|
|
6880
|
+
switch (_d.label) {
|
|
6881
|
+
case 0:
|
|
6882
|
+
if (!(pendingReason === "ARTICLE_IS_DISCONTINUED_DO_YOU_WANT_TO_CONTINUE_PLEASE_CONFIRM")) return [3 /*break*/, 2];
|
|
6883
|
+
_b = (_a = this._dictionaryService.get("ARTICLE_IN_OUT_COLLECTION")).replace;
|
|
6884
|
+
_c = ["|~"];
|
|
6885
|
+
return [4 /*yield*/, this.getInOutCollectionOfArticle()];
|
|
6886
|
+
case 1: return [2 /*return*/, _b.apply(_a, _c.concat([_d.sent()]))];
|
|
6887
|
+
case 2: return [2 /*return*/, this._dictionaryService.get(pendingReason)];
|
|
6888
|
+
}
|
|
6889
|
+
});
|
|
6890
|
+
});
|
|
6891
|
+
};
|
|
6892
|
+
TransactionManagerComponent.prototype.getInOutCollectionOfArticle = function () {
|
|
6893
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
6894
|
+
var _a, domainValue;
|
|
6895
|
+
var _this = this;
|
|
6896
|
+
return __generator(this, function (_b) {
|
|
6897
|
+
switch (_b.label) {
|
|
6898
|
+
case 0:
|
|
6899
|
+
if (!!this._inOutCollection.length) return [3 /*break*/, 2];
|
|
6900
|
+
_a = this;
|
|
6901
|
+
return [4 /*yield*/, this.service.getInOutCollection("NL")];
|
|
6902
|
+
case 1:
|
|
6903
|
+
_a._inOutCollection = _b.sent();
|
|
6904
|
+
_b.label = 2;
|
|
6905
|
+
case 2:
|
|
6906
|
+
domainValue = this._inOutCollection.find(function (element) { return element.code === _this.newArticle.inOutCollection; });
|
|
6907
|
+
if (domainValue) {
|
|
6908
|
+
return [2 /*return*/, domainValue.description];
|
|
6909
|
+
}
|
|
6910
|
+
return [2 /*return*/, ""];
|
|
6911
|
+
}
|
|
6912
|
+
});
|
|
6913
|
+
});
|
|
6914
|
+
};
|
|
6915
|
+
TransactionManagerComponent.prototype.handleLineOperationStatus = function (lineOperationResponse) {
|
|
6916
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
6917
|
+
return __generator(this, function (_a) {
|
|
6918
|
+
switch (_a.label) {
|
|
6919
|
+
case 0:
|
|
6920
|
+
if (!this.isLineOperationStatus(lineOperationResponse.lineOperationStatuses)) return [3 /*break*/, 2];
|
|
6921
|
+
this.transaction = lineOperationResponse;
|
|
6922
|
+
this.articleAdded.emit(this.transaction);
|
|
6923
|
+
return [4 /*yield*/, this._handlePendingLine(this.currentOperationStatus.uuid).then()];
|
|
6924
|
+
case 1:
|
|
6925
|
+
_a.sent();
|
|
6926
|
+
return [3 /*break*/, 4];
|
|
6927
|
+
case 2: return [4 /*yield*/, this._saveTransaction()];
|
|
6928
|
+
case 3:
|
|
6929
|
+
_a.sent();
|
|
6930
|
+
_a.label = 4;
|
|
6931
|
+
case 4: return [2 /*return*/];
|
|
6932
|
+
}
|
|
6933
|
+
});
|
|
6934
|
+
});
|
|
6935
|
+
};
|
|
6936
|
+
TransactionManagerComponent.prototype._handlePendingLine = function (lineUuid) {
|
|
6937
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
6938
|
+
var _a;
|
|
6939
|
+
return __generator(this, function (_b) {
|
|
6940
|
+
switch (_b.label) {
|
|
6941
|
+
case 0:
|
|
6942
|
+
this.currentReason = new resolvePendingReasonRequest_bo.ResolvePendingLineReasonRequest(this.currentOperationStatus.uuid, this.currentOperationStatus.pendingReason, this.currentOperationStatus.pendingReasonType);
|
|
6943
|
+
this.currentPendingLine = this.transactionLines.find(function (l) { return l.uuid === lineUuid; });
|
|
6944
|
+
_a = this.currentOperationStatus.pendingReasonType;
|
|
6945
|
+
switch (_a) {
|
|
6946
|
+
case pendingReasonType_enum.PendingReasonType.ABORTED: return [3 /*break*/, 1];
|
|
6947
|
+
case pendingReasonType_enum.PendingReasonType.CANCELLED: return [3 /*break*/, 1];
|
|
6948
|
+
case pendingReasonType_enum.PendingReasonType.CONFIRMATION_NEEDED: return [3 /*break*/, 3];
|
|
6949
|
+
case pendingReasonType_enum.PendingReasonType.INVALID_LOGISTICS: return [3 /*break*/, 5];
|
|
6950
|
+
case pendingReasonType_enum.PendingReasonType.NON_CRITICAL_DISCONTINUATION: return [3 /*break*/, 7];
|
|
6951
|
+
case pendingReasonType_enum.PendingReasonType.CHARACTERISTICS_ANSWER_NEEDED: return [3 /*break*/, 9];
|
|
6952
|
+
case pendingReasonType_enum.PendingReasonType.NONE: return [3 /*break*/, 10];
|
|
6953
|
+
}
|
|
6954
|
+
return [3 /*break*/, 10];
|
|
6955
|
+
case 1: return [4 /*yield*/, this._cancelArticle(this.currentPendingLine.uuid)];
|
|
6956
|
+
case 2:
|
|
6957
|
+
_b.sent();
|
|
6958
|
+
return [3 /*break*/, 11];
|
|
6959
|
+
case 3: return [4 /*yield*/, this._confirmAction()];
|
|
6960
|
+
case 4:
|
|
6961
|
+
_b.sent();
|
|
6962
|
+
return [3 /*break*/, 11];
|
|
6963
|
+
case 5: return [4 /*yield*/, this.showStockManager(this.currentPendingLine)];
|
|
6964
|
+
case 6:
|
|
6965
|
+
_b.sent();
|
|
6966
|
+
return [3 /*break*/, 11];
|
|
6967
|
+
case 7: return [4 /*yield*/, this._showInformation()];
|
|
6968
|
+
case 8:
|
|
6969
|
+
_b.sent();
|
|
6970
|
+
return [3 /*break*/, 11];
|
|
6971
|
+
case 9:
|
|
6972
|
+
this.CharacteristicsAnswerNeeded();
|
|
6973
|
+
return [3 /*break*/, 11];
|
|
6974
|
+
case 10:
|
|
6975
|
+
this.currentReason = undefined;
|
|
6976
|
+
this.currentPendingLine = undefined;
|
|
6977
|
+
return [3 /*break*/, 11];
|
|
6978
|
+
case 11: return [2 /*return*/];
|
|
6979
|
+
}
|
|
6980
|
+
});
|
|
6981
|
+
});
|
|
6982
|
+
};
|
|
6983
|
+
TransactionManagerComponent.prototype._saveTransaction = function () {
|
|
6984
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
6985
|
+
var success;
|
|
6986
|
+
return __generator(this, function (_a) {
|
|
6987
|
+
switch (_a.label) {
|
|
6988
|
+
case 0:
|
|
6989
|
+
if (!this.transactionInfo) return [3 /*break*/, 2];
|
|
6990
|
+
return [4 /*yield*/, this.service.saveTransactionByUuid(this.transactionInfo.uuid)];
|
|
6991
|
+
case 1:
|
|
6992
|
+
success = _a.sent();
|
|
6993
|
+
if (!success) {
|
|
6994
|
+
this.promptService.showError("Transaction could not be saved!");
|
|
6995
|
+
}
|
|
6996
|
+
_a.label = 2;
|
|
6997
|
+
case 2: return [2 /*return*/];
|
|
6998
|
+
}
|
|
6999
|
+
});
|
|
7000
|
+
});
|
|
7001
|
+
};
|
|
7002
|
+
TransactionManagerComponent.prototype._loadArticle = function (goodId) {
|
|
7003
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
7004
|
+
var _a;
|
|
7005
|
+
return __generator(this, function (_b) {
|
|
7006
|
+
switch (_b.label) {
|
|
7007
|
+
case 0:
|
|
7008
|
+
_a = this;
|
|
7009
|
+
return [4 /*yield*/, this.service.getArticleFullObject(goodId)];
|
|
7010
|
+
case 1:
|
|
7011
|
+
_a.newArticle = _b.sent();
|
|
7012
|
+
this.newArticleNr = this.newArticle.articleNr;
|
|
7013
|
+
return [2 /*return*/];
|
|
7014
|
+
}
|
|
7015
|
+
});
|
|
7016
|
+
});
|
|
7017
|
+
};
|
|
7018
|
+
TransactionManagerComponent.prototype.addEmailAddressToTransaction = function (emailAddress) {
|
|
7019
|
+
this.service.emailAddress = emailAddress;
|
|
7020
|
+
};
|
|
7021
|
+
TransactionManagerComponent.prototype.CharacteristicsAnswerNeeded = function () {
|
|
7022
|
+
var _this = this;
|
|
7023
|
+
this.characteristicAnswer.question = this.currentOperationStatus.characteristic.question;
|
|
7024
|
+
this.characteristicAnswer.title = this.newArticle.description;
|
|
7025
|
+
this.characteristicAnswer.value = this.currentOperationStatus.characteristic.value;
|
|
7026
|
+
this.characteristicAnswer.characteristics = this.currentOperationStatus.characteristic.transactionLineCharacteristicChoices;
|
|
7027
|
+
setTimeout(function () {
|
|
7028
|
+
_this.characteristicAnswer.open();
|
|
7029
|
+
// eslint-disable-next-line no-magic-numbers
|
|
7030
|
+
}, 1000);
|
|
7031
|
+
};
|
|
7032
|
+
TransactionManagerComponent.prototype._getTransactionLineInfoByIndex = function (index) {
|
|
7033
|
+
if (index >= 0 && index < this.transactionLines.length) {
|
|
7034
|
+
return this.service.currentLines[index];
|
|
7035
|
+
}
|
|
7036
|
+
};
|
|
7037
|
+
TransactionManagerComponent.prototype._cancelArticle = function (uuid) {
|
|
7038
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
7039
|
+
var _this = this;
|
|
7040
|
+
return __generator(this, function (_a) {
|
|
7041
|
+
switch (_a.label) {
|
|
7042
|
+
case 0: return [4 /*yield*/, this.service.cancelAddTransactionLine(uuid, false)
|
|
7043
|
+
.then(function (response) {
|
|
7044
|
+
_this.transaction = response;
|
|
7045
|
+
_this.articleAdded.emit(response);
|
|
7046
|
+
})];
|
|
7047
|
+
case 1:
|
|
7048
|
+
_a.sent();
|
|
7049
|
+
return [2 /*return*/];
|
|
7050
|
+
}
|
|
7051
|
+
});
|
|
7052
|
+
});
|
|
7053
|
+
};
|
|
7054
|
+
return TransactionManagerComponent;
|
|
7055
|
+
}(TransactionBaseComponent));
|
|
7056
|
+
TransactionManagerComponent.decorators = [
|
|
7057
|
+
{ type: i0.Component, args: [{
|
|
7058
|
+
// eslint-disable-next-line @angular-eslint/component-selector
|
|
7059
|
+
selector: "transaction-manager",
|
|
7060
|
+
template: "\n <warehouse #warehouse\n (okClick)=\"warehouseOkClick()\"\n (cancelClick)=\"warehouseCancelClick()\"\n ></warehouse>\n <characteristic-answer\n #characteristicAnswer\n (okClick)=\"handleCharacteristicAnswerOkClick($event)\"\n ></characteristic-answer>\n ",
|
|
7061
|
+
styles: ["html,body{height:100%}body{margin:0;font-family:Roboto,\"Helvetica Neue\",sans-serif}.flex-center,.warehouse-line-container{display:flex}.flex-center,.warehouse-line-container{flex-direction:row}.flex-center{align-items:center!important;justify-content:center!important}::ng-deep #warehouseDialog ::ng-deep .form-content .message-field,.commission-fields{margin-left:11px}.triangle{border-radius:3px}.full-width{width:100%}.flex-center{margin:10px 0}::ng-deep #warehouseDialog{align-items:center;max-height:100%}::ng-deep #warehouseDialog ::ng-deep co-form{height:100%;width:500px}::ng-deep #warehouseDialog ::ng-deep .form-content{height:calc(100% - 80px);width:100%}::ng-deep #warehouseDialog ::ng-deep .form-content .message-field{height:20px;word-wrap:break-word;white-space:normal}co-button:not(:last-child){margin-right:10px}.commission-fields{justify-content:space-between;margin:10px 0}.warehouse-description-item{width:15rem}.warehouse-nr-item{width:5rem}co-input-number-picker co-button{max-width:20px}\n"]
|
|
7062
|
+
},] }
|
|
7063
|
+
];
|
|
7064
|
+
TransactionManagerComponent.ctorParameters = function () { return [
|
|
7065
|
+
{ type: TransactionService },
|
|
7066
|
+
{ type: TransactionEventService },
|
|
7067
|
+
{ type: corecomponents_v12.PromptService },
|
|
7068
|
+
{ type: DictionaryService }
|
|
7069
|
+
]; };
|
|
7070
|
+
TransactionManagerComponent.propDecorators = {
|
|
7071
|
+
warehouse: [{ type: i0.ViewChild, args: ["warehouse",] }],
|
|
7072
|
+
characteristicAnswer: [{ type: i0.ViewChild, args: ["characteristicAnswer",] }],
|
|
7073
|
+
linesChanged: [{ type: i0.Output }],
|
|
7074
|
+
articleAdded: [{ type: i0.Output }]
|
|
7075
|
+
};
|
|
7076
|
+
|
|
7077
|
+
var ServiceOrderComponent = /** @class */ (function (_super) {
|
|
7078
|
+
__extends(ServiceOrderComponent, _super);
|
|
7079
|
+
function ServiceOrderComponent(service, transactionEvents, iconCacheService, _promptService) {
|
|
7080
|
+
var _this = _super.call(this, service) || this;
|
|
7081
|
+
_this.service = service;
|
|
7082
|
+
_this.transactionEvents = transactionEvents;
|
|
7083
|
+
_this.iconCacheService = iconCacheService;
|
|
7084
|
+
_this._promptService = _promptService;
|
|
7085
|
+
_this.iconThickLines = corecomponents_v12.CoreComponentsIcon.ThickLines;
|
|
7086
|
+
_this.iconThinLines = corecomponents_v12.CoreComponentsIcon.ThinLines;
|
|
7087
|
+
_this.iconOrder = corecomponents_v12.CoreComponentsIcon.Order;
|
|
7088
|
+
_this.viewModes = ContentViewMode;
|
|
7089
|
+
_this.canPlanDelivery = false;
|
|
7090
|
+
_this.showTotals = true;
|
|
7091
|
+
_this.contextMenuItems = [];
|
|
7092
|
+
_this.isRouteOptimizationConfigured = false;
|
|
7093
|
+
_this.activeViewMode = ContentViewMode.List;
|
|
7094
|
+
_this.floatButtonSelected = false;
|
|
7095
|
+
_this.newArticleNr = "";
|
|
7096
|
+
_this._subs = [];
|
|
7097
|
+
return _this;
|
|
7098
|
+
}
|
|
7099
|
+
Object.defineProperty(ServiceOrderComponent.prototype, "inListView", {
|
|
7100
|
+
get: function () {
|
|
7101
|
+
return this.activeViewMode === ContentViewMode.List;
|
|
7102
|
+
},
|
|
7103
|
+
enumerable: false,
|
|
7104
|
+
configurable: true
|
|
7105
|
+
});
|
|
7106
|
+
Object.defineProperty(ServiceOrderComponent.prototype, "inGridView", {
|
|
7107
|
+
get: function () {
|
|
7108
|
+
return this.activeViewMode === ContentViewMode.Grid;
|
|
7109
|
+
},
|
|
7110
|
+
enumerable: false,
|
|
7111
|
+
configurable: true
|
|
7112
|
+
});
|
|
7113
|
+
ServiceOrderComponent.prototype.ngOnInit = function () {
|
|
7114
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
7115
|
+
var _this = this;
|
|
7116
|
+
return __generator(this, function (_a) {
|
|
7117
|
+
this._subs.push(this.service.transactionLoaded.subscribe(function (transactionInfoResponse) {
|
|
7118
|
+
if (transactionInfoResponse.isSuccess) {
|
|
7119
|
+
_this.transaction = transactionInfoResponse;
|
|
7120
|
+
if (_this.transaction && _this.transaction.transactionInfo) {
|
|
7121
|
+
_this.customerId = Number(_this.transaction.transactionInfo.relation.relationNr);
|
|
7122
|
+
_this.relationId = _this.transaction.transactionInfo.relation.relationId;
|
|
7123
|
+
}
|
|
7124
|
+
}
|
|
7125
|
+
}), this.transactionEvents.rightSidebarClose.subscribe(function () {
|
|
7126
|
+
_this.moveFloatingButtonToRight();
|
|
7127
|
+
}), this.transactionEvents.transactionLineClicked.subscribe(function (transactionLine) {
|
|
7128
|
+
_this._selectedTransLine = transactionLine;
|
|
7129
|
+
_this.moveFloatingButtonToLeft();
|
|
7130
|
+
}), this.transactionEvents.scrollContent.subscribe(function (event) {
|
|
7131
|
+
_this.hideOrderTotals(event);
|
|
7132
|
+
}));
|
|
7133
|
+
return [2 /*return*/];
|
|
7134
|
+
});
|
|
7135
|
+
});
|
|
7136
|
+
};
|
|
7137
|
+
ServiceOrderComponent.prototype.ngAfterViewInit = function () {
|
|
7138
|
+
var _this = this;
|
|
7139
|
+
this._subs.push(this._transactionManager.articleAdded.subscribe(function (transactionInfoResponse) {
|
|
7140
|
+
_this.transaction = transactionInfoResponse;
|
|
7141
|
+
}));
|
|
7142
|
+
};
|
|
7143
|
+
ServiceOrderComponent.prototype.ngOnDestroy = function () {
|
|
7144
|
+
this._subs.forEach(function (sub) { return sub.unsubscribe(); });
|
|
7145
|
+
};
|
|
7146
|
+
ServiceOrderComponent.prototype.animationFn = function () {
|
|
7147
|
+
return animations.trigger("showPopup", [
|
|
7148
|
+
animations.state("void", animations.style({ transform: "translate3d(0, 0, 0)" })),
|
|
7149
|
+
animations.state("*", animations.style({ transform: "translate3d(100%, 0, 0)" })),
|
|
7150
|
+
animations.transition("void <=> *", [
|
|
7151
|
+
animations.animate("200ms ease-in-out")
|
|
7152
|
+
])
|
|
7153
|
+
]);
|
|
7154
|
+
};
|
|
7155
|
+
ServiceOrderComponent.prototype.trackByFn = function (index, line) {
|
|
7156
|
+
return line.lineNr;
|
|
7157
|
+
};
|
|
7158
|
+
ServiceOrderComponent.prototype.handleRowsSelected = function (rows) {
|
|
7159
|
+
this._selectedTransLine = rows.find(function (x) { return x !== undefined; });
|
|
7160
|
+
};
|
|
7161
|
+
ServiceOrderComponent.prototype.handlePlanningRequest = function (event) {
|
|
7162
|
+
// TODO: handlePlanningRequest... from new Planning package
|
|
7163
|
+
};
|
|
7164
|
+
ServiceOrderComponent.prototype.moveFloatingButtonToLeft = function () {
|
|
7165
|
+
if (this.floatButtonRightPosition === ServiceOrderComponent.FLOAT_BUTTON_RIGHT_POSITION_WITHOUT_SIDEBAR) {
|
|
7166
|
+
this.floatButtonRightPosition = ServiceOrderComponent.FLOAT_BUTTON_RIGHT_POSITION_WITH_SIDEBAR;
|
|
7167
|
+
}
|
|
7168
|
+
};
|
|
7169
|
+
ServiceOrderComponent.prototype.moveFloatingButtonToRight = function () {
|
|
6586
7170
|
if (this.floatButtonRightPosition === ServiceOrderComponent.FLOAT_BUTTON_RIGHT_POSITION_WITH_SIDEBAR) {
|
|
6587
7171
|
this.floatButtonRightPosition = ServiceOrderComponent.FLOAT_BUTTON_RIGHT_POSITION_WITHOUT_SIDEBAR;
|
|
6588
7172
|
}
|
|
@@ -6599,7 +7183,7 @@
|
|
|
6599
7183
|
};
|
|
6600
7184
|
Object.defineProperty(ServiceOrderComponent.prototype, "subHeader", {
|
|
6601
7185
|
get: function () {
|
|
6602
|
-
if (this._selectedTransLine
|
|
7186
|
+
if (this._selectedTransLine) {
|
|
6603
7187
|
return this._selectedTransLine.goodDescription;
|
|
6604
7188
|
}
|
|
6605
7189
|
return "";
|
|
@@ -6610,6 +7194,22 @@
|
|
|
6610
7194
|
ServiceOrderComponent.prototype.hideOrderTotals = function (event) {
|
|
6611
7195
|
this.showTotals = false;
|
|
6612
7196
|
};
|
|
7197
|
+
ServiceOrderComponent.prototype.addArticleLine = function (event) {
|
|
7198
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
7199
|
+
return __generator(this, function (_a) {
|
|
7200
|
+
switch (_a.label) {
|
|
7201
|
+
case 0:
|
|
7202
|
+
if (!(event.code === "Enter")) return [3 /*break*/, 2];
|
|
7203
|
+
if (!(this.newArticleNr && this.newArticleNr !== "")) return [3 /*break*/, 2];
|
|
7204
|
+
return [4 /*yield*/, this._transactionManager.addArticleLine(this.transactionInfo.uuid, this.newArticleNr, 1, 0, PositionGridRow.After)];
|
|
7205
|
+
case 1:
|
|
7206
|
+
_a.sent();
|
|
7207
|
+
_a.label = 2;
|
|
7208
|
+
case 2: return [2 /*return*/];
|
|
7209
|
+
}
|
|
7210
|
+
});
|
|
7211
|
+
});
|
|
7212
|
+
};
|
|
6613
7213
|
return ServiceOrderComponent;
|
|
6614
7214
|
}(TransactionBaseComponent));
|
|
6615
7215
|
ServiceOrderComponent.FLOAT_BUTTON_RIGHT_POSITION_WITHOUT_SIDEBAR = 50;
|
|
@@ -6618,17 +7218,19 @@
|
|
|
6618
7218
|
{ type: i0.Component, args: [{
|
|
6619
7219
|
// eslint-disable-next-line @angular-eslint/component-selector
|
|
6620
7220
|
selector: "service-order",
|
|
6621
|
-
template: "\n <div id=\"transaction-general-tab\" style=\"height:100%;\">\n <transaction-header-block\n [relationId]=\"relationId\"\n [transaction]=\"transaction\"\n [canPlanDelivery]=\"canPlanDelivery\"\n (planningRequestButtonClick)=\"handlePlanningRequest($event)\"\n ></transaction-header-block>\n <div *ngIf=\"!isService\">\n <div class=\"transaction-view\" fxLayout=\"row\" fxLayoutGap=\"1px\" fxLayoutAlign=\"flex-end\">\n <div class=\"view-mode-buttons\">\n <co-button [iconData]=\"iconCacheService.getIcon(iconThickLines)\"\n [title]=\"'LIST_VIEW' | localize\"\n (click)=\"this.activeViewMode = viewModes.List\"\n class=\"triangle white\"\n iconClass=\"medium light\"></co-button>\n <co-button [iconData]=\"iconCacheService.getIcon(iconThinLines)\"\n [title]=\"'GRID_VIEW' | localize\"\n (click)=\"this.activeViewMode = viewModes.Grid\"\n class=\"triangle white\"\n iconClass=\"medium light\"></co-button>\n </div>\n </div>\n <div *ngIf=\"this.activeViewMode === viewModes.List\">\n <transaction-order-line-view *ngFor=\"let line of transactionLines; trackBy:trackByFn;\"\n [line]=\"line\"\n ></transaction-order-line-view>\n </div>\n <div *ngIf=\"this.activeViewMode === viewModes.Grid\">\n <transaction-order-lines [transaction]=\"transaction\"></transaction-order-lines>\n </div>\n <div class=\"floating-icon-wrapper\" [style.right.px]=\"floatButtonRightPosition\">\n <icon [icon]=\"iconOrder\"\n class=\"light\"\n (click)=\"floatButtonClick()\" id=\"floatingIcon\"\n [style.right.px]=\"floatButtonRightPosition\"></icon>\n </div>\n </div>\n <transaction-order-totals *ngIf=\"!isService\"\n [ngClass]=\"showTotals ? 'transaction-totals-show' : 'transaction-totals-hide'\"></transaction-order-totals>\n </div>\n\n <transaction-article-text></transaction-article-text>\n ",
|
|
7221
|
+
template: "\n <transaction-manager></transaction-manager>\n <div id=\"transaction-general-tab\" style=\"height:100%;\">\n <transaction-header-block\n [relationId]=\"relationId\"\n [transaction]=\"transaction\"\n [canPlanDelivery]=\"canPlanDelivery\"\n (planningRequestButtonClick)=\"handlePlanningRequest($event)\"\n ></transaction-header-block>\n <div *ngIf=\"!isService\">\n <div style=\"display: flex; flex-direction: row; place-content: center\">\n <co-input-text style=\"width: 200px;\"\n [(model)]=\"newArticleNr\"\n [placeholder]=\"'WHERE_ARE_YOU_LOOKING_FOR' | localize\"\n [showClearButton]=\"true\"\n (keypress)=\"addArticleLine($event)\"\n ></co-input-text>\n </div>\n <div class=\"transaction-view\" fxLayout=\"row\" fxLayoutGap=\"1px\" fxLayoutAlign=\"flex-end\">\n <div class=\"view-mode-buttons\">\n <co-button [iconData]=\"iconCacheService.getIcon(iconThickLines)\"\n [title]=\"'LIST_VIEW' | localize\"\n (click)=\"this.activeViewMode = viewModes.List\"\n class=\"triangle white\"\n iconClass=\"medium light\"></co-button>\n <co-button [iconData]=\"iconCacheService.getIcon(iconThinLines)\"\n [title]=\"'GRID_VIEW' | localize\"\n (click)=\"this.activeViewMode = viewModes.Grid\"\n class=\"triangle white\"\n iconClass=\"medium light\"></co-button>\n </div>\n </div>\n <div *ngIf=\"this.activeViewMode === viewModes.List\">\n <transaction-order-line-view *ngFor=\"let line of transactionLines; trackBy:trackByFn;\"\n [line]=\"line\"\n ></transaction-order-line-view>\n </div>\n <div *ngIf=\"this.activeViewMode === viewModes.Grid\">\n <transaction-order-lines [transaction]=\"transaction\"></transaction-order-lines>\n </div>\n <div class=\"floating-icon-wrapper\" [style.right.px]=\"floatButtonRightPosition\">\n <icon [icon]=\"iconOrder\"\n class=\"light\"\n (click)=\"floatButtonClick()\" id=\"floatingIcon\"\n [style.right.px]=\"floatButtonRightPosition\"></icon>\n </div>\n </div>\n <transaction-order-totals *ngIf=\"!isService\"\n [ngClass]=\"showTotals ? 'transaction-totals-show' : 'transaction-totals-hide'\"></transaction-order-totals>\n </div>\n\n <transaction-article-text></transaction-article-text>\n ",
|
|
6622
7222
|
styles: ["html,body{height:100%}body{margin:0;font-family:Roboto,\"Helvetica Neue\",sans-serif}.flex-center,:host :host{display:flex}.flex-center{flex-direction:row}:host :host{flex-direction:column}.flex-center{align-items:center!important;justify-content:center!important}.transaction-view .view-mode-buttons{margin-left:11px}:host :host{width:100%}:host :host{overflow:hidden}.triangle{border-radius:3px}.full-width{width:100%}.flex-center{margin:10px 0}:host :host{padding-bottom:60px}.page-wrapper :host{padding:20px;margin-bottom:60px}:host transaction-order-totals{display:flex;flex-direction:column;align-items:flex-end}:host .transaction-totals-show{padding:20px}:host .transaction-totals-hide{position:relative;bottom:0;right:0}::ng-deep #transaction_planning_agenda{top:160px!important;width:calc(100vw - 80px)!important}::ng-deep #transaction_planning_agenda .popup-card-title{padding:10px 20px;background:#74B77F;color:#fff}::ng-deep #transaction_planning_agenda .popup-card-title .header-wrapper{align-items:center!important}::ng-deep #transaction_planning_agenda .popup-card-title .separator{border-color:#fff!important}::ng-deep #transaction_planning_agenda .popup-card-title .header{font-size:15px;font-weight:normal}::ng-deep #transaction_planning_agenda .popup-card-title .sub-header{font-size:18px;color:#fff!important;font-weight:bold!important}::ng-deep #transaction_planning_agenda .popup-card-title button-select icon [fill]{fill:#fff}::ng-deep #transaction_planning_agenda .popup-card-content{overflow:hidden}@media only screen and (max-width: 599px){::ng-deep #transaction_planning_agenda{width:100vw!important}::ng-deep #transaction_planning_agenda .popup-card-content{padding:0}}.column-separator{padding-right:25px;border-right:1px solid #0000001c}.floating-icon-wrapper{position:fixed;bottom:50px;right:50px;display:flex;flex-shrink:0;align-items:center;justify-content:center;background:#475060;height:50px;width:50px;opacity:.5;transition:opacity .4s ease-in-out;border-radius:50%;overflow:hidden;box-shadow:0 0 6px #0009;-webkit-box-shadow:0px 0px 6px 0px rgba(0,0,0,.6);-moz-box-shadow:0px 0px 6px 0px rgba(0,0,0,.6);cursor:pointer}.floating-icon-wrapper:hover{opacity:1;transition:opacity .4s ease-in-out}.floating-icon-wrapper ::ng-deep icon{height:44px!important;width:44px!important;color:#fff!important;flex-shrink:0}.transaction-wrapper{padding:0 20px}.view-mode-buttons co-button{padding:0}.transaction-view{display:flex;margin-top:10px;justify-content:stretch}.transaction-view .view-mode-buttons{display:flex;flex-direction:row}.transaction-view .view-mode-buttons button-select ::ng-deep button-colijn{border-radius:0}.transaction-view .view-mode-buttons button-select:first-child{margin-right:5px}.transaction-view .view-mode-buttons button-select:first-child ::ng-deep button-colijn{border-radius:3px}.transaction-view .view-mode-buttons button-select:nth-child(2) ::ng-deep button-colijn{border-top-left-radius:3px;border-bottom-left-radius:3px}.transaction-view .view-mode-buttons button-select:last-child ::ng-deep button-colijn{border-top-right-radius:3px;border-bottom-right-radius:3px}\n"]
|
|
6623
7223
|
},] }
|
|
6624
7224
|
];
|
|
6625
7225
|
ServiceOrderComponent.ctorParameters = function () { return [
|
|
6626
7226
|
{ type: TransactionService },
|
|
6627
7227
|
{ type: TransactionEventService },
|
|
6628
|
-
{ type: corecomponents_v12.IconCacheService }
|
|
7228
|
+
{ type: corecomponents_v12.IconCacheService },
|
|
7229
|
+
{ type: corecomponents_v12.PromptService }
|
|
6629
7230
|
]; };
|
|
6630
7231
|
ServiceOrderComponent.propDecorators = {
|
|
6631
|
-
_transactionArticleTextComponent: [{ type: i0.ViewChild, args: [TransactionArticleTextComponent,
|
|
7232
|
+
_transactionArticleTextComponent: [{ type: i0.ViewChild, args: [TransactionArticleTextComponent,] }],
|
|
7233
|
+
_transactionManager: [{ type: i0.ViewChild, args: [TransactionManagerComponent,] }]
|
|
6632
7234
|
};
|
|
6633
7235
|
|
|
6634
7236
|
var TransactionOrderTotalsComponent = /** @class */ (function (_super) {
|
|
@@ -7522,6 +8124,134 @@
|
|
|
7522
8124
|
okButtonComp: [{ type: i0.ViewChild, args: ["okButton",] }]
|
|
7523
8125
|
};
|
|
7524
8126
|
|
|
8127
|
+
var WarehouseComponent = /** @class */ (function () {
|
|
8128
|
+
function WarehouseComponent(service, _dictionaryService) {
|
|
8129
|
+
this.service = service;
|
|
8130
|
+
this._dictionaryService = _dictionaryService;
|
|
8131
|
+
this.message = "";
|
|
8132
|
+
this.okClick = new i0.EventEmitter();
|
|
8133
|
+
this.cancelClick = new i0.EventEmitter();
|
|
8134
|
+
this.commissionCodes = [];
|
|
8135
|
+
this.commissionFields = { text: "description", value: "code" };
|
|
8136
|
+
this.transactionArticleWarehouses = [];
|
|
8137
|
+
this.columns = [];
|
|
8138
|
+
this._okOrCancelClick = false;
|
|
8139
|
+
this.columns.push({ field: "warehouseNr", headerText: this._dictionaryService.get("WAREHOUSE"), allowFiltering: false }, { field: "warehouseDesc", headerText: this._dictionaryService.get("DESCRIPTION") }, { field: "stockAmount", headerText: this._dictionaryService.get("STOCK") });
|
|
8140
|
+
}
|
|
8141
|
+
WarehouseComponent.prototype.ngOnInit = function () {
|
|
8142
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
8143
|
+
var _a;
|
|
8144
|
+
return __generator(this, function (_b) {
|
|
8145
|
+
switch (_b.label) {
|
|
8146
|
+
case 0:
|
|
8147
|
+
_a = this;
|
|
8148
|
+
return [4 /*yield*/, this.service.getCommissionCodes("NL")];
|
|
8149
|
+
case 1:
|
|
8150
|
+
_a.commissionCodes = _b.sent();
|
|
8151
|
+
return [2 /*return*/];
|
|
8152
|
+
}
|
|
8153
|
+
});
|
|
8154
|
+
});
|
|
8155
|
+
};
|
|
8156
|
+
WarehouseComponent.prototype.ngOnDestroy = function () {
|
|
8157
|
+
this.warehouseDialog.close();
|
|
8158
|
+
};
|
|
8159
|
+
WarehouseComponent.prototype.showStockManager = function (line) {
|
|
8160
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
8161
|
+
return __generator(this, function (_a) {
|
|
8162
|
+
this.selectedWarehouseNr = line.warehouseNumber;
|
|
8163
|
+
this.amount = line.amount;
|
|
8164
|
+
this.commissionCode = line.commissionCode;
|
|
8165
|
+
this.show(line.articleNumber);
|
|
8166
|
+
return [2 /*return*/];
|
|
8167
|
+
});
|
|
8168
|
+
});
|
|
8169
|
+
};
|
|
8170
|
+
WarehouseComponent.prototype.hide = function () {
|
|
8171
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
8172
|
+
return __generator(this, function (_a) {
|
|
8173
|
+
switch (_a.label) {
|
|
8174
|
+
case 0:
|
|
8175
|
+
if (this._okOrCancelClick) {
|
|
8176
|
+
this._okOrCancelClick = false;
|
|
8177
|
+
return [2 /*return*/];
|
|
8178
|
+
}
|
|
8179
|
+
return [4 /*yield*/, this.onStockManagerCancelClick()];
|
|
8180
|
+
case 1:
|
|
8181
|
+
_a.sent();
|
|
8182
|
+
return [2 /*return*/];
|
|
8183
|
+
}
|
|
8184
|
+
});
|
|
8185
|
+
});
|
|
8186
|
+
};
|
|
8187
|
+
WarehouseComponent.prototype.show = function (articleNr) {
|
|
8188
|
+
this._reloadDataCollections(articleNr).then();
|
|
8189
|
+
this.warehouseGrid.selectRow(this.selectedWarehouseNr);
|
|
8190
|
+
this.warehouseDialog.targetElement = null;
|
|
8191
|
+
this.warehouseDialog.open();
|
|
8192
|
+
};
|
|
8193
|
+
WarehouseComponent.prototype.handleRowsSelected = function (rows) {
|
|
8194
|
+
this.selectedWarehouseNr = (rows.find(function (x) { return x !== undefined; })).warehouseNr;
|
|
8195
|
+
};
|
|
8196
|
+
WarehouseComponent.prototype.onStockManagerCancelClick = function () {
|
|
8197
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
8198
|
+
return __generator(this, function (_a) {
|
|
8199
|
+
this._okOrCancelClick = true;
|
|
8200
|
+
this.warehouseDialog.close();
|
|
8201
|
+
this.cancelClick.emit();
|
|
8202
|
+
return [2 /*return*/];
|
|
8203
|
+
});
|
|
8204
|
+
});
|
|
8205
|
+
};
|
|
8206
|
+
WarehouseComponent.prototype.onStockManagerOkClick = function () {
|
|
8207
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
8208
|
+
return __generator(this, function (_a) {
|
|
8209
|
+
this._okOrCancelClick = true;
|
|
8210
|
+
this.warehouseDialog.close();
|
|
8211
|
+
this.okClick.emit();
|
|
8212
|
+
return [2 /*return*/];
|
|
8213
|
+
});
|
|
8214
|
+
});
|
|
8215
|
+
};
|
|
8216
|
+
WarehouseComponent.prototype._reloadDataCollections = function (articleNr) {
|
|
8217
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
8218
|
+
var goodId, _a;
|
|
8219
|
+
return __generator(this, function (_b) {
|
|
8220
|
+
switch (_b.label) {
|
|
8221
|
+
case 0: return [4 /*yield*/, this.service.getGoodIdFromArticleNr(articleNr)];
|
|
8222
|
+
case 1:
|
|
8223
|
+
goodId = _b.sent();
|
|
8224
|
+
_a = this;
|
|
8225
|
+
return [4 /*yield*/, this.service.getTransactionArticleWarehouses(goodId)];
|
|
8226
|
+
case 2:
|
|
8227
|
+
_a.transactionArticleWarehouses = _b.sent();
|
|
8228
|
+
return [2 /*return*/];
|
|
8229
|
+
}
|
|
8230
|
+
});
|
|
8231
|
+
});
|
|
8232
|
+
};
|
|
8233
|
+
return WarehouseComponent;
|
|
8234
|
+
}());
|
|
8235
|
+
WarehouseComponent.decorators = [
|
|
8236
|
+
{ type: i0.Component, args: [{
|
|
8237
|
+
// eslint-disable-next-line @angular-eslint/component-selector
|
|
8238
|
+
selector: "warehouse",
|
|
8239
|
+
template: "\n <co-dialog #warehouseDialog\n (closeClick)=\"hide()\"\n (overlayClick)=\"onStockManagerCancelClick()\"\n >\n <ng-container header>{{ 'STOCK_NOTIFICATION' | localize }}</ng-container>\n\n <ng-container content>\n <co-form>\n <div class=\"form-content\">\n <span *ngIf=\"message\" class=\"message-field\" [textContent]=\"message | localize\"></span>\n <div class=\"commission-fields\" fxLayout=\"row\">\n <co-input-number-picker class=\"horizontal\" [(model)]=\"amount\" [min]=\"0\" decimals=\"3\"></co-input-number-picker>\n <co-input-combo-box [(model)]=\"commissionCode\"\n [source]=\"commissionCodes\"\n [fields]=\"commissionFields\"\n [placeholder]=\"'COMMISSION_CODE' | localize\"\n [required]=\"true\"\n ></co-input-combo-box>\n </div>\n <div>\n <co-grid #warehouseGrid\n [data]=\"transactionArticleWarehouses\"\n [columns]=\"columns\"\n [pagingEnabled]=\"'true'\"\n [maxNumberOfRows]=\"'10'\"\n (rowsSelected)=\"handleRowsSelected($event)\"\n ></co-grid>\n </div>\n </div>\n </co-form>\n </ng-container>\n\n <ng-container footer>\n <div class=\"flex-center\">\n <co-button [label]=\"'OK' | localize\" (click)=\"onStockManagerOkClick()\"></co-button>\n <co-button [label]=\"'CANCEL' | localize\" (click)=\"onStockManagerCancelClick()\"></co-button>\n </div>\n </ng-container>\n </co-dialog>\n ",
|
|
8240
|
+
styles: ["html,body{height:100%}body{margin:0;font-family:Roboto,\"Helvetica Neue\",sans-serif}.flex-center,.warehouse-line-container{display:flex}.flex-center,.warehouse-line-container{flex-direction:row}.flex-center{align-items:center!important;justify-content:center!important}::ng-deep #warehouseDialog ::ng-deep .form-content .message-field,.commission-fields{margin-left:11px}.triangle{border-radius:3px}.full-width{width:100%}.flex-center{margin:10px 0}::ng-deep #warehouseDialog{align-items:center;max-height:100%}::ng-deep #warehouseDialog ::ng-deep co-form{height:100%;width:500px}::ng-deep #warehouseDialog ::ng-deep .form-content{height:calc(100% - 80px);width:100%}::ng-deep #warehouseDialog ::ng-deep .form-content .message-field{height:20px;word-wrap:break-word;white-space:normal}co-button:not(:last-child){margin-right:10px}.commission-fields{justify-content:space-between;margin:10px 0}.warehouse-description-item{width:15rem}.warehouse-nr-item{width:5rem}co-input-number-picker co-button{max-width:20px}\n"]
|
|
8241
|
+
},] }
|
|
8242
|
+
];
|
|
8243
|
+
WarehouseComponent.ctorParameters = function () { return [
|
|
8244
|
+
{ type: TransactionService },
|
|
8245
|
+
{ type: DictionaryService }
|
|
8246
|
+
]; };
|
|
8247
|
+
WarehouseComponent.propDecorators = {
|
|
8248
|
+
warehouseDialog: [{ type: i0.ViewChild, args: ["warehouseDialog",] }],
|
|
8249
|
+
warehouseGrid: [{ type: i0.ViewChild, args: ["warehouseGrid",] }],
|
|
8250
|
+
message: [{ type: i0.Input }],
|
|
8251
|
+
okClick: [{ type: i0.Output }],
|
|
8252
|
+
cancelClick: [{ type: i0.Output }]
|
|
8253
|
+
};
|
|
8254
|
+
|
|
7525
8255
|
var IoneServiceOrderModule = /** @class */ (function () {
|
|
7526
8256
|
function IoneServiceOrderModule() {
|
|
7527
8257
|
}
|
|
@@ -7555,6 +8285,7 @@
|
|
|
7555
8285
|
IoneShoppingCartModule,
|
|
7556
8286
|
ej2AngularNavigations.TabModule,
|
|
7557
8287
|
common.CommonModule,
|
|
8288
|
+
// RichTextEditorModule
|
|
7558
8289
|
],
|
|
7559
8290
|
declarations: [
|
|
7560
8291
|
TemplateWrapperDirective,
|
|
@@ -7579,11 +8310,13 @@
|
|
|
7579
8310
|
TransactionDeliverySummaryComponent,
|
|
7580
8311
|
TransactionProductContractSummaryComponent,
|
|
7581
8312
|
TransactionProductSummaryComponent,
|
|
8313
|
+
TransactionManagerComponent,
|
|
8314
|
+
WarehouseComponent,
|
|
7582
8315
|
],
|
|
7583
8316
|
providers: [
|
|
7584
8317
|
DictionaryService,
|
|
7585
8318
|
TransactionService,
|
|
7586
|
-
OptionsService
|
|
8319
|
+
OptionsService,
|
|
7587
8320
|
],
|
|
7588
8321
|
entryComponents: [
|
|
7589
8322
|
IoneServiceOrderComponent
|
|
@@ -7617,24 +8350,26 @@
|
|
|
7617
8350
|
exports["ɵbh"] = ServiceOrderComponent;
|
|
7618
8351
|
exports["ɵbi"] = TransactionBaseComponent;
|
|
7619
8352
|
exports["ɵbj"] = TransactionArticleTextComponent;
|
|
7620
|
-
exports["ɵbk"] =
|
|
7621
|
-
exports["ɵbl"] =
|
|
7622
|
-
exports["ɵbm"] =
|
|
7623
|
-
exports["ɵbn"] =
|
|
7624
|
-
exports["ɵbo"] =
|
|
7625
|
-
exports["ɵbp"] =
|
|
7626
|
-
exports["ɵbq"] =
|
|
7627
|
-
exports["ɵbr"] =
|
|
7628
|
-
exports["ɵbs"] =
|
|
7629
|
-
exports["ɵbt"] =
|
|
7630
|
-
exports["ɵbu"] =
|
|
7631
|
-
exports["ɵbv"] =
|
|
7632
|
-
exports["ɵbw"] =
|
|
7633
|
-
exports["ɵbx"] =
|
|
7634
|
-
exports["ɵby"] =
|
|
7635
|
-
exports["ɵbz"] =
|
|
8353
|
+
exports["ɵbk"] = TransactionManagerComponent;
|
|
8354
|
+
exports["ɵbl"] = TransactionOrderTotalsComponent;
|
|
8355
|
+
exports["ɵbm"] = TransactionOrderLineViewComponent;
|
|
8356
|
+
exports["ɵbn"] = TransactionOrderLinesComponent;
|
|
8357
|
+
exports["ɵbo"] = TransactionRelationAddressComponent;
|
|
8358
|
+
exports["ɵbp"] = TransactionSidebarRightComponent;
|
|
8359
|
+
exports["ɵbq"] = TransactionLineAccordionComponent;
|
|
8360
|
+
exports["ɵbr"] = TransactionHeaderBlockComponent;
|
|
8361
|
+
exports["ɵbs"] = TransactionRelationEditComponent;
|
|
8362
|
+
exports["ɵbt"] = TransactionServiceSummaryComponent;
|
|
8363
|
+
exports["ɵbu"] = TransactionSummaryBlockComponent;
|
|
8364
|
+
exports["ɵbv"] = TransactionServiceStatusComponent;
|
|
8365
|
+
exports["ɵbw"] = TransactionOrderSummaryComponent;
|
|
8366
|
+
exports["ɵbx"] = TransactionPaymentInfoComponent;
|
|
8367
|
+
exports["ɵby"] = TransactionArticleSummaryComponent;
|
|
8368
|
+
exports["ɵbz"] = TransactionDeliverySummaryComponent;
|
|
7636
8369
|
exports["ɵc"] = CheckoutOverviewComponent;
|
|
7637
|
-
exports["ɵca"] =
|
|
8370
|
+
exports["ɵca"] = TransactionProductContractSummaryComponent;
|
|
8371
|
+
exports["ɵcb"] = TransactionProductSummaryComponent;
|
|
8372
|
+
exports["ɵcc"] = WarehouseComponent;
|
|
7638
8373
|
exports["ɵd"] = CheckoutOverviewBlockComponent;
|
|
7639
8374
|
exports["ɵe"] = CheckoutOverviewRelationEditComponent;
|
|
7640
8375
|
exports["ɵf"] = TransactionService;
|