forked from verdnatura/salix-front
fix: refs #7323 fix workerTimeControl form
This commit is contained in:
parent
74c36a28b2
commit
243a8cbdc6
|
@ -44,7 +44,7 @@ const formattedTime = computed({
|
||||||
if (time?.length > 5) time = dateToTime(time);
|
if (time?.length > 5) time = dateToTime(time);
|
||||||
if (!props.timeOnly) {
|
if (!props.timeOnly) {
|
||||||
const hours = time.split(':');
|
const hours = time.split(':');
|
||||||
const date = Date.vnNew();
|
const date = model.value ?? Date.vnNew();
|
||||||
date.setHours(hours[0], hours[1], 0);
|
date.setHours(hours[0], hours[1], 0);
|
||||||
time = date.toISOString();
|
time = date.toISOString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -575,7 +575,6 @@ onMounted(async () => {
|
||||||
<span class="q-mb-md text-sm text-body1">
|
<span class="q-mb-md text-sm text-body1">
|
||||||
{{ secondsToHoursMinutes(day.dayData?.workedHours) }}
|
{{ secondsToHoursMinutes(day.dayData?.workedHours) }}
|
||||||
</span>
|
</span>
|
||||||
{{ day.dayData?.dated }}
|
|
||||||
<QIcon
|
<QIcon
|
||||||
name="add_circle"
|
name="add_circle"
|
||||||
color="primary"
|
color="primary"
|
||||||
|
|
|
@ -4,7 +4,6 @@ import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
import { QCalendarMonth } from '@quasar/quasar-ui-qcalendar/src/index.js';
|
import { QCalendarMonth } from '@quasar/quasar-ui-qcalendar/src/index.js';
|
||||||
import QCalendarMonthWrapper from 'src/components/ui/QCalendarMonthWrapper.vue';
|
import QCalendarMonthWrapper from 'src/components/ui/QCalendarMonthWrapper.vue';
|
||||||
console.log(QCalendarMonth);
|
|
||||||
const $props = defineProps({
|
const $props = defineProps({
|
||||||
modelValue: {
|
modelValue: {
|
||||||
type: String,
|
type: String,
|
||||||
|
@ -119,22 +118,6 @@ const paintWorkWeeks = async () => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// const w = computed(() => {
|
|
||||||
// const spanishWeekdays = ['L', 'M', 'X', 'J', 'V', 'S', 'D'];
|
|
||||||
// const englishWeekdays = [1, 2, 3, 4, 5, 6, 0];
|
|
||||||
|
|
||||||
// if (locale.value === 'es') return spanishWeekdays;
|
|
||||||
// return englishWeekdays;
|
|
||||||
// // return locale.value === 'en'
|
|
||||||
// // ? englishWeekdays
|
|
||||||
// // : spanishWeekdays.map((day) => (day === 3 ? 'X' : day.toString()));
|
|
||||||
// });
|
|
||||||
// const weekdays = computed(() => {
|
|
||||||
// return locale.value === 'es'
|
|
||||||
// ? console.log([1, 2, 3, 4, 5, 6, 0]) //{ 1: 'L', 2: 'M', 3: 'X', 4: 'J', 5: 'V', 6: 'S', 0: 'D' }
|
|
||||||
// : [1, 2, 3, 4, 5, 6, 0];
|
|
||||||
// });
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
@ -76,8 +76,6 @@ onBeforeMount(() => {
|
||||||
@on-data-saved="onDataSaved"
|
@on-data-saved="onDataSaved"
|
||||||
>
|
>
|
||||||
<template #form-inputs="{ data }">
|
<template #form-inputs="{ data }">
|
||||||
{{ $props }}
|
|
||||||
{{ data }}
|
|
||||||
<VnInputTime
|
<VnInputTime
|
||||||
v-if="!isEditMode"
|
v-if="!isEditMode"
|
||||||
:label="t('Hour')"
|
:label="t('Hour')"
|
||||||
|
|
Loading…
Reference in New Issue