Merged PR 464: #1390 Currency Pipe bei Bestellungen verwendet

#1390 Currency Pipe bei Bestellungen verwendet
This commit is contained in:
Andreas Schickinger
2021-02-02 15:43:42 +00:00
committed by Lorenz Hilpert
4 changed files with 3 additions and 19 deletions

View File

@@ -24,7 +24,7 @@
{{ order.processingStatus | processingStatus }}
</div>
<div class="order-col">{{ order.orderType | orderType }} | {{ order.shopName }}</div>
<div class="order-col">{{ order.orderValue | orderPrice }} {{ order.currency }} | {{ order.itemsCount }} Artikel</div>
<div class="order-col">{{ order.orderValue | currency: ' ' }} {{ order.currency }} | {{ order.itemsCount }} Artikel</div>
<div class="order-col details">Details</div>
</div>
<div *ngIf="i === orders.length - 1" class="line"></div>

View File

@@ -4,6 +4,5 @@ export * from './gender.pipe';
export * from './address.pipe';
export * from './order-type.pipe';
export * from './processing-status.pipe';
export * from './order-price.pipe';
export * from './pipes.module';
// end:ng42.barrel

View File

@@ -1,14 +0,0 @@
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'orderPrice',
})
export class OrderPricePipe implements PipeTransform {
transform(value: any): string {
let str = `${value}`;
if (str.indexOf('.') < 0) {
str = `${str}.00`;
}
return str.replace('.', ',');
}
}

View File

@@ -4,10 +4,9 @@ import { CountryPipe } from './country.pipe';
import { GenderPipe } from './gender.pipe';
import { OrderTypePipe } from './order-type.pipe';
import { ProcessingStatusPipe } from './processing-status.pipe';
import { OrderPricePipe } from './order-price.pipe';
@NgModule({
exports: [CountryPipe, GenderPipe, AddressPipe, OrderTypePipe, ProcessingStatusPipe, OrderPricePipe],
declarations: [CountryPipe, GenderPipe, AddressPipe, OrderTypePipe, ProcessingStatusPipe, OrderPricePipe],
exports: [CountryPipe, GenderPipe, AddressPipe, OrderTypePipe, ProcessingStatusPipe],
declarations: [CountryPipe, GenderPipe, AddressPipe, OrderTypePipe, ProcessingStatusPipe],
})
export class CustomerPipesModule {}