feat: enhance cart functionality with quantity update and removal features, integrating toast notifications for user feedback

This commit is contained in:
2026-07-02 10:38:26 -03:00
parent f2cc42e0cc
commit c9d8265790
5 changed files with 91 additions and 13 deletions

View File

@@ -10,7 +10,7 @@
</header>
<div class="d-grid gap-2 flex-grow-1 overflow-y-auto cart-items-container">
@for (item of items(); track item.product + item.discountedPrice) {
@for (item of items(); track item.product + item.discountedPrice + resetKey(); let idx = $index) {
<app-cart-item
[imageUrl]="item.imageUrl"
[product]="item.product"
@@ -19,6 +19,8 @@
[discountPercentage]="item.discountPercentage"
[attributes]="item.attributes"
[quantity]="item.quantity"
(quantityChange)="onItemQuantityChange(idx, $event)"
(remove)="onItemRemove(idx)"
/>
}
</div>