Merged PR 809: #2143, #2144 Nachbestellen Filialbestand, ErrorHandling und Test fixes

#2143, #2144 Nachbestellen Filialbestand, ErrorHandling und Test fixes

Related work items: #2143, #2144
This commit is contained in:
Andreas Schickinger
2021-09-07 13:50:21 +00:00
committed by Nino Righi
parent 355be3bddb
commit 89cc11d9c5
22 changed files with 263 additions and 117 deletions

View File

@@ -52,9 +52,21 @@ export class DomainAvailabilityService {
// TODO: Stock-Aufruf aus Remi API
@memorize({ ttl: 10000 })
getTakeAwayAvailability({ item, quantity }: { item: ItemData; quantity: number }): Observable<AvailabilityDTO> {
getTakeAwayAvailability({
item,
quantity,
byEan = false,
}: {
item: ItemData;
quantity: number;
byEan?: boolean;
}): Observable<AvailabilityDTO> {
return this.getCurrentStock().pipe(
switchMap((s) => this.remi.RemiInStock({ articleIds: [item.itemId], stockId: s.id })),
switchMap((s) =>
byEan
? this.remi.RemiInStockByEAN({ eans: [item.ean], stockId: s.id })
: this.remi.RemiInStock({ articleIds: [item.itemId], stockId: s.id })
),
withLatestFrom(this.getTakeAwaySupplier(), this.getCurrentBranch()),
map(([response, supplier, branch]) => {
const stockInfo = response.result.find((si) => si.branchId === branch.id);
@@ -81,7 +93,7 @@ export class DomainAvailabilityService {
{
qty: quantity,
ean: item?.ean,
itemId: String(item?.itemId),
itemId: item?.itemId ? String(item?.itemId) : null,
shopId: branch?.id,
price: item?.price,
},
@@ -118,7 +130,7 @@ export class DomainAvailabilityService {
.AvailabilityShippingAvailability([
{
ean: item?.ean,
itemId: String(item?.itemId),
itemId: item?.itemId ? String(item?.itemId) : null,
price: item?.price,
qty: quantity,
},
@@ -150,7 +162,7 @@ export class DomainAvailabilityService {
{
qty: quantity,
ean: item?.ean,
itemId: String(item?.itemId),
itemId: item?.itemId ? String(item?.itemId) : null,
price: item?.price,
},
])
@@ -200,7 +212,7 @@ export class DomainAvailabilityService {
.AvailabilityShippingAvailability([
{
ean: item?.ean,
itemId: String(item?.itemId),
itemId: item?.itemId ? String(item?.itemId) : null,
price: item?.price,
qty: 1,
},
@@ -234,7 +246,7 @@ export class DomainAvailabilityService {
{
qty: quantity,
ean: item?.ean,
itemId: String(item?.itemId),
itemId: item?.itemId ? String(item?.itemId) : null,
shopId: branch?.id,
price: item?.price,
},

View File

@@ -27,12 +27,12 @@
{{ orderItem.product?.ean }}
</div>
<div class="quantity">
<ui-quantity-dropdown [showTrash]="false" [(ngModel)]="quantity" [showSpinner]="false"> </ui-quantity-dropdown>
{{ orderItem.quantity }}
</div>
</div>
</div>
<ng-container *ngIf="storeAvailabilities$ | async; let storeAvailabilities; else: showLoadingSpinner">
<ng-container *ngIf="availabilities$ | async; let availabilities; else: showLoadingSpinner">
<div class="supplier-grid">
<span></span>
<span>Bestand</span>
@@ -41,22 +41,38 @@
<span>Preis</span>
<span></span>
<ng-container *ngFor="let availability of storeAvailabilities; let i = index">
<span class="first-cell">{{ availability.supplier | supplierName }}</span>
<span>{{ availability.qty || 0 }}</span>
<span>{{ availability.ssc }}</span>
<span>{{ availability.at | date: 'dd.MM.yy' }}</span>
<span>{{ availability.price?.value?.value | currency: 'EUR':'code' }}</span>
<span>
<ui-select-bullet
[(ngModel)]="checkedSupplier"
[value]="availability.supplier"
(ngModelChange)="checked($event, availability)"
></ui-select-bullet>
</span>
<ng-container *ngFor="let availability of availabilities; let i = index">
<ng-container *ngIf="availability">
<span class="first-cell">{{ availability.supplier | supplierName }}</span>
<span>{{ availability.qty || 0 }}</span>
<span>{{ availability.ssc }}</span>
<span>{{ availability.at | date: 'dd.MM.yy' }}</span>
<span>{{ availability.price?.value?.value | currency: 'EUR':'code' }}</span>
<span>
<ui-select-bullet
[(ngModel)]="checkedSupplier"
[value]="availability.supplier"
(ngModelChange)="checked($event, availability)"
></ui-select-bullet>
</span>
</ng-container>
</ng-container>
</div>
<ng-container *ngIf="storeAvailabilityError$ | async">
<div class="availability-error">
Lieferantenbestand nicht verfügbar
</div>
<hr />
</ng-container>
<ng-container *ngIf="takeAwayAvailabilityError$ | async">
<div class="availability-error">
Filialbestand nicht verfügbar
</div>
<hr />
</ng-container>
<div class="actions">
<button class="cta-not-available cta-action-secondary" (click)="notAvailable()">Nicht lieferbar</button>
<button class="cta-reorder cta-action-primary" (click)="reorder()">Bestellen</button>

View File

@@ -71,6 +71,10 @@ hr {
}
}
.availability-error {
@apply py-5 font-bold text-brand;
}
ui-spinner {
@apply py-8;
}

View File

@@ -39,7 +39,7 @@ describe('GoodsInListReorderModalComponent', () => {
],
declarations: [SupplierNamePipe],
providers: [
mockProvider(UiModalRef, { data: { product: {}, quantity: 1 } }),
mockProvider(UiModalRef, { data: { product: {} } }),
mockProvider(DomainCheckoutService),
mockProvider(DomainAvailabilityService, {
getCurrentBranch: jasmine.createSpy().and.returnValue(of({})),
@@ -64,7 +64,7 @@ describe('GoodsInListReorderModalComponent', () => {
describe('storeAvailabilities$', () => {
it('should call domainAvailabilityService.getStoreAvailabilities', async () => {
const orderItem = { product: { ean: 'Test EAN', catalogProductNumber: '1' }, retailPrice: {} };
const orderItem = { product: { ean: 'Test EAN', catalogProductNumber: '1' }, retailPrice: {}, quantity: 1 };
spectator.component.patchState({ orderItem });
await spectator.detectComponentChanges();
@@ -76,9 +76,9 @@ describe('GoodsInListReorderModalComponent', () => {
});
it('should set checkedAvailability to the preferred availability', async () => {
const orderItem = { product: { ean: 'Test EAN', catalogProductNumber: '1' }, retailPrice: {} };
const orderItem = { product: { ean: 'Test EAN', catalogProductNumber: '1' }, retailPrice: {}, quantity: 3 };
spectator.component.patchState({ orderItem, quantity: 3 });
spectator.component.patchState({ orderItem });
await spectator.detectComponentChanges();
expect(spectator.component.checkedSupplier).toBe(availabilitiesMock.find((a) => a.preferred === 1)?.supplier);
@@ -107,10 +107,6 @@ describe('GoodsInListReorderModalComponent', () => {
expect(spectator.query('.details .product-ean')).toHaveText(orderItem.product.ean);
});
it('should render ui-quantity-dropdown', () => {
expect(spectator.query('.details .quantity ui-quantity-dropdown')).toBeVisible();
});
describe('div .format', () => {
it('should not render when format is not set', () => {
const orderItem = { product: { formatDetail: 'TestFormatDetail' } };
@@ -144,8 +140,8 @@ describe('GoodsInListReorderModalComponent', () => {
expect(spectator.query('ui-spinner')).not.toBeVisible();
});
it('should be visible when storeAvailabilities$ are undefined', async () => {
Object.defineProperty(spectator.component, 'storeAvailabilities$', { value: undefined });
it('should be visible when availabilities$ are undefined', async () => {
Object.defineProperty(spectator.component, 'availabilities$', { value: undefined });
await spectator.detectComponentChanges();
expect(spectator.query('ui-spinner')).toBeVisible();
});
@@ -191,9 +187,8 @@ describe('GoodsInListReorderModalComponent', () => {
it('should call domainCheckoutService.reorder() when checkedAvailability is set', async () => {
domainCheckoutServiceMock.reorder = jasmine.createSpy().and.returnValue(of({}));
const orderItem = { orderId: 1, orderItemId: 2, orderItemSubsetId: 3, product: {} };
const quantity = 2;
spectator.component.patchState({ orderItem, quantity });
const orderItem = { orderId: 1, orderItemId: 2, orderItemSubsetId: 3, product: {}, quantity: 2 };
spectator.component.patchState({ orderItem });
await spectator.detectComponentChanges();
spectator.component.checkedAvailability = availabilitiesMock[0];
@@ -204,7 +199,7 @@ describe('GoodsInListReorderModalComponent', () => {
orderItem.orderItemId,
orderItem.orderItemSubsetId,
{
quantity: quantity,
quantity: orderItem.quantity,
availability: {
availabilityType: availabilitiesMock[0].status,
ssc: availabilitiesMock[0].ssc,
@@ -224,9 +219,8 @@ describe('GoodsInListReorderModalComponent', () => {
it('should call modalRef.close()', async () => {
domainCheckoutServiceMock.reorder = jasmine.createSpy().and.returnValue(of({}));
const orderItem = { orderId: 1, orderItemId: 2, orderItemSubsetId: 3, product: {} };
const quantity = 2;
spectator.component.patchState({ orderItem, quantity });
const orderItem = { orderId: 1, orderItemId: 2, orderItemSubsetId: 3, product: {}, quantity: 2 };
spectator.component.patchState({ orderItem });
await spectator.detectComponentChanges();
spectator.component.checkedAvailability = availabilitiesMock[0];

View File

@@ -6,12 +6,13 @@ import { ComponentStore } from '@ngrx/component-store';
import { AvailabilityDTO2, OrderItemListItemDTO } from '@swagger/oms';
import { UiModalRef } from '@ui/modal';
import { combineLatest } from 'rxjs';
import { switchMap, tap } from 'rxjs/operators';
import { catchError, map, switchMap, tap } from 'rxjs/operators';
interface GoodsInListReorderModalState {
orderItem: OrderItemListItemDTO;
quantity: number;
checkedAvailability: AvailabilityDTO2;
takeAwayAvailabilityError: boolean;
storeAvailabilityError: boolean;
}
@Component({
@@ -26,16 +27,6 @@ export class GoodsInListReorderModalComponent extends ComponentStore<GoodsInList
return this.get((s) => s.orderItem);
}
readonly quantity$ = this.select((s) => s.quantity);
get quantity() {
return this.get((s) => s.quantity);
}
set quantity(quantity: number) {
if (this.quantity !== quantity) {
this.patchState({ quantity });
}
}
get checkedAvailability() {
return this.get((s) => s.checkedAvailability);
}
@@ -46,21 +37,65 @@ export class GoodsInListReorderModalComponent extends ComponentStore<GoodsInList
}
}
readonly storeAvailabilityError$ = this.select((s) => s.storeAvailabilityError);
readonly takeAwayAvailabilityError$ = this.select((s) => s.takeAwayAvailabilityError);
readonly currentBranch$ = this.domainAvailabilityService.getCurrentBranch();
readonly storeAvailabilities$ = combineLatest([this.orderItem$, this.currentBranch$, this.quantity$]).pipe(
switchMap(([item, branch, quantity]) =>
this.domainAvailabilityService.getStoreAvailabilities({
item: { ean: item.product.ean, itemId: +item.product.catalogProductNumber, price: item.retailPrice },
branch,
quantity,
})
readonly storeAvailabilities$ = combineLatest([this.orderItem$, this.currentBranch$]).pipe(
switchMap(([item, branch]) =>
this.domainAvailabilityService
.getStoreAvailabilities({
item: { ean: item.product.ean, itemId: +item.product?.catalogProductNumber, price: item.retailPrice },
branch,
quantity: item.quantity,
})
.pipe(
catchError(() => {
this.patchState({ storeAvailabilityError: true });
return [undefined];
})
)
),
tap((availabilities) => (this.checkedAvailability = availabilities?.find((a) => a.preferred)))
);
readonly takeAwayAvailability$ = this.orderItem$.pipe(
switchMap((item) =>
this.domainAvailabilityService
.getTakeAwayAvailability({
item: { ean: item.product.ean, itemId: +item.product.catalogProductNumber, price: item.retailPrice },
quantity: item.quantity,
byEan: true,
})
.pipe(
catchError(() => {
this.patchState({ takeAwayAvailabilityError: true });
return [undefined];
}),
map((availability) => {
return availability
? {
...availability,
status: availability.availabilityType,
supplierId: availability.supplier.id,
supplier: 'F',
qty: availability.inStock,
}
: undefined;
})
)
)
);
readonly availabilities$ = combineLatest([this.storeAvailabilities$, this.takeAwayAvailability$]).pipe(
map(([storeAvailabilities, takeAwayAvailability]) => [...storeAvailabilities, takeAwayAvailability])
);
isChecked: boolean;
checkedSupplier: string;
storeAvailabilityError: boolean;
takeAwayAvailabilityError: boolean;
constructor(
public modalRef: UiModalRef<any, OrderItemListItemDTO>,
@@ -70,8 +105,9 @@ export class GoodsInListReorderModalComponent extends ComponentStore<GoodsInList
) {
super({
orderItem: modalRef.data,
quantity: modalRef.data.quantity,
checkedAvailability: undefined,
storeAvailabilityError: false,
takeAwayAvailabilityError: false,
});
}
@@ -83,7 +119,7 @@ export class GoodsInListReorderModalComponent extends ComponentStore<GoodsInList
if (this.checkedAvailability) {
await this.domainCheckoutService
.reorder(this.orderItem.orderId, this.orderItem.orderItemId, this.orderItem.orderItemSubsetId, {
quantity: this.quantity,
quantity: this.orderItem.quantity,
availability: {
availabilityType: this.checkedAvailability.status,
ssc: this.checkedAvailability.ssc,

View File

@@ -1,5 +1,6 @@
import { RouterTestingModule } from '@angular/router/testing';
import { ProductImageService } from '@cdn/product-image';
import { BreadcrumbService } from '@core/breadcrumb';
import { DomainOmsService } from '@domain/oms';
import { createComponentFactory, mockProvider, Spectator } from '@ngneat/spectator';
import { UiCommonModule } from '@ui/common';
@@ -25,6 +26,7 @@ describe('GoodsInListComponent', () => {
}),
mockProvider(UiModalService),
mockProvider(ProductImageService),
mockProvider(BreadcrumbService),
],
providers: [mockProvider(DomainOmsService)],
});
@@ -53,12 +55,6 @@ describe('GoodsInListComponent', () => {
});
});
describe('a .goods-in-navigation', () => {
it('should link to /goods/in', async () => {
expect(spectator.query('a.goods-in-navigation')).toHaveAttribute('href', '/goods/in');
});
});
describe('goods-in-list-item-loading', () => {
it('should be rendered if loading$ is true', () => {
spectator.component.loading$.next(true);

View File

@@ -8,6 +8,7 @@ export { EntityDTOOfUserDTOAndIReadOnlyUser } from './models/entity-dtoof-user-d
export { ReadOnlyEntityDTOOfUserDTOAndIReadOnlyUser } from './models/read-only-entity-dtoof-user-dtoand-iread-only-user';
export { EntityDTO } from './models/entity-dto';
export { EntityStatus } from './models/entity-status';
export { TouchedBase } from './models/touched-base';
export { EntityDTOReferenceContainer } from './models/entity-dtoreference-container';
export { ExternalReferenceDTO } from './models/external-reference-dto';
export { EntityDTOContainerOfLabelDTO } from './models/entity-dtocontainer-of-label-dto';

View File

@@ -1,6 +1,7 @@
/* tslint:disable */
import { TouchedBase } from './touched-base';
import { EntityStatus } from './entity-status';
export interface EntityDTO {
export interface EntityDTO extends TouchedBase{
changed?: string;
created?: string;
id?: number;

View File

@@ -1,6 +1,7 @@
/* tslint:disable */
import { TouchedBase } from './touched-base';
import { ExternalReferenceDTO } from './external-reference-dto';
export interface EntityDTOReferenceContainer {
export interface EntityDTOReferenceContainer extends TouchedBase{
displayLabel?: string;
enabled?: boolean;
externalReference?: ExternalReferenceDTO;

View File

@@ -1,6 +1,7 @@
/* tslint:disable */
import { TouchedBase } from './touched-base';
import { EntityStatus } from './entity-status';
export interface ExternalReferenceDTO {
export interface ExternalReferenceDTO extends TouchedBase{
externalChanged?: string;
externalCreated?: string;
externalNumber?: string;

View File

@@ -1,5 +1,6 @@
/* tslint:disable */
export interface GeoLocation {
import { TouchedBase } from './touched-base';
export interface GeoLocation extends TouchedBase{
altitude?: number;
latitude?: number;
longitude?: number;

View File

@@ -3,10 +3,14 @@ import { InputOptionsDTO } from './input-options-dto';
import { InputType } from './input-type';
export interface InputDTO {
constraint?: string;
description?: string;
key?: string;
label?: string;
maxValue?: string;
minValue?: string;
options?: InputOptionsDTO;
placeholder?: string;
target?: string;
type: InputType;
value?: string;
}

View File

@@ -1,2 +1,2 @@
/* tslint:disable */
export type InputType = 0 | 1 | 2 | 4 | 8 | 16 | 32 | 64 | 96;
export type InputType = 0 | 1 | 2 | 4 | 8 | 16 | 32 | 64 | 128 | 256 | 512 | 1024 | 2048 | 3072 | 4096 | 8192 | 12288;

View File

@@ -1,8 +1,12 @@
/* tslint:disable */
export interface OptionDTO {
description?: string;
enabled?: boolean;
key?: string;
label?: string;
maxValue?: string;
minValue?: string;
placeholder?: string;
selected?: boolean;
value?: string;
values?: Array<OptionDTO>;

View File

@@ -2,6 +2,5 @@
export interface OrderByDTO {
by?: string;
desc?: boolean;
key?: string;
label?: string;
}

View File

@@ -1,6 +1,7 @@
/* tslint:disable */
export interface ReturnSuggestionValues {
impedimentComment?: string;
inStock?: number;
options?: string;
placementType?: string;
quantity?: number;

View File

@@ -0,0 +1,3 @@
/* tslint:disable */
export interface TouchedBase {
}

View File

@@ -142,7 +142,7 @@ class PackageService extends __BaseService {
if (params.locale != null) __params = __params.set('locale', params.locale.toString());
let req = new HttpRequest<any>(
'PUT',
this.rootUrl + `/inventory/package/${encodeURIComponent(String(params.packageId))}`,
this.rootUrl + `/inventory/package/${encodeURIComponent(params.packageId)}`,
__body,
{
headers: __headers,
@@ -190,7 +190,7 @@ class PackageService extends __BaseService {
if (params.locale != null) __params = __params.set('locale', params.locale.toString());
let req = new HttpRequest<any>(
'PATCH',
this.rootUrl + `/inventory/package/${encodeURIComponent(String(params.packageId))}`,
this.rootUrl + `/inventory/package/${encodeURIComponent(params.packageId)}`,
__body,
{
headers: __headers,
@@ -235,7 +235,7 @@ class PackageService extends __BaseService {
if (params.locale != null) __params = __params.set('locale', params.locale.toString());
let req = new HttpRequest<any>(
'DELETE',
this.rootUrl + `/inventory/package/${encodeURIComponent(String(params.packageId))}`,
this.rootUrl + `/inventory/package/${encodeURIComponent(params.packageId)}`,
__body,
{
headers: __headers,

View File

@@ -39,6 +39,7 @@ class RemiService extends __BaseService {
static readonly RemiProductgroupsPath = '/remi/stock/{stockId}/productgroup';
static readonly RemiGetRequiredCapacitiesPath = '/remi/stock/{stockId}/ueberlauf/required-capacity';
static readonly RemiInStockPath = '/remi/stock/{stockId}/instock';
static readonly RemiInStockByEANPath = '/remi/stock/{stockId}/instockbyean';
constructor(
config: __Configuration,
@@ -228,7 +229,7 @@ class RemiService extends __BaseService {
if (params.department != null) __params = __params.set('department', params.department.toString());
let req = new HttpRequest<any>(
'DELETE',
this.rootUrl + `/remi/stock/${encodeURIComponent(String(params.stockId))}/nullgutschriften`,
this.rootUrl + `/remi/stock/${encodeURIComponent(params.stockId)}/nullgutschriften`,
__body,
{
headers: __headers,
@@ -368,7 +369,7 @@ class RemiService extends __BaseService {
if (params.locale != null) __params = __params.set('locale', params.locale.toString());
let req = new HttpRequest<any>(
'GET',
this.rootUrl + `/remi/stock/${encodeURIComponent(String(params.stockId))}/filter`,
this.rootUrl + `/remi/stock/${encodeURIComponent(params.stockId)}/filter`,
__body,
{
headers: __headers,
@@ -418,7 +419,7 @@ class RemiService extends __BaseService {
if (params.locale != null) __params = __params.set('locale', params.locale.toString());
let req = new HttpRequest<any>(
'GET',
this.rootUrl + `/remi/stock/${encodeURIComponent(String(params.stockId))}/pflichtremission/filter`,
this.rootUrl + `/remi/stock/${encodeURIComponent(params.stockId)}/pflichtremission/filter`,
__body,
{
headers: __headers,
@@ -468,7 +469,7 @@ class RemiService extends __BaseService {
if (params.locale != null) __params = __params.set('locale', params.locale.toString());
let req = new HttpRequest<any>(
'GET',
this.rootUrl + `/remi/stock/${encodeURIComponent(String(params.stockId))}/ueberlauf/filter`,
this.rootUrl + `/remi/stock/${encodeURIComponent(params.stockId)}/ueberlauf/filter`,
__body,
{
headers: __headers,
@@ -515,7 +516,7 @@ class RemiService extends __BaseService {
if (params.locale != null) __params = __params.set('locale', params.locale.toString());
let req = new HttpRequest<any>(
'GET',
this.rootUrl + `/remi/stock/${encodeURIComponent(String(params.stockId))}/productgroup`,
this.rootUrl + `/remi/stock/${encodeURIComponent(params.stockId)}/productgroup`,
__body,
{
headers: __headers,
@@ -563,7 +564,7 @@ class RemiService extends __BaseService {
if (params.locale != null) __params = __params.set('locale', params.locale.toString());
let req = new HttpRequest<any>(
'POST',
this.rootUrl + `/remi/stock/${encodeURIComponent(String(params.stockId))}/ueberlauf/required-capacity`,
this.rootUrl + `/remi/stock/${encodeURIComponent(params.stockId)}/ueberlauf/required-capacity`,
__body,
{
headers: __headers,
@@ -613,7 +614,7 @@ class RemiService extends __BaseService {
if (params.locale != null) __params = __params.set('locale', params.locale.toString());
let req = new HttpRequest<any>(
'POST',
this.rootUrl + `/remi/stock/${encodeURIComponent(String(params.stockId))}/instock`,
this.rootUrl + `/remi/stock/${encodeURIComponent(params.stockId)}/instock`,
__body,
{
headers: __headers,
@@ -643,6 +644,56 @@ class RemiService extends __BaseService {
__map(_r => _r.body as ResponseArgsOfIEnumerableOfStockInfoDTO)
);
}
/**
* Lagerbestandsabfrage
* @param params The `RemiService.RemiInStockByEANParams` containing the following parameters:
*
* - `stockId`: Lager PK
*
* - `eans`: EANs
*
* - `locale`: Lokalisierung (optional)
*/
RemiInStockByEANResponse(params: RemiService.RemiInStockByEANParams): __Observable<__StrictHttpResponse<ResponseArgsOfIEnumerableOfStockInfoDTO>> {
let __params = this.newParams();
let __headers = new HttpHeaders();
let __body: any = null;
__body = params.eans;
if (params.locale != null) __params = __params.set('locale', params.locale.toString());
let req = new HttpRequest<any>(
'POST',
this.rootUrl + `/remi/stock/${encodeURIComponent(params.stockId)}/instockbyean`,
__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<ResponseArgsOfIEnumerableOfStockInfoDTO>;
})
);
}
/**
* Lagerbestandsabfrage
* @param params The `RemiService.RemiInStockByEANParams` containing the following parameters:
*
* - `stockId`: Lager PK
*
* - `eans`: EANs
*
* - `locale`: Lokalisierung (optional)
*/
RemiInStockByEAN(params: RemiService.RemiInStockByEANParams): __Observable<ResponseArgsOfIEnumerableOfStockInfoDTO> {
return this.RemiInStockByEANResponse(params).pipe(
__map(_r => _r.body as ResponseArgsOfIEnumerableOfStockInfoDTO)
);
}
}
module RemiService {
@@ -852,6 +903,27 @@ module RemiService {
*/
locale?: null | string;
}
/**
* Parameters for RemiInStockByEAN
*/
export interface RemiInStockByEANParams {
/**
* Lager PK
*/
stockId: number;
/**
* EANs
*/
eans: Array<string>;
/**
* Lokalisierung (optional)
*/
locale?: null | string;
}
}
export { RemiService }

View File

@@ -139,7 +139,7 @@ class ReturnService extends __BaseService {
if (params.locale != null) __params = __params.set('locale', params.locale.toString());
let req = new HttpRequest<any>(
'POST',
this.rootUrl + `/inventory/return/${encodeURIComponent(String(params.returnId))}/receipt`,
this.rootUrl + `/inventory/return/${encodeURIComponent(params.returnId)}/receipt`,
__body,
{
headers: __headers,
@@ -187,7 +187,7 @@ class ReturnService extends __BaseService {
if (params.eagerLoading != null) __params = __params.set('eagerLoading', params.eagerLoading.toString());
let req = new HttpRequest<any>(
'GET',
this.rootUrl + `/inventory/return/${encodeURIComponent(String(params.returnId))}/receipt`,
this.rootUrl + `/inventory/return/${encodeURIComponent(params.returnId)}/receipt`,
__body,
{
headers: __headers,
@@ -238,7 +238,7 @@ class ReturnService extends __BaseService {
if (params.locale != null) __params = __params.set('locale', params.locale.toString());
let req = new HttpRequest<any>(
'PATCH',
this.rootUrl + `/inventory/return/${encodeURIComponent(String(params.returnId))}/receipt/${encodeURIComponent(String(params.receiptId))}/finalize`,
this.rootUrl + `/inventory/return/${encodeURIComponent(params.returnId)}/receipt/${encodeURIComponent(params.receiptId)}/finalize`,
__body,
{
headers: __headers,
@@ -285,7 +285,7 @@ class ReturnService extends __BaseService {
if (params.locale != null) __params = __params.set('locale', params.locale.toString());
let req = new HttpRequest<any>(
'PATCH',
this.rootUrl + `/inventory/return/${encodeURIComponent(String(params.returnId))}/finalize`,
this.rootUrl + `/inventory/return/${encodeURIComponent(params.returnId)}/finalize`,
__body,
{
headers: __headers,
@@ -329,7 +329,7 @@ class ReturnService extends __BaseService {
if (params.locale != null) __params = __params.set('locale', params.locale.toString());
let req = new HttpRequest<any>(
'POST',
this.rootUrl + `/remi/return/${encodeURIComponent(String(params.returnId))}/transfer-to-bookhit`,
this.rootUrl + `/remi/return/${encodeURIComponent(params.returnId)}/transfer-to-bookhit`,
__body,
{
headers: __headers,
@@ -379,7 +379,7 @@ class ReturnService extends __BaseService {
if (params.locale != null) __params = __params.set('locale', params.locale.toString());
let req = new HttpRequest<any>(
'POST',
this.rootUrl + `/inventory/return/${encodeURIComponent(String(params.returnId))}/receipt/${encodeURIComponent(String(params.receiptId))}/addreturnitem`,
this.rootUrl + `/inventory/return/${encodeURIComponent(params.returnId)}/receipt/${encodeURIComponent(params.receiptId)}/addreturnitem`,
__body,
{
headers: __headers,
@@ -432,7 +432,7 @@ class ReturnService extends __BaseService {
if (params.locale != null) __params = __params.set('locale', params.locale.toString());
let req = new HttpRequest<any>(
'POST',
this.rootUrl + `/inventory/return/${encodeURIComponent(String(params.returnId))}/receipt/${encodeURIComponent(String(params.receiptId))}/addreturnsuggestion`,
this.rootUrl + `/inventory/return/${encodeURIComponent(params.returnId)}/receipt/${encodeURIComponent(params.receiptId)}/addreturnsuggestion`,
__body,
{
headers: __headers,
@@ -485,7 +485,7 @@ class ReturnService extends __BaseService {
if (params.locale != null) __params = __params.set('locale', params.locale.toString());
let req = new HttpRequest<any>(
'DELETE',
this.rootUrl + `/inventory/return/${encodeURIComponent(String(params.returnId))}/receipt/${encodeURIComponent(String(params.receiptId))}/items/${encodeURIComponent(String(params.receiptItemId))}`,
this.rootUrl + `/inventory/return/${encodeURIComponent(params.returnId)}/receipt/${encodeURIComponent(params.receiptId)}/items/${encodeURIComponent(params.receiptItemId)}`,
__body,
{
headers: __headers,
@@ -535,7 +535,7 @@ class ReturnService extends __BaseService {
if (params.locale != null) __params = __params.set('locale', params.locale.toString());
let req = new HttpRequest<any>(
'DELETE',
this.rootUrl + `/inventory/return/${encodeURIComponent(String(params.returnId))}/receipt/${encodeURIComponent(String(params.receiptId))}/cancel`,
this.rootUrl + `/inventory/return/${encodeURIComponent(params.returnId)}/receipt/${encodeURIComponent(params.receiptId)}/cancel`,
__body,
{
headers: __headers,
@@ -580,7 +580,7 @@ class ReturnService extends __BaseService {
if (params.locale != null) __params = __params.set('locale', params.locale.toString());
let req = new HttpRequest<any>(
'GET',
this.rootUrl + `/inventory/stock/${encodeURIComponent(String(params.stockId))}/return/reasons`,
this.rootUrl + `/inventory/stock/${encodeURIComponent(params.stockId)}/return/reasons`,
__body,
{
headers: __headers,
@@ -669,7 +669,7 @@ class ReturnService extends __BaseService {
if (params.eagerLoading != null) __params = __params.set('eagerLoading', params.eagerLoading.toString());
let req = new HttpRequest<any>(
'GET',
this.rootUrl + `/inventory/return/${encodeURIComponent(String(params.returnId))}`,
this.rootUrl + `/inventory/return/${encodeURIComponent(params.returnId)}`,
__body,
{
headers: __headers,
@@ -714,7 +714,7 @@ class ReturnService extends __BaseService {
if (params.locale != null) __params = __params.set('locale', params.locale.toString());
let req = new HttpRequest<any>(
'DELETE',
this.rootUrl + `/inventory/return/${encodeURIComponent(String(params.returnId))}/cancel`,
this.rootUrl + `/inventory/return/${encodeURIComponent(params.returnId)}/cancel`,
__body,
{
headers: __headers,
@@ -757,7 +757,7 @@ class ReturnService extends __BaseService {
if (params.locale != null) __params = __params.set('locale', params.locale.toString());
let req = new HttpRequest<any>(
'PATCH',
this.rootUrl + `/inventory/returngroup/${encodeURIComponent(String(params.returnGroup))}/finalize`,
this.rootUrl + `/inventory/returngroup/${encodeURIComponent(params.returnGroup)}/finalize`,
__body,
{
headers: __headers,
@@ -803,7 +803,7 @@ class ReturnService extends __BaseService {
if (params.eagerLoading != null) __params = __params.set('eagerLoading', params.eagerLoading.toString());
let req = new HttpRequest<any>(
'GET',
this.rootUrl + `/inventory/return/item/${encodeURIComponent(String(params.itemId))}`,
this.rootUrl + `/inventory/return/item/${encodeURIComponent(params.itemId)}`,
__body,
{
headers: __headers,
@@ -848,7 +848,7 @@ class ReturnService extends __BaseService {
if (params.locale != null) __params = __params.set('locale', params.locale.toString());
let req = new HttpRequest<any>(
'DELETE',
this.rootUrl + `/inventory/return/item/${encodeURIComponent(String(params.itemId))}`,
this.rootUrl + `/inventory/return/item/${encodeURIComponent(params.itemId)}`,
__body,
{
headers: __headers,
@@ -894,7 +894,7 @@ class ReturnService extends __BaseService {
if (params.locale != null) __params = __params.set('locale', params.locale.toString());
let req = new HttpRequest<any>(
'PATCH',
this.rootUrl + `/inventory/return/item/${encodeURIComponent(String(params.itemId))}/impediment`,
this.rootUrl + `/inventory/return/item/${encodeURIComponent(params.itemId)}/impediment`,
__body,
{
headers: __headers,
@@ -985,7 +985,7 @@ class ReturnService extends __BaseService {
if (params.eagerLoading != null) __params = __params.set('eagerLoading', params.eagerLoading.toString());
let req = new HttpRequest<any>(
'GET',
this.rootUrl + `/inventory/return/suggestion/${encodeURIComponent(String(params.itemId))}`,
this.rootUrl + `/inventory/return/suggestion/${encodeURIComponent(params.itemId)}`,
__body,
{
headers: __headers,
@@ -1033,7 +1033,7 @@ class ReturnService extends __BaseService {
if (params.locale != null) __params = __params.set('locale', params.locale.toString());
let req = new HttpRequest<any>(
'PATCH',
this.rootUrl + `/inventory/return/suggestion/${encodeURIComponent(String(params.itemId))}/impediment`,
this.rootUrl + `/inventory/return/suggestion/${encodeURIComponent(params.itemId)}/impediment`,
__body,
{
headers: __headers,
@@ -1081,7 +1081,7 @@ class ReturnService extends __BaseService {
if (params.locale != null) __params = __params.set('locale', params.locale.toString());
let req = new HttpRequest<any>(
'POST',
this.rootUrl + `/inventory/stock/${encodeURIComponent(String(params.stockId))}/return/item`,
this.rootUrl + `/inventory/stock/${encodeURIComponent(params.stockId)}/return/item`,
__body,
{
headers: __headers,
@@ -1129,7 +1129,7 @@ class ReturnService extends __BaseService {
if (params.locale != null) __params = __params.set('locale', params.locale.toString());
let req = new HttpRequest<any>(
'POST',
this.rootUrl + `/inventory/stock/${encodeURIComponent(String(params.stockId))}/return/suggestion`,
this.rootUrl + `/inventory/stock/${encodeURIComponent(params.stockId)}/return/suggestion`,
__body,
{
headers: __headers,
@@ -1177,7 +1177,7 @@ class ReturnService extends __BaseService {
if (params.department != null) __params = __params.set('department', params.department.toString());
let req = new HttpRequest<any>(
'DELETE',
this.rootUrl + `/inventory/stock/${encodeURIComponent(String(params.stockId))}/return/suggestion`,
this.rootUrl + `/inventory/stock/${encodeURIComponent(params.stockId)}/return/suggestion`,
__body,
{
headers: __headers,
@@ -1222,7 +1222,7 @@ class ReturnService extends __BaseService {
if (params.locale != null) __params = __params.set('locale', params.locale.toString());
let req = new HttpRequest<any>(
'DELETE',
this.rootUrl + `/inventory/return/suggestion/${encodeURIComponent(String(params.suggestionId))}`,
this.rootUrl + `/inventory/return/suggestion/${encodeURIComponent(params.suggestionId)}`,
__body,
{
headers: __headers,
@@ -1265,7 +1265,7 @@ class ReturnService extends __BaseService {
if (params.locale != null) __params = __params.set('locale', params.locale.toString());
let req = new HttpRequest<any>(
'GET',
this.rootUrl + `/inventory/stock/${encodeURIComponent(String(params.stockId))}/return/uncompleted`,
this.rootUrl + `/inventory/stock/${encodeURIComponent(params.stockId)}/return/uncompleted`,
__body,
{
headers: __headers,
@@ -1311,7 +1311,7 @@ class ReturnService extends __BaseService {
if (params.locale != null) __params = __params.set('locale', params.locale.toString());
let req = new HttpRequest<any>(
'POST',
this.rootUrl + `/inventory/stock/${encodeURIComponent(String(params.stockId))}/return`,
this.rootUrl + `/inventory/stock/${encodeURIComponent(params.stockId)}/return`,
__body,
{
headers: __headers,
@@ -1362,7 +1362,7 @@ class ReturnService extends __BaseService {
if (params.eagerLoading != null) __params = __params.set('eagerLoading', params.eagerLoading.toString());
let req = new HttpRequest<any>(
'GET',
this.rootUrl + `/inventory/return/${encodeURIComponent(String(params.returnId))}/receipt/${encodeURIComponent(String(params.receiptId))}`,
this.rootUrl + `/inventory/return/${encodeURIComponent(params.returnId)}/receipt/${encodeURIComponent(params.receiptId)}`,
__body,
{
headers: __headers,
@@ -1415,7 +1415,7 @@ class ReturnService extends __BaseService {
if (params.locale != null) __params = __params.set('locale', params.locale.toString());
let req = new HttpRequest<any>(
'POST',
this.rootUrl + `/inventory/return/${encodeURIComponent(String(params.returnId))}/receipt/${encodeURIComponent(String(params.receiptId))}/item`,
this.rootUrl + `/inventory/return/${encodeURIComponent(params.returnId)}/receipt/${encodeURIComponent(params.receiptId)}/item`,
__body,
{
headers: __headers,
@@ -1471,7 +1471,7 @@ class ReturnService extends __BaseService {
if (params.locale != null) __params = __params.set('locale', params.locale.toString());
let req = new HttpRequest<any>(
'PUT',
this.rootUrl + `/inventory/return/${encodeURIComponent(String(params.returnId))}/receipt/${encodeURIComponent(String(params.receiptId))}/item/${encodeURIComponent(String(params.receiptItemId))}`,
this.rootUrl + `/inventory/return/${encodeURIComponent(params.returnId)}/receipt/${encodeURIComponent(params.receiptId)}/item/${encodeURIComponent(params.receiptItemId)}`,
__body,
{
headers: __headers,
@@ -1529,7 +1529,7 @@ class ReturnService extends __BaseService {
if (params.locale != null) __params = __params.set('locale', params.locale.toString());
let req = new HttpRequest<any>(
'PATCH',
this.rootUrl + `/inventory/return/${encodeURIComponent(String(params.returnId))}/receipt/${encodeURIComponent(String(params.receiptId))}/item/${encodeURIComponent(String(params.receiptItemId))}`,
this.rootUrl + `/inventory/return/${encodeURIComponent(params.returnId)}/receipt/${encodeURIComponent(params.receiptId)}/item/${encodeURIComponent(params.receiptItemId)}`,
__body,
{
headers: __headers,
@@ -1584,7 +1584,7 @@ class ReturnService extends __BaseService {
if (params.locale != null) __params = __params.set('locale', params.locale.toString());
let req = new HttpRequest<any>(
'DELETE',
this.rootUrl + `/inventory/return/${encodeURIComponent(String(params.returnId))}/receipt/${encodeURIComponent(String(params.receiptId))}/item/${encodeURIComponent(String(params.receiptItemId))}`,
this.rootUrl + `/inventory/return/${encodeURIComponent(params.returnId)}/receipt/${encodeURIComponent(params.receiptId)}/item/${encodeURIComponent(params.receiptItemId)}`,
__body,
{
headers: __headers,
@@ -1634,7 +1634,7 @@ class ReturnService extends __BaseService {
if (params.locale != null) __params = __params.set('locale', params.locale.toString());
let req = new HttpRequest<any>(
'GET',
this.rootUrl + `/inventory/stock/${encodeURIComponent(String(params.stockId))}/receipt/${encodeURIComponent(String(params.receiptType))}/uncompleted`,
this.rootUrl + `/inventory/stock/${encodeURIComponent(params.stockId)}/receipt/${encodeURIComponent(params.receiptType)}/uncompleted`,
__body,
{
headers: __headers,

View File

@@ -47,7 +47,7 @@ class StockService extends __BaseService {
if (params.locale != null) __params = __params.set('locale', params.locale.toString());
let req = new HttpRequest<any>(
'GET',
this.rootUrl + `/inventory/branch/${encodeURIComponent(String(params.branchId))}/stock`,
this.rootUrl + `/inventory/branch/${encodeURIComponent(params.branchId)}/stock`,
__body,
{
headers: __headers,
@@ -135,7 +135,7 @@ class StockService extends __BaseService {
let req = new HttpRequest<any>(
'GET',
this.rootUrl + `/inventory/stock/stockitem/${encodeURIComponent(String(stockItemId))}`,
this.rootUrl + `/inventory/stock/stockitem/${encodeURIComponent(stockItemId)}`,
__body,
{
headers: __headers,
@@ -208,7 +208,7 @@ class StockService extends __BaseService {
if (params.itemId != null) __params = __params.set('itemId', params.itemId.toString());
let req = new HttpRequest<any>(
'GET',
this.rootUrl + `/inventory/stock/${encodeURIComponent(String(params.stockId))}/order`,
this.rootUrl + `/inventory/stock/${encodeURIComponent(params.stockId)}/order`,
__body,
{
headers: __headers,
@@ -251,7 +251,7 @@ class StockService extends __BaseService {
if (params.itemId != null) __params = __params.set('itemId', params.itemId.toString());
let req = new HttpRequest<any>(
'GET',
this.rootUrl + `/inventory/stock/${encodeURIComponent(String(params.stockId))}/reservation`,
this.rootUrl + `/inventory/stock/${encodeURIComponent(params.stockId)}/reservation`,
__body,
{
headers: __headers,

View File

@@ -42,7 +42,7 @@ class SupplierService extends __BaseService {
if (params.locale != null) __params = __params.set('locale', params.locale.toString());
let req = new HttpRequest<any>(
'GET',
this.rootUrl + `/inventory/stock/${encodeURIComponent(String(params.stockId))}/supplier`,
this.rootUrl + `/inventory/stock/${encodeURIComponent(params.stockId)}/supplier`,
__body,
{
headers: __headers,