feat: add inline catalog checkout with modals
Replace redirect to /comprar with a 2-step modal flow (cart confirmation + personal data) on the catalog page. Add createCatalogPurchase API endpoint for catalog sales.
This commit is contained in:
@@ -1,67 +1,71 @@
|
||||
class Api {
|
||||
constructor (apiImplementation) {
|
||||
this.apiImplementation = apiImplementation;
|
||||
}
|
||||
constructor(apiImplementation) {
|
||||
this.apiImplementation = apiImplementation;
|
||||
}
|
||||
|
||||
getCustomers() {
|
||||
return this.apiImplementation.getCustomers();
|
||||
}
|
||||
getCustomers() {
|
||||
return this.apiImplementation.getCustomers();
|
||||
}
|
||||
|
||||
getProducts() {
|
||||
return this.apiImplementation.getProducts();
|
||||
}
|
||||
getProducts() {
|
||||
return this.apiImplementation.getProducts();
|
||||
}
|
||||
|
||||
getPaymentMethods() {
|
||||
return this.apiImplementation.getPaymentMethods();
|
||||
}
|
||||
getPaymentMethods() {
|
||||
return this.apiImplementation.getPaymentMethods();
|
||||
}
|
||||
|
||||
getSummaryPurchase(purchaseId) {
|
||||
return this.apiImplementation.getSummaryPurchase(purchaseId);
|
||||
}
|
||||
getSummaryPurchase(purchaseId) {
|
||||
return this.apiImplementation.getSummaryPurchase(purchaseId);
|
||||
}
|
||||
|
||||
getPurchasesForReconciliation() {
|
||||
return this.apiImplementation.getPurchasesForReconciliation();
|
||||
}
|
||||
getPurchasesForReconciliation() {
|
||||
return this.apiImplementation.getPurchasesForReconciliation();
|
||||
}
|
||||
|
||||
getListReconcliations(page=1, itemsPerPage=10) {
|
||||
return this.apiImplementation.getListReconcliations(page, itemsPerPage);
|
||||
}
|
||||
getListReconcliations(page = 1, itemsPerPage = 10) {
|
||||
return this.apiImplementation.getListReconcliations(page, itemsPerPage);
|
||||
}
|
||||
|
||||
getReconciliation(reconciliationId) {
|
||||
return this.apiImplementation.getReconciliation(reconciliationId);
|
||||
}
|
||||
getReconciliation(reconciliationId) {
|
||||
return this.apiImplementation.getReconciliation(reconciliationId);
|
||||
}
|
||||
|
||||
createPurchase(purchase) {
|
||||
return this.apiImplementation.createPurchase(purchase);
|
||||
}
|
||||
createPurchase(purchase) {
|
||||
return this.apiImplementation.createCatalogPurchase(purchase);
|
||||
}
|
||||
|
||||
createReconciliationJar(reconciliation) {
|
||||
return this.apiImplementation.createReconciliationJar(reconciliation);
|
||||
}
|
||||
createCatalogPurchase(purchase) {
|
||||
return this.apiImplementation.createPurchase(purchase);
|
||||
}
|
||||
|
||||
createCustomer(customer) {
|
||||
return this.apiImplementation.createCustomer(customer);
|
||||
}
|
||||
createReconciliationJar(reconciliation) {
|
||||
return this.apiImplementation.createReconciliationJar(reconciliation);
|
||||
}
|
||||
|
||||
getCSVForTryton() {
|
||||
return this.apiImplementation.getCSVForTryton();
|
||||
}
|
||||
createCustomer(customer) {
|
||||
return this.apiImplementation.createCustomer(customer);
|
||||
}
|
||||
|
||||
getProductsFromTryton() {
|
||||
return this.apiImplementation.getProductsFromTryton();
|
||||
}
|
||||
getCSVForTryton() {
|
||||
return this.apiImplementation.getCSVForTryton();
|
||||
}
|
||||
|
||||
getCustomersFromTryton() {
|
||||
return this.apiImplementation.getCustomersFromTryton();
|
||||
}
|
||||
getProductsFromTryton() {
|
||||
return this.apiImplementation.getProductsFromTryton();
|
||||
}
|
||||
|
||||
sendSalesToTryton(){
|
||||
return this.apiImplementation.sendSalesToTryton();
|
||||
}
|
||||
getCustomersFromTryton() {
|
||||
return this.apiImplementation.getCustomersFromTryton();
|
||||
}
|
||||
|
||||
getCurrentUser() {
|
||||
return this.apiImplementation.getCurrentUser();
|
||||
}
|
||||
sendSalesToTryton() {
|
||||
return this.apiImplementation.sendSalesToTryton();
|
||||
}
|
||||
|
||||
getCurrentUser() {
|
||||
return this.apiImplementation.getCurrentUser();
|
||||
}
|
||||
}
|
||||
|
||||
export default Api;
|
||||
|
||||
Reference in New Issue
Block a user