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
All checks were successful
Build (develop) / Promote (main) / build-and-push-deploy (push) Successful in 7m25s
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -79,8 +79,7 @@ export interface JsonModel {
|
|||||||
],
|
],
|
||||||
})
|
})
|
||||||
export class CartSalesComponent
|
export class CartSalesComponent
|
||||||
implements OnInit, AfterViewInit, OnDestroy, OnChanges
|
implements OnInit, AfterViewInit, OnDestroy, OnChanges {
|
||||||
{
|
|
||||||
public containerRef: ViewContainerRef;
|
public containerRef: ViewContainerRef;
|
||||||
public resultQuestion;
|
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() {
|
showDialogSelectAddress() {
|
||||||
if (this.customer == null) {
|
if (this.customer == null) {
|
||||||
this.titleInformation = 'Selecionar endereço de entrega';
|
this.titleInformation = 'Selecionar endereço de entrega';
|
||||||
@@ -1654,8 +1687,7 @@ export class CartSalesComponent
|
|||||||
|
|
||||||
this.informationDelivery = `Pedido com data de entrega para o dia
|
this.informationDelivery = `Pedido com data de entrega para o dia
|
||||||
${dataTexto}
|
${dataTexto}
|
||||||
- Tipo de entrega: ${
|
- Tipo de entrega: ${dataDelivery.scheduleDelivery ? 'PROGRAMADA' : 'NORMAL'
|
||||||
dataDelivery.scheduleDelivery ? 'PROGRAMADA' : 'NORMAL'
|
|
||||||
}`;
|
}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user