feat: add cart sales component with Kendo UI grid for displaying shopping items.
All checks were successful
Build (develop) / Promote (main) / build-and-push-deploy (push) Successful in 7m25s

This commit is contained in:
Luis Eduardo Estevao
2026-02-10 11:09:26 -03:00
parent 461b3b01f7
commit 806ac42eae
2 changed files with 321 additions and 1025 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -79,8 +79,7 @@ export interface JsonModel {
],
})
export class CartSalesComponent
implements OnInit, AfterViewInit, OnDestroy, OnChanges
{
implements OnInit, AfterViewInit, OnDestroy, OnChanges {
public containerRef: ViewContainerRef;
public resultQuestion;
@@ -1579,6 +1578,40 @@ export class CartSalesComponent
}
}
public updateCart(
cartId: string,
customerId: number,
addressId: number,
saleStoreId: string,
paymentPlanId: number,
billingId: string
) {
this.shoppingService.getShopping(cartId).subscribe((shopping) => {
if (shopping) {
shopping.codcli = customerId;
shopping.codendentcli = addressId;
shopping.saleStore = saleStoreId;
shopping.codplpag = paymentPlanId;
shopping.codcob = billingId;
this.shoppingService.updateShopping(shopping).subscribe(
(response) => {
console.log('Cart updated successfully:', response);
this.store.dispatch(
new LoadShoppingAction(this.shoppingService.getCart())
);
this.loadFormOrder();
},
(error) => {
console.error('Error updating cart:', error);
}
);
} else {
console.error('Shopping cart not found for ID:', cartId);
}
});
}
showDialogSelectAddress() {
if (this.customer == null) {
this.titleInformation = 'Selecionar endereço de entrega';
@@ -1654,8 +1687,7 @@ export class CartSalesComponent
this.informationDelivery = `Pedido com data de entrega para o dia
${dataTexto}
- Tipo de entrega: ${
dataDelivery.scheduleDelivery ? 'PROGRAMADA' : 'NORMAL'
- Tipo de entrega: ${dataDelivery.scheduleDelivery ? 'PROGRAMADA' : 'NORMAL'
}`;
}