refactor list styling and enhance DayRow component for improved time entry management
This commit is contained in:
@@ -23,7 +23,7 @@ export const useAttendanceStore = defineStore('attendanceStore', () => {
|
||||
const holidayCount = computed(() => days.value.filter((d) => d.isHolidayLeave)?.length || 0)
|
||||
|
||||
const leaveDayCount = computed(() => {
|
||||
console.log('wywylanie leaveFayCount')
|
||||
// console.log('wywylanie leaveFayCount')
|
||||
return (
|
||||
workingDays.value -
|
||||
days.value.filter(
|
||||
@@ -54,16 +54,16 @@ export const useAttendanceStore = defineStore('attendanceStore', () => {
|
||||
|
||||
for (let d = 1; d <= daysInMonth.value; d++) {
|
||||
const dateStr = `${year.value}-${month.value.toString().padStart(2, '0')}-${d.toString().padStart(2, '0')}`
|
||||
const dayEntries = response.days.filter((day) => day.check_in && day.check_in.startsWith(dateStr))
|
||||
const dayEntries = response.days.filter(
|
||||
(day) => day.check_in && day.check_in.startsWith(dateStr),
|
||||
)
|
||||
|
||||
// Sort entries by check-in time to ensure correct order
|
||||
dayEntries.sort((a, b) => new Date(a.check_in) - new Date(b.check_in))
|
||||
|
||||
const entryTimes = dayEntries.map((entry) => utils.extractTimeFromDateString(entry.check_in))
|
||||
const exitTimes = dayEntries.map((entry) => utils.extractTimeFromDateString(entry.check_out))
|
||||
const attendance_reason_ids = dayEntries.flatMap(
|
||||
(entry) => entry.attendance_reason_ids || [],
|
||||
)
|
||||
const attendance_reason_ids = dayEntries.flatMap((entry) => entry.attendance_reason_ids || [])
|
||||
|
||||
const isPublicHoliday = response.public_holidays.some((h) => h.date === dateStr)
|
||||
const alert = attendance_reason_ids.length > 0
|
||||
|
||||
Reference in New Issue
Block a user