Skip to content
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

feat: Add where in options #487

Merged
merged 4 commits into from
Nov 18, 2024

Conversation

didrikmunther
Copy link
Contributor

@didrikmunther didrikmunther commented Nov 15, 2024

Title

[Provide a succinct and descriptive title for the pull request, e.g., "Improve caching mechanism for API calls"]

Type of Change

  • New feature
  • Bug fix
  • Documentation update
  • Example update
  • Refactoring
  • Hotfix
  • Security patch
  • UI/UX improvement

Description

I have a use case for adding multi-tenancy to this admin panel, and I need to be able to set dynamic where clauses to filter on a users organization id.

Screenshots

CleanShot 2024-11-16 at 00 29 49

Testing

No tests have been written for this.

Impact

This should open up for more advanced admin panels.

Copy link

changeset-bot bot commented Nov 15, 2024

🦋 Changeset detected

Latest commit: 36bb9da

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@premieroctet/next-admin Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@cregourd
Copy link
Collaborator

Hi @didrikmunther,
First of all, thanks for your PR
However, note that this may be a bit ambiguous for users to have a partial list of data without seeing any filter applied. Wouldn't you want to use filters options with active: true instead, to keep a visual representation of applied filters in the list that users see?

@didrikmunther
Copy link
Contributor Author

Hi @didrikmunther, First of all, thanks for your PR However, note that this may be a bit ambiguous for users to have a partial list of data without seeing any filter applied. Wouldn't you want to use filters options with active: true instead, to keep a visual representation of applied filters in the list that users see?

Hi @cregourd,
The reason is because I'm building a multi-tenancy app, where users should not even know about the internals of the organization-scoping mechanisms. E.g. in Google Calendar, I don't see any active filters that calendar id "xxxx" and "yyyy" is activated, it just automatically filters such that I can only see my own calendars.

@cregourd cregourd merged commit 46a3dba into premieroctet:main Nov 18, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants