diff --git a/src/composables/useState.js b/src/composables/useState.js index 6ad8eb22c..e0b742a73 100644 --- a/src/composables/useState.js +++ b/src/composables/useState.js @@ -9,6 +9,7 @@ const user = ref({ lang: '', darkMode: null, companyFk: null, + warehouseFk: null, }); const roles = ref([]); diff --git a/src/i18n/en/index.js b/src/i18n/en/index.js index aa1a4946d..424976df4 100644 --- a/src/i18n/en/index.js +++ b/src/i18n/en/index.js @@ -1078,7 +1078,7 @@ export default { travelCreate: 'New travel', basicData: 'Basic data', history: 'Log', - thermographs: 'Termographs', + thermographs: 'Thermograph', }, summary: { confirmed: 'Confirmed', @@ -1112,12 +1112,19 @@ export default { delivered: 'Delivered', received: 'Received', }, - termographs: { + thermographs: { code: 'Code', temperature: 'Temperature', state: 'State', destination: 'Destination', created: 'Created', + thermograph: 'Thermograph', + reference: 'Reference', + type: 'Type', + company: 'Company', + warehouse: 'Warehouse', + travelFileDescription: 'Travel id { travelId }', + file: 'File', }, }, item: { diff --git a/src/i18n/es/index.js b/src/i18n/es/index.js index 4ff78e6e1..f726dbd4e 100644 --- a/src/i18n/es/index.js +++ b/src/i18n/es/index.js @@ -1112,12 +1112,19 @@ export default { delivered: 'Enviada', received: 'Recibida', }, - termographs: { + thermographs: { code: 'Código', temperature: 'Temperatura', state: 'Estado', destination: 'Destino', created: 'Fecha creación', + thermograph: 'Termógrafo', + reference: 'Referencia', + type: 'Tipo', + company: 'Empresa', + warehouse: 'Almacén', + travelFileDescription: 'Id envío { travelId }', + file: 'Fichero', }, }, item: { diff --git a/src/pages/Travel/Card/TravelCard.vue b/src/pages/Travel/Card/TravelCard.vue index 34ecc25ee..1b185592b 100644 --- a/src/pages/Travel/Card/TravelCard.vue +++ b/src/pages/Travel/Card/TravelCard.vue @@ -17,7 +17,6 @@ const stateStore = useStateStore(); - diff --git a/src/pages/Travel/Card/TravelTermographs.vue b/src/pages/Travel/Card/TravelTermographs.vue deleted file mode 100644 index 0d43843e7..000000000 --- a/src/pages/Travel/Card/TravelTermographs.vue +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - - - - - - - - {{ t('Add termograph') }} - - - - - -es: - Add termograph: Añadir termógrafo - - diff --git a/src/pages/Travel/Card/TravelThermographs.vue b/src/pages/Travel/Card/TravelThermographs.vue new file mode 100644 index 000000000..33160f2b5 --- /dev/null +++ b/src/pages/Travel/Card/TravelThermographs.vue @@ -0,0 +1,188 @@ + + + + + + + + + + {{ t('Download file') }} + + + + + + + {{ t('Edit file') }} + + + + + + + {{ t('Remove thermograph') }} + + + + + + + + + + {{ t('Add thermograph') }} + + + + + +es: + Add thermograph: Añadir termógrafo + Download file: Descargar fichero + Edit file: Editar fichero + Remove thermograph: Eliminar termógrafo + Thermograph removed: Termógrafo eliminado + Are you sure you want to remove the thermograph?: ¿Seguro que quieres quitar el termógrafo? + diff --git a/src/pages/Travel/Card/TravelThermographsForm.vue b/src/pages/Travel/Card/TravelThermographsForm.vue new file mode 100644 index 000000000..da0a4ee2b --- /dev/null +++ b/src/pages/Travel/Card/TravelThermographsForm.vue @@ -0,0 +1,271 @@ + + + + (thermographsOptions = data)" + :filter="thermographFilter" + auto-load + /> + (dmsTypesOptions = data)" + auto-load + /> + (companiesOptions = data)" + :filter="{ order: 'code' }" + auto-load + /> + (warehousesOptions = data)" + :filter="{ order: 'name' }" + auto-load + /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ t('Select files') }} + + + + + + + + + + + +es: + Select files: Selecciona ficheros + Thermograph created: Termógrafo creado + diff --git a/src/router/modules/travel.js b/src/router/modules/travel.js index f9b2153da..5d9884dc2 100644 --- a/src/router/modules/travel.js +++ b/src/router/modules/travel.js @@ -88,8 +88,35 @@ export default { title: 'thermographs', icon: 'vn:thermometer', }, - component: () => - import('src/pages/Travel/Card/TravelTermographs.vue'), + redirect: { + name: 'TravelThermographsIndex', + }, + children: [ + { + name: 'TravelThermographsIndex', + path: 'index', + component: () => + import('src/pages/Travel/Card/TravelThermographs.vue'), + }, + { + name: 'TravelThermographsCreate', + path: 'create', + props: { viewAction: 'create' }, + component: () => + import( + 'src/pages/Travel/Card/TravelThermographsForm.vue' + ), + }, + { + name: 'TravelThermographsEdit', + path: 'edit', + props: { viewAction: 'edit' }, + component: () => + import( + 'src/pages/Travel/Card/TravelThermographsForm.vue' + ), + }, + ], }, ], },