mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
Merged PR 1001: #2122 WA/WE Kunde erneut benachrichtigen Implementierung
#2122 WA/WE Kunde erneut benachrichtigen Implementierung
This commit is contained in:
committed by
Lorenz Hilpert
parent
680ab2d92a
commit
215e542516
@@ -198,6 +198,13 @@ export class DomainOmsService {
|
||||
.pipe(map((res) => res.result));
|
||||
}
|
||||
|
||||
generateNotifications({ orderId, taskTypes }: { orderId: number; taskTypes: string[] }) {
|
||||
return this.orderService.OrderRegenerateOrderItemStatusTasks({
|
||||
orderId,
|
||||
taskTypes,
|
||||
});
|
||||
}
|
||||
|
||||
getCompletedTasks({
|
||||
orderId,
|
||||
orderItemId,
|
||||
|
||||
@@ -18,7 +18,12 @@
|
||||
<input uiInput formControlName="clientChannel" />
|
||||
</ui-form-control>
|
||||
|
||||
<shared-notification-channel-control formGroupName="notificationChannel"></shared-notification-channel-control>
|
||||
<shared-notification-channel-control
|
||||
(channelActionEvent)="generateNotification($event)"
|
||||
[channelActionName]="'Erneut senden'"
|
||||
[channelActionLoading]="notificationChannelLoading$ | async"
|
||||
formGroupName="notificationChannel"
|
||||
></shared-notification-channel-control>
|
||||
|
||||
<ui-form-control label="Kundennummer" variant="inline" statusLabel="Nicht Änderbar">
|
||||
<input uiInput formControlName="buyerNumber" />
|
||||
|
||||
@@ -13,11 +13,11 @@ import {
|
||||
import { FormArray, FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';
|
||||
import { DomainOmsService } from '@domain/oms';
|
||||
import { emailNotificationValidator, mobileNotificationValidator } from '@shared/notification-channel-control';
|
||||
import { NotificationChannel, OrderDTO, OrderItemListItemDTO, StockStatusCodeDTO, VATDTO } from '@swagger/oms';
|
||||
import { NotificationChannel, OrderItemListItemDTO, StockStatusCodeDTO, VATDTO } from '@swagger/oms';
|
||||
import { DateAdapter } from '@ui/common';
|
||||
import { UiErrorModalComponent, UiModalService } from '@ui/modal';
|
||||
import { UiSelectOptionComponent } from '@ui/select';
|
||||
import { Observable, Subscription } from 'rxjs';
|
||||
import { BehaviorSubject, Observable, Subscription } from 'rxjs';
|
||||
import { first, shareReplay } from 'rxjs/operators';
|
||||
import { ProcessingStatusNameMap } from '../constants/processing-status-name.map';
|
||||
import { EnvironmentChannelPipe } from '../pipes/environment-channel.pipe';
|
||||
@@ -38,9 +38,6 @@ export class SharedGoodsInOutOrderEditComponent implements OnChanges, OnDestroy
|
||||
@Input()
|
||||
items: OrderItemListItemDTO[];
|
||||
|
||||
@Input()
|
||||
order: OrderDTO;
|
||||
|
||||
expanded: boolean[];
|
||||
|
||||
showTagsComponent: boolean[];
|
||||
@@ -57,6 +54,8 @@ export class SharedGoodsInOutOrderEditComponent implements OnChanges, OnDestroy
|
||||
|
||||
vats$: Observable<VATDTO[]> = this.omsService.getVATs().pipe(shareReplay());
|
||||
|
||||
notificationChannelLoading$ = new BehaviorSubject<boolean>(false);
|
||||
|
||||
private _subscriptions = new Subscription();
|
||||
|
||||
displayDate = (option: UiSelectOptionComponent) => {
|
||||
@@ -202,6 +201,35 @@ export class SharedGoodsInOutOrderEditComponent implements OnChanges, OnDestroy
|
||||
processingStatus ? this.navigation.emit({ options: { processingStatus } }) : this.navigation.emit({});
|
||||
}
|
||||
|
||||
async generateNotification(notificationChannels: NotificationChannel[]) {
|
||||
if (!notificationChannels || notificationChannels.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.notificationChannelLoading$.next(true);
|
||||
|
||||
try {
|
||||
await this.omsService
|
||||
.generateNotifications({
|
||||
orderId: this.items[0].orderId,
|
||||
taskTypes:
|
||||
notificationChannels.length === 2
|
||||
? ['email', 'sms']
|
||||
: notificationChannels[0] === 1
|
||||
? ['email']
|
||||
: notificationChannels[0] === 2
|
||||
? ['sms']
|
||||
: [],
|
||||
})
|
||||
.pipe(first())
|
||||
.toPromise();
|
||||
} catch (error) {
|
||||
this._modal.open({ content: UiErrorModalComponent, data: error, title: 'Fehler beim erneut Benachrichtigen' });
|
||||
throw error;
|
||||
}
|
||||
this.notificationChannelLoading$.next(false);
|
||||
}
|
||||
|
||||
async submit() {
|
||||
if (this.control.invalid || this.control.disabled) {
|
||||
return;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
import { NotificationChannelControlModule } from '@shared/notification-channel-control';
|
||||
import { SharedNotificationChannelControlModule } from '@shared/notification-channel-control';
|
||||
import { UiCommonModule } from '@ui/common';
|
||||
import { UiDatepickerModule } from '@ui/datepicker';
|
||||
import { UiDropdownModule } from '@ui/dropdown';
|
||||
@@ -29,7 +29,7 @@ import { SharedGoodsInOutOrderEditComponent } from './goods-in-out-order-edit.co
|
||||
UiDatepickerModule,
|
||||
UiDropdownModule,
|
||||
SharedGoodsInOutOrderDetailsModule,
|
||||
NotificationChannelControlModule,
|
||||
SharedNotificationChannelControlModule,
|
||||
],
|
||||
exports: [SharedGoodsInOutOrderEditComponent],
|
||||
declarations: [SharedGoodsInOutOrderEditComponent],
|
||||
|
||||
@@ -16,25 +16,35 @@
|
||||
</button>
|
||||
</div>
|
||||
<div class="nc-content" [class.open]="open$ | async">
|
||||
<div class="nc-control-wrapper" *ngIf="displayEmail">
|
||||
<div class="nc-control-wrapper" *ngIf="displayEmail && open$ | async">
|
||||
<label for="email">E-Mail</label>
|
||||
<div class="input-wrapper" [class.has-error]="emailControl.touched && emailControl?.errors">
|
||||
<input type="email" name="email" id="email" [formControl]="emailControl" placeholder="E-Mail*" />
|
||||
<ng-container *ngIf="emailControl.touched && emailControl?.errors; let errors">
|
||||
<span class="error" *ngIf="errors.required">Das Fehld E-Mail ist ein Pflichtfeld</span>
|
||||
<span class="error" *ngIf="errors.required">Das Feld E-Mail ist ein Pflichtfeld</span>
|
||||
<span class="error" *ngIf="errors.pattern">Keine gültige E-Mail Adresse</span>
|
||||
</ng-container>
|
||||
</div>
|
||||
<div class="nc-generate" *ngIf="channelActionName && notificationChannels.length !== 2">
|
||||
<button [disabled]="channelActionLoading" type="button" (click)="channelActionEvent.emit(notificationChannels)">
|
||||
{{ channelActionName }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="nc-control-wrapper" *ngIf="displayMobile">
|
||||
<div class="nc-control-wrapper" *ngIf="displayMobile && open$ | async">
|
||||
<label for="mobile">SMS</label>
|
||||
<div class="input-wrapper" [class.has-error]="mobileControl.touched && mobileControl?.errors">
|
||||
<input type="tel" name="mobile" id="mobile" [formControl]="mobileControl" placeholder="SMS*" />
|
||||
<ng-container *ngIf="mobileControl.touched && mobileControl?.errors; let errors">
|
||||
<span class="error" *ngIf="errors.required">Das Fehld SMS ist ein Pflichtfeld</span>
|
||||
<span class="error" *ngIf="errors.required">Das Feld SMS ist ein Pflichtfeld</span>
|
||||
<span class="error" *ngIf="errors.pattern">Keine gültige Mobilnummer</span>
|
||||
</ng-container>
|
||||
</div>
|
||||
<div class="nc-generate" *ngIf="channelActionName">
|
||||
<button [disabled]="channelActionLoading" type="button" (click)="channelActionEvent.emit(notificationChannels)">
|
||||
{{ channelActionName }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -65,6 +65,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
.nc-generate {
|
||||
button {
|
||||
@apply text-base font-bold text-brand outline-none border-none bg-transparent mr-4 absolute right-0;
|
||||
}
|
||||
}
|
||||
|
||||
::ng-deep .customer shared-notification-channel-control {
|
||||
.nc-control-wrapper {
|
||||
.input-wrapper {
|
||||
@@ -73,6 +79,12 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.nc-generate {
|
||||
button:disabled {
|
||||
@apply text-disabled-customer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
::ng-deep .branch shared-notification-channel-control {
|
||||
@@ -87,4 +99,10 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.nc-generate {
|
||||
button:disabled {
|
||||
@apply text-disabled-branch;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormBuilder } from '@angular/forms';
|
||||
import { createComponentFactory, Spectator } from '@ngneat/spectator';
|
||||
import { SharedNotificationChannelControlComponent } from '@shared/notification-channel-control';
|
||||
import { UiIconModule } from '@ui/icon';
|
||||
|
||||
describe('SharedNotificationChannelControlComponent', () => {
|
||||
let spectator: Spectator<SharedNotificationChannelControlComponent>;
|
||||
|
||||
const createComponent = createComponentFactory({
|
||||
component: SharedNotificationChannelControlComponent,
|
||||
imports: [CommonModule, UiIconModule],
|
||||
providers: [FormBuilder],
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
spectator = createComponent();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(spectator.component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -1,11 +1,13 @@
|
||||
import { ChangeDetectorRef, Component, OnInit } from '@angular/core';
|
||||
import { ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
||||
import { ControlContainer, FormGroup } from '@angular/forms';
|
||||
import { DomainOmsService } from '@domain/oms';
|
||||
import { ComponentStore } from '@ngrx/component-store';
|
||||
import { NotificationChannel } from '@swagger/oms';
|
||||
import { UiModalService } from '@ui/modal';
|
||||
import { NEVER, Observable } from 'rxjs';
|
||||
import { map, startWith, tap } from 'rxjs/operators';
|
||||
import { map, shareReplay, startWith, tap } from 'rxjs/operators';
|
||||
|
||||
export interface NotificationChannelControlComponentState {
|
||||
export interface SharedNotificationChannelControlComponentState {
|
||||
open: boolean;
|
||||
}
|
||||
|
||||
@@ -14,9 +16,19 @@ export interface NotificationChannelControlComponentState {
|
||||
templateUrl: './notification-channel-control.component.html',
|
||||
styleUrls: ['./notification-channel-control.component.scss'],
|
||||
})
|
||||
export class NotificationChannelControlComponent extends ComponentStore<NotificationChannelControlComponentState> implements OnInit {
|
||||
export class SharedNotificationChannelControlComponent extends ComponentStore<SharedNotificationChannelControlComponentState>
|
||||
implements OnInit {
|
||||
notificationGroup: FormGroup;
|
||||
|
||||
@Input()
|
||||
channelActionName?: string; // z.B. Erneut senden
|
||||
|
||||
@Input()
|
||||
channelActionLoading?: boolean;
|
||||
|
||||
@Output()
|
||||
channelActionEvent = new EventEmitter<NotificationChannel[]>();
|
||||
|
||||
get notificationChannelControl() {
|
||||
return this.notificationGroup.get('selected');
|
||||
}
|
||||
@@ -45,7 +57,7 @@ export class NotificationChannelControlComponent extends ComponentStore<Notifica
|
||||
return !!(this.mobileControl?.errors || this.emailControl?.errors);
|
||||
}
|
||||
|
||||
readonly open$ = this.select((s) => s.open);
|
||||
readonly open$ = this.select((s) => s.open).pipe(shareReplay());
|
||||
|
||||
readonly options: NotificationChannel[] = [1, 2];
|
||||
|
||||
@@ -64,7 +76,12 @@ export class NotificationChannelControlComponent extends ComponentStore<Notifica
|
||||
|
||||
notificationChannels$: Observable<NotificationChannel[]>;
|
||||
|
||||
constructor(private _notificationsGroup: ControlContainer, private _cdr: ChangeDetectorRef) {
|
||||
constructor(
|
||||
private _notificationsGroup: ControlContainer,
|
||||
private _cdr: ChangeDetectorRef,
|
||||
private _omsService: DomainOmsService,
|
||||
private _modal: UiModalService
|
||||
) {
|
||||
super({
|
||||
open: false,
|
||||
});
|
||||
|
||||
@@ -3,11 +3,11 @@ import { NgModule } from '@angular/core';
|
||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
import { UiCheckboxModule } from '@ui/checkbox';
|
||||
import { UiIconModule } from '@ui/icon';
|
||||
import { NotificationChannelControlComponent } from './notification-channel-control.component';
|
||||
import { SharedNotificationChannelControlComponent } from './notification-channel-control.component';
|
||||
|
||||
@NgModule({
|
||||
declarations: [NotificationChannelControlComponent],
|
||||
declarations: [SharedNotificationChannelControlComponent],
|
||||
imports: [CommonModule, UiCheckboxModule, FormsModule, ReactiveFormsModule, UiIconModule],
|
||||
exports: [NotificationChannelControlComponent],
|
||||
exports: [SharedNotificationChannelControlComponent],
|
||||
})
|
||||
export class NotificationChannelControlModule {}
|
||||
export class SharedNotificationChannelControlModule {}
|
||||
|
||||
@@ -199,6 +199,7 @@ export { ResponseArgsOfOrderDTO } from './models/response-args-of-order-dto';
|
||||
export { ListResponseArgsOfOrderListItemDTO } from './models/list-response-args-of-order-list-item-dto';
|
||||
export { ResponseArgsOfIEnumerableOfOrderListItemDTO } from './models/response-args-of-ienumerable-of-order-list-item-dto';
|
||||
export { OrderListItemDTO } from './models/order-list-item-dto';
|
||||
export { ResponseArgsOfInteger } from './models/response-args-of-integer';
|
||||
export { ResponseArgsOfBoolean } from './models/response-args-of-boolean';
|
||||
export { ResponseArgsOfOrderItemDTO } from './models/response-args-of-order-item-dto';
|
||||
export { ResponseArgsOfIEnumerableOfOrderItemDTO } from './models/response-args-of-ienumerable-of-order-item-dto';
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
/* tslint:disable */
|
||||
import { ResponseArgs } from './response-args';
|
||||
export interface ResponseArgsOfInteger extends ResponseArgs{
|
||||
result: number;
|
||||
}
|
||||
@@ -45,7 +45,7 @@ class OrderCheckoutService extends __BaseService {
|
||||
if (params.locale != null) __params = __params.set('locale', params.locale.toString());
|
||||
let req = new HttpRequest<any>(
|
||||
'POST',
|
||||
this.rootUrl + `/order/checkout/${encodeURIComponent(params.checkoutId)}`,
|
||||
this.rootUrl + `/order/checkout/${encodeURIComponent(String(params.checkoutId))}`,
|
||||
__body,
|
||||
{
|
||||
headers: __headers,
|
||||
@@ -92,7 +92,7 @@ class OrderCheckoutService extends __BaseService {
|
||||
if (params.locale != null) __params = __params.set('locale', params.locale.toString());
|
||||
let req = new HttpRequest<any>(
|
||||
'PUT',
|
||||
this.rootUrl + `/order/checkout/${encodeURIComponent(params.checkoutId)}`,
|
||||
this.rootUrl + `/order/checkout/${encodeURIComponent(String(params.checkoutId))}`,
|
||||
__body,
|
||||
{
|
||||
headers: __headers,
|
||||
@@ -145,7 +145,7 @@ class OrderCheckoutService extends __BaseService {
|
||||
__body = params.data;
|
||||
let req = new HttpRequest<any>(
|
||||
'POST',
|
||||
this.rootUrl + `/order/${encodeURIComponent(params.orderId)}/orderitem/${encodeURIComponent(params.orderItemId)}/orderitemsubset/${encodeURIComponent(params.orderItemSubsetId)}/reorder`,
|
||||
this.rootUrl + `/order/${encodeURIComponent(String(params.orderId))}/orderitem/${encodeURIComponent(String(params.orderItemId))}/orderitemsubset/${encodeURIComponent(String(params.orderItemSubsetId))}/reorder`,
|
||||
__body,
|
||||
{
|
||||
headers: __headers,
|
||||
@@ -191,7 +191,7 @@ class OrderCheckoutService extends __BaseService {
|
||||
|
||||
let req = new HttpRequest<any>(
|
||||
'POST',
|
||||
this.rootUrl + `/order/${encodeURIComponent(orderId)}`,
|
||||
this.rootUrl + `/order/${encodeURIComponent(String(orderId))}`,
|
||||
__body,
|
||||
{
|
||||
headers: __headers,
|
||||
@@ -238,7 +238,7 @@ class OrderCheckoutService extends __BaseService {
|
||||
|
||||
let req = new HttpRequest<any>(
|
||||
'POST',
|
||||
this.rootUrl + `/order/${encodeURIComponent(params.orderId)}/orderitem/${encodeURIComponent(params.orderItemId)}/orderitemsubset/${encodeURIComponent(params.orderItemSubsetId)}`,
|
||||
this.rootUrl + `/order/${encodeURIComponent(String(params.orderId))}/orderitem/${encodeURIComponent(String(params.orderItemId))}/orderitemsubset/${encodeURIComponent(String(params.orderItemSubsetId))}`,
|
||||
__body,
|
||||
{
|
||||
headers: __headers,
|
||||
|
||||
@@ -16,6 +16,7 @@ import { ResponseArgsOfOrderItemSubsetDTO } from '../models/response-args-of-ord
|
||||
import { ResponseArgsOfIEnumerableOfOrderDTO } from '../models/response-args-of-ienumerable-of-order-dto';
|
||||
import { ListResponseArgsOfOrderListItemDTO } from '../models/list-response-args-of-order-list-item-dto';
|
||||
import { QueryTokenDTO } from '../models/query-token-dto';
|
||||
import { ResponseArgsOfInteger } from '../models/response-args-of-integer';
|
||||
import { ListResponseArgsOfOrderItemListItemDTO } from '../models/list-response-args-of-order-item-list-item-dto';
|
||||
import { ResponseArgsOfIEnumerableOfOrderItemDTO } from '../models/response-args-of-ienumerable-of-order-item-dto';
|
||||
import { OrderItemDTO } from '../models/order-item-dto';
|
||||
@@ -51,6 +52,7 @@ class OrderService extends __BaseService {
|
||||
static readonly OrderGetOrdersByCompartmentPath = '/order/compartment';
|
||||
static readonly OrderGetOrdersByBuyerNumberPath = '/buyer/order';
|
||||
static readonly OrderQueryOrdersPath = '/order/s';
|
||||
static readonly OrderRegenerateOrderItemStatusTasksPath = '/order/{orderId}/orderItem/orderItemSubset/task/regenerate';
|
||||
static readonly OrderQueryOrderItemPath = '/order/item/s';
|
||||
static readonly OrderGetOrderItemPath = '/order/orderitem/{orderItemId}';
|
||||
static readonly OrderGetOrderItemsPath = '/order/orderitem';
|
||||
@@ -94,7 +96,7 @@ class OrderService extends __BaseService {
|
||||
|
||||
let req = new HttpRequest<any>(
|
||||
'GET',
|
||||
this.rootUrl + `/order/${encodeURIComponent(orderId)}`,
|
||||
this.rootUrl + `/order/${encodeURIComponent(String(orderId))}`,
|
||||
__body,
|
||||
{
|
||||
headers: __headers,
|
||||
@@ -133,7 +135,7 @@ class OrderService extends __BaseService {
|
||||
__body = params.order;
|
||||
let req = new HttpRequest<any>(
|
||||
'PUT',
|
||||
this.rootUrl + `/order/${encodeURIComponent(params.orderId)}`,
|
||||
this.rootUrl + `/order/${encodeURIComponent(String(params.orderId))}`,
|
||||
__body,
|
||||
{
|
||||
headers: __headers,
|
||||
@@ -179,7 +181,7 @@ class OrderService extends __BaseService {
|
||||
if (params.eagerLoading != null) __params = __params.set('eagerLoading', params.eagerLoading.toString());
|
||||
let req = new HttpRequest<any>(
|
||||
'PATCH',
|
||||
this.rootUrl + `/order/${encodeURIComponent(params.orderId)}`,
|
||||
this.rootUrl + `/order/${encodeURIComponent(String(params.orderId))}`,
|
||||
__body,
|
||||
{
|
||||
headers: __headers,
|
||||
@@ -224,7 +226,7 @@ class OrderService extends __BaseService {
|
||||
if (params.deletionComment != null) __params = __params.set('deletionComment', params.deletionComment.toString());
|
||||
let req = new HttpRequest<any>(
|
||||
'DELETE',
|
||||
this.rootUrl + `/order/${encodeURIComponent(params.orderId)}`,
|
||||
this.rootUrl + `/order/${encodeURIComponent(String(params.orderId))}`,
|
||||
__body,
|
||||
{
|
||||
headers: __headers,
|
||||
@@ -273,7 +275,7 @@ class OrderService extends __BaseService {
|
||||
|
||||
let req = new HttpRequest<any>(
|
||||
'PUT',
|
||||
this.rootUrl + `/order/${encodeURIComponent(params.orderId)}/orderitem/${encodeURIComponent(params.orderItemId)}/orderitemsubset/${encodeURIComponent(params.orderItemSubsetId)}`,
|
||||
this.rootUrl + `/order/${encodeURIComponent(String(params.orderId))}/orderitem/${encodeURIComponent(String(params.orderItemId))}/orderitemsubset/${encodeURIComponent(String(params.orderItemSubsetId))}`,
|
||||
__body,
|
||||
{
|
||||
headers: __headers,
|
||||
@@ -326,7 +328,7 @@ class OrderService extends __BaseService {
|
||||
|
||||
let req = new HttpRequest<any>(
|
||||
'PATCH',
|
||||
this.rootUrl + `/order/${encodeURIComponent(params.orderId)}/orderitem/${encodeURIComponent(params.orderItemId)}/orderitemsubset/${encodeURIComponent(params.orderItemSubsetId)}`,
|
||||
this.rootUrl + `/order/${encodeURIComponent(String(params.orderId))}/orderitem/${encodeURIComponent(String(params.orderItemId))}/orderitemsubset/${encodeURIComponent(String(params.orderItemSubsetId))}`,
|
||||
__body,
|
||||
{
|
||||
headers: __headers,
|
||||
@@ -474,6 +476,51 @@ class OrderService extends __BaseService {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Letzte Aufgaben erneut erzeugen
|
||||
* @param params The `OrderService.OrderRegenerateOrderItemStatusTasksParams` containing the following parameters:
|
||||
*
|
||||
* - `orderId`: Bestellung PK
|
||||
*
|
||||
* - `taskTypes`: Aufgaben-Arten
|
||||
*/
|
||||
OrderRegenerateOrderItemStatusTasksResponse(params: OrderService.OrderRegenerateOrderItemStatusTasksParams): __Observable<__StrictHttpResponse<ResponseArgsOfInteger>> {
|
||||
let __params = this.newParams();
|
||||
let __headers = new HttpHeaders();
|
||||
let __body: any = null;
|
||||
|
||||
__body = params.taskTypes;
|
||||
let req = new HttpRequest<any>(
|
||||
'POST',
|
||||
this.rootUrl + `/order/${encodeURIComponent(String(params.orderId))}/orderItem/orderItemSubset/task/regenerate`,
|
||||
__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<ResponseArgsOfInteger>;
|
||||
})
|
||||
);
|
||||
}
|
||||
/**
|
||||
* Letzte Aufgaben erneut erzeugen
|
||||
* @param params The `OrderService.OrderRegenerateOrderItemStatusTasksParams` containing the following parameters:
|
||||
*
|
||||
* - `orderId`: Bestellung PK
|
||||
*
|
||||
* - `taskTypes`: Aufgaben-Arten
|
||||
*/
|
||||
OrderRegenerateOrderItemStatusTasks(params: OrderService.OrderRegenerateOrderItemStatusTasksParams): __Observable<ResponseArgsOfInteger> {
|
||||
return this.OrderRegenerateOrderItemStatusTasksResponse(params).pipe(
|
||||
__map(_r => _r.body as ResponseArgsOfInteger)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param queryToken undefined
|
||||
*/
|
||||
@@ -518,7 +565,7 @@ class OrderService extends __BaseService {
|
||||
|
||||
let req = new HttpRequest<any>(
|
||||
'GET',
|
||||
this.rootUrl + `/order/orderitem/${encodeURIComponent(orderItemId)}`,
|
||||
this.rootUrl + `/order/orderitem/${encodeURIComponent(String(orderItemId))}`,
|
||||
__body,
|
||||
{
|
||||
headers: __headers,
|
||||
@@ -594,7 +641,7 @@ class OrderService extends __BaseService {
|
||||
|
||||
let req = new HttpRequest<any>(
|
||||
'PUT',
|
||||
this.rootUrl + `/order/${encodeURIComponent(params.orderId)}/orderitem/${encodeURIComponent(params.orderItemId)}`,
|
||||
this.rootUrl + `/order/${encodeURIComponent(String(params.orderId))}/orderitem/${encodeURIComponent(String(params.orderItemId))}`,
|
||||
__body,
|
||||
{
|
||||
headers: __headers,
|
||||
@@ -642,7 +689,7 @@ class OrderService extends __BaseService {
|
||||
|
||||
let req = new HttpRequest<any>(
|
||||
'PATCH',
|
||||
this.rootUrl + `/order/${encodeURIComponent(params.orderId)}/orderitem/${encodeURIComponent(params.orderItemId)}`,
|
||||
this.rootUrl + `/order/${encodeURIComponent(String(params.orderId))}/orderitem/${encodeURIComponent(String(params.orderItemId))}`,
|
||||
__body,
|
||||
{
|
||||
headers: __headers,
|
||||
@@ -687,7 +734,7 @@ class OrderService extends __BaseService {
|
||||
if (params.locale != null) __params = __params.set('locale', params.locale.toString());
|
||||
let req = new HttpRequest<any>(
|
||||
'GET',
|
||||
this.rootUrl + `/order/orderitem/${encodeURIComponent(params.orderItemId)}/history`,
|
||||
this.rootUrl + `/order/orderitem/${encodeURIComponent(String(params.orderItemId))}/history`,
|
||||
__body,
|
||||
{
|
||||
headers: __headers,
|
||||
@@ -725,7 +772,7 @@ class OrderService extends __BaseService {
|
||||
|
||||
let req = new HttpRequest<any>(
|
||||
'GET',
|
||||
this.rootUrl + `/order/orderitem/orderitemsubset/${encodeURIComponent(orderItemSubsetId)}`,
|
||||
this.rootUrl + `/order/orderitem/orderitemsubset/${encodeURIComponent(String(orderItemSubsetId))}`,
|
||||
__body,
|
||||
{
|
||||
headers: __headers,
|
||||
@@ -764,7 +811,7 @@ class OrderService extends __BaseService {
|
||||
if (params.locale != null) __params = __params.set('locale', params.locale.toString());
|
||||
let req = new HttpRequest<any>(
|
||||
'GET',
|
||||
this.rootUrl + `/order/orderitem/orderitemsubset/${encodeURIComponent(params.orderItemSubsetId)}/history`,
|
||||
this.rootUrl + `/order/orderitem/orderitemsubset/${encodeURIComponent(String(params.orderItemSubsetId))}/history`,
|
||||
__body,
|
||||
{
|
||||
headers: __headers,
|
||||
@@ -813,7 +860,7 @@ class OrderService extends __BaseService {
|
||||
__body = params.data;
|
||||
let req = new HttpRequest<any>(
|
||||
'PATCH',
|
||||
this.rootUrl + `/order/${encodeURIComponent(params.orderId)}/orderitem/${encodeURIComponent(params.orderItemId)}/orderitemsubset/${encodeURIComponent(params.orderItemSubsetId)}/changestatus`,
|
||||
this.rootUrl + `/order/${encodeURIComponent(String(params.orderId))}/orderitem/${encodeURIComponent(String(params.orderItemId))}/orderitemsubset/${encodeURIComponent(String(params.orderItemSubsetId))}/changestatus`,
|
||||
__body,
|
||||
{
|
||||
headers: __headers,
|
||||
@@ -983,7 +1030,7 @@ class OrderService extends __BaseService {
|
||||
if (params.completed != null) __params = __params.set('completed', params.completed.toString());
|
||||
let req = new HttpRequest<any>(
|
||||
'GET',
|
||||
this.rootUrl + `/order/${encodeURIComponent(params.orderId)}/item/${encodeURIComponent(params.orderItemId)}/subset/${encodeURIComponent(params.orderItemSubsetId)}/task`,
|
||||
this.rootUrl + `/order/${encodeURIComponent(String(params.orderId))}/item/${encodeURIComponent(String(params.orderItemId))}/subset/${encodeURIComponent(String(params.orderItemSubsetId))}/task`,
|
||||
__body,
|
||||
{
|
||||
headers: __headers,
|
||||
@@ -1029,7 +1076,7 @@ class OrderService extends __BaseService {
|
||||
|
||||
let req = new HttpRequest<any>(
|
||||
'GET',
|
||||
this.rootUrl + `/order/payer/${encodeURIComponent(payerId)}`,
|
||||
this.rootUrl + `/order/payer/${encodeURIComponent(String(payerId))}`,
|
||||
__body,
|
||||
{
|
||||
headers: __headers,
|
||||
@@ -1071,7 +1118,7 @@ class OrderService extends __BaseService {
|
||||
|
||||
let req = new HttpRequest<any>(
|
||||
'PUT',
|
||||
this.rootUrl + `/order/${encodeURIComponent(params.orderId)}/payer/${encodeURIComponent(params.payerId)}`,
|
||||
this.rootUrl + `/order/${encodeURIComponent(String(params.orderId))}/payer/${encodeURIComponent(String(params.payerId))}`,
|
||||
__body,
|
||||
{
|
||||
headers: __headers,
|
||||
@@ -1111,7 +1158,7 @@ class OrderService extends __BaseService {
|
||||
|
||||
let req = new HttpRequest<any>(
|
||||
'GET',
|
||||
this.rootUrl + `/order/shippingaddress/${encodeURIComponent(shippingAddressId)}`,
|
||||
this.rootUrl + `/order/shippingaddress/${encodeURIComponent(String(shippingAddressId))}`,
|
||||
__body,
|
||||
{
|
||||
headers: __headers,
|
||||
@@ -1153,7 +1200,7 @@ class OrderService extends __BaseService {
|
||||
|
||||
let req = new HttpRequest<any>(
|
||||
'PUT',
|
||||
this.rootUrl + `/order/${encodeURIComponent(params.orderId)}/shippingaddress/${encodeURIComponent(params.shippingAddressId)}`,
|
||||
this.rootUrl + `/order/${encodeURIComponent(String(params.orderId))}/shippingaddress/${encodeURIComponent(String(params.shippingAddressId))}`,
|
||||
__body,
|
||||
{
|
||||
headers: __headers,
|
||||
@@ -1254,7 +1301,7 @@ class OrderService extends __BaseService {
|
||||
if (params.code != null) __params = __params.set('code', params.code.toString());
|
||||
let req = new HttpRequest<any>(
|
||||
'GET',
|
||||
this.rootUrl + `/order/ssc/${encodeURIComponent(params.supplierId)}`,
|
||||
this.rootUrl + `/order/ssc/${encodeURIComponent(String(params.supplierId))}`,
|
||||
__body,
|
||||
{
|
||||
headers: __headers,
|
||||
@@ -1337,7 +1384,7 @@ class OrderService extends __BaseService {
|
||||
|
||||
let req = new HttpRequest<any>(
|
||||
'GET',
|
||||
this.rootUrl + `/order/supplier/${encodeURIComponent(supplierId)}`,
|
||||
this.rootUrl + `/order/supplier/${encodeURIComponent(String(supplierId))}`,
|
||||
__body,
|
||||
{
|
||||
headers: __headers,
|
||||
@@ -1414,7 +1461,7 @@ class OrderService extends __BaseService {
|
||||
|
||||
let req = new HttpRequest<any>(
|
||||
'GET',
|
||||
this.rootUrl + `/order/vat/${encodeURIComponent(vatId)}`,
|
||||
this.rootUrl + `/order/vat/${encodeURIComponent(String(vatId))}`,
|
||||
__body,
|
||||
{
|
||||
headers: __headers,
|
||||
@@ -1491,7 +1538,7 @@ class OrderService extends __BaseService {
|
||||
|
||||
let req = new HttpRequest<any>(
|
||||
'GET',
|
||||
this.rootUrl + `/order/logistician/${encodeURIComponent(logisticianId)}`,
|
||||
this.rootUrl + `/order/logistician/${encodeURIComponent(String(logisticianId))}`,
|
||||
__body,
|
||||
{
|
||||
headers: __headers,
|
||||
@@ -1572,6 +1619,22 @@ module OrderService {
|
||||
buyerNumber?: null | string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parameters for OrderRegenerateOrderItemStatusTasks
|
||||
*/
|
||||
export interface OrderRegenerateOrderItemStatusTasksParams {
|
||||
|
||||
/**
|
||||
* Bestellung PK
|
||||
*/
|
||||
orderId: number;
|
||||
|
||||
/**
|
||||
* Aufgaben-Arten
|
||||
*/
|
||||
taskTypes?: Array<string>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parameters for OrderUpdateOrderItem
|
||||
*/
|
||||
|
||||
@@ -46,7 +46,7 @@ class ReceiptService extends __BaseService {
|
||||
if (params.receiptType != null) __params = __params.set('receiptType', params.receiptType.toString());
|
||||
let req = new HttpRequest<any>(
|
||||
'GET',
|
||||
this.rootUrl + `/receipt/order/${encodeURIComponent(params.orderId)}`,
|
||||
this.rootUrl + `/receipt/order/${encodeURIComponent(String(params.orderId))}`,
|
||||
__body,
|
||||
{
|
||||
headers: __headers,
|
||||
|
||||
Reference in New Issue
Block a user