Skip to content

feat(arc): hide calendar event button#357

Open
GTR1701 wants to merge 8 commits into
mainfrom
feat/arc-hide-event
Open

feat(arc): hide calendar event button#357
GTR1701 wants to merge 8 commits into
mainfrom
feat/arc-hide-event

Conversation

@GTR1701
Copy link
Copy Markdown
Member

@GTR1701 GTR1701 commented May 11, 2026

No description provided.

Copilot AI review requested due to automatic review settings May 11, 2026 10:24
@GTR1701 GTR1701 requested a review from michalges as a code owner May 11, 2026 10:24
@github-actions
Copy link
Copy Markdown

Looks like you did not link an issue to this PR. If this PR completes a task, consider linking it.

@GTR1701 GTR1701 linked an issue May 11, 2026 that may be closed by this pull request
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 hidden boolean 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 fetchResources to accept query/search parameters and used it to request hidden events for solvro_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.

Comment thread src/features/resources/schemas/calendar-event-schema.ts Outdated
Copy link
Copy Markdown
Member

@michalges michalges left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

po przejściu dialogu pokazywania/ukrywania tooltip zostaje:
Image

Jest jakiś powód dla którego ten przycisk jest wyłączony jak ukryję/pokażę event i chce od razu zrobić operację odwrotną? trzeba zamknąć cały dialog okna i na nowo otworzyć, wtedy dopiero mogę kliknąć
Image

Comment thread src/features/abstract-resource-calendar/components/abstract-resource-calendar.tsx Outdated
@GTR1701
Copy link
Copy Markdown
Member Author

GTR1701 commented May 14, 2026

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.

Copilot AI review requested due to automatic review settings May 14, 2026 09:01
@GTR1701 GTR1701 force-pushed the feat/arc-hide-event branch from 2c4db37 to f61cc1e Compare May 14, 2026 09:02
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Comment thread src/features/resources/components/delete-button-with-dialog.tsx
Copilot AI review requested due to automatic review settings May 25, 2026 18:45
@GTR1701 GTR1701 force-pushed the feat/arc-hide-event branch from df14d50 to 247e43e Compare May 25, 2026 18:45
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Comment thread src/features/backend/api/fetch-resources.ts
Comment thread src/features/resources/components/delete-button-with-dialog.tsx
@GTR1701 GTR1701 requested a review from michalges May 25, 2026 19:33
Copy link
Copy Markdown
Member

@michalges michalges left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image

przycisk pokaż nie powinien być wariantu destructive (ukryj tak, pokaż nie)

Copilot AI review requested due to automatic review settings June 2, 2026 11:33
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Comment thread src/features/backend/api/fetch-resources.ts Outdated
Comment thread src/features/resources/components/delete-button-with-dialog.tsx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

kalendarz - ukrywanie eventów

3 participants