mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
Merged PR 475: #1410 Belegnummer Link deaktiviert
#1410 Belegnummer Link deaktiviert, Fallback auf Organisation Name, wenn kein Customer Name vorhanden
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
<div class="order">
|
||||
<div class="order-container">
|
||||
<div class="label">Belegnummer</div>
|
||||
<div class="data order-number" (click)="goToDetails()" [ngClass]="{ download: isDownload }">#{{ orderNumber }}</div>
|
||||
<div class="data order-number" [ngClass]="{ download: isDownload }">#{{ orderNumber }}</div>
|
||||
</div>
|
||||
<div class="order-container">
|
||||
<div class="label">Bestelldatum</div>
|
||||
|
||||
@@ -60,8 +60,6 @@
|
||||
position: absolute;
|
||||
width: 300px;
|
||||
left: 140px;
|
||||
color: #1f466c;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
div.download {
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
import { Component, OnInit, Input, Output, EventEmitter, ChangeDetectionStrategy } from '@angular/core';
|
||||
import { Store } from '@ngxs/store';
|
||||
import { ChangeCurrentRoute } from 'apps/sales/src/app/core/store/actions/process.actions';
|
||||
import { AddBreadcrumb } from 'apps/sales/src/app/core/store/actions/breadcrumb.actions';
|
||||
import { Router } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'app-confirmation-overview',
|
||||
@@ -26,26 +22,11 @@ export class ConfirmationOverviewComponent implements OnInit {
|
||||
@Input() orderBranchAddress: string;
|
||||
@Output() printOrder: EventEmitter<number> = new EventEmitter();
|
||||
|
||||
constructor(private store: Store, private router: Router) {}
|
||||
constructor() {}
|
||||
|
||||
ngOnInit() {}
|
||||
|
||||
print() {
|
||||
this.printOrder.emit(this.orderId);
|
||||
}
|
||||
|
||||
goToDetails() {
|
||||
const route = `/customer/${this.customerId}/order/${this.orderId}`;
|
||||
this.store.dispatch(new ChangeCurrentRoute(route));
|
||||
this.store.dispatch(
|
||||
new AddBreadcrumb(
|
||||
{
|
||||
name: 'Bestelldetails',
|
||||
path: route,
|
||||
},
|
||||
'checkout'
|
||||
)
|
||||
);
|
||||
this.router.navigate([route]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,7 +154,15 @@ export class CartConfirmationComponent implements OnInit, OnDestroy {
|
||||
|
||||
private processCustomerAddress(customer: User) {
|
||||
this.customerId = customer.id;
|
||||
this.customerName = `${customer.first_name} ${customer.last_name}`;
|
||||
|
||||
if (customer.first_name != null && customer.last_name != null) {
|
||||
this.customerName = `${customer.first_name} ${customer.last_name}`;
|
||||
} else if (customer.organisation?.name != null) {
|
||||
this.customerName = customer.organisation?.name;
|
||||
} else {
|
||||
this.customerName = '';
|
||||
}
|
||||
|
||||
this.email = customer.email;
|
||||
let delAddress = '';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user