Files
don_confiao_frontend/src/services/api.js
aserrador e816ae3e7d 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.
2026-05-28 17:13:22 -05:00

72 lines
1.8 KiB
JavaScript

class Api {
constructor(apiImplementation) {
this.apiImplementation = apiImplementation;
}
getCustomers() {
return this.apiImplementation.getCustomers();
}
getProducts() {
return this.apiImplementation.getProducts();
}
getPaymentMethods() {
return this.apiImplementation.getPaymentMethods();
}
getSummaryPurchase(purchaseId) {
return this.apiImplementation.getSummaryPurchase(purchaseId);
}
getPurchasesForReconciliation() {
return this.apiImplementation.getPurchasesForReconciliation();
}
getListReconcliations(page = 1, itemsPerPage = 10) {
return this.apiImplementation.getListReconcliations(page, itemsPerPage);
}
getReconciliation(reconciliationId) {
return this.apiImplementation.getReconciliation(reconciliationId);
}
createPurchase(purchase) {
return this.apiImplementation.createCatalogPurchase(purchase);
}
createCatalogPurchase(purchase) {
return this.apiImplementation.createPurchase(purchase);
}
createReconciliationJar(reconciliation) {
return this.apiImplementation.createReconciliationJar(reconciliation);
}
createCustomer(customer) {
return this.apiImplementation.createCustomer(customer);
}
getCSVForTryton() {
return this.apiImplementation.getCSVForTryton();
}
getProductsFromTryton() {
return this.apiImplementation.getProductsFromTryton();
}
getCustomersFromTryton() {
return this.apiImplementation.getCustomersFromTryton();
}
sendSalesToTryton() {
return this.apiImplementation.sendSalesToTryton();
}
getCurrentUser() {
return this.apiImplementation.getCurrentUser();
}
}
export default Api;