mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-31 09:37:15 +01:00
#1510 Bestellinfos Anzeige
This commit is contained in:
committed by
Lorenz Hilpert
parent
4ce08a5a1a
commit
dd3a259dc0
@@ -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>
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
21
apps/page/customer/src/lib/pipes/client-channel.pipe.ts
Normal file
21
apps/page/customer/src/lib/pipes/client-channel.pipe.ts
Normal 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] || '';
|
||||
}
|
||||
}
|
||||
@@ -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';
|
||||
|
||||
@@ -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 {}
|
||||
|
||||
Reference in New Issue
Block a user