sendung-lib 0.0.6 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/components/sendung-information/sendung-information.component.mjs +14 -31
- package/esm2022/lib/components/sendung-information/sendung-korrektur/aktuelle-daten/aktuelle-daten.component.mjs +56 -0
- package/esm2022/lib/components/sendung-information/sendung-korrektur/korrektur-button-cell/korrektur-button-cell.component.mjs +57 -0
- package/esm2022/lib/components/sendung-information/sendung-korrektur/korrektur-daten/korrektur-daten.component.mjs +190 -0
- package/esm2022/lib/services/form.service.mjs +2 -2
- package/fesm2022/sendung-lib.mjs +298 -32
- package/fesm2022/sendung-lib.mjs.map +1 -1
- package/lib/components/sendung-information/sendung-information.component.d.ts +1 -2
- package/lib/components/sendung-information/sendung-korrektur/aktuelle-daten/aktuelle-daten.component.d.ts +23 -0
- package/lib/components/sendung-information/sendung-korrektur/korrektur-button-cell/korrektur-button-cell.component.d.ts +25 -0
- package/lib/components/sendung-information/sendung-korrektur/korrektur-daten/korrektur-daten.component.d.ts +49 -0
- package/lib/services/form.service.d.ts +2 -2
- package/package.json +1 -1
- package/sendung-lib-0.0.8.tgz +0 -0
- package/sendung-lib-0.0.6.tgz +0 -0
package/fesm2022/sendung-lib.mjs
CHANGED
|
@@ -6,12 +6,14 @@ import { CollapseModule } from 'ngx-bootstrap/collapse';
|
|
|
6
6
|
import * as i3 from 'ngx-bootstrap/tabs';
|
|
7
7
|
import { TabsModule } from 'ngx-bootstrap/tabs';
|
|
8
8
|
import { FaIconComponent } from '@fortawesome/angular-fontawesome';
|
|
9
|
-
import { faInfoCircle, faImage, faCaretUp, faCaretDown } from '@fortawesome/free-solid-svg-icons';
|
|
9
|
+
import { faInfoCircle, faImage, faCaretUp, faCaretDown, faBoxOpen, faPallet, faCogs, faWeightHanging, faClock, faPencilAlt } from '@fortawesome/free-solid-svg-icons';
|
|
10
10
|
import * as i1 from 'ngx-bootstrap/modal';
|
|
11
11
|
import { ModalModule } from 'ngx-bootstrap/modal';
|
|
12
12
|
import { NgClass } from '@angular/common';
|
|
13
13
|
import * as i2 from 'ngx-lightbox';
|
|
14
14
|
import { BehaviorSubject } from 'rxjs';
|
|
15
|
+
import * as i1$1 from '@angular/forms';
|
|
16
|
+
import { FormsModule } from '@angular/forms';
|
|
15
17
|
|
|
16
18
|
class SendungLibService {
|
|
17
19
|
constructor() { }
|
|
@@ -326,7 +328,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
326
328
|
class FormService {
|
|
327
329
|
constructor() {
|
|
328
330
|
this.submittedForm = new BehaviorSubject(null);
|
|
329
|
-
this.dienste = new BehaviorSubject(
|
|
331
|
+
this.dienste = new BehaviorSubject(null);
|
|
330
332
|
this.dienste$ = this.dienste.asObservable();
|
|
331
333
|
this.allowedDienste = new BehaviorSubject([]);
|
|
332
334
|
this.shipmentInfo = new BehaviorSubject([]);
|
|
@@ -1083,32 +1085,289 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
1083
1085
|
type: Input
|
|
1084
1086
|
}] } });
|
|
1085
1087
|
|
|
1088
|
+
class AktuelleDatenComponent {
|
|
1089
|
+
constructor(formService) {
|
|
1090
|
+
this.formService = formService;
|
|
1091
|
+
this.faBoxOpen = faBoxOpen;
|
|
1092
|
+
this.faPallet = faPallet;
|
|
1093
|
+
this.faCogs = faCogs;
|
|
1094
|
+
this.faWeightHanging = faWeightHanging;
|
|
1095
|
+
this.dienste = [];
|
|
1096
|
+
}
|
|
1097
|
+
ngOnInit() {
|
|
1098
|
+
if (this.shipmentInfoDetails.dienste !== null) {
|
|
1099
|
+
this.shipmentInfoDetails.dienste.forEach((dienste) => {
|
|
1100
|
+
this.dienste.push(dienste);
|
|
1101
|
+
});
|
|
1102
|
+
}
|
|
1103
|
+
setTimeout(() => {
|
|
1104
|
+
console.log(this.allowedDienste);
|
|
1105
|
+
}, 3000);
|
|
1106
|
+
let filteredAllowed = this.allowedDienste.map((allowedDienst) => {
|
|
1107
|
+
return allowedDienst.bezeichnung;
|
|
1108
|
+
});
|
|
1109
|
+
this.displayDiensteToCorrect = this.dienste.filter((displayDienste) => filteredAllowed.includes(displayDienste.bezeichnung));
|
|
1110
|
+
this.formService.allowedDienste.next(this.displayDiensteToCorrect);
|
|
1111
|
+
this.colli = this.shipmentInfoDetails.colli;
|
|
1112
|
+
this.palette = this.shipmentInfoDetails.paletten;
|
|
1113
|
+
this.gewicht = this.shipmentInfoDetails.gesamtgewicht;
|
|
1114
|
+
this.displayDienste = this.shipmentInfoDetails.dienste;
|
|
1115
|
+
}
|
|
1116
|
+
showDienste(param) {
|
|
1117
|
+
const dienste = [];
|
|
1118
|
+
param.map((dienst) => {
|
|
1119
|
+
if (dienst.anzeigeKuerzel !== null) {
|
|
1120
|
+
dienste.push(dienst.anzeigeKuerzel);
|
|
1121
|
+
}
|
|
1122
|
+
});
|
|
1123
|
+
return dienste.join(', ');
|
|
1124
|
+
}
|
|
1125
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AktuelleDatenComponent, deps: [{ token: FormService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1126
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: AktuelleDatenComponent, isStandalone: true, selector: "lib-aktuelle-daten", inputs: { shipmentInfoDetails: "shipmentInfoDetails", allowedDienste: "allowedDienste" }, ngImport: i0, template: "<p>Aktuelle Werte</p>\r\n<div class=\"d-flex justify-content-between\">\r\n <div class=\"p-2\">\r\n <fa-icon [icon]=\"faBoxOpen\" class=\"iconSize\"></fa-icon>\r\n {{ colli }}\r\n </div>\r\n <div class=\"p-2\">\r\n <fa-icon [icon]=\"faPallet\" class=\"iconSize\"></fa-icon>\r\n {{ palette }}\r\n </div>\r\n <div class=\"p-2\">\r\n <fa-icon [icon]=\"faWeightHanging\" class=\"iconSize\"></fa-icon>\r\n {{ gewicht }} Kg\r\n </div>\r\n <div class=\"p-2\">\r\n <fa-icon [icon]=\"faCogs\" class=\"iconSize icon-stack mr-2\"></fa-icon>\r\n @if (displayDiensteToCorrect.length !== 0) {\r\n <span>{{ showDienste(dienste) }}</span>\r\n } @else {\r\n <span>{{ showDienste(dienste) }}</span>\r\n }\r\n </div>\r\n</div>\r\n", styles: [".iconSize{font-size:22px!important}.icon-stack{position:relative;display:inline-block;height:2em;vertical-align:middle}.icon-stack-1x,.icon-stack-2x,.icon-stack-3x{position:absolute;left:0;width:100%;text-align:right}.icon-stack-1x{line-height:inherit}.icon-stack-2x{font-size:1.5em}.icon-stack-3x{font-size:2em}\n"], dependencies: [{ kind: "component", type: FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }] }); }
|
|
1127
|
+
}
|
|
1128
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AktuelleDatenComponent, decorators: [{
|
|
1129
|
+
type: Component,
|
|
1130
|
+
args: [{ selector: 'lib-aktuelle-daten', standalone: true, imports: [
|
|
1131
|
+
FaIconComponent
|
|
1132
|
+
], template: "<p>Aktuelle Werte</p>\r\n<div class=\"d-flex justify-content-between\">\r\n <div class=\"p-2\">\r\n <fa-icon [icon]=\"faBoxOpen\" class=\"iconSize\"></fa-icon>\r\n {{ colli }}\r\n </div>\r\n <div class=\"p-2\">\r\n <fa-icon [icon]=\"faPallet\" class=\"iconSize\"></fa-icon>\r\n {{ palette }}\r\n </div>\r\n <div class=\"p-2\">\r\n <fa-icon [icon]=\"faWeightHanging\" class=\"iconSize\"></fa-icon>\r\n {{ gewicht }} Kg\r\n </div>\r\n <div class=\"p-2\">\r\n <fa-icon [icon]=\"faCogs\" class=\"iconSize icon-stack mr-2\"></fa-icon>\r\n @if (displayDiensteToCorrect.length !== 0) {\r\n <span>{{ showDienste(dienste) }}</span>\r\n } @else {\r\n <span>{{ showDienste(dienste) }}</span>\r\n }\r\n </div>\r\n</div>\r\n", styles: [".iconSize{font-size:22px!important}.icon-stack{position:relative;display:inline-block;height:2em;vertical-align:middle}.icon-stack-1x,.icon-stack-2x,.icon-stack-3x{position:absolute;left:0;width:100%;text-align:right}.icon-stack-1x{line-height:inherit}.icon-stack-2x{font-size:1.5em}.icon-stack-3x{font-size:2em}\n"] }]
|
|
1133
|
+
}], ctorParameters: () => [{ type: FormService }], propDecorators: { shipmentInfoDetails: [{
|
|
1134
|
+
type: Input
|
|
1135
|
+
}], allowedDienste: [{
|
|
1136
|
+
type: Input
|
|
1137
|
+
}] } });
|
|
1138
|
+
|
|
1139
|
+
class KorrekturDatenComponent {
|
|
1140
|
+
constructor(fb, cd, formService) {
|
|
1141
|
+
this.fb = fb;
|
|
1142
|
+
this.cd = cd;
|
|
1143
|
+
this.formService = formService;
|
|
1144
|
+
// Icons
|
|
1145
|
+
this.faBoxOpen = faBoxOpen;
|
|
1146
|
+
this.faPallet = faPallet;
|
|
1147
|
+
this.faCogs = faCogs;
|
|
1148
|
+
this.faClock = faClock;
|
|
1149
|
+
this.faWeightHanging = faWeightHanging;
|
|
1150
|
+
this.showTimePicker = true;
|
|
1151
|
+
this.setDeliveryTime = false;
|
|
1152
|
+
this.isColPalValid = true;
|
|
1153
|
+
this.isGewichtValid = true;
|
|
1154
|
+
this.displayError = false;
|
|
1155
|
+
this.colli = 0;
|
|
1156
|
+
this.palette = 0;
|
|
1157
|
+
this.totalColliAndPalette = 0;
|
|
1158
|
+
this.emptyString = '';
|
|
1159
|
+
this.selbstabholer = false;
|
|
1160
|
+
this.keepWeight = '';
|
|
1161
|
+
this.submitCloseModalEvent = new EventEmitter();
|
|
1162
|
+
this.setTime();
|
|
1163
|
+
}
|
|
1164
|
+
setTime() {
|
|
1165
|
+
let now = new Date();
|
|
1166
|
+
let hours = ('0' + now.getHours()).slice(-2);
|
|
1167
|
+
let minutes = ('0' + now.getMinutes()).slice(-2);
|
|
1168
|
+
let str = hours + ':' + minutes;
|
|
1169
|
+
this.timeToDisplay = str;
|
|
1170
|
+
}
|
|
1171
|
+
activateAbholer(event) {
|
|
1172
|
+
this.selbstabholer = event.currentTarget.checked;
|
|
1173
|
+
this.formService.selbstabholer.next(this.selbstabholer);
|
|
1174
|
+
}
|
|
1175
|
+
ngOnInit() {
|
|
1176
|
+
this.totalColliAndPalette = this.shipmentInfoDetails.colli + this.shipmentInfoDetails.paletten;
|
|
1177
|
+
this.keepWeight = this.shipmentInfoDetails.gesamtgewicht;
|
|
1178
|
+
this.keepColli = this.shipmentInfoDetails.colli;
|
|
1179
|
+
this.keepPalette = this.shipmentInfoDetails.paletten;
|
|
1180
|
+
// Wenn der User keine Dienstkorrektur durchführt, dann wird der aktuelle Dienst übernommen
|
|
1181
|
+
this.shipmentInfoDetails.dienste.map((currentDienst) => {
|
|
1182
|
+
if (currentDienst.anzeigeKuerzel !== null) {
|
|
1183
|
+
this.dienste.forEach((allowedDienste) => {
|
|
1184
|
+
if (allowedDienste.code === currentDienst.code) {
|
|
1185
|
+
this.selectedDropdownDienst = currentDienst;
|
|
1186
|
+
this.getDienstData(this.selectedDropdownDienst);
|
|
1187
|
+
}
|
|
1188
|
+
});
|
|
1189
|
+
}
|
|
1190
|
+
});
|
|
1191
|
+
this.filterSaturdayFromCombobox();
|
|
1192
|
+
this.sortedDienste(this.dienste);
|
|
1193
|
+
}
|
|
1194
|
+
filterSaturdayFromCombobox() {
|
|
1195
|
+
this.dienste.map((dienst, index) => {
|
|
1196
|
+
if (dienst.code === 'SAMSTAG') {
|
|
1197
|
+
this.dienste.splice(index, 1);
|
|
1198
|
+
}
|
|
1199
|
+
});
|
|
1200
|
+
}
|
|
1201
|
+
checkTotalOfColliAndPalette(inputtype, value) {
|
|
1202
|
+
if (value.model === '' && inputtype === 'colli') {
|
|
1203
|
+
this.shipmentInfoDetails.colli = 0;
|
|
1204
|
+
}
|
|
1205
|
+
else if (value.model === '' && inputtype === 'palette') {
|
|
1206
|
+
this.shipmentInfoDetails.paletten = 0;
|
|
1207
|
+
}
|
|
1208
|
+
if (this.isCorrectedValuesNotNull()) {
|
|
1209
|
+
this.colli = +this.shipmentInfoDetails.colli;
|
|
1210
|
+
this.palette = +this.shipmentInfoDetails.paletten;
|
|
1211
|
+
const correctedColliAndPalette = this.colli + this.palette;
|
|
1212
|
+
this.totalColliAndPalette === correctedColliAndPalette ? this.isColPalValid = true : this.isColPalValid = false;
|
|
1213
|
+
this.cd.detectChanges();
|
|
1214
|
+
}
|
|
1215
|
+
else {
|
|
1216
|
+
this.isColPalValid = false;
|
|
1217
|
+
this.cd.detectChanges();
|
|
1218
|
+
}
|
|
1219
|
+
}
|
|
1220
|
+
isCorrectedValuesNotNull() {
|
|
1221
|
+
const colli = this.shipmentInfoDetails.colli;
|
|
1222
|
+
const palette = this.shipmentInfoDetails.paletten;
|
|
1223
|
+
const colliValidate = colli !== null && colli >= 0;
|
|
1224
|
+
const palValidate = palette !== null && palette >= 0;
|
|
1225
|
+
return colliValidate && palValidate;
|
|
1226
|
+
}
|
|
1227
|
+
onSubmit(isCorrectedValue) {
|
|
1228
|
+
if (isCorrectedValue) {
|
|
1229
|
+
this.shipmentInfoDetails.datumUhrzeit = this.formatedDateString(new Date());
|
|
1230
|
+
const requestObject = {
|
|
1231
|
+
colli: this.shipmentInfoDetails.colli,
|
|
1232
|
+
palette: this.shipmentInfoDetails.paletten,
|
|
1233
|
+
gewicht: this.shipmentInfoDetails.gesamtgewicht,
|
|
1234
|
+
dienste: this.selectedDropdownDienst,
|
|
1235
|
+
diensttypid: this.selectedDropdownDienst.id,
|
|
1236
|
+
datumUhrzeit: this.shipmentInfoDetails.datumUhrzeit
|
|
1237
|
+
};
|
|
1238
|
+
this.formService.getSubmittedForm(requestObject);
|
|
1239
|
+
}
|
|
1240
|
+
else {
|
|
1241
|
+
this.shipmentInfoDetails.gesamtgewicht = this.keepWeight;
|
|
1242
|
+
this.shipmentInfoDetails.colli = this.keepColli;
|
|
1243
|
+
this.shipmentInfoDetails.paletten = this.keepPalette;
|
|
1244
|
+
}
|
|
1245
|
+
this.submitCloseModalEvent.emit(isCorrectedValue);
|
|
1246
|
+
}
|
|
1247
|
+
getDienstData(event) {
|
|
1248
|
+
this.selectedDienst = event?.code;
|
|
1249
|
+
this.selectedDienst === 'SONDER' ? this.setDeliveryTime = true : this.setDeliveryTime = false;
|
|
1250
|
+
this.diensttypId = event?.id;
|
|
1251
|
+
}
|
|
1252
|
+
sortedDienste(dienste) {
|
|
1253
|
+
dienste.map((dienst) => {
|
|
1254
|
+
switch (dienst.code) {
|
|
1255
|
+
case 'PLUS8':
|
|
1256
|
+
dienst.sortId = 1;
|
|
1257
|
+
break;
|
|
1258
|
+
case 'PLUS9':
|
|
1259
|
+
dienst.sortId = 2;
|
|
1260
|
+
break;
|
|
1261
|
+
case 'FRUEH':
|
|
1262
|
+
dienst.sortId = 3;
|
|
1263
|
+
break;
|
|
1264
|
+
case 'VORMITTAG':
|
|
1265
|
+
dienst.sortId = 4;
|
|
1266
|
+
break;
|
|
1267
|
+
case 'NORMAL':
|
|
1268
|
+
dienst.sortId = 5;
|
|
1269
|
+
break;
|
|
1270
|
+
case 'ABEND':
|
|
1271
|
+
dienst.sortId = 6;
|
|
1272
|
+
break;
|
|
1273
|
+
case 'SONDER':
|
|
1274
|
+
dienst.sortId = 7;
|
|
1275
|
+
break;
|
|
1276
|
+
}
|
|
1277
|
+
});
|
|
1278
|
+
this.dienste.sort((a, b) => a.sortId - b.sortId);
|
|
1279
|
+
}
|
|
1280
|
+
formatedDateString(event) {
|
|
1281
|
+
const month = (event.getMonth() + 1);
|
|
1282
|
+
const parsingDate = event.getDate() <= 9 ? '0' + event.getDate() : event.getDate();
|
|
1283
|
+
const parsingMonth = month <= 9 ? '0' + month : month;
|
|
1284
|
+
const date = parsingDate + '.' + parsingMonth + '.' + event.getFullYear() + ' ' + this.timeToDisplay + ':00';
|
|
1285
|
+
return date;
|
|
1286
|
+
}
|
|
1287
|
+
checkChange(event) {
|
|
1288
|
+
let pointToComma = event.target.value.replace(/(\d),(?=\d)/g, '$1.');
|
|
1289
|
+
let inputAsInt = Number(pointToComma);
|
|
1290
|
+
if (inputAsInt >= 0 && inputAsInt < 25000) {
|
|
1291
|
+
this.displayError = false;
|
|
1292
|
+
this.isGewichtValid = true;
|
|
1293
|
+
this.cd.detectChanges();
|
|
1294
|
+
return this.shipmentInfoDetails.gesamtgewicht = inputAsInt.toString();
|
|
1295
|
+
}
|
|
1296
|
+
else {
|
|
1297
|
+
this.displayError = true;
|
|
1298
|
+
this.isGewichtValid = false;
|
|
1299
|
+
this.cd.detectChanges();
|
|
1300
|
+
return this.shipmentInfoDetails.gesamtgewicht;
|
|
1301
|
+
}
|
|
1302
|
+
}
|
|
1303
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: KorrekturDatenComponent, deps: [{ token: i1$1.FormBuilder }, { token: i0.ChangeDetectorRef }, { token: FormService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1304
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: KorrekturDatenComponent, isStandalone: true, selector: "lib-korrektur-daten", inputs: { shipmentInfoDetails: "shipmentInfoDetails", dienste: "dienste" }, outputs: { submitCloseModalEvent: "submitCloseModalEvent" }, ngImport: i0, template: "<p>Korrigierte Werte</p>\r\n<form class=\"text-left border border-light\" #addresForm=\"ngForm\">\r\n <div class=\"d-flex justify-content-between\">\r\n\r\n <fa-icon [icon]=\"faBoxOpen\" class=\"iconSizeBox mr-2\"></fa-icon>\r\n <input type=\"text\" id=\"colli\" class=\"form-control inputWidth mr-2\" placeholder=\"Anzahl Colli\" name=\"colli\"\r\n #colli='ngModel'\r\n [(ngModel)]=\"shipmentInfoDetails.colli\" (change)=\"checkTotalOfColliAndPalette('colli', colli)\">\r\n\r\n <fa-icon [icon]=\"faPallet\" class=\"iconSize mr-2\"></fa-icon>\r\n <input type=\"text\" id=\"palette\" class=\"form-control inputWidth mr-2\" placeholder=\"Anzahl Paletten\" name=\"paletten\"\r\n #paletten='ngModel'\r\n [(ngModel)]=\"shipmentInfoDetails.paletten\" (change)=\"checkTotalOfColliAndPalette('palette', paletten)\">\r\n </div>\r\n\r\n <div class=\"d-flex justify-content-between mt-2\">\r\n <fa-icon [icon]=\"faWeightHanging\" class=\"iconSize mr-2\"></fa-icon>\r\n <input type=\"text\" id=\"gewicht\" class=\"form-control inputWidth mr-2\" placeholder=\"Gewicht in Kg\" name=\"gewicht\"\r\n #gewicht='ngModel'\r\n (change)=\"checkChange($event)\"\r\n [ngClass]=\"{'displayErrorBorder': this.displayError === true}\"\r\n [ngModel]=\"shipmentInfoDetails.gesamtgewicht\">\r\n\r\n <fa-icon [icon]=\"faCogs\" class=\"iconSize mr-2\"></fa-icon>\r\n <select class=\"form-control inputWidth mr-2\" id=\"dienste\" [attr.disabled]=\"selbstabholer? '': null\" name=\"dienstt\"\r\n #dienstt='ngModel' [(ngModel)]=\"selectedDropdownDienst\" (ngModelChange)=\"getDienstData($event)\">\r\n <option disabled [value]=\"selectedDropdownDienst\">Dienst ausw\u00E4hlen</option>\r\n @for (dienst of dienste; track dienst) {\r\n <option [ngValue]=\"dienst\">{{ dienst.bezeichnung }}</option>\r\n }\r\n </select>\r\n </div>\r\n\r\n @if (setDeliveryTime) {\r\n <div class=\"d-flex deliveryTime\">\r\n <fa-icon [icon]=\"faClock\" class=\"iconSize mr-2\"></fa-icon>\r\n <input type=\"time\" class=\"form-control\" id=\"datumUhrzeit\" name=\"uhrzeit\" #uhrzeit='ngModel'\r\n [(ngModel)]=\"timeToDisplay\">\r\n </div>\r\n }\r\n\r\n @if (!selectedDienst) {\r\n <div>\r\n <input class=\"selbstabholerCheckbox\" type=\"checkbox\" id=\"Selbstabholer\" name=\"Selbstabholer\"\r\n (change)=\"activateAbholer($event)\">\r\n <label for=\"Selbstabholer\">Selbstabholer</label>\r\n </div>\r\n }\r\n\r\n <div class=\"d-flex flex-row-reverse mt-5\">\r\n <div class=\"p-2\">\r\n <button class=\"btn btn-block btn-success\" [disabled]=\"!isColPalValid! || !isGewichtValid\"\r\n (click)=\"onSubmit(true)\">Speichern\r\n </button>\r\n </div>\r\n <div class=\"p-2\">\r\n <button class=\"btn btn-block btn-danger\" (click)=\"onSubmit(false)\">Abbrechen</button>\r\n </div>\r\n </div>\r\n @if (!isColPalValid || !isGewichtValid) {\r\n <span class=\"text-danger\">\r\n <p>Fehler! Bitte \u00FCberpr\u00FCfen Sie Ihre Eingaben. Colli und Paletten Stimmen nicht \u00FCberein oder das eingegebene Gewicht befindet sich nicht zwischen 0 und 25000 kg. </p>\r\n </span>\r\n }\r\n</form>\r\n", styles: [".myClass{background-color:red}.iconSize{font-size:22px!important}.iconSizeBox{font-size:19px!important}.icon-stack{position:relative;display:inline-block;height:2em;vertical-align:middle}.icon-stack-1x,.icon-stack-2x,.icon-stack-3x{position:absolute;left:0;width:100%;text-align:right}.icon-stack-1x{line-height:inherit}.icon-stack-2x{font-size:1.5em}.icon-stack-3x{font-size:2em}.selbstabholerCheckbox{margin:.4rem;margin-top:24px}.inputWidth{width:40%}.deliveryTime{width:30%;margin-top:.5rem}.displayErrorBorder{border:lightcoral 1px solid}\n"], dependencies: [{ kind: "component", type: FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1$1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
|
|
1305
|
+
}
|
|
1306
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: KorrekturDatenComponent, decorators: [{
|
|
1307
|
+
type: Component,
|
|
1308
|
+
args: [{ selector: 'lib-korrektur-daten', standalone: true, imports: [
|
|
1309
|
+
FaIconComponent,
|
|
1310
|
+
FormsModule,
|
|
1311
|
+
NgClass
|
|
1312
|
+
], template: "<p>Korrigierte Werte</p>\r\n<form class=\"text-left border border-light\" #addresForm=\"ngForm\">\r\n <div class=\"d-flex justify-content-between\">\r\n\r\n <fa-icon [icon]=\"faBoxOpen\" class=\"iconSizeBox mr-2\"></fa-icon>\r\n <input type=\"text\" id=\"colli\" class=\"form-control inputWidth mr-2\" placeholder=\"Anzahl Colli\" name=\"colli\"\r\n #colli='ngModel'\r\n [(ngModel)]=\"shipmentInfoDetails.colli\" (change)=\"checkTotalOfColliAndPalette('colli', colli)\">\r\n\r\n <fa-icon [icon]=\"faPallet\" class=\"iconSize mr-2\"></fa-icon>\r\n <input type=\"text\" id=\"palette\" class=\"form-control inputWidth mr-2\" placeholder=\"Anzahl Paletten\" name=\"paletten\"\r\n #paletten='ngModel'\r\n [(ngModel)]=\"shipmentInfoDetails.paletten\" (change)=\"checkTotalOfColliAndPalette('palette', paletten)\">\r\n </div>\r\n\r\n <div class=\"d-flex justify-content-between mt-2\">\r\n <fa-icon [icon]=\"faWeightHanging\" class=\"iconSize mr-2\"></fa-icon>\r\n <input type=\"text\" id=\"gewicht\" class=\"form-control inputWidth mr-2\" placeholder=\"Gewicht in Kg\" name=\"gewicht\"\r\n #gewicht='ngModel'\r\n (change)=\"checkChange($event)\"\r\n [ngClass]=\"{'displayErrorBorder': this.displayError === true}\"\r\n [ngModel]=\"shipmentInfoDetails.gesamtgewicht\">\r\n\r\n <fa-icon [icon]=\"faCogs\" class=\"iconSize mr-2\"></fa-icon>\r\n <select class=\"form-control inputWidth mr-2\" id=\"dienste\" [attr.disabled]=\"selbstabholer? '': null\" name=\"dienstt\"\r\n #dienstt='ngModel' [(ngModel)]=\"selectedDropdownDienst\" (ngModelChange)=\"getDienstData($event)\">\r\n <option disabled [value]=\"selectedDropdownDienst\">Dienst ausw\u00E4hlen</option>\r\n @for (dienst of dienste; track dienst) {\r\n <option [ngValue]=\"dienst\">{{ dienst.bezeichnung }}</option>\r\n }\r\n </select>\r\n </div>\r\n\r\n @if (setDeliveryTime) {\r\n <div class=\"d-flex deliveryTime\">\r\n <fa-icon [icon]=\"faClock\" class=\"iconSize mr-2\"></fa-icon>\r\n <input type=\"time\" class=\"form-control\" id=\"datumUhrzeit\" name=\"uhrzeit\" #uhrzeit='ngModel'\r\n [(ngModel)]=\"timeToDisplay\">\r\n </div>\r\n }\r\n\r\n @if (!selectedDienst) {\r\n <div>\r\n <input class=\"selbstabholerCheckbox\" type=\"checkbox\" id=\"Selbstabholer\" name=\"Selbstabholer\"\r\n (change)=\"activateAbholer($event)\">\r\n <label for=\"Selbstabholer\">Selbstabholer</label>\r\n </div>\r\n }\r\n\r\n <div class=\"d-flex flex-row-reverse mt-5\">\r\n <div class=\"p-2\">\r\n <button class=\"btn btn-block btn-success\" [disabled]=\"!isColPalValid! || !isGewichtValid\"\r\n (click)=\"onSubmit(true)\">Speichern\r\n </button>\r\n </div>\r\n <div class=\"p-2\">\r\n <button class=\"btn btn-block btn-danger\" (click)=\"onSubmit(false)\">Abbrechen</button>\r\n </div>\r\n </div>\r\n @if (!isColPalValid || !isGewichtValid) {\r\n <span class=\"text-danger\">\r\n <p>Fehler! Bitte \u00FCberpr\u00FCfen Sie Ihre Eingaben. Colli und Paletten Stimmen nicht \u00FCberein oder das eingegebene Gewicht befindet sich nicht zwischen 0 und 25000 kg. </p>\r\n </span>\r\n }\r\n</form>\r\n", styles: [".myClass{background-color:red}.iconSize{font-size:22px!important}.iconSizeBox{font-size:19px!important}.icon-stack{position:relative;display:inline-block;height:2em;vertical-align:middle}.icon-stack-1x,.icon-stack-2x,.icon-stack-3x{position:absolute;left:0;width:100%;text-align:right}.icon-stack-1x{line-height:inherit}.icon-stack-2x{font-size:1.5em}.icon-stack-3x{font-size:2em}.selbstabholerCheckbox{margin:.4rem;margin-top:24px}.inputWidth{width:40%}.deliveryTime{width:30%;margin-top:.5rem}.displayErrorBorder{border:lightcoral 1px solid}\n"] }]
|
|
1313
|
+
}], ctorParameters: () => [{ type: i1$1.FormBuilder }, { type: i0.ChangeDetectorRef }, { type: FormService }], propDecorators: { shipmentInfoDetails: [{
|
|
1314
|
+
type: Input
|
|
1315
|
+
}], dienste: [{
|
|
1316
|
+
type: Input
|
|
1317
|
+
}], submitCloseModalEvent: [{
|
|
1318
|
+
type: Output
|
|
1319
|
+
}] } });
|
|
1320
|
+
|
|
1321
|
+
class KorrekturButtonCellComponent {
|
|
1322
|
+
constructor(modalService, formService) {
|
|
1323
|
+
this.modalService = modalService;
|
|
1324
|
+
this.formService = formService;
|
|
1325
|
+
this.faPencilAlt = faPencilAlt;
|
|
1326
|
+
console.log('this.formService.dienste$: ', this.formService.dienste$);
|
|
1327
|
+
this.formService.dienste$.subscribe((dienste) => {
|
|
1328
|
+
console.log('DIENSTE: ', dienste);
|
|
1329
|
+
if (dienste) {
|
|
1330
|
+
this.dienste = dienste;
|
|
1331
|
+
}
|
|
1332
|
+
});
|
|
1333
|
+
}
|
|
1334
|
+
agInit(params) {
|
|
1335
|
+
this.params = params;
|
|
1336
|
+
this.gridApi = params.api;
|
|
1337
|
+
}
|
|
1338
|
+
openModal(template) {
|
|
1339
|
+
const config = {
|
|
1340
|
+
backdrop: 'static',
|
|
1341
|
+
keyboard: false,
|
|
1342
|
+
animated: true,
|
|
1343
|
+
ignoreBackdropClick: true,
|
|
1344
|
+
};
|
|
1345
|
+
this.modalRef = this.modalService.show(template, config);
|
|
1346
|
+
}
|
|
1347
|
+
closeModal(event) {
|
|
1348
|
+
this.modalRef.hide();
|
|
1349
|
+
}
|
|
1350
|
+
refresh() {
|
|
1351
|
+
return true;
|
|
1352
|
+
}
|
|
1353
|
+
afterGuiAttached(params) {
|
|
1354
|
+
}
|
|
1355
|
+
close() {
|
|
1356
|
+
this.modalRef.hide();
|
|
1357
|
+
}
|
|
1358
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: KorrekturButtonCellComponent, deps: [{ token: i1.BsModalService }, { token: FormService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1359
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: KorrekturButtonCellComponent, isStandalone: true, selector: "lib-korrektur-button-cell", ngImport: i0, template: "<fa-icon (click)=\"openModal(template)\" style=\"cursor: pointer; position: center\" [icon]=\"faPencilAlt\"></fa-icon>\r\n\r\n<ng-template #template>\r\n <div class=\"modal-header\">\r\n <h4 class=\"modal-title pull-left\">Sendungskorrektur</h4>\r\n\r\n </div>\r\n <div class=\"modal-body text-left\">\r\n <div class=\"\">\r\n <lib-aktuelle-daten [shipmentInfoDetails]=\"params.data\" [allowedDienste]=\"dienste\"></lib-aktuelle-daten>\r\n </div>\r\n <hr>\r\n <div class=\"\">\r\n <lib-korrektur-daten\r\n (submitCloseModalEvent)=\"closeModal($event)\"\r\n [shipmentInfoDetails]=\"params.data\"\r\n [dienste]=\"dienste\">\r\n </lib-korrektur-daten>\r\n </div>\r\n </div>\r\n</ng-template>\r\n", styles: [""], dependencies: [{ kind: "component", type: AktuelleDatenComponent, selector: "lib-aktuelle-daten", inputs: ["shipmentInfoDetails", "allowedDienste"] }, { kind: "component", type: KorrekturDatenComponent, selector: "lib-korrektur-daten", inputs: ["shipmentInfoDetails", "dienste"], outputs: ["submitCloseModalEvent"] }, { kind: "component", type: FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }] }); }
|
|
1360
|
+
}
|
|
1361
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: KorrekturButtonCellComponent, decorators: [{
|
|
1362
|
+
type: Component,
|
|
1363
|
+
args: [{ selector: 'lib-korrektur-button-cell', standalone: true, imports: [
|
|
1364
|
+
AktuelleDatenComponent,
|
|
1365
|
+
KorrekturDatenComponent,
|
|
1366
|
+
FaIconComponent
|
|
1367
|
+
], template: "<fa-icon (click)=\"openModal(template)\" style=\"cursor: pointer; position: center\" [icon]=\"faPencilAlt\"></fa-icon>\r\n\r\n<ng-template #template>\r\n <div class=\"modal-header\">\r\n <h4 class=\"modal-title pull-left\">Sendungskorrektur</h4>\r\n\r\n </div>\r\n <div class=\"modal-body text-left\">\r\n <div class=\"\">\r\n <lib-aktuelle-daten [shipmentInfoDetails]=\"params.data\" [allowedDienste]=\"dienste\"></lib-aktuelle-daten>\r\n </div>\r\n <hr>\r\n <div class=\"\">\r\n <lib-korrektur-daten\r\n (submitCloseModalEvent)=\"closeModal($event)\"\r\n [shipmentInfoDetails]=\"params.data\"\r\n [dienste]=\"dienste\">\r\n </lib-korrektur-daten>\r\n </div>\r\n </div>\r\n</ng-template>\r\n" }]
|
|
1368
|
+
}], ctorParameters: () => [{ type: i1.BsModalService }, { type: FormService }] });
|
|
1369
|
+
|
|
1086
1370
|
class SendungInformationComponent {
|
|
1087
|
-
// @Input() set shipmentInfoDetails(data: Observable<any[]>) {
|
|
1088
|
-
// let loadingInterval = setInterval(() => {
|
|
1089
|
-
// if (this.gridApi) {
|
|
1090
|
-
// if (data) {
|
|
1091
|
-
// data.subscribe((shipmentInfo: any) => {
|
|
1092
|
-
// this.gridApi.setGridOption('rowData', shipmentInfo);
|
|
1093
|
-
// this.formService.shipmentInfo.next(shipmentInfo);
|
|
1094
|
-
// });
|
|
1095
|
-
// }
|
|
1096
|
-
// clearInterval(loadingInterval);
|
|
1097
|
-
// }
|
|
1098
|
-
// }, 200);
|
|
1099
|
-
// }
|
|
1100
|
-
// @Input() set dienste(data: Observable<any>) {
|
|
1101
|
-
// let loadingInterval = setInterval(() => {
|
|
1102
|
-
// if (this.gridApi) {
|
|
1103
|
-
// if (data) {
|
|
1104
|
-
// data.subscribe((dienste) => {
|
|
1105
|
-
// this.formService.setDienste(dienste);
|
|
1106
|
-
// });
|
|
1107
|
-
// }
|
|
1108
|
-
// clearInterval(loadingInterval);
|
|
1109
|
-
// }
|
|
1110
|
-
// }, 200);
|
|
1111
|
-
// }
|
|
1112
1371
|
constructor(formService) {
|
|
1113
1372
|
this.formService = formService;
|
|
1114
1373
|
this.isCollapsed = true;
|
|
@@ -1170,14 +1429,15 @@ class SendungInformationComponent {
|
|
|
1170
1429
|
cellStyle: { textAlign: 'center' },
|
|
1171
1430
|
cellRenderer: RadioaktivCellComponent
|
|
1172
1431
|
},
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1432
|
+
{
|
|
1433
|
+
headerName: '',
|
|
1434
|
+
cellRenderer: KorrekturButtonCellComponent,
|
|
1435
|
+
maxWidth: 60
|
|
1436
|
+
},
|
|
1178
1437
|
];
|
|
1179
1438
|
}
|
|
1180
1439
|
ngOnInit() {
|
|
1440
|
+
console.log('TEST NG-OnInit');
|
|
1181
1441
|
this.formService.submittedForm.subscribe((correctedValueForm => {
|
|
1182
1442
|
if (correctedValueForm !== null) {
|
|
1183
1443
|
this.sendCorrectedValues.emit(correctedValueForm);
|
|
@@ -1185,6 +1445,11 @@ class SendungInformationComponent {
|
|
|
1185
1445
|
this.formService.submittedForm.next(null);
|
|
1186
1446
|
}
|
|
1187
1447
|
}));
|
|
1448
|
+
this.shipmentInfoDetails.subscribe((shipmentInfo) => {
|
|
1449
|
+
if (shipmentInfo) {
|
|
1450
|
+
console.log('SHIPMENT-INFO: ', shipmentInfo);
|
|
1451
|
+
}
|
|
1452
|
+
});
|
|
1188
1453
|
}
|
|
1189
1454
|
gridReady(params) {
|
|
1190
1455
|
this.gridApi = params.api;
|
|
@@ -1213,6 +1478,7 @@ class SendungInformationComponent {
|
|
|
1213
1478
|
}
|
|
1214
1479
|
showDienste(param) {
|
|
1215
1480
|
const dienste = [];
|
|
1481
|
+
console.log(param.data);
|
|
1216
1482
|
param.data?.dienste?.map((dienst) => {
|
|
1217
1483
|
if (dienst.anzeigeKuerzel !== null) {
|
|
1218
1484
|
dienste.push(dienst.anzeigeKuerzel);
|