diff --git a/src/pages/Entry/EntryCreate.vue b/src/pages/Entry/EntryCreate.vue index d0a2f7df1..8c434217a 100644 --- a/src/pages/Entry/EntryCreate.vue +++ b/src/pages/Entry/EntryCreate.vue @@ -23,11 +23,11 @@ const stateStore = useStateStore(); const user = state.getUser(); const newEntryForm = reactive({ supplierFk: null, - travelFk: route.query?.travelFk || null, + travelFk: Number(route.query?.travelFk) || null, companyFk: user.value.companyFk || null, }); const suppliersOptions = ref([]); -const travelsOptionsOptions = ref([]); +const travelsOptions = ref([]); const companiesOptions = ref([]); const redirectToEntryBasicData = (_, { id }) => { @@ -47,7 +47,7 @@ const redirectToEntryBasicData = (_, { id }) => { url="Travels/filter" :filter="{ fields: ['id', 'warehouseInName'] }" order="id" - @on-fetch="(data) => (travelsOptionsOptions = data)" + @on-fetch="(data) => (travelsOptions = data)" auto-load /> { :label="t('Travel')" class="full-width" v-model="data.travelFk" - :options="travelsOptionsOptions" + :options="travelsOptions" option-value="id" option-label="warehouseInName" map-options diff --git a/src/pages/Travel/Card/TravelSummary.vue b/src/pages/Travel/Card/TravelSummary.vue index 28f081a02..cf9a9ada0 100644 --- a/src/pages/Travel/Card/TravelSummary.vue +++ b/src/pages/Travel/Card/TravelSummary.vue @@ -301,7 +301,7 @@ async function setTravelData(travelData) { - + diff --git a/src/pages/Travel/Card/TravelThermographs.vue b/src/pages/Travel/Card/TravelThermographs.vue index 226097e31..a0bdf9c41 100644 --- a/src/pages/Travel/Card/TravelThermographs.vue +++ b/src/pages/Travel/Card/TravelThermographs.vue @@ -101,7 +101,7 @@ const openRemoveDialog = async (id) => { }); }; -const redirectToThermographForm = (action, { id = null }) => { +const redirectToThermographForm = (action, id) => { const routeDetails = { name: action === 'create' ? 'TravelThermographsCreate' : 'TravelThermographsEdit', }; diff --git a/src/pages/Travel/TravelCreate.vue b/src/pages/Travel/TravelCreate.vue index 8afacdfd6..abee03562 100644 --- a/src/pages/Travel/TravelCreate.vue +++ b/src/pages/Travel/TravelCreate.vue @@ -36,11 +36,7 @@ onBeforeMount(() => { if (route.query.travelData) { const travelData = JSON.parse(route.query.travelData); for (let key in newTravelForm) { - if (key === 'landed' || key === 'shipped') { - newTravelForm[key] = travelData[key].substring(0, 10); - } else { - newTravelForm[key] = travelData[key]; - } + newTravelForm[key] = travelData[key]; } } }); diff --git a/src/pages/Travel/TravelFilter.vue b/src/pages/Travel/TravelFilter.vue index 62439a2e4..c1c0d1bee 100644 --- a/src/pages/Travel/TravelFilter.vue +++ b/src/pages/Travel/TravelFilter.vue @@ -6,8 +6,7 @@ import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue'; import VnSelectFilter from 'src/components/common/VnSelectFilter.vue'; import VnInput from 'src/components/common/VnInput.vue'; import FetchData from 'components/FetchData.vue'; - -import { toDate } from 'src/filters'; +import VnInputDate from 'components/common/VnInputDate.vue'; const { t } = useI18n(); const props = defineProps({ @@ -60,7 +59,7 @@ const decrement = (paramsObj, key) => { {{ formatFn(tag.value) }} -