#1510 Bestellinfos Anzeige

This commit is contained in:
Andreas Schickinger
2021-03-09 12:21:49 +01:00
committed by Lorenz Hilpert
parent 4ce08a5a1a
commit dd3a259dc0
6 changed files with 52 additions and 4 deletions

View File

@@ -23,7 +23,7 @@
<div class="order-col bold">
{{ order.processingStatus | processingStatus }}
</div>
<div class="order-col">{{ order.orderType | orderType }} | {{ order.shopName }}</div>
<div class="order-col channel">{{ order.clientChannel | clientChannel }} | {{ getOrderTarget(order) }}</div>
<div class="order-col">{{ order.orderValue | currency: ' ' }} {{ order.currency }} | {{ order.itemsCount }} Artikel</div>
<a [routerLink]="['/customer', customer?.id, 'order', order?.id]" class="order-col details">Details</a>
</div>

View File

@@ -57,7 +57,11 @@ h1 {
}
.order-row {
@apply flex flex-row justify-around bg-white py-4;
@apply flex flex-row justify-between bg-white py-4 px-4;
}
.channel {
width: 230px;
}
.details {

View File

@@ -52,6 +52,18 @@ export class CustomerOrdersComponent implements OnInit, OnDestroy {
);
}
getOrderTarget(orderItem: OrderListItemDTO): string {
if (orderItem.orderType === 2) {
return 'Versand';
}
if (orderItem.targetBranchName) {
return orderItem.targetBranchName;
}
return '';
}
ngOnDestroy() {
this.subs.unsubscribe();
}

View File

@@ -0,0 +1,21 @@
import { Pipe, PipeTransform } from '@angular/core';
import { OrderType } from '@swagger/oms';
@Pipe({
name: 'clientChannel',
})
export class ClientChannelPipe implements PipeTransform {
clientChannelText = {
0: '',
1: 'System',
2: 'Filiale',
4: 'Call Center',
8: 'Online',
16: 'Mobil',
32: 'Back Office',
};
transform(value: OrderType): string {
return this.clientChannelText[value] || '';
}
}

View File

@@ -3,6 +3,7 @@ export * from './country.pipe';
export * from './gender.pipe';
export * from './address.pipe';
export * from './order-type.pipe';
export * from './client-channel.pipe';
export * from './order-status.pipe';
export * from './payment-type.pipe';
export * from './processing-status.pipe';

View File

@@ -6,9 +6,19 @@ import { GenderPipe } from './gender.pipe';
import { OrderTypePipe } from './order-type.pipe';
import { ProcessingStatusPipe } from './processing-status.pipe';
import { PaymentTypePipe } from './payment-type.pipe';
import { ClientChannelPipe } from '.';
@NgModule({
exports: [CountryPipe, GenderPipe, AddressPipe, OrderTypePipe, ProcessingStatusPipe, OrderStatusPipe, PaymentTypePipe],
declarations: [CountryPipe, GenderPipe, AddressPipe, OrderTypePipe, ProcessingStatusPipe, OrderStatusPipe, PaymentTypePipe],
exports: [CountryPipe, GenderPipe, AddressPipe, OrderTypePipe, ProcessingStatusPipe, OrderStatusPipe, PaymentTypePipe, ClientChannelPipe],
declarations: [
CountryPipe,
GenderPipe,
AddressPipe,
OrderTypePipe,
ProcessingStatusPipe,
OrderStatusPipe,
PaymentTypePipe,
ClientChannelPipe,
],
})
export class CustomerPipesModule {}