@colijnit/transaction 255.1.45 → 255.1.47
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 +595 -240
- package/bundles/colijnit-transaction.umd.js.map +1 -1
- package/colijnit-transaction.metadata.json +1 -1
- package/esm2015/lib/component/avatar/avatar.component.js +8 -3
- package/esm2015/lib/component/checkout/checkout-overview-delivery-edit/checkout-overview-delivery-edit.component.js +10 -1
- package/esm2015/lib/component/checkout/checkout.module.js +6 -2
- package/esm2015/lib/component/delivery-planning/service/delivery-planning.service.js +99 -33
- package/esm2015/lib/component/delivery-planning-main/component/delivery-planning-overview/component/delivery-planning-overview-popup/delivery-planning-overview-popup.component.js +39 -25
- package/esm2015/lib/component/delivery-planning-main/component/delivery-planning-overview/component/delivery-planning-overview-tile/component/delivery-planning-overview-short-line/delivery-planning-overview-short-line.component.js +4 -4
- package/esm2015/lib/component/delivery-planning-main/component/delivery-planning-overview/component/delivery-planning-overview-tile/component/delivery-planning-overview-tile-line/delivery-planning-overview-tile-line.component.js +29 -11
- package/esm2015/lib/component/delivery-planning-main/component/delivery-planning-overview/component/delivery-planning-overview-tile/component/delivery-planning-tile-status/delivery-planning-tile-status.component.js +67 -16
- package/esm2015/lib/component/delivery-planning-main/component/delivery-planning-overview/component/delivery-planning-overview-tile/delivery-planning-overview-tile.component.js +39 -17
- package/esm2015/lib/component/delivery-planning-main/component/delivery-planning-overview/delivery-planning-overview.component.js +56 -30
- package/esm2015/lib/component/delivery-planning-main/delivery-planning-main.component.js +59 -46
- package/esm2015/lib/component/transaction-card/transaction-card-planning/transaction-card-planning.component.js +18 -3
- package/esm2015/lib/component/transaction-card/transaction-card-purchase-confirmation/transaction-card-purchase-confirmation.component.js +101 -96
- package/esm2015/lib/component/transaction-cash-register-dialog/transaction-cash-register-dialog.component.js +4 -4
- package/esm2015/lib/component/transaction-header/transaction-header/transaction-header.component.js +13 -11
- package/esm2015/lib/component/transaction-header/transaction-header-delivery/transaction-header-delivery.component.js +2 -3
- package/esm2015/lib/component/transaction-header/transaction-header-popup/transaction-header-popup-order.component.js +7 -2
- package/esm2015/lib/component/transaction-internal/transaction-internal.component.js +3 -8
- package/esm2015/lib/component/transaction-line/transaction-planning-line/transaction-planning-line.component.js +10 -4
- package/esm2015/lib/component/transaction-lines-side-panel/transaction-lines-side-panel-service-order/transaction-lines-side-panel-service-order.component.js +6 -4
- package/esm2015/lib/component/transaction-lines-side-panel/transaction-lines-side-panel-service-order/transaction-lines-side-panel-service-order.module.js +4 -3
- package/esm2015/lib/component/transaction-quick-access/transaction-quick-access-planning/transaction-quick-access-planning.component.js +5 -2
- package/esm2015/lib/component/transaction-service-overview/components/transaction-service-message.component.js +3 -2
- package/esm2015/lib/component/transaction-service-overview/transaction-service-overview.component.js +29 -20
- package/esm2015/lib/component/transaction-service-overview/transaction-service-overview.module.js +4 -3
- package/esm2015/lib/enum/checkout-cfg-name.enum.js +3 -1
- package/esm2015/lib/enum/delivery-planning-update-actions.enum.js +8 -0
- package/esm2015/lib/enum/transaction-cfg-name.enum.js +12 -1
- package/esm2015/lib/service/transaction-connector-adapter.service.js +12 -1
- package/esm2015/lib/service/transaction-connector.service.js +6 -1
- package/esm2015/lib/service/transaction-payment.service.js +3 -3
- package/esm2015/lib/transaction-version.js +3 -3
- package/fesm2015/colijnit-transaction.js +622 -322
- package/fesm2015/colijnit-transaction.js.map +1 -1
- package/lib/component/delivery-planning/service/delivery-planning.service.d.ts +11 -7
- package/lib/component/delivery-planning-main/component/delivery-planning-overview/component/delivery-planning-overview-popup/delivery-planning-overview-popup.component.d.ts +10 -7
- package/lib/component/delivery-planning-main/component/delivery-planning-overview/component/delivery-planning-overview-tile/component/delivery-planning-overview-short-line/delivery-planning-overview-short-line.component.d.ts +1 -1
- package/lib/component/delivery-planning-main/component/delivery-planning-overview/component/delivery-planning-overview-tile/component/delivery-planning-overview-tile-line/delivery-planning-overview-tile-line.component.d.ts +9 -2
- package/lib/component/delivery-planning-main/component/delivery-planning-overview/component/delivery-planning-overview-tile/component/delivery-planning-overview-tile-line/style/_layout.scss +6 -0
- package/lib/component/delivery-planning-main/component/delivery-planning-overview/component/delivery-planning-overview-tile/component/delivery-planning-tile-status/delivery-planning-tile-status.component.d.ts +18 -7
- package/lib/component/delivery-planning-main/component/delivery-planning-overview/component/delivery-planning-overview-tile/component/delivery-planning-tile-status/style/_layout.scss +12 -0
- package/lib/component/delivery-planning-main/component/delivery-planning-overview/component/delivery-planning-overview-tile/delivery-planning-overview-tile.component.d.ts +20 -5
- package/lib/component/delivery-planning-main/component/delivery-planning-overview/component/delivery-planning-overview-tile/style/_layout.scss +2 -2
- package/lib/component/delivery-planning-main/component/delivery-planning-overview/component/delivery-planning-overview-tile/style/_material-definition.scss +1 -1
- package/lib/component/delivery-planning-main/component/delivery-planning-overview/delivery-planning-overview.component.d.ts +23 -10
- package/lib/component/delivery-planning-main/delivery-planning-main.component.d.ts +14 -7
- package/lib/component/transaction-card/transaction-card/style/_layout.scss +14 -1
- package/lib/component/transaction-card/transaction-card-planning/transaction-card-planning.component.d.ts +2 -0
- package/lib/component/transaction-header/transaction-header/style/_layout.scss +4 -0
- package/lib/component/transaction-line/transaction-planning-line/transaction-planning-line.component.d.ts +3 -2
- package/lib/component/transaction-lines-side-panel/transaction-lines-side-panel-service-order/transaction-lines-side-panel-service-order.component.d.ts +2 -0
- package/lib/component/transaction-quick-access/transaction-quick-access-planning/transaction-quick-access-planning.component.d.ts +1 -0
- package/lib/component/transaction-quick-access/transaction-quick-access-send-method-base.component.d.ts +1 -1
- package/lib/component/transaction-service-overview/style/_layout.scss +14 -6
- package/lib/enum/checkout-cfg-name.enum.d.ts +2 -0
- package/lib/enum/delivery-planning-update-actions.enum.d.ts +6 -0
- package/lib/enum/transaction-cfg-name.enum.d.ts +12 -1
- package/lib/service/transaction-connector-adapter.service.d.ts +1 -0
- package/lib/service/transaction-connector.service.d.ts +1 -0
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __awaiter } from 'tslib';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { Injectable, Component, ViewEncapsulation, Input, HostBinding, EventEmitter, ChangeDetectorRef, Output, Injector, ComponentFactoryResolver, ApplicationRef, Directive, ViewChild, ViewChildren, ElementRef, forwardRef, Pipe, NgModule, ContentChildren, HostListener, ChangeDetectionStrategy, Renderer2
|
|
3
|
+
import { Injectable, Component, ViewEncapsulation, Input, HostBinding, EventEmitter, ChangeDetectorRef, Output, Injector, ComponentFactoryResolver, ApplicationRef, Directive, ViewChild, ViewChildren, ElementRef, forwardRef, Pipe, NgModule, ContentChildren, HostListener, ChangeDetectionStrategy, Renderer2 } from '@angular/core';
|
|
4
4
|
import { SequenceName } from '@colijnit/transactionapi/build/enum/sequence-name.enum';
|
|
5
5
|
import { BehaviorSubject, Subject, throwError } from 'rxjs';
|
|
6
6
|
import { PendingReasonType } from '@colijnit/transactionapi/build/enum/pending-reason-type.enum';
|
|
@@ -268,8 +268,8 @@ class Version {
|
|
|
268
268
|
constructor() {
|
|
269
269
|
this.name = "@colijnit/transaction";
|
|
270
270
|
this.description = "Colijn IT transaction package";
|
|
271
|
-
this.symVer = "255.1.
|
|
272
|
-
this.publishDate = "
|
|
271
|
+
this.symVer = "255.1.47";
|
|
272
|
+
this.publishDate = "7-10-2024 18:54:44";
|
|
273
273
|
}
|
|
274
274
|
}
|
|
275
275
|
|
|
@@ -6133,6 +6133,17 @@ class TransactionConnectorAdapterService {
|
|
|
6133
6133
|
}
|
|
6134
6134
|
});
|
|
6135
6135
|
}
|
|
6136
|
+
restoreDeliverySettings(ordersToBeRestored) {
|
|
6137
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
6138
|
+
const response = yield this.connector.restoreDeliverySettings(ordersToBeRestored);
|
|
6139
|
+
if (response && response.validationResult.success) {
|
|
6140
|
+
return true;
|
|
6141
|
+
}
|
|
6142
|
+
else {
|
|
6143
|
+
return false;
|
|
6144
|
+
}
|
|
6145
|
+
});
|
|
6146
|
+
}
|
|
6136
6147
|
_openPdfContent(content) {
|
|
6137
6148
|
if (content) {
|
|
6138
6149
|
try {
|
|
@@ -7701,6 +7712,11 @@ class TransactionConnectorService {
|
|
|
7701
7712
|
return yield this._adapterService.getUserGroups();
|
|
7702
7713
|
});
|
|
7703
7714
|
}
|
|
7715
|
+
restoreDeliverySettings(ordersToBeRestored) {
|
|
7716
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
7717
|
+
return yield this._adapterService.restoreDeliverySettings(ordersToBeRestored);
|
|
7718
|
+
});
|
|
7719
|
+
}
|
|
7704
7720
|
}
|
|
7705
7721
|
TransactionConnectorService.ɵprov = i0.ɵɵdefineInjectable({ factory: function TransactionConnectorService_Factory() { return new TransactionConnectorService(i0.ɵɵinject(TransactionConnectorAdapterService), i0.ɵɵinject(TransactionSelectSingleCacheService), i0.ɵɵinject(TransactionSelectMultipleCacheService), i0.ɵɵinject(TransactionSelectMultipleParameterizedCacheService), i0.ɵɵinject(TransactionSelectSingleParameterizedCacheService)); }, token: TransactionConnectorService, providedIn: "root" });
|
|
7706
7722
|
TransactionConnectorService.decorators = [
|
|
@@ -7940,6 +7956,17 @@ var TransactionCfgName;
|
|
|
7940
7956
|
/* Invoice_check rubric */
|
|
7941
7957
|
/* Service Overview Tab*/
|
|
7942
7958
|
TransactionCfgName["ServiceMessage"] = "serviceMessage";
|
|
7959
|
+
TransactionCfgName["ServiceWizardMessage"] = "serviceWizardMessage";
|
|
7960
|
+
TransactionCfgName["ServiceOverviewImage"] = "serviceOverviewImage";
|
|
7961
|
+
TransactionCfgName["ServicePriority"] = "servicePriority";
|
|
7962
|
+
TransactionCfgName["ServiceCauseCode"] = "serviceCauseCode";
|
|
7963
|
+
TransactionCfgName["ServiceEntryType"] = "serviceEntryType";
|
|
7964
|
+
TransactionCfgName["HeaderTaskCreator"] = "headerTaskCreator";
|
|
7965
|
+
TransactionCfgName["HeaderActivityList"] = "headerActivityList";
|
|
7966
|
+
TransactionCfgName["HeaderHistActivities"] = "headerHistActivities";
|
|
7967
|
+
TransactionCfgName["HeaderProductDetails"] = "headerProductDetails";
|
|
7968
|
+
TransactionCfgName["HeaderOrderDetails"] = "headerOrderDetails";
|
|
7969
|
+
TransactionCfgName["HeaderPurchaseDetails"] = "headerPurchaseDetails";
|
|
7943
7970
|
})(TransactionCfgName || (TransactionCfgName = {}));
|
|
7944
7971
|
|
|
7945
7972
|
class TransactionScreenConfigurationService extends BaseModuleScreenConfigService {
|
|
@@ -12430,6 +12457,8 @@ var CheckoutCfgName;
|
|
|
12430
12457
|
CheckoutCfgName["DepositAmount"] = "depositAmount";
|
|
12431
12458
|
CheckoutCfgName["Branch"] = "branch";
|
|
12432
12459
|
CheckoutCfgName["AdministrativeManager"] = "administrativeManager";
|
|
12460
|
+
CheckoutCfgName["SalesPerson"] = "salesPerson";
|
|
12461
|
+
CheckoutCfgName["PaymentCondition"] = "paymentCondition";
|
|
12433
12462
|
CheckoutCfgName["MarketingCode"] = "marketingCode";
|
|
12434
12463
|
CheckoutCfgName["Definitive"] = "definitive";
|
|
12435
12464
|
CheckoutCfgName["OnHoldCodes"] = "onHoldCodes";
|
|
@@ -13529,6 +13558,15 @@ CheckoutOverviewDeliveryEditComponent.decorators = [
|
|
|
13529
13558
|
[screenConfigurationObject]="cfgNames.AdministrativeManager"
|
|
13530
13559
|
[transactionInfo]="transaction.transactionInfo"></co-transaction-header-administrative-relation>
|
|
13531
13560
|
</div>
|
|
13561
|
+
<div class="checkout-data-row">
|
|
13562
|
+
<co-transaction-header-payment-condition
|
|
13563
|
+
[screenConfigurationObject]="cfgNames.PaymentCondition"
|
|
13564
|
+
[transactionInfo]="transaction.transactionInfo">
|
|
13565
|
+
</co-transaction-header-payment-condition>
|
|
13566
|
+
<co-transaction-header-sales-person
|
|
13567
|
+
[screenConfigurationObject]="cfgNames.SalesPerson"
|
|
13568
|
+
[transactionInfo]="transaction.transactionInfo"></co-transaction-header-sales-person>
|
|
13569
|
+
</div>
|
|
13532
13570
|
<div class="checkout-data-row" *ngIf="showOrderParameters">
|
|
13533
13571
|
<co-transaction-header-definitive
|
|
13534
13572
|
[screenConfigurationObject]="cfgNames.Definitive"
|
|
@@ -23609,12 +23647,12 @@ class DeliveryPlanningService {
|
|
|
23609
23647
|
this._transaction = _transaction;
|
|
23610
23648
|
this._dragging = false;
|
|
23611
23649
|
this._planTransportWeek = [];
|
|
23650
|
+
this._planTransportWeekArr = [];
|
|
23612
23651
|
this._deliveryMethods = [];
|
|
23613
23652
|
this._districts = [];
|
|
23614
23653
|
this._skills = [];
|
|
23615
23654
|
this._employees = [];
|
|
23616
23655
|
this._userGroups = [];
|
|
23617
|
-
this._tilesQueryList = new QueryList();
|
|
23618
23656
|
this.currentCalendarMode = DeliveryPlanningCalendarModes.Week;
|
|
23619
23657
|
this.currentTileMode = DeliveryPlanningTileModes.Normal;
|
|
23620
23658
|
this.datePlanningMode = CalendarView.WeekView;
|
|
@@ -23622,6 +23660,7 @@ class DeliveryPlanningService {
|
|
|
23622
23660
|
this.currentPlanningMode = DeliveryPlanningModes.Transaction;
|
|
23623
23661
|
this.currentStartDate = new Date();
|
|
23624
23662
|
this.availabilityCheckEvent = new Subject();
|
|
23663
|
+
this.reRenderHourScheduling = new Subject();
|
|
23625
23664
|
}
|
|
23626
23665
|
get dragging() {
|
|
23627
23666
|
return this._dragging;
|
|
@@ -23629,6 +23668,9 @@ class DeliveryPlanningService {
|
|
|
23629
23668
|
get planTransportWeek() {
|
|
23630
23669
|
return this._planTransportWeek;
|
|
23631
23670
|
}
|
|
23671
|
+
get planTransportWeekArr() {
|
|
23672
|
+
return this._planTransportWeekArr;
|
|
23673
|
+
}
|
|
23632
23674
|
get deliveryMethods() {
|
|
23633
23675
|
return this._deliveryMethods;
|
|
23634
23676
|
}
|
|
@@ -23644,9 +23686,6 @@ class DeliveryPlanningService {
|
|
|
23644
23686
|
get userGroups() {
|
|
23645
23687
|
return this._userGroups;
|
|
23646
23688
|
}
|
|
23647
|
-
get queryList() {
|
|
23648
|
-
return this._tilesQueryList;
|
|
23649
|
-
}
|
|
23650
23689
|
set dragging(value) {
|
|
23651
23690
|
if (!this._dragging && value) {
|
|
23652
23691
|
this.availabilityCheckEvent.next(this.currentTransId);
|
|
@@ -23656,6 +23695,9 @@ class DeliveryPlanningService {
|
|
|
23656
23695
|
set planTransportWeek(value) {
|
|
23657
23696
|
this._planTransportWeek = value;
|
|
23658
23697
|
}
|
|
23698
|
+
set planTransportWeekArr(value) {
|
|
23699
|
+
this._planTransportWeekArr = value;
|
|
23700
|
+
}
|
|
23659
23701
|
set deliveryMethods(methods) {
|
|
23660
23702
|
this._deliveryMethods = methods;
|
|
23661
23703
|
}
|
|
@@ -23678,14 +23720,16 @@ class DeliveryPlanningService {
|
|
|
23678
23720
|
}
|
|
23679
23721
|
getTransportOrders(planningTransportWeekDay) {
|
|
23680
23722
|
return __awaiter(this, void 0, void 0, function* () {
|
|
23681
|
-
|
|
23682
|
-
|
|
23683
|
-
|
|
23684
|
-
|
|
23685
|
-
|
|
23686
|
-
|
|
23687
|
-
|
|
23688
|
-
|
|
23723
|
+
if (planningTransportWeekDay.transport) {
|
|
23724
|
+
let request = new GetTransportOrdersRequest();
|
|
23725
|
+
request.transportId = planningTransportWeekDay.transport.transportId;
|
|
23726
|
+
request.date = planningTransportWeekDay.date;
|
|
23727
|
+
request.planningId = this.currentPlanning.planningId;
|
|
23728
|
+
const orderResponse = yield this._transaction.getTransportOrders(request);
|
|
23729
|
+
if (orderResponse && orderResponse.length > 0) {
|
|
23730
|
+
planningTransportWeekDay.plannedOrders = orderResponse;
|
|
23731
|
+
planningTransportWeekDay.ordersLoaded = true;
|
|
23732
|
+
}
|
|
23689
23733
|
}
|
|
23690
23734
|
return planningTransportWeekDay;
|
|
23691
23735
|
});
|
|
@@ -23705,33 +23749,93 @@ class DeliveryPlanningService {
|
|
|
23705
23749
|
return request;
|
|
23706
23750
|
}
|
|
23707
23751
|
}
|
|
23708
|
-
addHours(date, hours) {
|
|
23709
|
-
const hoursToAdd = hours * 60 * 60 * 1000;
|
|
23710
|
-
date.setTime(date.getTime() + hoursToAdd);
|
|
23711
|
-
return date;
|
|
23712
|
-
}
|
|
23713
|
-
queryListTile(transportId) {
|
|
23714
|
-
let newTile;
|
|
23715
|
-
this._tilesQueryList.forEach(tile => {
|
|
23716
|
-
if (tile.transportDay.transport.transportId === transportId) {
|
|
23717
|
-
newTile = tile;
|
|
23718
|
-
}
|
|
23719
|
-
});
|
|
23720
|
-
return newTile;
|
|
23721
|
-
}
|
|
23722
23752
|
getPlanningTransportWeek() {
|
|
23723
23753
|
return __awaiter(this, void 0, void 0, function* () {
|
|
23724
|
-
let weekArrays = [];
|
|
23725
23754
|
this._transaction.getPlanTransportWeek(this.currentStartDate, this.currentPlanning.planningId).then((result) => {
|
|
23726
23755
|
if (result.length > 0) {
|
|
23727
|
-
|
|
23728
|
-
|
|
23729
|
-
});
|
|
23756
|
+
this._planTransportWeek = result;
|
|
23757
|
+
this._planTransportWeekArr = this.convertPlanningTransportWeekToArray(this._planTransportWeek);
|
|
23730
23758
|
}
|
|
23731
23759
|
});
|
|
23732
|
-
return weekArrays;
|
|
23733
23760
|
});
|
|
23734
23761
|
}
|
|
23762
|
+
updatePlanningTransportValues() {
|
|
23763
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23764
|
+
// Get new planning transport week data from the backend
|
|
23765
|
+
let newPlanningTransportWeek = yield this._transaction.getPlanTransportWeek(this.currentStartDate, this.currentPlanning.planningId);
|
|
23766
|
+
// Convert the new planning transport week data to a nested array
|
|
23767
|
+
let newPlanningNestedArr = this.convertPlanningTransportWeekToArray(newPlanningTransportWeek);
|
|
23768
|
+
// Update the old nested array (this._planTransportWeekArr) with new values
|
|
23769
|
+
this._planTransportWeekArr.forEach((oldWeekDays, weekIndex) => {
|
|
23770
|
+
const newWeekDays = newPlanningNestedArr[weekIndex];
|
|
23771
|
+
// Compare each day's data in the old and new nested arrays
|
|
23772
|
+
newWeekDays.forEach((newDay, dayIndex) => __awaiter(this, void 0, void 0, function* () {
|
|
23773
|
+
const oldDay = oldWeekDays[dayIndex];
|
|
23774
|
+
// Check for changes and update only changed properties
|
|
23775
|
+
yield this._updateChangedProperties(oldDay, newDay);
|
|
23776
|
+
}));
|
|
23777
|
+
});
|
|
23778
|
+
});
|
|
23779
|
+
}
|
|
23780
|
+
// Function to update only the changed properties
|
|
23781
|
+
_updateChangedProperties(oldDay, newDay) {
|
|
23782
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23783
|
+
// List of properties to compare
|
|
23784
|
+
const propertiesToCompare = [
|
|
23785
|
+
'minutes',
|
|
23786
|
+
'maxMinutes',
|
|
23787
|
+
'maxFactor',
|
|
23788
|
+
'orderAmount',
|
|
23789
|
+
'load',
|
|
23790
|
+
'maxOrderAmount',
|
|
23791
|
+
'factor',
|
|
23792
|
+
];
|
|
23793
|
+
const transportPropertiesToCompare = [
|
|
23794
|
+
'plannedOrders'
|
|
23795
|
+
];
|
|
23796
|
+
propertiesToCompare.forEach(property => {
|
|
23797
|
+
// Compare and update only if there's a change
|
|
23798
|
+
if (JSON.stringify(oldDay[property]) !== JSON.stringify(newDay[property])) {
|
|
23799
|
+
oldDay[property] = newDay[property];
|
|
23800
|
+
}
|
|
23801
|
+
});
|
|
23802
|
+
transportPropertiesToCompare.forEach(property => {
|
|
23803
|
+
if (oldDay.transport && newDay.transport) {
|
|
23804
|
+
if (JSON.stringify(oldDay.transport[property] !== JSON.stringify(newDay.transport[property]))) {
|
|
23805
|
+
oldDay.transport[property] = newDay === null || newDay === void 0 ? void 0 : newDay.transport[property];
|
|
23806
|
+
}
|
|
23807
|
+
}
|
|
23808
|
+
});
|
|
23809
|
+
yield this.getTransportOrders(oldDay);
|
|
23810
|
+
});
|
|
23811
|
+
}
|
|
23812
|
+
convertPlanningTransportWeekToArray(planningTransportWeek) {
|
|
23813
|
+
let weekArrays = [];
|
|
23814
|
+
if (planningTransportWeek.length > 0) {
|
|
23815
|
+
planningTransportWeek.forEach((team) => {
|
|
23816
|
+
weekArrays.push(Object.keys(team).sort().map(key => team[key]));
|
|
23817
|
+
});
|
|
23818
|
+
}
|
|
23819
|
+
return weekArrays;
|
|
23820
|
+
}
|
|
23821
|
+
convertToPlanTransportWeek(nestedArray) {
|
|
23822
|
+
let planTransportWeeks = [];
|
|
23823
|
+
nestedArray.forEach((weekDays) => {
|
|
23824
|
+
let planTransportWeek = {}; // Create an empty object to hold the week's days
|
|
23825
|
+
// Start from "day1" and assign the PlanningTransportWeekDay objects (excluding the transportId)
|
|
23826
|
+
weekDays.forEach((day, dayIndex) => {
|
|
23827
|
+
if (dayIndex === 7) {
|
|
23828
|
+
planTransportWeek['transportId'] = weekDays[dayIndex];
|
|
23829
|
+
}
|
|
23830
|
+
else {
|
|
23831
|
+
planTransportWeek[`day${dayIndex + 1}`] = day; // "day1", "day2", etc.
|
|
23832
|
+
}
|
|
23833
|
+
});
|
|
23834
|
+
// Push the object into the final array
|
|
23835
|
+
planTransportWeeks.push(planTransportWeek);
|
|
23836
|
+
});
|
|
23837
|
+
return planTransportWeeks;
|
|
23838
|
+
}
|
|
23735
23839
|
totalAssemblyTime(planOrder) {
|
|
23736
23840
|
var _a;
|
|
23737
23841
|
if (planOrder) {
|
|
@@ -23808,12 +23912,18 @@ class TransactionPlanningLineComponent extends TransactionBaseComponent {
|
|
|
23808
23912
|
this.transactionLine.selected = value && !this.transactionLineToBePickedCompleted;
|
|
23809
23913
|
}));
|
|
23810
23914
|
}
|
|
23915
|
+
ngOnDestroy() {
|
|
23916
|
+
super.ngOnDestroy();
|
|
23917
|
+
if (this._deliveryPlanningService.planOrderDate) {
|
|
23918
|
+
this._deliveryPlanningService.planOrderDate = undefined;
|
|
23919
|
+
}
|
|
23920
|
+
}
|
|
23811
23921
|
handleCheckBoxValueChanged(value, line) {
|
|
23812
23922
|
this.transactionLine.selected = value;
|
|
23813
23923
|
}
|
|
23814
23924
|
handleLineClicked(mouseClick) {
|
|
23815
|
-
if (this.
|
|
23816
|
-
|
|
23925
|
+
if (this.transactionLines.filter(line => !this.lineNotPlanned(line))) {
|
|
23926
|
+
this._deliveryPlanningService.planOrderDate = new Date(this.transactionLines.filter(line => !this.lineNotPlanned(line))[0].deliveryDate);
|
|
23817
23927
|
}
|
|
23818
23928
|
const target = mouseClick.target;
|
|
23819
23929
|
if (target && target.dataset && target.dataset['action'] && target.dataset['action'] === 'openSidePanel') {
|
|
@@ -23851,7 +23961,7 @@ TransactionPlanningLineComponent.decorators = [
|
|
|
23851
23961
|
[isFirst]="isFirst"
|
|
23852
23962
|
[draggable]="lineNotPlanned(transactionLine)"
|
|
23853
23963
|
(dragstart)="dragStarted($event)"
|
|
23854
|
-
[checkbox]="
|
|
23964
|
+
[checkbox]="lineNotPlanned(transactionLine)"
|
|
23855
23965
|
[checkboxValue]="transactionLine.selected"
|
|
23856
23966
|
[checkboxReadonly]="false"
|
|
23857
23967
|
(checkboxValueChanged)="handleCheckBoxValueChanged($event, transactionLine)"
|
|
@@ -24019,6 +24129,9 @@ class TransactionQuickAccessPlanningComponent extends TransactionBaseComponent {
|
|
|
24019
24129
|
return ((_d = (_c = this._transactionService.currentTransaction) === null || _c === void 0 ? void 0 : _c.transactionInfo) === null || _d === void 0 ? void 0 : _d.allowPartialDelivery) ? (_f = (_e = this._transactionService.currentTransaction) === null || _e === void 0 ? void 0 : _e.transactionInfo) === null || _f === void 0 ? void 0 : _f.allowPartialDelivery : false;
|
|
24020
24130
|
}
|
|
24021
24131
|
}
|
|
24132
|
+
isOrderFullyPlanned() {
|
|
24133
|
+
return this._transactionService.currentTransaction.transactionLines.filter(line => line.articleLineStatus.quantityPlanningFinal !== 0).length > 0;
|
|
24134
|
+
}
|
|
24022
24135
|
}
|
|
24023
24136
|
TransactionQuickAccessPlanningComponent.decorators = [
|
|
24024
24137
|
{ type: Component, args: [{
|
|
@@ -24049,7 +24162,7 @@ TransactionQuickAccessPlanningComponent.decorators = [
|
|
|
24049
24162
|
(click)="togglePopup()"></co-button>
|
|
24050
24163
|
</div>
|
|
24051
24164
|
</ng-template>
|
|
24052
|
-
<div class="select-all-wrapper" *ngIf="!allowPartialDelivery()">
|
|
24165
|
+
<div class="select-all-wrapper" *ngIf="!allowPartialDelivery() && !isOrderFullyPlanned()">
|
|
24053
24166
|
<co-input-checkbox
|
|
24054
24167
|
[label]="'SELECT_ALL_LINES' | localize"
|
|
24055
24168
|
(modelChange)="handleSelectAllLines($event)"
|
|
@@ -24087,104 +24200,109 @@ TransactionCardPurchaseConfirmationComponent.decorators = [
|
|
|
24087
24200
|
{ type: Component, args: [{
|
|
24088
24201
|
selector: 'co-transaction-card-purchase-confirmation',
|
|
24089
24202
|
template: `
|
|
24090
|
-
|
|
24091
|
-
|
|
24203
|
+
<co-transaction-base-card
|
|
24204
|
+
[transactionInfo]="transactionInfo"
|
|
24205
|
+
[transactionLine]="transactionLine"
|
|
24206
|
+
[showColorIndicator]="showColorIndicator"
|
|
24207
|
+
[colorIndicatorColor]="colorIndicatorColor"
|
|
24208
|
+
(dragover)="handleDragOver($event)"
|
|
24209
|
+
(drop)="handleDrop($event)"
|
|
24210
|
+
(dragleave)="handleDragLeave($event)"
|
|
24211
|
+
>
|
|
24212
|
+
<div class="transaction-card-wrapper">
|
|
24213
|
+
<co-transaction-card-header
|
|
24214
|
+
[transactionLine]="transactionLine"
|
|
24215
|
+
[showActionButtons]="true"
|
|
24216
|
+
[showCheckbox]="showCheckboxForLine"
|
|
24217
|
+
[showThumbnail]="false"
|
|
24218
|
+
[expanded]="expanded"
|
|
24219
|
+
>
|
|
24220
|
+
</co-transaction-card-header>
|
|
24221
|
+
|
|
24222
|
+
<div class="transaction-card-content-wrapper">
|
|
24223
|
+
<div class="content-base top-base">
|
|
24224
|
+
<co-transaction-line-commission-button [transactionLine]="transactionLine"
|
|
24225
|
+
[transactionInfo]="transactionInfo"></co-transaction-line-commission-button>
|
|
24226
|
+
<co-transaction-line-supplier-button [transactionLine]="transactionLine"
|
|
24227
|
+
[transactionInfo]="transactionInfo"></co-transaction-line-supplier-button>
|
|
24228
|
+
<co-transaction-line-statusbar data-action="openSidePanel"
|
|
24229
|
+
[screenConfigurationObject]="cfgNames.StatusBar"
|
|
24230
|
+
[configNames]="statusBarConfigNames"
|
|
24231
|
+
[transactionInfo]="transactionInfo"
|
|
24232
|
+
[transactionLine]="transactionLine"
|
|
24233
|
+
[activeCategory]="transactionTypeCategory.PurchaseOrderOrderConfirmation"
|
|
24234
|
+
></co-transaction-line-statusbar>
|
|
24235
|
+
</div>
|
|
24236
|
+
<div class="content-base bottom-base">
|
|
24237
|
+
<co-input-text
|
|
24238
|
+
class="transaction-line-totals-price"
|
|
24239
|
+
[class.warning]="showColorIndicator && transactionLine.purchasePortalLine.grossOrderPrice != transactionLine.purchasePortalLine.confirmedPrice"
|
|
24240
|
+
[model]="transactionLine.purchasePortalLine.grossOrderPrice | coCurrency"
|
|
24241
|
+
[readonly]="true"
|
|
24242
|
+
[customHeight]="true">
|
|
24243
|
+
</co-input-text>
|
|
24244
|
+
<co-transaction-line-discount-button
|
|
24245
|
+
[screenConfigurationObject]="cfgNames.LineDiscount"
|
|
24092
24246
|
[transactionLine]="transactionLine"
|
|
24093
|
-
[
|
|
24094
|
-
|
|
24095
|
-
|
|
24096
|
-
|
|
24097
|
-
|
|
24098
|
-
|
|
24099
|
-
|
|
24100
|
-
|
|
24101
|
-
|
|
24102
|
-
|
|
24103
|
-
[showCheckbox]="showCheckboxForLine"
|
|
24104
|
-
[showThumbnail]="false"
|
|
24105
|
-
[expanded]="expanded"
|
|
24106
|
-
>
|
|
24107
|
-
</co-transaction-card-header>
|
|
24108
|
-
|
|
24109
|
-
<div class="transaction-card-content-wrapper">
|
|
24110
|
-
<div class="content-base top-base">
|
|
24111
|
-
<co-transaction-line-commission-button [transactionLine]="transactionLine" [transactionInfo]="transactionInfo"></co-transaction-line-commission-button>
|
|
24112
|
-
<co-transaction-line-supplier-button [transactionLine]="transactionLine" [transactionInfo]="transactionInfo"></co-transaction-line-supplier-button>
|
|
24113
|
-
<co-transaction-line-statusbar data-action="openSidePanel"
|
|
24114
|
-
[screenConfigurationObject]="cfgNames.StatusBar"
|
|
24115
|
-
[configNames]="statusBarConfigNames"
|
|
24116
|
-
[transactionInfo]="transactionInfo"
|
|
24117
|
-
[transactionLine]="transactionLine"
|
|
24118
|
-
[activeCategory]="transactionTypeCategory.PurchaseOrderOrderConfirmation"
|
|
24119
|
-
></co-transaction-line-statusbar>
|
|
24120
|
-
</div>
|
|
24121
|
-
<div class="content-base bottom-base">
|
|
24122
|
-
<co-input-text class="transaction-line-totals-price"
|
|
24123
|
-
[model]="transactionLine.purchasePortalLine.grossOrderPrice | coCurrency"
|
|
24124
|
-
[readonly]="true"
|
|
24125
|
-
[customHeight]="true"
|
|
24126
|
-
></co-input-text>
|
|
24127
|
-
<co-transaction-line-discount-button
|
|
24128
|
-
[screenConfigurationObject]="cfgNames.LineDiscount"
|
|
24129
|
-
[transactionLine]="transactionLine"
|
|
24130
|
-
[transactionInfo]="transactionInfo"
|
|
24131
|
-
></co-transaction-line-discount-button>
|
|
24132
|
-
<div class="transaction-line-totals-amount">
|
|
24133
|
-
<co-input-text
|
|
24134
|
-
[model]="transactionLine.amount"
|
|
24135
|
-
[leftIconData]="iconCacheService.getIcon(icons.CartShoppingRegular)"
|
|
24136
|
-
[readonly]="true"
|
|
24137
|
-
[customHeight]="true"
|
|
24138
|
-
></co-input-text>
|
|
24139
|
-
</div>
|
|
24140
|
-
<co-input-text class="transaction-line-totals-total"
|
|
24141
|
-
[model]="transactionLine.displayNetLineTotal | coCurrency"
|
|
24142
|
-
[readonly]="true"
|
|
24143
|
-
[customHeight]="true"
|
|
24144
|
-
></co-input-text>
|
|
24145
|
-
</div>
|
|
24146
|
-
<div class="content-expanded" *ngIf="expanded">
|
|
24147
|
-
<co-input-text
|
|
24148
|
-
[model]="transactionLine.purchasePortalLine.articleNoSupplier ? transactionLine.purchasePortalLine.articleNoSupplier : '-'"
|
|
24149
|
-
[leftIconData]="iconCacheService.getIcon(icons.RegularIndustryTag)"
|
|
24150
|
-
[customHeight]="true"
|
|
24151
|
-
[readonly]="true"
|
|
24152
|
-
></co-input-text>
|
|
24153
|
-
<co-transaction-line-supplier-delivery-date-button
|
|
24154
|
-
[screenConfigurationObject]="cfgNames.LineConfirmedDate"
|
|
24155
|
-
[transactionLine]="transactionLine"
|
|
24156
|
-
></co-transaction-line-supplier-delivery-date-button>
|
|
24157
|
-
</div>
|
|
24158
|
-
<div class="content-expanded" *ngIf="expanded">
|
|
24159
|
-
<co-input-number-picker class="amount-number-picker"
|
|
24160
|
-
[screenConfigurationObject]="cfgNames.LineConfirmedAmount"
|
|
24161
|
-
[required]="true"
|
|
24162
|
-
[(model)]="+transactionLine.quantityPurchaseToConfirm"
|
|
24163
|
-
[decimals]="decimals"
|
|
24164
|
-
[min]="1"
|
|
24165
|
-
[max]="+transactionLine.purchasePortalLine.amountOrdered"
|
|
24166
|
-
[leftIconData]="iconCacheService.getIcon(icons.FileCircleInfoRegular)"
|
|
24167
|
-
></co-input-number-picker>
|
|
24168
|
-
<co-transaction-line-confirmed-price class="transaction-line-confirmed-price price"
|
|
24169
|
-
[screenConfigurationObject]="cfgNames.LineConfirmedPrice"
|
|
24170
|
-
[(price)]="transactionLine.purchasePortalLine.confirmedPrice"
|
|
24171
|
-
[showLabel]="false"
|
|
24172
|
-
[defaultEditMode]="false"
|
|
24173
|
-
></co-transaction-line-confirmed-price>
|
|
24174
|
-
</div>
|
|
24247
|
+
[transactionInfo]="transactionInfo"
|
|
24248
|
+
></co-transaction-line-discount-button>
|
|
24249
|
+
<div class="transaction-line-totals-amount">
|
|
24250
|
+
<co-input-text
|
|
24251
|
+
[class.warning]="showColorIndicator && transactionLine.amount !== transactionLine.quantityPurchaseToConfirm"
|
|
24252
|
+
[model]="transactionLine.amount"
|
|
24253
|
+
[leftIconData]="iconCacheService.getIcon(icons.CartShoppingRegular)"
|
|
24254
|
+
[readonly]="true"
|
|
24255
|
+
[customHeight]="true"
|
|
24256
|
+
></co-input-text>
|
|
24175
24257
|
</div>
|
|
24176
|
-
|
|
24177
|
-
|
|
24178
|
-
|
|
24179
|
-
|
|
24180
|
-
|
|
24181
|
-
|
|
24182
|
-
|
|
24183
|
-
|
|
24184
|
-
|
|
24258
|
+
<co-input-text class="transaction-line-totals-total"
|
|
24259
|
+
[model]="transactionLine.displayNetLineTotal | coCurrency"
|
|
24260
|
+
[readonly]="true"
|
|
24261
|
+
[customHeight]="true"
|
|
24262
|
+
></co-input-text>
|
|
24263
|
+
</div>
|
|
24264
|
+
<div class="content-expanded" *ngIf="expanded">
|
|
24265
|
+
<co-input-text
|
|
24266
|
+
[model]="transactionLine.purchasePortalLine.articleNoSupplier ? transactionLine.purchasePortalLine.articleNoSupplier : '-'"
|
|
24267
|
+
[leftIconData]="iconCacheService.getIcon(icons.RegularIndustryTag)"
|
|
24268
|
+
[customHeight]="true"
|
|
24269
|
+
[readonly]="true"
|
|
24270
|
+
></co-input-text>
|
|
24271
|
+
<co-transaction-line-supplier-delivery-date-button
|
|
24272
|
+
[screenConfigurationObject]="cfgNames.LineConfirmedDate"
|
|
24273
|
+
[transactionLine]="transactionLine"
|
|
24274
|
+
></co-transaction-line-supplier-delivery-date-button>
|
|
24275
|
+
</div>
|
|
24276
|
+
<div class="content-expanded" *ngIf="expanded">
|
|
24277
|
+
<co-input-number-picker class="amount-number-picker"
|
|
24278
|
+
[screenConfigurationObject]="cfgNames.LineConfirmedAmount"
|
|
24279
|
+
[required]="true"
|
|
24280
|
+
[(model)]="+transactionLine.quantityPurchaseToConfirm"
|
|
24281
|
+
[decimals]="decimals"
|
|
24282
|
+
[min]="1"
|
|
24283
|
+
[max]="+transactionLine.purchasePortalLine.amountOrdered"
|
|
24284
|
+
[leftIconData]="iconCacheService.getIcon(icons.FileCircleInfoRegular)"
|
|
24285
|
+
></co-input-number-picker>
|
|
24286
|
+
<co-transaction-line-confirmed-price class="transaction-line-confirmed-price price"
|
|
24287
|
+
[screenConfigurationObject]="cfgNames.LineConfirmedPrice"
|
|
24288
|
+
[(price)]="transactionLine.purchasePortalLine.confirmedPrice"
|
|
24289
|
+
[showLabel]="false"
|
|
24290
|
+
[defaultEditMode]="false"
|
|
24291
|
+
></co-transaction-line-confirmed-price>
|
|
24292
|
+
</div>
|
|
24185
24293
|
</div>
|
|
24186
|
-
|
|
24187
|
-
|
|
24294
|
+
|
|
24295
|
+
<co-transaction-card-footer
|
|
24296
|
+
[statusBarConfigNames]="statusBarConfigNames"
|
|
24297
|
+
[transaction]="transaction"
|
|
24298
|
+
[transactionLine]="transactionLine"
|
|
24299
|
+
[transactionTypeCategory]="transactionTypeCategory.SalesOrderPurchase"
|
|
24300
|
+
[expanded]="expanded"
|
|
24301
|
+
(expandClicked)="expanded = !expanded"
|
|
24302
|
+
></co-transaction-card-footer>
|
|
24303
|
+
</div>
|
|
24304
|
+
</co-transaction-base-card>
|
|
24305
|
+
`,
|
|
24188
24306
|
encapsulation: ViewEncapsulation.None
|
|
24189
24307
|
},] }
|
|
24190
24308
|
];
|
|
@@ -24203,6 +24321,7 @@ class TransactionLinesSidePanelServiceOrderComponent extends TransactionBaseComp
|
|
|
24203
24321
|
this.transactionService = transactionService;
|
|
24204
24322
|
this.changeDetector = changeDetector;
|
|
24205
24323
|
this.Icon = Icon;
|
|
24324
|
+
this.cfgNames = TransactionCfgName;
|
|
24206
24325
|
this.showDetails = false;
|
|
24207
24326
|
}
|
|
24208
24327
|
showClass() {
|
|
@@ -24226,7 +24345,7 @@ TransactionLinesSidePanelServiceOrderComponent.decorators = [
|
|
|
24226
24345
|
selector: 'co-transaction-lines-side-panel-service-order',
|
|
24227
24346
|
template: `
|
|
24228
24347
|
<div class="full-details-wrapper">
|
|
24229
|
-
<div class="details-wrapper">
|
|
24348
|
+
<div class="details-wrapper" [screenConfigurationObject]="cfgNames.HeaderProductDetails" screenConfigNativeElement>
|
|
24230
24349
|
<div class="details-label-wrapper clickable" (click)="showDetailsClick()">
|
|
24231
24350
|
<label class="detail-label" [textContent]="'ARTICLE_DETAILS' | localize"
|
|
24232
24351
|
></label>
|
|
@@ -24257,7 +24376,7 @@ TransactionLinesSidePanelServiceOrderComponent.decorators = [
|
|
|
24257
24376
|
<div class="show-details-wrapper"
|
|
24258
24377
|
*ngIf="showDetails"
|
|
24259
24378
|
[@slideToggle]="showDetails ? 'open' : 'closed'">
|
|
24260
|
-
<div class="details-wrapper">
|
|
24379
|
+
<div class="details-wrapper" [screenConfigurationObject]="cfgNames.HeaderOrderDetails" screenConfigNativeElement>
|
|
24261
24380
|
<div class="details-label-wrapper">
|
|
24262
24381
|
<label class="detail-label" [textContent]="'SALESORDER_DETAIL' | localize"
|
|
24263
24382
|
></label>
|
|
@@ -24284,7 +24403,7 @@ TransactionLinesSidePanelServiceOrderComponent.decorators = [
|
|
|
24284
24403
|
</div>
|
|
24285
24404
|
</div>
|
|
24286
24405
|
</div>
|
|
24287
|
-
<div class="details-wrapper">
|
|
24406
|
+
<div class="details-wrapper" [screenConfigurationObject]="cfgNames.HeaderPurchaseDetails" screenConfigNativeElement>
|
|
24288
24407
|
<div class="details-label-wrapper">
|
|
24289
24408
|
<label class="detail-label" [textContent]="'PURCHASEORDER_DETAIL' | localize"
|
|
24290
24409
|
></label>
|
|
@@ -24428,19 +24547,34 @@ class TransactionCardPlanningComponent extends TransactionBaseComponent {
|
|
|
24428
24547
|
this._deliveryPlanningService.currentTransId = this.transaction.transactionInfo.id;
|
|
24429
24548
|
ev.dataTransfer.setData("text", "lines");
|
|
24430
24549
|
}
|
|
24550
|
+
lineNotPlanned(line) {
|
|
24551
|
+
if (!this._deliveryPlanningService.linesPlanOrder) {
|
|
24552
|
+
return true;
|
|
24553
|
+
}
|
|
24554
|
+
if (this._deliveryPlanningService.linesPlanOrder.lines.find(line => line.lineNr === line.originalLineNr)) {
|
|
24555
|
+
return false;
|
|
24556
|
+
}
|
|
24557
|
+
else {
|
|
24558
|
+
return true;
|
|
24559
|
+
}
|
|
24560
|
+
}
|
|
24561
|
+
allowPartialDelivery() {
|
|
24562
|
+
var _a;
|
|
24563
|
+
return (_a = this.transactionInfo) === null || _a === void 0 ? void 0 : _a.allowPartialDelivery;
|
|
24564
|
+
}
|
|
24431
24565
|
}
|
|
24432
24566
|
TransactionCardPlanningComponent.decorators = [
|
|
24433
24567
|
{ type: Component, args: [{
|
|
24434
24568
|
selector: "co-transaction-card-planning",
|
|
24435
24569
|
template: `
|
|
24436
24570
|
<div class="transaction-card-wrapper" observeVisibility #observer=visibilityObserve
|
|
24437
|
-
[draggable]="
|
|
24571
|
+
[draggable]="lineNotPlanned(transactionLine)"
|
|
24438
24572
|
(dragstart)="dragStarted($event)"
|
|
24439
24573
|
(visibilityChange)="handleVisibilityChange(transactionLine, $event)">
|
|
24440
24574
|
<co-transaction-card-header
|
|
24441
24575
|
[transactionLine]="transactionLine"
|
|
24442
24576
|
[showActionButtons]="true"
|
|
24443
|
-
[showCheckbox]="
|
|
24577
|
+
[showCheckbox]="lineNotPlanned(transactionLine)"
|
|
24444
24578
|
[expanded]="expanded" [selected]="selected"
|
|
24445
24579
|
(checkboxValueChanged)="selected = $event"
|
|
24446
24580
|
>
|
|
@@ -30613,6 +30747,11 @@ AvatarComponent.decorators = [
|
|
|
30613
30747
|
</svg>
|
|
30614
30748
|
</ng-template>
|
|
30615
30749
|
`,
|
|
30750
|
+
providers: [{
|
|
30751
|
+
provide: SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME,
|
|
30752
|
+
useExisting: forwardRef(() => AvatarComponent)
|
|
30753
|
+
}
|
|
30754
|
+
],
|
|
30616
30755
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
30617
30756
|
encapsulation: ViewEncapsulation.None
|
|
30618
30757
|
},] }
|
|
@@ -30731,8 +30870,8 @@ class TransactionPaymentService {
|
|
|
30731
30870
|
this.pollingForStatusStarted = new Subject();
|
|
30732
30871
|
this.pollingForStatusEnded = new Subject();
|
|
30733
30872
|
this.doNotFetchAmountToPayForRemaining = false;
|
|
30734
|
-
this._paymentStatusPollIntervalMs =
|
|
30735
|
-
this._paymentStatusMaxPollInterval =
|
|
30873
|
+
this._paymentStatusPollIntervalMs = 1000;
|
|
30874
|
+
this._paymentStatusMaxPollInterval = 300; // give the customer 5 minutes (300 x 1 second interval) to pay
|
|
30736
30875
|
this._paymentStatusPollIntervalCount = 0;
|
|
30737
30876
|
}
|
|
30738
30877
|
set currentPaymentMethod(value) {
|
|
@@ -32396,12 +32535,11 @@ TransactionHeaderDeliveryComponent.decorators = [
|
|
|
32396
32535
|
[transactionInfo]="transactionInfo"
|
|
32397
32536
|
></co-transaction-header-delivery-method-button>
|
|
32398
32537
|
|
|
32399
|
-
<!--div class="header-delivery-preferred-deliverydate-label co-transaction-label" [textContent]="'PREFERRED_DATE' | localize"></div>
|
|
32400
32538
|
<co-transaction-header-preferred-delivery-date class="header-delivery-deliverydate"
|
|
32401
32539
|
[transactionInfo]="transactionInfo"
|
|
32402
32540
|
[defaultEditMode]="false"
|
|
32403
32541
|
[showLabel]="false"
|
|
32404
|
-
></co-transaction-header-preferred-delivery-date
|
|
32542
|
+
></co-transaction-header-preferred-delivery-date>
|
|
32405
32543
|
</ng-template>
|
|
32406
32544
|
<ng-template #hiddenBlock>
|
|
32407
32545
|
<co-transaction-header-partial-delivery class="transaction-header-partial-delivery co-transaction-label"
|
|
@@ -34044,6 +34182,10 @@ TransactionHeaderPopupOrderComponent.decorators = [
|
|
|
34044
34182
|
</co-project-code-modal>
|
|
34045
34183
|
</div>
|
|
34046
34184
|
`,
|
|
34185
|
+
providers: [{
|
|
34186
|
+
provide: SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME,
|
|
34187
|
+
useExisting: forwardRef(() => TransactionHeaderPopupOrderComponent)
|
|
34188
|
+
}],
|
|
34047
34189
|
encapsulation: ViewEncapsulation.None
|
|
34048
34190
|
},] }
|
|
34049
34191
|
];
|
|
@@ -38527,7 +38669,9 @@ CheckoutModule.decorators = [
|
|
|
38527
38669
|
ScreenConfigurationModule,
|
|
38528
38670
|
SuggestionsSidebarModule,
|
|
38529
38671
|
ListOfValuesModule,
|
|
38530
|
-
StepperStepModule
|
|
38672
|
+
StepperStepModule,
|
|
38673
|
+
TransactionHeaderSalesPersonModule,
|
|
38674
|
+
TransactionHeaderPaymentConditionModule
|
|
38531
38675
|
],
|
|
38532
38676
|
declarations: [
|
|
38533
38677
|
CheckoutOverviewRelationEditComponent,
|
|
@@ -39303,11 +39447,6 @@ TransactionInternalComponent.decorators = [
|
|
|
39303
39447
|
</div>
|
|
39304
39448
|
</ng-container>
|
|
39305
39449
|
`,
|
|
39306
|
-
providers: [{
|
|
39307
|
-
provide: SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME,
|
|
39308
|
-
useExisting: forwardRef(() => TransactionInternalComponent)
|
|
39309
|
-
}
|
|
39310
|
-
],
|
|
39311
39450
|
encapsulation: ViewEncapsulation.None
|
|
39312
39451
|
},] }
|
|
39313
39452
|
];
|
|
@@ -39379,18 +39518,20 @@ TransactionHeaderComponent.decorators = [
|
|
|
39379
39518
|
[(relation)]="relation"
|
|
39380
39519
|
[transaction]="transaction"
|
|
39381
39520
|
[transactionInfo]="transaction.transactionInfo"></co-transaction-header-relation>
|
|
39382
|
-
<
|
|
39383
|
-
|
|
39384
|
-
|
|
39385
|
-
[transaction]="transaction"
|
|
39386
|
-
[transactionInfo]="transaction.transactionInfo"
|
|
39387
|
-
[transactionTotal]="transaction.transactionTotal"
|
|
39388
|
-
[class.purchase-order-header]="isPurchaseOrder"></co-transaction-header-order>
|
|
39389
|
-
<co-transaction-header-payment *ngIf="!isPurchaseOrder" #carouselItem
|
|
39390
|
-
[screenConfigurationObject]="cfgNames.PaymentInfoHeader"
|
|
39521
|
+
<div class="header-order-payment-wrapper">
|
|
39522
|
+
<co-transaction-header-order #carouselItem
|
|
39523
|
+
[screenConfigurationObject]="cfgNames.OrderInfoHeader"
|
|
39391
39524
|
[(relation)]="relation"
|
|
39392
39525
|
[transaction]="transaction"
|
|
39393
|
-
[transactionInfo]="transaction.transactionInfo"
|
|
39526
|
+
[transactionInfo]="transaction.transactionInfo"
|
|
39527
|
+
[transactionTotal]="transaction.transactionTotal"
|
|
39528
|
+
[class.purchase-order-header]="isPurchaseOrder"></co-transaction-header-order>
|
|
39529
|
+
<co-transaction-header-payment *ngIf="!isPurchaseOrder" #carouselItem
|
|
39530
|
+
[screenConfigurationObject]="cfgNames.PaymentInfoHeader"
|
|
39531
|
+
[(relation)]="relation"
|
|
39532
|
+
[transaction]="transaction"
|
|
39533
|
+
[transactionInfo]="transaction.transactionInfo"></co-transaction-header-payment>
|
|
39534
|
+
</div>
|
|
39394
39535
|
<co-transaction-header-delivery #carouselItem
|
|
39395
39536
|
[screenConfigurationObject]="cfgNames.DeliveryInfoHeader"
|
|
39396
39537
|
[(relation)]="relation"
|
|
@@ -42790,13 +42931,21 @@ DeliveryPlanningComponent.propDecorators = {
|
|
|
42790
42931
|
showClass: [{ type: HostBinding, args: ["class.co-delivery-planning",] }]
|
|
42791
42932
|
};
|
|
42792
42933
|
|
|
42934
|
+
var DeliveryPlanningUpdateActions;
|
|
42935
|
+
(function (DeliveryPlanningUpdateActions) {
|
|
42936
|
+
DeliveryPlanningUpdateActions["PlanOrder"] = "planOrder";
|
|
42937
|
+
DeliveryPlanningUpdateActions["PlanLines"] = "planLines";
|
|
42938
|
+
DeliveryPlanningUpdateActions["DeletePlannedOrder"] = "deletePlannedOrder";
|
|
42939
|
+
DeliveryPlanningUpdateActions["DeletePlannedLines"] = "deletePlannedLines";
|
|
42940
|
+
})(DeliveryPlanningUpdateActions || (DeliveryPlanningUpdateActions = {}));
|
|
42941
|
+
|
|
42793
42942
|
class DeliveryPlanningMainComponent {
|
|
42794
|
-
constructor(_deliveryPlanningService, _viewModeService, _transaction, _changeDetector) {
|
|
42943
|
+
constructor(_deliveryPlanningService, _viewModeService, _transaction, _changeDetector, _transactionEventService) {
|
|
42795
42944
|
this._deliveryPlanningService = _deliveryPlanningService;
|
|
42796
42945
|
this._viewModeService = _viewModeService;
|
|
42797
42946
|
this._transaction = _transaction;
|
|
42798
42947
|
this._changeDetector = _changeDetector;
|
|
42799
|
-
this.
|
|
42948
|
+
this._transactionEventService = _transactionEventService;
|
|
42800
42949
|
}
|
|
42801
42950
|
get currentMode() {
|
|
42802
42951
|
return this._deliveryPlanningService.currentCalendarMode;
|
|
@@ -42807,6 +42956,9 @@ class DeliveryPlanningMainComponent {
|
|
|
42807
42956
|
get currentStartDate() {
|
|
42808
42957
|
return this._deliveryPlanningService.currentStartDate;
|
|
42809
42958
|
}
|
|
42959
|
+
set currentStartDate(date) {
|
|
42960
|
+
this._deliveryPlanningService.currentStartDate = date;
|
|
42961
|
+
}
|
|
42810
42962
|
showClass() {
|
|
42811
42963
|
return true;
|
|
42812
42964
|
}
|
|
@@ -42817,63 +42969,69 @@ class DeliveryPlanningMainComponent {
|
|
|
42817
42969
|
ngAfterViewInit() {
|
|
42818
42970
|
var _a;
|
|
42819
42971
|
if ((_a = this._deliveryPlanningService.currentPlanning) === null || _a === void 0 ? void 0 : _a.planningId) {
|
|
42820
|
-
this.
|
|
42972
|
+
this.getPlanningTransportWeek();
|
|
42821
42973
|
}
|
|
42822
42974
|
}
|
|
42823
42975
|
planningChanged(planning) {
|
|
42824
42976
|
this.planning = planning;
|
|
42825
42977
|
this._deliveryPlanningService.currentPlanning = planning;
|
|
42826
|
-
this.
|
|
42827
|
-
}
|
|
42828
|
-
|
|
42829
|
-
|
|
42830
|
-
|
|
42831
|
-
|
|
42832
|
-
|
|
42833
|
-
|
|
42834
|
-
|
|
42835
|
-
|
|
42978
|
+
this.getPlanningTransportWeek();
|
|
42979
|
+
}
|
|
42980
|
+
// public async updatePlanTransportWeek(updateData:{week: PlanningTransportWeek, action: DeliveryPlanningUpdateActions}) {
|
|
42981
|
+
// if (updateData.week && updateData.week?.day1 && this.fullPlanningTransportWeek.length > 0) {
|
|
42982
|
+
// this.fullPlanningTransportWeek[0].day1 = updateData.week?.day1;
|
|
42983
|
+
// this.fullPlanningTransportWeek[0].day2 = updateData.week?.day2;
|
|
42984
|
+
// this.fullPlanningTransportWeek[0].day3 = updateData.week?.day3;
|
|
42985
|
+
// let updateResult = await this._transaction.updatePlanTransportWeek(this.fullPlanningTransportWeek[0]);
|
|
42986
|
+
// if (updateResult) {
|
|
42987
|
+
// if(updateData.action && updateData.action === DeliveryPlanningUpdateActions.DeletePlannedOrder && this._deliveryPlanningService.deletingOrder) {
|
|
42988
|
+
// this._deliveryPlanningService.deletingOrder.dateResetNeeded = true;
|
|
42989
|
+
// await this._transaction.restoreDeliverySettings([this._deliveryPlanningService.deletingOrder]);
|
|
42990
|
+
// }
|
|
42991
|
+
// await this._transaction.commit();
|
|
42992
|
+
// }
|
|
42993
|
+
// }
|
|
42994
|
+
// this.resetTransportWeek();
|
|
42995
|
+
// }
|
|
42996
|
+
updatePlanTransportWeek(updateData) {
|
|
42997
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
42998
|
+
let result = this._deliveryPlanningService.convertToPlanTransportWeek(this._deliveryPlanningService.planTransportWeekArr);
|
|
42999
|
+
let week = result.find((week) => week['transportId'] === updateData.week[updateData.week.length - 1]);
|
|
43000
|
+
if (week) {
|
|
43001
|
+
let updateResult = yield this._transaction.updatePlanTransportWeek(week);
|
|
43002
|
+
if (updateResult) {
|
|
43003
|
+
if (updateData.action && updateData.action === DeliveryPlanningUpdateActions.DeletePlannedOrder && this._deliveryPlanningService.deletingOrder) {
|
|
43004
|
+
this._deliveryPlanningService.deletingOrder.dateResetNeeded = true;
|
|
43005
|
+
yield this._transaction.restoreDeliverySettings([this._deliveryPlanningService.deletingOrder]);
|
|
43006
|
+
}
|
|
43007
|
+
yield this._transaction.commit();
|
|
43008
|
+
yield this.updateNewValues();
|
|
43009
|
+
if (this._deliveryPlanningService.currentTileMode === DeliveryPlanningTileModes.Calendar) {
|
|
43010
|
+
this._deliveryPlanningService.reRenderHourScheduling.next();
|
|
42836
43011
|
}
|
|
42837
43012
|
}
|
|
43013
|
+
else {
|
|
43014
|
+
yield this.resetPlanningTransportWeek();
|
|
43015
|
+
}
|
|
42838
43016
|
}
|
|
42839
43017
|
});
|
|
42840
43018
|
}
|
|
42841
|
-
|
|
42842
|
-
|
|
42843
|
-
|
|
42844
|
-
|
|
42845
|
-
if (property !== "day1" && property !== "day2" && property !== "day3") {
|
|
42846
|
-
delete copy[property];
|
|
42847
|
-
}
|
|
42848
|
-
}
|
|
42849
|
-
}
|
|
42850
|
-
return copy;
|
|
43019
|
+
updateNewValues() {
|
|
43020
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
43021
|
+
yield this._deliveryPlanningService.updatePlanningTransportValues();
|
|
43022
|
+
});
|
|
42851
43023
|
}
|
|
42852
|
-
|
|
43024
|
+
resetPlanningTransportWeek() {
|
|
42853
43025
|
return __awaiter(this, void 0, void 0, function* () {
|
|
42854
|
-
if (planningTransportWeek && (planningTransportWeek === null || planningTransportWeek === void 0 ? void 0 : planningTransportWeek.day1) && this.fullPlanningTransportWeek.length > 0) {
|
|
42855
|
-
this.fullPlanningTransportWeek[0].day1 = planningTransportWeek === null || planningTransportWeek === void 0 ? void 0 : planningTransportWeek.day1;
|
|
42856
|
-
this.fullPlanningTransportWeek[0].day2 = planningTransportWeek === null || planningTransportWeek === void 0 ? void 0 : planningTransportWeek.day2;
|
|
42857
|
-
this.fullPlanningTransportWeek[0].day3 = planningTransportWeek === null || planningTransportWeek === void 0 ? void 0 : planningTransportWeek.day3;
|
|
42858
|
-
let updateResult = yield this._transaction.updatePlanTransportWeek(this.fullPlanningTransportWeek[0]);
|
|
42859
|
-
if (updateResult) {
|
|
42860
|
-
yield this._transaction.commit();
|
|
42861
|
-
}
|
|
42862
|
-
}
|
|
42863
|
-
this.resetTransportWeek();
|
|
42864
43026
|
});
|
|
42865
43027
|
}
|
|
42866
|
-
|
|
43028
|
+
getPlanningTransportWeek() {
|
|
42867
43029
|
return __awaiter(this, void 0, void 0, function* () {
|
|
42868
|
-
|
|
42869
|
-
|
|
42870
|
-
|
|
42871
|
-
|
|
42872
|
-
|
|
42873
|
-
this.weekFilter(result);
|
|
42874
|
-
this._deliveryPlanningService.planTransportWeek = result;
|
|
42875
|
-
}
|
|
42876
|
-
});
|
|
43030
|
+
if (this._deliveryPlanningService.planOrderDate) {
|
|
43031
|
+
this.currentStartDate = this._deliveryPlanningService.planOrderDate;
|
|
43032
|
+
this._deliveryPlanningService.planOrderDate = undefined;
|
|
43033
|
+
}
|
|
43034
|
+
yield this._deliveryPlanningService.getPlanningTransportWeek();
|
|
42877
43035
|
});
|
|
42878
43036
|
}
|
|
42879
43037
|
getListData() {
|
|
@@ -42912,7 +43070,7 @@ DeliveryPlanningMainComponent.decorators = [
|
|
|
42912
43070
|
<co-delivery-planning-overview [currentMode]="currentMode"
|
|
42913
43071
|
[currentViewMode]="currentViewMode"
|
|
42914
43072
|
(updatePlanningTransportEvent)="updatePlanTransportWeek($event)"
|
|
42915
|
-
(resetPlanningTransportEvent)="
|
|
43073
|
+
(resetPlanningTransportEvent)="getPlanningTransportWeek()"
|
|
42916
43074
|
></co-delivery-planning-overview>
|
|
42917
43075
|
</div>
|
|
42918
43076
|
</div>
|
|
@@ -42926,7 +43084,8 @@ DeliveryPlanningMainComponent.ctorParameters = () => [
|
|
|
42926
43084
|
{ type: DeliveryPlanningService },
|
|
42927
43085
|
{ type: SearchViewModeService },
|
|
42928
43086
|
{ type: TransactionConnectorService },
|
|
42929
|
-
{ type: ChangeDetectorRef }
|
|
43087
|
+
{ type: ChangeDetectorRef },
|
|
43088
|
+
{ type: TransactionEventService }
|
|
42930
43089
|
];
|
|
42931
43090
|
DeliveryPlanningMainComponent.propDecorators = {
|
|
42932
43091
|
showClass: [{ type: HostBinding, args: ["class.co-delivery-planning-main",] }]
|
|
@@ -43082,11 +43241,14 @@ class DeliveryPlanningOverviewTileComponent {
|
|
|
43082
43241
|
this.icons = Icon;
|
|
43083
43242
|
this.tileModes = DeliveryPlanningTileModes;
|
|
43084
43243
|
this.ordersLoaded = false;
|
|
43244
|
+
this._subs = [];
|
|
43085
43245
|
this.disabled = false;
|
|
43086
43246
|
this.expandedEvent = new EventEmitter();
|
|
43087
|
-
this.
|
|
43247
|
+
this.deleteOrderEvent = new EventEmitter();
|
|
43248
|
+
this.deleteOrderLineEvent = new EventEmitter();
|
|
43249
|
+
this.editOrderEvent = new EventEmitter();
|
|
43088
43250
|
this.getTransportOrdersEvent = new EventEmitter();
|
|
43089
|
-
this.
|
|
43251
|
+
this.timeChangeEvent = new EventEmitter();
|
|
43090
43252
|
this.openSettingsDialogEvent = new EventEmitter();
|
|
43091
43253
|
this.calendarPlanEvent = new EventEmitter();
|
|
43092
43254
|
}
|
|
@@ -43103,6 +43265,16 @@ class DeliveryPlanningOverviewTileComponent {
|
|
|
43103
43265
|
this.ordersLoaded = true;
|
|
43104
43266
|
this.getTransportOrdersEvent.emit(this.transportDay);
|
|
43105
43267
|
}
|
|
43268
|
+
this._subs.push(this._deliveryPlanningService.reRenderHourScheduling.subscribe(event => {
|
|
43269
|
+
this.hourSchedulingComp.generateScheduledObjects();
|
|
43270
|
+
}));
|
|
43271
|
+
});
|
|
43272
|
+
}
|
|
43273
|
+
ngOnDestroy() {
|
|
43274
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
43275
|
+
this._subs.forEach((sub) => {
|
|
43276
|
+
sub.unsubscribe();
|
|
43277
|
+
});
|
|
43106
43278
|
});
|
|
43107
43279
|
}
|
|
43108
43280
|
drop(event) {
|
|
@@ -43123,8 +43295,11 @@ class DeliveryPlanningOverviewTileComponent {
|
|
|
43123
43295
|
});
|
|
43124
43296
|
}
|
|
43125
43297
|
}
|
|
43126
|
-
|
|
43127
|
-
this.
|
|
43298
|
+
handleDeleteOrderClick(order) {
|
|
43299
|
+
this.deleteOrderEvent.emit([order, this.transportDay]);
|
|
43300
|
+
}
|
|
43301
|
+
handleDeleteOrderLineClick(data) {
|
|
43302
|
+
this.deleteOrderLineEvent.emit(data);
|
|
43128
43303
|
}
|
|
43129
43304
|
handleSettingsSave() {
|
|
43130
43305
|
}
|
|
@@ -43136,15 +43311,14 @@ class DeliveryPlanningOverviewTileComponent {
|
|
|
43136
43311
|
this.openSettingsDialogEvent.emit(this.transportDay);
|
|
43137
43312
|
}
|
|
43138
43313
|
handleTimeChangeEvent(obj) {
|
|
43139
|
-
|
|
43140
|
-
let order = this.transportDay.plannedOrders.find(planOrder => planOrder.transactionNr === transNr);
|
|
43141
|
-
order.startTime = new Date(obj['startTime']);
|
|
43142
|
-
order.endTime = new Date(obj['endTime']);
|
|
43143
|
-
this.updatePlanningTransportWeek.emit();
|
|
43314
|
+
this.timeChangeEvent.emit(obj);
|
|
43144
43315
|
}
|
|
43145
43316
|
handleCalendarPlanEvent(data) {
|
|
43146
43317
|
this.calendarPlanEvent.emit(data);
|
|
43147
43318
|
}
|
|
43319
|
+
handleEditOrderEvent(planOrder) {
|
|
43320
|
+
this.editOrderEvent.emit(planOrder);
|
|
43321
|
+
}
|
|
43148
43322
|
}
|
|
43149
43323
|
DeliveryPlanningOverviewTileComponent.decorators = [
|
|
43150
43324
|
{ type: Component, args: [{
|
|
@@ -43177,7 +43351,7 @@ DeliveryPlanningOverviewTileComponent.decorators = [
|
|
|
43177
43351
|
<div class="planning-short-line-wrapper" *ngIf="!expanded">
|
|
43178
43352
|
<co-delivery-planning-overview-short-line
|
|
43179
43353
|
*ngFor="let order of transportDay?.plannedOrders"
|
|
43180
|
-
(
|
|
43354
|
+
(deleteOrderEvent)="handleDeleteOrderClick($event)"
|
|
43181
43355
|
[order]="order">
|
|
43182
43356
|
</co-delivery-planning-overview-short-line>
|
|
43183
43357
|
</div>
|
|
@@ -43189,7 +43363,9 @@ DeliveryPlanningOverviewTileComponent.decorators = [
|
|
|
43189
43363
|
*ngIf="tileMode === tileModes.Normal">
|
|
43190
43364
|
<co-delivery-planning-overview-tile-line cdkDrag
|
|
43191
43365
|
*ngFor="let order of transportDay?.plannedOrders"
|
|
43192
|
-
(
|
|
43366
|
+
(deleteOrderEvent)="handleDeleteOrderClick($event)"
|
|
43367
|
+
(deleteOrderLineEvent)="handleDeleteOrderLineClick($event)"
|
|
43368
|
+
(editOrderEvent)="handleEditOrderEvent($event)"
|
|
43193
43369
|
[order]="order">
|
|
43194
43370
|
</co-delivery-planning-overview-tile-line>
|
|
43195
43371
|
</div>
|
|
@@ -43204,14 +43380,16 @@ DeliveryPlanningOverviewTileComponent.decorators = [
|
|
|
43204
43380
|
>
|
|
43205
43381
|
<co-delivery-planning-overview-tile-line cdkDrag
|
|
43206
43382
|
*ngFor="let obj of objects"
|
|
43207
|
-
(
|
|
43383
|
+
(deleteOrderEvent)="handleDeleteOrderClick($event)"
|
|
43384
|
+
(deleteOrderLineEvent)="handleDeleteOrderLineClick($event)"
|
|
43385
|
+
(editOrderEvent)="handleEditOrderEvent($event)"
|
|
43208
43386
|
[order]="obj">
|
|
43209
43387
|
</co-delivery-planning-overview-tile-line>
|
|
43210
43388
|
</div>
|
|
43211
43389
|
</div>
|
|
43212
43390
|
</ng-template>
|
|
43213
43391
|
|
|
43214
|
-
<co-hour-scheduling *ngIf="ordersLoaded && tileMode === tileModes.Calendar"
|
|
43392
|
+
<co-hour-scheduling #hourSchedulingComponent *ngIf="ordersLoaded && tileMode === tileModes.Calendar"
|
|
43215
43393
|
[schedule]="transportDay"
|
|
43216
43394
|
[startTimeProp]="'startTime'"
|
|
43217
43395
|
[endTimeProp]="'endTime'"
|
|
@@ -43242,11 +43420,14 @@ DeliveryPlanningOverviewTileComponent.propDecorators = {
|
|
|
43242
43420
|
disabled: [{ type: Input }],
|
|
43243
43421
|
transportDay: [{ type: Input }],
|
|
43244
43422
|
expandedEvent: [{ type: Output }],
|
|
43245
|
-
|
|
43423
|
+
deleteOrderEvent: [{ type: Output }],
|
|
43424
|
+
deleteOrderLineEvent: [{ type: Output }],
|
|
43425
|
+
editOrderEvent: [{ type: Output }],
|
|
43246
43426
|
getTransportOrdersEvent: [{ type: Output }],
|
|
43247
|
-
|
|
43427
|
+
timeChangeEvent: [{ type: Output }],
|
|
43248
43428
|
openSettingsDialogEvent: [{ type: Output }],
|
|
43249
43429
|
calendarPlanEvent: [{ type: Output }],
|
|
43430
|
+
hourSchedulingComp: [{ type: ViewChild, args: ['hourSchedulingComponent',] }],
|
|
43250
43431
|
showClass: [{ type: HostBinding, args: ["class.co-delivery-planning-overview-tile",] }]
|
|
43251
43432
|
};
|
|
43252
43433
|
|
|
@@ -43259,6 +43440,7 @@ class DeliveryPlanningOverviewComponent {
|
|
|
43259
43440
|
this._changeDetector = _changeDetector;
|
|
43260
43441
|
this.iconCacheService = iconCacheService;
|
|
43261
43442
|
this.icons = Icon;
|
|
43443
|
+
this.planningActions = DeliveryPlanningUpdateActions;
|
|
43262
43444
|
this.tileModes = DeliveryPlanningTileModes;
|
|
43263
43445
|
this.deliveryPlanningViewModes = DeliveryPlanningViewModes;
|
|
43264
43446
|
this.availability = [];
|
|
@@ -43270,7 +43452,6 @@ class DeliveryPlanningOverviewComponent {
|
|
|
43270
43452
|
this.updatePlanningTransportEvent = new EventEmitter();
|
|
43271
43453
|
this.resetPlanningTransportEvent = new EventEmitter();
|
|
43272
43454
|
this.tileSize = 300; //one tile should have this width
|
|
43273
|
-
this.date = new Date();
|
|
43274
43455
|
this.available = false;
|
|
43275
43456
|
this.showNoteDialog = false;
|
|
43276
43457
|
this.showSettingsDialog = false;
|
|
@@ -43283,13 +43464,8 @@ class DeliveryPlanningOverviewComponent {
|
|
|
43283
43464
|
this.planningPopupRef = value;
|
|
43284
43465
|
}
|
|
43285
43466
|
;
|
|
43286
|
-
get
|
|
43287
|
-
|
|
43288
|
-
return this._deliveryPlanningService.planTransportWeek;
|
|
43289
|
-
}
|
|
43290
|
-
else {
|
|
43291
|
-
return [];
|
|
43292
|
-
}
|
|
43467
|
+
get planTransportWeekArr() {
|
|
43468
|
+
return this._deliveryPlanningService.planTransportWeekArr;
|
|
43293
43469
|
}
|
|
43294
43470
|
get currentTileMode() {
|
|
43295
43471
|
return this._deliveryPlanningService.currentTileMode;
|
|
@@ -43297,6 +43473,9 @@ class DeliveryPlanningOverviewComponent {
|
|
|
43297
43473
|
set currentTileMode(tileMode) {
|
|
43298
43474
|
this._deliveryPlanningService.currentTileMode = tileMode;
|
|
43299
43475
|
}
|
|
43476
|
+
currentDate() {
|
|
43477
|
+
return this._deliveryPlanningService.currentStartDate;
|
|
43478
|
+
}
|
|
43300
43479
|
//calculating upon loading
|
|
43301
43480
|
ngAfterViewChecked() {
|
|
43302
43481
|
this.setColNum();
|
|
@@ -43340,15 +43519,11 @@ class DeliveryPlanningOverviewComponent {
|
|
|
43340
43519
|
}
|
|
43341
43520
|
}
|
|
43342
43521
|
setColNum() {
|
|
43343
|
-
var _a, _b;
|
|
43344
43522
|
if (this._deliveryPlanningService.viewMode === DeliveryPlanningViewModes.Sidebar) {
|
|
43345
43523
|
this.columnNum = 1;
|
|
43346
43524
|
}
|
|
43347
43525
|
else {
|
|
43348
|
-
|
|
43349
|
-
if (width) {
|
|
43350
|
-
this.columnNum = Math.trunc(width / this.tileSize);
|
|
43351
|
-
}
|
|
43526
|
+
this.columnNum = 3;
|
|
43352
43527
|
}
|
|
43353
43528
|
}
|
|
43354
43529
|
dragEnd(ev) {
|
|
@@ -43372,18 +43547,15 @@ class DeliveryPlanningOverviewComponent {
|
|
|
43372
43547
|
}
|
|
43373
43548
|
handleDeleteOrder(deleteResult, planningTransportWeek) {
|
|
43374
43549
|
return __awaiter(this, void 0, void 0, function* () {
|
|
43550
|
+
let oldWeek = planningTransportWeek;
|
|
43375
43551
|
let order = deleteResult[0];
|
|
43376
43552
|
if (order) {
|
|
43377
43553
|
yield this.getTransportOrders(deleteResult[0], deleteResult[1]);
|
|
43378
43554
|
yield this.getOrderLinesPlanned(order);
|
|
43379
43555
|
if (deleteResult[0].lines.length > 0) {
|
|
43380
|
-
|
|
43381
|
-
line.planned = false;
|
|
43382
|
-
line.selected = false;
|
|
43383
|
-
});
|
|
43384
|
-
order.lines = [];
|
|
43556
|
+
this._deliveryPlanningService.deletingOrder = order;
|
|
43385
43557
|
deleteResult[1].plannedOrders.splice(deleteResult[1].plannedOrders.indexOf(order), 1);
|
|
43386
|
-
this.updatePlanningTransportEvent.emit(planningTransportWeek);
|
|
43558
|
+
this.updatePlanningTransportEvent.emit({ oldWeek: oldWeek, week: planningTransportWeek, action: DeliveryPlanningUpdateActions.DeletePlannedOrder });
|
|
43387
43559
|
}
|
|
43388
43560
|
else {
|
|
43389
43561
|
this._dialog.showError("NO_LINES_TO_DELETE", true);
|
|
@@ -43391,6 +43563,12 @@ class DeliveryPlanningOverviewComponent {
|
|
|
43391
43563
|
}
|
|
43392
43564
|
});
|
|
43393
43565
|
}
|
|
43566
|
+
handleDeleteLine(deleteResult, weekDay, transportWeekRow) {
|
|
43567
|
+
let oldWeek = transportWeekRow;
|
|
43568
|
+
let order = weekDay.plannedOrders.find(order => order.transId === deleteResult.order.transId);
|
|
43569
|
+
order.lines = order.lines.filter(line => line.originalLineNr !== deleteResult.line.originalLineNr);
|
|
43570
|
+
this.updatePlanningTransportEvent.emit({ oldWeek: oldWeek, week: transportWeekRow, action: DeliveryPlanningUpdateActions.DeletePlannedLines });
|
|
43571
|
+
}
|
|
43394
43572
|
getOrderLinesPlanned(order) {
|
|
43395
43573
|
return __awaiter(this, void 0, void 0, function* () {
|
|
43396
43574
|
let request = new OrderLinesPlannedRequest();
|
|
@@ -43403,6 +43581,9 @@ class DeliveryPlanningOverviewComponent {
|
|
|
43403
43581
|
filterObj.beginCurrentWeek = new Date();
|
|
43404
43582
|
filterObj.checkOrderLines = 1;
|
|
43405
43583
|
request.filterObject = filterObj;
|
|
43584
|
+
if (!order.lines) {
|
|
43585
|
+
order.lines = [];
|
|
43586
|
+
}
|
|
43406
43587
|
order.lines.push(...yield this._transactionCon.getOrderLinesPlanned(request));
|
|
43407
43588
|
});
|
|
43408
43589
|
}
|
|
@@ -43418,6 +43599,7 @@ class DeliveryPlanningOverviewComponent {
|
|
|
43418
43599
|
}
|
|
43419
43600
|
planOrderLines(order, transportDay, week) {
|
|
43420
43601
|
return __awaiter(this, void 0, void 0, function* () {
|
|
43602
|
+
let oldWeek = week;
|
|
43421
43603
|
if (order.lines.length) {
|
|
43422
43604
|
order.linesLoaded = true;
|
|
43423
43605
|
order.tasks = [];
|
|
@@ -43431,7 +43613,7 @@ class DeliveryPlanningOverviewComponent {
|
|
|
43431
43613
|
else {
|
|
43432
43614
|
transportDay.plannedOrders.push(order);
|
|
43433
43615
|
}
|
|
43434
|
-
this.updatePlanningTransportEvent.emit(week);
|
|
43616
|
+
this.updatePlanningTransportEvent.emit({ oldWeek: oldWeek, week: week, action: DeliveryPlanningUpdateActions.PlanLines });
|
|
43435
43617
|
}
|
|
43436
43618
|
else {
|
|
43437
43619
|
this._dialog.showError("NO_LINES_TO_PLAN", true);
|
|
@@ -43484,6 +43666,11 @@ class DeliveryPlanningOverviewComponent {
|
|
|
43484
43666
|
yield this.getSequenceOrderValue(event[0]);
|
|
43485
43667
|
yield this.getOrderLinesPlanned(event[0]);
|
|
43486
43668
|
yield this.planOrderLines(event[0], event[1], event[2]);
|
|
43669
|
+
if (this._deliveryPlanningService.currentTransId) {
|
|
43670
|
+
yield this._transaction.getTransactionById(this._deliveryPlanningService.currentTransId);
|
|
43671
|
+
yield this._transaction.saveTransaction();
|
|
43672
|
+
yield this._transaction.checkRefTransaction();
|
|
43673
|
+
}
|
|
43487
43674
|
});
|
|
43488
43675
|
}
|
|
43489
43676
|
handleSettingsSave(changed) {
|
|
@@ -43514,7 +43701,11 @@ class DeliveryPlanningOverviewComponent {
|
|
|
43514
43701
|
yield this.getSequenceOrderValue(planOrder);
|
|
43515
43702
|
yield this.getOrderLinesPlanned(planOrder);
|
|
43516
43703
|
yield this.planOrderLines(planOrder, transportWeekDay, week);
|
|
43517
|
-
this._deliveryPlanningService.currentTransId
|
|
43704
|
+
if (data.data === "false" && this._deliveryPlanningService.currentTransId) {
|
|
43705
|
+
yield this._transaction.getTransactionById(this._deliveryPlanningService.currentTransId);
|
|
43706
|
+
yield this._transaction.saveTransaction();
|
|
43707
|
+
yield this._transaction.checkRefTransaction();
|
|
43708
|
+
}
|
|
43518
43709
|
}
|
|
43519
43710
|
});
|
|
43520
43711
|
}
|
|
@@ -43560,6 +43751,17 @@ class DeliveryPlanningOverviewComponent {
|
|
|
43560
43751
|
return false;
|
|
43561
43752
|
}
|
|
43562
43753
|
}
|
|
43754
|
+
handleTimeChangeEvent(transportDay, week, obj) {
|
|
43755
|
+
let oldWeek = week;
|
|
43756
|
+
let transNr = obj['transactionNr'];
|
|
43757
|
+
let order = transportDay.plannedOrders.find(planOrder => planOrder.transactionNr === transNr);
|
|
43758
|
+
order.startTime = new Date(obj['startTime']);
|
|
43759
|
+
order.endTime = new Date(obj['endTime']);
|
|
43760
|
+
this.updatePlanningTransportEvent.emit({ oldWeek: oldWeek, week: week, action: DeliveryPlanningUpdateActions.PlanOrder });
|
|
43761
|
+
}
|
|
43762
|
+
handleEditPlannedOrder(planOrder, transportDay, week) {
|
|
43763
|
+
this.openPlanningPopup(planOrder, transportDay, week);
|
|
43764
|
+
}
|
|
43563
43765
|
}
|
|
43564
43766
|
DeliveryPlanningOverviewComponent.decorators = [
|
|
43565
43767
|
{ type: Component, args: [{
|
|
@@ -43574,28 +43776,32 @@ DeliveryPlanningOverviewComponent.decorators = [
|
|
|
43574
43776
|
<co-icon (click)="currentTileMode = tileModes.Calendar" [class.active]="currentTileMode === tileModes.Calendar" [iconData]="iconCacheService.getIcon(icons.CalendarDayRegular)"></co-icon>
|
|
43575
43777
|
</div>
|
|
43576
43778
|
<div class="planning-component-wrapper">
|
|
43577
|
-
<co-date-planning [view]="currentViewMode" [selectedDate]="
|
|
43779
|
+
<co-date-planning [view]="currentViewMode" [selectedDate]="currentDate()"
|
|
43578
43780
|
(rangeChange)="handleDateRangeChange($event)"></co-date-planning>
|
|
43579
43781
|
</div>
|
|
43580
|
-
|
|
43782
|
+
|
|
43783
|
+
<div class="row date-planning" #rowContainer *ngFor="let transportWeekRow of planTransportWeekArr">
|
|
43581
43784
|
<div class="column" #columnElem
|
|
43582
|
-
*ngFor="let transPortDay of filterWeekArray(
|
|
43785
|
+
*ngFor="let transPortDay of filterWeekArray(transportWeekRow); index as i">
|
|
43583
43786
|
<co-delivery-planning-overview-tile
|
|
43584
43787
|
[class.disabled]="!transPortDay.availableOnDate || transPortDay.maxMinutes === 0 || checkAvailable(transPortDay)"
|
|
43585
43788
|
[disabled]="!transPortDay.availableOnDate || transPortDay.maxMinutes === 0"
|
|
43586
43789
|
(dragover)="allowDrop($event, transPortDay)"
|
|
43587
|
-
(drop)="dropped($event, transportWeekRow, transPortDay, filterWeekArray(
|
|
43790
|
+
(drop)="dropped($event, transportWeekRow, transPortDay, filterWeekArray(transportWeekRow))"
|
|
43588
43791
|
(dragend)="dragEnd($event)"
|
|
43589
|
-
|
|
43590
43792
|
[transportDay]="transPortDay"
|
|
43591
|
-
(
|
|
43592
|
-
(
|
|
43793
|
+
(deleteOrderEvent)="handleDeleteOrder($event, transportWeekRow)"
|
|
43794
|
+
(timeChangeEvent)="handleTimeChangeEvent(transPortDay, transportWeekRow,$event)"
|
|
43593
43795
|
(openSettingsDialogEvent)="openSettingsDialog($event)"
|
|
43594
43796
|
(calendarPlanEvent)="handleCalendarPlanEvent($event, transPortDay, transportWeekRow)"
|
|
43595
|
-
|
|
43797
|
+
(deleteOrderLineEvent)="handleDeleteLine($event, transPortDay, transportWeekRow)"
|
|
43798
|
+
(editOrderEvent)="handleEditPlannedOrder($event, transPortDay, transportWeekRow)"
|
|
43596
43799
|
|
|
43800
|
+
></co-delivery-planning-overview-tile>
|
|
43597
43801
|
</div>
|
|
43598
43802
|
</div>
|
|
43803
|
+
|
|
43804
|
+
|
|
43599
43805
|
</div>
|
|
43600
43806
|
|
|
43601
43807
|
|
|
@@ -43635,13 +43841,18 @@ class DeliveryPlanningOverviewTileLineComponent {
|
|
|
43635
43841
|
this.orderLines = false;
|
|
43636
43842
|
this.order = new PlanOrder();
|
|
43637
43843
|
this.isActive = false;
|
|
43638
|
-
this.
|
|
43844
|
+
this.deleteOrderEvent = new EventEmitter();
|
|
43845
|
+
this.deleteOrderLineEvent = new EventEmitter();
|
|
43846
|
+
this.editOrderEvent = new EventEmitter();
|
|
43639
43847
|
}
|
|
43640
43848
|
showClass() {
|
|
43641
43849
|
return true;
|
|
43642
43850
|
}
|
|
43643
|
-
|
|
43644
|
-
this.
|
|
43851
|
+
handleDeleteOrderClick(order) {
|
|
43852
|
+
this.deleteOrderEvent.emit(order);
|
|
43853
|
+
}
|
|
43854
|
+
handleDeleteOrderLineClick(order, line) {
|
|
43855
|
+
this.deleteOrderLineEvent.emit({ order: order, line: line });
|
|
43645
43856
|
}
|
|
43646
43857
|
setLinesActive() {
|
|
43647
43858
|
this.linesActive = !this.linesActive;
|
|
@@ -43654,6 +43865,9 @@ class DeliveryPlanningOverviewTileLineComponent {
|
|
|
43654
43865
|
getPlannedLines(lines) {
|
|
43655
43866
|
return lines.filter(line => line.planned === true);
|
|
43656
43867
|
}
|
|
43868
|
+
handleEditOrderEvent(planOrder) {
|
|
43869
|
+
this.editOrderEvent.emit(planOrder);
|
|
43870
|
+
}
|
|
43657
43871
|
}
|
|
43658
43872
|
DeliveryPlanningOverviewTileLineComponent.decorators = [
|
|
43659
43873
|
{ type: Component, args: [{
|
|
@@ -43663,8 +43877,10 @@ DeliveryPlanningOverviewTileLineComponent.decorators = [
|
|
|
43663
43877
|
<div class="planning-line-content">
|
|
43664
43878
|
<div class="planning-line-left">
|
|
43665
43879
|
<div class="planning-line-extend" *ngIf="linesActive || orderLines">
|
|
43666
|
-
<co-icon *ngIf="!orderLines" (click)="showOrderLines($event)"
|
|
43667
|
-
|
|
43880
|
+
<co-icon *ngIf="!orderLines" (click)="showOrderLines($event)"
|
|
43881
|
+
[iconData]="iconCacheService.getIcon(icons.ChevronDownRegular)"></co-icon>
|
|
43882
|
+
<co-icon *ngIf="orderLines" (click)="showOrderLines($event)"
|
|
43883
|
+
[iconData]="iconCacheService.getIcon(icons.ChevronUpRegular)"></co-icon>
|
|
43668
43884
|
</div>
|
|
43669
43885
|
<div class="line-content-left">
|
|
43670
43886
|
<div class="planning-relation">
|
|
@@ -43678,15 +43894,19 @@ DeliveryPlanningOverviewTileLineComponent.decorators = [
|
|
|
43678
43894
|
<div class="planning-line-right">
|
|
43679
43895
|
<div class="line-content-right">
|
|
43680
43896
|
<div class="planning-order">
|
|
43681
|
-
<co-icon (click)="setLinesActive()"
|
|
43682
|
-
|
|
43897
|
+
<co-icon (click)="setLinesActive()"
|
|
43898
|
+
[iconData]="iconCacheService.getIcon(icons.CartShoppingRegular)"></co-icon>
|
|
43899
|
+
<a href="javascript:void(0)" [textContent]="order.transactionNr" (click)="handleEditOrderEvent(order)"></a>
|
|
43900
|
+
|
|
43683
43901
|
</div>
|
|
43684
43902
|
<div class="planning-time" *ngIf="linesActive">
|
|
43685
|
-
<span
|
|
43903
|
+
<span
|
|
43904
|
+
[textContent]="(order.startTime | date: 'HH:mm') + ' - ' + (order.endTime | date: 'HH:mm')"></span>
|
|
43686
43905
|
</div>
|
|
43687
43906
|
</div>
|
|
43688
43907
|
<div class="planning-line-actions">
|
|
43689
|
-
<co-icon *ngIf="linesActive" (click)="
|
|
43908
|
+
<co-icon *ngIf="linesActive" (click)="handleDeleteOrderClick(order)"
|
|
43909
|
+
[iconData]="iconCacheService.getIcon(icons.TrashCanRegular)"></co-icon>
|
|
43690
43910
|
<co-icon *ngIf="!linesActive" [iconData]="iconCacheService.getIcon(icons.ChevronRightRegular)"></co-icon>
|
|
43691
43911
|
</div>
|
|
43692
43912
|
</div>
|
|
@@ -43695,6 +43915,8 @@ DeliveryPlanningOverviewTileLineComponent.decorators = [
|
|
|
43695
43915
|
<div class="order-lines" *ngFor="let line of getPlannedLines(order?.lines)">
|
|
43696
43916
|
<span [textContent]="line.articleNumber"></span>
|
|
43697
43917
|
<span [textContent]="line.description"></span>
|
|
43918
|
+
<co-icon *ngIf="linesActive" (click)="handleDeleteOrderLineClick(order, line)"
|
|
43919
|
+
[iconData]="iconCacheService.getIcon(icons.TrashCanRegular)"></co-icon>
|
|
43698
43920
|
</div>
|
|
43699
43921
|
</div>
|
|
43700
43922
|
</div>
|
|
@@ -43708,7 +43930,9 @@ DeliveryPlanningOverviewTileLineComponent.ctorParameters = () => [
|
|
|
43708
43930
|
DeliveryPlanningOverviewTileLineComponent.propDecorators = {
|
|
43709
43931
|
order: [{ type: Input }],
|
|
43710
43932
|
isActive: [{ type: Input }],
|
|
43711
|
-
|
|
43933
|
+
deleteOrderEvent: [{ type: Output }],
|
|
43934
|
+
deleteOrderLineEvent: [{ type: Output }],
|
|
43935
|
+
editOrderEvent: [{ type: Output }],
|
|
43712
43936
|
showClass: [{ type: HostBinding, args: ["class.co-delivery-planning-overview-tile-line",] }]
|
|
43713
43937
|
};
|
|
43714
43938
|
|
|
@@ -43734,27 +43958,76 @@ DeliveryPlanningOverviewTileLineModule.decorators = [
|
|
|
43734
43958
|
];
|
|
43735
43959
|
|
|
43736
43960
|
class DeliveryPlanningTileStatusComponent {
|
|
43737
|
-
constructor() {
|
|
43738
|
-
this.
|
|
43739
|
-
this.timeTotal = 480;
|
|
43740
|
-
this.currentVolume = 0;
|
|
43741
|
-
this.currentTimeTotal = 0;
|
|
43961
|
+
constructor(_changeDetector) {
|
|
43962
|
+
this._changeDetector = _changeDetector;
|
|
43742
43963
|
this.volumePercent = 0;
|
|
43743
43964
|
this.timePercent = 0;
|
|
43965
|
+
this._maxVolume = 0;
|
|
43966
|
+
this._timeTotal = 0;
|
|
43967
|
+
this._currentVolume = 0;
|
|
43968
|
+
this._currentTimeTotal = 0;
|
|
43969
|
+
}
|
|
43970
|
+
get maxVolume() {
|
|
43971
|
+
return this._maxVolume;
|
|
43972
|
+
}
|
|
43973
|
+
set maxVolume(value) {
|
|
43974
|
+
if (value != this._maxVolume) {
|
|
43975
|
+
this._maxVolume = value;
|
|
43976
|
+
this.calculateVolumePercent();
|
|
43977
|
+
}
|
|
43978
|
+
}
|
|
43979
|
+
get timeTotal() {
|
|
43980
|
+
return this._timeTotal;
|
|
43981
|
+
}
|
|
43982
|
+
set timeTotal(value) {
|
|
43983
|
+
if (value != this._timeTotal) {
|
|
43984
|
+
this._timeTotal = value;
|
|
43985
|
+
this.calculateTimePercent();
|
|
43986
|
+
}
|
|
43987
|
+
}
|
|
43988
|
+
get currentVolume() {
|
|
43989
|
+
return this._currentVolume;
|
|
43990
|
+
}
|
|
43991
|
+
set currentVolume(value) {
|
|
43992
|
+
if (value != this._currentVolume) {
|
|
43993
|
+
this._currentVolume = value;
|
|
43994
|
+
this.calculateVolumePercent();
|
|
43995
|
+
}
|
|
43996
|
+
}
|
|
43997
|
+
get currentTimeTotal() {
|
|
43998
|
+
return this._currentTimeTotal;
|
|
43999
|
+
}
|
|
44000
|
+
set currentTimeTotal(value) {
|
|
44001
|
+
if (value != this._currentTimeTotal) {
|
|
44002
|
+
this._currentTimeTotal = value;
|
|
44003
|
+
this.calculateTimePercent();
|
|
44004
|
+
}
|
|
43744
44005
|
}
|
|
43745
44006
|
showClass() {
|
|
43746
44007
|
return true;
|
|
43747
44008
|
}
|
|
43748
44009
|
ngOnInit() {
|
|
43749
|
-
|
|
44010
|
+
this.calculatePercentages();
|
|
44011
|
+
}
|
|
44012
|
+
calculateVolumePercent() {
|
|
44013
|
+
if (this.currentVolume === 0) {
|
|
44014
|
+
this.volumePercent = 0;
|
|
44015
|
+
}
|
|
44016
|
+
else {
|
|
43750
44017
|
this.volumePercent = Math.round((this.currentVolume / this.maxVolume) * 100 * 100) / 100;
|
|
43751
44018
|
}
|
|
43752
|
-
|
|
44019
|
+
}
|
|
44020
|
+
calculateTimePercent() {
|
|
44021
|
+
if (this.currentTimeTotal === 0) {
|
|
44022
|
+
this.timePercent = 0;
|
|
44023
|
+
}
|
|
44024
|
+
else {
|
|
43753
44025
|
this.timePercent = Math.round((this.currentTimeTotal / this.timeTotal) * 100 * 100) / 100;
|
|
43754
44026
|
}
|
|
43755
44027
|
}
|
|
43756
|
-
|
|
43757
|
-
|
|
44028
|
+
calculatePercentages() {
|
|
44029
|
+
this.calculateTimePercent();
|
|
44030
|
+
this.calculateVolumePercent();
|
|
43758
44031
|
}
|
|
43759
44032
|
}
|
|
43760
44033
|
DeliveryPlanningTileStatusComponent.decorators = [
|
|
@@ -43764,17 +44037,17 @@ DeliveryPlanningTileStatusComponent.decorators = [
|
|
|
43764
44037
|
<div class="tile-status-wrapper row">
|
|
43765
44038
|
<div class="tile-wrapper-around">
|
|
43766
44039
|
<span class="tile-label" [textContent]="('TIME' | localize) + ': ' + currentTimeTotal + ' ' + ('AVAILABLE' | localize)"></span>
|
|
43767
|
-
<div class="time-wrapper" [style.--percent]="timePercent">
|
|
44040
|
+
<div class="time-wrapper" [style.--percent]="timePercent" [class.overload]="timePercent > 100">
|
|
43768
44041
|
<div class="row">
|
|
43769
|
-
<span [textContent]="'%'
|
|
44042
|
+
<span [textContent]="timePercent + '%'"></span>
|
|
43770
44043
|
</div>
|
|
43771
44044
|
</div>
|
|
43772
44045
|
</div>
|
|
43773
44046
|
<div class="tile-wrapper-around">
|
|
43774
44047
|
<span class="tile-label" [textContent]="('VOLUME' | localize) + ': ' + currentVolume + ' ' + ('AVAILABLE' | localize)"></span>
|
|
43775
|
-
<div class="volume-wrapper"[style.--percent]="volumePercent">
|
|
44048
|
+
<div class="volume-wrapper"[style.--percent]="volumePercent" [class.overload]="volumePercent > 100">
|
|
43776
44049
|
<div class="row">
|
|
43777
|
-
<span [textContent]="'%'
|
|
44050
|
+
<span [textContent]="volumePercent + '%'"></span>
|
|
43778
44051
|
</div>
|
|
43779
44052
|
</div>
|
|
43780
44053
|
</div>
|
|
@@ -43783,7 +44056,9 @@ DeliveryPlanningTileStatusComponent.decorators = [
|
|
|
43783
44056
|
encapsulation: ViewEncapsulation.None
|
|
43784
44057
|
},] }
|
|
43785
44058
|
];
|
|
43786
|
-
DeliveryPlanningTileStatusComponent.ctorParameters = () => [
|
|
44059
|
+
DeliveryPlanningTileStatusComponent.ctorParameters = () => [
|
|
44060
|
+
{ type: ChangeDetectorRef }
|
|
44061
|
+
];
|
|
43787
44062
|
DeliveryPlanningTileStatusComponent.propDecorators = {
|
|
43788
44063
|
maxVolume: [{ type: Input }],
|
|
43789
44064
|
timeTotal: [{ type: Input }],
|
|
@@ -43816,13 +44091,13 @@ class DeliveryPlanningOverviewShortLineComponent {
|
|
|
43816
44091
|
this.showNoteDialog = false;
|
|
43817
44092
|
this.expanded = false;
|
|
43818
44093
|
this.order = new PlanOrder();
|
|
43819
|
-
this.
|
|
44094
|
+
this.deleteOrderEvent = new EventEmitter();
|
|
43820
44095
|
}
|
|
43821
44096
|
showClass() {
|
|
43822
44097
|
return true;
|
|
43823
44098
|
}
|
|
43824
44099
|
handleDeleteLineClick(order) {
|
|
43825
|
-
this.
|
|
44100
|
+
this.deleteOrderEvent.emit(order);
|
|
43826
44101
|
}
|
|
43827
44102
|
}
|
|
43828
44103
|
DeliveryPlanningOverviewShortLineComponent.decorators = [
|
|
@@ -43843,7 +44118,7 @@ DeliveryPlanningOverviewShortLineComponent.ctorParameters = () => [
|
|
|
43843
44118
|
];
|
|
43844
44119
|
DeliveryPlanningOverviewShortLineComponent.propDecorators = {
|
|
43845
44120
|
order: [{ type: Input }],
|
|
43846
|
-
|
|
44121
|
+
deleteOrderEvent: [{ type: Output }],
|
|
43847
44122
|
showClass: [{ type: HostBinding, args: ["class.co-delivery-planning-overview-short-line",] }]
|
|
43848
44123
|
};
|
|
43849
44124
|
|
|
@@ -43937,50 +44212,62 @@ class DeliveryPlanningOverviewPopupComponent {
|
|
|
43937
44212
|
this.onSucceededPlanAction.emit([this.planOrder, this.transportDay, this.week]);
|
|
43938
44213
|
}
|
|
43939
44214
|
startTimeForOrder() {
|
|
43940
|
-
|
|
44215
|
+
var _a, _b;
|
|
44216
|
+
return (_b = (_a = this.planOrder) === null || _a === void 0 ? void 0 : _a.startTime) === null || _b === void 0 ? void 0 : _b.toLocaleString();
|
|
43941
44217
|
}
|
|
43942
44218
|
endTimeForOrder() {
|
|
43943
|
-
|
|
44219
|
+
var _a, _b;
|
|
44220
|
+
return (_b = (_a = this.planOrder) === null || _a === void 0 ? void 0 : _a.endTime) === null || _b === void 0 ? void 0 : _b.toLocaleString();
|
|
43944
44221
|
}
|
|
43945
|
-
handleStartTimeChange(
|
|
43946
|
-
|
|
43947
|
-
|
|
43948
|
-
if (!isNaN(date.getTime())) {
|
|
43949
|
-
this.planOrder.startTime = date;
|
|
44222
|
+
handleStartTimeChange() {
|
|
44223
|
+
if (this.startTimeCompRef.model) {
|
|
44224
|
+
this.planOrder.startTime = this.handleDateChange(this.startTimeCompRef.model);
|
|
43950
44225
|
}
|
|
43951
44226
|
}
|
|
43952
|
-
handleEndTimeChange(
|
|
43953
|
-
|
|
43954
|
-
|
|
43955
|
-
if (!isNaN(date.getTime())) {
|
|
43956
|
-
this.planOrder.endTime = date;
|
|
44227
|
+
handleEndTimeChange() {
|
|
44228
|
+
if (this.endTimeCompRef.model) {
|
|
44229
|
+
this.planOrder.endTime = this.handleDateChange(this.endTimeCompRef.model);
|
|
43957
44230
|
}
|
|
43958
44231
|
}
|
|
43959
44232
|
handleInitialTimePlanning(transportWeekDay) {
|
|
43960
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
44233
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
43961
44234
|
if (!((_a = this.planOrder) === null || _a === void 0 ? void 0 : _a.startTime) && ((_b = transportWeekDay === null || transportWeekDay === void 0 ? void 0 : transportWeekDay.plannedOrders) === null || _b === void 0 ? void 0 : _b.length) === 0) {
|
|
43962
44235
|
this.planOrder.startTime = new Date(transportWeekDay.date);
|
|
43963
44236
|
(_d = (_c = this.planOrder) === null || _c === void 0 ? void 0 : _c.startTime) === null || _d === void 0 ? void 0 : _d.setHours(8);
|
|
43964
44237
|
(_f = (_e = this.planOrder) === null || _e === void 0 ? void 0 : _e.startTime) === null || _f === void 0 ? void 0 : _f.setMinutes(0);
|
|
43965
44238
|
(_h = (_g = this.planOrder) === null || _g === void 0 ? void 0 : _g.startTime) === null || _h === void 0 ? void 0 : _h.setSeconds(0);
|
|
43966
44239
|
}
|
|
43967
|
-
if (!((_j = this.planOrder) === null || _j === void 0 ? void 0 : _j.endTime) && (transportWeekDay === null || transportWeekDay === void 0 ? void 0 : transportWeekDay.plannedOrders.length) === 0) {
|
|
43968
|
-
this.planOrder.endTime = new Date((
|
|
43969
|
-
this.planOrder.endTime.setHours(((
|
|
44240
|
+
if (!((_j = this.planOrder) === null || _j === void 0 ? void 0 : _j.endTime) && ((_k = transportWeekDay === null || transportWeekDay === void 0 ? void 0 : transportWeekDay.plannedOrders) === null || _k === void 0 ? void 0 : _k.length) === 0) {
|
|
44241
|
+
this.planOrder.endTime = new Date((_l = this.planOrder) === null || _l === void 0 ? void 0 : _l.startTime);
|
|
44242
|
+
this.planOrder.endTime.setHours(((_o = (_m = this.planOrder) === null || _m === void 0 ? void 0 : _m.endTime) === null || _o === void 0 ? void 0 : _o.getHours()) + (this.deliveryPlanningService.totalAssemblyTime(this.planOrder) > 0 ? (this.deliveryPlanningService.totalAssemblyTime(this.planOrder) / 60) : 1));
|
|
43970
44243
|
this.planOrder.startTime.setMinutes(0);
|
|
43971
44244
|
this.planOrder.startTime.setSeconds(0);
|
|
43972
44245
|
}
|
|
43973
|
-
if ((transportWeekDay === null || transportWeekDay === void 0 ? void 0 : transportWeekDay.plannedOrders.length) > 0) {
|
|
44246
|
+
if (((_p = transportWeekDay === null || transportWeekDay === void 0 ? void 0 : transportWeekDay.plannedOrders) === null || _p === void 0 ? void 0 : _p.length) > 0) {
|
|
43974
44247
|
this.planOrder.startTime = new Date(transportWeekDay === null || transportWeekDay === void 0 ? void 0 : transportWeekDay.date);
|
|
43975
|
-
this.planOrder.startTime.setHours((
|
|
44248
|
+
this.planOrder.startTime.setHours((_r = (_q = transportWeekDay === null || transportWeekDay === void 0 ? void 0 : transportWeekDay.plannedOrders[transportWeekDay.plannedOrders.length - 1]) === null || _q === void 0 ? void 0 : _q.endTime) === null || _r === void 0 ? void 0 : _r.getHours());
|
|
43976
44249
|
this.planOrder.startTime.setMinutes(0);
|
|
43977
44250
|
this.planOrder.startTime.setSeconds(0);
|
|
43978
44251
|
this.planOrder.endTime = new Date(this.planOrder.startTime);
|
|
43979
|
-
this.planOrder.endTime.setHours(((
|
|
44252
|
+
this.planOrder.endTime.setHours(((_t = (_s = this.planOrder) === null || _s === void 0 ? void 0 : _s.endTime) === null || _t === void 0 ? void 0 : _t.getHours()) + (this.deliveryPlanningService.totalAssemblyTime(this.planOrder) > 0 ? (this.deliveryPlanningService.totalAssemblyTime(this.planOrder) / 60) : 1));
|
|
43980
44253
|
this.planOrder.startTime.setMinutes(0);
|
|
43981
44254
|
this.planOrder.startTime.setSeconds(0);
|
|
43982
44255
|
}
|
|
43983
44256
|
}
|
|
44257
|
+
handleDateChange(text) {
|
|
44258
|
+
let splitText;
|
|
44259
|
+
splitText = text.split(":");
|
|
44260
|
+
if (splitText) {
|
|
44261
|
+
let date = new Date(this.transportDay.date);
|
|
44262
|
+
date.setHours(parseInt(splitText[0]));
|
|
44263
|
+
date.setMinutes(parseInt(splitText[1]));
|
|
44264
|
+
date.setSeconds(0);
|
|
44265
|
+
return date;
|
|
44266
|
+
}
|
|
44267
|
+
else {
|
|
44268
|
+
return undefined;
|
|
44269
|
+
}
|
|
44270
|
+
}
|
|
43984
44271
|
}
|
|
43985
44272
|
DeliveryPlanningOverviewPopupComponent.decorators = [
|
|
43986
44273
|
{ type: Component, args: [{
|
|
@@ -44016,10 +44303,10 @@ DeliveryPlanningOverviewPopupComponent.decorators = [
|
|
|
44016
44303
|
</div>
|
|
44017
44304
|
|
|
44018
44305
|
<div class="popup-row">
|
|
44019
|
-
<co-input-text [model]="startTimeForOrder() | date: '
|
|
44020
|
-
[placeholder]="'STARTTIME' | localize" (
|
|
44021
|
-
<co-input-text [model]="endTimeForOrder() | date: '
|
|
44022
|
-
[placeholder]="'STOPTIME' | localize" (
|
|
44306
|
+
<co-input-text #startTime [model]="startTimeForOrder() | date: 'hh:mm'"
|
|
44307
|
+
[placeholder]="'STARTTIME' | localize" (blur)="handleStartTimeChange()"></co-input-text>
|
|
44308
|
+
<co-input-text #endTime [model]="endTimeForOrder() | date: 'hh:mm'"
|
|
44309
|
+
[placeholder]="'STOPTIME' | localize" (blur)="handleEndTimeChange()"></co-input-text>
|
|
44023
44310
|
</div>
|
|
44024
44311
|
|
|
44025
44312
|
|
|
@@ -44055,6 +44342,8 @@ DeliveryPlanningOverviewPopupComponent.ctorParameters = () => [
|
|
|
44055
44342
|
DeliveryPlanningOverviewPopupComponent.propDecorators = {
|
|
44056
44343
|
closeEvent: [{ type: Output }],
|
|
44057
44344
|
onSucceededPlanAction: [{ type: Output }],
|
|
44345
|
+
startTimeCompRef: [{ type: ViewChild, args: ['startTime',] }],
|
|
44346
|
+
endTimeCompRef: [{ type: ViewChild, args: ['endTime',] }],
|
|
44058
44347
|
showClass: [{ type: HostBinding, args: ["class.co-delivery-planning-overview-popup",] }]
|
|
44059
44348
|
};
|
|
44060
44349
|
|
|
@@ -52416,29 +52705,32 @@ TransactionServiceOverviewComponent.decorators = [
|
|
|
52416
52705
|
<div class="message-and-task-wrapper">
|
|
52417
52706
|
<div class="service-message-and-image-wrapper">
|
|
52418
52707
|
<div class="service-message-wrapper">
|
|
52419
|
-
<
|
|
52420
|
-
|
|
52421
|
-
|
|
52422
|
-
|
|
52423
|
-
|
|
52424
|
-
|
|
52425
|
-
|
|
52708
|
+
<div class="service-message">
|
|
52709
|
+
<label class="label service-label" [textContent]="'SERVICE_REPORT'| localize"></label>
|
|
52710
|
+
<span *ngIf="transactionServiceInfo && transactionServiceInfo.wizardQuestionsAndAnswers"
|
|
52711
|
+
[textContent]="transactionServiceInfo.wizardQuestionsAndAnswers" [screenConfigurationObject]="cfgNames.ServiceWizardMessage" screenConfigNativeElement
|
|
52712
|
+
></span> <!---->
|
|
52713
|
+
<co-transaction-service-message class="transaction-service-message" [transaction]="transaction">
|
|
52714
|
+
</co-transaction-service-message>
|
|
52715
|
+
</div>
|
|
52716
|
+
<co-files-upload (documentChangeEvent)="upsertDocument($event)" [screenConfigurationObject]="cfgNames.ServiceOverviewImage"
|
|
52426
52717
|
(documentDeleted)="deleteDocument($event)"
|
|
52427
52718
|
[label]="'ADD_IMAGES' | localize"
|
|
52428
52719
|
[documents]="documents"
|
|
52429
|
-
[isEditable]="false">
|
|
52720
|
+
[isEditable]="false" > <!---->
|
|
52430
52721
|
</co-files-upload>
|
|
52722
|
+
</div>
|
|
52431
52723
|
<div class="service-order-lines-wrapper">
|
|
52432
52724
|
<div class="service-message-extra-wrapper">
|
|
52433
52725
|
<co-list-of-values [label]="'PRIORITY'| localize" displayField="description" [model]="priorityModel"
|
|
52434
|
-
[collection]="priorityDomainColl"
|
|
52435
|
-
(modelChange)="setPriority($event)"></co-list-of-values>
|
|
52726
|
+
[collection]="priorityDomainColl" [screenConfigurationObject]="cfgNames.ServicePriority"
|
|
52727
|
+
(modelChange)="setPriority($event)"></co-list-of-values> <!---->
|
|
52436
52728
|
<co-list-of-values [label]="'CAUSE_CODE' | localize" displayField="description" [model]="causeCodeModel"
|
|
52437
|
-
[collection]="causeCodeColl"
|
|
52438
|
-
(modelChange)="setCauseCode($event)"></co-list-of-values>
|
|
52729
|
+
[collection]="causeCodeColl" [screenConfigurationObject]="cfgNames.ServiceCauseCode"
|
|
52730
|
+
(modelChange)="setCauseCode($event)"></co-list-of-values> <!---->
|
|
52439
52731
|
<co-list-of-values [label]="'ENTRY_TYPE' | localize" displayField="description" [model]="entryTypeModel"
|
|
52440
|
-
[collection]="entryTypeColl"
|
|
52441
|
-
(modelChange)="setEntryType($event)"></co-list-of-values>
|
|
52732
|
+
[collection]="entryTypeColl" [screenConfigurationObject]="cfgNames.ServiceEntryType"
|
|
52733
|
+
(modelChange)="setEntryType($event)"></co-list-of-values> <!---->
|
|
52442
52734
|
</div>
|
|
52443
52735
|
<co-transaction-lines-side-panel
|
|
52444
52736
|
class="higher-max-width"
|
|
@@ -52450,22 +52742,27 @@ TransactionServiceOverviewComponent.decorators = [
|
|
|
52450
52742
|
</div>
|
|
52451
52743
|
<div class="activity-list-component-wrapper">
|
|
52452
52744
|
<div class="activity-task-creator-wrapper">
|
|
52453
|
-
<co-component-activity-list #openActivities [showActivityHeader]="showActivityHeader" [
|
|
52745
|
+
<co-component-activity-list #openActivities [showActivityHeader]="showActivityHeader" [screenConfigurationObject]="cfgNames.HeaderActivityList"
|
|
52746
|
+
[table]="TableName.Transactions" [key]="transactionInfo.id.toString()" (refreshRequested)="finishedActivitiesRefreshRequested()">
|
|
52454
52747
|
</co-component-activity-list>
|
|
52455
52748
|
<co-task-creator [table]="TableName.Transactions" [remarkAndWorkKey]="transactionInfo.id.toString()" [taskKey]="transactionInfo.transactionNr.toString()"
|
|
52456
52749
|
[author]="transactionService.loggedInUser" [branchNo]="transactionInfo.branch.relationNr.toString()"
|
|
52457
|
-
[workflowCategoryType]="WorkflowCategoryType.ServiceOrder"
|
|
52750
|
+
[workflowCategoryType]="WorkflowCategoryType.ServiceOrder" [screenConfigurationObject]="cfgNames.HeaderTaskCreator"
|
|
52458
52751
|
(activityCreated)="fullActivitiesRefreshRequested()"></co-task-creator>
|
|
52459
52752
|
</div>
|
|
52460
52753
|
<div class="activity-list-conv-wrapper">
|
|
52461
|
-
<label class="label history-label" [textContent]="'HISTORIC_ACTIVITY_CHAT'| localize"></label>
|
|
52462
|
-
<co-activity-list [activities]="activities"></co-activity-list>
|
|
52754
|
+
<label class="label history-label" [textContent]="'HISTORIC_ACTIVITY_CHAT'| localize" [screenConfigurationObject]="cfgNames.HeaderHistActivities" screenConfigNativeElement></label>
|
|
52755
|
+
<co-activity-list [activities]="activities" [screenConfigurationObject]="cfgNames.HeaderHistActivities"></co-activity-list>
|
|
52463
52756
|
</div>
|
|
52464
52757
|
</div>
|
|
52465
52758
|
</div>
|
|
52466
52759
|
</div>
|
|
52467
52760
|
|
|
52468
52761
|
`,
|
|
52762
|
+
providers: [{
|
|
52763
|
+
provide: SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME,
|
|
52764
|
+
useExisting: forwardRef(() => TransactionServiceOverviewComponent)
|
|
52765
|
+
}],
|
|
52469
52766
|
encapsulation: ViewEncapsulation.None
|
|
52470
52767
|
},] }
|
|
52471
52768
|
];
|
|
@@ -52519,7 +52816,8 @@ TransactionServiceMessageComponent.decorators = [
|
|
|
52519
52816
|
[model]="transactionServiceInfo.reportMessage"
|
|
52520
52817
|
[forceReadonly]="readonly"
|
|
52521
52818
|
[showSaveCancel]="true"
|
|
52522
|
-
|
|
52819
|
+
[screenConfigurationObject]="cfgNames.ServiceMessage"
|
|
52820
|
+
></co-input-textarea>
|
|
52523
52821
|
`,
|
|
52524
52822
|
encapsulation: ViewEncapsulation.None
|
|
52525
52823
|
},] }
|
|
@@ -53648,7 +53946,8 @@ TransactionLinesSidePanelServiceOrderModule.decorators = [
|
|
|
53648
53946
|
CommonModule,
|
|
53649
53947
|
InputTextareaModule,
|
|
53650
53948
|
InputTextModule,
|
|
53651
|
-
IconModule
|
|
53949
|
+
IconModule,
|
|
53950
|
+
ScreenConfigurationModule
|
|
53652
53951
|
],
|
|
53653
53952
|
declarations: [
|
|
53654
53953
|
TransactionLinesSidePanelServiceOrderComponent
|
|
@@ -53695,7 +53994,8 @@ TransactionServiceOverviewModule.decorators = [
|
|
|
53695
53994
|
ComponentActivityListModule,
|
|
53696
53995
|
TaskCreatorModule,
|
|
53697
53996
|
TransactionLinesSidePanelModule,
|
|
53698
|
-
TransactionServiceMessageModule
|
|
53997
|
+
TransactionServiceMessageModule,
|
|
53998
|
+
ScreenConfigurationModule,
|
|
53699
53999
|
],
|
|
53700
54000
|
declarations: [
|
|
53701
54001
|
TransactionServiceOverviewComponent
|
|
@@ -55304,9 +55604,9 @@ class TransactionCashRegisterDialogComponent extends TransactionBaseComponent {
|
|
|
55304
55604
|
this.selectedPrinterLayout = defaultPrintLayout ? defaultPrintLayout : null;
|
|
55305
55605
|
const defaultEmailLayout = this.emailLayouts.find((layout) => layout.isDefault);
|
|
55306
55606
|
this.selectedEmailLayout = defaultEmailLayout ? defaultEmailLayout : null;
|
|
55307
|
-
|
|
55308
|
-
|
|
55309
|
-
}
|
|
55607
|
+
if (this.activeCashDrawer && this.activePrinter && defaultPrintLayout && defaultEmailLayout && this.cashRegisters.length === 1) {
|
|
55608
|
+
this.saveButtonClick();
|
|
55609
|
+
}
|
|
55310
55610
|
}
|
|
55311
55611
|
_prepareDialogData() {
|
|
55312
55612
|
return __awaiter(this, void 0, void 0, function* () {
|