Skip to content

Commit

Permalink
fix: 1. removed dynamic class names for attendance colours
Browse files Browse the repository at this point in the history
2. made the colour shades more balanced

(cherry picked from commit b4087ce)
  • Loading branch information
asmitahase authored and mergify[bot] committed Nov 8, 2024
1 parent 2dd274a commit ad2dcbb
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions frontend/src/components/AttendanceCalendar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<div v-for="index in firstOfMonth.endOf('M').get('D')">
<div
class="h-8 w-8 flex rounded-full mx-auto"
:class="getEventOnDate(index) && `bg-${colorMap[getEventOnDate(index)]}`"
:class="getEventOnDate(index) && colorMap[getEventOnDate(index)]"
>
<span class="text-gray-800 text-sm font-medium m-auto">
{{ index }}
Expand All @@ -47,7 +47,7 @@
<div class="grid grid-cols-4 mx-2">
<div v-for="status in summaryStatuses" class="flex flex-col gap-1">
<div class="flex flex-row gap-1 items-center">
<span class="rounded full h-3 w-3" :class="`bg-${colorMap[status]}`" />
<span class="rounded full h-3 w-3" :class="colorMap[status]" />
<span class="text-gray-600 text-sm font-medium leading-5"> {{ __(status) }} </span>
</div>
<span class="text-gray-800 text-base font-semibold leading-6 mx-auto">
Expand All @@ -69,12 +69,12 @@ const __ = inject("$translate")
const firstOfMonth = ref(dayjs().date(1).startOf("D"))
const colorMap = {
Present: "green-100",
"Work From Home": "green-100",
"Half Day": "yellow-100",
Absent: "red-100",
"On Leave": "blue-100",
Holiday: "gray-100",
Present: "bg-green-300",
"Work From Home": "bg-green-300",
"Half Day": "bg-yellow-200",
Absent: "bg-red-200",
"On Leave": "bg-blue-300",
Holiday: "bg-gray-300",
}
// __("Present"), __("Half Day"), __("Absent"), __("On Leave"), __("Work From Home")
Expand Down

0 comments on commit ad2dcbb

Please sign in to comment.