mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
Merged PR 1311: #3263 WA Details API calls angepasst
#3263 WA Details API calls angepasst Related work items: #3263
This commit is contained in:
committed by
Lorenz Hilpert
parent
2c98128531
commit
732566eacd
@@ -23,7 +23,7 @@ export class DomainGoodsService {
|
||||
return this.abholfachService.AbholfachWarenausgabeAutocomplete(autocompleteToken);
|
||||
}
|
||||
|
||||
getItemByOrderNumber(orderNumber: string) {
|
||||
getWareneingangItemByOrderNumber(orderNumber: string) {
|
||||
return this.abholfachService.AbholfachWareneingang({
|
||||
filter: { all_branches: 'true', archive: 'true' },
|
||||
input: {
|
||||
@@ -32,8 +32,17 @@ export class DomainGoodsService {
|
||||
});
|
||||
}
|
||||
|
||||
getItemByCompartment(compartmentCode: string) {
|
||||
return this.abholfachService.AbholfachWareneingang({
|
||||
getWarenausgabeItemByOrderNumber(orderNumber: string) {
|
||||
return this.abholfachService.AbholfachWarenausgabe({
|
||||
filter: { all_branches: 'true', archive: 'true' },
|
||||
input: {
|
||||
qs: orderNumber,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
getWarenausgabeItemByCompartment(compartmentCode: string) {
|
||||
return this.abholfachService.AbholfachWarenausgabe({
|
||||
filter: { all_branches: 'true', archive: 'true' },
|
||||
input: {
|
||||
qs: compartmentCode,
|
||||
@@ -41,7 +50,7 @@ export class DomainGoodsService {
|
||||
});
|
||||
}
|
||||
|
||||
getItemByCustomerNumber(customerNumber: string) {
|
||||
getWareneingangItemByCustomerNumber(customerNumber: string) {
|
||||
// Suche anhand der Kundennummer mit Status Bestellt, nachbestellt, eingetroffen, weitergeleitet intern
|
||||
return this.abholfachService.AbholfachWareneingang({
|
||||
filter: { orderitemprocessingstatus: '16;128;8192;1048576' },
|
||||
|
||||
@@ -139,7 +139,7 @@ export class GoodsInDetailsComponent extends ComponentStore<GoodsInDetailsCompon
|
||||
debounceTime(500),
|
||||
withLatestFrom(this.orderNumber$, this.selectedOrderItemId$, this.processingStatus$),
|
||||
switchMap(([_, orderNumber, selectedOrderItemId, processingStatus]) =>
|
||||
this._domainGoodsInService.getItemByOrderNumber(orderNumber).pipe(
|
||||
this._domainGoodsInService.getWareneingangItemByOrderNumber(orderNumber).pipe(
|
||||
tapResponse(
|
||||
(res) => {
|
||||
this.patchState({
|
||||
@@ -170,7 +170,7 @@ export class GoodsInDetailsComponent extends ComponentStore<GoodsInDetailsCompon
|
||||
debounceTime(200),
|
||||
withLatestFrom(this.customerNumber$),
|
||||
switchMap(([_, customerNumber]) =>
|
||||
this._domainGoodsInService.getItemByCustomerNumber(customerNumber).pipe(
|
||||
this._domainGoodsInService.getWareneingangItemByCustomerNumber(customerNumber).pipe(
|
||||
tapResponse(
|
||||
(res) => {
|
||||
this.patchState({
|
||||
|
||||
@@ -17,10 +17,12 @@ export class GoodsInEditComponent implements OnInit {
|
||||
map((params) => decodeURIComponent(params.orderNumber ?? '') || undefined)
|
||||
);
|
||||
|
||||
items$ = this.orderNumber$.pipe(switchMap((orderNumber) => this._domainGoodsInService.getItemByOrderNumber(orderNumber))).pipe(
|
||||
map((response) => response.result),
|
||||
shareReplay()
|
||||
);
|
||||
items$ = this.orderNumber$
|
||||
.pipe(switchMap((orderNumber) => this._domainGoodsInService.getWareneingangItemByOrderNumber(orderNumber)))
|
||||
.pipe(
|
||||
map((response) => response.result),
|
||||
shareReplay()
|
||||
);
|
||||
|
||||
constructor(
|
||||
private _activatedRoute: ActivatedRoute,
|
||||
|
||||
@@ -126,9 +126,9 @@ export class GoodsOutDetailsComponent extends ComponentStore<GoodsOutDetailsComp
|
||||
switchMap(([_, orderNumber, compartmentCode, processingStatus]) => {
|
||||
let request$: Observable<ListResponseArgsOfOrderItemListItemDTO>;
|
||||
if (compartmentCode) {
|
||||
request$ = this._domainGoodsInService.getItemByCompartment(compartmentCode);
|
||||
request$ = this._domainGoodsInService.getWarenausgabeItemByCompartment(compartmentCode);
|
||||
} else {
|
||||
request$ = this._domainGoodsInService.getItemByOrderNumber(orderNumber);
|
||||
request$ = this._domainGoodsInService.getWarenausgabeItemByOrderNumber(orderNumber);
|
||||
}
|
||||
|
||||
return request$.pipe(
|
||||
|
||||
@@ -31,8 +31,8 @@ export class GoodsOutEditComponent implements OnInit {
|
||||
items$ = combineLatest([this.orderNumber$, this.compartmentCode$]).pipe(
|
||||
switchMap(([orderNumber, compartmentCode]) =>
|
||||
compartmentCode
|
||||
? this._domainGoodsInService.getItemByCompartment(compartmentCode)
|
||||
: this._domainGoodsInService.getItemByOrderNumber(orderNumber)
|
||||
? this._domainGoodsInService.getWarenausgabeItemByCompartment(compartmentCode)
|
||||
: this._domainGoodsInService.getWarenausgabeItemByOrderNumber(orderNumber)
|
||||
),
|
||||
withLatestFrom(this.processingStatus$),
|
||||
map(([response, processingStatus]) => response.result.filter((item) => item.processingStatus === +processingStatus)),
|
||||
|
||||
Reference in New Issue
Block a user