@colijnit/transaction 258.1.7 → 258.1.8
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 +63 -49
- package/bundles/colijnit-transaction.umd.js.map +1 -1
- package/colijnit-transaction.metadata.json +1 -1
- package/esm2015/lib/component/delivery-planning-main/component/delivery-planning-overview/delivery-planning-overview.component.js +2 -2
- package/esm2015/lib/component/transaction-line/transaction-planning-line/components/transaction-planning-line-planned-resource/transaction-planning-line-planned-resource.component.js +1 -2
- package/esm2015/lib/component/transaction-line/transaction-planning-line/transaction-planning-line.component.js +25 -12
- package/esm2015/lib/component/transaction-search/transaction-search-result/transaction-search-result.component.js +1 -3
- package/esm2015/lib/transaction-version.js +3 -3
- package/fesm2015/colijnit-transaction.js +27 -17
- package/fesm2015/colijnit-transaction.js.map +1 -1
- package/lib/component/transaction-line/transaction-planning-line/components/transaction-planning-line-planned-resource/style/_layout.scss +1 -0
- package/lib/component/transaction-line/transaction-planning-line/style/_layout.scss +6 -0
- package/lib/component/transaction-line/transaction-planning-line/transaction-planning-line.component.d.ts +1 -0
- 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 = "258.1.
|
|
37
|
-
this.publishDate = "
|
|
36
|
+
this.symVer = "258.1.8";
|
|
37
|
+
this.publishDate = "30-4-2025 17:18:56";
|
|
38
38
|
}
|
|
39
39
|
return Version;
|
|
40
40
|
}());
|
|
@@ -31270,26 +31270,26 @@
|
|
|
31270
31270
|
TransactionPlanningLineComponent.prototype.handleCheckBoxValueChanged = function (value, line) {
|
|
31271
31271
|
return __awaiter(this, void 0, void 0, function () {
|
|
31272
31272
|
var packageResponse;
|
|
31273
|
-
return __generator(this, function (
|
|
31274
|
-
switch (
|
|
31273
|
+
return __generator(this, function (_f) {
|
|
31274
|
+
switch (_f.label) {
|
|
31275
31275
|
case 0:
|
|
31276
31276
|
if (!this._deliveryPlanningService.lspMode) return [3 /*break*/, 5];
|
|
31277
31277
|
return [4 /*yield*/, this.transactionService.getPackageInformation(this.transactionInfo.uuid, line.uuid)];
|
|
31278
31278
|
case 1:
|
|
31279
|
-
packageResponse =
|
|
31279
|
+
packageResponse = _f.sent();
|
|
31280
31280
|
if (!((packageResponse === null || packageResponse === void 0 ? void 0 : packageResponse.length) && value)) return [3 /*break*/, 3];
|
|
31281
31281
|
this.changeLineValue(false);
|
|
31282
31282
|
return [4 /*yield*/, this._dialog.showError("LSP_ALREADY_CREATED_FOR_THIS_LINE", true)];
|
|
31283
31283
|
case 2:
|
|
31284
|
-
|
|
31284
|
+
_f.sent();
|
|
31285
31285
|
return [3 /*break*/, 4];
|
|
31286
31286
|
case 3:
|
|
31287
31287
|
this.changeLineValue(value);
|
|
31288
|
-
|
|
31288
|
+
_f.label = 4;
|
|
31289
31289
|
case 4: return [3 /*break*/, 6];
|
|
31290
31290
|
case 5:
|
|
31291
31291
|
this.changeLineValue(value);
|
|
31292
|
-
|
|
31292
|
+
_f.label = 6;
|
|
31293
31293
|
case 6: return [2 /*return*/];
|
|
31294
31294
|
}
|
|
31295
31295
|
});
|
|
@@ -31303,34 +31303,39 @@
|
|
|
31303
31303
|
};
|
|
31304
31304
|
TransactionPlanningLineComponent.prototype.changeLineValue = function (value) {
|
|
31305
31305
|
this.transactionLine.selected = value;
|
|
31306
|
+
if (!this.transactionLine.amountSelected) {
|
|
31307
|
+
this.transactionLine.amountSelected = this.planOrderLine.amountToPlan;
|
|
31308
|
+
}
|
|
31306
31309
|
this.detectChanges();
|
|
31307
31310
|
};
|
|
31308
31311
|
TransactionPlanningLineComponent.prototype.dragStarted = function (ev) {
|
|
31309
|
-
var _a, _b, _c, _d;
|
|
31312
|
+
var _a, _b, _c, _d, _e;
|
|
31310
31313
|
return __awaiter(this, void 0, void 0, function () {
|
|
31311
31314
|
var lineElement, dragBox, dragImage;
|
|
31312
|
-
return __generator(this, function (
|
|
31313
|
-
switch (
|
|
31315
|
+
return __generator(this, function (_f) {
|
|
31316
|
+
switch (_f.label) {
|
|
31314
31317
|
case 0:
|
|
31315
31318
|
if (!this.checkedAvailibility) {
|
|
31316
31319
|
this._deliveryPlanningService.availabilityCheckEvent.emit(this.transactionService.currentPlanOrder);
|
|
31317
31320
|
this.checkedAvailibility = true;
|
|
31318
31321
|
}
|
|
31319
|
-
|
|
31322
|
+
console.log(this.transactionLine.amountSelected);
|
|
31323
|
+
console.log((_a = this.planOrderLine) === null || _a === void 0 ? void 0 : _a.amountToPlan);
|
|
31324
|
+
if (!(this.transactionLine.amountSelected <= 0 || ((_b = this.planOrderLine) === null || _b === void 0 ? void 0 : _b.amountToPlan) === 0)) return [3 /*break*/, 2];
|
|
31320
31325
|
return [4 /*yield*/, this._dialog.showError(this._dictionary.get('ORDER_CAN_NOT_BE_PLANNED_ON_RESOURCE'), true)];
|
|
31321
31326
|
case 1:
|
|
31322
|
-
|
|
31323
|
-
return [
|
|
31327
|
+
_f.sent();
|
|
31328
|
+
return [3 /*break*/, 3];
|
|
31324
31329
|
case 2:
|
|
31325
31330
|
this._deliveryPlanningService.currentTransId = this.transactionInfo.id;
|
|
31326
|
-
(
|
|
31327
|
-
|
|
31331
|
+
(_c = ev.dataTransfer) === null || _c === void 0 ? void 0 : _c.setData('text', 'lines');
|
|
31332
|
+
_f.label = 3;
|
|
31328
31333
|
case 3:
|
|
31329
31334
|
ev.target.classList.add('dragging');
|
|
31330
31335
|
lineElement = ev.target.closest('co-transaction-base-line');
|
|
31331
31336
|
if (!lineElement)
|
|
31332
31337
|
return [2 /*return*/];
|
|
31333
|
-
dragBox = (
|
|
31338
|
+
dragBox = (_d = lineElement.querySelector('.co-transaction-line-image-and-description')) === null || _d === void 0 ? void 0 : _d.cloneNode(true);
|
|
31334
31339
|
dragImage = document.createElement('div');
|
|
31335
31340
|
dragImage.style.display = 'flex';
|
|
31336
31341
|
dragImage.style.flexDirection = 'row';
|
|
@@ -31353,7 +31358,7 @@
|
|
|
31353
31358
|
dragImage.style.top = '-1000px';
|
|
31354
31359
|
dragImage.style.left = '-1000px';
|
|
31355
31360
|
// Set the custom drag image
|
|
31356
|
-
(
|
|
31361
|
+
(_e = ev.dataTransfer) === null || _e === void 0 ? void 0 : _e.setDragImage(dragImage, 50, 25);
|
|
31357
31362
|
// Cleanup: Remove the drag image after it's set
|
|
31358
31363
|
setTimeout(function () { return document.body.removeChild(dragImage); }, 0);
|
|
31359
31364
|
return [2 /*return*/];
|
|
@@ -31382,17 +31387,29 @@
|
|
|
31382
31387
|
enumerable: false,
|
|
31383
31388
|
configurable: true
|
|
31384
31389
|
});
|
|
31390
|
+
Object.defineProperty(TransactionPlanningLineComponent.prototype, "lineFullyPlanned", {
|
|
31391
|
+
get: function () {
|
|
31392
|
+
if (this.planOrderLine) {
|
|
31393
|
+
return this.planOrderLine.amountToPlan === 0;
|
|
31394
|
+
}
|
|
31395
|
+
else {
|
|
31396
|
+
return false;
|
|
31397
|
+
}
|
|
31398
|
+
},
|
|
31399
|
+
enumerable: false,
|
|
31400
|
+
configurable: true
|
|
31401
|
+
});
|
|
31385
31402
|
TransactionPlanningLineComponent.prototype.handleQuantityToPlanChange = function (amount) {
|
|
31386
31403
|
this.transactionLine.amountSelected = amount;
|
|
31387
31404
|
};
|
|
31388
31405
|
TransactionPlanningLineComponent.prototype.handlePlannedResourceClicked = function (plannedResource) {
|
|
31389
31406
|
return __awaiter(this, void 0, void 0, function () {
|
|
31390
31407
|
var plannings;
|
|
31391
|
-
return __generator(this, function (
|
|
31392
|
-
switch (
|
|
31408
|
+
return __generator(this, function (_f) {
|
|
31409
|
+
switch (_f.label) {
|
|
31393
31410
|
case 0: return [4 /*yield*/, this.transactionConnectorService.getPlanningSources()];
|
|
31394
31411
|
case 1:
|
|
31395
|
-
plannings =
|
|
31412
|
+
plannings = _f.sent();
|
|
31396
31413
|
this._deliveryPlanningService.currentStartDate = plannedResource.planningStartTime;
|
|
31397
31414
|
this._deliveryPlanningService.currentPlanning = plannings.find(function (planning) { return planning.planningId === plannedResource.planningId; });
|
|
31398
31415
|
this.transactionEventService.openSidePanel.next(this.transactionLine);
|
|
@@ -31407,7 +31424,7 @@
|
|
|
31407
31424
|
TransactionPlanningLineComponent.decorators = [
|
|
31408
31425
|
{ type: i0.Component, args: [{
|
|
31409
31426
|
selector: 'co-transaction-planning-line',
|
|
31410
|
-
template: "\n <co-transaction-base-line\n [transactionInfo]=\"transactionInfo\"\n [transactionLine]=\"transactionLine\"\n [preview]=\"preview\"\n [isFirst]=\"isFirst\"\n [draggable]=\"!
|
|
31427
|
+
template: "\n <co-transaction-base-line\n [transactionInfo]=\"transactionInfo\"\n [transactionLine]=\"transactionLine\"\n [preview]=\"preview\"\n [isFirst]=\"isFirst\"\n [draggable]=\"!lineFullyPlanned\"\n (dragstart)=\"dragStarted($event)\"\n [checkbox]=\"!lineFullyPlanned\"\n [checkboxValue]=\"transactionLine.selected || !transactionInfo?.allowPartialDelivery\"\n [checkboxReadonly]=\"!transactionInfo?.allowPartialDelivery\"\n (checkboxValueChanged)=\"handleCheckBoxValueChanged($event, transactionLine)\"\n (click)=\"handleLineClicked($event)\">\n <ng-container *ngIf=\"transactionLine.isArticle\">\n <div class=\"transaction-line-wrapper\">\n <div *ngIf=!preview class=\"transaction-line-extended-wrapper\">\n <div class=\"column-full align-right\">\n <co-transaction-line-statusbar\n [screenConfigurationObject]=\"cfgNames.StatusBar\"\n [configNames]=\"statusBarConfigNames\"\n [activeCategory]=\"category.SalesOrderOverview\">\n </co-transaction-line-statusbar>\n <co-transaction-line-commission-button\n class=\"transaction-field-wrapper medium\"\n [screenConfigurationObject]=\"cfgNames.LineCommission\"\n [inputLabel]=\"true\"\n ></co-transaction-line-commission-button>\n <co-transaction-line-warehouse-button\n class=\"transaction-field-wrapper medium\"\n [screenConfigurationObject]=\"cfgNames.LineWarehouse\"\n [inputLabel]=\"true\"\n ></co-transaction-line-warehouse-button>\n <co-transaction-line-delivery-button\n class=\"transaction-field-wrapper medium\"\n [screenConfigurationObject]=\"cfgNames.LineDeliveryMethod\"\n [inputLabel]=\"true\"\n ></co-transaction-line-delivery-button>\n <co-transaction-line-delivery-date-button\n class=\"transaction-field-wrapper medium transaction-line-delivery-date two-column\"\n [screenConfigurationObject]=\"cfgNames.LineDeliveryDate\"\n [inputLabel]=\"true\"\n ></co-transaction-line-delivery-date-button>\n <co-transaction-line-vat-button\n *ngIf=\"!preview\"\n class=\"transaction-field-wrapper small\"\n [screenConfigurationObject]=\"cfgNames.LineVat\"\n [inputLabel]=\"true\"\n ></co-transaction-line-vat-button>\n <co-transaction-line-price\n class=\"transaction-field-wrapper small transaction-line-totals-price price\"\n [screenConfigurationObject]=\"cfgNames.LinePrice\"\n [showLabel]=\"false\"\n [defaultEditMode]=\"false\"\n [inputLabel]=\"true\"\n ></co-transaction-line-price>\n <co-transaction-line-discount-button\n *ngIf=\"!preview\"\n class=\"transaction-field-wrapper small\"\n [screenConfigurationObject]=\"cfgNames.LineDiscount\"\n [configNames]=\"discountConfigNames\"\n [inputLabel]=\"true\"\n ></co-transaction-line-discount-button>\n <div class=\"transaction-field-wrapper small\">\n <div class=\"inside-field\">\n <co-transaction-line-label [insideLabel]=\"'QUANTITY'\"></co-transaction-line-label>\n <co-input-number-picker *ngIf=\"planOrderLine?.amountToPlan && planOrderLine.amountToPlan !== 0\" class=\"amount-number-picker\"\n [min]=\"0\"\n [max]=\"planOrderLine?.amountToPlan\"\n [model]=\"planOrderLine?.amountToPlan ? planOrderLine?.amountToPlan : 0\"\n (modelChange)=\"handleQuantityToPlanChange($event)\"></co-input-number-picker>\n </div>\n </div>\n <div class=\"transaction-field-wrapper small\" *ngIf=\"this.plannedResourceForTransactionLine?.length > 0\">\n <div class=\"inside-field\">\n <co-transaction-line-label [insideLabel]=\"'PLANNED'\"></co-transaction-line-label>\n <div class=\"column\">\n <co-transaction-planning-line-planned-resource\n *ngFor=\"let plannedResource of this.plannedResourceForTransactionLine\"\n [plannedResource]=\"plannedResource\"\n (plannedResourceClickedEvent)=\"handlePlannedResourceClicked($event)\">\n </co-transaction-planning-line-planned-resource>\n </div>\n </div>\n </div>\n <co-editable-label\n class=\"transaction-field-wrapper small transaction-line-totals-total price\"\n [model]=\"transactionLine.displayNetLineTotal | coCurrency: true\"\n [editModel]=\"transactionLine.displayNetLineTotal\"\n [readonly]=\"true\"\n [inputLabel]=\"true\"\n ></co-editable-label>\n </div>\n </div>\n </div>\n </ng-container>\n </co-transaction-base-line>\n ",
|
|
31411
31428
|
encapsulation: i0.ViewEncapsulation.None,
|
|
31412
31429
|
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
31413
31430
|
},] }
|
|
@@ -35828,7 +35845,7 @@
|
|
|
35828
35845
|
TransactionPlanningLinePlannedResourceComponent.decorators = [
|
|
35829
35846
|
{ type: i0.Component, args: [{
|
|
35830
35847
|
selector: "co-transaction-planning-line-planned-resource",
|
|
35831
|
-
template: "\n <div class=\"row\" (click)=\"handlePlannedResourceClicked()\">\n <
|
|
35848
|
+
template: "\n <div class=\"row\" (click)=\"handlePlannedResourceClicked()\">\n <span class=\"bold\" [textContent]=\"plannedResource.planningStartTime | date: 'dd-MM-YYYY'\"></span>\n </div>\n ",
|
|
35832
35849
|
encapsulation: i0.ViewEncapsulation.None
|
|
35833
35850
|
},] }
|
|
35834
35851
|
];
|
|
@@ -42526,7 +42543,7 @@
|
|
|
42526
42543
|
order.tasksLoaded = true;
|
|
42527
42544
|
order.lines.forEach(function (line) {
|
|
42528
42545
|
line.selected = true;
|
|
42529
|
-
if (line.amountToPlan === 0) {
|
|
42546
|
+
if (!line.amountToPlan || line.amountToPlan === 0) {
|
|
42530
42547
|
line.amountToPlan = (line.amountInOrder - line.amountPlanned);
|
|
42531
42548
|
}
|
|
42532
42549
|
});
|
|
@@ -46050,34 +46067,31 @@
|
|
|
46050
46067
|
var _this = this;
|
|
46051
46068
|
return __generator(this, function (_a) {
|
|
46052
46069
|
switch (_a.label) {
|
|
46053
|
-
case 0:
|
|
46054
|
-
|
|
46055
|
-
|
|
46056
|
-
|
|
46057
|
-
|
|
46058
|
-
|
|
46059
|
-
|
|
46060
|
-
|
|
46061
|
-
|
|
46062
|
-
|
|
46063
|
-
|
|
46064
|
-
|
|
46065
|
-
|
|
46066
|
-
|
|
46067
|
-
|
|
46068
|
-
|
|
46069
|
-
|
|
46070
|
-
|
|
46071
|
-
|
|
46072
|
-
|
|
46073
|
-
|
|
46074
|
-
|
|
46075
|
-
});
|
|
46076
|
-
}); }))];
|
|
46070
|
+
case 0: return [4 /*yield*/, Promise.all(this.searchService.transactions.map(function (order) { return __awaiter(_this, void 0, void 0, function () {
|
|
46071
|
+
var planOrder, isAvailable, _a;
|
|
46072
|
+
return __generator(this, function (_b) {
|
|
46073
|
+
switch (_b.label) {
|
|
46074
|
+
case 0: return [4 /*yield*/, this.transactionService.getPlanOrder(order.transId)];
|
|
46075
|
+
case 1:
|
|
46076
|
+
planOrder = _b.sent();
|
|
46077
|
+
return [4 /*yield*/, this._deliveryPlanningService.deliveryMethodAvailabilityCheck(planOrder, transportDay)];
|
|
46078
|
+
case 2:
|
|
46079
|
+
_a = (_b.sent());
|
|
46080
|
+
if (!_a) return [3 /*break*/, 4];
|
|
46081
|
+
return [4 /*yield*/, this._deliveryPlanningService.districtAvailabilityCheck(planOrder, transportDay)];
|
|
46082
|
+
case 3:
|
|
46083
|
+
_a = (_b.sent());
|
|
46084
|
+
_b.label = 4;
|
|
46085
|
+
case 4:
|
|
46086
|
+
isAvailable = _a &&
|
|
46087
|
+
transportDay.availableOnDate;
|
|
46088
|
+
return [2 /*return*/, isAvailable ? order : null];
|
|
46089
|
+
}
|
|
46090
|
+
});
|
|
46091
|
+
}); }))];
|
|
46077
46092
|
case 1:
|
|
46078
46093
|
filteredTransactions = _a.sent();
|
|
46079
46094
|
this.searchService.transactions = filteredTransactions.filter(function (order) { return order !== null; });
|
|
46080
|
-
console.log(this.searchService.transactions.length);
|
|
46081
46095
|
return [2 /*return*/];
|
|
46082
46096
|
}
|
|
46083
46097
|
});
|