diff --git a/src/components/CrudModel.vue b/src/components/CrudModel.vue index 75353a35a..17fc8fc4a 100644 --- a/src/components/CrudModel.vue +++ b/src/components/CrudModel.vue @@ -225,15 +225,19 @@ function getDifferences(obj1, obj2) { delete obj2.$index; for (let key in obj1) { - if (obj2[key] && obj1[key] !== obj2[key]) { + if (obj2[key] && JSON.stringify(obj1[key]) !== JSON.stringify(obj2[key])) { diff[key] = obj2[key]; } } for (let key in obj2) { - if (obj1[key] === undefined || obj1[key] !== obj2[key]) { + if ( + obj1[key] === undefined || + JSON.stringify(obj1[key]) !== JSON.stringify(obj2[key]) + ) { diff[key] = obj2[key]; } } + return diff; } diff --git a/src/i18n/en/index.js b/src/i18n/en/index.js index 85a82ebe5..8d0e0a9cc 100644 --- a/src/i18n/en/index.js +++ b/src/i18n/en/index.js @@ -926,6 +926,15 @@ export default { province: 'Province', mobile: 'Mobile', }, + agencyTerms: { + agencyFk: 'Agency', + minimumM3: 'Minimum M3', + packagePrice: 'Package Price', + kmPrice: 'Km Price', + m3Price: 'M3 Price', + routePrice: 'Route price', + minimumKm: 'Minimum Km', + }, }, travel: { pageTitles: { diff --git a/src/i18n/es/index.js b/src/i18n/es/index.js index 44ce18cc9..96e0177a5 100644 --- a/src/i18n/es/index.js +++ b/src/i18n/es/index.js @@ -925,6 +925,15 @@ export default { province: 'Provincia', mobile: 'Móvil', }, + agencyTerms: { + agencyFk: 'Agencia', + minimumM3: 'M3 mínimos', + packagePrice: 'Precio bulto', + kmPrice: 'Precio Km', + m3Price: 'Precio M3', + routePrice: 'Precio ruta', + minimumKm: 'Km mínimos', + }, }, travel: { pageTitles: { diff --git a/src/pages/Supplier/Card/SupplierAgencyTerm.vue b/src/pages/Supplier/Card/SupplierAgencyTerm.vue index 2a0c341cf..a300ae8e7 100644 --- a/src/pages/Supplier/Card/SupplierAgencyTerm.vue +++ b/src/pages/Supplier/Card/SupplierAgencyTerm.vue @@ -1 +1,139 @@ -Supplier agency term + + + (agenciesOptions = data)" + auto-load + /> + + + + + + + + + {{ row.agency?.name }} + + + + + + + + + + + + + + + + + + + + + + + + + + {{ t('Remove row') }} + + + + + + + + + + + {{ t('supplier.list.newSupplier') }} + + + + + + es: + Remove row: Eliminar fila + diff --git a/src/pages/Supplier/Card/SupplierAgencyTermCreate.vue b/src/pages/Supplier/Card/SupplierAgencyTermCreate.vue new file mode 100644 index 000000000..00f0b868f --- /dev/null +++ b/src/pages/Supplier/Card/SupplierAgencyTermCreate.vue @@ -0,0 +1,113 @@ + + + + (agenciesOptions = data)" + auto-load + /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/pages/Supplier/Card/SupplierConsumption.vue b/src/pages/Supplier/Card/SupplierConsumption.vue index df1dead17..4504c8251 100644 --- a/src/pages/Supplier/Card/SupplierConsumption.vue +++ b/src/pages/Supplier/Card/SupplierConsumption.vue @@ -1 +1,36 @@ -Supplier consumption + + + + (suppliersConsumption = data)" + :filter="{ + where: { supplierFk: route.params.id }, + order: ['itemTypeFk', 'itemName', 'itemSize'], + }" + auto-load + /> + + + + + + + + + + + + + +es: + diff --git a/src/router/modules/Supplier.js b/src/router/modules/Supplier.js index 76b485d6b..d341ddc25 100644 --- a/src/router/modules/Supplier.js +++ b/src/router/modules/Supplier.js @@ -160,6 +160,12 @@ export default { component: () => import('src/pages/Supplier/Card/SupplierAgencyTerm.vue'), }, + { + path: 'agency-term/create', + name: 'SupplierAgencyTermCreate', + component: () => + import('src/pages/Supplier/Card/SupplierAgencyTermCreate.vue'), + }, ], }, ],