-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Development 1.1 update homepage calendar filters #384
Development 1.1 update homepage calendar filters #384
Conversation
for (const event of data) { | ||
updateEventCalendarType(event) | ||
} | ||
filteredEvents.value = [...homeEvents.value] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a reason why we are re-setting the filteredEvents to homeEvents afte setting it in the updateEventCalendarType function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After transforming the homeEvents
to match the format expected by the Full Calendar
, we subsequently load events from the filteredEvents
. Therefore, following any modifications to homeEvents
, where they are aligned to the Full Calendar
event format, it's essential to update the filteredEvents
array. This ensures that any changes are accurately reflected in the calendar events displayed.
undefined, | ||
|
||
) | ||
const requesting = ref<boolean>(false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest using the isLoading variable returned from useAsyncState instead on requesting. Here's an example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, you are right 👍🏻
@@ -6,6 +6,7 @@ const router = createRouter({ | |||
routes: [ | |||
{ path: '/login', component: () => import('@/views/LoginView.vue') }, | |||
{ path: '/', component: () => import('@/views/CalendarView.vue') }, | |||
{ path: '/test', component: () => import('@/views/TestView.vue') }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is this needed for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can be removed, i added it to be used for testing as a testing component, you can hide it if you purpose
@@ -40,7 +40,7 @@ export module Api { | |||
actual_days: number | |||
applying_user: number | any | |||
approval_user: number | |||
user?: Api.User | |||
applying_user_full_name?: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why didn't we add a type variable in vacation like meeting and event interfaces?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if its not there please add it
Description
The issue occurred due to the duplication of events in our system. Presently, we maintain five separate tables: User, Event, Meeting, Public Holiday, and Vacation. Each table has a sequence ID, meaning the first ID assigned to an object in the User table will be
1
, and likewise for the Event table and others. Consequently, when sending all objects to the calendar, if there are duplicated IDs across different tables, the first object will be overwritten by the last object with the same ID.Changes
event type
to ensure uniqueness across different event types. For instance, instead of simply1
, the ID becomesevent1
,meeting1
,holiday1
, and so forth. This modification prevents ID clashes and ensures each event is uniquely identified.Related issues