diff --git a/src/components/CodeDialog.vue b/src/components/CodeDialog.vue
deleted file mode 100644
index 5158c11..0000000
--- a/src/components/CodeDialog.vue
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-
-
- Ingrese el c贸digo
-
-
-
-
-
-
-
- Aceptar
- Cancelar
-
-
-
-
-
-
diff --git a/src/components/NavBar.vue b/src/components/NavBar.vue
index a5abadc..2ca0199 100644
--- a/src/components/NavBar.vue
+++ b/src/components/NavBar.vue
@@ -79,9 +79,14 @@
diff --git a/src/pages/cuadrar_tarro.vue b/src/pages/cuadrar_tarro.vue
index fb60ff4..9035119 100644
--- a/src/pages/cuadrar_tarro.vue
+++ b/src/pages/cuadrar_tarro.vue
@@ -1,20 +1,19 @@
-
- showComponent = verified"/>
-
-
+
diff --git a/src/pages/cuadres_de_tarro.vue b/src/pages/cuadres_de_tarro.vue
index 739a1e9..8678601 100644
--- a/src/pages/cuadres_de_tarro.vue
+++ b/src/pages/cuadres_de_tarro.vue
@@ -1,20 +1,19 @@
-
- showComponent = verified" />
-
-
+
diff --git a/src/pages/sincronizar_clientes_tryton.vue b/src/pages/sincronizar_clientes_tryton.vue
index 510f814..625c874 100644
--- a/src/pages/sincronizar_clientes_tryton.vue
+++ b/src/pages/sincronizar_clientes_tryton.vue
@@ -1,8 +1,5 @@
-
- showComponent = verified"/>
-
-
+
馃攧 Sincronizaci贸n de Clientes
@@ -44,11 +41,15 @@
+
diff --git a/src/pages/sincronizar_productos_tryton.vue b/src/pages/sincronizar_productos_tryton.vue
index adec5f6..fcd74b0 100644
--- a/src/pages/sincronizar_productos_tryton.vue
+++ b/src/pages/sincronizar_productos_tryton.vue
@@ -1,8 +1,5 @@
-
- showComponent = verified"/>
-
-
+
馃攧 Sincronizaci贸n de Productos
@@ -39,16 +36,24 @@
+
diff --git a/src/pages/sincronizar_ventas_tryton.vue b/src/pages/sincronizar_ventas_tryton.vue
index a6359ed..35fc356 100644
--- a/src/pages/sincronizar_ventas_tryton.vue
+++ b/src/pages/sincronizar_ventas_tryton.vue
@@ -1,8 +1,5 @@
-
- showComponent = verified"/>
-
-
+
馃攧 Sincronizaci贸n de Ventas
@@ -35,16 +32,24 @@
diff --git a/src/services/api.js b/src/services/api.js
index d683e15..cd9c455 100644
--- a/src/services/api.js
+++ b/src/services/api.js
@@ -31,10 +31,6 @@ class Api {
return this.apiImplementation.getReconciliation(reconciliationId);
}
- isValidAdminCode(code) {
- return this.apiImplementation.isValidAdminCode(code);
- }
-
createPurchase(purchase) {
return this.apiImplementation.createPurchase(purchase);
}
diff --git a/src/services/django-api.js b/src/services/django-api.js
index d0536fd..b44c5e3 100644
--- a/src/services/django-api.js
+++ b/src/services/django-api.js
@@ -49,11 +49,6 @@ class DjangoApi {
return this.getRequest(url);
}
- isValidAdminCode(code) {
- const url = this.base + `/don_confiao/api/admin_code/validate/${code}`
- return this.getRequest(url)
- }
-
createPurchase(purchase) {
const url = this.base + '/don_confiao/api/sales/';
return this.postRequest(url, purchase);
diff --git a/src/stores/auth.js b/src/stores/auth.js
new file mode 100644
index 0000000..a9b373d
--- /dev/null
+++ b/src/stores/auth.js
@@ -0,0 +1,19 @@
+import { defineStore } from 'pinia'
+
+export const useAuthStore = defineStore('auth', {
+ state: () => ({
+ user: null
+ }),
+ getters: {
+ isAdmin: (state) => state.user?.role === 'administrator',
+ isAuthenticated: (state) => !!state.user
+ },
+ actions: {
+ setUser(user) {
+ this.user = user
+ },
+ clearUser() {
+ this.user = null
+ }
+ }
+})