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.
72 lines
1.8 KiB
JavaScript
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;
|