mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-31 09:37:15 +01:00
@@ -78,7 +78,7 @@
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
##Device = Big Desktops
|
||||
*/
|
||||
@media (min-width: 1281px) {
|
||||
@@ -87,7 +87,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
##Device = Laptops, Desktops, Ipad pro
|
||||
*/
|
||||
@media (min-width: 1025px) and (max-width: 1280px) {
|
||||
@@ -96,7 +96,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
##Device = Tablets, Ipads
|
||||
*/
|
||||
@media (min-width: 768px) and (max-width: 1024px) {
|
||||
@@ -105,7 +105,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
##Device = Low Resolution Tablets, Mobiles (Landscape)
|
||||
*/
|
||||
@media (min-width: 481px) and (max-width: 767px) {
|
||||
@@ -114,7 +114,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
##Device = Most of the Smartphones Mobiles (Portrait)
|
||||
*/
|
||||
@media (min-width: 320px) and (max-width: 480px) {
|
||||
|
||||
@@ -2,7 +2,13 @@
|
||||
<div class="printer-modal">
|
||||
<div class="header">
|
||||
<h1>Wählen Sie einen Drucker aus</h1>
|
||||
<lib-icon (click)="closeModal()" height="21px" class="close-icon" name="close" alt="close"></lib-icon>
|
||||
<lib-icon
|
||||
(click)="closeModal()"
|
||||
height="21px"
|
||||
class="close-icon"
|
||||
name="close"
|
||||
alt="close"
|
||||
></lib-icon>
|
||||
</div>
|
||||
<ng-container *ngIf="!error">
|
||||
<div class="body">
|
||||
@@ -17,12 +23,21 @@
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div>
|
||||
<app-button [primary]="true" [load]="true" [disabled]="!loaded" (action)="emitPrint()" #printBtn>Drucken</app-button>
|
||||
<app-button
|
||||
[primary]="true"
|
||||
[load]="true"
|
||||
[disabled]="!loaded"
|
||||
(action)="emitPrint()"
|
||||
#printBtn
|
||||
>Drucken</app-button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="error">
|
||||
<span class="error-message">{{ errorMessage }}</span>
|
||||
<span class="error-message isa-font-color-warning">{{
|
||||
errorMessage
|
||||
}}</span>
|
||||
</ng-container>
|
||||
</div>
|
||||
</app-modal>
|
||||
|
||||
@@ -1,4 +1,12 @@
|
||||
import { Component, OnInit, Output, EventEmitter, OnDestroy, ViewChild, ChangeDetectorRef } from '@angular/core';
|
||||
import {
|
||||
Component,
|
||||
OnInit,
|
||||
Output,
|
||||
EventEmitter,
|
||||
OnDestroy,
|
||||
ViewChild,
|
||||
ChangeDetectorRef,
|
||||
} from '@angular/core';
|
||||
import { PrinterService } from '../../core/services/printer.service';
|
||||
import { ModalService, ButtonComponent } from '@libs/ui';
|
||||
import { Subject } from 'rxjs';
|
||||
@@ -27,13 +35,19 @@ export class PrinterSelectionComponent implements OnInit, OnDestroy {
|
||||
@Output() closed = new EventEmitter();
|
||||
@ViewChild('printBtn', { static: false }) printBtn: ButtonComponent;
|
||||
|
||||
constructor(private printerService: PrinterService, private modalService: ModalService, private cdr: ChangeDetectorRef) {}
|
||||
constructor(
|
||||
private printerService: PrinterService,
|
||||
private modalService: ModalService,
|
||||
private cdr: ChangeDetectorRef
|
||||
) {}
|
||||
|
||||
ngOnInit() {}
|
||||
|
||||
printerSelected(value: string | number) {
|
||||
this.selected = value;
|
||||
this.selectedPrinterValue = this.printers.find((t) => t.text === this.selected).key;
|
||||
this.selectedPrinterValue = this.printers.find(
|
||||
(t) => t.text === this.selected
|
||||
).key;
|
||||
}
|
||||
|
||||
emitPrint() {
|
||||
@@ -63,10 +77,16 @@ export class PrinterSelectionComponent implements OnInit, OnDestroy {
|
||||
this.printers = result.map((t) => {
|
||||
return { key: t.key, text: t.description, selected: t.selected };
|
||||
});
|
||||
const selectedPrinter = this.printers.find((printer) => printer.selected);
|
||||
const selectedPrinter = this.printers.find(
|
||||
(printer) => printer.selected
|
||||
);
|
||||
this.options = this.printers.map((t) => t.text);
|
||||
this.selectedPrinterValue = selectedPrinter ? selectedPrinter.key : this.printers[0].key;
|
||||
this.selected = selectedPrinter ? selectedPrinter.text : this.options[0];
|
||||
this.selectedPrinterValue = selectedPrinter
|
||||
? selectedPrinter.key
|
||||
: this.printers[0].key;
|
||||
this.selected = selectedPrinter
|
||||
? selectedPrinter.text
|
||||
: this.options[0];
|
||||
this.error = false;
|
||||
this.loaded = true;
|
||||
if (this.printBtn) {
|
||||
|
||||
@@ -133,7 +133,12 @@ export class ShelfMapping {
|
||||
return [];
|
||||
}
|
||||
return orders.map((order, index) => {
|
||||
const hideCompartmentNumber = collectingShelfService.processOrderCompartmentNumber(orders, order, index, firstBatch);
|
||||
const hideCompartmentNumber = collectingShelfService.processOrderCompartmentNumber(
|
||||
orders,
|
||||
order,
|
||||
index,
|
||||
firstBatch
|
||||
);
|
||||
return <CollectingShelfOrder>{
|
||||
orderId: order.orderId,
|
||||
orderItemId: order.orderItemId,
|
||||
@@ -159,7 +164,6 @@ export class ShelfMapping {
|
||||
lastName: order.lastName,
|
||||
firstName: order.firstName,
|
||||
specialComment: order.specialComment,
|
||||
nextProcessingStatus: order.nextProcessingStatus,
|
||||
ssc: order.ssc,
|
||||
sscText: order.sscText,
|
||||
supplier: order.supplier,
|
||||
|
||||
@@ -3,7 +3,6 @@ import {
|
||||
OrderItemProcessingStatusValue,
|
||||
ProductDTO,
|
||||
Gender,
|
||||
KeyValueDTOOfOrderItemProcessingStatusValueAndString,
|
||||
} from '@swagger/oms';
|
||||
import { ShelfOrderItemLevel } from './shelf-order-item-level.enum';
|
||||
|
||||
@@ -32,7 +31,6 @@ export interface CollectingShelfOrder {
|
||||
lastName?: string;
|
||||
firstName?: string;
|
||||
specialComment?: string;
|
||||
nextProcessingStatus?: Array<KeyValueDTOOfOrderItemProcessingStatusValueAndString>;
|
||||
ssc?: string;
|
||||
sscText?: string;
|
||||
supplier?: string;
|
||||
|
||||
@@ -24,7 +24,7 @@ export class ContentHeaderService {
|
||||
};
|
||||
blackList = {
|
||||
breadcrumbs: ['/dashboard', '/branch/main'],
|
||||
filter: ['/history', 'edit'],
|
||||
filter: ['/history', 'edit', 'shelf/details'],
|
||||
};
|
||||
|
||||
constructor(
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
import { OrderItemProcessingStatusValue, EnvironmentChannel } from '@swagger/oms';
|
||||
import {
|
||||
OrderItemProcessingStatusValue,
|
||||
EnvironmentChannel,
|
||||
ReceiptDTO,
|
||||
KeyValueDTOOfStringAndString,
|
||||
} from '@swagger/oms';
|
||||
|
||||
export interface OrderDetailsCardInput {
|
||||
firstName?: string;
|
||||
@@ -9,8 +14,12 @@ export interface OrderDetailsCardInput {
|
||||
customerNumber?: string;
|
||||
processingStatus?: OrderItemProcessingStatusValue;
|
||||
estimatedShippingDate?: Date;
|
||||
pickupDeadline?: Date;
|
||||
pickUpDeadline?: Date;
|
||||
compartmentCode?: string;
|
||||
compartmentInfo?: string;
|
||||
processingStatusDate?: Date;
|
||||
features?: { [key: string]: string };
|
||||
receipts?: ReceiptDTO[];
|
||||
orderId?: number;
|
||||
actions?: KeyValueDTOOfStringAndString[];
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<h2 class="isa-flex isa-justify-content-space-between">
|
||||
<h2 class="isa-flex isa-justify-content-space-between isa-mb-10">
|
||||
<span>{{ orderDetails?.firstName }} {{ orderDetails?.lastName }}</span>
|
||||
<span
|
||||
>{{ orderDetails?.compartmentCode
|
||||
@@ -7,6 +7,18 @@
|
||||
}}</span
|
||||
>
|
||||
</h2>
|
||||
<h3
|
||||
*ngIf="orderDetails?.features?.paid || orderDetails?.features?.code"
|
||||
class="isa-flex isa-justify-content-space-between isa-align-items-center isa-mt-0 isa-mb-20"
|
||||
>
|
||||
<span>{{ orderDetails.features?.code }}</span>
|
||||
<div class="isa-paid-marker isa-mt-9 isa-mb-9">
|
||||
<lib-icon height="24px" width="24px" name="Check_green_circle"></lib-icon>
|
||||
<strong class="isa-font-size-18">
|
||||
{{ orderDetails.features?.paid }}
|
||||
</strong>
|
||||
</div>
|
||||
</h3>
|
||||
<div class="isa-flex isa-justify-content-space-between">
|
||||
<div class="isa-flex isa-flex-direction-column isa-container-width-380">
|
||||
<div class="detail">
|
||||
@@ -145,7 +157,7 @@
|
||||
(click)="deadlineDropdown.toggle()"
|
||||
>
|
||||
<strong>
|
||||
{{ orderDetails?.pickupDeadline | date: 'dd.MM.yy' }}
|
||||
{{ orderDetails?.pickUpDeadline | date: 'dd.MM.yy' }}
|
||||
</strong>
|
||||
<lib-icon
|
||||
class="dp-button-icon"
|
||||
@@ -157,7 +169,7 @@
|
||||
</button>
|
||||
<app-ui-dropdown
|
||||
#deadlineDropdown
|
||||
[value]="orderDetails?.pickupDeadline"
|
||||
[value]="orderDetails?.pickUpDeadline"
|
||||
(valueChange)="changePickUpDeadline.emit($event)"
|
||||
>
|
||||
<ng-container *ngFor="let dl of pickupDeadlines | keyvalue">
|
||||
|
||||
@@ -1,4 +1,11 @@
|
||||
import { Component, OnInit, ChangeDetectionStrategy, Input, Output, EventEmitter } from '@angular/core';
|
||||
import {
|
||||
Component,
|
||||
OnInit,
|
||||
ChangeDetectionStrategy,
|
||||
Input,
|
||||
Output,
|
||||
EventEmitter,
|
||||
} from '@angular/core';
|
||||
import { OrderDetailsCardInput } from './order-details-card-input';
|
||||
import { ProcessingStatusNameMap } from '../../constants';
|
||||
import { OrderItemProcessingStatusValue } from '@swagger/oms';
|
||||
@@ -17,7 +24,10 @@ export class ShelfOrderDetailsCardComponent implements OnInit {
|
||||
const copy = new Map(ProcessingStatusNameMap);
|
||||
|
||||
if (this.orderDetails) {
|
||||
if (this.orderDetails.processingStatus === 16 || this.orderDetails.processingStatus === 8192) {
|
||||
if (
|
||||
this.orderDetails.processingStatus === 16 ||
|
||||
this.orderDetails.processingStatus === 8192
|
||||
) {
|
||||
copy.delete(128);
|
||||
}
|
||||
if (this.orderDetails.processingStatus >= 0) {
|
||||
@@ -25,6 +35,10 @@ export class ShelfOrderDetailsCardComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
if (this.showCreateShippingNote) {
|
||||
copy.set(256, this.getUpdatedPickUpOption(copy.get(256)));
|
||||
}
|
||||
|
||||
return copy;
|
||||
}
|
||||
|
||||
@@ -35,8 +49,8 @@ export class ShelfOrderDetailsCardComponent implements OnInit {
|
||||
let FOUR_WEEKS = 1000 * 60 * 60 * 24 * 28;
|
||||
|
||||
if (this.orderDetails) {
|
||||
TWO_WEEKS += new Date(this.orderDetails.pickupDeadline).getTime();
|
||||
FOUR_WEEKS += new Date(this.orderDetails.pickupDeadline).getTime();
|
||||
TWO_WEEKS += new Date(this.orderDetails.pickUpDeadline).getTime();
|
||||
FOUR_WEEKS += new Date(this.orderDetails.pickUpDeadline).getTime();
|
||||
} else {
|
||||
TWO_WEEKS += Date.now();
|
||||
FOUR_WEEKS += Date.now();
|
||||
@@ -51,6 +65,8 @@ export class ShelfOrderDetailsCardComponent implements OnInit {
|
||||
@Input()
|
||||
orderDetails: OrderDetailsCardInput;
|
||||
|
||||
@Input() showCreateShippingNote = false;
|
||||
|
||||
@Output()
|
||||
changeProcessingStatus = new EventEmitter<OrderItemProcessingStatusValue>();
|
||||
|
||||
@@ -63,4 +79,11 @@ export class ShelfOrderDetailsCardComponent implements OnInit {
|
||||
constructor(private dateAdapter: DateAdapter<Date>) {}
|
||||
|
||||
ngOnInit() {}
|
||||
|
||||
private getUpdatedPickUpOption(
|
||||
option: { value: string; disabled: boolean },
|
||||
text = 'abgeholt und Lieferschein drucken'
|
||||
) {
|
||||
return { ...option, value: text };
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,14 +2,21 @@
|
||||
<div class="product-image">
|
||||
<img
|
||||
class="thumbnail"
|
||||
src="https://produktbilder.ihugendubel.de/{{ orderItemListItem?.product.ean }}.jpg?showDummy=true"
|
||||
src="https://produktbilder.ihugendubel.de/{{
|
||||
orderItemListItem?.product.ean
|
||||
}}.jpg?showDummy=true"
|
||||
alt="item.product.name"
|
||||
/>
|
||||
</div>
|
||||
<div class="product-details isa-flex-fill isa-flex isa-flex-row">
|
||||
<div class="isa-flex-fill">
|
||||
<h4 class="product-name">
|
||||
{{ [orderItemListItem?.product?.contributors, orderItemListItem?.product?.name] | title }}
|
||||
{{
|
||||
[
|
||||
orderItemListItem?.product?.contributors,
|
||||
orderItemListItem?.product?.name
|
||||
] | title
|
||||
}}
|
||||
</h4>
|
||||
<h4 class="isa-mb-6 isa-mt-12">Bestellung</h4>
|
||||
<div class="detail">
|
||||
@@ -22,39 +29,48 @@
|
||||
<div class="detail">
|
||||
<div class="name">Menge</div>
|
||||
<div class="value">
|
||||
<ng-container *ngIf="!inputQuantity">
|
||||
<button class="isa-btn btn-quantity isa-text-left isa-p-0" [disabled]="!selectable" (click)="quantityDropdown.toggle()">
|
||||
{{ orderItemListItem?.quantity }}x
|
||||
<button
|
||||
class="isa-btn btn-quantity isa-text-left isa-p-0"
|
||||
[disabled]="!selectable"
|
||||
(click)="quantityDropdown.toggle()"
|
||||
>
|
||||
{{ orderItemListItem?.quantity }}x
|
||||
|
||||
<lib-icon
|
||||
class="isa-ml-5"
|
||||
*ngIf="selectable"
|
||||
[class.up]="quantityDropdown.visible"
|
||||
[class.down]="!quantityDropdown.visible"
|
||||
name="Arrow_right"
|
||||
[height]="'16px'"
|
||||
></lib-icon>
|
||||
</button>
|
||||
<app-ui-dropdown
|
||||
#quantityDropdown
|
||||
[value]="orderItemListItem.quantity"
|
||||
[(ngModel)]="orderItemListItem.quantity"
|
||||
(ngModelChange)="quantityChange.emit($event); quantityDropdown.close()"
|
||||
<lib-icon
|
||||
class="isa-ml-5"
|
||||
*ngIf="selectable"
|
||||
[class.up]="quantityDropdown.visible"
|
||||
[class.down]="!quantityDropdown.visible"
|
||||
name="Arrow_right"
|
||||
[height]="'16px'"
|
||||
></lib-icon>
|
||||
</button>
|
||||
<app-ui-dropdown
|
||||
#quantityDropdown
|
||||
[value]="orderItemListItem.quantity"
|
||||
[(ngModel)]="orderItemListItem.quantity"
|
||||
(ngModelChange)="
|
||||
quantityChange.emit($event); quantityDropdown.close()
|
||||
"
|
||||
>
|
||||
<button
|
||||
appUiDropdownItem
|
||||
class="isa-btn isa-text-left isa-p-16"
|
||||
*ngFor="let val of dropdownValues"
|
||||
[selected]="val === orderItemListItem.quantity"
|
||||
[value]="val"
|
||||
>
|
||||
<button
|
||||
appUiDropdownItem
|
||||
class="isa-btn isa-text-left isa-p-16"
|
||||
*ngFor="let val of dropdownValues"
|
||||
[selected]="val === orderItemListItem.quantity"
|
||||
[value]="val"
|
||||
>
|
||||
{{ val }}
|
||||
</button>
|
||||
<button appUiDropdownItem class="isa-btn isa-text-left isa-p-16" *ngIf="moreThan10" (click)="enableInput()">
|
||||
10+
|
||||
</button>
|
||||
</app-ui-dropdown>
|
||||
</ng-container>
|
||||
{{ val }}
|
||||
</button>
|
||||
<button
|
||||
appUiDropdownItem
|
||||
class="isa-btn isa-text-left isa-p-16"
|
||||
*ngIf="moreThan10"
|
||||
(click)="enableInput()"
|
||||
>
|
||||
10+
|
||||
</button>
|
||||
</app-ui-dropdown>
|
||||
|
||||
<input
|
||||
class="quantity-input"
|
||||
@@ -66,7 +82,9 @@
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="inputQuantityError" class="quantity-input-error">{{ inputQuantityError }}</div>
|
||||
<div *ngIf="inputQuantityError" class="quantity-input-error">
|
||||
{{ inputQuantityError }}
|
||||
</div>
|
||||
<div class="detail">
|
||||
<div class="name">Preis</div>
|
||||
<div class="value">
|
||||
@@ -94,7 +112,9 @@
|
||||
</div>
|
||||
<div class="detail">
|
||||
<div class="name">Meldenummer</div>
|
||||
<div class="value">{{ orderItemListItem?.ssc }} - {{ orderItemListItem?.sscText }}</div>
|
||||
<div class="value">
|
||||
{{ orderItemListItem?.ssc }} - {{ orderItemListItem?.sscText }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail">
|
||||
<div class="name">MwSt</div>
|
||||
@@ -102,24 +122,88 @@
|
||||
{{ orderItemListItem['vatType'] | vatType }}
|
||||
</div>
|
||||
</div>
|
||||
<button class="isa-btn isa-btn-default isa-p-0 isa-flex isa-align-items-center" (click)="more = false">
|
||||
<lib-icon name="Arrow_back" height="15px" class="isa-flex isa-mr-5"></lib-icon>
|
||||
<div class="detail">
|
||||
<div class="name">Zahlungsweg</div>
|
||||
<div class="value">
|
||||
{{ orderItemListItem.paymentProcessing || '-' }}
|
||||
</div>
|
||||
</div>
|
||||
<ng-container *ngIf="orderItemListItem.receipts">
|
||||
<h4 class="isa-mb-6 isa-mt-20">
|
||||
{{ orderItemListItem.receipts.length > 1 ? 'Belege' : 'Beleg' }}
|
||||
</h4>
|
||||
<div
|
||||
*ngFor="let receipt of orderItemListItem.receipts"
|
||||
class="isa-mb-10"
|
||||
>
|
||||
<div class="detail">
|
||||
<div class="name">Belegnummer</div>
|
||||
<div class="value">
|
||||
{{ receipt.receiptNumber || '-' }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail">
|
||||
<div class="name">Erstellt am</div>
|
||||
<div class="value">
|
||||
{{
|
||||
(receipt.printedDate | date: 'dd.MM.yy | HH:mm') + ' Uhr' ||
|
||||
'-'
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail">
|
||||
<div class="name">Rechnungstext</div>
|
||||
<div class="value">
|
||||
{{ receipt.receiptText || '-' }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail">
|
||||
<div class="name">Belegart</div>
|
||||
<div class="value">
|
||||
{{ receipt.receiptType === 1 ? 'Lieferschein' : '-' }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-container>
|
||||
<button
|
||||
class="isa-btn isa-btn-default isa-p-0 isa-flex isa-align-items-center isa-mt-11"
|
||||
(click)="more = false"
|
||||
>
|
||||
<lib-icon
|
||||
name="Arrow_back"
|
||||
height="15px"
|
||||
class="isa-flex isa-mr-5"
|
||||
></lib-icon>
|
||||
<strong>Weniger</strong>
|
||||
</button>
|
||||
</ng-container>
|
||||
</div>
|
||||
<div class="isa-flex isa-flex-direction-column isa-justify-content-flex-end isa-text-right">
|
||||
<div
|
||||
class="isa-flex isa-flex-direction-column isa-justify-content-flex-end isa-text-right"
|
||||
>
|
||||
<div class="isa-flex-fill"></div>
|
||||
<div *ngIf="selectable">
|
||||
<label class="checkbox-wrapper">
|
||||
<input type="checkbox" [ngModel]="selected" (ngModelChange)="selectedChange($event)" />
|
||||
<input
|
||||
type="checkbox"
|
||||
[ngModel]="selected"
|
||||
(ngModelChange)="selectedChange($event)"
|
||||
/>
|
||||
<span class="checkmark"></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="isa-flex-fill"></div>
|
||||
<button class="isa-btn isa-btn-default isa-p-0 isa-flex isa-align-items-center" (click)="more = true" *ngIf="!more">
|
||||
<button
|
||||
class="isa-btn isa-btn-default isa-p-0 isa-flex isa-align-items-center"
|
||||
(click)="more = true"
|
||||
*ngIf="!more"
|
||||
>
|
||||
<strong>Mehr</strong>
|
||||
<lib-icon name="Arrow_More" height="15px" class="isa-flex isa-ml-5"></lib-icon>
|
||||
<lib-icon
|
||||
name="Arrow_More"
|
||||
height="15px"
|
||||
class="isa-flex isa-ml-5"
|
||||
></lib-icon>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -6,12 +6,12 @@ import {
|
||||
EventEmitter,
|
||||
OnChanges,
|
||||
SimpleChanges,
|
||||
ElementRef,
|
||||
ViewChild,
|
||||
ElementRef,
|
||||
ChangeDetectorRef,
|
||||
Renderer2,
|
||||
} from '@angular/core';
|
||||
import { OrderItemListItemDTO } from '@swagger/oms';
|
||||
import { OrderItemListItemDTO, ReceiptDTO } from '@swagger/oms';
|
||||
|
||||
@Component({
|
||||
selector: 'app-shelf-order-item-details',
|
||||
@@ -22,7 +22,9 @@ import { OrderItemListItemDTO } from '@swagger/oms';
|
||||
export class ShelfOrderItemDetailsComponent implements OnChanges {
|
||||
more = false;
|
||||
|
||||
private _orderItemListItem: OrderItemListItemDTO;
|
||||
private _orderItemListItem: OrderItemListItemDTO & {
|
||||
receipts?: ReceiptDTO[];
|
||||
};
|
||||
|
||||
public originalOrderItemListItem: OrderItemListItemDTO;
|
||||
|
||||
@@ -77,7 +79,9 @@ export class ShelfOrderItemDetailsComponent implements OnChanges {
|
||||
if (!!this.orderItemListItem) {
|
||||
this.moreThan10 = this.orderItemListItem.quantity > 10;
|
||||
|
||||
this.dropdownValues = Array(Math.min(this.orderItemListItem.quantity, this.moreThan10 ? 9 : 10))
|
||||
this.dropdownValues = Array(
|
||||
Math.min(this.orderItemListItem.quantity, this.moreThan10 ? 9 : 10)
|
||||
)
|
||||
.fill(0)
|
||||
.map((x, i) => i + 1);
|
||||
} else {
|
||||
@@ -107,7 +111,11 @@ export class ShelfOrderItemDetailsComponent implements OnChanges {
|
||||
quantity = 1;
|
||||
}
|
||||
|
||||
this.renderer.setProperty(this.quantityInputElement.nativeElement, 'value', quantity);
|
||||
this.renderer.setProperty(
|
||||
this.quantityInputElement.nativeElement,
|
||||
'value',
|
||||
quantity
|
||||
);
|
||||
|
||||
this.quantityChange.emit(quantity);
|
||||
this.cdr.detectChanges();
|
||||
|
||||
@@ -15,13 +15,8 @@
|
||||
}}{{ item.compartmentInfo && '_' + item.compartmentInfo }}
|
||||
</strong>
|
||||
</div>
|
||||
<div class="paid isa-mt-9 isa-mb-9" *ngIf="item.features?.paid">
|
||||
<lib-icon
|
||||
height="24px"
|
||||
width="24px"
|
||||
name="Check_green_circle"
|
||||
class="isa-mr-10"
|
||||
></lib-icon>
|
||||
<div class="isa-paid-marker isa-mt-9 isa-mb-9" *ngIf="item.features?.paid">
|
||||
<lib-icon height="24px" width="24px" name="Check_green_circle"></lib-icon>
|
||||
<strong class="isa-font-size-18"> {{ item.features?.paid }} </strong>
|
||||
</div>
|
||||
<div class="grid-container">
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
export enum actionCommands {
|
||||
'ORDERING' = 1,
|
||||
'PLACED' = 2,
|
||||
'ACCEPTED' = 4,
|
||||
'PARKED' = 8,
|
||||
'INPROCESS' = 16,
|
||||
'PREPARATIONFORSHIPPING' = 32,
|
||||
'DISPATCHED' = 64,
|
||||
'ARRIVED' = 128,
|
||||
'FETCHED' = 256,
|
||||
'CANCELEDBYBUYER' = 512,
|
||||
'CANCELEDBYRETAILER' = 1024,
|
||||
'CANCELEDBYSUPPLIER' = 2048,
|
||||
'NOTAVAILABLE' = 4096,
|
||||
'REORDERED' = 8192,
|
||||
'RETURNEDBYBUYER' = 16384,
|
||||
'AVAILABLEFORDOWNLOAD' = 32768,
|
||||
'DOWNLOADED' = 65536,
|
||||
'NOTFETCHED' = 131072,
|
||||
'BACKTOSTOCK' = 262144,
|
||||
'REQUESTED' = 524288,
|
||||
'REDIRECTEDINTERNALLY' = 1048576,
|
||||
'OVERDUE' = 2097152,
|
||||
'DELIVERED' = 4194304,
|
||||
'DETERMINESUPPLIER' = 8388608,
|
||||
'SUPPLIERTEMPORARILYOUTOFSTOCK' = 16777216,
|
||||
'RESERVED' = 33554432,
|
||||
'ASSEMBLED' = 67108864,
|
||||
'PACKED' = 134217728,
|
||||
'SHIPPINGNOTE' = 268435456,
|
||||
}
|
||||
|
||||
export enum additionalCommands {
|
||||
'PRINT_SHIPPINGNOTE' = 'PRINT_SHIPPINGNOTE',
|
||||
'PRINT_COMPARTMENTLABEL' = 'PRINT_COMPARTMENTLABEL',
|
||||
'FETCHED_PARTIAL' = 'FETCHED_PARTIAL',
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
// start:ng42.barrel
|
||||
export * from './action.commands';
|
||||
export * from './processing-status-name.map';
|
||||
export * from './vat-type-name.map';
|
||||
// end:ng42.barrel
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<h2 class="headline isa-text-center isa-font-weight-bold">Historie</h2>
|
||||
<div class="content">
|
||||
<app-shelf-order-details-card
|
||||
[showCreateShippingNote]="showCreateShippingNote$ | async"
|
||||
[orderDetails]="details$ | async"
|
||||
(changeEstimatedDeliveryDate)="updateEstimatedShippingDate($event)"
|
||||
(changePickUpDeadline)="changePickUpDate($event)"
|
||||
@@ -9,3 +10,5 @@
|
||||
></app-shelf-order-details-card>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<app-printer-selection></app-printer-selection>
|
||||
|
||||
@@ -1,10 +1,27 @@
|
||||
import { Component, ChangeDetectionStrategy, Input, TemplateRef, OnInit } from '@angular/core';
|
||||
import {
|
||||
Component,
|
||||
ChangeDetectionStrategy,
|
||||
Input,
|
||||
TemplateRef,
|
||||
OnInit,
|
||||
ViewChild,
|
||||
} from '@angular/core';
|
||||
import { HistoryStateFacade } from '@shelf-store/history';
|
||||
import { DetailsFacade } from '@shelf-store/details';
|
||||
import { OrderDetailsCardInput } from '../../../components/order-details-card';
|
||||
import { OrderItemListItemDTO, OrderItemProcessingStatusValue } from '@swagger/oms';
|
||||
import {
|
||||
OrderItemListItemDTO,
|
||||
OrderItemProcessingStatusValue,
|
||||
ReceiptDTO,
|
||||
} from '@swagger/oms';
|
||||
import { Observable } from 'rxjs';
|
||||
import { map, filter, shareReplay, take } from 'rxjs/operators';
|
||||
import { map, take } from 'rxjs/operators';
|
||||
import {
|
||||
ShelfOrderDetailsService,
|
||||
ShelfShippingNoteService,
|
||||
} from '../../../services';
|
||||
import { PrinterSelectionComponent } from 'apps/sales/src/app/components/printer-selection/printer-selection.component';
|
||||
import { ShelfNavigationService } from '../../../shared/services';
|
||||
|
||||
@Component({
|
||||
selector: 'app-shelf-history-header',
|
||||
@@ -13,49 +30,49 @@ import { map, filter, shareReplay, take } from 'rxjs/operators';
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export class ShelfHistoryHeaderComponent implements OnInit {
|
||||
@ViewChild(PrinterSelectionComponent, {
|
||||
read: PrinterSelectionComponent,
|
||||
static: true,
|
||||
})
|
||||
printerSelectionComponent: PrinterSelectionComponent;
|
||||
|
||||
@Input() orderId: any;
|
||||
@Input() compartmentCode: string;
|
||||
@Input() orderItemId: number;
|
||||
@Input() orderItemSubsetId: number;
|
||||
@Input() headerTemplate: TemplateRef<any>;
|
||||
|
||||
details$: Observable<OrderDetailsCardInput & { orderId: number }>;
|
||||
details$: Observable<OrderDetailsCardInput & { receipts?: ReceiptDTO[] }>;
|
||||
|
||||
orderItems$: Observable<OrderItemListItemDTO[]>;
|
||||
|
||||
constructor(private detailsFacade: DetailsFacade, private historyStateFacade: HistoryStateFacade) {}
|
||||
showCreateShippingNote$: Observable<boolean>;
|
||||
|
||||
constructor(
|
||||
private detailsFacade: DetailsFacade,
|
||||
private historyStateFacade: HistoryStateFacade,
|
||||
private navigationService: ShelfNavigationService,
|
||||
private orderDetailsService: ShelfOrderDetailsService,
|
||||
private shippingNoteService: ShelfShippingNoteService
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
if (this.compartmentCode) {
|
||||
this.orderItems$ = this.detailsFacade.getOrderItemsByCompartmentCode$(this.compartmentCode);
|
||||
this.orderItems$ = this.detailsFacade.getOrderItemsByCompartmentCode$(
|
||||
this.compartmentCode
|
||||
);
|
||||
} else if (this.orderId) {
|
||||
this.orderItems$ = this.detailsFacade.getOrderItemsByOrderNumber$(this.orderId);
|
||||
this.orderItems$ = this.detailsFacade.getOrderItemsByOrderNumber$(
|
||||
this.orderId
|
||||
);
|
||||
}
|
||||
|
||||
this.details$ = this.orderItems$.pipe(
|
||||
map((items) => {
|
||||
if (items.length > 0) {
|
||||
const item = items[0];
|
||||
return {
|
||||
firstName: item.firstName,
|
||||
lastName: item.lastName,
|
||||
customerNumber: item.buyerNumber,
|
||||
estimatedShippingDate: item.estimatedShippingDate ? new Date(item.estimatedShippingDate) : undefined,
|
||||
orderDate: new Date(item.orderDate),
|
||||
orderNumber: item.orderNumber,
|
||||
processingStatus: item.processingStatus,
|
||||
processingStatusDate: new Date(item.processingStatusDate),
|
||||
orderChannel: item.clientChannel,
|
||||
compartmentCode: item.compartmentCode,
|
||||
compartmentInfo: item.compartmentInfo,
|
||||
pickupDeadline: new Date(item.pickUpDeadline),
|
||||
orderId: item.orderId,
|
||||
} as OrderDetailsCardInput & { orderId: number };
|
||||
}
|
||||
return undefined;
|
||||
}),
|
||||
filter((details) => !!details),
|
||||
shareReplay()
|
||||
this.details$ = this.orderDetailsService.orderDetailsCardFromOrderItems$(
|
||||
this.orderItems$
|
||||
);
|
||||
|
||||
this.showCreateShippingNote$ = this.orderDetailsService.showPickUpAndPrintOption$(
|
||||
this.details$
|
||||
);
|
||||
}
|
||||
|
||||
@@ -71,7 +88,7 @@ export class ShelfHistoryHeaderComponent implements OnInit {
|
||||
{
|
||||
orderItemSubsetId: this.orderItemSubsetId,
|
||||
orderItemId: this.orderItemId,
|
||||
orderId: orderId,
|
||||
orderId,
|
||||
},
|
||||
],
|
||||
estimatedShippingDate: date,
|
||||
@@ -88,7 +105,7 @@ export class ShelfHistoryHeaderComponent implements OnInit {
|
||||
{
|
||||
orderItemSubsetId: this.orderItemSubsetId,
|
||||
orderItemId: this.orderItemId,
|
||||
orderId: orderId,
|
||||
orderId,
|
||||
},
|
||||
],
|
||||
pickUpDeadline: date,
|
||||
@@ -97,28 +114,63 @@ export class ShelfHistoryHeaderComponent implements OnInit {
|
||||
this.updateHistory();
|
||||
}
|
||||
|
||||
async changeProcessingStatus(processingStatus: OrderItemProcessingStatusValue) {
|
||||
const orderId = await this.getOrderId();
|
||||
async changeProcessingStatus(
|
||||
processingStatus: OrderItemProcessingStatusValue
|
||||
) {
|
||||
const items = await this.orderItems$.pipe(take(1)).toPromise();
|
||||
const order = await this.details$.pipe(take(1)).toPromise();
|
||||
|
||||
await this.detailsFacade.changeStatus([
|
||||
{
|
||||
orderItemSubsetId: this.orderItemSubsetId,
|
||||
orderItemId: this.orderItemId,
|
||||
orderId,
|
||||
data: {
|
||||
processingStatus,
|
||||
},
|
||||
},
|
||||
]);
|
||||
await this.orderDetailsService.setProcessingStatus(
|
||||
items,
|
||||
processingStatus,
|
||||
{}
|
||||
);
|
||||
|
||||
if (await this.shouldCreateShippingNote(processingStatus)) {
|
||||
let createdReceipts: ReceiptDTO[] = [];
|
||||
|
||||
if (!this.shippingNoteService.hasShippingNote(order.receipts)) {
|
||||
createdReceipts = await this.shippingNoteService.create(
|
||||
[this.orderItemSubsetId],
|
||||
{
|
||||
printerComponent: this.printerSelectionComponent,
|
||||
}
|
||||
);
|
||||
}
|
||||
if (createdReceipts.length) {
|
||||
await this.shippingNoteService.print(createdReceipts, {
|
||||
printerComponent: this.printerSelectionComponent,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
this.navigationService.updateHistoryBreadcrumbsAfterStatusChange({
|
||||
...items[0],
|
||||
processingStatus,
|
||||
});
|
||||
this.updateHistory();
|
||||
}
|
||||
|
||||
private async getOrderId() {
|
||||
private async shouldCreateShippingNote(
|
||||
processingStatus: OrderItemProcessingStatusValue
|
||||
): Promise<boolean> {
|
||||
const isPickupStatus = processingStatus === 256;
|
||||
return this.showCreateShippingNote$
|
||||
.pipe(
|
||||
take(1),
|
||||
map(
|
||||
(shouldCreateShippingNote) =>
|
||||
shouldCreateShippingNote && isPickupStatus
|
||||
)
|
||||
)
|
||||
.toPromise();
|
||||
}
|
||||
|
||||
private getOrderId(): Promise<number> {
|
||||
return this.details$
|
||||
.pipe(
|
||||
map((details) => details.orderId),
|
||||
take(1)
|
||||
take(1),
|
||||
map((order) => order.orderId)
|
||||
)
|
||||
.toPromise();
|
||||
}
|
||||
|
||||
@@ -7,11 +7,27 @@ import { ShelfHistoryComponent } from './shelf-history.component';
|
||||
import { ShelfHistoryHeaderComponent } from './header';
|
||||
import { ShelfHistoryLogsComponent } from './history-logs';
|
||||
import { FilterHistoriesWithStatusChangePipe } from './pipes';
|
||||
import { PrinterSelectionModule } from 'apps/sales/src/app/components/printer-selection/printer-selection.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [CommonModule, ShelfHistoryLogModule, ShelfOrderDetailsCardModule],
|
||||
exports: [ShelfHistoryComponent, ShelfHistoryHeaderComponent, ShelfHistoryLogsComponent, FilterHistoriesWithStatusChangePipe],
|
||||
declarations: [ShelfHistoryComponent, ShelfHistoryHeaderComponent, ShelfHistoryLogsComponent, FilterHistoriesWithStatusChangePipe],
|
||||
imports: [
|
||||
CommonModule,
|
||||
ShelfHistoryLogModule,
|
||||
ShelfOrderDetailsCardModule,
|
||||
PrinterSelectionModule,
|
||||
],
|
||||
exports: [
|
||||
ShelfHistoryComponent,
|
||||
ShelfHistoryHeaderComponent,
|
||||
ShelfHistoryLogsComponent,
|
||||
FilterHistoriesWithStatusChangePipe,
|
||||
],
|
||||
declarations: [
|
||||
ShelfHistoryComponent,
|
||||
ShelfHistoryHeaderComponent,
|
||||
ShelfHistoryLogsComponent,
|
||||
FilterHistoriesWithStatusChangePipe,
|
||||
],
|
||||
providers: [],
|
||||
})
|
||||
export class ShelfHistoryModule {}
|
||||
|
||||
@@ -1,10 +1,25 @@
|
||||
<div class="isa-flex isa-justify-content-space-between isa-align-items-center">
|
||||
<strong class="isa-mr-10">Anmerkung</strong>
|
||||
<input #commentInput type="text" class="comment" [formControl]="commentControl" (focus)="inputFocus()" (blur)="inputBlur()" />
|
||||
<button class="isa-btn" *ngIf="focused && !!commentControl.value" (click)="commentControl.reset(''); save()">
|
||||
<input
|
||||
#commentInput
|
||||
type="text"
|
||||
class="comment"
|
||||
[formControl]="commentControl"
|
||||
(focus)="inputFocus()"
|
||||
(blur)="inputBlur()"
|
||||
/>
|
||||
<button
|
||||
class="isa-btn isa-pt-0 isa-pb-0"
|
||||
*ngIf="focused && !!commentControl.value"
|
||||
(click)="commentControl.reset(''); save()"
|
||||
>
|
||||
<lib-icon width="12px" name="close"></lib-icon>
|
||||
</button>
|
||||
<button class="isa-btn isa-btn-secondary isa-p-0 isa-ml-10" *ngIf="commentControl.enabled && commentControl.dirty" (click)="save()">
|
||||
<button
|
||||
class="isa-btn isa-btn-secondary isa-p-0 isa-ml-10"
|
||||
*ngIf="commentControl.enabled && commentControl.dirty"
|
||||
(click)="save()"
|
||||
>
|
||||
Speichern
|
||||
</button>
|
||||
<button
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
:host {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 5px 0;
|
||||
}
|
||||
|
||||
input.comment {
|
||||
@@ -25,3 +26,7 @@ input.comment:focus {
|
||||
border: none;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
button {
|
||||
height: initial;
|
||||
}
|
||||
|
||||
@@ -3,4 +3,11 @@
|
||||
<lib-icon name="Check_f"></lib-icon>
|
||||
{{ feature.description }}
|
||||
</div>
|
||||
<ng-container *ngIf="loading$ | async">
|
||||
<div class="isa-skeleton-container">
|
||||
<div class="isa-skeleton-bar isa-w-120 isa-h-20"></div>
|
||||
<div class="isa-skeleton-bar isa-ml-15 isa-w-120 isa-h-20"></div>
|
||||
<div class="isa-skeleton-bar isa-ml-15 isa-w-120 isa-h-20"></div>
|
||||
</div>
|
||||
</ng-container>
|
||||
</div>
|
||||
|
||||
@@ -1,7 +1,14 @@
|
||||
import { Component, ChangeDetectionStrategy, Input } from '@angular/core';
|
||||
import { CustomerService } from '@swagger/crm';
|
||||
import { ReplaySubject, of, NEVER } from 'rxjs';
|
||||
import { switchMap, catchError, map, flatMap, filter, throttleTime, distinctUntilChanged } from 'rxjs/operators';
|
||||
import { ReplaySubject, NEVER, BehaviorSubject } from 'rxjs';
|
||||
import {
|
||||
switchMap,
|
||||
catchError,
|
||||
map,
|
||||
filter,
|
||||
throttleTime,
|
||||
distinctUntilChanged,
|
||||
} from 'rxjs/operators';
|
||||
import { isNullOrUndefined } from 'util';
|
||||
|
||||
@Component({
|
||||
@@ -11,6 +18,8 @@ import { isNullOrUndefined } from 'util';
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export class CustomerFeaturesComponent {
|
||||
loading$ = new BehaviorSubject<boolean>(true);
|
||||
|
||||
@Input()
|
||||
set customerNumber(value: string) {
|
||||
if (!isNullOrUndefined(value)) {
|
||||
@@ -30,10 +39,14 @@ export class CustomerFeaturesComponent {
|
||||
})
|
||||
.pipe(
|
||||
catchError((err) => {
|
||||
this.loading$.next(false);
|
||||
return NEVER;
|
||||
}),
|
||||
map((response) => {
|
||||
return response.result.find((c) => c.customerNumber === customerNumber);
|
||||
this.loading$.next(false);
|
||||
return response.result.find(
|
||||
(c) => c.customerNumber === customerNumber
|
||||
);
|
||||
})
|
||||
)
|
||||
),
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
</div>
|
||||
<app-shelf-order-details-card
|
||||
[orderDetails]="orderDetailsCard$ | async"
|
||||
[showCreateShippingNote]="showPickUpAndPrintOption$ | async"
|
||||
(changeEstimatedDeliveryDate)="changeEstimatedShippingDate($event)"
|
||||
(changeProcessingStatus)="changeProcessingStatus($event)"
|
||||
(changePickUpDeadline)="changePickupDeadline($event)"
|
||||
@@ -80,13 +81,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="isa-card isa-mt-2 isa-border-radius-0"
|
||||
[class.isa-border-radius-0]="showArrivedAndPrintCta$ | async"
|
||||
[class.isa-border-top-radius-0]="
|
||||
(showArrivedAndPrintCta$ | async) === false
|
||||
"
|
||||
>
|
||||
<div class="isa-card isa-mt-2 isa-border-radius-0">
|
||||
<app-shelf-order-details-comment
|
||||
[comment]="orderItem.specialComment"
|
||||
(saveComment)="saveComment(orderItem, $event)"
|
||||
@@ -94,100 +89,37 @@
|
||||
</div>
|
||||
</ng-container>
|
||||
|
||||
<!-- CTAs für Bestellt -->
|
||||
<ng-container *ngIf="showArrivedAndPrintCta$ | async">
|
||||
<div class="isa-card isa-mt-2 isa-border-top-radius-0">
|
||||
<section *ngIf="orderDetailsCard$ | async as orderDetails">
|
||||
<!-- Add Display Logic for Shelf Tags -->
|
||||
<div
|
||||
class="isa-card isa-mt-2 isa-border-top-radius-0"
|
||||
*ngIf="orderDetails.actions | showShelfTags"
|
||||
>
|
||||
<app-shelf-order-details-shelf-tags
|
||||
#shelfDetailsTag
|
||||
></app-shelf-order-details-shelf-tags>
|
||||
</div>
|
||||
|
||||
<div class="cta-sticky isa-my-28 isa-text-center">
|
||||
<button
|
||||
type="button"
|
||||
class="isa-btn isa-btn-primary isa-btn-pill isa-btn-xl"
|
||||
[disabled]="
|
||||
shelfDetailsTag.selected === shelfDetailsTag.customValue.value &&
|
||||
shelfDetailsTag.customValue.invalid
|
||||
"
|
||||
(click)="
|
||||
changeProcessingStatus(128, {
|
||||
compartmentInfo: shelfDetailsTag.selected,
|
||||
shouldPrint: true
|
||||
})
|
||||
"
|
||||
>
|
||||
eingetroffen und Drucken
|
||||
</button>
|
||||
<ng-container *ngFor="let action of orderDetails.actions">
|
||||
<button
|
||||
*ngIf="action | showButtonForPartialPickUp: partialPickup"
|
||||
[disabled]="statusChangeInProgress$ | async"
|
||||
[class.isa-btn-primary]="action.selected"
|
||||
[class.isa-btn-secondary]="!action.selected"
|
||||
[class.isa-btn-outline-primary]="!action.selected"
|
||||
class="isa-btn isa-btn-pill isa-btn-xl"
|
||||
(click)="handleActionClick(action)"
|
||||
>
|
||||
<span>{{ action?.value }}</span>
|
||||
<div
|
||||
class="spinner isa-btn-loader"
|
||||
*ngIf="statusChangeInProgress$ | async"
|
||||
></div>
|
||||
</button>
|
||||
</ng-container>
|
||||
</div>
|
||||
</ng-container>
|
||||
|
||||
<!-- CTAs für Eingetroffen -->
|
||||
<ng-container *ngIf="showArrivedCta$ | async">
|
||||
<div class="isa-card isa-mt-2 isa-border-top-radius-0">
|
||||
<app-shelf-order-details-shelf-tags
|
||||
#shelfDetailsTag
|
||||
></app-shelf-order-details-shelf-tags>
|
||||
</div>
|
||||
|
||||
<div class="cta-sticky isa-my-28 isa-text-center">
|
||||
<button
|
||||
type="button"
|
||||
class="isa-btn isa-btn-primary isa-btn-pill isa-btn-xl"
|
||||
[disabled]="
|
||||
shelfDetailsTag.selected === shelfDetailsTag.customValue.value &&
|
||||
shelfDetailsTag.customValue.invalid
|
||||
"
|
||||
(click)="
|
||||
changeProcessingStatus(128, {
|
||||
compartmentInfo: shelfDetailsTag.selected,
|
||||
shouldPrint: false
|
||||
})
|
||||
"
|
||||
>
|
||||
eingetroffen
|
||||
</button>
|
||||
</div>
|
||||
</ng-container>
|
||||
|
||||
<div class="cta-sticky isa-my-28 isa-text-center">
|
||||
<button
|
||||
*ngIf="(showPickUpPartialCollectCta$ | async) && !partialPickup"
|
||||
type="button"
|
||||
class="isa-btn isa-btn-outline-primary isa-btn-pill isa-btn-xl isa-mr-10"
|
||||
(click)="activatePartialPickup()"
|
||||
>
|
||||
Teilabholung
|
||||
</button>
|
||||
<button
|
||||
*ngIf="showPickUpCta$ | async"
|
||||
type="button"
|
||||
class="isa-btn isa-btn-primary isa-btn-pill isa-btn-xl"
|
||||
(click)="changeProcessingStatus(256)"
|
||||
>
|
||||
abgeholt
|
||||
</button>
|
||||
<!-- <button *ngIf="showAddToRemissionListCta$ | async" type="button"
|
||||
class="isa-btn isa-btn-outline-primary isa-btn-pill isa-btn-xl isa-mr-10" (click)="addToRemissionList()">
|
||||
Remissionsliste hinzufügen
|
||||
</button> -->
|
||||
<button
|
||||
*ngIf="showBackToStoreCta$ | async"
|
||||
type="button"
|
||||
class="isa-btn isa-btn-primary isa-btn-pill isa-btn-xl"
|
||||
(click)="changeProcessingStatus(262144)"
|
||||
>
|
||||
ans Lager
|
||||
</button>
|
||||
<button
|
||||
*ngIf="showReOrderCta$ | async"
|
||||
type="button"
|
||||
class="isa-btn isa-btn-primary isa-btn-pill isa-btn-xl"
|
||||
(click)="changeProcessingStatus(8192)"
|
||||
>
|
||||
nachbestellen
|
||||
</button>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="cta-spacer"></div>
|
||||
|
||||
|
||||
@@ -23,6 +23,14 @@
|
||||
left: 0;
|
||||
right: 0;
|
||||
position: fixed;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
button {
|
||||
&:not(:only-child) {
|
||||
margin-right: 30px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.cta-spacer {
|
||||
|
||||
@@ -1,20 +1,39 @@
|
||||
import { ChangeDetectionStrategy, Component, ViewChild } from '@angular/core';
|
||||
import {
|
||||
ChangeDetectionStrategy,
|
||||
Component,
|
||||
QueryList,
|
||||
ViewChild,
|
||||
ViewChildren,
|
||||
} from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { map, switchMap, first, filter, flatMap, distinctUntilChanged, shareReplay, take, takeUntil, withLatestFrom } from 'rxjs/operators';
|
||||
import {
|
||||
map,
|
||||
switchMap,
|
||||
first,
|
||||
filter,
|
||||
flatMap,
|
||||
distinctUntilChanged,
|
||||
shareReplay,
|
||||
withLatestFrom,
|
||||
} from 'rxjs/operators';
|
||||
import {
|
||||
OrderItemProcessingStatusValue,
|
||||
OrderItemListItemDTO,
|
||||
StatusValues,
|
||||
ResponseArgsOfValueTupleOfOrderItemSubsetDTOAndOrderItemSubsetDTO,
|
||||
ReceiptDTO,
|
||||
KeyValueDTOOfStringAndString,
|
||||
} from '@swagger/oms';
|
||||
import { ShelfNavigationService } from '../../shared/services';
|
||||
import { race, combineLatest } from 'rxjs';
|
||||
import { AppService } from '@sales/core-services';
|
||||
import { OMSPrintService, PrintService } from '@swagger/print';
|
||||
import { race, BehaviorSubject } from 'rxjs';
|
||||
import { PrinterSelectionComponent } from 'apps/sales/src/app/components/printer-selection/printer-selection.component';
|
||||
import { OrderDetailsCardInput } from '../../components/order-details-card';
|
||||
import { DetailsFacade } from '@shelf-store/details';
|
||||
import { ProcessingStatusNameMap } from '../../constants';
|
||||
import {
|
||||
ShelfAbholfachEtikettService,
|
||||
ShelfActionHandlerService,
|
||||
ShelfOrderDetailsService,
|
||||
ShelfShippingNoteService,
|
||||
} from '../../services';
|
||||
import { ShelfOrderDetailsShelfTagsComponent } from './shelf-tags/shelftags.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-shelf-order-details',
|
||||
@@ -27,9 +46,49 @@ export class ShelfOrderDetailsComponent {
|
||||
read: PrinterSelectionComponent,
|
||||
static: true,
|
||||
})
|
||||
printerSlectionComponent: PrinterSelectionComponent;
|
||||
printerSelectionComponent: PrinterSelectionComponent;
|
||||
|
||||
processingStatus$ = this.activatedRoute.params.pipe(map((params) => params['processingStatus']));
|
||||
@ViewChildren(ShelfOrderDetailsShelfTagsComponent, {
|
||||
read: ShelfOrderDetailsShelfTagsComponent,
|
||||
})
|
||||
tags: QueryList<ShelfOrderDetailsShelfTagsComponent>;
|
||||
|
||||
get compartmentInfoFromTag(): string {
|
||||
if (!this.tags || !this.tags.first || !this.tags.first.selected) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return this.tags.first.selected;
|
||||
}
|
||||
|
||||
get processingStatusChangeData() {
|
||||
return {
|
||||
...{
|
||||
...(this.compartmentInfoFromTag
|
||||
? { compartmentInfo: this.compartmentInfoFromTag }
|
||||
: {}),
|
||||
},
|
||||
...{
|
||||
...(this.quantityForPartialPickup
|
||||
? { quantityForPartialPickup: this.quantityForPartialPickup }
|
||||
: {}),
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
get printData(): {
|
||||
printerComponent: PrinterSelectionComponent;
|
||||
statusObs$?: BehaviorSubject<boolean>;
|
||||
} {
|
||||
return {
|
||||
printerComponent: this.printerSelectionComponent,
|
||||
statusObs$: this.statusChangeInProgress$,
|
||||
};
|
||||
}
|
||||
|
||||
processingStatus$ = this.activatedRoute.params.pipe(
|
||||
map((params) => params['processingStatus'])
|
||||
);
|
||||
|
||||
partialPickup = false;
|
||||
|
||||
@@ -37,6 +96,8 @@ export class ShelfOrderDetailsComponent {
|
||||
|
||||
quantityForPartialPickup = new Map<number, number>();
|
||||
|
||||
statusChangeInProgress$ = new BehaviorSubject<boolean>(false);
|
||||
|
||||
orderNumber$ = this.activatedRoute.params.pipe(
|
||||
map((params) => params['orderId']),
|
||||
filter((v) => !!v),
|
||||
@@ -52,14 +113,24 @@ export class ShelfOrderDetailsComponent {
|
||||
);
|
||||
|
||||
orderItems$ = race(
|
||||
this.orderNumber$.pipe(switchMap((orderNumber) => this.detailsFacade.getOrderItemsByOrderNumber$(orderNumber))),
|
||||
this.compartmentCode$.pipe(switchMap((compartmentCode) => this.detailsFacade.getOrderItemsByCompartmentCode$(compartmentCode)))
|
||||
this.orderNumber$.pipe(
|
||||
switchMap((orderNumber) =>
|
||||
this.detailsFacade.getOrderItemsByOrderNumber$(orderNumber)
|
||||
)
|
||||
),
|
||||
this.compartmentCode$.pipe(
|
||||
switchMap((compartmentCode) =>
|
||||
this.detailsFacade.getOrderItemsByCompartmentCode$(compartmentCode)
|
||||
)
|
||||
)
|
||||
).pipe(
|
||||
flatMap((items) =>
|
||||
this.processingStatus$.pipe(
|
||||
map((processingStatus) => {
|
||||
if (!!processingStatus) {
|
||||
return items.filter((item) => item.processingStatus === +processingStatus);
|
||||
return items.filter(
|
||||
(item) => item.processingStatus === +processingStatus
|
||||
);
|
||||
}
|
||||
return items;
|
||||
})
|
||||
@@ -68,65 +139,22 @@ export class ShelfOrderDetailsComponent {
|
||||
shareReplay(1)
|
||||
);
|
||||
|
||||
orderDetailsCard$ = this.orderItems$.pipe(
|
||||
map((items) => {
|
||||
if (items.length > 0) {
|
||||
const item = items[0];
|
||||
return {
|
||||
firstName: item.firstName,
|
||||
lastName: item.lastName,
|
||||
customerNumber: item.buyerNumber,
|
||||
estimatedShippingDate: item.estimatedShippingDate ? new Date(item.estimatedShippingDate) : undefined,
|
||||
orderDate: new Date(item.orderDate),
|
||||
orderNumber: item.orderNumber,
|
||||
processingStatus: item.processingStatus,
|
||||
processingStatusDate: new Date(item.processingStatusDate),
|
||||
orderChannel: item.clientChannel,
|
||||
compartmentCode: item.compartmentCode,
|
||||
compartmentInfo: item.compartmentInfo,
|
||||
pickupDeadline: new Date(item.pickUpDeadline),
|
||||
} as OrderDetailsCardInput;
|
||||
}
|
||||
return undefined;
|
||||
}),
|
||||
filter((details) => !!details)
|
||||
orderDetailsCard$ = this.orderDetailsService.orderDetailsCardFromOrderItems$(
|
||||
this.orderItems$
|
||||
);
|
||||
|
||||
showArrivedAndPrintCta$ = this.orderDetailsCard$.pipe(
|
||||
map((details) => details.processingStatus === 16 || details.processingStatus === 8192) // wenn bestellt(=16) oder nachbestellt(=8192)
|
||||
);
|
||||
|
||||
showArrivedCta$ = this.orderDetailsCard$.pipe(map((details) => details.processingStatus === 256)); // wenn abgeholt(=256)
|
||||
|
||||
showPickUpCta$ = this.orderDetailsCard$.pipe(
|
||||
map((details) => details.processingStatus === 128) // wenn eingetroffen(=128)
|
||||
);
|
||||
|
||||
showPickUpPartialCollectCta$ = combineLatest([this.orderDetailsCard$, this.orderItems$]).pipe(
|
||||
map(([details, items]) => {
|
||||
return details.processingStatus === 128 && (items.length > 1 || items.some((i) => i.quantity > 1));
|
||||
}) // wenn eingetroffen(=128) und mehr als 1 Artikel
|
||||
);
|
||||
|
||||
showBackToStoreCta$ = this.orderDetailsCard$.pipe(
|
||||
map((details) => details.processingStatus === 1024 || details.processingStatus === 512)
|
||||
);
|
||||
|
||||
showAddToRemissionListCta$ = this.orderDetailsCard$.pipe(
|
||||
map((details) => details.processingStatus === 1024 || details.processingStatus === 512)
|
||||
);
|
||||
|
||||
showReOrderCta$ = this.orderDetailsCard$.pipe(
|
||||
map((details) => details.processingStatus === 2048 && !ProcessingStatusNameMap.get(8192).disabled)
|
||||
showPickUpAndPrintOption$ = this.orderDetailsService.showPickUpAndPrintOption$(
|
||||
this.orderDetailsCard$
|
||||
);
|
||||
|
||||
constructor(
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private detailsFacade: DetailsFacade,
|
||||
private shelfNavigationService: ShelfNavigationService,
|
||||
private omsPrintService: OMSPrintService,
|
||||
private printerService: PrintService,
|
||||
private appService: AppService
|
||||
private shippingNoteService: ShelfShippingNoteService,
|
||||
private orderDetailsService: ShelfOrderDetailsService,
|
||||
private abholfachEtikettService: ShelfAbholfachEtikettService,
|
||||
private actionHandlerService: ShelfActionHandlerService
|
||||
) {}
|
||||
|
||||
selectOrderItem(orderItem: OrderItemListItemDTO, value: boolean) {
|
||||
@@ -149,66 +177,58 @@ export class ShelfOrderDetailsComponent {
|
||||
});
|
||||
}
|
||||
|
||||
async changeProcessingStatus(status: OrderItemProcessingStatusValue, data: { compartmentInfo?: string; shouldPrint?: boolean } = {}) {
|
||||
let items = await this.orderItems$.pipe(first()).toPromise();
|
||||
async changeProcessingStatus(
|
||||
status: OrderItemProcessingStatusValue,
|
||||
data: {
|
||||
shouldPrint?: boolean;
|
||||
createShippingNote?: boolean;
|
||||
} = {}
|
||||
) {
|
||||
const items = await this.orderItems$.pipe(first()).toPromise();
|
||||
let results: ResponseArgsOfValueTupleOfOrderItemSubsetDTOAndOrderItemSubsetDTO[];
|
||||
let navigate = true;
|
||||
if (this.partialPickup) {
|
||||
const totalQuantity = items.reduce((sum, item) => sum + item.quantity, 0);
|
||||
const totalSelected = Array.from(this.quantityForPartialPickup.values()).reduce((sum, q) => sum + q, 0);
|
||||
navigate = totalQuantity === totalSelected;
|
||||
}
|
||||
if (status === 256) {
|
||||
if (this.partialPickup) {
|
||||
items = items.filter(({ orderItemId }) => this.selectedForPartialPickup.has(orderItemId));
|
||||
}
|
||||
|
||||
const hasInvalidQuantity = items.some((item) => !this.isPickupQuantityValid(item));
|
||||
results = await this.orderDetailsService.setProcessingStatus(
|
||||
items,
|
||||
status,
|
||||
this.processingStatusChangeData
|
||||
);
|
||||
|
||||
if (hasInvalidQuantity) {
|
||||
console.warn({ message: 'Has Invalid Quantity', items, quantity: this.quantityForPartialPickup });
|
||||
return;
|
||||
}
|
||||
results = await this.detailsFacade.pickedUp(items, this.quantityForPartialPickup);
|
||||
} else if (status === 262144) {
|
||||
results = await this.detailsFacade.backToStock(items);
|
||||
} else if (status === 8192) {
|
||||
results = await this.detailsFacade.reorder(items);
|
||||
} else if (status === 128) {
|
||||
results = await this.detailsFacade.arrived(items, data.compartmentInfo);
|
||||
if (data.shouldPrint) {
|
||||
await this.printAbholfachetikett(items.map(({ orderItemSubsetId }) => orderItemSubsetId));
|
||||
}
|
||||
} else {
|
||||
const payloads = items.map(({ orderId, orderItemId, orderItemSubsetId }) => ({
|
||||
orderId,
|
||||
orderItemId,
|
||||
orderItemSubsetId,
|
||||
data: { processingStatus: status } as StatusValues,
|
||||
}));
|
||||
results = await this.detailsFacade.changeStatus(payloads);
|
||||
if (data.shouldPrint) {
|
||||
await this.abholfachEtikettService.print(
|
||||
this.abholfachEtikettService.orderSubsetIdsForWhichToPrintAbholfachEtikett(
|
||||
items
|
||||
),
|
||||
this.printData
|
||||
);
|
||||
}
|
||||
|
||||
if (data.createShippingNote) {
|
||||
const receipts = await this.shippingNoteService.create(
|
||||
this.shippingNoteService.getSubsetIdsForWhichToCreateShippingNotes(
|
||||
items
|
||||
),
|
||||
this.printData
|
||||
);
|
||||
const existingReceipts: ReceiptDTO[] = items.reduce(
|
||||
(acc, curr) => [...(acc || []), ...curr.receipts],
|
||||
[]
|
||||
);
|
||||
await this.shippingNoteService.print(
|
||||
[...existingReceipts, ...(receipts || [])],
|
||||
this.printData
|
||||
);
|
||||
}
|
||||
|
||||
this.statusChangeInProgress$.next(false);
|
||||
|
||||
return this.navigateAfterActionCompleted(items, results);
|
||||
}
|
||||
|
||||
private resetPartialPickup(): void {
|
||||
this.partialPickup = false;
|
||||
this.selectedForPartialPickup.clear();
|
||||
this.quantityForPartialPickup.clear();
|
||||
|
||||
if (navigate) {
|
||||
const firstItem = items[0];
|
||||
const firstResult = results[0].result;
|
||||
this.shelfNavigationService.updateDetails(
|
||||
{
|
||||
compartmentCode: firstResult.item1.compartmentCode,
|
||||
orderNumber: firstItem.orderNumber,
|
||||
processingStatus: firstResult.item1.processingStatus,
|
||||
},
|
||||
{
|
||||
compartmentCode: firstItem.compartmentCode,
|
||||
orderNumber: firstItem.orderNumber,
|
||||
processingStatus: firstItem.processingStatus,
|
||||
}
|
||||
);
|
||||
}
|
||||
this.statusChangeInProgress$.next(false);
|
||||
}
|
||||
|
||||
changeEstimatedShippingDate(estimatedShippingDate: Date | string) {
|
||||
@@ -226,46 +246,6 @@ export class ShelfOrderDetailsComponent {
|
||||
});
|
||||
}
|
||||
|
||||
async printAbholfachetikett(data: number[]) {
|
||||
// tslint:disable-next-line: no-shadowed-variable
|
||||
const print = (printer?: string) =>
|
||||
this.omsPrintService
|
||||
.OMSPrintAbholfachetikettResponse({
|
||||
data,
|
||||
printer,
|
||||
})
|
||||
.toPromise();
|
||||
|
||||
let printer: string;
|
||||
|
||||
if (this.appService.isIPadEnv()) {
|
||||
this.printerSlectionComponent.openDialog();
|
||||
printer = await this.printerSlectionComponent.print.pipe(takeUntil(this.printerSlectionComponent.closed), take(1)).toPromise();
|
||||
this.printerSlectionComponent.closeModal();
|
||||
}
|
||||
|
||||
if (!printer) {
|
||||
printer = await this.getDefaultPrinter();
|
||||
}
|
||||
|
||||
try {
|
||||
print(printer);
|
||||
} catch (error) {
|
||||
console.log('Printing Abholfachetikett Failed');
|
||||
}
|
||||
}
|
||||
|
||||
async getDefaultPrinter(): Promise<string> {
|
||||
const printers = await this.printerService.PrintLabelPrinters().toPromise();
|
||||
const selected = printers.result.find((f) => f.selected);
|
||||
|
||||
if (!!selected) {
|
||||
return selected.key;
|
||||
}
|
||||
|
||||
return undefined;
|
||||
}
|
||||
|
||||
activatePartialPickup() {
|
||||
this.partialPickup = true;
|
||||
}
|
||||
@@ -273,7 +253,9 @@ export class ShelfOrderDetailsComponent {
|
||||
async navigateToDetails() {
|
||||
const data = await race(
|
||||
this.orderNumber$.pipe(map((orderNumber) => ({ orderNumber }))),
|
||||
this.compartmentCode$.pipe(map((compartmentCode) => ({ compartmentCode })))
|
||||
this.compartmentCode$.pipe(
|
||||
map((compartmentCode) => ({ compartmentCode }))
|
||||
)
|
||||
)
|
||||
.pipe(
|
||||
withLatestFrom(this.processingStatus$),
|
||||
@@ -299,7 +281,143 @@ export class ShelfOrderDetailsComponent {
|
||||
items.forEach((item) => this.selectOrderItem(item, false));
|
||||
}
|
||||
|
||||
isPickupQuantityValid(item: OrderItemListItemDTO): boolean {
|
||||
return item.quantity >= this.quantityForPartialPickup.get(item.orderItemId) && this.quantityForPartialPickup.get(item.orderItemId) > 0;
|
||||
async determineSupplier(
|
||||
items: (OrderItemListItemDTO & {
|
||||
receipts?: ReceiptDTO[];
|
||||
})[]
|
||||
) {
|
||||
const orderItemId = items.find((item) => item.orderId);
|
||||
const orderId = orderItemId && orderItemId.orderId;
|
||||
|
||||
if (!orderId) {
|
||||
return;
|
||||
}
|
||||
const compartmentCodeItem = items.find((item) => item.compartmentCode);
|
||||
const orderNumberItem = items.find((item) => item.orderNumber);
|
||||
|
||||
const compartmentCode =
|
||||
compartmentCodeItem && compartmentCodeItem.compartmentCode;
|
||||
const orderNumber = orderNumberItem && orderNumberItem.orderNumber;
|
||||
|
||||
this.detailsFacade.determineSupplier(orderId, {
|
||||
compartmentCode,
|
||||
orderNumber,
|
||||
});
|
||||
}
|
||||
|
||||
shouldNavigateOnPartialPickUp(
|
||||
items: (OrderItemListItemDTO & {
|
||||
receipts?: ReceiptDTO[];
|
||||
})[]
|
||||
) {
|
||||
const totalQuantity = items.reduce((sum, item) => sum + item.quantity, 0);
|
||||
const totalSelected = Array.from(
|
||||
this.quantityForPartialPickup.values()
|
||||
).reduce((sum, q) => sum + q, 0);
|
||||
const shouldNavigate = totalQuantity === totalSelected;
|
||||
|
||||
return shouldNavigate;
|
||||
}
|
||||
|
||||
navigateAfterActionCompleted(
|
||||
items: (OrderItemListItemDTO & {
|
||||
receipts?: ReceiptDTO[];
|
||||
})[],
|
||||
results: ResponseArgsOfValueTupleOfOrderItemSubsetDTOAndOrderItemSubsetDTO[]
|
||||
) {
|
||||
const firstItem = Array.isArray(items) && items[0];
|
||||
const firstResult =
|
||||
Array.isArray(results) && results[0] && results[0].result;
|
||||
|
||||
if (!firstItem || !firstResult) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.shelfNavigationService.updateDetails(
|
||||
{
|
||||
compartmentCode: firstResult.item1.compartmentCode,
|
||||
orderNumber: firstItem.orderNumber,
|
||||
processingStatus: firstResult.item1.processingStatus,
|
||||
},
|
||||
{
|
||||
compartmentCode: firstItem.compartmentCode,
|
||||
orderNumber: firstItem.orderNumber,
|
||||
processingStatus: firstItem.processingStatus,
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
async handleActionClick(action: KeyValueDTOOfStringAndString) {
|
||||
let navigate = true;
|
||||
let items = await this.orderItems$.pipe(first()).toPromise();
|
||||
let results: ResponseArgsOfValueTupleOfOrderItemSubsetDTOAndOrderItemSubsetDTO[];
|
||||
|
||||
console.log({ action });
|
||||
|
||||
// Early Exit for Partial Pickups
|
||||
if (this.actionHandlerService.isPartialPickup(action)) {
|
||||
return (this.partialPickup = true);
|
||||
}
|
||||
|
||||
// Update Items for Partial Pickup
|
||||
if (this.actionHandlerService.isFetched(action) && this.partialPickup) {
|
||||
navigate = this.shouldNavigateOnPartialPickUp(items);
|
||||
|
||||
items = items.filter(({ orderItemId }) =>
|
||||
this.selectedForPartialPickup.has(orderItemId)
|
||||
);
|
||||
}
|
||||
|
||||
// Step 0 [Determine if Supplier set]
|
||||
if (this.actionHandlerService.shouldDetermineSupplier(action)) {
|
||||
this.determineSupplier(items);
|
||||
}
|
||||
|
||||
// Step 1 [Set Status]
|
||||
if (this.actionHandlerService.shouldSetStatus(action)) {
|
||||
const targetStatus = this.actionHandlerService.getNewProcessingStatus(
|
||||
action
|
||||
);
|
||||
results = await this.orderDetailsService.setProcessingStatus(
|
||||
items,
|
||||
targetStatus,
|
||||
this.processingStatusChangeData
|
||||
);
|
||||
this.resetPartialPickup();
|
||||
}
|
||||
|
||||
// Step 2 [Create Note ]
|
||||
let receipts: ReceiptDTO[];
|
||||
if (this.actionHandlerService.shouldCreateShippingNote(action)) {
|
||||
receipts = await this.shippingNoteService.create(
|
||||
this.shippingNoteService.getSubsetIdsForWhichToCreateShippingNotes(
|
||||
items
|
||||
),
|
||||
this.printData
|
||||
);
|
||||
}
|
||||
|
||||
// Step 3 [Print Note]
|
||||
if (this.actionHandlerService.shouldPrintShippingNote(action)) {
|
||||
const existingReceipts = this.orderDetailsService.getReceipts(items);
|
||||
await this.shippingNoteService.print(
|
||||
[...existingReceipts, ...(receipts || [])],
|
||||
this.printData
|
||||
);
|
||||
}
|
||||
|
||||
// Step 4 [Print Abholfachetikett]
|
||||
if (this.actionHandlerService.shouldPrintAbholfachetikett(action)) {
|
||||
await this.abholfachEtikettService.print(
|
||||
this.abholfachEtikettService.orderSubsetIdsForWhichToPrintAbholfachEtikett(
|
||||
items
|
||||
),
|
||||
this.printData
|
||||
);
|
||||
}
|
||||
|
||||
if (navigate) {
|
||||
this.navigateAfterActionCompleted(items, results);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ import { ShelfOrderDetailsShelfTagsComponent } from './shelf-tags/shelftags.comp
|
||||
import { CustomerFeaturesComponent } from './customer-features/customer-features.component';
|
||||
import { IconModule } from '@libs/ui';
|
||||
import { PrinterSelectionModule } from 'apps/sales/src/app/components/printer-selection/printer-selection.module';
|
||||
import { ShelfPipesModule } from '../../pipes';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
@@ -20,6 +21,7 @@ import { PrinterSelectionModule } from 'apps/sales/src/app/components/printer-se
|
||||
FormsModule,
|
||||
IconModule,
|
||||
PrinterSelectionModule,
|
||||
ShelfPipesModule,
|
||||
],
|
||||
exports: [ShelfOrderDetailsComponent],
|
||||
declarations: [
|
||||
|
||||
@@ -15,18 +15,11 @@ import {
|
||||
ChangeDetectionStrategy,
|
||||
} from '@angular/core';
|
||||
import { SearchStateFacade } from 'apps/sales/src/app/store/customer';
|
||||
import {
|
||||
first,
|
||||
takeUntil,
|
||||
map,
|
||||
debounceTime,
|
||||
filter,
|
||||
withLatestFrom,
|
||||
} from 'rxjs/operators';
|
||||
import { first, takeUntil, map, withLatestFrom } from 'rxjs/operators';
|
||||
import { groupBy } from 'apps/sales/src/app/utils';
|
||||
import { OrderItemListItemDTO } from '@swagger/oms';
|
||||
import { ShelfNavigationService } from '../../shared/services';
|
||||
import { Store, Select } from '@ngxs/store';
|
||||
import { Select } from '@ngxs/store';
|
||||
import { ProcessSelectors } from 'apps/sales/src/app/core/store/selectors/process.selectors';
|
||||
import { ORDER_DETAILS_PREFIX } from './order-details-prefix';
|
||||
|
||||
@@ -57,8 +50,7 @@ export class ShelfSearchResultsComponent implements OnInit, OnDestroy {
|
||||
|
||||
constructor(
|
||||
private searchStateFacade: SearchStateFacade,
|
||||
private shelfNavigationService: ShelfNavigationService,
|
||||
private store: Store
|
||||
private shelfNavigationService: ShelfNavigationService
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
<div class="header pt-42 mb-45">
|
||||
<h2 class="isa-content-headline mt-0">Bestellpostensuche</h2>
|
||||
<h6 class="isa-content-subline">
|
||||
Suchen Sie den Bestellposten via Kundenname, ISBN/EAN, Titel, Autor, Bestellnummer, Vorgang ID, Abholscheinnummer, Abholfachnummer,
|
||||
Kundenkartennummer oder scannen Sie die Kundenkarte.
|
||||
Suchen Sie den Bestellposten via Kundenname, ISBN/EAN, Bestellnummer,
|
||||
Vorgang ID, Abholscheinnummer, Abholfachnummer, Kundenkartennummer oder
|
||||
scannen Sie die Kundenkarte.
|
||||
</h6>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -5,11 +5,13 @@ export * from './get-extend-pick-up-date-options.pipe';
|
||||
export * from './pick-up-date-option-to-display-value.pipe';
|
||||
export * from './processing-status-options.pipe';
|
||||
export * from './processing-status.pipe';
|
||||
export * from './receipts-to-payment-receipts.pipe';
|
||||
export * from './shelf-pipes.module';
|
||||
export * from './show-partial-pickup.pipe';
|
||||
export * from './ssc-text.pipe';
|
||||
export * from './title.pipe';
|
||||
export * from './vat-dto-to-vat-type.pipe';
|
||||
export * from './vat-dto-to-vat-value.pipe';
|
||||
export * from './vat-type-to-display-name.pipe';
|
||||
export * from './vat-type.pipe';
|
||||
export * from './ssc-text.pipe';
|
||||
// end:ng42.barrel
|
||||
|
||||
@@ -0,0 +1,204 @@
|
||||
import { ReceiptDTO } from '@swagger/oms';
|
||||
import { ReceiptsToPaymentReceiptsPipe } from './receipts-to-payment-receipts.pipe';
|
||||
|
||||
const mockReceipts: ReceiptDTO[] = [
|
||||
{
|
||||
receiptNumber: '4000000030',
|
||||
receiptType: 1,
|
||||
printedDate: '2020-10-06T11:58:52.2350864Z',
|
||||
order: { id: 110038545, enabled: true },
|
||||
buyer: {
|
||||
buyerNumber: '28167978',
|
||||
buyerType: 16,
|
||||
buyerStatus: 0,
|
||||
isGuestAccount: false,
|
||||
gender: 2,
|
||||
firstName: 'Günther',
|
||||
lastName: 'Schmidlehner',
|
||||
communicationDetails: {
|
||||
mobile: '01231234567890',
|
||||
email: 'g.schmidlehner@paragon-data.de',
|
||||
},
|
||||
organisation: {
|
||||
name: 'beeline Test Organisation',
|
||||
department: 'Softwarentwicklung',
|
||||
vatId: 'DE123456789',
|
||||
},
|
||||
address: {
|
||||
city: 'München',
|
||||
street: 'Hilbelstr.',
|
||||
streetNumber: '54',
|
||||
zipCode: '80636',
|
||||
country: 'DEU',
|
||||
},
|
||||
},
|
||||
payer: {
|
||||
payerNumber: '947498',
|
||||
payerType: 16,
|
||||
payerStatus: 0,
|
||||
communicationDetails: {
|
||||
mobile: '01231234567890',
|
||||
email: 'g.schmidlehner@paragon-data.de',
|
||||
},
|
||||
isTemporaryAccount: false,
|
||||
organisation: {
|
||||
name: 'beeline Test Organisation',
|
||||
department: 'Softwarentwicklung',
|
||||
vatId: 'DE123456789',
|
||||
},
|
||||
address: {
|
||||
city: 'München',
|
||||
street: 'Hilbelstr.',
|
||||
streetNumber: '54',
|
||||
zipCode: '80636',
|
||||
country: 'DEU',
|
||||
},
|
||||
gender: 2,
|
||||
firstName: 'Günther',
|
||||
lastName: 'Schmidlehner',
|
||||
},
|
||||
items: [{ id: 1385236, enabled: true }],
|
||||
validationStatus: 0,
|
||||
shippingAddress: {
|
||||
personNames: {
|
||||
gender: 2,
|
||||
firstName: 'Günther',
|
||||
lastName: 'Schmidlehner',
|
||||
},
|
||||
address: {
|
||||
city: 'München',
|
||||
street: 'Hilbelstr.',
|
||||
streetNumber: '54',
|
||||
zipCode: '80636',
|
||||
country: 'DEU',
|
||||
},
|
||||
organisation: {
|
||||
name: 'beeline Test Organisation',
|
||||
department: 'Softwarentwicklung',
|
||||
vatId: 'DE123456789',
|
||||
},
|
||||
communicationDetails: {
|
||||
mobile: '01231234567890',
|
||||
email: 'g.schmidlehner@paragon-data.de',
|
||||
},
|
||||
},
|
||||
postage: 0.0,
|
||||
chargePostage: false,
|
||||
typeOfDelivery: 0,
|
||||
shippingType: 0,
|
||||
parcelLabelPrinted: false,
|
||||
label: { id: 3, enabled: true },
|
||||
id: 710139,
|
||||
created: '2020-10-06T12:00:34.0228Z',
|
||||
changed: '2020-10-06T12:00:34.0228Z',
|
||||
version: 1,
|
||||
status: 1,
|
||||
},
|
||||
{
|
||||
receiptNumber: '4000000030',
|
||||
receiptType: 64,
|
||||
printedDate: '2020-10-06T11:58:52.2350864Z',
|
||||
order: { id: 110038545, enabled: true },
|
||||
buyer: {
|
||||
buyerNumber: '28167978',
|
||||
buyerType: 16,
|
||||
buyerStatus: 0,
|
||||
isGuestAccount: false,
|
||||
gender: 2,
|
||||
firstName: 'Günther',
|
||||
lastName: 'Schmidlehner',
|
||||
communicationDetails: {
|
||||
mobile: '01231234567890',
|
||||
email: 'g.schmidlehner@paragon-data.de',
|
||||
},
|
||||
organisation: {
|
||||
name: 'beeline Test Organisation',
|
||||
department: 'Softwarentwicklung',
|
||||
vatId: 'DE123456789',
|
||||
},
|
||||
address: {
|
||||
city: 'München',
|
||||
street: 'Hilbelstr.',
|
||||
streetNumber: '54',
|
||||
zipCode: '80636',
|
||||
country: 'DEU',
|
||||
},
|
||||
},
|
||||
payer: {
|
||||
payerNumber: '947498',
|
||||
payerType: 16,
|
||||
payerStatus: 0,
|
||||
communicationDetails: {
|
||||
mobile: '01231234567890',
|
||||
email: 'g.schmidlehner@paragon-data.de',
|
||||
},
|
||||
isTemporaryAccount: false,
|
||||
organisation: {
|
||||
name: 'beeline Test Organisation',
|
||||
department: 'Softwarentwicklung',
|
||||
vatId: 'DE123456789',
|
||||
},
|
||||
address: {
|
||||
city: 'München',
|
||||
street: 'Hilbelstr.',
|
||||
streetNumber: '54',
|
||||
zipCode: '80636',
|
||||
country: 'DEU',
|
||||
},
|
||||
gender: 2,
|
||||
firstName: 'Günther',
|
||||
lastName: 'Schmidlehner',
|
||||
},
|
||||
items: [{ id: 1385236, enabled: true }],
|
||||
validationStatus: 0,
|
||||
shippingAddress: {
|
||||
personNames: {
|
||||
gender: 2,
|
||||
firstName: 'Günther',
|
||||
lastName: 'Schmidlehner',
|
||||
},
|
||||
address: {
|
||||
city: 'München',
|
||||
street: 'Hilbelstr.',
|
||||
streetNumber: '54',
|
||||
zipCode: '80636',
|
||||
country: 'DEU',
|
||||
},
|
||||
organisation: {
|
||||
name: 'beeline Test Organisation',
|
||||
department: 'Softwarentwicklung',
|
||||
vatId: 'DE123456789',
|
||||
},
|
||||
communicationDetails: {
|
||||
mobile: '01231234567890',
|
||||
email: 'g.schmidlehner@paragon-data.de',
|
||||
},
|
||||
},
|
||||
postage: 0.0,
|
||||
chargePostage: false,
|
||||
typeOfDelivery: 0,
|
||||
shippingType: 0,
|
||||
parcelLabelPrinted: false,
|
||||
label: { id: 3, enabled: true },
|
||||
id: 710139,
|
||||
created: '2020-10-06T12:00:34.0228Z',
|
||||
changed: '2020-10-06T12:00:34.0228Z',
|
||||
version: 1,
|
||||
status: 1,
|
||||
},
|
||||
];
|
||||
|
||||
fdescribe('ReceiptsToPaymentReceiptsPipe', () => {
|
||||
let pipe: ReceiptsToPaymentReceiptsPipe;
|
||||
|
||||
beforeEach(() => {
|
||||
pipe = new ReceiptsToPaymentReceiptsPipe();
|
||||
});
|
||||
|
||||
it('should return all receipts with receiptType 64', () => {
|
||||
const result = pipe.transform(mockReceipts);
|
||||
|
||||
expect(result.length).toEqual(1);
|
||||
expect(result[0].receiptType).toEqual(64);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,11 @@
|
||||
import { Pipe, PipeTransform } from '@angular/core';
|
||||
import { ReceiptDTO } from '@swagger/oms';
|
||||
|
||||
@Pipe({
|
||||
name: 'receiptsToPaymentReceipts',
|
||||
})
|
||||
export class ReceiptsToPaymentReceiptsPipe implements PipeTransform {
|
||||
transform(receipts: ReceiptDTO[]): ReceiptDTO[] {
|
||||
return receipts.filter((receipt) => receipt.receiptType === 64);
|
||||
}
|
||||
}
|
||||
@@ -16,6 +16,9 @@ import {
|
||||
} from './processing-status-options.pipe';
|
||||
import { TitlePipe } from './title.pipe';
|
||||
import { SscToSscTextPipe } from './ssc-text.pipe';
|
||||
import { ReceiptsToPaymentReceiptsPipe } from './receipts-to-payment-receipts.pipe';
|
||||
import { ShowShelfTagsPipe } from './show-shelf-tags.pipe';
|
||||
import { ShowPartialPickupPipe } from './show-partial-pickup.pipe';
|
||||
|
||||
@NgModule({
|
||||
imports: [CommonModule],
|
||||
@@ -33,6 +36,9 @@ import { SscToSscTextPipe } from './ssc-text.pipe';
|
||||
ProcessingStatusOptionsKeyValuePipe,
|
||||
TitlePipe,
|
||||
SscToSscTextPipe,
|
||||
ReceiptsToPaymentReceiptsPipe,
|
||||
ShowShelfTagsPipe,
|
||||
ShowPartialPickupPipe,
|
||||
],
|
||||
declarations: [
|
||||
VatTypeToDisplayNamePipe,
|
||||
@@ -48,6 +54,9 @@ import { SscToSscTextPipe } from './ssc-text.pipe';
|
||||
ProcessingStatusOptionsKeyValuePipe,
|
||||
TitlePipe,
|
||||
SscToSscTextPipe,
|
||||
ReceiptsToPaymentReceiptsPipe,
|
||||
ShowShelfTagsPipe,
|
||||
ShowPartialPickupPipe,
|
||||
],
|
||||
})
|
||||
export class ShelfPipesModule {}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
import { Pipe, PipeTransform } from '@angular/core';
|
||||
import { KeyValueDTOOfStringAndString } from '@swagger/oms';
|
||||
import { ShelfActionHandlerService } from '../services';
|
||||
|
||||
@Pipe({
|
||||
name: 'showButtonForPartialPickUp',
|
||||
})
|
||||
export class ShowPartialPickupPipe implements PipeTransform {
|
||||
constructor(private actionHandlerService: ShelfActionHandlerService) {}
|
||||
|
||||
transform(
|
||||
action: KeyValueDTOOfStringAndString,
|
||||
partialPickupEnabled: boolean
|
||||
): boolean {
|
||||
if (!this.actionHandlerService.isPartialPickup(action)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return !partialPickupEnabled;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
import { Pipe, PipeTransform } from '@angular/core';
|
||||
import { KeyValueDTOOfStringAndString } from '@swagger/oms';
|
||||
import { ShelfActionHandlerService } from '../services';
|
||||
|
||||
@Pipe({
|
||||
name: 'showShelfTags',
|
||||
})
|
||||
export class ShowShelfTagsPipe implements PipeTransform {
|
||||
constructor(private readonly actionService: ShelfActionHandlerService) {}
|
||||
transform(actions: KeyValueDTOOfStringAndString[]): boolean {
|
||||
if (!Array.isArray(actions)) {
|
||||
return false;
|
||||
}
|
||||
const result = actions.some((action) =>
|
||||
this.actionService.showTags(action)
|
||||
);
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,9 @@
|
||||
// start:ng42.barrel
|
||||
export * from './shelf-filter.service';
|
||||
export * from './shelf-overlay.service';
|
||||
export * from './shelf-edit-form.service';
|
||||
export * from './shelf-filter.service';
|
||||
export * from './shelf-order-details.service';
|
||||
export * from './shelf-overlay.service';
|
||||
export * from './shelf-shipping-note.service';
|
||||
export * from './shelf-action-handler.service';
|
||||
export * from './shelf-abholfachetikett.service';
|
||||
// end:ng42.barrel
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { AppService } from '@sales/core-services';
|
||||
import { OrderItemListItemDTO, ReceiptDTO } from '@swagger/oms';
|
||||
import { OMSPrintService, PrintService } from '@swagger/print';
|
||||
import { BehaviorSubject } from 'rxjs';
|
||||
import { takeUntil, take } from 'rxjs/operators';
|
||||
import { PrinterSelectionComponent } from '../../../components/printer-selection/printer-selection.component';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class ShelfAbholfachEtikettService {
|
||||
constructor(
|
||||
private printerService: PrintService,
|
||||
private omsPrintService: OMSPrintService,
|
||||
private appService: AppService
|
||||
) {}
|
||||
|
||||
public async print(
|
||||
orderItemSubsetIds: number[],
|
||||
data: {
|
||||
printerComponent: PrinterSelectionComponent;
|
||||
statusObs$?: BehaviorSubject<boolean>;
|
||||
}
|
||||
) {
|
||||
if (data.statusObs$ && data.statusObs$.next) {
|
||||
data.statusObs$.next(true);
|
||||
}
|
||||
|
||||
const print = (printer?: string) =>
|
||||
this.omsPrintService
|
||||
.OMSPrintAbholfachetikettResponse({
|
||||
data: orderItemSubsetIds,
|
||||
printer,
|
||||
})
|
||||
.toPromise();
|
||||
|
||||
let printer: string;
|
||||
|
||||
if (this.appService.isIPadEnv()) {
|
||||
data.printerComponent.openDialog();
|
||||
printer = await data.printerComponent.print
|
||||
.pipe(takeUntil(data.printerComponent.closed), take(1))
|
||||
.toPromise();
|
||||
data.printerComponent.closeModal();
|
||||
}
|
||||
|
||||
if (!printer) {
|
||||
printer = await this.getDefaultPrinter();
|
||||
}
|
||||
|
||||
try {
|
||||
print(printer);
|
||||
} catch (error) {
|
||||
console.log('Printing Abholfachetikett Failed');
|
||||
} finally {
|
||||
if (data.statusObs$ && data.statusObs$.next) {
|
||||
data.statusObs$.next(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public orderSubsetIdsForWhichToPrintAbholfachEtikett(
|
||||
items: (OrderItemListItemDTO & {
|
||||
receipts?: ReceiptDTO[];
|
||||
})[]
|
||||
): number[] {
|
||||
return items.map(({ orderItemSubsetId }) => orderItemSubsetId);
|
||||
}
|
||||
|
||||
private async getDefaultPrinter(): Promise<string> {
|
||||
const printers = await this.printerService.PrintLabelPrinters().toPromise();
|
||||
const selected = printers.result.find((f) => f.selected);
|
||||
|
||||
if (!!selected) {
|
||||
return selected.key;
|
||||
}
|
||||
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { KeyValueDTOOfStringAndString } from '@swagger/oms';
|
||||
import { actionCommands, additionalCommands } from '../constants';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class ShelfActionHandlerService {
|
||||
private readonly INVALID_STATUS_CHANGES = [8388608];
|
||||
|
||||
constructor() {}
|
||||
|
||||
public getActions(action: KeyValueDTOOfStringAndString): string[] {
|
||||
return action.key.split('|').filter((step) => step !== '|');
|
||||
}
|
||||
|
||||
public getNewProcessingStatus(action: KeyValueDTOOfStringAndString): number {
|
||||
const commands = this.getActions(action);
|
||||
|
||||
const targetStatus = commands.find((command) => !!actionCommands[command]);
|
||||
return actionCommands[targetStatus];
|
||||
}
|
||||
|
||||
public isPartialPickup(action: KeyValueDTOOfStringAndString): boolean {
|
||||
return action.key.includes(additionalCommands.FETCHED_PARTIAL);
|
||||
}
|
||||
|
||||
public isPickUp(action: KeyValueDTOOfStringAndString): boolean {
|
||||
return (
|
||||
action.key.includes('PICKUP') &&
|
||||
!action.key.includes(additionalCommands.FETCHED_PARTIAL)
|
||||
);
|
||||
}
|
||||
|
||||
public isFetched(action: KeyValueDTOOfStringAndString): boolean {
|
||||
return action.key.includes('FETCHED');
|
||||
}
|
||||
|
||||
public showTags(action: KeyValueDTOOfStringAndString): boolean {
|
||||
return action.key.includes('ARRIVED');
|
||||
}
|
||||
|
||||
public shouldSetStatus(action: KeyValueDTOOfStringAndString): boolean {
|
||||
const commands = this.getActions(action);
|
||||
const match = commands.find((command) => !!actionCommands[command]);
|
||||
|
||||
if (!match || this.INVALID_STATUS_CHANGES.includes(actionCommands[match])) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public shouldCreateShippingNote(
|
||||
action: KeyValueDTOOfStringAndString
|
||||
): boolean {
|
||||
return action.key.includes('SHIPPINGNOTE');
|
||||
}
|
||||
|
||||
public shouldDetermineSupplier(
|
||||
action: KeyValueDTOOfStringAndString
|
||||
): boolean {
|
||||
return this.INVALID_STATUS_CHANGES.includes(
|
||||
this.getNewProcessingStatus(action)
|
||||
);
|
||||
}
|
||||
|
||||
public shouldPrintShippingNote(
|
||||
action: KeyValueDTOOfStringAndString
|
||||
): boolean {
|
||||
return action.key.includes(additionalCommands.PRINT_SHIPPINGNOTE);
|
||||
}
|
||||
|
||||
public shouldPrintAbholfachetikett(
|
||||
action: KeyValueDTOOfStringAndString
|
||||
): boolean {
|
||||
return action.key.includes(additionalCommands.PRINT_COMPARTMENTLABEL);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,188 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { DetailsFacade } from '@shelf-store/details';
|
||||
import {
|
||||
OrderItemListItemDTO,
|
||||
ReceiptDTO,
|
||||
ResponseArgsOfValueTupleOfOrderItemSubsetDTOAndOrderItemSubsetDTO,
|
||||
StatusValues,
|
||||
} from '@swagger/oms';
|
||||
import { BehaviorSubject, Observable } from 'rxjs';
|
||||
import { filter, map } from 'rxjs/operators';
|
||||
import { PrinterSelectionComponent } from '../../../components/printer-selection/printer-selection.component';
|
||||
import { OrderDetailsCardInput } from '../components/order-details-card';
|
||||
import { ShelfActionHandlerService } from './shelf-action-handler.service';
|
||||
import { ShelfShippingNoteService } from './shelf-shipping-note.service';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class ShelfOrderDetailsService {
|
||||
constructor(
|
||||
private actionHandlerService: ShelfActionHandlerService,
|
||||
private detailsFacade: DetailsFacade
|
||||
) {}
|
||||
|
||||
public orderDetailsCardFromOrderItems$(
|
||||
orderItems$: Observable<
|
||||
(OrderItemListItemDTO & {
|
||||
receipts?: ReceiptDTO[];
|
||||
})[]
|
||||
>
|
||||
): Observable<OrderDetailsCardInput> {
|
||||
return orderItems$.pipe(
|
||||
map((items) => {
|
||||
if (items.length > 0) {
|
||||
const item = items[0];
|
||||
return {
|
||||
firstName: item.firstName,
|
||||
lastName: item.lastName,
|
||||
customerNumber: item.buyerNumber,
|
||||
estimatedShippingDate: item.estimatedShippingDate
|
||||
? new Date(item.estimatedShippingDate)
|
||||
: undefined,
|
||||
orderDate: new Date(item.orderDate),
|
||||
orderNumber: item.orderNumber,
|
||||
processingStatus: item.processingStatus,
|
||||
processingStatusDate: new Date(item.processingStatusDate),
|
||||
orderChannel: item.clientChannel,
|
||||
compartmentCode: item.compartmentCode,
|
||||
compartmentInfo: item.compartmentInfo,
|
||||
...{
|
||||
...(item.pickUpDeadline
|
||||
? { pickUpDeadline: new Date(item.pickUpDeadline) }
|
||||
: {}),
|
||||
},
|
||||
...{ ...(item.orderId ? { orderId: item.orderId } : {}) },
|
||||
...{ ...(item.receipts ? { receipts: item.receipts } : {}) },
|
||||
...{ ...(item.features ? { features: item.features } : {}) },
|
||||
...{ ...(item.actions ? { actions: item.actions } : {}) },
|
||||
} as OrderDetailsCardInput;
|
||||
}
|
||||
return undefined;
|
||||
}),
|
||||
filter((details) => !!details)
|
||||
);
|
||||
}
|
||||
|
||||
public getReceipts(
|
||||
items: (OrderItemListItemDTO & {
|
||||
receipts?: ReceiptDTO[];
|
||||
})[]
|
||||
): ReceiptDTO[] {
|
||||
return items.reduce((acc, curr) => [...(acc || []), ...curr.receipts], []);
|
||||
}
|
||||
|
||||
public showPickUpAndPrintOption$(
|
||||
orderDetailsCard$: Observable<OrderDetailsCardInput>
|
||||
): Observable<boolean> {
|
||||
return orderDetailsCard$.pipe(
|
||||
map((details) => {
|
||||
if (!Array.isArray(details.actions)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
details.actions.some((action) =>
|
||||
this.actionHandlerService.isPartialPickup(action)
|
||||
);
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
async setProcessingStatus(
|
||||
items: (OrderItemListItemDTO & {
|
||||
receipts?: ReceiptDTO[];
|
||||
})[],
|
||||
status: number,
|
||||
data: {
|
||||
compartmentInfo?: string;
|
||||
quantityForPartialPickup?: Map<number, number>;
|
||||
}
|
||||
): Promise<
|
||||
ResponseArgsOfValueTupleOfOrderItemSubsetDTOAndOrderItemSubsetDTO[]
|
||||
> {
|
||||
let results: ResponseArgsOfValueTupleOfOrderItemSubsetDTOAndOrderItemSubsetDTO[];
|
||||
|
||||
switch (status) {
|
||||
case 128:
|
||||
results = await this.setArrived(items, data.compartmentInfo);
|
||||
break;
|
||||
|
||||
case 256:
|
||||
results = await this.setPickedUp(items, data.quantityForPartialPickup);
|
||||
break;
|
||||
|
||||
case 8192:
|
||||
results = await this.setReorder(items);
|
||||
break;
|
||||
|
||||
case 262144:
|
||||
results = await this.setReorder(items);
|
||||
break;
|
||||
|
||||
default:
|
||||
results = await this.setStatus(items, status);
|
||||
break;
|
||||
}
|
||||
|
||||
return results;
|
||||
}
|
||||
|
||||
setArrived(
|
||||
items: (OrderItemListItemDTO & {
|
||||
receipts?: ReceiptDTO[];
|
||||
})[],
|
||||
compartmentInfo: string
|
||||
): Promise<
|
||||
ResponseArgsOfValueTupleOfOrderItemSubsetDTOAndOrderItemSubsetDTO[]
|
||||
> {
|
||||
return this.detailsFacade.arrived(items, compartmentInfo);
|
||||
}
|
||||
|
||||
setPickedUp(
|
||||
items: (OrderItemListItemDTO & {
|
||||
receipts?: ReceiptDTO[];
|
||||
})[],
|
||||
quantityForPartialPickup: Map<number, number>
|
||||
): Promise<
|
||||
ResponseArgsOfValueTupleOfOrderItemSubsetDTOAndOrderItemSubsetDTO[]
|
||||
> {
|
||||
return this.detailsFacade.pickedUp(items, quantityForPartialPickup);
|
||||
}
|
||||
|
||||
setReorder(
|
||||
items: (OrderItemListItemDTO & {
|
||||
receipts?: ReceiptDTO[];
|
||||
})[]
|
||||
): Promise<
|
||||
ResponseArgsOfValueTupleOfOrderItemSubsetDTOAndOrderItemSubsetDTO[]
|
||||
> {
|
||||
return this.detailsFacade.reorder(items);
|
||||
}
|
||||
|
||||
setBackToStock(
|
||||
items: (OrderItemListItemDTO & {
|
||||
receipts?: ReceiptDTO[];
|
||||
})[]
|
||||
): Promise<
|
||||
ResponseArgsOfValueTupleOfOrderItemSubsetDTOAndOrderItemSubsetDTO[]
|
||||
> {
|
||||
return this.detailsFacade.backToStock(items);
|
||||
}
|
||||
|
||||
setStatus(
|
||||
items: (OrderItemListItemDTO & {
|
||||
receipts?: ReceiptDTO[];
|
||||
})[],
|
||||
status: number
|
||||
): Promise<
|
||||
ResponseArgsOfValueTupleOfOrderItemSubsetDTOAndOrderItemSubsetDTO[]
|
||||
> {
|
||||
const payloads = items.map(
|
||||
({ orderId, orderItemId, orderItemSubsetId }) => ({
|
||||
orderId,
|
||||
orderItemId,
|
||||
orderItemSubsetId,
|
||||
data: { processingStatus: status } as StatusValues,
|
||||
})
|
||||
);
|
||||
return this.detailsFacade.changeStatus(payloads);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,196 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { OrderItemListItemDTO, ReceiptDTO, ReceiptService } from '@swagger/oms';
|
||||
import { ResponseArgs } from '@cmf/core';
|
||||
|
||||
import { BehaviorSubject, Observable, of } from 'rxjs';
|
||||
import { take } from 'rxjs/internal/operators/take';
|
||||
import { catchError, map, takeUntil } from 'rxjs/operators';
|
||||
import { PrinterSelectionComponent } from '../../../components/printer-selection/printer-selection.component';
|
||||
import { OMSPrintService, PrintService } from '@swagger/print';
|
||||
import { AppService } from '../../../core/services/app.service';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class ShelfShippingNoteService {
|
||||
constructor(
|
||||
private receiptService: ReceiptService,
|
||||
private omsPrintService: OMSPrintService,
|
||||
private printerService: PrintService,
|
||||
private appService: AppService
|
||||
) {}
|
||||
|
||||
public hasShippingNote(receipts: ReceiptDTO[]): boolean {
|
||||
if (!Array.isArray(receipts)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return receipts.some((receipt) => receipt.receiptType === 1);
|
||||
}
|
||||
|
||||
public async create(
|
||||
orderItemSubsetIds: number[],
|
||||
data: {
|
||||
printerComponent: PrinterSelectionComponent;
|
||||
statusObs$?: BehaviorSubject<boolean>;
|
||||
}
|
||||
): Promise<ReceiptDTO[]> {
|
||||
let receipts: ReceiptDTO[];
|
||||
try {
|
||||
receipts = await this.createNote(orderItemSubsetIds, {
|
||||
printerComponent: data.printerComponent,
|
||||
statusObs$: data.statusObs$,
|
||||
});
|
||||
} catch (error) {}
|
||||
|
||||
return receipts;
|
||||
}
|
||||
|
||||
async print(
|
||||
receipts: ReceiptDTO[],
|
||||
data: {
|
||||
printerComponent: PrinterSelectionComponent;
|
||||
statusObs$?: BehaviorSubject<boolean>;
|
||||
}
|
||||
): Promise<boolean> {
|
||||
if (data.statusObs$ && data.statusObs$.next) {
|
||||
data.statusObs$.next(true);
|
||||
}
|
||||
|
||||
const receiptIds = this.getShippingNotesFromReceipts(receipts).map(
|
||||
(receipt) => receipt.id
|
||||
);
|
||||
|
||||
if (receiptIds.length) {
|
||||
try {
|
||||
await this.printNote(receiptIds, {
|
||||
printerComponent: data.printerComponent,
|
||||
});
|
||||
} catch (error) {
|
||||
console.error('Error Printing Shipping Note');
|
||||
return false;
|
||||
} finally {
|
||||
if (data.statusObs$ && data.statusObs$.next) {
|
||||
data.statusObs$.next(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public getSubsetIdsForWhichToCreateShippingNotes(
|
||||
items: (OrderItemListItemDTO & {
|
||||
receipts?: ReceiptDTO[];
|
||||
})[]
|
||||
): number[] {
|
||||
return items
|
||||
.filter((item) => !this.hasShippingNote(item.receipts))
|
||||
.map((result) => result.orderItemSubsetId);
|
||||
}
|
||||
|
||||
private async openPrinterDialog(printerComponent): Promise<string> {
|
||||
printerComponent.openDialog();
|
||||
|
||||
const printer = await printerComponent.print
|
||||
.pipe(takeUntil(printerComponent.closed), take(1))
|
||||
.toPromise();
|
||||
|
||||
printerComponent.closeModal();
|
||||
return printer;
|
||||
}
|
||||
|
||||
async getDefaultPrinter(): Promise<string> {
|
||||
const printers = await this.printerService.PrintLabelPrinters().toPromise();
|
||||
const selected = printers.result.find((f) => f.selected);
|
||||
|
||||
if (!!selected) {
|
||||
return selected.key;
|
||||
}
|
||||
|
||||
return undefined;
|
||||
}
|
||||
|
||||
private async createNote(
|
||||
orderItemStatusIds: number[],
|
||||
config: {
|
||||
printerComponent: PrinterSelectionComponent;
|
||||
statusObs$?: BehaviorSubject<boolean>;
|
||||
}
|
||||
): Promise<ReceiptDTO[]> {
|
||||
return this.handleRequest(
|
||||
this.receiptService.ReceiptCreateShippingNote2({
|
||||
orderItemStatusIds,
|
||||
}),
|
||||
config.statusObs$
|
||||
);
|
||||
}
|
||||
|
||||
private async printNote(
|
||||
receiptIds: number[],
|
||||
config: {
|
||||
printerComponent: PrinterSelectionComponent;
|
||||
}
|
||||
) {
|
||||
// tslint:disable-next-line: no-shadowed-variable
|
||||
const print = (printer: string) => {
|
||||
return this.handleRequest(
|
||||
this.omsPrintService.OMSPrintLieferschein({ data: receiptIds, printer })
|
||||
);
|
||||
};
|
||||
|
||||
let printer: string;
|
||||
|
||||
if (this.appService.isIPadEnv()) {
|
||||
printer = await this.openPrinterDialog(config.printerComponent);
|
||||
}
|
||||
|
||||
if (!printer) {
|
||||
printer = await this.getDefaultPrinter();
|
||||
}
|
||||
|
||||
if (!printer) {
|
||||
printer = await this.openPrinterDialog(config.printerComponent);
|
||||
}
|
||||
|
||||
try {
|
||||
print(printer);
|
||||
} catch (error) {
|
||||
config.printerComponent.openDialog();
|
||||
setTimeout(
|
||||
() =>
|
||||
config.printerComponent.setError(
|
||||
error.message || 'Drucken des Lieferscheins fehlgeschlagen'
|
||||
),
|
||||
1500
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
private handleRequest<K = any>(
|
||||
response$: Observable<ResponseArgs<K>>,
|
||||
statusObs$?: BehaviorSubject<boolean>
|
||||
): Promise<K> {
|
||||
return response$
|
||||
.pipe(
|
||||
map((response) => {
|
||||
if (!response.error) {
|
||||
return response.result;
|
||||
}
|
||||
}),
|
||||
catchError((err) => {
|
||||
if (statusObs$) {
|
||||
statusObs$.next(false);
|
||||
}
|
||||
return of((err as unknown) as any);
|
||||
})
|
||||
)
|
||||
.toPromise();
|
||||
}
|
||||
|
||||
private getShippingNotesFromReceipts(receipts: ReceiptDTO[]): ReceiptDTO[] {
|
||||
return Array.from(
|
||||
new Set(
|
||||
receipts.filter((receipt) => receipt && receipt.receiptType === 1)
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -9,11 +9,14 @@ import {
|
||||
DeleteLastPreviousPath,
|
||||
ClearBreadcrumbs,
|
||||
} from 'apps/sales/src/app/core/store/actions/breadcrumb.actions';
|
||||
import { ChangeCurrentRoute, AddProcess } from 'apps/sales/src/app/core/store/actions/process.actions';
|
||||
import {
|
||||
ChangeCurrentRoute,
|
||||
AddProcess,
|
||||
} from 'apps/sales/src/app/core/store/actions/process.actions';
|
||||
import { Breadcrumb } from 'apps/sales/src/app/core/models/breadcrumb.model';
|
||||
import { OrderItemListItemDTO } from '@swagger/oms';
|
||||
import { ProcessSelectors } from 'apps/sales/src/app/core/store/selectors/process.selectors';
|
||||
import { Process } from 'apps/sales/src/app/core/models/process.model';
|
||||
import { OrderItemListItemDTO } from '@swagger/oms';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class ShelfNavigationService {
|
||||
@@ -48,7 +51,11 @@ export class ShelfNavigationService {
|
||||
}
|
||||
}
|
||||
|
||||
navigateToEdit(order: { orderNumber?: string; compartmentCode?: string; processingStatus?: number }) {
|
||||
navigateToEdit(order: {
|
||||
orderNumber?: string;
|
||||
compartmentCode?: string;
|
||||
processingStatus?: number;
|
||||
}) {
|
||||
if (!order) {
|
||||
return this.navigateToSearch();
|
||||
}
|
||||
@@ -59,7 +66,11 @@ export class ShelfNavigationService {
|
||||
this.navigateToRoute(path, breadcrumb);
|
||||
}
|
||||
|
||||
updateDetailsNavigation(order: { orderNumber?: string; compartmentCode?: string; processingStatus?: number }) {
|
||||
updateDetailsNavigation(order: {
|
||||
orderNumber?: string;
|
||||
compartmentCode?: string;
|
||||
processingStatus?: number;
|
||||
}) {
|
||||
if (!order) {
|
||||
return this.navigateToSearch();
|
||||
}
|
||||
@@ -68,6 +79,41 @@ export class ShelfNavigationService {
|
||||
this.replaceRoute(path, breadcrumb);
|
||||
}
|
||||
|
||||
updateHistoryBreadcrumbsAfterStatusChange(order: {
|
||||
orderNumber?: string;
|
||||
compartmentCode?: string;
|
||||
processingStatus?: number;
|
||||
orderItemSubsetId?: number;
|
||||
}) {
|
||||
if (!order) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.store.dispatch(
|
||||
new PopLastBreadcrumbs(this.getDetailsBreadcrumb(order))
|
||||
);
|
||||
|
||||
this.store.dispatch(
|
||||
new AddBreadcrumb(
|
||||
{
|
||||
name: this.getDetailsBreadcrumb(order),
|
||||
path: this.getDetailsPath(order),
|
||||
},
|
||||
'shelf'
|
||||
)
|
||||
);
|
||||
|
||||
this.store.dispatch(
|
||||
new AddBreadcrumb(
|
||||
{
|
||||
name: this.getHistoryBreadcrumb(order),
|
||||
path: this.getHistoryPath(order),
|
||||
},
|
||||
'shelf'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
navigateToDetailsFromOrderToCompartment(data: { compartmentCode: string }) {
|
||||
if (!data) {
|
||||
return this.navigateToSearch();
|
||||
@@ -77,7 +123,13 @@ export class ShelfNavigationService {
|
||||
this.replaceRoute(path, breadcrumb);
|
||||
}
|
||||
|
||||
navigateToResultList({ searchQuery, numberOfHits }: { searchQuery: string; numberOfHits: number }) {
|
||||
navigateToResultList({
|
||||
searchQuery,
|
||||
numberOfHits,
|
||||
}: {
|
||||
searchQuery: string;
|
||||
numberOfHits: number;
|
||||
}) {
|
||||
this.createTab();
|
||||
const path = '/shelf/results';
|
||||
const breadcrumb = this.getResultListBreadcrumb(searchQuery, numberOfHits);
|
||||
@@ -85,7 +137,10 @@ export class ShelfNavigationService {
|
||||
}
|
||||
|
||||
navigateToHistory(orderitem: OrderItemListItemDTO) {
|
||||
this.navigateToRoute(this.getHistoryPath(orderitem), `Historie ${orderitem.orderItemSubsetId}`);
|
||||
this.navigateToRoute(
|
||||
this.getHistoryPath(orderitem),
|
||||
this.getHistoryBreadcrumb(orderitem)
|
||||
);
|
||||
}
|
||||
|
||||
getHistoryPath(data: {
|
||||
@@ -96,22 +151,34 @@ export class ShelfNavigationService {
|
||||
orderNumber?: string;
|
||||
}) {
|
||||
if (data.compartmentCode) {
|
||||
return `/shelf/details/compartment/${this.encodeValue(data.compartmentCode)}/item/${data.orderItemId}/subset/${
|
||||
data.orderItemSubsetId
|
||||
}/history`;
|
||||
return `/shelf/details/compartment/${this.encodeValue(
|
||||
data.compartmentCode
|
||||
)}/item/${data.orderItemId}/subset/${data.orderItemSubsetId}/history`;
|
||||
} else if (data.orderId) {
|
||||
return `/shelf/details/order/${this.encodeValue(data.orderNumber)}/item/${data.orderItemId}/subset/${data.orderItemSubsetId}/history`;
|
||||
return `/shelf/details/order/${this.encodeValue(data.orderNumber)}/item/${
|
||||
data.orderItemId
|
||||
}/subset/${data.orderItemSubsetId}/history`;
|
||||
}
|
||||
}
|
||||
|
||||
updateResultPageBreadcrumb(data: { numberOfHits: number; searchQuery: string }) {
|
||||
updateResultPageBreadcrumb(data: {
|
||||
numberOfHits: number;
|
||||
searchQuery: string;
|
||||
}) {
|
||||
this.store.dispatch(new DeleteBreadcrumbsForProcess(1));
|
||||
this.store.dispatch(new AddBreadcrumb({ name: 'Warenausgabe', path: '/shelf/search' }, 'shelf'));
|
||||
this.store.dispatch(
|
||||
new AddBreadcrumb(
|
||||
{ name: 'Warenausgabe', path: '/shelf/search' },
|
||||
'shelf'
|
||||
)
|
||||
);
|
||||
const path = '/shelf/results';
|
||||
this.store.dispatch(
|
||||
new AddBreadcrumb(
|
||||
{
|
||||
name: `${data.searchQuery} (${data.numberOfHits} ${data.numberOfHits > 1 ? 'Ergebnisse' : 'Ergebnis'})`,
|
||||
name: `${data.searchQuery} (${data.numberOfHits} ${
|
||||
data.numberOfHits > 1 ? 'Ergebnisse' : 'Ergebnis'
|
||||
})`,
|
||||
path,
|
||||
},
|
||||
'shelf'
|
||||
@@ -121,15 +188,22 @@ export class ShelfNavigationService {
|
||||
|
||||
private replaceRoute(route: string, breadcrumbName: string) {
|
||||
this.router.navigate([route]);
|
||||
this.store.dispatch(new UpdateCurrentBreadcrumbName(breadcrumbName, 'shelf'));
|
||||
this.store.dispatch(
|
||||
new UpdateCurrentBreadcrumbName(breadcrumbName, 'shelf')
|
||||
);
|
||||
}
|
||||
|
||||
private resetBreadcrumbs(): void {
|
||||
this.store.dispatch(new ClearBreadcrumbs('shelf'));
|
||||
this.store.dispatch(new AddBreadcrumb({ name: 'Warenausgabe', path: '/shelf' }, 'shelf', true));
|
||||
this.store.dispatch(
|
||||
new AddBreadcrumb({ name: 'Warenausgabe', path: '/shelf' }, 'shelf', true)
|
||||
);
|
||||
}
|
||||
|
||||
private async navigateToRoute(route: string, breadcrumbName: string): Promise<boolean> {
|
||||
private async navigateToRoute(
|
||||
route: string,
|
||||
breadcrumbName: string
|
||||
): Promise<boolean> {
|
||||
this.store.dispatch(
|
||||
new AddBreadcrumb(
|
||||
<Breadcrumb>{
|
||||
@@ -160,7 +234,9 @@ export class ShelfNavigationService {
|
||||
this.store.dispatch(new PopLastBreadcrumbs(this.getEditBreadCrumb()));
|
||||
|
||||
if (previous) {
|
||||
this.store.dispatch(new PopLastBreadcrumbs(this.getDetailsBreadcrumb(previous)));
|
||||
this.store.dispatch(
|
||||
new PopLastBreadcrumbs(this.getDetailsBreadcrumb(previous))
|
||||
);
|
||||
}
|
||||
|
||||
await this.navigateToDetails(data, { replaceLastVisited });
|
||||
@@ -182,7 +258,9 @@ export class ShelfNavigationService {
|
||||
}
|
||||
) {
|
||||
if (previous) {
|
||||
this.store.dispatch(new PopLastBreadcrumbs(this.getDetailsBreadcrumb(previous)));
|
||||
this.store.dispatch(
|
||||
new PopLastBreadcrumbs(this.getDetailsBreadcrumb(previous))
|
||||
);
|
||||
}
|
||||
this.navigateToDetails(data, { replaceLastVisited: true });
|
||||
}
|
||||
@@ -191,17 +269,30 @@ export class ShelfNavigationService {
|
||||
this.store.dispatch(new DeleteLastPreviousPath());
|
||||
}
|
||||
|
||||
private getResultListBreadcrumb(searchQuery: string, numberOfHits: number): string {
|
||||
private getResultListBreadcrumb(
|
||||
searchQuery: string,
|
||||
numberOfHits: number
|
||||
): string {
|
||||
return `${searchQuery} (${numberOfHits} Ergebnisse)`;
|
||||
}
|
||||
|
||||
getDetailsBreadcrumb(data: { orderNumber?: string; compartmentCode?: string }): string {
|
||||
getDetailsBreadcrumb(data: {
|
||||
orderNumber?: string;
|
||||
compartmentCode?: string;
|
||||
}): string {
|
||||
if (data.compartmentCode) {
|
||||
return `${data.compartmentCode}`;
|
||||
}
|
||||
return `${data.orderNumber}`;
|
||||
}
|
||||
|
||||
getHistoryBreadcrumb(data: { orderItemSubsetId?: number }) {
|
||||
if (!data.orderItemSubsetId) {
|
||||
return 'Historie';
|
||||
}
|
||||
return `Historie ${data.orderItemSubsetId}`;
|
||||
}
|
||||
|
||||
getEditBreadCrumb(): string {
|
||||
return 'Bearbeiten';
|
||||
}
|
||||
@@ -214,13 +305,22 @@ export class ShelfNavigationService {
|
||||
return decodeURIComponent(value);
|
||||
}
|
||||
|
||||
private getDetailsPath(data: { orderNumber?: string; compartmentCode?: string; processingStatus?: number; edit?: boolean }): string {
|
||||
private getDetailsPath(data: {
|
||||
orderNumber?: string;
|
||||
compartmentCode?: string;
|
||||
processingStatus?: number;
|
||||
edit?: boolean;
|
||||
}): string {
|
||||
let url = '';
|
||||
|
||||
if (data.compartmentCode) {
|
||||
url = `/shelf/details/compartment/${this.encodeValue(data.compartmentCode)}/${data.processingStatus}`;
|
||||
url = `/shelf/details/compartment/${this.encodeValue(
|
||||
data.compartmentCode
|
||||
)}/${data.processingStatus}`;
|
||||
} else {
|
||||
url = `/shelf/details/order/${this.encodeValue(data.orderNumber)}/${data.processingStatus}`;
|
||||
url = `/shelf/details/order/${this.encodeValue(data.orderNumber)}/${
|
||||
data.processingStatus
|
||||
}`;
|
||||
}
|
||||
|
||||
if (data.edit) {
|
||||
@@ -231,7 +331,8 @@ export class ShelfNavigationService {
|
||||
}
|
||||
|
||||
private createTab() {
|
||||
const processExists = this.store.selectSnapshot(ProcessSelectors.getProcessesCount) > 0;
|
||||
const processExists =
|
||||
this.store.selectSnapshot(ProcessSelectors.getProcessesCount) > 0;
|
||||
if (!processExists) {
|
||||
this.createProcess();
|
||||
}
|
||||
@@ -272,15 +373,27 @@ export class ShelfNavigationService {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (current.orderNumber && previous.orderNumber && current.orderNumber !== previous.orderNumber) {
|
||||
if (
|
||||
current.orderNumber &&
|
||||
previous.orderNumber &&
|
||||
current.orderNumber !== previous.orderNumber
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (current.compartmentCode && previous.compartmentCode && current.compartmentCode !== previous.compartmentCode) {
|
||||
if (
|
||||
current.compartmentCode &&
|
||||
previous.compartmentCode &&
|
||||
current.compartmentCode !== previous.compartmentCode
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (current.processingStatus && previous.processingStatus && current.processingStatus !== previous.processingStatus) {
|
||||
if (
|
||||
current.processingStatus &&
|
||||
previous.processingStatus &&
|
||||
current.processingStatus !== previous.processingStatus
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,11 +4,17 @@ import {
|
||||
ListResponseArgsOfOrderItemListItemDTO,
|
||||
OrderItemListItemDTO,
|
||||
ResponseArgsOfOrderItemSubsetDTO,
|
||||
ResponseArgsOfIEnumerableOfValueTupleOfLongAndReceiptTypeAndEntityDTOContainerOfReceiptDTO,
|
||||
ReceiptDTO,
|
||||
ResponseArgsOfSupplierOrderResult,
|
||||
} from '@swagger/oms';
|
||||
|
||||
const prefix = '[CUSTOMER] [SHELF] [DETAILS]';
|
||||
|
||||
export const fetchDetailsByOrderNumber = createAction(`${prefix} Fetch Details By Order Number`, props<{ orderNumber: string }>());
|
||||
export const fetchDetailsByOrderNumber = createAction(
|
||||
`${prefix} Fetch Details By Order Number`,
|
||||
props<{ orderNumber: string }>()
|
||||
);
|
||||
|
||||
export const fetchDetailsByOrderNumberDone = createAction(
|
||||
`${prefix} Fetch Details By Order Number Done`,
|
||||
@@ -29,7 +35,10 @@ export const fetchDetailsByCompartmentCodeDone = createAction(
|
||||
}>()
|
||||
);
|
||||
|
||||
export const fetchDetailsOrderItemIds = createAction(`${prefix} Fetch Details By Order Item Ids`, props<{ orderItemIds: number[] }>());
|
||||
export const fetchDetailsOrderItemIds = createAction(
|
||||
`${prefix} Fetch Details By Order Item Ids`,
|
||||
props<{ orderItemIds: number[] }>()
|
||||
);
|
||||
|
||||
export const fetchDetailsOrderItemIdsDone = createAction(
|
||||
`${prefix} Fetch Details By Order Item Ids Done`,
|
||||
@@ -50,11 +59,19 @@ export const fetchDetailsOrderItemSubsetIdsDone = createAction(
|
||||
}>()
|
||||
);
|
||||
|
||||
export const addOrderItems = createAction(`${prefix} Add Order Items`, props<{ orderItems: OrderItemListItemDTO[] }>());
|
||||
export const addOrderItems = createAction(
|
||||
`${prefix} Add Order Items`,
|
||||
props<{ orderItems: OrderItemListItemDTO[] }>()
|
||||
);
|
||||
|
||||
export const patchComment = createAction(
|
||||
`${prefix} Patch Comment`,
|
||||
props<{ orderItemSubsetId: number; orderItemId: number; orderId: number; comment: string }>()
|
||||
props<{
|
||||
orderItemSubsetId: number;
|
||||
orderItemId: number;
|
||||
orderId: number;
|
||||
comment: string;
|
||||
}>()
|
||||
);
|
||||
|
||||
export const patchCommentDone = createAction(
|
||||
@@ -62,6 +79,48 @@ export const patchCommentDone = createAction(
|
||||
props<{ response: StrictHttpResponse<ResponseArgsOfOrderItemSubsetDTO> }>()
|
||||
);
|
||||
|
||||
export const fetchReceipts = createAction(
|
||||
`${prefix} Fetch Receipts`,
|
||||
props<{ orderItemSubsetIds: number[] }>()
|
||||
);
|
||||
|
||||
export const fetchReceiptsDone = createAction(
|
||||
`${prefix} Fetch Receipts Done`,
|
||||
props<{
|
||||
response: StrictHttpResponse<
|
||||
ResponseArgsOfIEnumerableOfValueTupleOfLongAndReceiptTypeAndEntityDTOContainerOfReceiptDTO
|
||||
>;
|
||||
orderItemSubsetIds: number[];
|
||||
}>()
|
||||
);
|
||||
|
||||
export const addReceipt = createAction(
|
||||
`${prefix} Add Receipt`,
|
||||
props<{
|
||||
receipt: ReceiptDTO;
|
||||
orderItemSubsetId: number;
|
||||
}>()
|
||||
);
|
||||
|
||||
export const cleanup = createAction(`${prefix} Cleanup`);
|
||||
|
||||
export const setComment = createAction(`${prefix} Set Comment`, props<{ orderItemSubsetId: number; comment: string }>());
|
||||
export const setComment = createAction(
|
||||
`${prefix} Set Comment`,
|
||||
props<{ orderItemSubsetId: number; comment: string }>()
|
||||
);
|
||||
|
||||
export const determineSupplier = createAction(
|
||||
`${prefix} Determine Supplier`,
|
||||
props<{
|
||||
orderId: number;
|
||||
item: { compartmentCode?: string; orderNumber?: string };
|
||||
}>()
|
||||
);
|
||||
|
||||
export const determineSupplierDone = createAction(
|
||||
`${prefix} Determine Supplier Done`,
|
||||
props<{
|
||||
response: StrictHttpResponse<ResponseArgsOfSupplierOrderResult>;
|
||||
item: { compartmentCode?: string; orderNumber?: string };
|
||||
}>()
|
||||
);
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
import { provideMockActions } from '@ngrx/effects/testing';
|
||||
import { MockStore, provideMockStore } from '@ngrx/store/testing';
|
||||
import { Actions, NgxsModule, Store } from '@ngxs/store';
|
||||
import { SearchStateFacade } from '@shelf-store';
|
||||
import {
|
||||
AbholfachService,
|
||||
OrderService,
|
||||
ReceiptService,
|
||||
ResponseArgsOfIEnumerableOfReceiptListItemDTO,
|
||||
StrictHttpResponse,
|
||||
} from '@swagger/oms';
|
||||
import { Observable, of } from 'rxjs';
|
||||
import { DetailsEffects } from './details.effects';
|
||||
|
||||
fdescribe('DetailsEffects', () => {
|
||||
// tslint:disable-next-line: prefer-const
|
||||
let actions$: Observable<any>;
|
||||
let store: MockStore<any>;
|
||||
|
||||
let abholfachService: AbholfachService;
|
||||
let orderService: OrderService;
|
||||
let receiptService: ReceiptService;
|
||||
let searchStateFacade: SearchStateFacade;
|
||||
|
||||
const mockReceiptsResponse: StrictHttpResponse<ResponseArgsOfIEnumerableOfReceiptListItemDTO> = ({
|
||||
body: { result: [], error: false },
|
||||
} as unknown) as StrictHttpResponse<
|
||||
ResponseArgsOfIEnumerableOfReceiptListItemDTO
|
||||
>;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [HttpClientTestingModule, NgxsModule.forRoot([])],
|
||||
providers: [
|
||||
DetailsEffects,
|
||||
provideMockStore({}),
|
||||
provideMockActions(() => actions$),
|
||||
Actions,
|
||||
SearchStateFacade,
|
||||
{
|
||||
provide: AbholfachService,
|
||||
useValue: jasmine.createSpy('abholfachService'),
|
||||
},
|
||||
{
|
||||
provide: OrderService,
|
||||
useValue: jasmine.createSpy('orderService'),
|
||||
},
|
||||
{
|
||||
provide: SearchStateFacade,
|
||||
useValue: jasmine.createSpy('searchStateFacade'),
|
||||
},
|
||||
{
|
||||
provide: ReceiptService,
|
||||
useValue: jasmine.createSpyObj('receiptService', {
|
||||
ReceiptReceiptsByOrderIdResponse: of(mockReceiptsResponse),
|
||||
}),
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
store = TestBed.get(Store);
|
||||
abholfachService = TestBed.get(AbholfachService);
|
||||
orderService = TestBed.get(OrderService);
|
||||
receiptService = TestBed.get(ReceiptService);
|
||||
searchStateFacade = TestBed.get(SearchStateFacade);
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(DetailsEffects).toBeTruthy();
|
||||
});
|
||||
|
||||
describe('fetchReceipts$', () => {});
|
||||
|
||||
describe('fetchReceiptsDone$', () => {});
|
||||
});
|
||||
@@ -1,10 +1,21 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Actions, ofType, createEffect, ROOT_EFFECTS_INIT, OnInitEffects } from '@ngrx/effects';
|
||||
import { Actions, ofType, createEffect, OnInitEffects } from '@ngrx/effects';
|
||||
|
||||
import * as actions from './details.actions';
|
||||
import { flatMap, catchError, map, debounceTime, throttleTime } from 'rxjs/operators';
|
||||
import { OrderService, StrictHttpResponse, ListResponseArgsOfOrderItemListItemDTO, AbholfachService } from '@swagger/oms';
|
||||
import { of, NEVER, interval } from 'rxjs';
|
||||
import { flatMap, catchError, map } from 'rxjs/operators';
|
||||
import {
|
||||
OrderService,
|
||||
StrictHttpResponse,
|
||||
ListResponseArgsOfOrderItemListItemDTO,
|
||||
AbholfachService,
|
||||
ReceiptService,
|
||||
ResponseArgsOfIEnumerableOfValueTupleOfLongAndReceiptTypeAndEntityDTOContainerOfReceiptDTO,
|
||||
ReceiptDTO,
|
||||
ReceiptType,
|
||||
OrderCheckoutService,
|
||||
ResponseArgsOfSupplierOrderResult,
|
||||
} from '@swagger/oms';
|
||||
import { of, NEVER } from 'rxjs';
|
||||
import { SearchStateFacade } from '../search';
|
||||
|
||||
@Injectable()
|
||||
@@ -13,7 +24,9 @@ export class DetailsEffects implements OnInitEffects {
|
||||
private actions$: Actions,
|
||||
private abholfachService: AbholfachService,
|
||||
private orderService: OrderService,
|
||||
private searchStateFacade: SearchStateFacade
|
||||
private receiptService: ReceiptService,
|
||||
private searchStateFacade: SearchStateFacade,
|
||||
private orderCheckoutService: OrderCheckoutService
|
||||
) {}
|
||||
|
||||
fetchOrderItemsByOrderNumber$ = createEffect(() =>
|
||||
@@ -27,7 +40,13 @@ export class DetailsEffects implements OnInitEffects {
|
||||
qs: a.orderNumber,
|
||||
},
|
||||
})
|
||||
.pipe(catchError((err) => of<StrictHttpResponse<ListResponseArgsOfOrderItemListItemDTO>>(err)))
|
||||
.pipe(
|
||||
catchError((err) =>
|
||||
of<StrictHttpResponse<ListResponseArgsOfOrderItemListItemDTO>>(
|
||||
err
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
map((response) => actions.fetchDetailsByOrderNumberDone({ response }))
|
||||
)
|
||||
@@ -44,7 +63,13 @@ export class DetailsEffects implements OnInitEffects {
|
||||
qs: a.compartmentCode,
|
||||
},
|
||||
})
|
||||
.pipe(catchError((err) => of<StrictHttpResponse<ListResponseArgsOfOrderItemListItemDTO>>(err)))
|
||||
.pipe(
|
||||
catchError((err) =>
|
||||
of<StrictHttpResponse<ListResponseArgsOfOrderItemListItemDTO>>(
|
||||
err
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
map((response) => actions.fetchDetailsByCompartmentCodeDone({ response }))
|
||||
)
|
||||
@@ -60,7 +85,13 @@ export class DetailsEffects implements OnInitEffects {
|
||||
filter: { all_branches: 'true' },
|
||||
input: { qs: '' },
|
||||
})
|
||||
.pipe(catchError((err) => of<StrictHttpResponse<ListResponseArgsOfOrderItemListItemDTO>>(err)))
|
||||
.pipe(
|
||||
catchError((err) =>
|
||||
of<StrictHttpResponse<ListResponseArgsOfOrderItemListItemDTO>>(
|
||||
err
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
map((response) => actions.fetchDetailsOrderItemIdsDone({ response }))
|
||||
)
|
||||
@@ -76,9 +107,17 @@ export class DetailsEffects implements OnInitEffects {
|
||||
filter: { all_branches: 'true' },
|
||||
input: { qs: '' },
|
||||
})
|
||||
.pipe(catchError((err) => of<StrictHttpResponse<ListResponseArgsOfOrderItemListItemDTO>>(err)))
|
||||
.pipe(
|
||||
catchError((err) =>
|
||||
of<StrictHttpResponse<ListResponseArgsOfOrderItemListItemDTO>>(
|
||||
err
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
map((response) => actions.fetchDetailsOrderItemSubsetIdsDone({ response }))
|
||||
map((response) =>
|
||||
actions.fetchDetailsOrderItemSubsetIdsDone({ response })
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -93,13 +132,95 @@ export class DetailsEffects implements OnInitEffects {
|
||||
flatMap((a) => {
|
||||
if (a.response.ok) {
|
||||
this.searchStateFacade.reloadResults();
|
||||
return [actions.addOrderItems({ orderItems: a.response.body.result })];
|
||||
const orderItems = a.response.body.result;
|
||||
|
||||
if (!orderItems) {
|
||||
return NEVER;
|
||||
}
|
||||
|
||||
const orderItemSubsetIds = orderItems.map(
|
||||
(item) => item.orderItemSubsetId
|
||||
);
|
||||
|
||||
return [
|
||||
actions.addOrderItems({ orderItems }),
|
||||
actions.fetchReceipts({ orderItemSubsetIds }),
|
||||
];
|
||||
}
|
||||
return NEVER;
|
||||
})
|
||||
)
|
||||
);
|
||||
|
||||
fetchReceipts$ = createEffect(() =>
|
||||
this.actions$.pipe(
|
||||
ofType(actions.fetchReceipts),
|
||||
flatMap((action) => {
|
||||
return this.receiptService
|
||||
.ReceiptGetReceiptsByOrderItemSubsetResponse({
|
||||
payload: {
|
||||
receiptType: (65 as unknown) as any,
|
||||
ids: action.orderItemSubsetIds,
|
||||
eagerLoading: 1,
|
||||
},
|
||||
})
|
||||
.pipe(
|
||||
catchError((err) =>
|
||||
of<
|
||||
StrictHttpResponse<
|
||||
ResponseArgsOfIEnumerableOfValueTupleOfLongAndReceiptTypeAndEntityDTOContainerOfReceiptDTO
|
||||
>
|
||||
>(err)
|
||||
),
|
||||
map((response) =>
|
||||
actions.fetchReceiptsDone({
|
||||
response,
|
||||
orderItemSubsetIds: action.orderItemSubsetIds,
|
||||
})
|
||||
)
|
||||
);
|
||||
})
|
||||
)
|
||||
);
|
||||
|
||||
fetchReceiptsDone$ = createEffect(() =>
|
||||
this.actions$.pipe(
|
||||
ofType(actions.fetchReceiptsDone),
|
||||
flatMap((action) => {
|
||||
if (action.response.ok) {
|
||||
const responseResult = action.response.body.result;
|
||||
|
||||
const data: {
|
||||
orderItemSubsetId: number;
|
||||
receiptType?: ReceiptType;
|
||||
receipt?: ReceiptDTO;
|
||||
}[] = responseResult
|
||||
.filter((result) => result.item3 && result.item3.data)
|
||||
.map((result) => ({
|
||||
orderItemSubsetId: result.item1,
|
||||
receiptType: result.item2,
|
||||
...{
|
||||
receipt: {
|
||||
...(result.item3 ? result.item3.data : ({} as ReceiptDTO)),
|
||||
},
|
||||
},
|
||||
}));
|
||||
|
||||
const addReceiptActions = data.map((d) =>
|
||||
actions.addReceipt({
|
||||
receipt: d.receipt,
|
||||
orderItemSubsetId: d.orderItemSubsetId,
|
||||
})
|
||||
);
|
||||
|
||||
return [...addReceiptActions];
|
||||
}
|
||||
|
||||
return NEVER;
|
||||
})
|
||||
)
|
||||
);
|
||||
|
||||
setComment$ = createEffect(() =>
|
||||
this.actions$.pipe(
|
||||
ofType(actions.patchComment),
|
||||
@@ -136,6 +257,54 @@ export class DetailsEffects implements OnInitEffects {
|
||||
)
|
||||
);
|
||||
|
||||
determineSupplier$ = createEffect(() =>
|
||||
this.actions$.pipe(
|
||||
ofType(actions.determineSupplier),
|
||||
flatMap((action) =>
|
||||
this.orderCheckoutService
|
||||
.OrderCheckoutOrderAtSupplierResponse(action.orderId)
|
||||
.pipe(
|
||||
catchError((err) =>
|
||||
of<StrictHttpResponse<ResponseArgsOfSupplierOrderResult>>(err)
|
||||
),
|
||||
map((response) =>
|
||||
actions.determineSupplierDone({ response, item: action.item })
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
determineSupplierDone$ = createEffect(() =>
|
||||
this.actions$.pipe(
|
||||
ofType(actions.determineSupplierDone),
|
||||
flatMap(({ response, item }) => {
|
||||
const { compartmentCode, orderNumber } = item;
|
||||
|
||||
if (response.ok) {
|
||||
let actionsToDispatch = [];
|
||||
if (compartmentCode) {
|
||||
actionsToDispatch = [
|
||||
...actionsToDispatch,
|
||||
actions.fetchDetailsByCompartmentCode({ compartmentCode }),
|
||||
];
|
||||
}
|
||||
|
||||
if (orderNumber) {
|
||||
actionsToDispatch = [
|
||||
...actionsToDispatch,
|
||||
actions.fetchDetailsByOrderNumber({ orderNumber }),
|
||||
];
|
||||
}
|
||||
|
||||
return actionsToDispatch;
|
||||
}
|
||||
|
||||
return NEVER;
|
||||
})
|
||||
)
|
||||
);
|
||||
|
||||
ngrxOnInitEffects() {
|
||||
return actions.cleanup();
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import {
|
||||
OrderItemSubsetDTO,
|
||||
OrderService,
|
||||
OrderItemProcessingStatusValue,
|
||||
ReceiptDTO,
|
||||
} from '@swagger/oms';
|
||||
import { Observable, concat } from 'rxjs';
|
||||
import * as actions from './details.actions';
|
||||
@@ -17,25 +18,43 @@ import { shareReplay, bufferCount, finalize, map, tap } from 'rxjs/operators';
|
||||
export class DetailsFacade {
|
||||
constructor(private store: Store<any>, private orderService: OrderService) {}
|
||||
|
||||
getOrderItemsByOrderNumber$(orderNumber: string): Observable<OrderItemListItemDTO[]> {
|
||||
getOrderItemsByOrderNumber$(
|
||||
orderNumber: string
|
||||
): Observable<(OrderItemListItemDTO & { receipts?: ReceiptDTO[] })[]> {
|
||||
this.fetchOrderItemsByOrderNumber(orderNumber);
|
||||
return this.store.select(selectors.selectOrderItemsByOrderNumber, orderNumber).pipe(shareReplay());
|
||||
return this.store
|
||||
.select(selectors.selectOrderItemsByOrderNumber, orderNumber)
|
||||
.pipe(shareReplay());
|
||||
}
|
||||
|
||||
getOrderItemsByOrderNumberAndProcessingStatus$(orderNumber: string, processingStatus: OrderItemProcessingStatusValue) {
|
||||
getOrderItemsByOrderNumberAndProcessingStatus$(
|
||||
orderNumber: string,
|
||||
processingStatus: OrderItemProcessingStatusValue
|
||||
) {
|
||||
return this.getOrderItemsByOrderNumber$(orderNumber).pipe(
|
||||
map((items) => items.filter((item) => item.processingStatus === processingStatus))
|
||||
map((items) =>
|
||||
items.filter((item) => item.processingStatus === processingStatus)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
getOrderItemsByCompartmentCode$(compartmentCode: string): Observable<OrderItemListItemDTO[]> {
|
||||
getOrderItemsByCompartmentCode$(
|
||||
compartmentCode: string
|
||||
): Observable<(OrderItemListItemDTO & { receipts?: ReceiptDTO[] })[]> {
|
||||
this.fetchOrderItemsByCompartmentCode(compartmentCode);
|
||||
return this.store.select(selectors.selectOrderItemsByCompartmentCode, compartmentCode).pipe(shareReplay());
|
||||
return this.store
|
||||
.select(selectors.selectOrderItemsByCompartmentCode, compartmentCode)
|
||||
.pipe(shareReplay());
|
||||
}
|
||||
|
||||
getOrderItemsByCompartmentCodeAndProcessingStatus$(compartmentCode: string, processingStatus: OrderItemProcessingStatusValue) {
|
||||
getOrderItemsByCompartmentCodeAndProcessingStatus$(
|
||||
compartmentCode: string,
|
||||
processingStatus: OrderItemProcessingStatusValue
|
||||
) {
|
||||
return this.getOrderItemsByCompartmentCode$(compartmentCode).pipe(
|
||||
map((items) => items.filter((item) => item.processingStatus === processingStatus))
|
||||
map((items) =>
|
||||
items.filter((item) => item.processingStatus === processingStatus)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -55,13 +74,14 @@ export class DetailsFacade {
|
||||
data: StatusValues;
|
||||
}[]
|
||||
) {
|
||||
const changeStatusRequests = changes.map(({ data, orderId, orderItemId, orderItemSubsetId }) =>
|
||||
this.orderService.OrderChangeStatus({
|
||||
data,
|
||||
orderId,
|
||||
orderItemId,
|
||||
orderItemSubsetId,
|
||||
})
|
||||
const changeStatusRequests = changes.map(
|
||||
({ data, orderId, orderItemId, orderItemSubsetId }) =>
|
||||
this.orderService.OrderChangeStatus({
|
||||
data,
|
||||
orderId,
|
||||
orderItemId,
|
||||
orderItemSubsetId,
|
||||
})
|
||||
);
|
||||
|
||||
return concat(...changeStatusRequests)
|
||||
@@ -79,7 +99,9 @@ export class DetailsFacade {
|
||||
}
|
||||
return [...ids, ...itemIds];
|
||||
}, []);
|
||||
this.store.dispatch(actions.fetchDetailsOrderItemSubsetIds({ orderItemSubsetIds }));
|
||||
this.store.dispatch(
|
||||
actions.fetchDetailsOrderItemSubsetIds({ orderItemSubsetIds })
|
||||
);
|
||||
})
|
||||
)
|
||||
.toPromise();
|
||||
@@ -92,7 +114,9 @@ export class DetailsFacade {
|
||||
orderItem: Partial<OrderItemDTO>;
|
||||
}[]
|
||||
) {
|
||||
const requests = changes.map((payload) => this.orderService.OrderPatchOrderItem(payload));
|
||||
const requests = changes.map((payload) =>
|
||||
this.orderService.OrderPatchOrderItem(payload)
|
||||
);
|
||||
|
||||
return concat(...requests)
|
||||
.pipe(
|
||||
@@ -105,7 +129,9 @@ export class DetailsFacade {
|
||||
return [...itemIds, change.orderItemId];
|
||||
}, [] as number[]);
|
||||
|
||||
this.store.dispatch(actions.fetchDetailsOrderItemIds({ orderItemIds }));
|
||||
this.store.dispatch(
|
||||
actions.fetchDetailsOrderItemIds({ orderItemIds })
|
||||
);
|
||||
})
|
||||
)
|
||||
.toPromise();
|
||||
@@ -119,7 +145,9 @@ export class DetailsFacade {
|
||||
orderItemSubset: Partial<OrderItemSubsetDTO>;
|
||||
}[]
|
||||
) {
|
||||
const requests = changes.map((payload) => this.orderService.OrderPatchOrderItemSubset(payload));
|
||||
const requests = changes.map((payload) =>
|
||||
this.orderService.OrderPatchOrderItemSubset(payload)
|
||||
);
|
||||
|
||||
return concat(...requests)
|
||||
.pipe(
|
||||
@@ -132,22 +160,29 @@ export class DetailsFacade {
|
||||
return [...itemIds, change.orderItemSubsetId];
|
||||
}, [] as number[]);
|
||||
|
||||
this.store.dispatch(actions.fetchDetailsOrderItemSubsetIds({ orderItemSubsetIds }));
|
||||
this.store.dispatch(
|
||||
actions.fetchDetailsOrderItemSubsetIds({ orderItemSubsetIds })
|
||||
);
|
||||
})
|
||||
)
|
||||
.toPromise();
|
||||
}
|
||||
|
||||
pickedUp(items: OrderItemListItemDTO[], quantities?: Map<number, number>) {
|
||||
const data = items.map(({ orderId, orderItemId, orderItemSubsetId, quantity }) => ({
|
||||
orderId,
|
||||
orderItemId,
|
||||
orderItemSubsetId,
|
||||
data: {
|
||||
processingStatus: 256,
|
||||
quantity: !!quantities && quantities.has(orderItemId) ? quantities.get(orderItemId) : quantity,
|
||||
} as StatusValues,
|
||||
}));
|
||||
const data = items.map(
|
||||
({ orderId, orderItemId, orderItemSubsetId, quantity }) => ({
|
||||
orderId,
|
||||
orderItemId,
|
||||
orderItemSubsetId,
|
||||
data: {
|
||||
processingStatus: 256,
|
||||
quantity:
|
||||
!!quantities && quantities.has(orderItemId)
|
||||
? quantities.get(orderItemId)
|
||||
: quantity,
|
||||
} as StatusValues,
|
||||
})
|
||||
);
|
||||
return this.changeStatus(data);
|
||||
}
|
||||
|
||||
@@ -176,26 +211,32 @@ export class DetailsFacade {
|
||||
}
|
||||
|
||||
async arrived(items: OrderItemListItemDTO[], compartmentInfo: string) {
|
||||
const payloads = items.map(({ orderId, orderItemId, orderItemSubsetId }) => ({
|
||||
orderId,
|
||||
orderItemId,
|
||||
orderItemSubsetId,
|
||||
data: { processingStatus: 128, compartmentInfo } as StatusValues,
|
||||
}));
|
||||
const payloads = items.map(
|
||||
({ orderId, orderItemId, orderItemSubsetId }) => ({
|
||||
orderId,
|
||||
orderItemId,
|
||||
orderItemSubsetId,
|
||||
data: { processingStatus: 128, compartmentInfo } as StatusValues,
|
||||
})
|
||||
);
|
||||
|
||||
const firstPayload = payloads[0];
|
||||
let pendingPayloads = payloads.filter((f) => f.orderItemSubsetId !== firstPayload.orderItemSubsetId);
|
||||
let pendingPayloads = payloads.filter(
|
||||
(f) => f.orderItemSubsetId !== firstPayload.orderItemSubsetId
|
||||
);
|
||||
const firstPayloadResult = (await this.changeStatus([firstPayload]))[0];
|
||||
|
||||
pendingPayloads = pendingPayloads.map(({ orderItemId, orderId, orderItemSubsetId, data }) => ({
|
||||
orderItemId,
|
||||
orderId,
|
||||
orderItemSubsetId,
|
||||
data: {
|
||||
...data,
|
||||
compartmentNumber: firstPayloadResult.result.item1.compartmentCode,
|
||||
},
|
||||
}));
|
||||
pendingPayloads = pendingPayloads.map(
|
||||
({ orderItemId, orderId, orderItemSubsetId, data }) => ({
|
||||
orderItemId,
|
||||
orderId,
|
||||
orderItemSubsetId,
|
||||
data: {
|
||||
...data,
|
||||
compartmentNumber: firstPayloadResult.result.item1.compartmentCode,
|
||||
},
|
||||
})
|
||||
);
|
||||
|
||||
const pedingPayloadResults = await this.changeStatus(pendingPayloads);
|
||||
|
||||
@@ -223,7 +264,14 @@ export class DetailsFacade {
|
||||
);
|
||||
}
|
||||
|
||||
setEstimatedShippingDate({
|
||||
determineSupplier(
|
||||
orderId: number,
|
||||
item: { compartmentCode?: string; orderNumber?: string }
|
||||
) {
|
||||
this.store.dispatch(actions.determineSupplier({ orderId, item }));
|
||||
}
|
||||
|
||||
async setEstimatedShippingDate({
|
||||
items,
|
||||
estimatedShippingDate,
|
||||
}: {
|
||||
@@ -234,19 +282,22 @@ export class DetailsFacade {
|
||||
}>;
|
||||
estimatedShippingDate: Date | string;
|
||||
}) {
|
||||
this.patchOrderItemSubsets(
|
||||
return this.patchOrderItemSubsets(
|
||||
items.map((orderItem) => ({
|
||||
orderId: orderItem.orderId,
|
||||
orderItemId: orderItem.orderItemId,
|
||||
orderItemSubsetId: orderItem.orderItemSubsetId,
|
||||
orderItemSubset: {
|
||||
estimatedShippingDate: estimatedShippingDate instanceof Date ? estimatedShippingDate.toJSON() : estimatedShippingDate,
|
||||
estimatedShippingDate:
|
||||
estimatedShippingDate instanceof Date
|
||||
? estimatedShippingDate.toJSON()
|
||||
: estimatedShippingDate,
|
||||
},
|
||||
}))
|
||||
);
|
||||
}
|
||||
|
||||
setPickUpDeadline({
|
||||
async setPickUpDeadline({
|
||||
items,
|
||||
pickUpDeadline,
|
||||
}: {
|
||||
@@ -271,6 +322,6 @@ export class DetailsFacade {
|
||||
},
|
||||
}));
|
||||
|
||||
this.patchOrderItemSubsets(payload);
|
||||
return this.patchOrderItemSubsets(payload);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
import { createReducer, Action, on } from '@ngrx/store';
|
||||
import { INITIAL_DETAILS_STATE, DetailsState, detailsStateEntityAdapter } from './details.state';
|
||||
import {
|
||||
INITIAL_DETAILS_STATE,
|
||||
DetailsState,
|
||||
detailsStateEntityAdapter,
|
||||
} from './details.state';
|
||||
import * as actions from './details.actions';
|
||||
|
||||
const _detailsReducer = createReducer(
|
||||
@@ -18,10 +22,33 @@ const _detailsReducer = createReducer(
|
||||
|
||||
return s;
|
||||
}),
|
||||
on(actions.addReceipt, (s, a) => {
|
||||
const entity = s.entities[a.orderItemSubsetId];
|
||||
if (entity) {
|
||||
return detailsStateEntityAdapter.updateOne(
|
||||
{
|
||||
id: a.orderItemSubsetId,
|
||||
changes: {
|
||||
receipts: [
|
||||
...(entity.receipts || []).filter(
|
||||
(receipt) => receipt.id !== a.receipt.id
|
||||
),
|
||||
a.receipt,
|
||||
],
|
||||
},
|
||||
},
|
||||
s
|
||||
);
|
||||
}
|
||||
return s;
|
||||
}),
|
||||
on(actions.setComment, (s, a) => {
|
||||
const entity = s.entities[a.orderItemSubsetId];
|
||||
if (entity) {
|
||||
return detailsStateEntityAdapter.updateOne({ id: a.orderItemSubsetId, changes: { specialComment: a.comment } }, s);
|
||||
return detailsStateEntityAdapter.updateOne(
|
||||
{ id: a.orderItemSubsetId, changes: { specialComment: a.comment } },
|
||||
s
|
||||
);
|
||||
}
|
||||
return s;
|
||||
}),
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
import { EntityState, createEntityAdapter } from '@ngrx/entity';
|
||||
|
||||
import { OrderItemListItemDTO } from '@swagger/oms';
|
||||
import { OrderItemListItemDTO, ReceiptDTO } from '@swagger/oms';
|
||||
|
||||
export interface DetailsState extends EntityState<OrderItemListItemDTO> {}
|
||||
export interface DetailsState
|
||||
extends EntityState<OrderItemListItemDTO & { receipts?: ReceiptDTO[] }> {}
|
||||
|
||||
export const detailsStateEntityAdapter = createEntityAdapter<OrderItemListItemDTO>({
|
||||
export const detailsStateEntityAdapter = createEntityAdapter<
|
||||
OrderItemListItemDTO & { receipts?: ReceiptDTO[] }
|
||||
>({
|
||||
selectId: (item) => item.orderItemSubsetId,
|
||||
});
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { fakeAsync, TestBed, tick } from '@angular/core/testing';
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
import { SearchEffects } from './search.effects';
|
||||
import { provideMockStore, MockStore } from '@ngrx/store/testing';
|
||||
import { provideMockActions } from '@ngrx/effects/testing';
|
||||
@@ -23,7 +23,7 @@ import {
|
||||
inputDtoToPrimaryFilterOption,
|
||||
} from './mappers';
|
||||
import { Process } from 'apps/sales/src/app/core/models/process.model';
|
||||
import { first, take } from 'rxjs/operators';
|
||||
import { first } from 'rxjs/operators';
|
||||
import { ProcessState } from 'apps/sales/src/app/core/store/state/process.state';
|
||||
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
||||
import { HttpHeaders } from '@angular/common/http';
|
||||
|
||||
@@ -6,6 +6,10 @@
|
||||
color: $isa-neutral-info;
|
||||
}
|
||||
|
||||
.isa-font-color-warning {
|
||||
color: $isa-red;
|
||||
}
|
||||
|
||||
.isa-font-grey {
|
||||
color: $text-grey;
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
@import 'modules/input';
|
||||
@import 'modules/icon';
|
||||
@import 'modules/overlay';
|
||||
@import 'modules/skeleton';
|
||||
|
||||
/* UTILS */
|
||||
@import 'utils/flex';
|
||||
|
||||
@@ -72,6 +72,7 @@ $button-font-size-xl: 18px;
|
||||
$button-line-height: 19px;
|
||||
$button-line-height-l: 21px;
|
||||
$button-line-height-xl: 21px;
|
||||
$button-primary-height: 59px;
|
||||
$button-padding: 0.25rem 0.5rem;
|
||||
$button-padding-l: 0.5rem 0.75rem;
|
||||
$button-padding-xl: 18px 27px 20px 27px;
|
||||
@@ -80,6 +81,10 @@ $button-border-radius-xl: 29px;
|
||||
$button-pill-radius: 50rem;
|
||||
$button-disabled-color: #89949e;
|
||||
|
||||
/* SKELETON */
|
||||
$isa-skeleton-animation-duration: 1.5s;
|
||||
$isa-skeleton-background: #e6eff9;
|
||||
|
||||
/* CARD */
|
||||
$card-background-color: #fff;
|
||||
$card-border-radius: 5px;
|
||||
|
||||
@@ -11,6 +11,10 @@
|
||||
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.isa-btn-block {
|
||||
@@ -45,12 +49,14 @@
|
||||
}
|
||||
|
||||
.isa-btn-primary {
|
||||
height: $button-primary-height;
|
||||
color: $text-light;
|
||||
background-color: $isa-red;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.isa-btn-secondary {
|
||||
height: $button-primary-height;
|
||||
color: $isa-red;
|
||||
background-color: $isa-white;
|
||||
font-weight: bold;
|
||||
@@ -105,9 +111,22 @@
|
||||
|
||||
button:disabled.isa-btn {
|
||||
background: $button-disabled-color !important;
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
.isa-btn-block {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.isa-btn-loader {
|
||||
display: inline-block;
|
||||
|
||||
&.spinner {
|
||||
margin-left: 10px;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
margin-right: 0;
|
||||
background-image: url('/assets/images/Icon_Loading.svg');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,3 +4,14 @@
|
||||
box-shadow: 0 0 18px 0 #b8b3b7;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.isa-paid-marker {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
|
||||
lib-icon {
|
||||
height: 24px;
|
||||
margin-right: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
20
apps/sales/src/scss/modules/_skeleton.scss
Normal file
20
apps/sales/src/scss/modules/_skeleton.scss
Normal file
@@ -0,0 +1,20 @@
|
||||
.isa-skeleton-container {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.isa-skeleton-bar {
|
||||
display: flex;
|
||||
background: $isa-skeleton-background;
|
||||
animation: load $isa-skeleton-animation-duration linear infinite;
|
||||
}
|
||||
|
||||
@keyframes load {
|
||||
50% {
|
||||
opacity: 0.3;
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
@@ -5,3 +5,13 @@
|
||||
.isa-container-width-380 {
|
||||
width: 380px;
|
||||
}
|
||||
|
||||
@for $space from 0 to 50 {
|
||||
.isa-h-#{$space * 5} {
|
||||
height: #{$space * 5}px !important;
|
||||
}
|
||||
|
||||
.isa-w-#{$space * 5} {
|
||||
width: #{$space * 5}px !important;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,9 @@ export { WeightOfAvoirdupois } from './models/weight-of-avoirdupois';
|
||||
export { Avoirdupois } from './models/avoirdupois';
|
||||
export { VATType } from './models/vattype';
|
||||
export { Gender } from './models/gender';
|
||||
export { KeyValueDTOOfOrderItemProcessingStatusValueAndString } from './models/key-value-dtoof-order-item-processing-status-value-and-string';
|
||||
export { PaymentType } from './models/payment-type';
|
||||
export { PaymentStatus } from './models/payment-status';
|
||||
export { KeyValueDTOOfStringAndString } from './models/key-value-dtoof-string-and-string';
|
||||
export { ResponseArgs } from './models/response-args';
|
||||
export { IPublicUserInfo } from './models/ipublic-user-info';
|
||||
export { ProblemDetails } from './models/problem-details';
|
||||
@@ -52,7 +54,6 @@ export { DisplayLogisticianDTO } from './models/display-logistician-dto';
|
||||
export { EntityDTOOfDisplayLogisticianDTOAndILogistician } from './models/entity-dtoof-display-logistician-dtoand-ilogistician';
|
||||
export { ReadOnlyEntityDTOOfDisplayLogisticianDTOAndILogistician } from './models/read-only-entity-dtoof-display-logistician-dtoand-ilogistician';
|
||||
export { DisplayOrderPaymentDTO } from './models/display-order-payment-dto';
|
||||
export { PaymentType } from './models/payment-type';
|
||||
export { EntityDTOOfDisplayOrderPaymentDTOAndIReadOnlyPayment } from './models/entity-dtoof-display-order-payment-dtoand-iread-only-payment';
|
||||
export { ReadOnlyEntityDTOOfDisplayOrderPaymentDTOAndIReadOnlyPayment } from './models/read-only-entity-dtoof-display-order-payment-dtoand-iread-only-payment';
|
||||
export { TermsOfDeliveryDTO } from './models/terms-of-delivery-dto';
|
||||
@@ -141,9 +142,7 @@ export { EntityDTOOfPayerDTOAndIPayer } from './models/entity-dtoof-payer-dtoand
|
||||
export { ReadOnlyEntityDTOOfPayerDTOAndIPayer } from './models/read-only-entity-dtoof-payer-dtoand-ipayer';
|
||||
export { EntityDTOContainerOfPaymentDTO } from './models/entity-dtocontainer-of-payment-dto';
|
||||
export { PaymentDTO } from './models/payment-dto';
|
||||
export { EntityDTOOfPaymentDTOAndIReadOnlyPayment } from './models/entity-dtoof-payment-dtoand-iread-only-payment';
|
||||
export { ReadOnlyEntityDTOOfPaymentDTOAndIReadOnlyPayment } from './models/read-only-entity-dtoof-payment-dtoand-iread-only-payment';
|
||||
export { PaymentStatus } from './models/payment-status';
|
||||
export { ValidationStatus } from './models/validation-status';
|
||||
export { PackagingInstructions } from './models/packaging-instructions';
|
||||
export { EntityDTOOfOrderDTOAndIOrder } from './models/entity-dtoof-order-dtoand-iorder';
|
||||
@@ -192,3 +191,19 @@ export { ReceiptListItemDTO } from './models/receipt-list-item-dto';
|
||||
export { ReceiptType } from './models/receipt-type';
|
||||
export { PaymentStatus2 } from './models/payment-status-2';
|
||||
export { ListResponseArgsOfReceiptListItemDTO } from './models/list-response-args-of-receipt-list-item-dto';
|
||||
export { ResponseArgsOfReceiptDTO } from './models/response-args-of-receipt-dto';
|
||||
export { ReceiptDTO } from './models/receipt-dto';
|
||||
export { PayerDTO2 } from './models/payer-dto2';
|
||||
export { EntityDTOContainerOfReceiptItemDTO } from './models/entity-dtocontainer-of-receipt-item-dto';
|
||||
export { ReceiptItemDTO } from './models/receipt-item-dto';
|
||||
export { EntityDTOContainerOfReceiptDTO } from './models/entity-dtocontainer-of-receipt-dto';
|
||||
export { QuantityDTO } from './models/quantity-dto';
|
||||
export { EntityDTOOfReceiptItemDTOAndIReceiptItem } from './models/entity-dtoof-receipt-item-dtoand-ireceipt-item';
|
||||
export { ReadOnlyEntityDTOOfReceiptItemDTOAndIReceiptItem } from './models/read-only-entity-dtoof-receipt-item-dtoand-ireceipt-item';
|
||||
export { ShippingAddressDTO2 } from './models/shipping-address-dto2';
|
||||
export { EntityDTOOfReceiptDTOAndIReceipt } from './models/entity-dtoof-receipt-dtoand-ireceipt';
|
||||
export { ReadOnlyEntityDTOOfReceiptDTOAndIReceipt } from './models/read-only-entity-dtoof-receipt-dtoand-ireceipt';
|
||||
export { ResponseArgsOfIEnumerableOfReceiptDTO } from './models/response-args-of-ienumerable-of-receipt-dto';
|
||||
export { ResponseArgsOfIEnumerableOfValueTupleOfLongAndReceiptTypeAndEntityDTOContainerOfReceiptDTO } from './models/response-args-of-ienumerable-of-value-tuple-of-long-and-receipt-type-and-entity-dtocontainer-of-receipt-dto';
|
||||
export { ValueTupleOfLongAndReceiptTypeAndEntityDTOContainerOfReceiptDTO } from './models/value-tuple-of-long-and-receipt-type-and-entity-dtocontainer-of-receipt-dto';
|
||||
export { ReceiptOrderItemSubsetReferenceValues } from './models/receipt-order-item-subset-reference-values';
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
/* tslint:disable */
|
||||
import { GeoLocation } from './geo-location';
|
||||
export interface AddressDTO {
|
||||
street?: string;
|
||||
apartment?: string;
|
||||
careOf?: string;
|
||||
city?: string;
|
||||
district?: string;
|
||||
info?: string;
|
||||
po?: string;
|
||||
careOf?: string;
|
||||
street?: string;
|
||||
streetNumber?: string;
|
||||
zipCode?: string;
|
||||
state?: string;
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
/* tslint:disable */
|
||||
import { GeoLocation } from './geo-location';
|
||||
export interface Address {
|
||||
region?: string;
|
||||
apartment?: string;
|
||||
careOf?: string;
|
||||
city?: string;
|
||||
district?: string;
|
||||
info?: string;
|
||||
po?: string;
|
||||
careOf?: string;
|
||||
region?: string;
|
||||
street?: string;
|
||||
streetNumber?: string;
|
||||
zipCode?: string;
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
import { PriceDTO } from './price-dto';
|
||||
import { AvailabilityType } from './availability-type';
|
||||
export interface AvailabilityDTO {
|
||||
ssc?: string;
|
||||
itemId?: number;
|
||||
supplierProductNumber?: string;
|
||||
requestReference?: string;
|
||||
ean?: string;
|
||||
shop?: number;
|
||||
@@ -12,7 +12,7 @@ export interface AvailabilityDTO {
|
||||
supplierId?: number;
|
||||
logistician?: string;
|
||||
logisticianId?: number;
|
||||
supplierProductNumber?: string;
|
||||
ssc?: string;
|
||||
sscText?: string;
|
||||
qty?: number;
|
||||
isPrebooked?: boolean;
|
||||
|
||||
@@ -4,13 +4,13 @@ import { EntityDTOContainerOfLabelDTO } from './entity-dtocontainer-of-label-dto
|
||||
import { Address } from './address';
|
||||
import { BranchType } from './branch-type';
|
||||
export interface BranchDTO extends EntityDTOOfBranchDTOAndIReadOnlyBranch {
|
||||
isOnline?: boolean;
|
||||
label?: EntityDTOContainerOfLabelDTO;
|
||||
parent?: number;
|
||||
branchNumber?: string;
|
||||
name?: string;
|
||||
shortName?: string;
|
||||
key?: string;
|
||||
parent?: number;
|
||||
isOnline?: boolean;
|
||||
isOrderingEnabled?: boolean;
|
||||
isShippingEnabled?: boolean;
|
||||
address?: Address;
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
/* tslint:disable */
|
||||
import { EntityReferenceDTO } from './entity-reference-dto';
|
||||
import { BuyerType } from './buyer-type';
|
||||
import { BuyerStatus } from './buyer-status';
|
||||
import { Gender } from './gender';
|
||||
import { BuyerType } from './buyer-type';
|
||||
import { CommunicationDetailsDTO } from './communication-details-dto';
|
||||
import { OrganisationDTO } from './organisation-dto';
|
||||
import { AddressDTO } from './address-dto';
|
||||
export interface BuyerDTO extends EntityReferenceDTO {
|
||||
title?: string;
|
||||
buyerNumber?: string;
|
||||
buyerType?: BuyerType;
|
||||
buyerStatus?: BuyerStatus;
|
||||
isGuestAccount?: boolean;
|
||||
locale?: string;
|
||||
gender?: Gender;
|
||||
buyerType?: BuyerType;
|
||||
title?: string;
|
||||
firstName?: string;
|
||||
lastName?: string;
|
||||
communicationDetails?: CommunicationDetailsDTO;
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
/* tslint:disable */
|
||||
import { EntityDTOOfDisplayOrderDTOAndIOrder } from './entity-dtoof-display-order-dtoand-iorder';
|
||||
import { DisplayAddresseeDTO } from './display-addressee-dto';
|
||||
import { OrderType } from './order-type';
|
||||
import { EnvironmentChannel } from './environment-channel';
|
||||
import { DisplayBranchDTO } from './display-branch-dto';
|
||||
import { DisplayOrderItemDTO } from './display-order-item-dto';
|
||||
import { EnvironmentChannel } from './environment-channel';
|
||||
import { DisplayAddresseeDTO } from './display-addressee-dto';
|
||||
import { DisplayLogisticianDTO } from './display-logistician-dto';
|
||||
import { DisplayOrderPaymentDTO } from './display-order-payment-dto';
|
||||
import { TermsOfDeliveryDTO } from './terms-of-delivery-dto';
|
||||
import { NotificationChannel } from './notification-channel';
|
||||
export interface DisplayOrderDTO extends EntityDTOOfDisplayOrderDTOAndIOrder {
|
||||
shippingAddress?: DisplayAddresseeDTO;
|
||||
orderType: OrderType;
|
||||
clientChannel?: EnvironmentChannel;
|
||||
orderNumber?: string;
|
||||
orderDate?: string;
|
||||
orderBranch?: DisplayBranchDTO;
|
||||
@@ -20,7 +20,7 @@ export interface DisplayOrderDTO extends EntityDTOOfDisplayOrderDTOAndIOrder {
|
||||
buyerNumber?: string;
|
||||
buyer?: DisplayAddresseeDTO;
|
||||
buyerComment?: string;
|
||||
clientChannel?: EnvironmentChannel;
|
||||
shippingAddress?: DisplayAddresseeDTO;
|
||||
targetBranch?: DisplayBranchDTO;
|
||||
logistician?: DisplayLogisticianDTO;
|
||||
payerNumber?: string;
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
/* tslint:disable */
|
||||
import { EntityDTOOfDisplayOrderItemDTOAndIOrderItem } from './entity-dtoof-display-order-item-dtoand-iorder-item';
|
||||
import { DisplayOrderDTO } from './display-order-dto';
|
||||
import { DisplayOrderItemSubsetDTO } from './display-order-item-subset-dto';
|
||||
import { ProductDTO } from './product-dto';
|
||||
import { DisplayOrderItemSubsetDTO } from './display-order-item-subset-dto';
|
||||
import { QuantityUnitType } from './quantity-unit-type';
|
||||
import { PriceDTO } from './price-dto';
|
||||
import { PromotionDTO } from './promotion-dto';
|
||||
export interface DisplayOrderItemDTO extends EntityDTOOfDisplayOrderItemDTOAndIOrderItem {
|
||||
quantity?: number;
|
||||
order?: DisplayOrderDTO;
|
||||
product?: ProductDTO;
|
||||
orderItemNumber?: string;
|
||||
orderDate?: string;
|
||||
subsetItems?: Array<DisplayOrderItemSubsetDTO>;
|
||||
buyerComment?: string;
|
||||
product?: ProductDTO;
|
||||
quantity?: number;
|
||||
quantityUnitType: QuantityUnitType;
|
||||
quantityUnit?: string;
|
||||
price?: PriceDTO;
|
||||
|
||||
@@ -3,15 +3,15 @@ import { EntityDTOOfDisplayOrderItemSubsetDTOAndIOrderItemStatus } from './entit
|
||||
import { DisplayOrderItemDTO } from './display-order-item-dto';
|
||||
import { OrderItemProcessingStatusValue } from './order-item-processing-status-value';
|
||||
export interface DisplayOrderItemSubsetDTO extends EntityDTOOfDisplayOrderItemSubsetDTOAndIOrderItemStatus {
|
||||
supplierLabel?: string;
|
||||
orderItem?: DisplayOrderItemDTO;
|
||||
orderItemSubsetNumber?: string;
|
||||
description?: string;
|
||||
quantity?: number;
|
||||
estimatedShippingDate?: string;
|
||||
ssc?: string;
|
||||
sscText?: string;
|
||||
supplierName?: string;
|
||||
orderItemSubsetNumber?: string;
|
||||
supplierLabel?: string;
|
||||
processingStatus: OrderItemProcessingStatusValue;
|
||||
processingStatusDate?: string;
|
||||
trackingNumber?: string;
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
import { EntityDTOOfDisplayOrderPaymentDTOAndIReadOnlyPayment } from './entity-dtoof-display-order-payment-dtoand-iread-only-payment';
|
||||
import { PaymentType } from './payment-type';
|
||||
export interface DisplayOrderPaymentDTO extends EntityDTOOfDisplayOrderPaymentDTOAndIReadOnlyPayment {
|
||||
shipping?: number;
|
||||
paymentActionRequired: boolean;
|
||||
paymentType: PaymentType;
|
||||
paymentNumber?: string;
|
||||
paymentComment?: string;
|
||||
total: number;
|
||||
subtotal?: number;
|
||||
paymentType: PaymentType;
|
||||
shipping?: number;
|
||||
tax?: number;
|
||||
currency?: string;
|
||||
dateOfPayment?: string;
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
/* tslint:disable */
|
||||
import { EntityDTOReferenceContainer } from './entity-dtoreference-container';
|
||||
import { ReceiptDTO } from './receipt-dto';
|
||||
export interface EntityDTOContainerOfReceiptDTO extends EntityDTOReferenceContainer {
|
||||
data?: ReceiptDTO;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
/* tslint:disable */
|
||||
import { EntityDTOReferenceContainer } from './entity-dtoreference-container';
|
||||
import { ReceiptItemDTO } from './receipt-item-dto';
|
||||
export interface EntityDTOContainerOfReceiptItemDTO extends EntityDTOReferenceContainer {
|
||||
data?: ReceiptItemDTO;
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
/* tslint:disable */
|
||||
import { ReadOnlyEntityDTOOfPaymentDTOAndIReadOnlyPayment } from './read-only-entity-dtoof-payment-dtoand-iread-only-payment';
|
||||
export interface EntityDTOOfPaymentDTOAndIReadOnlyPayment extends ReadOnlyEntityDTOOfPaymentDTOAndIReadOnlyPayment {
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
/* tslint:disable */
|
||||
import { ReadOnlyEntityDTOOfReceiptDTOAndIReceipt } from './read-only-entity-dtoof-receipt-dtoand-ireceipt';
|
||||
export interface EntityDTOOfReceiptDTOAndIReceipt extends ReadOnlyEntityDTOOfReceiptDTOAndIReceipt {
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
/* tslint:disable */
|
||||
import { ReadOnlyEntityDTOOfReceiptItemDTOAndIReceiptItem } from './read-only-entity-dtoof-receipt-item-dtoand-ireceipt-item';
|
||||
export interface EntityDTOOfReceiptItemDTOAndIReceiptItem extends ReadOnlyEntityDTOOfReceiptItemDTOAndIReceiptItem {
|
||||
}
|
||||
@@ -1,12 +1,12 @@
|
||||
/* tslint:disable */
|
||||
import { DiffDTO } from './diff-dto';
|
||||
export interface HistoryDTO {
|
||||
changed?: string;
|
||||
name?: string;
|
||||
description?: string;
|
||||
location?: string;
|
||||
id?: number;
|
||||
version?: number;
|
||||
description?: string;
|
||||
changed?: string;
|
||||
changedBy?: string;
|
||||
changeset?: number;
|
||||
historyset?: number;
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
/* tslint:disable */
|
||||
import { OrderItemProcessingStatusValue } from './order-item-processing-status-value';
|
||||
export interface KeyValueDTOOfOrderItemProcessingStatusValueAndString {
|
||||
enabled?: boolean;
|
||||
key: OrderItemProcessingStatusValue;
|
||||
value?: string;
|
||||
selected?: boolean;
|
||||
description?: string;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
/* tslint:disable */
|
||||
export interface KeyValueDTOOfStringAndString {
|
||||
enabled?: boolean;
|
||||
key?: string;
|
||||
value?: string;
|
||||
selected?: boolean;
|
||||
description?: string;
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
/* tslint:disable */
|
||||
import { EntityDTOOfOrderDTOAndIOrder } from './entity-dtoof-order-dtoand-iorder';
|
||||
import { EntityDTOContainerOfPayerDTO } from './entity-dtocontainer-of-payer-dto';
|
||||
import { OrderType } from './order-type';
|
||||
import { EnvironmentChannel } from './environment-channel';
|
||||
import { EntityDTOContainerOfBranchDTO } from './entity-dtocontainer-of-branch-dto';
|
||||
import { OrderProcessingStatus } from './order-processing-status';
|
||||
import { EntityDTOContainerOfOrderItemDTO } from './entity-dtocontainer-of-order-item-dto';
|
||||
@@ -9,7 +9,7 @@ import { BuyerDTO } from './buyer-dto';
|
||||
import { NotificationChannel } from './notification-channel';
|
||||
import { EntityDTOContainerOfShippingAddressDTO } from './entity-dtocontainer-of-shipping-address-dto';
|
||||
import { EntityDTOContainerOfLogisticianDTO } from './entity-dtocontainer-of-logistician-dto';
|
||||
import { EnvironmentChannel } from './environment-channel';
|
||||
import { EntityDTOContainerOfPayerDTO } from './entity-dtocontainer-of-payer-dto';
|
||||
import { PaymentType } from './payment-type';
|
||||
import { EntityDTOContainerOfPaymentDTO } from './entity-dtocontainer-of-payment-dto';
|
||||
import { PaymentStatus } from './payment-status';
|
||||
@@ -17,8 +17,8 @@ import { ValidationStatus } from './validation-status';
|
||||
import { TermsOfDeliveryDTO } from './terms-of-delivery-dto';
|
||||
import { PackagingInstructions } from './packaging-instructions';
|
||||
export interface OrderDTO extends EntityDTOOfOrderDTOAndIOrder {
|
||||
payer?: EntityDTOContainerOfPayerDTO;
|
||||
orderType?: OrderType;
|
||||
clientChannel?: EnvironmentChannel;
|
||||
orderNumber?: string;
|
||||
orderDate?: string;
|
||||
acceptanceDate?: string;
|
||||
@@ -32,7 +32,7 @@ export interface OrderDTO extends EntityDTOOfOrderDTOAndIOrder {
|
||||
shippingAddress?: EntityDTOContainerOfShippingAddressDTO;
|
||||
targetBranch?: EntityDTOContainerOfBranchDTO;
|
||||
logistician?: EntityDTOContainerOfLogisticianDTO;
|
||||
clientChannel?: EnvironmentChannel;
|
||||
payer?: EntityDTOContainerOfPayerDTO;
|
||||
paymentType?: PaymentType;
|
||||
paymentComment?: string;
|
||||
payment?: EntityDTOContainerOfPaymentDTO;
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
/* tslint:disable */
|
||||
import { EntityDTOOfOrderItemDTOAndIOrderItem } from './entity-dtoof-order-item-dtoand-iorder-item';
|
||||
import { QuantityUnitType } from './quantity-unit-type';
|
||||
import { EntityDTOContainerOfOrderDTO } from './entity-dtocontainer-of-order-dto';
|
||||
import { ProductDTO } from './product-dto';
|
||||
import { EntityDTOContainerOfOrderItemDTO } from './entity-dtocontainer-of-order-item-dto';
|
||||
import { OrderItemType } from './order-item-type';
|
||||
import { EntityDTOContainerOfOrderItemSubsetDTO } from './entity-dtocontainer-of-order-item-subset-dto';
|
||||
import { ProductDTO } from './product-dto';
|
||||
import { QuantityUnitType } from './quantity-unit-type';
|
||||
import { PriceDTO } from './price-dto';
|
||||
import { EntityDTOContainerOfShopItemDTO } from './entity-dtocontainer-of-shop-item-dto';
|
||||
import { PromotionDTO } from './promotion-dto';
|
||||
export interface OrderItemDTO extends EntityDTOOfOrderItemDTOAndIOrderItem {
|
||||
quantityUnitType?: QuantityUnitType;
|
||||
order?: EntityDTOContainerOfOrderDTO;
|
||||
product?: ProductDTO;
|
||||
orderItemNumber?: string;
|
||||
parent?: EntityDTOContainerOfOrderItemDTO;
|
||||
orderItemType?: OrderItemType;
|
||||
@@ -21,7 +21,7 @@ export interface OrderItemDTO extends EntityDTOOfOrderItemDTOAndIOrderItem {
|
||||
buyerComment?: string;
|
||||
invoiceText?: string;
|
||||
quantity?: number;
|
||||
product?: ProductDTO;
|
||||
quantityUnitType?: QuantityUnitType;
|
||||
quantityUnit?: string;
|
||||
grossPrice?: PriceDTO;
|
||||
unitPrice?: PriceDTO;
|
||||
|
||||
@@ -1,24 +1,29 @@
|
||||
/* tslint:disable */
|
||||
import { VATType } from './vattype';
|
||||
import { EnvironmentChannel } from './environment-channel';
|
||||
import { OrderType } from './order-type';
|
||||
import { OrderItemProcessingStatusValue } from './order-item-processing-status-value';
|
||||
import { ProductDTO } from './product-dto';
|
||||
import { VATType } from './vattype';
|
||||
import { Gender } from './gender';
|
||||
import { KeyValueDTOOfOrderItemProcessingStatusValueAndString } from './key-value-dtoof-order-item-processing-status-value-and-string';
|
||||
import { PaymentType } from './payment-type';
|
||||
import { PaymentStatus } from './payment-status';
|
||||
import { KeyValueDTOOfStringAndString } from './key-value-dtoof-string-and-string';
|
||||
export interface OrderItemListItemDTO {
|
||||
vatType?: VATType;
|
||||
orderId?: number;
|
||||
orderItemId?: number;
|
||||
orderItemSubsetId?: number;
|
||||
orderPId?: string;
|
||||
orderItemPId?: string;
|
||||
orderItemSubsetPId?: string;
|
||||
label?: string;
|
||||
labelId?: number;
|
||||
clientChannel?: EnvironmentChannel;
|
||||
shopName?: string;
|
||||
orderBranchId?: number;
|
||||
targetBranch?: string;
|
||||
targetBranchId?: number;
|
||||
orderNumber?: string;
|
||||
orderItemNumber?: string;
|
||||
orderType?: OrderType;
|
||||
processingStatus?: OrderItemProcessingStatusValue;
|
||||
processingStatusDate?: string;
|
||||
@@ -27,7 +32,7 @@ export interface OrderItemListItemDTO {
|
||||
quantity?: number;
|
||||
overallQuantity?: number;
|
||||
price?: number;
|
||||
orderItemId?: number;
|
||||
vatType?: VATType;
|
||||
currency?: string;
|
||||
buyerNumber?: string;
|
||||
organisation?: string;
|
||||
@@ -37,7 +42,6 @@ export interface OrderItemListItemDTO {
|
||||
lastName?: string;
|
||||
firstName?: string;
|
||||
specialComment?: string;
|
||||
nextProcessingStatus?: Array<KeyValueDTOOfOrderItemProcessingStatusValueAndString>;
|
||||
estimatedShippingDate?: string;
|
||||
ssc?: string;
|
||||
sscText?: string;
|
||||
@@ -47,5 +51,9 @@ export interface OrderItemListItemDTO {
|
||||
compartmentCode?: string;
|
||||
compartmentInfo?: string;
|
||||
pickUpDeadline?: string;
|
||||
paymentType?: PaymentType;
|
||||
paymentStatus?: PaymentStatus;
|
||||
paymentProcessing?: string;
|
||||
features?: {[key: string]: string};
|
||||
actions?: Array<KeyValueDTOOfStringAndString>;
|
||||
}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
/* tslint:disable */
|
||||
export type OrderItemProcessingStatusValue = 0 | 1 | 2 | 4 | 8 | 16 | 32 | 64 | 128 | 256 | 512 | 1024 | 2048 | 4096 | 8192 | 16384 | 32768 | 65536 | 131072 | 262144 | 524288 | 1048576 | 2097152 | 4194304 | 8388608 | 16777216 | 33554432 | 67108864 | 134217728;
|
||||
export type OrderItemProcessingStatusValue = 0 | 1 | 2 | 4 | 8 | 16 | 32 | 64 | 128 | 256 | 512 | 1024 | 2048 | 4096 | 8192 | 16384 | 32768 | 65536 | 131072 | 262144 | 524288 | 1048576 | 2097152 | 4194304 | 8388608 | 16777216 | 33554432 | 67108864 | 134217728 | 268435456;
|
||||
@@ -5,8 +5,8 @@ import { EntityDTOContainerOfSupplierDTO } from './entity-dtocontainer-of-suppli
|
||||
import { OrderItemProcessingStatusValue } from './order-item-processing-status-value';
|
||||
import { EntityDTOContainerOfPackageDTO } from './entity-dtocontainer-of-package-dto';
|
||||
export interface OrderItemSubsetDTO extends EntityDTOOfOrderItemSubsetDTOAndIOrderItemStatus {
|
||||
specialComment?: string;
|
||||
orderItem?: EntityDTOContainerOfOrderItemDTO;
|
||||
orderItemSubsetNumber?: string;
|
||||
supplier?: EntityDTOContainerOfSupplierDTO;
|
||||
supplierProductNumber?: string;
|
||||
orderedAtSupplier?: string;
|
||||
@@ -14,9 +14,10 @@ export interface OrderItemSubsetDTO extends EntityDTOOfOrderItemSubsetDTOAndIOrd
|
||||
estimatedShippingDate?: string;
|
||||
dateArrivedSent?: string;
|
||||
dateFetchedDelivered?: string;
|
||||
onShippingNote?: string;
|
||||
ssc?: string;
|
||||
sscText?: string;
|
||||
orderItemSubsetNumber?: string;
|
||||
specialComment?: string;
|
||||
isPrebooked?: boolean;
|
||||
processingStatus?: OrderItemProcessingStatusValue;
|
||||
processingStatusDate?: string;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/* tslint:disable */
|
||||
import { OrderProcessingStatus } from './order-processing-status';
|
||||
import { EnvironmentChannel } from './environment-channel';
|
||||
import { OrderType } from './order-type';
|
||||
import { OrderProcessingStatus } from './order-processing-status';
|
||||
import { Gender } from './gender';
|
||||
export interface OrderListItemDTO {
|
||||
processingStatus?: OrderProcessingStatus;
|
||||
clientChannel?: EnvironmentChannel;
|
||||
orderId?: number;
|
||||
orderPId?: string;
|
||||
orderBranchName?: string;
|
||||
orderBranchId?: number;
|
||||
@@ -14,7 +14,7 @@ export interface OrderListItemDTO {
|
||||
shopName?: string;
|
||||
orderNumber?: string;
|
||||
orderType?: OrderType;
|
||||
orderId?: number;
|
||||
processingStatus?: OrderProcessingStatus;
|
||||
orderDate?: string;
|
||||
organisation?: string;
|
||||
gender?: Gender;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/* tslint:disable */
|
||||
import { OrderByDTO2 } from './order-by-dto2';
|
||||
export interface OrderQueryTokenDTO {
|
||||
fuzzy?: number;
|
||||
labelKey?: string;
|
||||
branchNumber?: string;
|
||||
friendlyName?: string;
|
||||
input?: {[key: string]: string};
|
||||
ids?: Array<number>;
|
||||
branchNumber?: string;
|
||||
fuzzy?: number;
|
||||
filter?: {[key: string]: string};
|
||||
orderBy?: Array<OrderByDTO2>;
|
||||
skip?: number;
|
||||
|
||||
@@ -5,13 +5,13 @@ import { EntityDTOContainerOfLabelDTO } from './entity-dtocontainer-of-label-dto
|
||||
import { WeightOfAvoirdupois } from './weight-of-avoirdupois';
|
||||
import { AddresseeDTO } from './addressee-dto';
|
||||
export interface PackageDTO extends EntityDTOOfPackageDTOAndIPackage {
|
||||
numberOfPackages?: number;
|
||||
packageNumber?: string;
|
||||
trackingCode?: string;
|
||||
packageType?: string;
|
||||
shippingProvider?: string;
|
||||
packedAt?: string;
|
||||
packedBy?: EntityDTOContainerOfUserDTO;
|
||||
trackingCode?: string;
|
||||
numberOfPackages?: number;
|
||||
label?: EntityDTOContainerOfLabelDTO;
|
||||
weight?: WeightOfAvoirdupois;
|
||||
sender?: AddresseeDTO;
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
/* tslint:disable */
|
||||
import { EntityDTOOfPayerDTOAndIPayer } from './entity-dtoof-payer-dtoand-ipayer';
|
||||
import { PayerType } from './payer-type';
|
||||
import { PayerStatus } from './payer-status';
|
||||
import { Gender } from './gender';
|
||||
import { PayerType } from './payer-type';
|
||||
import { OrganisationDTO } from './organisation-dto';
|
||||
import { AddressDTO } from './address-dto';
|
||||
import { CommunicationDetailsDTO } from './communication-details-dto';
|
||||
export interface PayerDTO extends EntityDTOOfPayerDTOAndIPayer {
|
||||
title?: string;
|
||||
payerNumber?: string;
|
||||
payerType?: PayerType;
|
||||
payerStatus?: PayerStatus;
|
||||
locale?: string;
|
||||
gender?: Gender;
|
||||
payerType?: PayerType;
|
||||
title?: string;
|
||||
firstName?: string;
|
||||
lastName?: string;
|
||||
organisation?: OrganisationDTO;
|
||||
|
||||
23
apps/swagger/oms/src/lib/models/payer-dto2.ts
Normal file
23
apps/swagger/oms/src/lib/models/payer-dto2.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
/* tslint:disable */
|
||||
import { EntityReferenceDTO } from './entity-reference-dto';
|
||||
import { PayerType } from './payer-type';
|
||||
import { PayerStatus } from './payer-status';
|
||||
import { CommunicationDetailsDTO } from './communication-details-dto';
|
||||
import { OrganisationDTO } from './organisation-dto';
|
||||
import { AddressDTO } from './address-dto';
|
||||
import { Gender } from './gender';
|
||||
export interface PayerDTO2 extends EntityReferenceDTO {
|
||||
payerNumber?: string;
|
||||
payerType: PayerType;
|
||||
payerStatus: PayerStatus;
|
||||
paymentTerm?: string;
|
||||
communicationDetails?: CommunicationDetailsDTO;
|
||||
isTemporaryAccount: boolean;
|
||||
organisation?: OrganisationDTO;
|
||||
address?: AddressDTO;
|
||||
locale?: string;
|
||||
gender: Gender;
|
||||
title?: string;
|
||||
firstName?: string;
|
||||
lastName?: string;
|
||||
}
|
||||
@@ -1,15 +1,15 @@
|
||||
/* tslint:disable */
|
||||
import { EntityDTOOfPaymentDTOAndIReadOnlyPayment } from './entity-dtoof-payment-dtoand-iread-only-payment';
|
||||
import { ReadOnlyEntityDTOOfPaymentDTOAndIReadOnlyPayment } from './read-only-entity-dtoof-payment-dtoand-iread-only-payment';
|
||||
import { PaymentType } from './payment-type';
|
||||
export interface PaymentDTO extends EntityDTOOfPaymentDTOAndIReadOnlyPayment {
|
||||
currency?: string;
|
||||
paymentType: PaymentType;
|
||||
export interface PaymentDTO extends ReadOnlyEntityDTOOfPaymentDTOAndIReadOnlyPayment {
|
||||
paymentType?: PaymentType;
|
||||
paymentNumber?: string;
|
||||
paymentComment?: string;
|
||||
total: number;
|
||||
subtotal?: number;
|
||||
shipping?: number;
|
||||
tax?: number;
|
||||
paymentNumber?: string;
|
||||
currency?: string;
|
||||
dateOfPayment?: string;
|
||||
cancelled?: string;
|
||||
dunning1?: string;
|
||||
@@ -17,4 +17,5 @@ export interface PaymentDTO extends EntityDTOOfPaymentDTOAndIReadOnlyPayment {
|
||||
completed?: string;
|
||||
confirmed?: string;
|
||||
balance: number;
|
||||
paymentProcessing?: string;
|
||||
}
|
||||
|
||||
@@ -2,15 +2,15 @@
|
||||
import { SizeOfString } from './size-of-string';
|
||||
import { WeightOfAvoirdupois } from './weight-of-avoirdupois';
|
||||
export interface ProductDTO {
|
||||
productGroup?: string;
|
||||
name?: string;
|
||||
additionalName?: string;
|
||||
ean?: string;
|
||||
supplierProductNumber?: string;
|
||||
catalogProductNumber?: string;
|
||||
contributors?: string;
|
||||
manufacturer?: string;
|
||||
publicationDate?: string;
|
||||
additionalName?: string;
|
||||
productGroup?: string;
|
||||
edition?: string;
|
||||
volume?: string;
|
||||
serial?: string;
|
||||
|
||||
7
apps/swagger/oms/src/lib/models/quantity-dto.ts
Normal file
7
apps/swagger/oms/src/lib/models/quantity-dto.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
/* tslint:disable */
|
||||
import { QuantityUnitType } from './quantity-unit-type';
|
||||
export interface QuantityDTO {
|
||||
quantity?: number;
|
||||
quantityUnitType: QuantityUnitType;
|
||||
quantityUnit?: string;
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
/* tslint:disable */
|
||||
import { EntityDTO } from './entity-dto';
|
||||
export interface ReadOnlyEntityDTOOfReceiptDTOAndIReceipt extends EntityDTO {
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
/* tslint:disable */
|
||||
import { EntityDTO } from './entity-dto';
|
||||
export interface ReadOnlyEntityDTOOfReceiptItemDTOAndIReceiptItem extends EntityDTO {
|
||||
}
|
||||
37
apps/swagger/oms/src/lib/models/receipt-dto.ts
Normal file
37
apps/swagger/oms/src/lib/models/receipt-dto.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
/* tslint:disable */
|
||||
import { EntityDTOOfReceiptDTOAndIReceipt } from './entity-dtoof-receipt-dtoand-ireceipt';
|
||||
import { ReceiptType } from './receipt-type';
|
||||
import { EntityDTOContainerOfOrderDTO } from './entity-dtocontainer-of-order-dto';
|
||||
import { BuyerDTO } from './buyer-dto';
|
||||
import { PayerDTO2 } from './payer-dto2';
|
||||
import { EntityDTOContainerOfPaymentDTO } from './entity-dtocontainer-of-payment-dto';
|
||||
import { EntityDTOContainerOfReceiptItemDTO } from './entity-dtocontainer-of-receipt-item-dto';
|
||||
import { ValidationStatus } from './validation-status';
|
||||
import { ShippingAddressDTO2 } from './shipping-address-dto2';
|
||||
import { TypeOfDelivery } from './type-of-delivery';
|
||||
import { ShippingType } from './shipping-type';
|
||||
import { EntityDTOContainerOfLabelDTO } from './entity-dtocontainer-of-label-dto';
|
||||
import { KeyValueDTOOfStringAndString } from './key-value-dtoof-string-and-string';
|
||||
export interface ReceiptDTO extends EntityDTOOfReceiptDTOAndIReceipt {
|
||||
receiptNumber?: string;
|
||||
receiptType?: ReceiptType;
|
||||
receiptText?: string;
|
||||
printedDate?: string;
|
||||
order?: EntityDTOContainerOfOrderDTO;
|
||||
buyer?: BuyerDTO;
|
||||
payer?: PayerDTO2;
|
||||
payment?: EntityDTOContainerOfPaymentDTO;
|
||||
items?: Array<EntityDTOContainerOfReceiptItemDTO>;
|
||||
validationStatus: ValidationStatus;
|
||||
shippingAddress?: ShippingAddressDTO2;
|
||||
postage?: number;
|
||||
chargePostage?: boolean;
|
||||
postageComment?: string;
|
||||
typeOfDelivery: TypeOfDelivery;
|
||||
shippingType: ShippingType;
|
||||
agentComment?: string;
|
||||
specialAgreements?: string;
|
||||
parcelLabelPrinted?: boolean;
|
||||
label?: EntityDTOContainerOfLabelDTO;
|
||||
fileAggregation?: Array<KeyValueDTOOfStringAndString>;
|
||||
}
|
||||
46
apps/swagger/oms/src/lib/models/receipt-item-dto.ts
Normal file
46
apps/swagger/oms/src/lib/models/receipt-item-dto.ts
Normal file
@@ -0,0 +1,46 @@
|
||||
/* tslint:disable */
|
||||
import { EntityDTOOfReceiptItemDTOAndIReceiptItem } from './entity-dtoof-receipt-item-dtoand-ireceipt-item';
|
||||
import { EntityDTOContainerOfReceiptDTO } from './entity-dtocontainer-of-receipt-dto';
|
||||
import { EntityDTOContainerOfReceiptItemDTO } from './entity-dtocontainer-of-receipt-item-dto';
|
||||
import { OrderItemType } from './order-item-type';
|
||||
import { QuantityDTO } from './quantity-dto';
|
||||
import { Price } from './price';
|
||||
import { EntityDTOContainerOfBranchDTO } from './entity-dtocontainer-of-branch-dto';
|
||||
import { EntityDTOContainerOfLogisticianDTO } from './entity-dtocontainer-of-logistician-dto';
|
||||
import { ProductDTO } from './product-dto';
|
||||
import { OrderType } from './order-type';
|
||||
import { EntityDTOContainerOfSupplierDTO } from './entity-dtocontainer-of-supplier-dto';
|
||||
import { OrderItemProcessingStatusValue } from './order-item-processing-status-value';
|
||||
import { EntityDTOContainerOfPackageDTO } from './entity-dtocontainer-of-package-dto';
|
||||
import { PaymentStatus } from './payment-status';
|
||||
export interface ReceiptItemDTO extends EntityDTOOfReceiptItemDTOAndIReceiptItem {
|
||||
receipt?: EntityDTOContainerOfReceiptDTO;
|
||||
receiptItemNumber?: string;
|
||||
parent?: EntityDTOContainerOfReceiptItemDTO;
|
||||
orderItemType: OrderItemType;
|
||||
lineNumber?: number;
|
||||
buyerComment?: string;
|
||||
receiptItemText?: string;
|
||||
quantity?: QuantityDTO;
|
||||
grossPrice?: Price;
|
||||
orderBranch?: EntityDTOContainerOfBranchDTO;
|
||||
logistician?: EntityDTOContainerOfLogisticianDTO;
|
||||
targetBranch?: EntityDTOContainerOfBranchDTO;
|
||||
bonusCardNumber?: string;
|
||||
product?: ProductDTO;
|
||||
accountingIndicator?: string;
|
||||
orderType: OrderType;
|
||||
agentComment?: string;
|
||||
supplier?: EntityDTOContainerOfSupplierDTO;
|
||||
supplierReferenceNumber?: string;
|
||||
processingStatus: OrderItemProcessingStatusValue;
|
||||
proformaInvoiceItemNumber?: string;
|
||||
proformaInvoiceStatus?: number;
|
||||
trackingNumber?: string;
|
||||
package?: EntityDTOContainerOfPackageDTO;
|
||||
paymentStatus: PaymentStatus;
|
||||
referencedItem?: EntityDTOContainerOfReceiptItemDTO;
|
||||
discountedPrice?: Price;
|
||||
discountName?: string;
|
||||
discountReason?: string;
|
||||
}
|
||||
@@ -1,11 +1,11 @@
|
||||
/* tslint:disable */
|
||||
import { EntityReferenceDTO } from './entity-reference-dto';
|
||||
import { PaymentType } from './payment-type';
|
||||
import { ReceiptType } from './receipt-type';
|
||||
import { PaymentType } from './payment-type';
|
||||
import { PaymentStatus2 } from './payment-status-2';
|
||||
export interface ReceiptListItemDTO extends EntityReferenceDTO {
|
||||
paymentType?: PaymentType;
|
||||
label?: string;
|
||||
orderNumber?: string;
|
||||
receiptType?: ReceiptType;
|
||||
receiptNumber?: string;
|
||||
printedDate?: string;
|
||||
@@ -14,7 +14,7 @@ export interface ReceiptListItemDTO extends EntityReferenceDTO {
|
||||
paidTotal?: number;
|
||||
paidAt?: string;
|
||||
placeOfPayment?: string;
|
||||
orderNumber?: string;
|
||||
paymentType?: PaymentType;
|
||||
paymentStatus?: PaymentStatus2;
|
||||
statusDate?: string;
|
||||
payerNumber?: string;
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
/* tslint:disable */
|
||||
import { ReceiptType } from './receipt-type';
|
||||
export interface ReceiptOrderItemSubsetReferenceValues {
|
||||
ids?: Array<number>;
|
||||
receiptType?: ReceiptType;
|
||||
eagerLoading?: number;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
/* tslint:disable */
|
||||
import { ResponseArgs } from './response-args';
|
||||
import { ReceiptDTO } from './receipt-dto';
|
||||
export interface ResponseArgsOfIEnumerableOfReceiptDTO extends ResponseArgs {
|
||||
result?: Array<ReceiptDTO>;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
/* tslint:disable */
|
||||
import { ResponseArgs } from './response-args';
|
||||
import { ValueTupleOfLongAndReceiptTypeAndEntityDTOContainerOfReceiptDTO } from './value-tuple-of-long-and-receipt-type-and-entity-dtocontainer-of-receipt-dto';
|
||||
export interface ResponseArgsOfIEnumerableOfValueTupleOfLongAndReceiptTypeAndEntityDTOContainerOfReceiptDTO extends ResponseArgs {
|
||||
result?: Array<ValueTupleOfLongAndReceiptTypeAndEntityDTOContainerOfReceiptDTO>;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
/* tslint:disable */
|
||||
import { ResponseArgs } from './response-args';
|
||||
import { ReceiptDTO } from './receipt-dto';
|
||||
export interface ResponseArgsOfReceiptDTO extends ResponseArgs {
|
||||
result?: ReceiptDTO;
|
||||
}
|
||||
13
apps/swagger/oms/src/lib/models/shipping-address-dto2.ts
Normal file
13
apps/swagger/oms/src/lib/models/shipping-address-dto2.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
/* tslint:disable */
|
||||
import { EntityReferenceDTO } from './entity-reference-dto';
|
||||
import { PersonNamesDTO } from './person-names-dto';
|
||||
import { AddressDTO } from './address-dto';
|
||||
import { OrganisationDTO } from './organisation-dto';
|
||||
import { CommunicationDetailsDTO } from './communication-details-dto';
|
||||
export interface ShippingAddressDTO2 extends EntityReferenceDTO {
|
||||
locale?: string;
|
||||
personNames?: PersonNamesDTO;
|
||||
address?: AddressDTO;
|
||||
organisation?: OrganisationDTO;
|
||||
communicationDetails?: CommunicationDetailsDTO;
|
||||
}
|
||||
@@ -1,17 +1,17 @@
|
||||
/* tslint:disable */
|
||||
import { EntityDTOOfStockStatusCodeDTOAndIStockStatusCode } from './entity-dtoof-stock-status-code-dtoand-istock-status-code';
|
||||
import { AvailabilityType } from './availability-type';
|
||||
import { EntityDTOContainerOfSupplierDTO } from './entity-dtocontainer-of-supplier-dto';
|
||||
import { AvailabilityType } from './availability-type';
|
||||
import { StockStatusCodeTextDTO } from './stock-status-code-text-dto';
|
||||
export interface StockStatusCodeDTO extends EntityDTOOfStockStatusCodeDTOAndIStockStatusCode {
|
||||
friendlyDescription?: string;
|
||||
code?: string;
|
||||
supplier?: EntityDTOContainerOfSupplierDTO;
|
||||
availabilityInMinutes?: number;
|
||||
isPrebookable?: boolean;
|
||||
prio?: number;
|
||||
availabilityType?: AvailabilityType;
|
||||
supplierDescription?: string;
|
||||
supplier?: EntityDTOContainerOfSupplierDTO;
|
||||
friendlyDescription?: string;
|
||||
friendlyDescriptionPrebooked?: string;
|
||||
friendlyShortDescription?: string;
|
||||
friendlyShortDescriptionPrebooked?: string;
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
/* tslint:disable */
|
||||
import { ReceiptType } from './receipt-type';
|
||||
import { EntityDTOContainerOfReceiptDTO } from './entity-dtocontainer-of-receipt-dto';
|
||||
export interface ValueTupleOfLongAndReceiptTypeAndEntityDTOContainerOfReceiptDTO {
|
||||
item1: number;
|
||||
item2: ReceiptType;
|
||||
item3: EntityDTOContainerOfReceiptDTO;
|
||||
}
|
||||
@@ -9,12 +9,19 @@ import { map as __map, filter as __filter } from 'rxjs/operators';
|
||||
|
||||
import { ResponseArgsOfIEnumerableOfReceiptListItemDTO } from '../models/response-args-of-ienumerable-of-receipt-list-item-dto';
|
||||
import { ListResponseArgsOfReceiptListItemDTO } from '../models/list-response-args-of-receipt-list-item-dto';
|
||||
import { ResponseArgsOfReceiptDTO } from '../models/response-args-of-receipt-dto';
|
||||
import { ResponseArgsOfIEnumerableOfReceiptDTO } from '../models/response-args-of-ienumerable-of-receipt-dto';
|
||||
import { ResponseArgsOfIEnumerableOfValueTupleOfLongAndReceiptTypeAndEntityDTOContainerOfReceiptDTO } from '../models/response-args-of-ienumerable-of-value-tuple-of-long-and-receipt-type-and-entity-dtocontainer-of-receipt-dto';
|
||||
import { ReceiptOrderItemSubsetReferenceValues } from '../models/receipt-order-item-subset-reference-values';
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
class ReceiptService extends __BaseService {
|
||||
static readonly ReceiptReceiptsByOrderIdPath = '/receipt/order/{orderId}';
|
||||
static readonly ReceiptListReceiptsPath = '/receipt/s';
|
||||
static readonly ReceiptCreateShippingNotePath = '/receipt/shippingnote/fromorder';
|
||||
static readonly ReceiptCreateShippingNote2Path = '/receipt/shippingnote/fromitems';
|
||||
static readonly ReceiptGetReceiptsByOrderItemSubsetPath = '/order/orderitem/orderitemsubset/receipts';
|
||||
|
||||
constructor(
|
||||
config: __Configuration,
|
||||
@@ -113,6 +120,145 @@ class ReceiptService extends __BaseService {
|
||||
__map(_r => _r.body as ListResponseArgsOfReceiptListItemDTO)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param params The `ReceiptService.ReceiptCreateShippingNoteParams` containing the following parameters:
|
||||
*
|
||||
* - `orderId`:
|
||||
*
|
||||
* - `locale`:
|
||||
*
|
||||
* - `eagerLoading`:
|
||||
*/
|
||||
ReceiptCreateShippingNoteResponse(params: ReceiptService.ReceiptCreateShippingNoteParams): __Observable<__StrictHttpResponse<ResponseArgsOfReceiptDTO>> {
|
||||
let __params = this.newParams();
|
||||
let __headers = new HttpHeaders();
|
||||
let __body: any = null;
|
||||
__body = params.orderId;
|
||||
if (params.locale != null) __params = __params.set('locale', params.locale.toString());
|
||||
if (params.eagerLoading != null) __params = __params.set('eagerLoading', params.eagerLoading.toString());
|
||||
let req = new HttpRequest<any>(
|
||||
'POST',
|
||||
this.rootUrl + `/receipt/shippingnote/fromorder`,
|
||||
__body,
|
||||
{
|
||||
headers: __headers,
|
||||
params: __params,
|
||||
responseType: 'json'
|
||||
});
|
||||
|
||||
return this.http.request<any>(req).pipe(
|
||||
__filter(_r => _r instanceof HttpResponse),
|
||||
__map((_r) => {
|
||||
return _r as __StrictHttpResponse<ResponseArgsOfReceiptDTO>;
|
||||
})
|
||||
);
|
||||
}
|
||||
/**
|
||||
* @param params The `ReceiptService.ReceiptCreateShippingNoteParams` containing the following parameters:
|
||||
*
|
||||
* - `orderId`:
|
||||
*
|
||||
* - `locale`:
|
||||
*
|
||||
* - `eagerLoading`:
|
||||
*/
|
||||
ReceiptCreateShippingNote(params: ReceiptService.ReceiptCreateShippingNoteParams): __Observable<ResponseArgsOfReceiptDTO> {
|
||||
return this.ReceiptCreateShippingNoteResponse(params).pipe(
|
||||
__map(_r => _r.body as ResponseArgsOfReceiptDTO)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param params The `ReceiptService.ReceiptCreateShippingNote2Params` containing the following parameters:
|
||||
*
|
||||
* - `orderItemStatusIds`:
|
||||
*
|
||||
* - `locale`:
|
||||
*
|
||||
* - `eagerLoading`:
|
||||
*/
|
||||
ReceiptCreateShippingNote2Response(params: ReceiptService.ReceiptCreateShippingNote2Params): __Observable<__StrictHttpResponse<ResponseArgsOfIEnumerableOfReceiptDTO>> {
|
||||
let __params = this.newParams();
|
||||
let __headers = new HttpHeaders();
|
||||
let __body: any = null;
|
||||
__body = params.orderItemStatusIds;
|
||||
if (params.locale != null) __params = __params.set('locale', params.locale.toString());
|
||||
if (params.eagerLoading != null) __params = __params.set('eagerLoading', params.eagerLoading.toString());
|
||||
let req = new HttpRequest<any>(
|
||||
'POST',
|
||||
this.rootUrl + `/receipt/shippingnote/fromitems`,
|
||||
__body,
|
||||
{
|
||||
headers: __headers,
|
||||
params: __params,
|
||||
responseType: 'json'
|
||||
});
|
||||
|
||||
return this.http.request<any>(req).pipe(
|
||||
__filter(_r => _r instanceof HttpResponse),
|
||||
__map((_r) => {
|
||||
return _r as __StrictHttpResponse<ResponseArgsOfIEnumerableOfReceiptDTO>;
|
||||
})
|
||||
);
|
||||
}
|
||||
/**
|
||||
* @param params The `ReceiptService.ReceiptCreateShippingNote2Params` containing the following parameters:
|
||||
*
|
||||
* - `orderItemStatusIds`:
|
||||
*
|
||||
* - `locale`:
|
||||
*
|
||||
* - `eagerLoading`:
|
||||
*/
|
||||
ReceiptCreateShippingNote2(params: ReceiptService.ReceiptCreateShippingNote2Params): __Observable<ResponseArgsOfIEnumerableOfReceiptDTO> {
|
||||
return this.ReceiptCreateShippingNote2Response(params).pipe(
|
||||
__map(_r => _r.body as ResponseArgsOfIEnumerableOfReceiptDTO)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param params The `ReceiptService.ReceiptGetReceiptsByOrderItemSubsetParams` containing the following parameters:
|
||||
*
|
||||
* - `payload`:
|
||||
*
|
||||
* - `locale`:
|
||||
*/
|
||||
ReceiptGetReceiptsByOrderItemSubsetResponse(params: ReceiptService.ReceiptGetReceiptsByOrderItemSubsetParams): __Observable<__StrictHttpResponse<ResponseArgsOfIEnumerableOfValueTupleOfLongAndReceiptTypeAndEntityDTOContainerOfReceiptDTO>> {
|
||||
let __params = this.newParams();
|
||||
let __headers = new HttpHeaders();
|
||||
let __body: any = null;
|
||||
__body = params.payload;
|
||||
if (params.locale != null) __params = __params.set('locale', params.locale.toString());
|
||||
let req = new HttpRequest<any>(
|
||||
'POST',
|
||||
this.rootUrl + `/order/orderitem/orderitemsubset/receipts`,
|
||||
__body,
|
||||
{
|
||||
headers: __headers,
|
||||
params: __params,
|
||||
responseType: 'json'
|
||||
});
|
||||
|
||||
return this.http.request<any>(req).pipe(
|
||||
__filter(_r => _r instanceof HttpResponse),
|
||||
__map((_r) => {
|
||||
return _r as __StrictHttpResponse<ResponseArgsOfIEnumerableOfValueTupleOfLongAndReceiptTypeAndEntityDTOContainerOfReceiptDTO>;
|
||||
})
|
||||
);
|
||||
}
|
||||
/**
|
||||
* @param params The `ReceiptService.ReceiptGetReceiptsByOrderItemSubsetParams` containing the following parameters:
|
||||
*
|
||||
* - `payload`:
|
||||
*
|
||||
* - `locale`:
|
||||
*/
|
||||
ReceiptGetReceiptsByOrderItemSubset(params: ReceiptService.ReceiptGetReceiptsByOrderItemSubsetParams): __Observable<ResponseArgsOfIEnumerableOfValueTupleOfLongAndReceiptTypeAndEntityDTOContainerOfReceiptDTO> {
|
||||
return this.ReceiptGetReceiptsByOrderItemSubsetResponse(params).pipe(
|
||||
__map(_r => _r.body as ResponseArgsOfIEnumerableOfValueTupleOfLongAndReceiptTypeAndEntityDTOContainerOfReceiptDTO)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
module ReceiptService {
|
||||
@@ -133,6 +279,32 @@ module ReceiptService {
|
||||
skip?: null | number;
|
||||
quicksearch?: null | string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parameters for ReceiptCreateShippingNote
|
||||
*/
|
||||
export interface ReceiptCreateShippingNoteParams {
|
||||
orderId: number;
|
||||
locale?: null | string;
|
||||
eagerLoading?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parameters for ReceiptCreateShippingNote2
|
||||
*/
|
||||
export interface ReceiptCreateShippingNote2Params {
|
||||
orderItemStatusIds: Array<number>;
|
||||
locale?: null | string;
|
||||
eagerLoading?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parameters for ReceiptGetReceiptsByOrderItemSubset
|
||||
*/
|
||||
export interface ReceiptGetReceiptsByOrderItemSubsetParams {
|
||||
payload: ReceiptOrderItemSubsetReferenceValues;
|
||||
locale?: null | string;
|
||||
}
|
||||
}
|
||||
|
||||
export { ReceiptService }
|
||||
|
||||
@@ -90,7 +90,9 @@ export { SupplierDTO } from './models/supplier-dto';
|
||||
export { SupplierType } from './models/supplier-type';
|
||||
export { EntityDTOOfSupplierDTOAndISupplier } from './models/entity-dtoof-supplier-dtoand-isupplier';
|
||||
export { ReadOnlyEntityDTOOfSupplierDTOAndISupplier } from './models/read-only-entity-dtoof-supplier-dtoand-isupplier';
|
||||
export { EntityDTOOfShopItemDTOAndIShopItem } from './models/entity-dtoof-shop-item-dtoand-ishop-item';
|
||||
export { ShippingDTO } from './models/shipping-dto';
|
||||
export { ShippingType } from './models/shipping-type';
|
||||
export { TypeOfDelivery } from './models/type-of-delivery';
|
||||
export { ReadOnlyEntityDTOOfShopItemDTOAndIShopItem } from './models/read-only-entity-dtoof-shop-item-dtoand-ishop-item';
|
||||
export { EntityDTOContainerOfShoppingCartItemDTO } from './models/entity-dtocontainer-of-shopping-cart-item-dto';
|
||||
export { ShoppingCartItemStatus } from './models/shopping-cart-item-status';
|
||||
@@ -141,11 +143,8 @@ export { PayerStatus } from './models/payer-status';
|
||||
export { EntityDTOContainerOfCheckoutDeliveryDTO } from './models/entity-dtocontainer-of-checkout-delivery-dto';
|
||||
export { CheckoutDeliveryDTO } from './models/checkout-delivery-dto';
|
||||
export { TermsOfDeliveryDTO } from './models/terms-of-delivery-dto';
|
||||
export { TypeOfDelivery } from './models/type-of-delivery';
|
||||
export { ShippingType } from './models/shipping-type';
|
||||
export { EntityDTOContainerOfCheckoutItemDTO } from './models/entity-dtocontainer-of-checkout-item-dto';
|
||||
export { CheckoutItemDTO } from './models/checkout-item-dto';
|
||||
export { EntityDTOOfCheckoutItemDTOAndICheckoutItem } from './models/entity-dtoof-checkout-item-dtoand-icheckout-item';
|
||||
export { ReadOnlyEntityDTOOfCheckoutItemDTOAndICheckoutItem } from './models/read-only-entity-dtoof-checkout-item-dtoand-icheckout-item';
|
||||
export { DisplayItemDTO } from './models/display-item-dto';
|
||||
export { EntityDTOOfCheckoutDeliveryDTOAndICheckoutDelivery } from './models/entity-dtoof-checkout-delivery-dtoand-icheckout-delivery';
|
||||
@@ -156,20 +155,17 @@ export { PaymentDTO } from './models/payment-dto';
|
||||
export { SelectionDTOOfPaymentType } from './models/selection-dtoof-payment-type';
|
||||
export { EntityDTOContainerOfVoucherDTO } from './models/entity-dtocontainer-of-voucher-dto';
|
||||
export { VoucherDTO } from './models/voucher-dto';
|
||||
export { EntityDTOOfVoucherDTOAndIReadOnlyVoucher } from './models/entity-dtoof-voucher-dtoand-iread-only-voucher';
|
||||
export { ReadOnlyEntityDTOOfVoucherDTOAndIReadOnlyVoucher } from './models/read-only-entity-dtoof-voucher-dtoand-iread-only-voucher';
|
||||
export { EntityDTOContainerOfCouponDTO } from './models/entity-dtocontainer-of-coupon-dto';
|
||||
export { CouponDTO } from './models/coupon-dto';
|
||||
export { CouponType } from './models/coupon-type';
|
||||
export { EntityDTOOfCouponDTOAndIReadOnlyCoupon } from './models/entity-dtoof-coupon-dtoand-iread-only-coupon';
|
||||
export { ReadOnlyEntityDTOOfCouponDTOAndIReadOnlyCoupon } from './models/read-only-entity-dtoof-coupon-dtoand-iread-only-coupon';
|
||||
export { EntityDTOOfCheckoutDTOAndICheckout } from './models/entity-dtoof-checkout-dtoand-icheckout';
|
||||
export { ReadOnlyEntityDTOOfCheckoutDTOAndICheckout } from './models/read-only-entity-dtoof-checkout-dtoand-icheckout';
|
||||
export { ShippingAddressDTO } from './models/shipping-address-dto';
|
||||
export { EntityDTOOfDestinationDTOAndIDestination } from './models/entity-dtoof-destination-dtoand-idestination';
|
||||
export { ReadOnlyEntityDTOOfDestinationDTOAndIDestination } from './models/read-only-entity-dtoof-destination-dtoand-idestination';
|
||||
export { PromotionDTO } from './models/promotion-dto';
|
||||
export { EntityDTOOfShoppingCartItemDTOAndIShoppingCartItem } from './models/entity-dtoof-shopping-cart-item-dtoand-ishopping-cart-item';
|
||||
export { ReadOnlyEntityDTOOfShoppingCartItemDTOAndIShoppingCartItem } from './models/read-only-entity-dtoof-shopping-cart-item-dtoand-ishopping-cart-item';
|
||||
export { PrintRequestOfString } from './models/print-request-of-string';
|
||||
export { PrintRequestOfIEnumerableOfLong } from './models/print-request-of-ienumerable-of-long';
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user