@colijnit/transaction 258.1.6 → 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 +99 -53
- package/bundles/colijnit-transaction.umd.js.map +1 -1
- package/colijnit-transaction.metadata.json +1 -1
- package/esm2015/lib/component/delivery-planning/service/delivery-planning.service.js +5 -3
- package/esm2015/lib/component/delivery-planning-main/component/delivery-planning-overview/component/delivery-planning-overview-tile/delivery-planning-overview-tile.component.js +6 -8
- package/esm2015/lib/component/delivery-planning-main/component/delivery-planning-overview/delivery-planning-overview.component.js +5 -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 +7 -5
- package/esm2015/lib/service/transaction-event.service.js +2 -1
- package/esm2015/lib/transaction-version.js +3 -3
- package/fesm2015/colijnit-transaction.js +46 -28
- package/fesm2015/colijnit-transaction.js.map +1 -1
- package/lib/component/delivery-planning/service/delivery-planning.service.d.ts +2 -2
- package/lib/component/delivery-planning-main/component/delivery-planning-overview/component/delivery-planning-overview-tile/delivery-planning-overview-tile.component.d.ts +2 -2
- 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/lib/service/transaction-event.service.d.ts +1 -0
- package/package.json +1 -1
- package/colijnit-transaction-258.1.5.tgz +0 -0
|
@@ -3,8 +3,8 @@ export class Version {
|
|
|
3
3
|
constructor() {
|
|
4
4
|
this.name = "@colijnit/transaction";
|
|
5
5
|
this.description = "Colijn IT transaction package";
|
|
6
|
-
this.symVer = "258.1.
|
|
7
|
-
this.publishDate = "
|
|
6
|
+
this.symVer = "258.1.8";
|
|
7
|
+
this.publishDate = "30-4-2025 17:18:56";
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
10
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNhY3Rpb24tdmVyc2lvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL3RyYW5zYWN0aW9uL3NyYy9saWIvdHJhbnNhY3Rpb24tdmVyc2lvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSx1REFBdUQ7QUFDdkQsTUFBTSxPQUFPLE9BQU87SUFBcEI7UUFDUyxTQUFJLEdBQUcsdUJBQXVCLENBQUM7UUFDL0IsZ0JBQVcsR0FBRywrQkFBK0IsQ0FBQztRQUM5QyxXQUFNLEdBQUcsU0FBUyxDQUFDO1FBQ25CLGdCQUFXLEdBQUcsb0JBQW9CLENBQUM7SUFDNUMsQ0FBQztDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiLy8gdGhpcyBmaWxlIGlzIGR5bmFtaWNhbGx5IGNyZWF0ZWQsIGRvIG5vdCBjaGFuZ2UgdGhpc1xuZXhwb3J0IGNsYXNzIFZlcnNpb24ge1xuICBwdWJsaWMgbmFtZSA9IFwiQGNvbGlqbml0L3RyYW5zYWN0aW9uXCI7XG4gIHB1YmxpYyBkZXNjcmlwdGlvbiA9IFwiQ29saWpuIElUIHRyYW5zYWN0aW9uIHBhY2thZ2VcIjtcbiAgcHVibGljIHN5bVZlciA9IFwiMjU4LjEuOFwiO1xuICBwdWJsaWMgcHVibGlzaERhdGUgPSBcIjMwLTQtMjAyNSAxNzoxODo1NlwiO1xufSJdfQ==
|
|
@@ -293,8 +293,8 @@ class Version {
|
|
|
293
293
|
constructor() {
|
|
294
294
|
this.name = "@colijnit/transaction";
|
|
295
295
|
this.description = "Colijn IT transaction package";
|
|
296
|
-
this.symVer = "258.1.
|
|
297
|
-
this.publishDate = "
|
|
296
|
+
this.symVer = "258.1.8";
|
|
297
|
+
this.publishDate = "30-4-2025 17:18:56";
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
300
|
|
|
@@ -1286,6 +1286,7 @@ class TransactionEventService {
|
|
|
1286
1286
|
this.selectAllSalesOrderLinesToBePicked = new Subject();
|
|
1287
1287
|
this.togglePurchaseOrderMarginInfo = new Subject();
|
|
1288
1288
|
this.selectedTransportDay = new Subject();
|
|
1289
|
+
this.resetTransportDayFilteredOrders = new Subject();
|
|
1289
1290
|
this.selectAllPurchaseOrderLinesForReceiveGoods = new Subject();
|
|
1290
1291
|
this.updatingSalesOrderGeneratePurchaseOrders = new Subject();
|
|
1291
1292
|
this.updatingSalesOrderConfirmation = new Subject();
|
|
@@ -27074,8 +27075,9 @@ class DeliveryPlanningService {
|
|
|
27074
27075
|
// Swap positions in the array
|
|
27075
27076
|
[array[index], array[newIndex]] = [array[newIndex], array[index]];
|
|
27076
27077
|
}
|
|
27077
|
-
deliveryMethodAvailabilityCheck(planOrder,
|
|
27078
|
+
deliveryMethodAvailabilityCheck(planOrder, transportDay) {
|
|
27078
27079
|
return __awaiter(this, void 0, void 0, function* () {
|
|
27080
|
+
let available = true;
|
|
27079
27081
|
if (available) {
|
|
27080
27082
|
if (!planOrder.partDelivery) {
|
|
27081
27083
|
if (!transportDay.deliveryMethods.find(method => method === planOrder.deliveryMethod.toString())) {
|
|
@@ -27097,10 +27099,11 @@ class DeliveryPlanningService {
|
|
|
27097
27099
|
}
|
|
27098
27100
|
});
|
|
27099
27101
|
}
|
|
27100
|
-
districtAvailabilityCheck(planOrder,
|
|
27102
|
+
districtAvailabilityCheck(planOrder, transportDay) {
|
|
27101
27103
|
return __awaiter(this, void 0, void 0, function* () {
|
|
27102
27104
|
//If true: you can plan without rayons/districts. Orders without districts can go everywhere in this case. Does it have districts that it needs to match a district in the plan resource.
|
|
27103
27105
|
//If false: orders without district can not be planned. On a plan resource without districts you can't plan. Other than that same rules apply.
|
|
27106
|
+
let available = true;
|
|
27104
27107
|
if (available) {
|
|
27105
27108
|
if (!this.planRayon) {
|
|
27106
27109
|
if (!planOrder.districts || planOrder.districts.length) {
|
|
@@ -27231,28 +27234,32 @@ class TransactionPlanningLineComponent extends TransactionLineBaseComponent {
|
|
|
27231
27234
|
}
|
|
27232
27235
|
changeLineValue(value) {
|
|
27233
27236
|
this.transactionLine.selected = value;
|
|
27237
|
+
if (!this.transactionLine.amountSelected) {
|
|
27238
|
+
this.transactionLine.amountSelected = this.planOrderLine.amountToPlan;
|
|
27239
|
+
}
|
|
27234
27240
|
this.detectChanges();
|
|
27235
27241
|
}
|
|
27236
27242
|
dragStarted(ev) {
|
|
27237
|
-
var _a, _b, _c, _d;
|
|
27243
|
+
var _a, _b, _c, _d, _e;
|
|
27238
27244
|
return __awaiter(this, void 0, void 0, function* () {
|
|
27239
27245
|
if (!this.checkedAvailibility) {
|
|
27240
27246
|
this._deliveryPlanningService.availabilityCheckEvent.emit(this.transactionService.currentPlanOrder);
|
|
27241
27247
|
this.checkedAvailibility = true;
|
|
27242
27248
|
}
|
|
27243
|
-
|
|
27249
|
+
console.log(this.transactionLine.amountSelected);
|
|
27250
|
+
console.log((_a = this.planOrderLine) === null || _a === void 0 ? void 0 : _a.amountToPlan);
|
|
27251
|
+
if (this.transactionLine.amountSelected <= 0 || ((_b = this.planOrderLine) === null || _b === void 0 ? void 0 : _b.amountToPlan) === 0) {
|
|
27244
27252
|
yield this._dialog.showError(this._dictionary.get('ORDER_CAN_NOT_BE_PLANNED_ON_RESOURCE'), true);
|
|
27245
|
-
return;
|
|
27246
27253
|
}
|
|
27247
27254
|
else {
|
|
27248
27255
|
this._deliveryPlanningService.currentTransId = this.transactionInfo.id;
|
|
27249
|
-
(
|
|
27256
|
+
(_c = ev.dataTransfer) === null || _c === void 0 ? void 0 : _c.setData('text', 'lines');
|
|
27250
27257
|
}
|
|
27251
27258
|
ev.target.classList.add('dragging');
|
|
27252
27259
|
const lineElement = ev.target.closest('co-transaction-base-line');
|
|
27253
27260
|
if (!lineElement)
|
|
27254
27261
|
return;
|
|
27255
|
-
const dragBox = (
|
|
27262
|
+
const dragBox = (_d = lineElement.querySelector('.co-transaction-line-image-and-description')) === null || _d === void 0 ? void 0 : _d.cloneNode(true);
|
|
27256
27263
|
const dragImage = document.createElement('div');
|
|
27257
27264
|
dragImage.style.display = 'flex';
|
|
27258
27265
|
dragImage.style.flexDirection = 'row';
|
|
@@ -27275,7 +27282,7 @@ class TransactionPlanningLineComponent extends TransactionLineBaseComponent {
|
|
|
27275
27282
|
dragImage.style.top = '-1000px';
|
|
27276
27283
|
dragImage.style.left = '-1000px';
|
|
27277
27284
|
// Set the custom drag image
|
|
27278
|
-
(
|
|
27285
|
+
(_e = ev.dataTransfer) === null || _e === void 0 ? void 0 : _e.setDragImage(dragImage, 50, 25);
|
|
27279
27286
|
// Cleanup: Remove the drag image after it's set
|
|
27280
27287
|
setTimeout(() => document.body.removeChild(dragImage), 0);
|
|
27281
27288
|
});
|
|
@@ -27296,6 +27303,14 @@ class TransactionPlanningLineComponent extends TransactionLineBaseComponent {
|
|
|
27296
27303
|
}
|
|
27297
27304
|
return !((_b = (_a = this._deliveryPlanningService.linesPlanOrder) === null || _a === void 0 ? void 0 : _a.lines) === null || _b === void 0 ? void 0 : _b.find(line => line.originalLineNr === this.transactionLine.lineNr));
|
|
27298
27305
|
}
|
|
27306
|
+
get lineFullyPlanned() {
|
|
27307
|
+
if (this.planOrderLine) {
|
|
27308
|
+
return this.planOrderLine.amountToPlan === 0;
|
|
27309
|
+
}
|
|
27310
|
+
else {
|
|
27311
|
+
return false;
|
|
27312
|
+
}
|
|
27313
|
+
}
|
|
27299
27314
|
handleQuantityToPlanChange(amount) {
|
|
27300
27315
|
this.transactionLine.amountSelected = amount;
|
|
27301
27316
|
}
|
|
@@ -27318,9 +27333,9 @@ TransactionPlanningLineComponent.decorators = [
|
|
|
27318
27333
|
[transactionLine]="transactionLine"
|
|
27319
27334
|
[preview]="preview"
|
|
27320
27335
|
[isFirst]="isFirst"
|
|
27321
|
-
[draggable]="!
|
|
27336
|
+
[draggable]="!lineFullyPlanned"
|
|
27322
27337
|
(dragstart)="dragStarted($event)"
|
|
27323
|
-
[checkbox]="
|
|
27338
|
+
[checkbox]="!lineFullyPlanned"
|
|
27324
27339
|
[checkboxValue]="transactionLine.selected || !transactionInfo?.allowPartialDelivery"
|
|
27325
27340
|
[checkboxReadonly]="!transactionInfo?.allowPartialDelivery"
|
|
27326
27341
|
(checkboxValueChanged)="handleCheckBoxValueChanged($event, transactionLine)"
|
|
@@ -27377,16 +27392,17 @@ TransactionPlanningLineComponent.decorators = [
|
|
|
27377
27392
|
<div class="transaction-field-wrapper small">
|
|
27378
27393
|
<div class="inside-field">
|
|
27379
27394
|
<co-transaction-line-label [insideLabel]="'QUANTITY'"></co-transaction-line-label>
|
|
27380
|
-
<co-input-number-picker class="amount-number-picker"
|
|
27395
|
+
<co-input-number-picker *ngIf="planOrderLine?.amountToPlan && planOrderLine.amountToPlan !== 0" class="amount-number-picker"
|
|
27381
27396
|
[min]="0"
|
|
27382
27397
|
[max]="planOrderLine?.amountToPlan"
|
|
27383
|
-
[model]="planOrderLine?.amountToPlan"
|
|
27398
|
+
[model]="planOrderLine?.amountToPlan ? planOrderLine?.amountToPlan : 0"
|
|
27384
27399
|
(modelChange)="handleQuantityToPlanChange($event)"></co-input-number-picker>
|
|
27385
27400
|
</div>
|
|
27386
27401
|
</div>
|
|
27387
27402
|
<div class="transaction-field-wrapper small" *ngIf="this.plannedResourceForTransactionLine?.length > 0">
|
|
27388
27403
|
<div class="inside-field">
|
|
27389
|
-
<
|
|
27404
|
+
<co-transaction-line-label [insideLabel]="'PLANNED'"></co-transaction-line-label>
|
|
27405
|
+
<div class="column">
|
|
27390
27406
|
<co-transaction-planning-line-planned-resource
|
|
27391
27407
|
*ngFor="let plannedResource of this.plannedResourceForTransactionLine"
|
|
27392
27408
|
[plannedResource]="plannedResource"
|
|
@@ -32378,7 +32394,6 @@ TransactionPlanningLinePlannedResourceComponent.decorators = [
|
|
|
32378
32394
|
selector: "co-transaction-planning-line-planned-resource",
|
|
32379
32395
|
template: `
|
|
32380
32396
|
<div class="row" (click)="handlePlannedResourceClicked()">
|
|
32381
|
-
<co-icon [iconData]="iconCacheService.getIcon(icons.TruckContainerDuo)"></co-icon>
|
|
32382
32397
|
<span class="bold" [textContent]="plannedResource.planningStartTime | date: 'dd-MM-YYYY'"></span>
|
|
32383
32398
|
</div>
|
|
32384
32399
|
`,
|
|
@@ -39268,11 +39283,7 @@ class DeliveryPlanningOverviewTileComponent {
|
|
|
39268
39283
|
}
|
|
39269
39284
|
handleAvailabilityChecked(planOrder) {
|
|
39270
39285
|
return __awaiter(this, void 0, void 0, function* () {
|
|
39271
|
-
|
|
39272
|
-
available = this.transportDay.availableOnDate;
|
|
39273
|
-
available = yield this.deliveryMethodAvailabilityCheck(planOrder, available);
|
|
39274
|
-
available = yield this.districtAvailabilityCheck(planOrder, available);
|
|
39275
|
-
this.availabilityChecked.emit({ transportDay: this.transportDay, available: available });
|
|
39286
|
+
this.availabilityChecked.emit({ transportDay: this.transportDay, available: this.transportDay.availableOnDate && (yield this.deliveryMethodAvailabilityCheck(planOrder)) && (yield this.districtAvailabilityCheck(planOrder)) });
|
|
39276
39287
|
});
|
|
39277
39288
|
}
|
|
39278
39289
|
getOrderLinesPlanned(planOrder) {
|
|
@@ -39290,8 +39301,9 @@ class DeliveryPlanningOverviewTileComponent {
|
|
|
39290
39301
|
planOrder.lines.push(...yield this._transaction.getOrderLinesPlanned(request));
|
|
39291
39302
|
});
|
|
39292
39303
|
}
|
|
39293
|
-
deliveryMethodAvailabilityCheck(planOrder
|
|
39304
|
+
deliveryMethodAvailabilityCheck(planOrder) {
|
|
39294
39305
|
return __awaiter(this, void 0, void 0, function* () {
|
|
39306
|
+
let available = true;
|
|
39295
39307
|
if (available) {
|
|
39296
39308
|
if (!planOrder.partDelivery) {
|
|
39297
39309
|
if (!this.transportDay.deliveryMethods.find(method => method === planOrder.deliveryMethod.toString())) {
|
|
@@ -39313,10 +39325,11 @@ class DeliveryPlanningOverviewTileComponent {
|
|
|
39313
39325
|
}
|
|
39314
39326
|
});
|
|
39315
39327
|
}
|
|
39316
|
-
districtAvailabilityCheck(planOrder
|
|
39328
|
+
districtAvailabilityCheck(planOrder) {
|
|
39317
39329
|
return __awaiter(this, void 0, void 0, function* () {
|
|
39318
39330
|
//If true: you can plan without rayons/districts. Orders without districts can go everywhere in this case. Does it have districts that it needs to match a district in the plan resource.
|
|
39319
39331
|
//If false: orders without district can not be planned. On a plan resource without districts you can't plan. Other than that same rules apply.
|
|
39332
|
+
let available = true;
|
|
39320
39333
|
if (available) {
|
|
39321
39334
|
if (!this._deliveryPlanningService.planRayon) {
|
|
39322
39335
|
if (!planOrder.districts || planOrder.districts.length) {
|
|
@@ -39676,7 +39689,7 @@ class DeliveryPlanningOverviewComponent {
|
|
|
39676
39689
|
order.tasksLoaded = true;
|
|
39677
39690
|
order.lines.forEach(line => {
|
|
39678
39691
|
line.selected = true;
|
|
39679
|
-
if (line.amountToPlan === 0) {
|
|
39692
|
+
if (!line.amountToPlan || line.amountToPlan === 0) {
|
|
39680
39693
|
line.amountToPlan = (line.amountInOrder - line.amountPlanned);
|
|
39681
39694
|
}
|
|
39682
39695
|
});
|
|
@@ -39952,6 +39965,9 @@ class DeliveryPlanningOverviewComponent {
|
|
|
39952
39965
|
//fire event selected outwards
|
|
39953
39966
|
this.transactionEventService.selectedTransportDay.next(transportDay);
|
|
39954
39967
|
}
|
|
39968
|
+
else {
|
|
39969
|
+
this.transactionEventService.resetTransportDayFilteredOrders.next();
|
|
39970
|
+
}
|
|
39955
39971
|
}
|
|
39956
39972
|
}
|
|
39957
39973
|
DeliveryPlanningOverviewComponent.decorators = [
|
|
@@ -43963,13 +43979,15 @@ class TransactionSearchResultComponent {
|
|
|
43963
43979
|
}
|
|
43964
43980
|
}), this.transactionEventService.selectedTransportDay.subscribe((transportDay) => __awaiter(this, void 0, void 0, function* () {
|
|
43965
43981
|
const filteredTransactions = yield Promise.all(this.searchService.transactions.map((order) => __awaiter(this, void 0, void 0, function* () {
|
|
43966
|
-
let available = true;
|
|
43967
43982
|
const planOrder = yield this.transactionService.getPlanOrder(order.transId);
|
|
43968
|
-
yield this._deliveryPlanningService.deliveryMethodAvailabilityCheck(planOrder,
|
|
43969
|
-
|
|
43970
|
-
|
|
43983
|
+
const isAvailable = (yield this._deliveryPlanningService.deliveryMethodAvailabilityCheck(planOrder, transportDay)) &&
|
|
43984
|
+
(yield this._deliveryPlanningService.districtAvailabilityCheck(planOrder, transportDay)) &&
|
|
43985
|
+
transportDay.availableOnDate;
|
|
43986
|
+
return isAvailable ? order : null;
|
|
43971
43987
|
})));
|
|
43972
43988
|
this.searchService.transactions = filteredTransactions.filter((order) => order !== null);
|
|
43989
|
+
})), this.transactionEventService.resetTransportDayFilteredOrders.subscribe((event) => __awaiter(this, void 0, void 0, function* () {
|
|
43990
|
+
yield this.searchService.searchTransactions();
|
|
43973
43991
|
})));
|
|
43974
43992
|
}
|
|
43975
43993
|
ngOnChanges(changes) {
|