fix(checkout): disable cart access

This commit is contained in:
2026-08-21 15:50:12 -03:00
parent c24a8b946d
commit 195ac73aed
9 changed files with 111 additions and 15 deletions

View File

@@ -5,7 +5,7 @@ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/co
imports: [],
templateUrl: './cart-icon.component.html',
styleUrl: './cart-icon.component.scss',
changeDetection: ChangeDetectionStrategy.OnPush
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class CartIconComponent {
readonly quantity = input<number | null | undefined>(undefined);
@@ -13,6 +13,10 @@ export class CartIconComponent {
readonly ariaLabel = input<string>('Carrito de compras');
protected readonly hasQuantity = computed(() => {
if (this.disabled()) {
return false;
}
const q = this.quantity();
return q !== null && q !== undefined && q > 0;
});