feat(arc): hide calendar event button#357
Conversation
|
Looks like you did not link an issue to this PR. If this PR completes a task, consider linking it. |
There was a problem hiding this comment.
Pull request overview
This PR adds support for hiding/showing calendar events in the Abstract Resource Calendar (ARC) by introducing a hidden field on calendar events, adding a UI toggle (with confirmation dialog), and fetching hidden events for privileged users.
Changes:
- Added
hiddenboolean field to the CalendarEvent resource schema and default values. - Added a new ARC hide/show button component and rendered it on calendar event cards.
- Extended
fetchResourcesto accept query/search parameters and used it to request hidden events forsolvro_admin.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/features/resources/schemas/calendar-event-schema.ts | Adds hidden to CalendarEventSchema. |
| src/features/resources/data/resource-metadata.ts | Adds hidden: false to CalendarEvents default form values. |
| src/features/backend/utils/get-key.ts | Adds a hideResource mutation key helper. |
| src/features/backend/api/fetch-resources.ts | Adds support for passing search/query parameters to resource fetches. |
| src/features/abstract-resource-calendar/components/arc-hide-button-with-dialog.tsx | New client component to hide/show items via a mutation + dialog. |
| src/features/abstract-resource-calendar/components/arc-event-card.tsx | Renders the new hide/show control on event cards. |
| src/features/abstract-resource-calendar/components/abstract-resource-calendar.tsx | Fetches hidden items for solvro_admin via ?showHidden=true. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Co do tooltipa już to był issue z DeleteButtonWithDialog, który kopiowałem do tego przycisku i przerabiałem. Od razu to poprawiłem też w nim, więc też nie powinien zostawać. Z wyłączaniem przycisku faktycznie bez sensu, aczkolwiek nie wiem czy całkowicie wyrzucenie wyłączenia, tak jak to zmieniłem, jest dobrym ruchem. To wyglada jakby Tanstack Query nie aktualizował stanu isSuccess po wykonaniu zapytania i dlatego nadal był wyłączony. |
2c4db37 to
f61cc1e
Compare
Co-authored-by: Copilot <copilot@github.com>
df14d50 to
247e43e
Compare



No description provided.