@colijnit/transaction 257.1.1 → 257.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/colijnit-transaction.umd.js +261 -164
- package/bundles/colijnit-transaction.umd.js.map +1 -1
- package/colijnit-transaction.metadata.json +1 -1
- package/esm2015/lib/component/core/base/transaction-lines-base.component.js +41 -4
- package/esm2015/lib/component/purchase-confirmation-lines/purchase-confirmation-lines.component.js +10 -2
- package/esm2015/lib/component/transaction-line/transaction-purchase-order-line/transaction-purchase-order-line-base.component.js +2 -2
- package/esm2015/lib/component/transaction-line-purchase-confirmation/transaction-line-purchase-confirmation.component.js +37 -21
- package/esm2015/lib/component/transaction-line-side-panel/transaction-line-side-panel.component.js +16 -14
- package/esm2015/lib/component/transaction-line-side-panel-purchase/transaction-line-side-panel-purchase.component.js +4 -36
- package/esm2015/lib/component/transaction-lines/transaction-lines.component.js +8 -37
- package/esm2015/lib/component/transaction-lines-popup/transaction-lines-popup.component.js +15 -10
- package/esm2015/lib/model/transaction-line-view-model.js +7 -0
- package/esm2015/lib/service/line-selection.service.js +18 -3
- package/esm2015/lib/service/purchase-confirmation.service.js +48 -1
- package/esm2015/lib/transaction-version.js +3 -3
- package/fesm2015/colijnit-transaction.js +235 -162
- package/fesm2015/colijnit-transaction.js.map +1 -1
- package/lib/component/core/base/transaction-lines-base.component.d.ts +23 -2
- package/lib/component/transaction-line-purchase-confirmation/transaction-line-purchase-confirmation.component.d.ts +16 -9
- package/lib/component/transaction-line-side-panel/transaction-line-side-panel.component.d.ts +5 -4
- package/lib/component/transaction-line-side-panel-purchase/transaction-line-side-panel-purchase.component.d.ts +0 -19
- package/lib/component/transaction-lines/transaction-lines.component.d.ts +1 -19
- package/lib/component/transaction-lines-popup/style/_layout.scss +4 -0
- package/lib/component/transaction-lines-popup/transaction-lines-popup.component.d.ts +3 -1
- package/lib/model/transaction-line-view-model.d.ts +7 -0
- package/lib/service/line-selection.service.d.ts +6 -0
- package/lib/service/purchase-confirmation.service.d.ts +14 -4
- package/package.json +1 -1
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
function Version() {
|
|
34
34
|
this.name = "@colijnit/transaction";
|
|
35
35
|
this.description = "Colijn IT transaction package";
|
|
36
|
-
this.symVer = "257.1.
|
|
37
|
-
this.publishDate = "
|
|
36
|
+
this.symVer = "257.1.2";
|
|
37
|
+
this.publishDate = "16-1-2025 18:39:46";
|
|
38
38
|
}
|
|
39
39
|
return Version;
|
|
40
40
|
}());
|
|
@@ -23923,8 +23923,17 @@
|
|
|
23923
23923
|
return ColorUtils;
|
|
23924
23924
|
}());
|
|
23925
23925
|
|
|
23926
|
+
var TransactionLineViewModel = /** @class */ (function () {
|
|
23927
|
+
function TransactionLineViewModel(l) {
|
|
23928
|
+
this.showColor = false;
|
|
23929
|
+
this.line = l;
|
|
23930
|
+
}
|
|
23931
|
+
return TransactionLineViewModel;
|
|
23932
|
+
}());
|
|
23933
|
+
|
|
23926
23934
|
var PurchaseConfirmationService = /** @class */ (function () {
|
|
23927
23935
|
function PurchaseConfirmationService(_transactionConnectorService, _transactionEventService) {
|
|
23936
|
+
var _this = this;
|
|
23928
23937
|
this._transactionConnectorService = _transactionConnectorService;
|
|
23929
23938
|
this._transactionEventService = _transactionEventService;
|
|
23930
23939
|
this.confirmationNeeded = new rxjs.BehaviorSubject(undefined);
|
|
@@ -23932,7 +23941,24 @@
|
|
|
23932
23941
|
this.confirmationAnalysisResult = [];
|
|
23933
23942
|
this.ordersTotal = new rxjs.BehaviorSubject(0);
|
|
23934
23943
|
this.ordersTotalObservable = this.ordersTotal.asObservable();
|
|
23944
|
+
this.transactionLinesViewModels = [];
|
|
23945
|
+
this._transactionLines = [];
|
|
23946
|
+
this._subs = [];
|
|
23947
|
+
this._subs.push(this._transactionEventService.orderConfirmationDropped.subscribe(function (data) {
|
|
23948
|
+
_this._updateViewModels(data);
|
|
23949
|
+
}));
|
|
23935
23950
|
}
|
|
23951
|
+
Object.defineProperty(PurchaseConfirmationService.prototype, "transactionLines", {
|
|
23952
|
+
get: function () {
|
|
23953
|
+
return this._transactionLines;
|
|
23954
|
+
},
|
|
23955
|
+
set: function (value) {
|
|
23956
|
+
this._transactionLines = value;
|
|
23957
|
+
this._prepareViewModels();
|
|
23958
|
+
},
|
|
23959
|
+
enumerable: false,
|
|
23960
|
+
configurable: true
|
|
23961
|
+
});
|
|
23936
23962
|
Object.defineProperty(PurchaseConfirmationService.prototype, "confirmationAnalysisId", {
|
|
23937
23963
|
get: function () {
|
|
23938
23964
|
return this._confirmationAnalysisId;
|
|
@@ -23947,6 +23973,9 @@
|
|
|
23947
23973
|
PurchaseConfirmationService.prototype.setOrdersTotal = function (value) {
|
|
23948
23974
|
this.ordersTotal.next(value);
|
|
23949
23975
|
};
|
|
23976
|
+
PurchaseConfirmationService.prototype.ngOnDestroy = function () {
|
|
23977
|
+
this._subs.forEach(function (s) { return s.unsubscribe(); });
|
|
23978
|
+
};
|
|
23950
23979
|
PurchaseConfirmationService.prototype.reset = function () {
|
|
23951
23980
|
this.confirmationAnalysisId = undefined;
|
|
23952
23981
|
this._transactionEventService.orderConfirmationDropped.next(undefined);
|
|
@@ -24031,6 +24060,37 @@
|
|
|
24031
24060
|
});
|
|
24032
24061
|
});
|
|
24033
24062
|
};
|
|
24063
|
+
PurchaseConfirmationService.prototype._updateViewModels = function (data) {
|
|
24064
|
+
if (data) {
|
|
24065
|
+
this.transactionLinesViewModels.forEach(function (vm) {
|
|
24066
|
+
if (vm.line && vm.line.lineNr === data.lineNr) {
|
|
24067
|
+
vm.line.linkedAnalysisResultId = data.analysisResultId;
|
|
24068
|
+
vm.showColor = true;
|
|
24069
|
+
vm.color = data.color;
|
|
24070
|
+
}
|
|
24071
|
+
else if (vm.line && vm.line.linkedAnalysisResultId === data.analysisResultId) {
|
|
24072
|
+
vm.line.linkedAnalysisResultId = undefined;
|
|
24073
|
+
vm.showColor = false;
|
|
24074
|
+
vm.color = "";
|
|
24075
|
+
}
|
|
24076
|
+
});
|
|
24077
|
+
}
|
|
24078
|
+
else {
|
|
24079
|
+
this.transactionLinesViewModels.forEach(function (vm) {
|
|
24080
|
+
vm.line.linkedAnalysisResultId = undefined;
|
|
24081
|
+
vm.showColor = false;
|
|
24082
|
+
vm.color = "";
|
|
24083
|
+
});
|
|
24084
|
+
}
|
|
24085
|
+
};
|
|
24086
|
+
PurchaseConfirmationService.prototype._prepareViewModels = function () {
|
|
24087
|
+
var _this = this;
|
|
24088
|
+
this.transactionLinesViewModels.length = 0;
|
|
24089
|
+
this._transactionLines.forEach(function (t) {
|
|
24090
|
+
var viewModel = new TransactionLineViewModel(t);
|
|
24091
|
+
_this.transactionLinesViewModels.push(viewModel);
|
|
24092
|
+
});
|
|
24093
|
+
};
|
|
24034
24094
|
return PurchaseConfirmationService;
|
|
24035
24095
|
}());
|
|
24036
24096
|
PurchaseConfirmationService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function PurchaseConfirmationService_Factory() { return new PurchaseConfirmationService(i0__namespace.ɵɵinject(TransactionConnectorService), i0__namespace.ɵɵinject(TransactionEventService)); }, token: PurchaseConfirmationService, providedIn: "root" });
|
|
@@ -26606,7 +26666,7 @@
|
|
|
26606
26666
|
try {
|
|
26607
26667
|
var droppedData = JSON.parse(event.dataTransfer.getData('orderconfirmationanalysis'));
|
|
26608
26668
|
this._purchaseConfirmationService.linkAnalysisToTransactionLine(this.transactionLine, droppedData);
|
|
26609
|
-
this.
|
|
26669
|
+
this.detectChanges();
|
|
26610
26670
|
}
|
|
26611
26671
|
catch (e) {
|
|
26612
26672
|
}
|
|
@@ -36221,20 +36281,106 @@
|
|
|
36221
36281
|
},] }
|
|
36222
36282
|
];
|
|
36223
36283
|
|
|
36284
|
+
var LineSelectionService = /** @class */ (function () {
|
|
36285
|
+
function LineSelectionService(_transactionEventService, _transactionService) {
|
|
36286
|
+
var _this = this;
|
|
36287
|
+
this._transactionEventService = _transactionEventService;
|
|
36288
|
+
this._transactionService = _transactionService;
|
|
36289
|
+
this.selectedTransactionLineChanged = new rxjs.BehaviorSubject(undefined);
|
|
36290
|
+
this._subs = [];
|
|
36291
|
+
this._selectedLineUuidsForDelivery = [];
|
|
36292
|
+
this._selectedLineUuidsForInvoice = [];
|
|
36293
|
+
this._selectedTransactionLine = new transactionLineInfo_bo.TransactionLineInfo();
|
|
36294
|
+
this._subs.push(this._transactionEventService.transactionLineChanged.subscribe(function (line) {
|
|
36295
|
+
if (_this.selectedTransactionLine && line.lineNr === _this.selectedTransactionLine.lineNr) {
|
|
36296
|
+
_this.selectedTransactionLine = line;
|
|
36297
|
+
}
|
|
36298
|
+
}), this._transactionEventService.lineSelectedForDelivery.subscribe(function (data) {
|
|
36299
|
+
if (_this._checkAllLinesSelectedForDelivery(data)) {
|
|
36300
|
+
_this._selectedLineUuidsForDelivery.length = 0;
|
|
36301
|
+
_this._transactionEventService.allLinesSelectedForDelivery.next();
|
|
36302
|
+
}
|
|
36303
|
+
}), this._transactionEventService.lineSelectedForInvoice.subscribe(function (data) {
|
|
36304
|
+
if (_this._checkAllLinesSelectedForInvoice(data)) {
|
|
36305
|
+
_this._selectedLineUuidsForInvoice.length = 0;
|
|
36306
|
+
_this._transactionEventService.allLinesSelectedForInvoice.next();
|
|
36307
|
+
}
|
|
36308
|
+
}));
|
|
36309
|
+
}
|
|
36310
|
+
Object.defineProperty(LineSelectionService.prototype, "selectedTransactionLine", {
|
|
36311
|
+
get: function () {
|
|
36312
|
+
return this._selectedTransactionLine;
|
|
36313
|
+
},
|
|
36314
|
+
set: function (value) {
|
|
36315
|
+
this._selectedTransactionLine = value;
|
|
36316
|
+
this.selectedTransactionLineChanged.next(this._selectedTransactionLine);
|
|
36317
|
+
},
|
|
36318
|
+
enumerable: false,
|
|
36319
|
+
configurable: true
|
|
36320
|
+
});
|
|
36321
|
+
LineSelectionService.prototype.ngOnDestroy = function () {
|
|
36322
|
+
this._subs.forEach(function (s) { return s.unsubscribe(); });
|
|
36323
|
+
};
|
|
36324
|
+
LineSelectionService.prototype._checkAllLinesSelectedForDelivery = function (data) {
|
|
36325
|
+
var _this = this;
|
|
36326
|
+
if (data && data.lineUuid) {
|
|
36327
|
+
if (!data.selected) {
|
|
36328
|
+
return true;
|
|
36329
|
+
}
|
|
36330
|
+
this._selectedLineUuidsForDelivery.push(data.lineUuid);
|
|
36331
|
+
var transactionLinesForDelivery = this._transactionService.currentTransaction.transactionLines.filter(function (l) { return l.articleLineStatus && l.articleLineStatus.quantityToDeliver !== 0; });
|
|
36332
|
+
if (this._transactionService.currentTransaction.deliveryCostLines) {
|
|
36333
|
+
transactionLinesForDelivery = transactionLinesForDelivery.concat(this._transactionService.currentTransaction.deliveryCostLines);
|
|
36334
|
+
}
|
|
36335
|
+
var notFound = transactionLinesForDelivery.filter(function (l) { return _this._selectedLineUuidsForDelivery.indexOf(l.uuid) < 0; });
|
|
36336
|
+
return notFound.length === 0;
|
|
36337
|
+
}
|
|
36338
|
+
return false;
|
|
36339
|
+
};
|
|
36340
|
+
LineSelectionService.prototype._checkAllLinesSelectedForInvoice = function (data) {
|
|
36341
|
+
var _this = this;
|
|
36342
|
+
if (data && data.lineUuid) {
|
|
36343
|
+
if (!data.selected) {
|
|
36344
|
+
return true;
|
|
36345
|
+
}
|
|
36346
|
+
this._selectedLineUuidsForInvoice.push(data.lineUuid);
|
|
36347
|
+
var transactionLinesForInvoice = this._transactionService.currentTransaction.transactionLines.filter(function (l) { return l.articleLineStatus && l.articleLineStatus.quantityToInvoice !== 0; });
|
|
36348
|
+
if (this._transactionService.currentTransaction.deliveryCostLines) {
|
|
36349
|
+
transactionLinesForInvoice = transactionLinesForInvoice.concat(this._transactionService.currentTransaction.deliveryCostLines);
|
|
36350
|
+
}
|
|
36351
|
+
var notFound = transactionLinesForInvoice.filter(function (l) { return _this._selectedLineUuidsForInvoice.indexOf(l.uuid) < 0; });
|
|
36352
|
+
return notFound.length === 0;
|
|
36353
|
+
}
|
|
36354
|
+
return false;
|
|
36355
|
+
};
|
|
36356
|
+
return LineSelectionService;
|
|
36357
|
+
}());
|
|
36358
|
+
LineSelectionService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function LineSelectionService_Factory() { return new LineSelectionService(i0__namespace.ɵɵinject(TransactionEventService), i0__namespace.ɵɵinject(TransactionService)); }, token: LineSelectionService, providedIn: "root" });
|
|
36359
|
+
LineSelectionService.decorators = [
|
|
36360
|
+
{ type: i0.Injectable, args: [{
|
|
36361
|
+
providedIn: 'root'
|
|
36362
|
+
},] }
|
|
36363
|
+
];
|
|
36364
|
+
LineSelectionService.ctorParameters = function () { return [
|
|
36365
|
+
{ type: TransactionEventService },
|
|
36366
|
+
{ type: TransactionService }
|
|
36367
|
+
]; };
|
|
36368
|
+
|
|
36224
36369
|
var TransactionLineSidePanelComponent = /** @class */ (function () {
|
|
36225
|
-
function TransactionLineSidePanelComponent(_service, _transactionHeaderService, _transactionLineService, _transactionEventService, _transactionMappingService, _purchaseConfirmationService) {
|
|
36370
|
+
function TransactionLineSidePanelComponent(_service, _transactionHeaderService, _transactionLineService, _transactionEventService, _transactionMappingService, _purchaseConfirmationService, _lineSelectionService, _changeDetector) {
|
|
36226
36371
|
this._service = _service;
|
|
36227
36372
|
this._transactionHeaderService = _transactionHeaderService;
|
|
36228
36373
|
this._transactionLineService = _transactionLineService;
|
|
36229
36374
|
this._transactionEventService = _transactionEventService;
|
|
36230
36375
|
this._transactionMappingService = _transactionMappingService;
|
|
36231
36376
|
this._purchaseConfirmationService = _purchaseConfirmationService;
|
|
36377
|
+
this._lineSelectionService = _lineSelectionService;
|
|
36378
|
+
this._changeDetector = _changeDetector;
|
|
36232
36379
|
this.icons = Icon;
|
|
36233
36380
|
this.categories = TransactionTypeCategory;
|
|
36234
36381
|
this.transactionTypes = transactionKind_enum.TransactionKind;
|
|
36235
36382
|
this.TransactionTypeCategory = TransactionTypeCategory;
|
|
36236
36383
|
this.wide = false;
|
|
36237
|
-
this.transactionLine = new transactionLineInfo_bo.TransactionLineInfo();
|
|
36238
36384
|
this.cancelClick = new i0.EventEmitter();
|
|
36239
36385
|
this._subs = [];
|
|
36240
36386
|
}
|
|
@@ -36257,10 +36403,14 @@
|
|
|
36257
36403
|
});
|
|
36258
36404
|
TransactionLineSidePanelComponent.prototype.ngOnInit = function () {
|
|
36259
36405
|
var _this = this;
|
|
36260
|
-
this._transactionLineService.transactionLine = this.transactionLine;
|
|
36261
36406
|
this.activeCategoryButton = this._transactionMappingService.getButtonBar(this._transactionHeaderService.transactionKind)
|
|
36262
36407
|
.find(function (button) { return button.category === _this.activeCategory; });
|
|
36263
|
-
this._subs.push(this.
|
|
36408
|
+
this._subs.push(this._lineSelectionService.selectedTransactionLineChanged.subscribe(function (line) {
|
|
36409
|
+
if (line) {
|
|
36410
|
+
_this._transactionLineService.transactionLine = line;
|
|
36411
|
+
_this._changeDetector.detectChanges();
|
|
36412
|
+
}
|
|
36413
|
+
}), this._purchaseConfirmationService.ordersTotalObservable.subscribe(function (value) {
|
|
36264
36414
|
_this.ordersTotal = value;
|
|
36265
36415
|
}));
|
|
36266
36416
|
};
|
|
@@ -36277,7 +36427,7 @@
|
|
|
36277
36427
|
TransactionLineSidePanelComponent.decorators = [
|
|
36278
36428
|
{ type: i0.Component, args: [{
|
|
36279
36429
|
selector: "co-transaction-line-side-panel",
|
|
36280
|
-
template: "\n <div class=\"transaction-line-side-panel-wrapper\" [class.wide]=\"wide\" @showHideSidePanel>\n <icon (click)=\"cancelClick.emit($event)\" [icon]=\"icons.Crossskinny\" class=\"side-panel close-button\"></icon>\n <div class=\"transaction-line-side-panel-header\">\n <icon [icon]=\"activeCategoryButton?.icon\"></icon>\n <span [textContent]=\"activeCategoryButton?.title | localize\"></span>\n </div>\n <div class=\"transaction-line-side-panel-nav-bar\">\n <co-transaction-button-bar\n [sidePanel]=\"true\"\n [selectedCategory]=\"activeCategory\"\n (buttonClicked)=\"updateActiveCategory($event)\"\n ></co-transaction-button-bar>\n </div>\n <div class=\"total-amount\" *ngIf=\"activeCategory === TransactionTypeCategory.PurchaseOrderOrderConfirmation\">\n <span>Totaal excl. BTW</span>\n <span [textContent]=\"ordersTotal | coCurrency\"></span>\n </div>\n <div class=\"transaction-line-side-panel-content co-small-scrollbar\">\n <ng-container [ngSwitch]=\"transactionInfo.transactionKind\">\n <ng-container *ngSwitchCase=\"transactionTypes.PurchaseOrder\">\n <co-transaction-line-side-panel-purchase
|
|
36430
|
+
template: "\n <div class=\"transaction-line-side-panel-wrapper\" [class.wide]=\"wide\" @showHideSidePanel>\n <icon (click)=\"cancelClick.emit($event)\" [icon]=\"icons.Crossskinny\" class=\"side-panel close-button\"></icon>\n <div class=\"transaction-line-side-panel-header\">\n <icon [icon]=\"activeCategoryButton?.icon\"></icon>\n <span [textContent]=\"activeCategoryButton?.title | localize\"></span>\n </div>\n <div class=\"transaction-line-side-panel-nav-bar\">\n <co-transaction-button-bar\n [sidePanel]=\"true\"\n [selectedCategory]=\"activeCategory\"\n (buttonClicked)=\"updateActiveCategory($event)\"\n ></co-transaction-button-bar>\n </div>\n <div class=\"total-amount\" *ngIf=\"activeCategory === TransactionTypeCategory.PurchaseOrderOrderConfirmation\">\n <span>Totaal excl. BTW</span>\n <span [textContent]=\"ordersTotal | coCurrency\"></span>\n </div>\n <div class=\"transaction-line-side-panel-content co-small-scrollbar\">\n <ng-container [ngSwitch]=\"transactionInfo.transactionKind\">\n <ng-container *ngSwitchCase=\"transactionTypes.PurchaseOrder\">\n <co-transaction-line-side-panel-purchase [categoryType]=\"activeCategory\"></co-transaction-line-side-panel-purchase>\n </ng-container>\n <ng-container *ngSwitchCase=\"transactionTypes.SalesOrder\">\n <co-transaction-line-side-panel-sales [categoryType]=\"activeCategory\"></co-transaction-line-side-panel-sales>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <co-transaction-line-side-panel-purchase [categoryType]=\"activeCategory\"></co-transaction-line-side-panel-purchase>\n </ng-container>\n </ng-container>\n </div>\n </div>\n ",
|
|
36281
36431
|
providers: [
|
|
36282
36432
|
TransactionLineService
|
|
36283
36433
|
],
|
|
@@ -36297,12 +36447,13 @@
|
|
|
36297
36447
|
{ type: TransactionLineService },
|
|
36298
36448
|
{ type: TransactionEventService },
|
|
36299
36449
|
{ type: TransactionMappingService },
|
|
36300
|
-
{ type: PurchaseConfirmationService }
|
|
36450
|
+
{ type: PurchaseConfirmationService },
|
|
36451
|
+
{ type: LineSelectionService },
|
|
36452
|
+
{ type: i0.ChangeDetectorRef }
|
|
36301
36453
|
]; };
|
|
36302
36454
|
TransactionLineSidePanelComponent.propDecorators = {
|
|
36303
36455
|
wide: [{ type: i0.Input }],
|
|
36304
36456
|
activeCategory: [{ type: i0.Input }],
|
|
36305
|
-
transactionLine: [{ type: i0.Input }],
|
|
36306
36457
|
cancelClick: [{ type: i0.Output }],
|
|
36307
36458
|
showClass: [{ type: i0.HostBinding, args: ["class.co-transaction-line-side-panel",] }]
|
|
36308
36459
|
};
|
|
@@ -37133,46 +37284,23 @@
|
|
|
37133
37284
|
];
|
|
37134
37285
|
|
|
37135
37286
|
var TransactionLineSidePanelPurchaseComponent = /** @class */ (function () {
|
|
37136
|
-
function TransactionLineSidePanelPurchaseComponent(
|
|
37137
|
-
this._service = _service;
|
|
37138
|
-
this._transactionEventService = _transactionEventService;
|
|
37287
|
+
function TransactionLineSidePanelPurchaseComponent() {
|
|
37139
37288
|
this.categories = TransactionTypeCategory;
|
|
37140
|
-
this.transactionInfo = new transactionInfo_bo.TransactionInfo();
|
|
37141
|
-
this.transactionLine = new transactionLineInfo_bo.TransactionLineInfo();
|
|
37142
|
-
this.quantityToReceiveChange = new i0.EventEmitter();
|
|
37143
|
-
this.goodsReceiptStatus = new goodsReceiptHistory_bo.GoodsReceiptHistory();
|
|
37144
|
-
this.selectedLineDocBatchArray = new docDeliveryBatch_bo.DocDeliveryBatch();
|
|
37145
|
-
this.isDocBatchSaved = false;
|
|
37146
|
-
this.editingMode = false;
|
|
37147
37289
|
}
|
|
37148
37290
|
TransactionLineSidePanelPurchaseComponent.prototype.showClass = function () {
|
|
37149
37291
|
return true;
|
|
37150
37292
|
};
|
|
37151
|
-
TransactionLineSidePanelPurchaseComponent.prototype.fillInputOnClick = function (data) {
|
|
37152
|
-
this.selectedLineDocBatchArray = data;
|
|
37153
|
-
this.editingMode = true;
|
|
37154
|
-
};
|
|
37155
|
-
TransactionLineSidePanelPurchaseComponent.prototype.docBatchSaved = function (data) {
|
|
37156
|
-
this.isDocBatchSaved = data;
|
|
37157
|
-
};
|
|
37158
37293
|
return TransactionLineSidePanelPurchaseComponent;
|
|
37159
37294
|
}());
|
|
37160
37295
|
TransactionLineSidePanelPurchaseComponent.decorators = [
|
|
37161
37296
|
{ type: i0.Component, args: [{
|
|
37162
37297
|
selector: "co-transaction-line-side-panel-purchase",
|
|
37163
|
-
template: "\n <ng-container [ngSwitch]=\"categoryType\">\n <ng-container *ngSwitchCase=\"categories.PurchaseOrderOrderConfirmation\">\n <co-transaction-line-purchase-confirmation
|
|
37298
|
+
template: "\n <ng-container [ngSwitch]=\"categoryType\">\n <ng-container *ngSwitchCase=\"categories.PurchaseOrderOrderConfirmation\">\n <co-transaction-line-purchase-confirmation></co-transaction-line-purchase-confirmation>\n </ng-container>\n <ng-container *ngSwitchCase=\"categories.PurchaseOrderReceivedGoods\">\n <co-transaction-line-purchase-receive-goods></co-transaction-line-purchase-receive-goods>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <co-transaction-line-side-panel-default></co-transaction-line-side-panel-default>\n </ng-container>\n </ng-container>\n ",
|
|
37164
37299
|
encapsulation: i0.ViewEncapsulation.None
|
|
37165
37300
|
},] }
|
|
37166
37301
|
];
|
|
37167
|
-
TransactionLineSidePanelPurchaseComponent.ctorParameters = function () { return [
|
|
37168
|
-
{ type: TransactionService },
|
|
37169
|
-
{ type: TransactionEventService }
|
|
37170
|
-
]; };
|
|
37171
37302
|
TransactionLineSidePanelPurchaseComponent.propDecorators = {
|
|
37172
|
-
transactionInfo: [{ type: i0.Input }],
|
|
37173
|
-
transactionLine: [{ type: i0.Input }],
|
|
37174
37303
|
categoryType: [{ type: i0.Input }],
|
|
37175
|
-
quantityToReceiveChange: [{ type: i0.Output }],
|
|
37176
37304
|
showClass: [{ type: i0.HostBinding, args: ["class.co-transaction-line-side-panel-purchase",] }]
|
|
37177
37305
|
};
|
|
37178
37306
|
|
|
@@ -37511,35 +37639,41 @@
|
|
|
37511
37639
|
},] }
|
|
37512
37640
|
];
|
|
37513
37641
|
|
|
37514
|
-
var TransactionLinePurchaseConfirmationComponent = /** @class */ (function () {
|
|
37515
|
-
|
|
37516
|
-
|
|
37517
|
-
this
|
|
37518
|
-
|
|
37519
|
-
|
|
37520
|
-
|
|
37521
|
-
|
|
37522
|
-
|
|
37523
|
-
|
|
37524
|
-
|
|
37525
|
-
|
|
37526
|
-
|
|
37527
|
-
|
|
37528
|
-
|
|
37529
|
-
|
|
37530
|
-
|
|
37642
|
+
var TransactionLinePurchaseConfirmationComponent = /** @class */ (function (_super) {
|
|
37643
|
+
__extends(TransactionLinePurchaseConfirmationComponent, _super);
|
|
37644
|
+
function TransactionLinePurchaseConfirmationComponent(transactionHeaderService, transactionLineService, transactionEventService, service, iconCacheService, transactionScreenConfigurationService, purchaseConfirmationService, dictionaryService, imageService, changeDetector) {
|
|
37645
|
+
var _this = _super.call(this, transactionHeaderService, transactionLineService, transactionEventService, iconCacheService, transactionScreenConfigurationService, imageService, dictionaryService, service, changeDetector) || this;
|
|
37646
|
+
_this.transactionHeaderService = transactionHeaderService;
|
|
37647
|
+
_this.transactionLineService = transactionLineService;
|
|
37648
|
+
_this.transactionEventService = transactionEventService;
|
|
37649
|
+
_this.service = service;
|
|
37650
|
+
_this.iconCacheService = iconCacheService;
|
|
37651
|
+
_this.transactionScreenConfigurationService = transactionScreenConfigurationService;
|
|
37652
|
+
_this.purchaseConfirmationService = purchaseConfirmationService;
|
|
37653
|
+
_this.dictionaryService = dictionaryService;
|
|
37654
|
+
_this.imageService = imageService;
|
|
37655
|
+
_this.changeDetector = changeDetector;
|
|
37656
|
+
_this.icons = Icon;
|
|
37657
|
+
_this.transactionTypeCategory = TransactionTypeCategory;
|
|
37658
|
+
_this.docDeliveryBatch = new docDeliveryBatch_bo.DocDeliveryBatch();
|
|
37659
|
+
_this.filteredDocBatchArray = [];
|
|
37660
|
+
_this.maxDocAmount = 0;
|
|
37661
|
+
_this.showPurchaseConfirmationAI = false;
|
|
37662
|
+
_this.confirmingOrder = false;
|
|
37663
|
+
_this._subs = [];
|
|
37664
|
+
return _this;
|
|
37531
37665
|
}
|
|
37532
37666
|
TransactionLinePurchaseConfirmationComponent.prototype.showClass = function () {
|
|
37533
37667
|
return true;
|
|
37534
37668
|
};
|
|
37535
37669
|
TransactionLinePurchaseConfirmationComponent.prototype.ngOnInit = function () {
|
|
37536
37670
|
var _this = this;
|
|
37537
|
-
|
|
37671
|
+
_super.prototype.ngOnInit.call(this);
|
|
37672
|
+
this._subs.push(this.transactionEventService.transactionLineChanged.subscribe(function (line) {
|
|
37538
37673
|
if (line.lineNr === _this.transactionLine.lineNr) {
|
|
37539
|
-
_this.transactionLine = line;
|
|
37540
37674
|
_this._updateBatchArray();
|
|
37541
37675
|
}
|
|
37542
|
-
}), this.
|
|
37676
|
+
}), this.transactionEventService.orderConfirmationReset.subscribe(function () {
|
|
37543
37677
|
_this.showPurchaseConfirmationAI = false;
|
|
37544
37678
|
}), this.purchaseConfirmationService.confirmationNeeded.subscribe(function (needed) {
|
|
37545
37679
|
_this.showPurchaseConfirmationAI = needed;
|
|
@@ -37549,6 +37683,7 @@
|
|
|
37549
37683
|
};
|
|
37550
37684
|
TransactionLinePurchaseConfirmationComponent.prototype.ngOnDestroy = function () {
|
|
37551
37685
|
this._subs.forEach(function (s) { return s.unsubscribe(); });
|
|
37686
|
+
_super.prototype.ngOnDestroy.call(this);
|
|
37552
37687
|
};
|
|
37553
37688
|
TransactionLinePurchaseConfirmationComponent.prototype.handleSaveDetailsEdit = function () {
|
|
37554
37689
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -37572,7 +37707,7 @@
|
|
|
37572
37707
|
this.transactionLine.purchasePortalLine.docBatchArray.push(this.docDeliveryBatch);
|
|
37573
37708
|
}
|
|
37574
37709
|
this.transactionLine.purchasePortalLine.docKind = 'IB';
|
|
37575
|
-
return [4 /*yield*/, this.
|
|
37710
|
+
return [4 /*yield*/, this.transactionService.updatePurchasePortalLines(this.transactionInfo.id, this.transactionInfo.version, this.transactionLine.purchasePortalLine)];
|
|
37576
37711
|
case 1:
|
|
37577
37712
|
success = _a.sent();
|
|
37578
37713
|
if (success) {
|
|
@@ -37594,7 +37729,7 @@
|
|
|
37594
37729
|
case 0:
|
|
37595
37730
|
row.deleteLine = 'T';
|
|
37596
37731
|
this.transactionLine.purchasePortalLine.docKind = 'IB';
|
|
37597
|
-
return [4 /*yield*/, this.
|
|
37732
|
+
return [4 /*yield*/, this.transactionService.updatePurchasePortalLines(this.transactionInfo.id, this.transactionInfo.version, this.transactionLine.purchasePortalLine)];
|
|
37598
37733
|
case 1:
|
|
37599
37734
|
success = _a.sent();
|
|
37600
37735
|
if (success) {
|
|
@@ -37616,7 +37751,12 @@
|
|
|
37616
37751
|
TransactionLinePurchaseConfirmationComponent.prototype.handleDeliveryBatchChange = function () {
|
|
37617
37752
|
this._setMaxDocAmount();
|
|
37618
37753
|
};
|
|
37754
|
+
TransactionLinePurchaseConfirmationComponent.prototype.transactionLineSet = function () {
|
|
37755
|
+
_super.prototype.transactionLineSet.call(this);
|
|
37756
|
+
this._updateBatchArray();
|
|
37757
|
+
};
|
|
37619
37758
|
TransactionLinePurchaseConfirmationComponent.prototype._updateBatchArray = function () {
|
|
37759
|
+
this._initNewDocDeliveryBatch();
|
|
37620
37760
|
this.filteredDocBatchArray = this.transactionLine.purchasePortalLine.docBatchArray.filter(function (value) { return value.historical.toLowerCase() === 'h' && value.docAmount >= 0; });
|
|
37621
37761
|
this._setMaxDocAmount();
|
|
37622
37762
|
};
|
|
@@ -37650,12 +37790,12 @@
|
|
|
37650
37790
|
.forEach((function (d) {
|
|
37651
37791
|
alreadyConfirmed = alreadyConfirmed + d.docAmount;
|
|
37652
37792
|
}));
|
|
37653
|
-
this.docDeliveryBatch.docAmount = this.transactionLine.amount - alreadyConfirmed;
|
|
37654
|
-
this.docDeliveryBatch.confirmedPrice = +this.transactionLine.purchasePortalLine.netOrderPrice;
|
|
37793
|
+
this.docDeliveryBatch.docAmount = (this.transactionLine.amount !== undefined ? this.transactionLine.amount : 0) - alreadyConfirmed;
|
|
37794
|
+
this.docDeliveryBatch.confirmedPrice = this.transactionLine.purchasePortalLine.netOrderPrice ? +this.transactionLine.purchasePortalLine.netOrderPrice : 0;
|
|
37655
37795
|
this._setMaxDocAmount();
|
|
37656
37796
|
};
|
|
37657
37797
|
return TransactionLinePurchaseConfirmationComponent;
|
|
37658
|
-
}());
|
|
37798
|
+
}(TransactionLineBaseComponent));
|
|
37659
37799
|
TransactionLinePurchaseConfirmationComponent.decorators = [
|
|
37660
37800
|
{ type: i0.Component, args: [{
|
|
37661
37801
|
selector: 'co-transaction-line-purchase-confirmation',
|
|
@@ -37668,14 +37808,17 @@
|
|
|
37668
37808
|
];
|
|
37669
37809
|
TransactionLinePurchaseConfirmationComponent.ctorParameters = function () { return [
|
|
37670
37810
|
{ type: TransactionHeaderService },
|
|
37811
|
+
{ type: TransactionLineService },
|
|
37812
|
+
{ type: TransactionEventService },
|
|
37813
|
+
{ type: TransactionService },
|
|
37671
37814
|
{ type: IconCacheService },
|
|
37815
|
+
{ type: TransactionScreenConfigurationService },
|
|
37672
37816
|
{ type: PurchaseConfirmationService },
|
|
37673
|
-
{ type:
|
|
37674
|
-
{ type:
|
|
37817
|
+
{ type: DictionaryService },
|
|
37818
|
+
{ type: TransactionImageService },
|
|
37819
|
+
{ type: i0.ChangeDetectorRef }
|
|
37675
37820
|
]; };
|
|
37676
37821
|
TransactionLinePurchaseConfirmationComponent.propDecorators = {
|
|
37677
|
-
transactionInfo: [{ type: i0.Input }],
|
|
37678
|
-
transactionLine: [{ type: i0.Input }],
|
|
37679
37822
|
showClass: [{ type: i0.HostBinding, args: ['class.co-transaction-line-purchase-confirmation',] }]
|
|
37680
37823
|
};
|
|
37681
37824
|
|
|
@@ -37831,8 +37974,8 @@
|
|
|
37831
37974
|
];
|
|
37832
37975
|
|
|
37833
37976
|
var TransactionLinesPopupComponent = /** @class */ (function () {
|
|
37834
|
-
function TransactionLinesPopupComponent() {
|
|
37835
|
-
this.
|
|
37977
|
+
function TransactionLinesPopupComponent(purchaseConfirmationService) {
|
|
37978
|
+
this.purchaseConfirmationService = purchaseConfirmationService;
|
|
37836
37979
|
this.clickOutside = new i0.EventEmitter();
|
|
37837
37980
|
this.transactionLineClick = new i0.EventEmitter();
|
|
37838
37981
|
}
|
|
@@ -37844,12 +37987,14 @@
|
|
|
37844
37987
|
TransactionLinesPopupComponent.decorators = [
|
|
37845
37988
|
{ type: i0.Component, args: [{
|
|
37846
37989
|
selector: 'co-transaction-lines-popup',
|
|
37847
|
-
template: "\n <div class=\"purchase-confirmation-transaction-lines-popup\" clickOutside\n [overlay]=\"parentForOverlay\"\n [rightAlign]=\"true\"\n (clickOutside)=\"clickOutside.emit()\">\n <table>\n <tr>\n <th class=\"line-nr right-align\" [textContent]=\"'LINE_NR' | localize\"></th>\n <th class=\"article-nr\" [textContent]=\"'ARTICLE_NR' | localize\"></th>\n <th class=\"article-nr\" [textContent]=\"'DESCRIPTION' | localize\"></th>\n <th class=\"amount right-align\" [textContent]=\"'AMOUNT' | localize\"></th>\n <th class=\"price right-align\" [textContent]=\"'PRICE' | localize\"></th>\n </tr>\n <tr class=\"transaction-line\" *ngFor=\"let
|
|
37990
|
+
template: "\n <div class=\"purchase-confirmation-transaction-lines-popup\" clickOutside\n [overlay]=\"parentForOverlay\"\n [rightAlign]=\"true\"\n (clickOutside)=\"clickOutside.emit()\">\n <table>\n <tr>\n <th class=\"color\"></th>\n <th class=\"line-nr right-align\" [textContent]=\"'LINE_NR' | localize\"></th>\n <th class=\"article-nr\" [textContent]=\"'ARTICLE_NR' | localize\"></th>\n <th class=\"article-nr\" [textContent]=\"'DESCRIPTION' | localize\"></th>\n <th class=\"amount right-align\" [textContent]=\"'AMOUNT' | localize\"></th>\n <th class=\"price right-align\" [textContent]=\"'PRICE' | localize\"></th>\n </tr>\n <tr class=\"transaction-line\" *ngFor=\"let viewModel of purchaseConfirmationService.transactionLinesViewModels\" (click)=\"transactionLineClick.emit(viewModel.line)\">\n <td class=\"color\" [style.background-color]=\"viewModel.color\"></td>\n <td class=\"right-align\" [textContent]=\"viewModel.line.lineNr\"></td>\n <td [textContent]=\"viewModel.line.articleNumber\"></td>\n <td [textContent]=\"viewModel.line.goodDescription\"></td>\n <td class=\"right-align\" [textContent]=\"viewModel.line.amount\"></td>\n <td class=\"right-align\" [textContent]=\"viewModel.line.price | coCurrency: true\"></td>\n </tr>\n </table>\n </div>\n ",
|
|
37848
37991
|
encapsulation: i0.ViewEncapsulation.None
|
|
37849
37992
|
},] }
|
|
37850
37993
|
];
|
|
37994
|
+
TransactionLinesPopupComponent.ctorParameters = function () { return [
|
|
37995
|
+
{ type: PurchaseConfirmationService }
|
|
37996
|
+
]; };
|
|
37851
37997
|
TransactionLinesPopupComponent.propDecorators = {
|
|
37852
|
-
transactionLines: [{ type: i0.Input }],
|
|
37853
37998
|
parentForOverlay: [{ type: i0.Input }],
|
|
37854
37999
|
clickOutside: [{ type: i0.Output }],
|
|
37855
38000
|
transactionLineClick: [{ type: i0.Output }],
|
|
@@ -37883,6 +38028,13 @@
|
|
|
37883
38028
|
this._transaction = value;
|
|
37884
38029
|
if (this._transaction && this._transaction.transactionLines) {
|
|
37885
38030
|
this.transactionLines = this._transaction.transactionLines.filter(function (tl) { return tl.isArticle; });
|
|
38031
|
+
// create the list of transaction lines without a reference to the original ones
|
|
38032
|
+
this._purchaseConfirmationService.transactionLines.length = 0;
|
|
38033
|
+
var transLines_1 = [];
|
|
38034
|
+
this.transactionLines.forEach(function (t) {
|
|
38035
|
+
transLines_1.push(Object.assign(new transactionLineInfo_bo.TransactionLineInfo(), t));
|
|
38036
|
+
});
|
|
38037
|
+
this._purchaseConfirmationService.transactionLines = transLines_1;
|
|
37886
38038
|
}
|
|
37887
38039
|
},
|
|
37888
38040
|
enumerable: false,
|
|
@@ -37943,7 +38095,7 @@
|
|
|
37943
38095
|
var _this = this;
|
|
37944
38096
|
if (confirmationVM && confirmationVM.confirmation) {
|
|
37945
38097
|
this.currentConfirmationViewModel = confirmationVM;
|
|
37946
|
-
this._popupComponentRef = this._overlayService.createComponent(TransactionLinesPopupComponent, { parentForOverlay: element
|
|
38098
|
+
this._popupComponentRef = this._overlayService.createComponent(TransactionLinesPopupComponent, { parentForOverlay: element }, {
|
|
37947
38099
|
transactionLineClick: function (line) { return _this._handleTransactionLineClick(line, _this.currentConfirmationViewModel.confirmation); },
|
|
37948
38100
|
clickOutside: function () { return _this.hidePopup(); }
|
|
37949
38101
|
});
|
|
@@ -45775,8 +45927,18 @@
|
|
|
45775
45927
|
|
|
45776
45928
|
var TransactionLinesBaseComponent = /** @class */ (function (_super) {
|
|
45777
45929
|
__extends(TransactionLinesBaseComponent, _super);
|
|
45778
|
-
function TransactionLinesBaseComponent() {
|
|
45779
|
-
var _this = _super.
|
|
45930
|
+
function TransactionLinesBaseComponent(transactionHeaderService, transactionEventService, service, iconCacheService, transactionScreenConfigurationService, dictionaryService, imageService, changeDetector, purchaseConfirmationService, lineSelectionService) {
|
|
45931
|
+
var _this = _super.call(this, transactionHeaderService, transactionEventService, iconCacheService, transactionScreenConfigurationService, imageService, dictionaryService, service, changeDetector) || this;
|
|
45932
|
+
_this.transactionHeaderService = transactionHeaderService;
|
|
45933
|
+
_this.transactionEventService = transactionEventService;
|
|
45934
|
+
_this.service = service;
|
|
45935
|
+
_this.iconCacheService = iconCacheService;
|
|
45936
|
+
_this.transactionScreenConfigurationService = transactionScreenConfigurationService;
|
|
45937
|
+
_this.dictionaryService = dictionaryService;
|
|
45938
|
+
_this.imageService = imageService;
|
|
45939
|
+
_this.changeDetector = changeDetector;
|
|
45940
|
+
_this.purchaseConfirmationService = purchaseConfirmationService;
|
|
45941
|
+
_this.lineSelectionService = lineSelectionService;
|
|
45780
45942
|
_this.icons = Icon;
|
|
45781
45943
|
_this.category = TransactionTypeCategory;
|
|
45782
45944
|
_this.saveTransactionLine = new i0.EventEmitter();
|
|
@@ -45800,6 +45962,16 @@
|
|
|
45800
45962
|
enumerable: false,
|
|
45801
45963
|
configurable: true
|
|
45802
45964
|
});
|
|
45965
|
+
Object.defineProperty(TransactionLinesBaseComponent.prototype, "selectedTransactionLine", {
|
|
45966
|
+
get: function () {
|
|
45967
|
+
return this.lineSelectionService.selectedTransactionLine;
|
|
45968
|
+
},
|
|
45969
|
+
set: function (value) {
|
|
45970
|
+
this.lineSelectionService.selectedTransactionLine = value;
|
|
45971
|
+
},
|
|
45972
|
+
enumerable: false,
|
|
45973
|
+
configurable: true
|
|
45974
|
+
});
|
|
45803
45975
|
TransactionLinesBaseComponent.prototype.ngOnInit = function () {
|
|
45804
45976
|
var _this = this;
|
|
45805
45977
|
_super.prototype.ngOnInit.call(this);
|
|
@@ -45883,6 +46055,18 @@
|
|
|
45883
46055
|
TransactionLinesBaseComponent.decorators = [
|
|
45884
46056
|
{ type: i0.Directive }
|
|
45885
46057
|
];
|
|
46058
|
+
TransactionLinesBaseComponent.ctorParameters = function () { return [
|
|
46059
|
+
{ type: TransactionHeaderService },
|
|
46060
|
+
{ type: TransactionEventService },
|
|
46061
|
+
{ type: TransactionService },
|
|
46062
|
+
{ type: IconCacheService },
|
|
46063
|
+
{ type: TransactionScreenConfigurationService },
|
|
46064
|
+
{ type: DictionaryService },
|
|
46065
|
+
{ type: TransactionImageService },
|
|
46066
|
+
{ type: i0.ChangeDetectorRef },
|
|
46067
|
+
{ type: PurchaseConfirmationService },
|
|
46068
|
+
{ type: LineSelectionService }
|
|
46069
|
+
]; };
|
|
45886
46070
|
TransactionLinesBaseComponent.propDecorators = {
|
|
45887
46071
|
activeCategory: [{ type: i0.Input }],
|
|
45888
46072
|
saveTransactionLine: [{ type: i0.Output }]
|
|
@@ -45890,17 +46074,8 @@
|
|
|
45890
46074
|
|
|
45891
46075
|
var TransactionLinesComponent = /** @class */ (function (_super) {
|
|
45892
46076
|
__extends(TransactionLinesComponent, _super);
|
|
45893
|
-
function TransactionLinesComponent(
|
|
45894
|
-
var _this = _super.
|
|
45895
|
-
_this.transactionHeaderService = transactionHeaderService;
|
|
45896
|
-
_this.transactionEventService = transactionEventService;
|
|
45897
|
-
_this.service = service;
|
|
45898
|
-
_this.iconCacheService = iconCacheService;
|
|
45899
|
-
_this.transactionScreenConfigurationService = transactionScreenConfigurationService;
|
|
45900
|
-
_this.dictionaryService = dictionaryService;
|
|
45901
|
-
_this.imageService = imageService;
|
|
45902
|
-
_this.changeDetector = changeDetector;
|
|
45903
|
-
_this._purchaseConfirmationService = _purchaseConfirmationService;
|
|
46077
|
+
function TransactionLinesComponent() {
|
|
46078
|
+
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
45904
46079
|
_this.customerPortal = false;
|
|
45905
46080
|
_this.showSidePanel = false;
|
|
45906
46081
|
_this.showSidePanelForConfirmationAI = false;
|
|
@@ -45914,7 +46089,7 @@
|
|
|
45914
46089
|
TransactionLinesComponent.prototype.ngOnInit = function () {
|
|
45915
46090
|
var _this = this;
|
|
45916
46091
|
_super.prototype.ngOnInit.call(this);
|
|
45917
|
-
this._subs.push(this.
|
|
46092
|
+
this._subs.push(this.purchaseConfirmationService.confirmationNeeded.subscribe(function (needed) {
|
|
45918
46093
|
if (needed) {
|
|
45919
46094
|
_this.showSidePanelForConfirmationAI = true;
|
|
45920
46095
|
_this.showSidePanel = true;
|
|
@@ -45938,7 +46113,8 @@
|
|
|
45938
46113
|
};
|
|
45939
46114
|
TransactionLinesComponent.prototype._checkActiveLine = function () {
|
|
45940
46115
|
if (this.showSidePanelForConfirmationAI && this.transactionLines && this.transactionLines.length > 0) {
|
|
45941
|
-
this.activeTransactionLine = this.transactionLines[0];
|
|
46116
|
+
// this.activeTransactionLine = this.transactionLines[0];
|
|
46117
|
+
this.lineSelectionService.selectedTransactionLine = this.transactionLines[0];
|
|
45942
46118
|
}
|
|
45943
46119
|
};
|
|
45944
46120
|
return TransactionLinesComponent;
|
|
@@ -45946,22 +46122,11 @@
|
|
|
45946
46122
|
TransactionLinesComponent.decorators = [
|
|
45947
46123
|
{ type: i0.Component, args: [{
|
|
45948
46124
|
selector: "co-transaction-lines",
|
|
45949
|
-
template: "\n <div *ngIf=\"customerPortal\">\n <div class=\"draggable-transaction-line\" *ngFor=\"let line of (historicTransactionLines ? historicTransactionLines : transactionLines);\">\n <co-transaction-line\n [transactionLine]=\"line\"\n [activeCategory]=\"category.SalesCustomerPortal\"\n [preview]=\"preview\"\n [readonly]=\"historicTransactionLines !== null\"\n (waitingForUserAction)=\"userActionRequired = $event\"\n [class.customer-line]=\"customerPortal\"\n observeVisibility #observer=visibilityObserve (visibilityChange)=\"handleVisibilityChange(line, $event)\"\n ></co-transaction-line>\n </div>\n </div>\n\n <div *ngIf=\"!customerPortal\" #dropList cdkDropList cdkDropListOrientation=\"vertical\"\n class=\"transaction-lines-drag-drop-list\"\n [cdkDropListDisabled]=\"preview || userActionRequired\"\n [cdkDropListData]=\"transactionLines\"\n [cdkDropListEnterPredicate]=\"handleCanDragDrop\"\n (cdkDropListDropped)=\"handleDrop($event)\"\n (cdkDropListEntered)=\"handleDropListEntered($event)\"\n >\n <div class=\"draggable-transaction-line\" *ngFor=\"let line of (historicTransactionLines ? historicTransactionLines : transactionLines);let isFirst = first; trackBy:trackByFn;\" cdkDrag>\n <co-icon *ngIf=\"!preview\" class=\"transaction-line-drag-handle\"\n [class.show]=\"line === selectedTransactionLine && transactionLines.length > 1\" cdkDragHandle\n [iconData]=\"iconCacheService.getIcon(icons.GripDotsVerticalSolid)\">\n </co-icon>\n <co-transaction-line\n [draggedOver]=\"lineDraggedOver === line.lineNr\"\n [transactionLine]=\"line\"\n [activeCategory]=\"activeCategory\"\n [preview]=\"preview\"\n [isFirst]=\"isFirst\"\n [readonly]=\"historicTransactionLines !== null\"\n (waitingForUserAction)=\"userActionRequired = $event\"\n (click)=\"selectedTransactionLine = line\"\n (descriptionDblClick)=\"onDescriptionDblClick(line)\"\n observeVisibility #observer=visibilityObserve (visibilityChange)=\"handleVisibilityChange(line, $event)\"\n ></co-transaction-line>\n </div>\n <ng-container *ngIf=\"activeCategory === category.SalesOrderDeliveryNote || activeCategory === category.SalesOrderInvoice || activeCategory === category.SalesOrderPlanning\">\n <div class=\"draggable-transaction-line\" *ngFor=\"let line of deliveryCostLines; trackBy:trackByFn;\" cdkDrag>\n <co-icon *ngIf=\"!preview\" class=\"transaction-line-drag-handle\"\n [class.show]=\"line === selectedTransactionLine\" cdkDragHandle\n [iconData]=\"iconCacheService.getIcon(icons.GripDotsVerticalSolid)\">\n </co-icon>\n <co-transaction-line\n [transactionLine]=\"line\"\n [activeCategory]=\"activeCategory\"\n [preview]=\"preview\"\n [readonly]=\"historicTransactionLines !== null\"\n [isFirst]=\"isFirst\"\n (waitingForUserAction)=\"userActionRequired = $event\"\n (click)=\"selectedTransactionLine = line\"\n (descriptionDblClick)=\"onDescriptionDblClick(line)\"\n observeVisibility #observer=visibilityObserve (visibilityChange)=\"handleVisibilityChange(line, $event)\"\n ></co-transaction-line>\n </div>\n </ng-container>\n </div>\n <co-transaction-line-side-panel *ngIf=\"showSidePanel\"
|
|
46125
|
+
template: "\n <div *ngIf=\"customerPortal\">\n <div class=\"draggable-transaction-line\" *ngFor=\"let line of (historicTransactionLines ? historicTransactionLines : transactionLines);\">\n <co-transaction-line\n [transactionLine]=\"line\"\n [activeCategory]=\"category.SalesCustomerPortal\"\n [preview]=\"preview\"\n [readonly]=\"historicTransactionLines !== null\"\n (waitingForUserAction)=\"userActionRequired = $event\"\n [class.customer-line]=\"customerPortal\"\n observeVisibility #observer=visibilityObserve (visibilityChange)=\"handleVisibilityChange(line, $event)\"\n ></co-transaction-line>\n </div>\n </div>\n\n <div *ngIf=\"!customerPortal\" #dropList cdkDropList cdkDropListOrientation=\"vertical\"\n class=\"transaction-lines-drag-drop-list\"\n [cdkDropListDisabled]=\"preview || userActionRequired\"\n [cdkDropListData]=\"transactionLines\"\n [cdkDropListEnterPredicate]=\"handleCanDragDrop\"\n (cdkDropListDropped)=\"handleDrop($event)\"\n (cdkDropListEntered)=\"handleDropListEntered($event)\"\n >\n <div class=\"draggable-transaction-line\" *ngFor=\"let line of (historicTransactionLines ? historicTransactionLines : transactionLines);let isFirst = first; trackBy:trackByFn;\" cdkDrag>\n <co-icon *ngIf=\"!preview\" class=\"transaction-line-drag-handle\"\n [class.show]=\"line === selectedTransactionLine && transactionLines.length > 1\" cdkDragHandle\n [iconData]=\"iconCacheService.getIcon(icons.GripDotsVerticalSolid)\">\n </co-icon>\n <co-transaction-line\n [draggedOver]=\"lineDraggedOver === line.lineNr\"\n [transactionLine]=\"line\"\n [activeCategory]=\"activeCategory\"\n [preview]=\"preview\"\n [isFirst]=\"isFirst\"\n [readonly]=\"historicTransactionLines !== null\"\n (waitingForUserAction)=\"userActionRequired = $event\"\n (click)=\"selectedTransactionLine = line\"\n (descriptionDblClick)=\"onDescriptionDblClick(line)\"\n observeVisibility #observer=visibilityObserve (visibilityChange)=\"handleVisibilityChange(line, $event)\"\n ></co-transaction-line>\n </div>\n <ng-container *ngIf=\"activeCategory === category.SalesOrderDeliveryNote || activeCategory === category.SalesOrderInvoice || activeCategory === category.SalesOrderPlanning\">\n <div class=\"draggable-transaction-line\" *ngFor=\"let line of deliveryCostLines; trackBy:trackByFn;\" cdkDrag>\n <co-icon *ngIf=\"!preview\" class=\"transaction-line-drag-handle\"\n [class.show]=\"line === selectedTransactionLine\" cdkDragHandle\n [iconData]=\"iconCacheService.getIcon(icons.GripDotsVerticalSolid)\">\n </co-icon>\n <co-transaction-line\n [transactionLine]=\"line\"\n [activeCategory]=\"activeCategory\"\n [preview]=\"preview\"\n [readonly]=\"historicTransactionLines !== null\"\n [isFirst]=\"isFirst\"\n (waitingForUserAction)=\"userActionRequired = $event\"\n (click)=\"selectedTransactionLine = line\"\n (descriptionDblClick)=\"onDescriptionDblClick(line)\"\n observeVisibility #observer=visibilityObserve (visibilityChange)=\"handleVisibilityChange(line, $event)\"\n ></co-transaction-line>\n </div>\n </ng-container>\n </div>\n <co-transaction-line-side-panel *ngIf=\"showSidePanel\"\n [activeCategory]=\"activeCategory\"\n (cancelClick)=\"showSidePanel = false\">\n </co-transaction-line-side-panel>\n ",
|
|
45950
46126
|
encapsulation: i0.ViewEncapsulation.None,
|
|
45951
46127
|
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
45952
46128
|
},] }
|
|
45953
46129
|
];
|
|
45954
|
-
TransactionLinesComponent.ctorParameters = function () { return [
|
|
45955
|
-
{ type: TransactionHeaderService },
|
|
45956
|
-
{ type: TransactionEventService },
|
|
45957
|
-
{ type: TransactionService },
|
|
45958
|
-
{ type: IconCacheService },
|
|
45959
|
-
{ type: TransactionScreenConfigurationService },
|
|
45960
|
-
{ type: DictionaryService },
|
|
45961
|
-
{ type: TransactionImageService },
|
|
45962
|
-
{ type: i0.ChangeDetectorRef },
|
|
45963
|
-
{ type: PurchaseConfirmationService }
|
|
45964
|
-
]; };
|
|
45965
46130
|
TransactionLinesComponent.propDecorators = {
|
|
45966
46131
|
showClass: [{ type: i0.HostBinding, args: ["class.co-transaction-lines",] }],
|
|
45967
46132
|
customerPortal: [{ type: i0.Input }]
|
|
@@ -53375,74 +53540,6 @@
|
|
|
53375
53540
|
showClass: [{ type: i0.HostBinding, args: ['class.co-shopping-cart',] }]
|
|
53376
53541
|
};
|
|
53377
53542
|
|
|
53378
|
-
var LineSelectionService = /** @class */ (function () {
|
|
53379
|
-
function LineSelectionService(_transactionEventService, _transactionService) {
|
|
53380
|
-
var _this = this;
|
|
53381
|
-
this._transactionEventService = _transactionEventService;
|
|
53382
|
-
this._transactionService = _transactionService;
|
|
53383
|
-
this._subs = [];
|
|
53384
|
-
this._selectedLineUuidsForDelivery = [];
|
|
53385
|
-
this._selectedLineUuidsForInvoice = [];
|
|
53386
|
-
this._subs.push(this._transactionEventService.lineSelectedForDelivery.subscribe(function (data) {
|
|
53387
|
-
if (_this._checkAllLinesSelectedForDelivery(data)) {
|
|
53388
|
-
_this._selectedLineUuidsForDelivery.length = 0;
|
|
53389
|
-
_this._transactionEventService.allLinesSelectedForDelivery.next();
|
|
53390
|
-
}
|
|
53391
|
-
}), this._transactionEventService.lineSelectedForInvoice.subscribe(function (data) {
|
|
53392
|
-
if (_this._checkAllLinesSelectedForInvoice(data)) {
|
|
53393
|
-
_this._selectedLineUuidsForInvoice.length = 0;
|
|
53394
|
-
_this._transactionEventService.allLinesSelectedForInvoice.next();
|
|
53395
|
-
}
|
|
53396
|
-
}));
|
|
53397
|
-
}
|
|
53398
|
-
LineSelectionService.prototype.ngOnDestroy = function () {
|
|
53399
|
-
this._subs.forEach(function (s) { return s.unsubscribe(); });
|
|
53400
|
-
};
|
|
53401
|
-
LineSelectionService.prototype._checkAllLinesSelectedForDelivery = function (data) {
|
|
53402
|
-
var _this = this;
|
|
53403
|
-
if (data && data.lineUuid) {
|
|
53404
|
-
if (!data.selected) {
|
|
53405
|
-
return true;
|
|
53406
|
-
}
|
|
53407
|
-
this._selectedLineUuidsForDelivery.push(data.lineUuid);
|
|
53408
|
-
var transactionLinesForDelivery = this._transactionService.currentTransaction.transactionLines.filter(function (l) { return l.articleLineStatus && l.articleLineStatus.quantityToDeliver !== 0; });
|
|
53409
|
-
if (this._transactionService.currentTransaction.deliveryCostLines) {
|
|
53410
|
-
transactionLinesForDelivery = transactionLinesForDelivery.concat(this._transactionService.currentTransaction.deliveryCostLines);
|
|
53411
|
-
}
|
|
53412
|
-
var notFound = transactionLinesForDelivery.filter(function (l) { return _this._selectedLineUuidsForDelivery.indexOf(l.uuid) < 0; });
|
|
53413
|
-
return notFound.length === 0;
|
|
53414
|
-
}
|
|
53415
|
-
return false;
|
|
53416
|
-
};
|
|
53417
|
-
LineSelectionService.prototype._checkAllLinesSelectedForInvoice = function (data) {
|
|
53418
|
-
var _this = this;
|
|
53419
|
-
if (data && data.lineUuid) {
|
|
53420
|
-
if (!data.selected) {
|
|
53421
|
-
return true;
|
|
53422
|
-
}
|
|
53423
|
-
this._selectedLineUuidsForInvoice.push(data.lineUuid);
|
|
53424
|
-
var transactionLinesForInvoice = this._transactionService.currentTransaction.transactionLines.filter(function (l) { return l.articleLineStatus && l.articleLineStatus.quantityToInvoice !== 0; });
|
|
53425
|
-
if (this._transactionService.currentTransaction.deliveryCostLines) {
|
|
53426
|
-
transactionLinesForInvoice = transactionLinesForInvoice.concat(this._transactionService.currentTransaction.deliveryCostLines);
|
|
53427
|
-
}
|
|
53428
|
-
var notFound = transactionLinesForInvoice.filter(function (l) { return _this._selectedLineUuidsForInvoice.indexOf(l.uuid) < 0; });
|
|
53429
|
-
return notFound.length === 0;
|
|
53430
|
-
}
|
|
53431
|
-
return false;
|
|
53432
|
-
};
|
|
53433
|
-
return LineSelectionService;
|
|
53434
|
-
}());
|
|
53435
|
-
LineSelectionService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function LineSelectionService_Factory() { return new LineSelectionService(i0__namespace.ɵɵinject(TransactionEventService), i0__namespace.ɵɵinject(TransactionService)); }, token: LineSelectionService, providedIn: "root" });
|
|
53436
|
-
LineSelectionService.decorators = [
|
|
53437
|
-
{ type: i0.Injectable, args: [{
|
|
53438
|
-
providedIn: "root"
|
|
53439
|
-
},] }
|
|
53440
|
-
];
|
|
53441
|
-
LineSelectionService.ctorParameters = function () { return [
|
|
53442
|
-
{ type: TransactionEventService },
|
|
53443
|
-
{ type: TransactionService }
|
|
53444
|
-
]; };
|
|
53445
|
-
|
|
53446
53543
|
var TransactionInternalComponent = /** @class */ (function () {
|
|
53447
53544
|
function TransactionInternalComponent(iconCacheService, service, transactionEventService, _transactionConnectorService, _transactionEventService, _screenConfigurationService, _dialogService, _purchaseConfirmationService, _deliveryPlanningService, _transactionBaseService, _changeDetector, _transactionHeaderService, _lineSelection //Do not remove this. While it is not directly used it has its own important subscriptions.
|
|
53448
53545
|
) {
|