Merged PR 1565: #4077 Responsive Design Display Cart-Checkout Process Tab Correctly

#4077 Responsive Design Display Cart-Checkout Process Tab Correctly
This commit is contained in:
Nino Righi
2023-06-14 14:31:47 +00:00
committed by Lorenz Hilpert
parent 5c9f4c5b21
commit 45989d7abd
2 changed files with 19 additions and 13 deletions

View File

@@ -710,8 +710,12 @@ export class CheckoutReviewComponent extends ComponentStore<CheckoutReviewCompon
}
async patchProcess(processId: number) {
this.applicationService.patchProcess(processId, {
type: 'cart-checkout',
});
const process = await this.applicationService.getProcessById$(processId).pipe(first()).toPromise();
if (!!process) {
this.applicationService.patchProcess(process.id, {
name: `${process.name} Bestellbestätigung`,
type: 'cart-checkout',
});
}
}
}

View File

@@ -11,16 +11,18 @@
<span class="truncate">
{{ process?.name }}
</span>
<button
type="button"
class="rounded-full px-3 h-[2.375rem] font-bold text-p1 flex flex-row items-center justify-between shopping-cart-count ml-4"
[class.active]="isActive$ | async"
[routerLink]="['/kunde', (process$ | async)?.id, 'cart', 'review']"
(click)="$event?.preventDefault(); $event?.stopPropagation()"
>
<shared-icon icon="shopping-cart-bold" [size]="22"></shared-icon>
<span class="shopping-cart-count-label ml-2">{{ cartItemCount$ | async }}</span>
</button>
<ng-container *ngIf="process?.type !== 'cart-checkout'">
<button
type="button"
class="rounded-full px-3 h-[2.375rem] font-bold text-p1 flex flex-row items-center justify-between shopping-cart-count ml-4"
[class.active]="isActive$ | async"
[routerLink]="['/kunde', (process$ | async)?.id, 'cart', 'review']"
(click)="$event?.preventDefault(); $event?.stopPropagation()"
>
<shared-icon icon="shopping-cart-bold" [size]="22"></shared-icon>
<span class="shopping-cart-count-label ml-2">{{ cartItemCount$ | async }}</span>
</button>
</ng-container>
</a>
<button type="button" class="tab-close-btn -ml-4 h-12 w-12 grid justify-center items-center" (click)="close()">
<shared-icon icon="close" [size]="28"></shared-icon>