diff --git a/src/components/common/VnInputTime.vue b/src/components/common/VnInputTime.vue index e10838672..9475426ea 100644 --- a/src/components/common/VnInputTime.vue +++ b/src/components/common/VnInputTime.vue @@ -44,7 +44,7 @@ const formattedTime = computed({ if (time?.length > 5) time = dateToTime(time); if (!props.timeOnly) { const hours = time.split(':'); - const date = Date.vnNew(); + const date = model.value ?? Date.vnNew(); date.setHours(hours[0], hours[1], 0); time = date.toISOString(); } diff --git a/src/pages/Worker/Card/WorkerTimeControl.vue b/src/pages/Worker/Card/WorkerTimeControl.vue index c11dd4522..172e3570a 100644 --- a/src/pages/Worker/Card/WorkerTimeControl.vue +++ b/src/pages/Worker/Card/WorkerTimeControl.vue @@ -575,7 +575,6 @@ onMounted(async () => { {{ secondsToHoursMinutes(day.dayData?.workedHours) }} - {{ day.dayData?.dated }} { } } }; - -// 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]; -// });