feat: enhance cart functionality with quantity update and removal features, integrating toast notifications for user feedback
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user