style: fix lint formatting in django-api.js (quotes, indentation)
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import AuthService from '@/services/auth';
|
import AuthService from "@/services/auth";
|
||||||
import http from '@/services/http';
|
import http from "@/services/http";
|
||||||
|
|
||||||
class DjangoApi {
|
class DjangoApi {
|
||||||
constructor() {
|
constructor() {
|
||||||
@@ -7,85 +7,91 @@ class DjangoApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getRequest(url) {
|
getRequest(url) {
|
||||||
return http.get(url).then(r => r.data);
|
return http.get(url).then((r) => r.data);
|
||||||
}
|
}
|
||||||
|
|
||||||
postRequest(url, payload) {
|
postRequest(url, payload) {
|
||||||
return http.post(url, payload).then(r => r.data);
|
return http.post(url, payload).then((r) => r.data);
|
||||||
}
|
}
|
||||||
|
|
||||||
getCustomers() {
|
getCustomers() {
|
||||||
const url = this.base + '/don_confiao/api/customers/';
|
const url = this.base + "/don_confiao/api/customers/";
|
||||||
return this.getRequest(url);
|
return this.getRequest(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
getProducts() {
|
getProducts() {
|
||||||
const url = this.base + '/don_confiao/api/products/';
|
const url = this.base + "/don_confiao/api/products/";
|
||||||
return this.getRequest(url);
|
return this.getRequest(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
getPaymentMethods() {
|
getPaymentMethods() {
|
||||||
const url = this.base + '/don_confiao/payment_methods/all/select_format';
|
const url =
|
||||||
|
this.base + "/don_confiao/payment_methods/all/select_format";
|
||||||
return this.getRequest(url);
|
return this.getRequest(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
getSummaryPurchase(purchaseId) {
|
getSummaryPurchase(purchaseId) {
|
||||||
const url = this.base + `/don_confiao/resumen_compra_json/${purchaseId}`;
|
const url =
|
||||||
|
this.base + `/don_confiao/resumen_compra_json/${purchaseId}`;
|
||||||
return this.getRequest(url);
|
return this.getRequest(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
getPurchasesForReconciliation() {
|
getPurchasesForReconciliation() {
|
||||||
const url = this.base + '/don_confiao/purchases/for_reconciliation';
|
const url = this.base + "/don_confiao/purchases/for_reconciliation";
|
||||||
return this.getRequest(url);
|
return this.getRequest(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
getListReconcliations(page, itemsPerPage) {
|
getListReconcliations(page, itemsPerPage) {
|
||||||
const url = this.base + `/don_confiao/api/reconciliate_jar/?page=${page}&page_size=${itemsPerPage}`;
|
const url =
|
||||||
|
this.base +
|
||||||
|
`/don_confiao/api/reconciliate_jar/?page=${page}&page_size=${itemsPerPage}`;
|
||||||
return this.getRequest(url);
|
return this.getRequest(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
getReconciliation(reconciliationId) {
|
getReconciliation(reconciliationId) {
|
||||||
const url = this.base + `/don_confiao/api/reconciliate_jar/${reconciliationId}/`;
|
const url =
|
||||||
|
this.base +
|
||||||
|
`/don_confiao/api/reconciliate_jar/${reconciliationId}/`;
|
||||||
return this.getRequest(url);
|
return this.getRequest(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
createPurchase(purchase) {
|
createPurchase(purchase) {
|
||||||
const url = this.base + '/don_confiao/api/sales/';
|
const url = this.base + "/don_confiao/api/sales/";
|
||||||
return this.postRequest(url, purchase);
|
return this.postRequest(url, purchase);
|
||||||
}
|
}
|
||||||
|
|
||||||
createReconciliationJar(reconciliation) {
|
createReconciliationJar(reconciliation) {
|
||||||
const url = this.base + '/don_confiao/reconciliate_jar';
|
const url = this.base + "/don_confiao/reconciliate_jar";
|
||||||
return this.postRequest(url, reconciliation);
|
return this.postRequest(url, reconciliation);
|
||||||
}
|
}
|
||||||
|
|
||||||
createCustomer(customer) {
|
createCustomer(customer) {
|
||||||
const url = this.base + '/don_confiao/api/customers/';
|
const url = this.base + "/don_confiao/api/customers/";
|
||||||
return this.postRequest(url, customer);
|
return this.postRequest(url, customer);
|
||||||
}
|
}
|
||||||
|
|
||||||
getCSVForTryton() {
|
getCSVForTryton() {
|
||||||
const url = this.base + '/don_confiao/api/sales/for_tryton';
|
const url = this.base + "/don_confiao/api/sales/for_tryton";
|
||||||
return this.getRequest(url);
|
return this.getRequest(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
getProductsFromTryton() {
|
getProductsFromTryton() {
|
||||||
const url = this.base + '/don_confiao/api/importar_productos_de_tryton';
|
const url = this.base + "/don_confiao/api/importar_productos_de_tryton";
|
||||||
return this.postRequest(url, {});
|
return this.postRequest(url, {});
|
||||||
}
|
}
|
||||||
|
|
||||||
getCustomersFromTryton() {
|
getCustomersFromTryton() {
|
||||||
const url = this.base + '/don_confiao/api/importar_clientes_de_tryton';
|
const url = this.base + "/don_confiao/api/importar_clientes_de_tryton";
|
||||||
return this.postRequest(url, {});
|
return this.postRequest(url, {});
|
||||||
}
|
}
|
||||||
|
|
||||||
sendSalesToTryton() {
|
sendSalesToTryton() {
|
||||||
const url = this.base + '/don_confiao/api/enviar_ventas_a_tryton';
|
const url = this.base + "/don_confiao/api/enviar_ventas_a_tryton";
|
||||||
return this.postRequest(url, {});
|
return this.postRequest(url, {});
|
||||||
}
|
}
|
||||||
|
|
||||||
getCurrentUser() {
|
getCurrentUser() {
|
||||||
const url = this.base + '/api/users/me/';
|
const url = this.base + "/api/users/me/";
|
||||||
return this.getRequest(url);
|
return this.getRequest(url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user