diff --git a/src/data/store-dumies.json b/src/data/store-dumies.json
deleted file mode 100644
index 1234c92..0000000
--- a/src/data/store-dumies.json
+++ /dev/null
@@ -1,146 +0,0 @@
-[
- {
- "status": "Loading",
- "date": "2025-01-08T03:24:18.821Z",
- "shipment_code": "ETA1010",
- "product": "Maiz",
- "truck_type": "Torton",
- "truck_plates": "YUC9101",
- "driver_name": "Alexandro Uc",
- "note": "Comentario de prueba",
- "weigth_load": 2000,
- "company": "ALTOS"
- },
- {
- "status": "Loading",
- "date": "2025-02-08T03:24:18.821Z",
- "shipment_code": "ETA1010",
- "product": "Maiz",
- "truck_type": "Torton",
- "truck_plates": "YUC9102",
- "driver_name": "Jose Santos",
- "note": "Comentario de prueba",
- "weigth_load": 233.2,
- "company": "ALTOS"
- },
- {
- "status": "Loading",
- "date": "2025-02-08T01:00:57.627Z",
- "shipment_code": "ETA1007",
- "product": "Maiz",
- "truck_type": "Full",
- "truck_plates": "YUC9102",
- "driver_name": "Raul Torres",
- "note": "Comentario de prueba",
- "weigth_load": 3000,
- "company": "SOPAA"
- },
- {
- "status": "Loading",
- "date": "2025-02-09T19:36:13.562Z",
- "shipment_code": "ETA1014",
- "product": "Maiz",
- "truck_type": "Torton",
- "truck_plates": "YUC9123",
- "driver_name": "Manuel Yuc",
- "note": "Comentario de prueba",
- "weigth_load": 233.2,
- "company": "USIOA"
- },
- {
- "status": "Loading",
- "date": "2025-02-08T00:29:10.471Z",
- "shipment_code": "ETA1021",
- "product": "Maiz",
- "truck_type": "Torton",
- "truck_plates": "YUC9101",
- "driver_name": "Alexandro Uc",
- "note": "Comentario de prueba",
- "weigth_load": 233.2,
- "company": "ALTOS"
- },
- {
- "status": "Loading",
- "date": "2025-02-08T02:47:28.823Z",
- "shipment_code": "ETA1013",
- "product": "Maiz",
- "truck_type": "Torton",
- "truck_plates": "YUC9120",
- "driver_name": "Ramiro Alcocer",
- "note": "Comentario de prueba",
- "weigth_load": 3992,
- "company": "JSKA"
- },
- {
- "status": "Loading",
- "date": "2025-02-09T02:47:28.823Z",
- "shipment_code": "ETA1023",
- "product": "Maiz",
- "truck_type": "Full Trailer",
- "truck_plates": "YUC9101",
- "driver_name": "Alexandro Uc",
- "note": "Comentario de prueba",
- "weigth_load": 233.2,
- "company": "ALTOS"
- },
- {
- "status": "Transit",
- "date": "2025-02-08T02:47:28.823Z",
- "shipment_code": "ETA1024",
- "product": "Frijol",
- "truck_type": "Torton",
- "truck_plates": "DKS9101",
- "driver_name": "Sergio Martinez",
- "note": "Comentario de prueba",
- "weigth_load": 233.20,
- "company": "SILA"
- },
- {
- "status": "Loading",
- "date": "2025-02-08T02:47:28.823Z",
- "shipment_code": "ETA1025",
- "product": "Maiz",
- "truck_type": "Torton",
- "truck_plates": "YUC9101",
- "driver_name": "Alexandro Uc",
- "note": "Comentario de prueba",
- "weigth_load": 233.2,
- "company": "ALTOS"
- },
- {
- "status": "Loading",
- "date": "2025-02-09T02:31:45.679Z",
- "shipment_code": "ETA1006",
- "product": "Cebada",
- "truck_type": "Torton",
- "truck_plates": "DLS9101",
- "driver_name": "Juan Perez",
- "note": "Comentario de prueba",
- "weigth_load": 233.200,
- "company": "SOA"
- },
- {
- "status": "Loading",
- "date": "2025-02-08T00:42:43.588Z",
- "shipment_code": "ETA1022",
- "product": "Cacahuate",
- "truck_type": "Torton",
- "truck_plates": "YUC9101",
- "driver_name": "Alexandro Uc",
- "note": "Comentario de prueba",
- "weigth_load": 233.2,
- "company": "ALTOS"
- },
- {
- "status": "Loading",
- "date": "2025-02-09T00:57:26.432Z",
- "shipment_code": "ETA1016",
- "product": "Maiz",
- "truck_type": "Caja Seca",
- "truck_plates": "DSA9101",
- "driver_name": "Alexandro Uc",
- "note": "Comentario de prueba",
- "weigth_load": 233.2,
- "company": "ALTOS"
- }
-]
\ No newline at end of file
diff --git a/src/router/index.js b/src/router/index.js
index f323b8a..3b717cc 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -94,7 +94,10 @@ const router = createRouter({
{
path: 'profile',
name: 'profile',
- meta: { permissions: ['role_shipper', 'role_carrier'] },
+ meta: {
+ permissions: ['role_shipper', 'role_carrier'],
+ roles: ['manager', 'staff', 'owner', 'warehouse']
+ },
component: () => import('../views/EditProfileView.vue'),
},
{
diff --git a/src/stores/loads.js b/src/stores/loads.js
index 5c01ee0..34aa08d 100644
--- a/src/stores/loads.js
+++ b/src/stores/loads.js
@@ -15,6 +15,7 @@ export const useLoadsStore = defineStore('load', () => {
const openModalEdit = ref(false);
const openAttachmentsModal = ref(false);
const openProposalsModal = ref(false);
+ const openCarrierInfoModal = ref(false);
const getLoadsAll = async(reload = false) => {
const companyid = localStorage.getItem('id');
@@ -72,7 +73,8 @@ export const useLoadsStore = defineStore('load', () => {
}
if(loadsWarehouse.value.length <= 0 || reload) {
try {
- const {data} = await getCalendar(filterStr);
+ const endpoint = `/v1/loads/find?${filterStr}`;
+ const {data} = await api.get(endpoint);
loadsWarehouse.value = data.data;
} catch (error) {
loadsWarehouse.value = [];
@@ -159,6 +161,7 @@ export const useLoadsStore = defineStore('load', () => {
loadsTotal.value = 0;
loadsCurrentPage.value = 0;
proposalsOfLoads.value = [];
+ loadsWarehouse.value = [];
openModalEdit.value = false;
openAttachmentsModal.value = false;
openProposalsModal.value = false;
@@ -170,6 +173,7 @@ export const useLoadsStore = defineStore('load', () => {
openModalEdit,
openProposalsModal,
openAttachmentsModal,
+ openCarrierInfoModal,
getProposalsOfLoads,
getCompanyLoads,
getLoadsAll,
diff --git a/src/views/EditProfileView.vue b/src/views/EditProfileView.vue
index 21a718f..f77df9a 100644
--- a/src/views/EditProfileView.vue
+++ b/src/views/EditProfileView.vue
@@ -61,7 +61,7 @@
const result = await auth.updateProfile(userData)
loading.value = false;
if(result.msg === 'success') {
- msgSuccess.value = t('errors.msgUpdateUser');
+ msgSuccess.value = t('profile.msgUpdateUser');
clearMessages();
} else {
msgError.value = t('errors.generic');
diff --git a/src/views/LoadsPublishedView.vue b/src/views/LoadsPublishedView.vue
index de72111..2e3f6bb 100644
--- a/src/views/LoadsPublishedView.vue
+++ b/src/views/LoadsPublishedView.vue
@@ -9,6 +9,7 @@
import CardEmpty from '../components/CardEmpty.vue';
import Pagination from '../components/Pagination.vue';
import { useI18n } from 'vue-i18n';
+import CarrierInfoModal from '../components/CarrierInfoModal.vue';
const loadStore = useLoadsStore();
const loading = ref(false);
@@ -94,6 +95,7 @@
+
{{ t('loads.title') }}
diff --git a/src/views/store/StoreView.vue b/src/views/store/StoreView.vue
index 500899e..e4e90d3 100644
--- a/src/views/store/StoreView.vue
+++ b/src/views/store/StoreView.vue
@@ -1,13 +1,11 @@
@@ -30,7 +36,7 @@
{{ status.status }}
-
{{ t('directory.typeTruck') }}: {{ load?.vehicle?.truck_typ ?? 'No definido' }}
+
{{ t('directory.typeTruck') }}: {{ load?.vehicle?.truck_type ?? 'No definido' }}
{{ t('vehicles.truckPlates') }}: {{ load?.vehicle?.circulation_serial_number ?? 'No definido' }}
{{ t('vehicles.trailerPlates') }} 1: {{ load?.vehicle?.trailer_plate_1 }}
@@ -38,7 +44,7 @@
{{ t('vehicles.trailerPlates') }} 2: {{ load?.vehicle?.trailer_plate_2 }}
-
{{ t('labels.driver') }}: {{ load?.vehicle?.driver ?? 'No asignado' }}
+
{{ t('labels.driver') }}: {{ driver }}