This commit is contained in:
parent
262ab78305
commit
9c861f7544
|
@ -73,7 +73,7 @@ onBeforeMount(async () => {
|
||||||
() => [$props.url, $props.filter],
|
() => [$props.url, $props.filter],
|
||||||
async () => {
|
async () => {
|
||||||
if (!isSameDataKey.value) await getData();
|
if (!isSameDataKey.value) await getData();
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -103,6 +103,13 @@ function getValueFromPath(path) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const emit = defineEmits(['onFetch']);
|
const emit = defineEmits(['onFetch']);
|
||||||
|
|
||||||
|
const iconModule = computed(() => route.matched[1].meta.icon);
|
||||||
|
const toModule = computed(() =>
|
||||||
|
route.matched[1].path.split('/').length > 2
|
||||||
|
? route.matched[1].redirect
|
||||||
|
: route.matched[1].children[0].redirect,
|
||||||
|
);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -115,10 +122,10 @@ const emit = defineEmits(['onFetch']);
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
size="md"
|
size="md"
|
||||||
:icon="$route.matched[1].meta.icon"
|
:icon="iconModule"
|
||||||
color="white"
|
color="white"
|
||||||
class="link"
|
class="link"
|
||||||
:to="`/${$route.meta.moduleName}`"
|
:to="toModule"
|
||||||
>
|
>
|
||||||
<QTooltip>
|
<QTooltip>
|
||||||
{{ t('globals.goToModuleIndex') }}
|
{{ t('globals.goToModuleIndex') }}
|
||||||
|
|
|
@ -57,6 +57,7 @@ const { openConfirmationModal } = useVnConfirm();
|
||||||
:title="data.title"
|
:title="data.title"
|
||||||
:subtitle="data.subtitle"
|
:subtitle="data.subtitle"
|
||||||
:summary="$props.summary"
|
:summary="$props.summary"
|
||||||
|
:to-module="{ name: 'WorkerDepartment' }"
|
||||||
@on-fetch="
|
@on-fetch="
|
||||||
(data) => {
|
(data) => {
|
||||||
department = data;
|
department = data;
|
||||||
|
@ -73,7 +74,7 @@ const { openConfirmationModal } = useVnConfirm();
|
||||||
openConfirmationModal(
|
openConfirmationModal(
|
||||||
t('Are you sure you want to delete it?'),
|
t('Are you sure you want to delete it?'),
|
||||||
t('Delete department'),
|
t('Delete department'),
|
||||||
removeDepartment
|
removeDepartment,
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
|
|
|
@ -29,6 +29,7 @@ const filter = {
|
||||||
:url="`Parkings/${entityId}`"
|
:url="`Parkings/${entityId}`"
|
||||||
title="code"
|
title="code"
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
|
:to-module="{ name: 'ParkingList' }"
|
||||||
>
|
>
|
||||||
<template #body="{ entity }">
|
<template #body="{ entity }">
|
||||||
<VnLv :label="t('globals.code')" :value="entity.code" />
|
<VnLv :label="t('globals.code')" :value="entity.code" />
|
||||||
|
|
|
@ -3,7 +3,6 @@ import { ref, computed } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import VnTable from 'components/VnTable/VnTable.vue';
|
import VnTable from 'components/VnTable/VnTable.vue';
|
||||||
import FetchData from 'src/components/FetchData.vue';
|
import FetchData from 'src/components/FetchData.vue';
|
||||||
import VehicleSearchbar from 'src/pages/Route/Vehicle/VehicleSearchbar.vue';
|
|
||||||
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||||
import VehicleSummary from 'src/pages/Route/Vehicle/Card/VehicleSummary.vue';
|
import VehicleSummary from 'src/pages/Route/Vehicle/Card/VehicleSummary.vue';
|
||||||
import VnInput from 'src/components/common/VnInput.vue';
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
<script setup>
|
|
||||||
import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
|
||||||
</script>
|
|
||||||
<template>
|
|
||||||
<VnSearchbar
|
|
||||||
data-key="VehicleList"
|
|
||||||
url="Vehicles/filter"
|
|
||||||
:label="$t('vehicle.searchbar.label')"
|
|
||||||
:info="$t('vehicle.searchbar.info')"
|
|
||||||
/>
|
|
||||||
</template>
|
|
Loading…
Reference in New Issue