0
0
Fork 0

feat: remove deprecatedHour fn

This commit is contained in:
Javier Segarra 2024-05-08 07:52:18 +02:00
parent 4d490652ea
commit 9a6dd65774
2 changed files with 4 additions and 17 deletions

View File

@ -5,7 +5,7 @@ import { useI18n } from 'vue-i18n';
import CardDescriptor from 'components/ui/CardDescriptor.vue'; import CardDescriptor from 'components/ui/CardDescriptor.vue';
import VnLv from 'src/components/ui/VnLv.vue'; import VnLv from 'src/components/ui/VnLv.vue';
import ZoneDescriptorMenuItems from './ZoneDescriptorMenuItems.vue'; import { toTimeFormat } from 'src/filters/date';
import useCardDescription from 'src/composables/useCardDescription'; import useCardDescription from 'src/composables/useCardDescription';
@ -40,13 +40,6 @@ const data = ref(useCardDescription());
const setData = (entity) => { const setData = (entity) => {
data.value = useCardDescription(entity.ref, entity.id); data.value = useCardDescription(entity.ref, entity.id);
}; };
function extractHour(dateTime) {
const date = new Date(dateTime);
const hours = date.getHours().toString().padStart(2, '0');
const minutes = date.getMinutes().toString().padStart(2, '0');
return `${hours}:${minutes}`;
}
</script> </script>
<template> <template>
@ -81,7 +74,7 @@ function extractHour(dateTime) {
<template #body="{ entity }"> <template #body="{ entity }">
{{ console.log('entity', entity) }} {{ console.log('entity', entity) }}
<VnLv :label="t('Agency')" :value="entity.agencyMode.name" /> <VnLv :label="t('Agency')" :value="entity.agencyMode.name" />
<VnLv :label="t('Closing hour')" :value="extractHour(entity.hour)" /> <VnLv :label="t('Closing hour')" :value="toTimeFormat(entity.hour)" />
<VnLv :label="t('zoneing days')" :value="entity.zoneingDays" /> <VnLv :label="t('zoneing days')" :value="entity.zoneingDays" />
<VnLv :label="t('Price')" :value="entity.price" /> <VnLv :label="t('Price')" :value="entity.price" />
<VnLv :label="t('Bonus')" :value="entity.bonus" /> <VnLv :label="t('Bonus')" :value="entity.bonus" />

View File

@ -9,6 +9,7 @@ import CardList from 'components/ui/CardList.vue';
import VnLv from 'components/ui/VnLv.vue'; import VnLv from 'components/ui/VnLv.vue';
import FetchData from 'src/components/FetchData.vue'; import FetchData from 'src/components/FetchData.vue';
import { useSummaryDialog } from 'src/composables/useSummaryDialog'; import { useSummaryDialog } from 'src/composables/useSummaryDialog';
import { toTimeFormat } from 'src/filters/date';
const quasar = useQuasar(); const quasar = useQuasar();
const arrayData = useArrayData('ZoneList'); const arrayData = useArrayData('ZoneList');
@ -38,13 +39,6 @@ async function remove(row) {
// //
} }
} }
function extractHour(dateTime) {
const date = new Date(dateTime);
const hours = date.getHours().toString().padStart(2, '0');
const minutes = date.getMinutes().toString().padStart(2, '0');
return `${hours}:${minutes}`;
}
</script> </script>
<template> <template>
@ -81,7 +75,7 @@ function extractHour(dateTime) {
/> />
<VnLv <VnLv
:label="t('zone.list.close')" :label="t('zone.list.close')"
:value="extractHour(row?.hour)" :value="toTimeFormat(row?.hour)"
/> />
<VnLv :label="t('zone.list.price')" :value="row?.price" /> <VnLv :label="t('zone.list.price')" :value="row?.price" />
</template> </template>