mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
@@ -1,5 +1,9 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ArticleDTO, DisplayInfoDTO, EISPublicDocumentService } from '@generated/swagger/eis-api';
|
||||
import {
|
||||
ArticleDTO,
|
||||
DisplayInfoDTO,
|
||||
EISPublicDocumentService,
|
||||
} from '@generated/swagger/eis-api';
|
||||
import {
|
||||
CatalogPrintService,
|
||||
CheckoutPrintService,
|
||||
@@ -42,7 +46,9 @@ export class DomainPrinterService {
|
||||
map((response: any) => {
|
||||
if (response.error && response.error.status === 503) {
|
||||
return {
|
||||
error: response.message ? response.message : 'Das Backend ist derzeit nicht erreichbar',
|
||||
error: response.message
|
||||
? response.message
|
||||
: 'Das Backend ist derzeit nicht erreichbar',
|
||||
};
|
||||
}
|
||||
if (response.error && response.error.name === 'TimeoutError') {
|
||||
@@ -77,7 +83,9 @@ export class DomainPrinterService {
|
||||
map((response: any) => {
|
||||
if (response.error && response.error.status === 503) {
|
||||
return {
|
||||
error: response.message ? response.message : 'Das Backend ist derzeit nicht erreichbar',
|
||||
error: response.message
|
||||
? response.message
|
||||
: 'Das Backend ist derzeit nicht erreichbar',
|
||||
};
|
||||
}
|
||||
if (response.error && response.error.name === 'TimeoutError') {
|
||||
@@ -112,7 +120,9 @@ export class DomainPrinterService {
|
||||
map((response: any) => {
|
||||
if (response.error && response.error.status === 503) {
|
||||
return {
|
||||
error: response.message ? response.message : 'Das Backend ist derzeit nicht erreichbar',
|
||||
error: response.message
|
||||
? response.message
|
||||
: 'Das Backend ist derzeit nicht erreichbar',
|
||||
};
|
||||
}
|
||||
if (response.error && response.error.name === 'TimeoutError') {
|
||||
@@ -141,28 +151,61 @@ export class DomainPrinterService {
|
||||
);
|
||||
}
|
||||
|
||||
printOrder({ orderIds, printer }: { orderIds: number[]; printer: string }): Observable<ResponseArgs> {
|
||||
printOrder({
|
||||
orderIds,
|
||||
printer,
|
||||
}: {
|
||||
orderIds: number[];
|
||||
printer: string;
|
||||
}): Observable<ResponseArgs> {
|
||||
const params = <any>{
|
||||
printer: printer,
|
||||
data: orderIds,
|
||||
};
|
||||
return this.oMSPrintService.OMSPrintAbholscheinById(params).pipe(timeout(20000));
|
||||
return this.oMSPrintService
|
||||
.OMSPrintAbholscheinById(params)
|
||||
.pipe(timeout(20000));
|
||||
}
|
||||
|
||||
printShippingNote({ receipts, printer }: { receipts: number[]; printer: string }) {
|
||||
printShippingNote({
|
||||
receipts,
|
||||
printer,
|
||||
}: {
|
||||
receipts: number[];
|
||||
printer: string;
|
||||
}) {
|
||||
return this.oMSPrintService.OMSPrintLieferschein({
|
||||
printer,
|
||||
data: receipts,
|
||||
});
|
||||
}
|
||||
|
||||
printCompartmentLabel({ orderItemSubsetIds, printer }: { orderItemSubsetIds: number[]; printer: string }) {
|
||||
printCompartmentLabel({
|
||||
orderItemSubsetIds,
|
||||
printer,
|
||||
}: {
|
||||
orderItemSubsetIds: number[];
|
||||
printer: string;
|
||||
}) {
|
||||
return this.oMSPrintService.OMSPrintAbholfachetikett({
|
||||
printer,
|
||||
data: orderItemSubsetIds,
|
||||
});
|
||||
}
|
||||
|
||||
printReturnReceipt({
|
||||
receiptIds,
|
||||
printer,
|
||||
}: {
|
||||
receiptIds: number[];
|
||||
printer: string;
|
||||
}) {
|
||||
return this.oMSPrintService.OMSPrintReturnReceipt({
|
||||
printer,
|
||||
data: receiptIds,
|
||||
});
|
||||
}
|
||||
|
||||
printKubiAgb({ p4mCode, printer }: { p4mCode: string; printer: string }) {
|
||||
return this._loyaltyCardPrintService.LoyaltyCardPrintPrintLoyaltyCardAGB({
|
||||
printer,
|
||||
@@ -170,20 +213,36 @@ export class DomainPrinterService {
|
||||
});
|
||||
}
|
||||
|
||||
printProduct({ item, printer }: { item: ItemDTO; printer: string }): Observable<ResponseArgs> {
|
||||
printProduct({
|
||||
item,
|
||||
printer,
|
||||
}: {
|
||||
item: ItemDTO;
|
||||
printer: string;
|
||||
}): Observable<ResponseArgs> {
|
||||
const params = <PrintRequestOfIEnumerableOfItemDTO>{
|
||||
printer: printer,
|
||||
data: [item],
|
||||
};
|
||||
return this.catalogPrintService.CatalogPrintArtikelDetail(params).pipe(timeout(20000));
|
||||
return this.catalogPrintService
|
||||
.CatalogPrintArtikelDetail(params)
|
||||
.pipe(timeout(20000));
|
||||
}
|
||||
|
||||
printCart({ cartId, printer }: { cartId: number; printer: string }): Observable<ResponseArgs> {
|
||||
printCart({
|
||||
cartId,
|
||||
printer,
|
||||
}: {
|
||||
cartId: number;
|
||||
printer: string;
|
||||
}): Observable<ResponseArgs> {
|
||||
const params = <any>{
|
||||
printer: printer,
|
||||
data: cartId,
|
||||
};
|
||||
return this.checkoutPrintService.CheckoutPrintWarenkorbById(params).pipe(timeout(20000));
|
||||
return this.checkoutPrintService
|
||||
.CheckoutPrintWarenkorbById(params)
|
||||
.pipe(timeout(20000));
|
||||
}
|
||||
|
||||
async printGoodsInLabel(subsetItemIds: number[]): Promise<ResponseArgs> {
|
||||
@@ -223,7 +282,9 @@ export class DomainPrinterService {
|
||||
printProductListItemsResponse(
|
||||
payload: DocumentPayloadOfIEnumerableOfProductListItemDTO,
|
||||
): Observable<ResponseArgsOfString> {
|
||||
return this._productListService.ProductListProductListItemPdfAsBase64(payload);
|
||||
return this._productListService.ProductListProductListItemPdfAsBase64(
|
||||
payload,
|
||||
);
|
||||
}
|
||||
|
||||
printProductListItems({
|
||||
|
||||
Reference in New Issue
Block a user