mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-31 09:37:15 +01:00
Merged PR 351: #1087 Create & Print Lieferschein
Related work items: #1087
This commit is contained in:
@@ -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,23 @@
|
||||
</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>
|
||||
|
||||
<pre>{{ errorMessage }} hasError: {{ error }}</pre>
|
||||
</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;
|
||||
|
||||
@@ -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,7 +29,11 @@
|
||||
<div class="detail">
|
||||
<div class="name">Menge</div>
|
||||
<div class="value">
|
||||
<button class="isa-btn btn-quantity isa-text-left isa-p-0" [disabled]="!selectable" (click)="quantityDropdown.toggle()">
|
||||
<button
|
||||
class="isa-btn btn-quantity isa-text-left isa-p-0"
|
||||
[disabled]="!selectable"
|
||||
(click)="quantityDropdown.toggle()"
|
||||
>
|
||||
{{ orderItemListItem?.quantity }}x
|
||||
|
||||
<lib-icon
|
||||
@@ -38,7 +49,9 @@
|
||||
#quantityDropdown
|
||||
[value]="orderItemListItem.quantity"
|
||||
[(ngModel)]="orderItemListItem.quantity"
|
||||
(ngModelChange)="quantityChange.emit($event); quantityDropdown.close()"
|
||||
(ngModelChange)="
|
||||
quantityChange.emit($event); quantityDropdown.close()
|
||||
"
|
||||
>
|
||||
<button
|
||||
appUiDropdownItem
|
||||
@@ -79,7 +92,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>
|
||||
@@ -87,24 +102,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>
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
import { Component, ChangeDetectionStrategy, Input, Output, EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
||||
import { OrderItemListItemDTO } from '@swagger/oms';
|
||||
import {
|
||||
Component,
|
||||
ChangeDetectionStrategy,
|
||||
Input,
|
||||
Output,
|
||||
EventEmitter,
|
||||
OnChanges,
|
||||
SimpleChanges,
|
||||
} from '@angular/core';
|
||||
import { OrderItemListItemDTO, ReceiptDTO } from '@swagger/oms';
|
||||
|
||||
@Component({
|
||||
selector: 'app-shelf-order-item-details',
|
||||
@@ -10,7 +18,9 @@ import { OrderItemListItemDTO } from '@swagger/oms';
|
||||
export class ShelfOrderItemDetailsComponent implements OnChanges {
|
||||
more = false;
|
||||
|
||||
private _orderItemListItem: OrderItemListItemDTO;
|
||||
private _orderItemListItem: OrderItemListItemDTO & {
|
||||
receipts?: ReceiptDTO[];
|
||||
};
|
||||
|
||||
@Input()
|
||||
get orderItemListItem() {
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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,26 @@
|
||||
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, shareReplay, take } from 'rxjs/operators';
|
||||
import {
|
||||
ShelfOrderDetailsService,
|
||||
ShelfShippingNoteService,
|
||||
} from '../../../services';
|
||||
import { PrinterSelectionComponent } from 'apps/sales/src/app/components/printer-selection/printer-selection.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-shelf-history-header',
|
||||
@@ -13,49 +29,48 @@ 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 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.showPickUpAndPrintCta$(
|
||||
this.details$
|
||||
);
|
||||
}
|
||||
|
||||
@@ -71,7 +86,7 @@ export class ShelfHistoryHeaderComponent implements OnInit {
|
||||
{
|
||||
orderItemSubsetId: this.orderItemSubsetId,
|
||||
orderItemId: this.orderItemId,
|
||||
orderId: orderId,
|
||||
orderId,
|
||||
},
|
||||
],
|
||||
estimatedShippingDate: date,
|
||||
@@ -88,7 +103,7 @@ export class ShelfHistoryHeaderComponent implements OnInit {
|
||||
{
|
||||
orderItemSubsetId: this.orderItemSubsetId,
|
||||
orderItemId: this.orderItemId,
|
||||
orderId: orderId,
|
||||
orderId,
|
||||
},
|
||||
],
|
||||
pickUpDeadline: date,
|
||||
@@ -97,7 +112,9 @@ export class ShelfHistoryHeaderComponent implements OnInit {
|
||||
this.updateHistory();
|
||||
}
|
||||
|
||||
async changeProcessingStatus(processingStatus: OrderItemProcessingStatusValue) {
|
||||
async changeProcessingStatus(
|
||||
processingStatus: OrderItemProcessingStatusValue
|
||||
) {
|
||||
const orderId = await this.getOrderId();
|
||||
|
||||
await this.detailsFacade.changeStatus([
|
||||
@@ -111,14 +128,62 @@ export class ShelfHistoryHeaderComponent implements OnInit {
|
||||
},
|
||||
]);
|
||||
|
||||
if (await this.shouldCreateShippingNote(processingStatus)) {
|
||||
let createdReceipts: ReceiptDTO[] = [];
|
||||
|
||||
const order = await this.details$.pipe(take(1)).toPromise();
|
||||
|
||||
if (!this.shippingNoteExists(order)) {
|
||||
createdReceipts = await this.shippingNoteService.create(
|
||||
[this.orderItemSubsetId],
|
||||
{
|
||||
printerComponent: this.printerSelectionComponent,
|
||||
}
|
||||
);
|
||||
}
|
||||
if (createdReceipts.length) {
|
||||
const receiptIds = createdReceipts.map((receipt) => receipt.id);
|
||||
await this.shippingNoteService.print(receiptIds, {
|
||||
printerComponent: this.printerSelectionComponent,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
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 shippingNoteExists(
|
||||
order: OrderDetailsCardInput & {
|
||||
receipts?: ReceiptDTO[];
|
||||
}
|
||||
): boolean {
|
||||
console.log({ receipts: order.receipts, order });
|
||||
return (
|
||||
Array.isArray(order.receipts) &&
|
||||
order.receipts.some((receipt) => receipt.receiptType === 1)
|
||||
);
|
||||
}
|
||||
|
||||
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 {}
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
</div>
|
||||
<app-shelf-order-details-card
|
||||
[orderDetails]="orderDetailsCard$ | async"
|
||||
[showCreateShippingNote]="showPickUpAndPrintCta$ | async"
|
||||
(changeEstimatedDeliveryDate)="changeEstimatedShippingDate($event)"
|
||||
(changeProcessingStatus)="changeProcessingStatus($event)"
|
||||
(changePickUpDeadline)="changePickupDeadline($event)"
|
||||
@@ -130,10 +131,27 @@
|
||||
></app-shelf-order-details-shelf-tags>
|
||||
</div>
|
||||
|
||||
<div class="cta-sticky isa-my-28 isa-text-center">
|
||||
<div
|
||||
class="cta-sticky isa-my-28 isa-text-center"
|
||||
*ngIf="orderItems$ | async as items"
|
||||
>
|
||||
<button
|
||||
*ngIf="showReprintShippingNoteCta$ | async"
|
||||
type="button"
|
||||
class="isa-btn isa-btn-secondary isa-btn-outline-primary isa-btn-pill isa-btn-xl isa-mr-30"
|
||||
[disabled]="statusChangeInProgress$ | async"
|
||||
(click)="printShippingNotes(items)"
|
||||
>
|
||||
<span>Lieferschein erneut drucken</span>
|
||||
|
||||
<div
|
||||
class="spinner isa-btn-loader"
|
||||
*ngIf="statusChangeInProgress$ | async"
|
||||
></div>
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="isa-btn isa-btn-primary isa-btn-pill isa-btn-xl"
|
||||
class="isa-btn isa-btn-secondary isa-btn-outline-primary isa-btn-pill isa-btn-xl"
|
||||
[disabled]="
|
||||
shelfDetailsTag.selected === shelfDetailsTag.customValue.value &&
|
||||
shelfDetailsTag.customValue.invalid
|
||||
@@ -167,6 +185,19 @@
|
||||
>
|
||||
abgeholt
|
||||
</button>
|
||||
<button
|
||||
*ngIf="showPickUpAndPrintCta$ | async"
|
||||
type="button"
|
||||
class="isa-btn isa-btn-primary isa-btn-pill isa-btn-xl"
|
||||
(click)="changeProcessingStatus(256, { createShippingNote: true })"
|
||||
[disabled]="statusChangeInProgress$ | async"
|
||||
>
|
||||
<span>abgeholt und Lieferschein drucken</span>
|
||||
<div
|
||||
class="spinner isa-btn-loader"
|
||||
*ngIf="statusChangeInProgress$ | async"
|
||||
></div>
|
||||
</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
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
left: 0;
|
||||
right: 0;
|
||||
position: fixed;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.cta-spacer {
|
||||
|
||||
@@ -1,20 +1,34 @@
|
||||
import { ChangeDetectionStrategy, Component, ViewChild } 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,
|
||||
take,
|
||||
takeUntil,
|
||||
withLatestFrom,
|
||||
} from 'rxjs/operators';
|
||||
import {
|
||||
OrderItemProcessingStatusValue,
|
||||
OrderItemListItemDTO,
|
||||
StatusValues,
|
||||
ResponseArgsOfValueTupleOfOrderItemSubsetDTOAndOrderItemSubsetDTO,
|
||||
ReceiptDTO,
|
||||
} from '@swagger/oms';
|
||||
import { ShelfNavigationService } from '../../shared/services';
|
||||
import { race, combineLatest } from 'rxjs';
|
||||
import { race, BehaviorSubject } from 'rxjs';
|
||||
import { AppService } from '@sales/core-services';
|
||||
import { OMSPrintService, PrintService } from '@swagger/print';
|
||||
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 {
|
||||
ShelfOrderDetailsService,
|
||||
ShelfShippingNoteService,
|
||||
} from '../../services';
|
||||
|
||||
@Component({
|
||||
selector: 'app-shelf-order-details',
|
||||
@@ -29,7 +43,9 @@ export class ShelfOrderDetailsComponent {
|
||||
})
|
||||
printerSlectionComponent: PrinterSelectionComponent;
|
||||
|
||||
processingStatus$ = this.activatedRoute.params.pipe(map((params) => params['processingStatus']));
|
||||
processingStatus$ = this.activatedRoute.params.pipe(
|
||||
map((params) => params['processingStatus'])
|
||||
);
|
||||
|
||||
partialPickup = false;
|
||||
|
||||
@@ -37,6 +53,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 +70,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,56 +96,46 @@ 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)
|
||||
showArrivedAndPrintCta$ = this.orderDetailsService.showArrivedAndPrintCta$(
|
||||
this.orderDetailsCard$
|
||||
);
|
||||
|
||||
showArrivedCta$ = this.orderDetailsCard$.pipe(map((details) => details.processingStatus === 256)); // wenn abgeholt(=256)
|
||||
|
||||
showPickUpCta$ = this.orderDetailsCard$.pipe(
|
||||
map((details) => details.processingStatus === 128) // wenn eingetroffen(=128)
|
||||
showArrivedCta$ = this.orderDetailsService.showArrivedCta$(
|
||||
this.orderDetailsCard$
|
||||
);
|
||||
|
||||
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
|
||||
showReprintShippingNoteCta$ = this.orderDetailsService.showReprintShippingNoteCta$(
|
||||
this.orderDetailsCard$
|
||||
);
|
||||
|
||||
showBackToStoreCta$ = this.orderDetailsCard$.pipe(
|
||||
map((details) => details.processingStatus === 1024 || details.processingStatus === 512)
|
||||
showBackToStoreCta$ = this.orderDetailsService.showBackToStoreCta$(
|
||||
this.orderDetailsCard$
|
||||
);
|
||||
|
||||
showAddToRemissionListCta$ = this.orderDetailsCard$.pipe(
|
||||
map((details) => details.processingStatus === 1024 || details.processingStatus === 512)
|
||||
showAddToRemissionListCta$ = this.orderDetailsService.showAddToRemissionListCta$(
|
||||
this.orderDetailsCard$
|
||||
);
|
||||
|
||||
showReOrderCta$ = this.orderDetailsCard$.pipe(
|
||||
map((details) => details.processingStatus === 2048 && !ProcessingStatusNameMap.get(8192).disabled)
|
||||
showReOrderCta$ = this.orderDetailsService.showReOrderCta$(
|
||||
this.orderDetailsCard$
|
||||
);
|
||||
|
||||
showPickUpCta$ = this.orderDetailsService.showPickUpCta$(
|
||||
this.orderDetailsCard$
|
||||
);
|
||||
|
||||
showPickUpPartialCollectCta$ = this.orderDetailsService.showPickUpPartialCollectCta$(
|
||||
this.orderDetailsCard$,
|
||||
this.orderItems$,
|
||||
this.partialPickup
|
||||
);
|
||||
|
||||
showPickUpAndPrintCta$ = this.orderDetailsService.showPickUpAndPrintCta$(
|
||||
this.orderDetailsCard$
|
||||
);
|
||||
|
||||
constructor(
|
||||
@@ -125,8 +143,10 @@ export class ShelfOrderDetailsComponent {
|
||||
private detailsFacade: DetailsFacade,
|
||||
private shelfNavigationService: ShelfNavigationService,
|
||||
private omsPrintService: OMSPrintService,
|
||||
private shippingNoteService: ShelfShippingNoteService,
|
||||
private printerService: PrintService,
|
||||
private appService: AppService
|
||||
private appService: AppService,
|
||||
private orderDetailsService: ShelfOrderDetailsService
|
||||
) {}
|
||||
|
||||
selectOrderItem(orderItem: OrderItemListItemDTO, value: boolean) {
|
||||
@@ -149,20 +169,43 @@ export class ShelfOrderDetailsComponent {
|
||||
});
|
||||
}
|
||||
|
||||
async changeProcessingStatus(status: OrderItemProcessingStatusValue, data: { compartmentInfo?: string; shouldPrint?: boolean } = {}) {
|
||||
async changeProcessingStatus(
|
||||
status: OrderItemProcessingStatusValue,
|
||||
data: {
|
||||
compartmentInfo?: string;
|
||||
shouldPrint?: boolean;
|
||||
createShippingNote?: boolean;
|
||||
} = {}
|
||||
) {
|
||||
const shouldCreateShippingNote =
|
||||
(await this.showPickUpAndPrintCta$.pipe(take(1)).toPromise()) ||
|
||||
data.createShippingNote;
|
||||
|
||||
let 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);
|
||||
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));
|
||||
items = items.filter(({ orderItemId }) =>
|
||||
this.selectedForPartialPickup.has(orderItemId)
|
||||
);
|
||||
}
|
||||
results = await this.detailsFacade.pickedUp(
|
||||
items,
|
||||
this.quantityForPartialPickup
|
||||
);
|
||||
|
||||
if (shouldCreateShippingNote) {
|
||||
this.printShippingNotes(items);
|
||||
}
|
||||
results = await this.detailsFacade.pickedUp(items, this.quantityForPartialPickup);
|
||||
} else if (status === 262144) {
|
||||
results = await this.detailsFacade.backToStock(items);
|
||||
} else if (status === 8192) {
|
||||
@@ -170,18 +213,24 @@ export class ShelfOrderDetailsComponent {
|
||||
} else if (status === 128) {
|
||||
results = await this.detailsFacade.arrived(items, data.compartmentInfo);
|
||||
if (data.shouldPrint) {
|
||||
await this.printAbholfachetikett(items.map(({ orderItemSubsetId }) => orderItemSubsetId));
|
||||
await this.printAbholfachetikett(
|
||||
items.map(({ orderItemSubsetId }) => orderItemSubsetId)
|
||||
);
|
||||
}
|
||||
} else {
|
||||
const payloads = items.map(({ orderId, orderItemId, orderItemSubsetId }) => ({
|
||||
orderId,
|
||||
orderItemId,
|
||||
orderItemSubsetId,
|
||||
data: { processingStatus: status } as StatusValues,
|
||||
}));
|
||||
const payloads = items.map(
|
||||
({ orderId, orderItemId, orderItemSubsetId }) => ({
|
||||
orderId,
|
||||
orderItemId,
|
||||
orderItemSubsetId,
|
||||
data: { processingStatus: status } as StatusValues,
|
||||
})
|
||||
);
|
||||
results = await this.detailsFacade.changeStatus(payloads);
|
||||
}
|
||||
|
||||
this.statusChangeInProgress$.next(false);
|
||||
|
||||
this.partialPickup = false;
|
||||
this.selectedForPartialPickup.clear();
|
||||
this.quantityForPartialPickup.clear();
|
||||
@@ -204,6 +253,49 @@ export class ShelfOrderDetailsComponent {
|
||||
}
|
||||
}
|
||||
|
||||
async printShippingNotes(
|
||||
items: (OrderItemListItemDTO & {
|
||||
receipts?: ReceiptDTO[];
|
||||
})[]
|
||||
) {
|
||||
this.statusChangeInProgress$.next(true);
|
||||
const subSetIdsForWhichToCreateShippingNotes = this.getSubsetIdsForWhichToCreateShippingNotes(
|
||||
items
|
||||
);
|
||||
|
||||
let createdReceipts: ReceiptDTO[] = [];
|
||||
if (subSetIdsForWhichToCreateShippingNotes.length) {
|
||||
createdReceipts = await this.shippingNoteService.create(
|
||||
subSetIdsForWhichToCreateShippingNotes,
|
||||
{
|
||||
printerComponent: this.printerSlectionComponent,
|
||||
statusObs$: this.statusChangeInProgress$,
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
const existingPaymentReceipts = items.reduce(
|
||||
(acc, curr) => [
|
||||
...acc,
|
||||
...(curr.receipts || []).filter((receipt) => receipt.receiptType === 1),
|
||||
],
|
||||
[]
|
||||
);
|
||||
|
||||
const receiptIds = [
|
||||
...existingPaymentReceipts.map((receipt) => receipt.id),
|
||||
...createdReceipts.map((receipt) => receipt.id),
|
||||
];
|
||||
|
||||
if (receiptIds.length) {
|
||||
await this.shippingNoteService.print(receiptIds, {
|
||||
printerComponent: this.printerSlectionComponent,
|
||||
});
|
||||
}
|
||||
|
||||
this.statusChangeInProgress$.next(false);
|
||||
}
|
||||
|
||||
changeEstimatedShippingDate(estimatedShippingDate: Date | string) {
|
||||
this.orderItems$.pipe(first()).subscribe((items) => {
|
||||
this.detailsFacade.setEstimatedShippingDate({
|
||||
@@ -233,7 +325,9 @@ export class ShelfOrderDetailsComponent {
|
||||
|
||||
if (this.appService.isIPadEnv()) {
|
||||
this.printerSlectionComponent.openDialog();
|
||||
printer = await this.printerSlectionComponent.print.pipe(takeUntil(this.printerSlectionComponent.closed), take(1)).toPromise();
|
||||
printer = await this.printerSlectionComponent.print
|
||||
.pipe(takeUntil(this.printerSlectionComponent.closed), take(1))
|
||||
.toPromise();
|
||||
this.printerSlectionComponent.closeModal();
|
||||
}
|
||||
|
||||
@@ -259,6 +353,18 @@ export class ShelfOrderDetailsComponent {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
getSubsetIdsForWhichToCreateShippingNotes(
|
||||
items: (OrderItemListItemDTO & {
|
||||
receipts?: ReceiptDTO[];
|
||||
})[]
|
||||
): number[] {
|
||||
return items
|
||||
.filter(
|
||||
(item) => !this.shippingNoteService.hasShippingNote(item.receipts)
|
||||
)
|
||||
.map((result) => result.orderItemSubsetId);
|
||||
}
|
||||
|
||||
activatePartialPickup() {
|
||||
this.partialPickup = true;
|
||||
}
|
||||
@@ -266,7 +372,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$),
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -5,11 +5,12 @@ 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 './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,7 @@ 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';
|
||||
|
||||
@NgModule({
|
||||
imports: [CommonModule],
|
||||
@@ -33,6 +34,7 @@ import { SscToSscTextPipe } from './ssc-text.pipe';
|
||||
ProcessingStatusOptionsKeyValuePipe,
|
||||
TitlePipe,
|
||||
SscToSscTextPipe,
|
||||
ReceiptsToPaymentReceiptsPipe,
|
||||
],
|
||||
declarations: [
|
||||
VatTypeToDisplayNamePipe,
|
||||
@@ -48,6 +50,7 @@ import { SscToSscTextPipe } from './ssc-text.pipe';
|
||||
ProcessingStatusOptionsKeyValuePipe,
|
||||
TitlePipe,
|
||||
SscToSscTextPipe,
|
||||
ReceiptsToPaymentReceiptsPipe,
|
||||
],
|
||||
})
|
||||
export class ShelfPipesModule {}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// 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';
|
||||
// end:ng42.barrel
|
||||
|
||||
@@ -0,0 +1,195 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { OrderItemListItemDTO, ReceiptDTO } from '@swagger/oms';
|
||||
import { combineLatest, Observable } from 'rxjs';
|
||||
import { filter, map, withLatestFrom } from 'rxjs/operators';
|
||||
import { OrderDetailsCardInput } from '../components/order-details-card';
|
||||
import { ProcessingStatusNameMap } from '../constants';
|
||||
import { ShelfShippingNoteService } from './shelf-shipping-note.service';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class ShelfOrderDetailsService {
|
||||
constructor(private shippingNoteService: ShelfShippingNoteService) {}
|
||||
|
||||
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)
|
||||
);
|
||||
}
|
||||
|
||||
showArrivedAndPrintCta$(
|
||||
orderDetailsCard$: Observable<OrderDetailsCardInput>
|
||||
): Observable<boolean> {
|
||||
return orderDetailsCard$.pipe(
|
||||
map(
|
||||
(details) =>
|
||||
details.processingStatus === 16 || details.processingStatus === 8192
|
||||
) // wenn bestellt(=16) oder nachbestellt(=8192)
|
||||
);
|
||||
}
|
||||
|
||||
showArrivedCta$(
|
||||
orderDetailsCard$: Observable<OrderDetailsCardInput>
|
||||
): Observable<boolean> {
|
||||
return orderDetailsCard$.pipe(
|
||||
map((details) => details.processingStatus === 256)
|
||||
); // wenn abgeholt(=256)
|
||||
}
|
||||
|
||||
showReprintShippingNoteCta$(
|
||||
orderDetailsCard$: Observable<OrderDetailsCardInput>
|
||||
): Observable<boolean> {
|
||||
return this.hasExistingShippingNote$(orderDetailsCard$); // wenn abgeholt(=256)
|
||||
}
|
||||
|
||||
showBackToStoreCta$(
|
||||
orderDetailsCard$: Observable<OrderDetailsCardInput>
|
||||
): Observable<boolean> {
|
||||
return orderDetailsCard$.pipe(
|
||||
map(
|
||||
(details) =>
|
||||
details.processingStatus === 1024 || details.processingStatus === 512
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
showAddToRemissionListCta$(
|
||||
orderDetailsCard$: Observable<OrderDetailsCardInput>
|
||||
): Observable<boolean> {
|
||||
return orderDetailsCard$.pipe(
|
||||
map(
|
||||
(details) =>
|
||||
details.processingStatus === 1024 || details.processingStatus === 512
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
showReOrderCta$(
|
||||
orderDetailsCard$: Observable<OrderDetailsCardInput>
|
||||
): Observable<boolean> {
|
||||
return orderDetailsCard$.pipe(
|
||||
map(
|
||||
(details) =>
|
||||
details.processingStatus === 2048 &&
|
||||
!ProcessingStatusNameMap.get(8192).disabled
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
private showPartialPickUp$(
|
||||
orderDetailsCard$: Observable<OrderDetailsCardInput>,
|
||||
orderItems$: Observable<
|
||||
(OrderItemListItemDTO & {
|
||||
receipts?: ReceiptDTO[];
|
||||
})[]
|
||||
>,
|
||||
partialPickup: boolean
|
||||
): Observable<boolean> {
|
||||
return combineLatest([orderDetailsCard$, orderItems$]).pipe(
|
||||
map(([details, items]) => {
|
||||
return (
|
||||
details.processingStatus === 128 &&
|
||||
(items.length > 1 || items.some((i) => i.quantity > 1)) &&
|
||||
partialPickup
|
||||
);
|
||||
}) // wenn eingetroffen(=128) und mehr als 1 Artikel
|
||||
);
|
||||
}
|
||||
|
||||
showPickUpCta$(
|
||||
orderDetailsCard$: Observable<OrderDetailsCardInput>
|
||||
): Observable<boolean> {
|
||||
return this.showPickUp$(orderDetailsCard$).pipe(
|
||||
withLatestFrom(this.isPaid$(orderDetailsCard$)),
|
||||
map(([showPickUp, isPaid]) => !!showPickUp && !isPaid)
|
||||
);
|
||||
}
|
||||
|
||||
showPickUpPartialCollectCta$(
|
||||
orderDetailsCard$: Observable<OrderDetailsCardInput>,
|
||||
orderItems$: Observable<
|
||||
(OrderItemListItemDTO & {
|
||||
receipts?: ReceiptDTO[];
|
||||
})[]
|
||||
>,
|
||||
partialPickup: boolean
|
||||
): Observable<boolean> {
|
||||
return this.showPartialPickUp$(
|
||||
orderDetailsCard$,
|
||||
orderItems$,
|
||||
partialPickup
|
||||
).pipe(
|
||||
map((showPartialPickUp) => !!showPartialPickUp) //
|
||||
);
|
||||
}
|
||||
|
||||
showPickUpAndPrintCta$(
|
||||
orderDetailsCard$: Observable<OrderDetailsCardInput>
|
||||
): Observable<boolean> {
|
||||
return this.showPickUp$(orderDetailsCard$).pipe(
|
||||
withLatestFrom(this.isPaid$(orderDetailsCard$)),
|
||||
map(([showPickUp, isPaid]) => !!showPickUp && !!isPaid)
|
||||
);
|
||||
}
|
||||
|
||||
private isPaid$(
|
||||
orderDetailsCard$: Observable<OrderDetailsCardInput>
|
||||
): Observable<boolean> {
|
||||
return orderDetailsCard$.pipe(
|
||||
map((details) => !!details.features && !!details.features['paid'])
|
||||
);
|
||||
}
|
||||
|
||||
private showPickUp$(
|
||||
orderDetailsCard$: Observable<OrderDetailsCardInput>
|
||||
): Observable<boolean> {
|
||||
return orderDetailsCard$.pipe(
|
||||
map((details) => details.processingStatus === 128) // wenn eingetroffen(=128)
|
||||
);
|
||||
}
|
||||
|
||||
private hasExistingShippingNote$(
|
||||
orderDetailsCard$: Observable<OrderDetailsCardInput>
|
||||
): Observable<boolean> {
|
||||
return orderDetailsCard$.pipe(
|
||||
map((orderDetails) =>
|
||||
this.shippingNoteService.hasShippingNote(orderDetails.receipts)
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { 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 async create(
|
||||
orderItemStatusIds: number[],
|
||||
config: {
|
||||
printerComponent: PrinterSelectionComponent;
|
||||
statusObs$?: BehaviorSubject<boolean>;
|
||||
}
|
||||
): Promise<ReceiptDTO[]> {
|
||||
return this.handleRequest(
|
||||
this.receiptService.ReceiptCreateShippingNote2({
|
||||
orderItemStatusIds,
|
||||
}),
|
||||
config.statusObs$
|
||||
);
|
||||
}
|
||||
|
||||
public async print(
|
||||
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
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public hasShippingNote(receipts: ReceiptDTO[]): boolean {
|
||||
if (!Array.isArray(receipts)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return receipts.some((receipt) => receipt.receiptType === 1);
|
||||
}
|
||||
|
||||
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 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();
|
||||
}
|
||||
}
|
||||
@@ -4,11 +4,17 @@ import {
|
||||
ListResponseArgsOfOrderItemListItemDTO,
|
||||
OrderItemListItemDTO,
|
||||
ResponseArgsOfOrderItemSubsetDTO,
|
||||
ResponseArgsOfIEnumerableOfValueTupleOfLongAndReceiptTypeAndEntityDTOContainerOfReceiptDTO,
|
||||
ReceiptDTO,
|
||||
ReceiptType,
|
||||
} 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,32 @@ 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 }>()
|
||||
);
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
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', () => {
|
||||
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,19 @@
|
||||
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,
|
||||
} from '@swagger/oms';
|
||||
import { of, NEVER } from 'rxjs';
|
||||
import { SearchStateFacade } from '../search';
|
||||
|
||||
@Injectable()
|
||||
@@ -13,6 +22,7 @@ export class DetailsEffects implements OnInitEffects {
|
||||
private actions$: Actions,
|
||||
private abholfachService: AbholfachService,
|
||||
private orderService: OrderService,
|
||||
private receiptService: ReceiptService,
|
||||
private searchStateFacade: SearchStateFacade
|
||||
) {}
|
||||
|
||||
@@ -27,7 +37,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 +60,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 +82,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 +104,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 +129,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),
|
||||
|
||||
@@ -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,7 @@ export class DetailsFacade {
|
||||
);
|
||||
}
|
||||
|
||||
setEstimatedShippingDate({
|
||||
async setEstimatedShippingDate({
|
||||
items,
|
||||
estimatedShippingDate,
|
||||
}: {
|
||||
@@ -234,19 +275,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 +315,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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,8 @@ 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 { 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';
|
||||
@@ -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,28 @@
|
||||
/* 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 { 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 +31,7 @@ export interface OrderItemListItemDTO {
|
||||
quantity?: number;
|
||||
overallQuantity?: number;
|
||||
price?: number;
|
||||
orderItemId?: number;
|
||||
vatType?: VATType;
|
||||
currency?: string;
|
||||
buyerNumber?: string;
|
||||
organisation?: string;
|
||||
@@ -37,7 +41,6 @@ export interface OrderItemListItemDTO {
|
||||
lastName?: string;
|
||||
firstName?: string;
|
||||
specialComment?: string;
|
||||
nextProcessingStatus?: Array<KeyValueDTOOfOrderItemProcessingStatusValueAndString>;
|
||||
estimatedShippingDate?: string;
|
||||
ssc?: string;
|
||||
sscText?: string;
|
||||
@@ -47,5 +50,8 @@ export interface OrderItemListItemDTO {
|
||||
compartmentCode?: string;
|
||||
compartmentInfo?: string;
|
||||
pickUpDeadline?: string;
|
||||
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';
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -4,14 +4,14 @@ import { PriceDTO } from './price-dto';
|
||||
import { EntityDTOContainerOfShopItemDTO } from './entity-dtocontainer-of-shop-item-dto';
|
||||
import { EntityDTOContainerOfSupplierDTO } from './entity-dtocontainer-of-supplier-dto';
|
||||
export interface AvailabilityDTO2 {
|
||||
supplierSSCText?: string;
|
||||
availabilityType: AvailabilityType;
|
||||
inStock?: number;
|
||||
ssc?: string;
|
||||
sscText?: string;
|
||||
supplierInfo?: string;
|
||||
isPrebooked?: boolean;
|
||||
supplierSSC?: string;
|
||||
inStock?: number;
|
||||
supplierSSCText?: string;
|
||||
price?: PriceDTO;
|
||||
estimatedShippingDate?: string;
|
||||
shopItem?: EntityDTOContainerOfShopItemDTO;
|
||||
|
||||
@@ -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,18 +1,18 @@
|
||||
/* tslint:disable */
|
||||
import { EntityReferenceDTO } from './entity-reference-dto';
|
||||
import { Gender } from './gender';
|
||||
import { BuyerType } from './buyer-type';
|
||||
import { Gender } from './gender';
|
||||
import { CommunicationDetailsDTO } from './communication-details-dto';
|
||||
import { OrganisationDTO } from './organisation-dto';
|
||||
import { AddressDTO } from './address-dto';
|
||||
export interface BuyerDTO extends EntityReferenceDTO {
|
||||
firstName?: string;
|
||||
buyerNumber?: string;
|
||||
buyerType: BuyerType;
|
||||
isTemporaryAccount?: boolean;
|
||||
locale?: string;
|
||||
gender: Gender;
|
||||
title?: string;
|
||||
buyerType: BuyerType;
|
||||
firstName?: string;
|
||||
lastName?: string;
|
||||
dateOfBirth?: string;
|
||||
communicationDetails?: CommunicationDetailsDTO;
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
/* tslint:disable */
|
||||
import { EntityDTOOfCheckoutDTOAndICheckout } from './entity-dtoof-checkout-dtoand-icheckout';
|
||||
import { EntityDTOContainerOfCheckoutItemDTO } from './entity-dtocontainer-of-checkout-item-dto';
|
||||
import { ReadOnlyEntityDTOOfCheckoutDTOAndICheckout } from './read-only-entity-dtoof-checkout-dtoand-icheckout';
|
||||
import { EntityDTOContainerOfBranchDTO } from './entity-dtocontainer-of-branch-dto';
|
||||
import { UserAccountDTO } from './user-account-dto';
|
||||
import { BuyerDTO } from './buyer-dto';
|
||||
import { PayerDTO } from './payer-dto';
|
||||
import { EntityDTOContainerOfDestinationDTO } from './entity-dtocontainer-of-destination-dto';
|
||||
import { EntityDTOContainerOfCheckoutDeliveryDTO } from './entity-dtocontainer-of-checkout-delivery-dto';
|
||||
import { EntityDTOContainerOfBranchDTO } from './entity-dtocontainer-of-branch-dto';
|
||||
import { EntityDTOContainerOfCheckoutItemDTO } from './entity-dtocontainer-of-checkout-item-dto';
|
||||
import { NotificationChannel } from './notification-channel';
|
||||
import { SelectionDTOOfShippingTarget } from './selection-dtoof-shipping-target';
|
||||
import { PaymentDTO } from './payment-dto';
|
||||
export interface CheckoutDTO extends EntityDTOOfCheckoutDTOAndICheckout {
|
||||
items?: Array<EntityDTOContainerOfCheckoutItemDTO>;
|
||||
export interface CheckoutDTO extends ReadOnlyEntityDTOOfCheckoutDTOAndICheckout {
|
||||
label?: string;
|
||||
orderBranch?: EntityDTOContainerOfBranchDTO;
|
||||
userAccount?: UserAccountDTO;
|
||||
buyer?: BuyerDTO;
|
||||
payer?: PayerDTO;
|
||||
destinations?: Array<EntityDTOContainerOfDestinationDTO>;
|
||||
deliveries?: Array<EntityDTOContainerOfCheckoutDeliveryDTO>;
|
||||
orderBranch?: EntityDTOContainerOfBranchDTO;
|
||||
items?: Array<EntityDTOContainerOfCheckoutItemDTO>;
|
||||
notificationChannels: NotificationChannel;
|
||||
availableShippingTargets?: Array<SelectionDTOOfShippingTarget>;
|
||||
payment?: PaymentDTO;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
/* tslint:disable */
|
||||
import { EntityDTOOfCheckoutItemDTOAndICheckoutItem } from './entity-dtoof-checkout-item-dtoand-icheckout-item';
|
||||
import { ReadOnlyEntityDTOOfCheckoutItemDTOAndICheckoutItem } from './read-only-entity-dtoof-checkout-item-dtoand-icheckout-item';
|
||||
import { EntityDTOContainerOfCheckoutDTO } from './entity-dtocontainer-of-checkout-dto';
|
||||
import { EntityDTOContainerOfShoppingCartItemDTO } from './entity-dtocontainer-of-shopping-cart-item-dto';
|
||||
import { EntityDTOContainerOfCheckoutDeliveryDTO } from './entity-dtocontainer-of-checkout-delivery-dto';
|
||||
import { PriceValueDTO } from './price-value-dto';
|
||||
export interface CheckoutItemDTO extends EntityDTOOfCheckoutItemDTOAndICheckoutItem {
|
||||
export interface CheckoutItemDTO extends ReadOnlyEntityDTOOfCheckoutItemDTOAndICheckoutItem {
|
||||
checkout?: EntityDTOContainerOfCheckoutDTO;
|
||||
shoppingCartItem?: EntityDTOContainerOfShoppingCartItemDTO;
|
||||
delivery?: EntityDTOContainerOfCheckoutDeliveryDTO;
|
||||
|
||||
@@ -3,12 +3,12 @@ import { EntityDTOOfCompanyDTOAndICompany } from './entity-dtoof-company-dtoand-
|
||||
import { EntityDTOContainerOfCompanyDTO } from './entity-dtocontainer-of-company-dto';
|
||||
import { AddressDTO } from './address-dto';
|
||||
export interface CompanyDTO extends EntityDTOOfCompanyDTOAndICompany {
|
||||
department?: string;
|
||||
parent?: EntityDTOContainerOfCompanyDTO;
|
||||
locale?: string;
|
||||
name?: string;
|
||||
nameSuffix?: string;
|
||||
legalForm?: string;
|
||||
locale?: string;
|
||||
department?: string;
|
||||
costUnit?: string;
|
||||
vatId?: string;
|
||||
address?: AddressDTO;
|
||||
|
||||
@@ -4,12 +4,12 @@ import { EntityDTOContainerOfCategoryDTO } from './entity-dtocontainer-of-catego
|
||||
import { QuantityUnitType } from './quantity-unit-type';
|
||||
import { ComponentItemDisplayType } from './component-item-display-type';
|
||||
export interface ComponentItemDTO {
|
||||
quantityMax?: number;
|
||||
name?: string;
|
||||
description?: string;
|
||||
item?: EntityDTOContainerOfItemDTO;
|
||||
category?: EntityDTOContainerOfCategoryDTO;
|
||||
required?: boolean;
|
||||
description?: string;
|
||||
quantityMax?: number;
|
||||
quantityUnitType: QuantityUnitType;
|
||||
unit?: string;
|
||||
displayType: ComponentItemDisplayType;
|
||||
|
||||
@@ -4,6 +4,7 @@ import { PriceDTO } from './price-dto';
|
||||
export interface DisplayItemDTO {
|
||||
shopItem?: ShopItemDTO;
|
||||
specialComment?: string;
|
||||
customProductName?: string;
|
||||
quantity?: number;
|
||||
price?: PriceDTO;
|
||||
components?: Array<DisplayItemDTO>;
|
||||
|
||||
@@ -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 { TermsOfDeliveryDTO2 } from './terms-of-delivery-dto2';
|
||||
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;
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
/* tslint:disable */
|
||||
import { ReadOnlyEntityDTOOfCheckoutDTOAndICheckout } from './read-only-entity-dtoof-checkout-dtoand-icheckout';
|
||||
export interface EntityDTOOfCheckoutDTOAndICheckout extends ReadOnlyEntityDTOOfCheckoutDTOAndICheckout {
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
/* tslint:disable */
|
||||
import { ReadOnlyEntityDTOOfCheckoutItemDTOAndICheckoutItem } from './read-only-entity-dtoof-checkout-item-dtoand-icheckout-item';
|
||||
export interface EntityDTOOfCheckoutItemDTOAndICheckoutItem extends ReadOnlyEntityDTOOfCheckoutItemDTOAndICheckoutItem {
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
/* tslint:disable */
|
||||
import { ReadOnlyEntityDTOOfShopItemDTOAndIShopItem } from './read-only-entity-dtoof-shop-item-dtoand-ishop-item';
|
||||
export interface EntityDTOOfShopItemDTOAndIShopItem extends ReadOnlyEntityDTOOfShopItemDTOAndIShopItem {
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
/* tslint:disable */
|
||||
import { ReadOnlyEntityDTOOfShoppingCartItemDTOAndIShoppingCartItem } from './read-only-entity-dtoof-shopping-cart-item-dtoand-ishopping-cart-item';
|
||||
export interface EntityDTOOfShoppingCartItemDTOAndIShoppingCartItem extends ReadOnlyEntityDTOOfShoppingCartItemDTOAndIShoppingCartItem {
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user