mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
#4048 Bestellkanal - Umstellung auf orderSource
This commit is contained in:
@@ -78,7 +78,7 @@
|
||||
</div>
|
||||
<div class="detail" data-detail-id="Bestellkanal">
|
||||
<div class="label">Bestellkanal</div>
|
||||
<div class="value">{{ orderItem?.clientChannel | environmentChannel }}</div>
|
||||
<div class="value">{{ order?.features?.orderSource }}</div>
|
||||
</div>
|
||||
<div class="detail justify-space-between" [ngSwitch]="orderItem.processingStatus" data-detail-id="Geaendert">
|
||||
<ng-container *ifRole="'Store'; else dateCallCenter">
|
||||
|
||||
@@ -23,7 +23,6 @@ import { UiSelectOptionComponent } from '@ui/select';
|
||||
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';
|
||||
import { ProcessingStatusPipe } from '../pipes/processing-status.pipe';
|
||||
import { validateSsc } from '../validators/ssc.validator';
|
||||
|
||||
@@ -32,7 +31,7 @@ import { validateSsc } from '../validators/ssc.validator';
|
||||
templateUrl: 'goods-in-out-order-edit.component.html',
|
||||
styleUrls: ['goods-in-out-order-edit.component.scss'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
providers: [EnvironmentChannelPipe, ProcessingStatusPipe, DatePipe],
|
||||
providers: [ProcessingStatusPipe, DatePipe],
|
||||
})
|
||||
export class SharedGoodsInOutOrderEditComponent implements OnChanges, OnDestroy {
|
||||
@ViewChildren('autosize') autosize: QueryList<CdkTextareaAutosize>;
|
||||
@@ -77,7 +76,6 @@ export class SharedGoodsInOutOrderEditComponent implements OnChanges, OnDestroy
|
||||
|
||||
constructor(
|
||||
private fb: UntypedFormBuilder,
|
||||
private environmentChannelPipe: EnvironmentChannelPipe,
|
||||
private processingStatusPipe: ProcessingStatusPipe,
|
||||
private datePipe: DatePipe,
|
||||
private omsService: DomainOmsService,
|
||||
@@ -111,7 +109,7 @@ export class SharedGoodsInOutOrderEditComponent implements OnChanges, OnDestroy
|
||||
orderId: fb.control({ value: items[0].orderId, disabled: true }),
|
||||
orderNumber: fb.control({ value: items[0].orderNumber, disabled: true }),
|
||||
orderDate: fb.control({ value: this.datePipe.transform(items[0].orderDate), disabled: true }),
|
||||
clientChannel: fb.control({ value: this.environmentChannelPipe.transform(items[0].clientChannel), disabled: true }),
|
||||
clientChannel: fb.control({ value: items[0].features?.orderSource, disabled: true }),
|
||||
buyerNumber: fb.control({ value: items[0].buyerNumber, disabled: true }),
|
||||
items: fb.array([]),
|
||||
notificationChannel: this.notificationsGroup,
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
import { Injectable, Pipe, PipeTransform } from '@angular/core';
|
||||
import { EnvironmentChannel } from '@swagger/oms';
|
||||
|
||||
@Pipe({
|
||||
name: 'environmentChannel',
|
||||
})
|
||||
@Injectable()
|
||||
export class EnvironmentChannelPipe implements PipeTransform {
|
||||
channels = new Map([
|
||||
[0, ''],
|
||||
[2, 'Filiale'],
|
||||
[4, 'HSC'],
|
||||
[8, 'Online'],
|
||||
]);
|
||||
|
||||
transform(clientChannel: EnvironmentChannel = 0, join: string = ' '): any {
|
||||
if (clientChannel === 0) {
|
||||
return this.channels.get(0);
|
||||
}
|
||||
|
||||
const channelOnlineMobileApp: number = clientChannel;
|
||||
if (channelOnlineMobileApp === 8 || channelOnlineMobileApp === 16 || channelOnlineMobileApp === 24) {
|
||||
return 'hugendubel.de';
|
||||
}
|
||||
|
||||
const channels: string[] = [];
|
||||
this.channels.forEach((value, key) => {
|
||||
// tslint:disable-next-line: no-bitwise
|
||||
if ((clientChannel | key) === key) {
|
||||
channels.push(value);
|
||||
}
|
||||
});
|
||||
return channels.join(join);
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { EnvironmentChannelPipe } from './environment-channel.pipe';
|
||||
import { ProcessingStatusOptionsKeyValuePipe, ProcessingStatusOptionsPipe } from './processing-status-options.pipe';
|
||||
import { PaymentTypePipe } from './payment-type.pipe';
|
||||
import { ProcessingStatusPipe } from './processing-status.pipe';
|
||||
@@ -18,7 +17,6 @@ import { AddToPreviousCompartmentCodeLabelPipe } from './add-to-prevoius-compart
|
||||
ProcessingStatusPipe,
|
||||
TitlePipe,
|
||||
ShowCompartmentCodePipe,
|
||||
EnvironmentChannelPipe,
|
||||
ProcessingStatusOptionsKeyValuePipe,
|
||||
PaymentTypePipe,
|
||||
ShowTagsPipe,
|
||||
@@ -33,7 +31,6 @@ import { AddToPreviousCompartmentCodeLabelPipe } from './add-to-prevoius-compart
|
||||
ProcessingStatusPipe,
|
||||
TitlePipe,
|
||||
ShowCompartmentCodePipe,
|
||||
EnvironmentChannelPipe,
|
||||
ProcessingStatusOptionsKeyValuePipe,
|
||||
PaymentTypePipe,
|
||||
ShowTagsPipe,
|
||||
|
||||
Reference in New Issue
Block a user