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