mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
Merged PR 1844: feat(oms-data-access, oms-shared-task-list): add Tolino return receipt print support and improve task action typing
feat(oms-data-access, oms-shared-task-list): add Tolino return receipt print support and improve task action typing - Add `PrintTolinoReturnReceiptService` to `oms-data-access` for printing Tolino return receipts via office printers, including direct integration with the OMS print API. - Extend `TaskActionType` to include `receiptItemId` for more precise task identification and action handling. - Update `return-task-list-item` and `return-task-list` components in `oms-shared-task-list` to support the new Tolino print action, including UI and logic for triggering the print dialog. - Refactor print-related service and test code to use the new print API signature and improve type safety. - Add and update unit tests to cover new print flows and ensure correct integration. Ref: #5121
This commit is contained in:
committed by
Lorenz Hilpert
parent
bcd3c800b1
commit
543de57190
@@ -244,14 +244,15 @@ export { ResponseArgsOfIEnumerableOfReceiptDTO } from './models/response-args-of
|
||||
export { GenerateCollectiveReceiptsArgs } from './models/generate-collective-receipts-args';
|
||||
export { ResponseArgsOfIEnumerableOfString } from './models/response-args-of-ienumerable-of-string';
|
||||
export { DateRange } from './models/date-range';
|
||||
export { ResponseArgsOfString } from './models/response-args-of-string';
|
||||
export { ListResponseArgsOfReceiptItemTaskListItemDTO } from './models/list-response-args-of-receipt-item-task-list-item-dto';
|
||||
export { ResponseArgsOfIEnumerableOfReceiptItemTaskListItemDTO } from './models/response-args-of-ienumerable-of-receipt-item-task-list-item-dto';
|
||||
export { ListResponseArgsOfReceiptListItemDTO } from './models/list-response-args-of-receipt-list-item-dto';
|
||||
export { ResponseArgsOfIEnumerableOfReceiptListItemDTO } from './models/response-args-of-ienumerable-of-receipt-list-item-dto';
|
||||
export { ReceiptListItemDTO } from './models/receipt-list-item-dto';
|
||||
export { ListResponseArgsOfReceiptItemListItemDTO } from './models/list-response-args-of-receipt-item-list-item-dto';
|
||||
export { ResponseArgsOfIEnumerableOfReceiptItemListItemDTO } from './models/response-args-of-ienumerable-of-receipt-item-list-item-dto';
|
||||
export { ReceiptItemListItemDTO } from './models/receipt-item-list-item-dto';
|
||||
export { ListResponseArgsOfReceiptItemTaskListItemDTO } from './models/list-response-args-of-receipt-item-task-list-item-dto';
|
||||
export { ResponseArgsOfIEnumerableOfReceiptItemTaskListItemDTO } from './models/response-args-of-ienumerable-of-receipt-item-task-list-item-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';
|
||||
|
||||
@@ -6,6 +6,7 @@ import { EntityDTOContainerOfBranchDTO } from './entity-dtocontainer-of-branch-d
|
||||
import { KeyValueDTOOfStringAndString } from './key-value-dtoof-string-and-string';
|
||||
import { EntityDTOContainerOfReceiptItemDTO } from './entity-dtocontainer-of-receipt-item-dto';
|
||||
import { EntityDTOContainerOfLabelDTO } from './entity-dtocontainer-of-label-dto';
|
||||
import { LinkedRecordDTO } from './linked-record-dto';
|
||||
import { EntityDTOContainerOfOrderDTO } from './entity-dtocontainer-of-order-dto';
|
||||
import { EntityDTOContainerOfPaymentDTO } from './entity-dtocontainer-of-payment-dto';
|
||||
import { PaymentInfoDTO } from './payment-info-dto';
|
||||
@@ -57,6 +58,11 @@ export interface ReceiptDTO extends EntityDTOBaseOfReceiptDTOAndIReceipt{
|
||||
*/
|
||||
label?: EntityDTOContainerOfLabelDTO;
|
||||
|
||||
/**
|
||||
* Verknüpfte Datensätze (readonly)
|
||||
*/
|
||||
linkedRecords?: Array<LinkedRecordDTO>;
|
||||
|
||||
/**
|
||||
* Bestellung
|
||||
*/
|
||||
|
||||
@@ -45,11 +45,26 @@ export interface ReceiptItemTaskListItemDTO {
|
||||
*/
|
||||
features?: {[key: string]: string};
|
||||
|
||||
/**
|
||||
* Details
|
||||
*/
|
||||
handlingDetails?: string;
|
||||
|
||||
/**
|
||||
* Reason / Grund
|
||||
*/
|
||||
handlingReason?: string;
|
||||
|
||||
/**
|
||||
* Task ID
|
||||
*/
|
||||
id?: number;
|
||||
|
||||
/**
|
||||
* Item condition / Artikelzustand
|
||||
*/
|
||||
itemCondition?: string;
|
||||
|
||||
/**
|
||||
* Aufgabentyp
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
/* tslint:disable */
|
||||
import { ResponseArgs } from './response-args';
|
||||
export interface ResponseArgsOfString extends ResponseArgs{
|
||||
|
||||
/**
|
||||
* Wert
|
||||
*/
|
||||
result?: string;
|
||||
}
|
||||
@@ -16,10 +16,11 @@ import { ResponseArgsOfIEnumerableOfReceiptDTO } from '../models/response-args-o
|
||||
import { GenerateCollectiveReceiptsArgs } from '../models/generate-collective-receipts-args';
|
||||
import { ResponseArgsOfIEnumerableOfString } from '../models/response-args-of-ienumerable-of-string';
|
||||
import { DateRange } from '../models/date-range';
|
||||
import { ListResponseArgsOfReceiptListItemDTO } from '../models/list-response-args-of-receipt-list-item-dto';
|
||||
import { QueryTokenDTO } from '../models/query-token-dto';
|
||||
import { ListResponseArgsOfReceiptItemListItemDTO } from '../models/list-response-args-of-receipt-item-list-item-dto';
|
||||
import { ResponseArgsOfString } from '../models/response-args-of-string';
|
||||
import { ListResponseArgsOfReceiptItemTaskListItemDTO } from '../models/list-response-args-of-receipt-item-task-list-item-dto';
|
||||
import { QueryTokenDTO } from '../models/query-token-dto';
|
||||
import { ListResponseArgsOfReceiptListItemDTO } from '../models/list-response-args-of-receipt-list-item-dto';
|
||||
import { ListResponseArgsOfReceiptItemListItemDTO } from '../models/list-response-args-of-receipt-item-list-item-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({
|
||||
@@ -33,6 +34,8 @@ class ReceiptService extends __BaseService {
|
||||
static readonly ReceiptSetReceiptItemTaskToNOKPath = '/receipt/item/task/{taskId}/nok';
|
||||
static readonly ReceiptGenerateCollectiveReceiptsPath = '/receipt/collectivereceipts';
|
||||
static readonly ReceiptGenerateCollectiveReceiptsSimulationSummaryPath = '/receipt/collectivereceipts/simulationsummary';
|
||||
static readonly ReceiptPostRuecknahmebelegPath = '/ruecknahmebeleg/{receiptId}';
|
||||
static readonly ReceiptQueryReceiptItemTasksPath = '/receipt/item/task/s';
|
||||
static readonly ReceiptQueryReceiptPath = '/receipt/s';
|
||||
static readonly ReceiptQueryReceiptItemPath = '/receipt/item/s';
|
||||
static readonly ReceiptCreateShippingNotePath = '/receipt/shippingnote/fromorder';
|
||||
@@ -40,7 +43,6 @@ class ReceiptService extends __BaseService {
|
||||
static readonly ReceiptCreateInvoicePath = '/receipt/invoice/fromorder';
|
||||
static readonly ReceiptCreateInvoice2Path = '/receipt/invoice/fromitems';
|
||||
static readonly ReceiptCreateReturnReceiptPath = '/receipt/return-receipt';
|
||||
static readonly ReceiptQueryReceiptItemTasksPath = '/receipt/item/task/s';
|
||||
static readonly ReceiptReceiptItemTaskCompletedPath = '/receipt/item/task/{taskId}/completed';
|
||||
static readonly ReceiptGetReceiptsByOrderItemSubsetPath = '/order/orderitem/orderitemsubset/receipts';
|
||||
|
||||
@@ -307,6 +309,74 @@ class ReceiptService extends __BaseService {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param receiptId undefined
|
||||
*/
|
||||
ReceiptPostRuecknahmebelegResponse(receiptId: number): __Observable<__StrictHttpResponse<ResponseArgsOfString>> {
|
||||
let __params = this.newParams();
|
||||
let __headers = new HttpHeaders();
|
||||
let __body: any = null;
|
||||
|
||||
let req = new HttpRequest<any>(
|
||||
'POST',
|
||||
this.rootUrl + `/ruecknahmebeleg/${encodeURIComponent(String(receiptId))}`,
|
||||
__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<ResponseArgsOfString>;
|
||||
})
|
||||
);
|
||||
}
|
||||
/**
|
||||
* @param receiptId undefined
|
||||
*/
|
||||
ReceiptPostRuecknahmebeleg(receiptId: number): __Observable<ResponseArgsOfString> {
|
||||
return this.ReceiptPostRuecknahmebelegResponse(receiptId).pipe(
|
||||
__map(_r => _r.body as ResponseArgsOfString)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param queryToken undefined
|
||||
*/
|
||||
ReceiptQueryReceiptItemTasksResponse(queryToken: QueryTokenDTO): __Observable<__StrictHttpResponse<ListResponseArgsOfReceiptItemTaskListItemDTO>> {
|
||||
let __params = this.newParams();
|
||||
let __headers = new HttpHeaders();
|
||||
let __body: any = null;
|
||||
__body = queryToken;
|
||||
let req = new HttpRequest<any>(
|
||||
'POST',
|
||||
this.rootUrl + `/receipt/item/task/s`,
|
||||
__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<ListResponseArgsOfReceiptItemTaskListItemDTO>;
|
||||
})
|
||||
);
|
||||
}
|
||||
/**
|
||||
* @param queryToken undefined
|
||||
*/
|
||||
ReceiptQueryReceiptItemTasks(queryToken: QueryTokenDTO): __Observable<ListResponseArgsOfReceiptItemTaskListItemDTO> {
|
||||
return this.ReceiptQueryReceiptItemTasksResponse(queryToken).pipe(
|
||||
__map(_r => _r.body as ListResponseArgsOfReceiptItemTaskListItemDTO)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Belege
|
||||
* @param params The `ReceiptService.ReceiptQueryReceiptParams` containing the following parameters:
|
||||
@@ -647,42 +717,6 @@ class ReceiptService extends __BaseService {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Suche nach Bestellpostenstatus-Aufgaben
|
||||
* @param queryToken Suchkriterien
|
||||
*/
|
||||
ReceiptQueryReceiptItemTasksResponse(queryToken: QueryTokenDTO): __Observable<__StrictHttpResponse<ListResponseArgsOfReceiptItemTaskListItemDTO>> {
|
||||
let __params = this.newParams();
|
||||
let __headers = new HttpHeaders();
|
||||
let __body: any = null;
|
||||
__body = queryToken;
|
||||
let req = new HttpRequest<any>(
|
||||
'POST',
|
||||
this.rootUrl + `/receipt/item/task/s`,
|
||||
__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<ListResponseArgsOfReceiptItemTaskListItemDTO>;
|
||||
})
|
||||
);
|
||||
}
|
||||
/**
|
||||
* Suche nach Bestellpostenstatus-Aufgaben
|
||||
* @param queryToken Suchkriterien
|
||||
*/
|
||||
ReceiptQueryReceiptItemTasks(queryToken: QueryTokenDTO): __Observable<ListResponseArgsOfReceiptItemTaskListItemDTO> {
|
||||
return this.ReceiptQueryReceiptItemTasksResponse(queryToken).pipe(
|
||||
__map(_r => _r.body as ListResponseArgsOfReceiptItemTaskListItemDTO)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Aufgabe auf erledigt setzen
|
||||
* @param taskId undefined
|
||||
|
||||
@@ -11,6 +11,7 @@ import { ResponseArgs } from '../models/response-args';
|
||||
import { PrintRequestOfIEnumerableOfLong } from '../models/print-request-of-ienumerable-of-long';
|
||||
import { PrintRequestOfIEnumerableOfDisplayOrderDTO } from '../models/print-request-of-ienumerable-of-display-order-dto';
|
||||
import { PrintRequestOfIEnumerableOfPriceQRCodeDTO } from '../models/print-request-of-ienumerable-of-price-qrcode-dto';
|
||||
import { PrintRequestOfLong } from '../models/print-request-of-long';
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
@@ -25,6 +26,8 @@ class OMSPrintService extends __BaseService {
|
||||
static readonly OMSPrintReturnReceiptPath = '/print/return-receipt';
|
||||
static readonly OMSPrintKleinbetragsrechnungPath = '/print/kleinbetragsrechnung';
|
||||
static readonly OMSPrintKleinbetragsrechnungPdfPath = '/print/kleinbetragsrechnung/{receiptId}/pdf';
|
||||
static readonly OMSPrintTolinoRetourenscheinPath = '/print/tolino-retourenschein';
|
||||
static readonly OMSPrintTolinoRetourenscheinPdfPath = '/print/tolino-retourenschein/{receipItemtId}/pdf';
|
||||
|
||||
constructor(
|
||||
config: __Configuration,
|
||||
@@ -392,6 +395,78 @@ class OMSPrintService extends __BaseService {
|
||||
__map(_r => _r.body as Blob)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tolino Retourenschein
|
||||
* @param data Retourenbelegpostion PKs
|
||||
*/
|
||||
OMSPrintTolinoRetourenscheinResponse(data: PrintRequestOfLong): __Observable<__StrictHttpResponse<ResponseArgs>> {
|
||||
let __params = this.newParams();
|
||||
let __headers = new HttpHeaders();
|
||||
let __body: any = null;
|
||||
__body = data;
|
||||
let req = new HttpRequest<any>(
|
||||
'POST',
|
||||
this.rootUrl + `/print/tolino-retourenschein`,
|
||||
__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<ResponseArgs>;
|
||||
})
|
||||
);
|
||||
}
|
||||
/**
|
||||
* Tolino Retourenschein
|
||||
* @param data Retourenbelegpostion PKs
|
||||
*/
|
||||
OMSPrintTolinoRetourenschein(data: PrintRequestOfLong): __Observable<ResponseArgs> {
|
||||
return this.OMSPrintTolinoRetourenscheinResponse(data).pipe(
|
||||
__map(_r => _r.body as ResponseArgs)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tolino Retourenschein PDF
|
||||
* @param receipItemtId Retourenbelegposition PK
|
||||
*/
|
||||
OMSPrintTolinoRetourenscheinPdfResponse(receipItemtId: number): __Observable<__StrictHttpResponse<Blob>> {
|
||||
let __params = this.newParams();
|
||||
let __headers = new HttpHeaders();
|
||||
let __body: any = null;
|
||||
|
||||
let req = new HttpRequest<any>(
|
||||
'GET',
|
||||
this.rootUrl + `/print/tolino-retourenschein/${encodeURIComponent(String(receipItemtId))}/pdf`,
|
||||
__body,
|
||||
{
|
||||
headers: __headers,
|
||||
params: __params,
|
||||
responseType: 'blob'
|
||||
});
|
||||
|
||||
return this.http.request<any>(req).pipe(
|
||||
__filter(_r => _r instanceof HttpResponse),
|
||||
__map((_r) => {
|
||||
return _r as __StrictHttpResponse<Blob>;
|
||||
})
|
||||
);
|
||||
}
|
||||
/**
|
||||
* Tolino Retourenschein PDF
|
||||
* @param receipItemtId Retourenbelegposition PK
|
||||
*/
|
||||
OMSPrintTolinoRetourenscheinPdf(receipItemtId: number): __Observable<Blob> {
|
||||
return this.OMSPrintTolinoRetourenscheinPdfResponse(receipItemtId).pipe(
|
||||
__map(_r => _r.body as Blob)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
module OMSPrintService {
|
||||
|
||||
Reference in New Issue
Block a user