-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Public holidays featrue, re-aligned the home-page calender.
- Loading branch information
1 parent
ed42d38
commit 9c8dbfb
Showing
23 changed files
with
415 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
84 changes: 53 additions & 31 deletions
84
client/src/componants/calendar/CalendarEventsFilter.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,72 +1,94 @@ | ||
<script lang="ts"> | ||
import type { eventNameType } from '../../utils/types'; | ||
export let eventNames: Set<eventNameType>; | ||
function eventChanger(event: eventNameType) { | ||
if (eventNames.has(event)) { | ||
eventNames.delete(event); | ||
eventNames = new Set([...eventNames]); | ||
} else { | ||
eventNames.add(event); | ||
eventNames = new Set([...eventNames]); | ||
} | ||
import type { eventNameType } from '../../utils/types'; | ||
import { CalenderEventEmojeTyoe } from "../../utils/enums" | ||
export let eventNames: Set<eventNameType>; | ||
function eventChanger(event: eventNameType) { | ||
if (eventNames.has(event)) { | ||
eventNames.delete(event); | ||
eventNames = new Set([...eventNames]); | ||
} else { | ||
eventNames.add(event); | ||
eventNames = new Set([...eventNames]); | ||
} | ||
} | ||
</script> | ||
|
||
<div class="row align-items-center mt-4"> | ||
<div class="col-6 d-flex justify-content-center mb-2"> | ||
|
||
<div class="card filter mt-4"> | ||
<div class="card-title mt-4" style="margin-left: 15px;"> | ||
<strong>Calendar Filters</strong> | ||
<br /> | ||
<small>Click on any filter to hide the value of it from the calendar</small> | ||
</div> | ||
<div class="row align-items-center p-4"> | ||
<div class="col-6 d-flex justify-content-start"> | ||
<!-- svelte-ignore a11y-click-events-have-key-events --> | ||
<div class="task--danger hint-labels d-flex flex-row justify-content-between" | ||
on:click={() => {eventChanger('meeting');}} | ||
> | ||
<span> 💼 Meeting </span> | ||
<span>Meetings {CalenderEventEmojeTyoe.meeting}</span> | ||
<span> {eventNames.has('meeting') ? '✔️' : '❌'} </span> | ||
</div> | ||
</div> | ||
<div class="col-6 d-flex justify-content-start mb-2"> | ||
<div class="col-6 d-flex justify-content-end"> | ||
<!-- svelte-ignore a11y-click-events-have-key-events --> | ||
<div | ||
class="task--info hint-labels d-flex flex-row justify-content-between" | ||
class="task--info hint-labels d-flex flex-row justify-content-between" | ||
on:click={() => { | ||
eventChanger('event'); | ||
}} | ||
> | ||
<span> 🎉 Event </span> | ||
<span>Events {CalenderEventEmojeTyoe.event}</span> | ||
<span> {eventNames.has('event') ? '✔️' : '❌'} </span> | ||
</div> | ||
</div> | ||
<div class="col-6 d-flex mb-4 justify-content-center"> | ||
<div class="col-6 d-flex mt-2 justify-content-start"> | ||
<!-- svelte-ignore a11y-click-events-have-key-events --> | ||
<div | ||
class="task--warning hint-labels d-flex flex-row justify-content-between" | ||
on:click={() => { | ||
eventChanger('vacation'); | ||
}} | ||
> | ||
<span> 🌴 Vacation </span> | ||
<span>Vacations {CalenderEventEmojeTyoe.vacation}</span> | ||
<span> {eventNames.has('vacation') ? '✔️' : '❌'} </span> | ||
</div> | ||
</div> | ||
<div class="col-6 d-flex mb-4 justify-content-start"> | ||
<div class="col-6 d-flex mt-2 justify-content-end"> | ||
<!-- svelte-ignore a11y-click-events-have-key-events --> | ||
<div | ||
class="task--success hint-labels d-flex flex-row justify-content-between" | ||
on:click={() => { | ||
eventChanger('public_holiday'); | ||
}} | ||
> | ||
<span>Public-Holidays {CalenderEventEmojeTyoe.publicHoliday}</span> | ||
<span> {eventNames.has('public_holiday') ? '✔️' : '❌'} </span> | ||
</div> | ||
</div> | ||
<div class="col-6 d-flex mt-2 justify-content-center"> | ||
<!-- svelte-ignore a11y-click-events-have-key-events --> | ||
<div | ||
class="task--primary hint-labels d-flex flex-row justify-content-between" | ||
on:click={() => { | ||
eventChanger('birthday'); | ||
}} | ||
> | ||
<span> 🎂 Birthday </span> | ||
<span>Birthday {CalenderEventEmojeTyoe.birthday}</span> | ||
<span> {eventNames.has('birthday') ? '✔️' : '❌'} </span> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<style> | ||
.hint-labels { | ||
cursor: pointer; | ||
border-radius: 0.5rem; | ||
padding: 0.5rem; | ||
width: 10rem; | ||
} | ||
|
||
<style scoped> | ||
.hint-labels { | ||
cursor: pointer; | ||
border-radius: 0.5rem; | ||
padding: 0.5rem; | ||
width: 100%; | ||
text-align: center !important; | ||
font-weight: 600; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.