diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index 4a78811e6..de23c1b86 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -765,6 +765,9 @@ supplier: consumption: entry: Entry travel: + search: Search travel + searchInfo: You can search by travel id or name + id: Id travelList: tableVisibleColumns: ref: Reference diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index 2bfe7ec4b..ccac50446 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -757,6 +757,9 @@ supplier: consumption: entry: Entrada travel: + search: Buscar envío + searchInfo: Buscar envío por id o nombre + id: Id travelList: tableVisibleColumns: ref: Referencia diff --git a/src/pages/Travel/Card/TravelCard.vue b/src/pages/Travel/Card/TravelCard.vue index 4e48e6b53..5d8b338ba 100644 --- a/src/pages/Travel/Card/TravelCard.vue +++ b/src/pages/Travel/Card/TravelCard.vue @@ -1,48 +1,7 @@ - + diff --git a/src/pages/Travel/TravelList.vue b/src/pages/Travel/TravelList.vue index 4d2912bf7..a8dc868e4 100644 --- a/src/pages/Travel/TravelList.vue +++ b/src/pages/Travel/TravelList.vue @@ -5,18 +5,18 @@ import { useRouter, useRoute } from 'vue-router'; import VnTable from 'components/VnTable/VnTable.vue'; import { useSummaryDialog } from 'src/composables/useSummaryDialog'; import TravelSummary from './Card/TravelSummary.vue'; -import VnSearchbar from 'components/ui/VnSearchbar.vue'; import { toDate } from 'src/filters'; import { getDateQBadgeColor } from 'src/composables/getDateQBadgeColor.js'; -import RightMenu from 'src/components/common/RightMenu.vue'; import TravelFilter from './TravelFilter.vue'; import VnInputNumber from 'src/components/common/VnInputNumber.vue'; +import VnSection from 'src/components/common/VnSection.vue'; const { viewSummary } = useSummaryDialog(); const router = useRouter(); const { t } = useI18n(); const route = useRoute(); const tableRef = ref(); +const dataKey = 'TravelList'; const $props = defineProps({ id: { type: Number, @@ -189,90 +189,94 @@ const columns = computed(() => [ - - - + + - - - - - - - {{ - t('globals.raid', { - daysInForward: row.daysInForward, - }) - }} + + + + + + {{ + t('globals.raid', { + daysInForward: row.daysInForward, + }) + }} + + + + + - - + {{ toDate(row.shipped) }} + + {{ toDate(row.shipped) }} + + + + + {{ toDate(row.landed) }} + + {{ toDate(row.landed) }} + + + + handleScopeDays(evt.target.value)" + @remove="handleScopeDays()" + class="q-px-xs q-pr-lg" + filled + dense + /> + + - - - {{ toDate(row.shipped) }} - - {{ toDate(row.shipped) }} - - - - - {{ toDate(row.landed) }} - - {{ toDate(row.landed) }} - - - - handleScopeDays(evt.target.value)" - @remove="handleScopeDays()" - class="q-px-xs q-pr-lg" - filled - dense - /> - - + en: diff --git a/src/router/modules/travel.js b/src/router/modules/travel.js index 49272be1e..317c15b0d 100644 --- a/src/router/modules/travel.js +++ b/src/router/modules/travel.js @@ -1,5 +1,80 @@ import { RouterView } from 'vue-router'; +const travelCard = { + name: 'TravelCard', + path: ':id', + component: () => import('src/pages/Travel/Card/TravelCard.vue'), + redirect: { name: 'TravelSummary' }, + meta: { + menu: ['TravelBasicData', 'TravelHistory', 'TravelThermographs'], + }, + children: [ + { + name: 'TravelSummary', + path: 'summary', + meta: { + title: 'summary', + }, + component: () => import('src/pages/Travel/Card/TravelSummary.vue'), + }, + { + name: 'TravelBasicData', + path: 'basic-data', + meta: { + title: 'basicData', + icon: 'vn:settings', + }, + component: () => import('src/pages/Travel/Card/TravelBasicData.vue'), + }, + { + name: 'TravelHistory', + path: 'log', + meta: { + title: 'log', + icon: 'history', + }, + component: () => import('src/pages/Travel/Card/TravelLog.vue'), + }, + { + name: 'TravelThermographs', + path: 'thermographs/:thermographId?', + meta: { + title: 'thermographs', + icon: 'vn:thermometer', + }, + 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' + ), + }, + ], + }, + ] +}; + export default { path: '/travel', name: 'Travel', @@ -7,28 +82,33 @@ export default { title: 'travel', icon: 'local_airport', moduleName: 'Travel', + menu: ['TravelList', 'ExtraCommunity'], }, component: RouterView, redirect: { name: 'TravelMain' }, - menus: { - main: ['TravelList', 'ExtraCommunity'], - card: ['TravelBasicData', 'TravelHistory', 'TravelThermographs'], - }, children: [ { path: '', name: 'TravelMain', component: () => import('src/components/common/VnModule.vue'), - redirect: { name: 'TravelList' }, + redirect: { name: 'TravelIndexMain' }, children: [ { - path: 'list', - name: 'TravelList', - meta: { - title: 'list', - icon: 'view_list', - }, + path: '', + name: 'TravelIndexMain', + redirect: { name: 'TravelList' }, component: () => import('src/pages/Travel/TravelList.vue'), + children: [ + { + name: 'TravelList', + path: 'list', + meta: { + title: 'list', + icon: 'view_list', + }, + }, + travelCard, + ], }, { path: 'extra-community', @@ -50,76 +130,5 @@ export default { }, ], }, - { - name: 'TravelCard', - path: ':id', - component: () => import('src/pages/Travel/Card/TravelCard.vue'), - redirect: { name: 'TravelSummary' }, - children: [ - { - name: 'TravelSummary', - path: 'summary', - meta: { - title: 'summary', - }, - component: () => import('src/pages/Travel/Card/TravelSummary.vue'), - }, - { - name: 'TravelBasicData', - path: 'basic-data', - meta: { - title: 'basicData', - icon: 'vn:settings', - }, - component: () => import('src/pages/Travel/Card/TravelBasicData.vue'), - }, - { - name: 'TravelHistory', - path: 'log', - meta: { - title: 'log', - icon: 'history', - }, - component: () => import('src/pages/Travel/Card/TravelLog.vue'), - }, - { - name: 'TravelThermographs', - path: 'thermographs/:thermographId?', - meta: { - title: 'thermographs', - icon: 'vn:thermometer', - }, - 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' - ), - }, - ], - }, - ], - }, ], };