We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Currently when we want to register an action, card, filter, scope, etc.. we need to create a new class first.
Let's make it possible to register them anonymously, directly in the resource file.
Something like this:
class Avo::Resources::User < Avo::BaseResource def actions action title: "Toggle inactive", icon: "heroicons/outline/globe", visible: -> { record.active? }, handler: -> { records.update_all(active: !record.active) } end end
This will register an action with the given options and make it available in the resource.
Something similar can be done for cards, filters, scopes, etc..
class Avo::Resources::User < Avo::BaseResource def scopes scope name: "Even", description: "Only even numbers", query: -> { ... } scope name: "Odd", description: "Only odd numbers", query: -> { ... } end end
This will register two scopes with the given options and make them available in the resource.
To be explored
The text was updated successfully, but these errors were encountered:
@Paul-Bob. Taking this up for assignment
Sorry, something went wrong.
Hi @zhephyn, thanks for your interest in this one!
Unfortunately, this issue doesn’t have a clear approach yet and involves access to private repositories.
In the meantime, there are some issues labeled "Help wanted" and "Good first issue". Let us know if you’d like to pick one up!
Thanks!
No branches or pull requests
Feature
Currently when we want to register an action, card, filter, scope, etc.. we need to create a new class first.
Let's make it possible to register them anonymously, directly in the resource file.
Something like this:
This will register an action with the given options and make it available in the resource.
Something similar can be done for cards, filters, scopes, etc..
This will register two scopes with the given options and make them available in the resource.
Approach
To be explored
The text was updated successfully, but these errors were encountered: