-
-
Notifications
You must be signed in to change notification settings - Fork 285
Fix: extend reload_records
to support grid view
#3780
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
Closed
m7madmagdy
wants to merge
31
commits into
avo-hq:main
from
m7madmagdy:fix/reload-records-with-gridview
Closed
Changes from 11 commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
ddf543d
send to method
m7madmagdy 3f2d413
Dynamically resolve and instantiate view component class
a7madM 1feefdd
refactor: enhance component instantiation and improve grid item rende…
m7madmagdy e0591f4
remove logger from update product action
m7madmagdy 2045880
wipe: lint
m7madmagdy 1f17d9b
wipe: lint
m7madmagdy 5bde5b6
fix: ensure send default view type in action
m7madmagdy 5300b06
Refactor: define ROW_COMPONENTS_BY_VIEW to centralize row component m…
m7madmagdy 4d97810
refactor: update component view assignment to use virtual path
m7madmagdy b70f902
used name.underscore instead of virtual_path
m7madmagdy a132c8d
support map view
m7madmagdy 1c15e5f
possible approach
Paul-Bob 8ee23c0
rm raise
Paul-Bob 7524438
lint
Paul-Bob 60e3d0b
Merge branch 'main' into fix/reload-records-with-gridview
m7madmagdy cf8f538
fix: lint
m7madmagdy a9a9e0d
Merge branch 'main' into fix/reload-records-with-gridview
a7madM fd9002b
test: permit the view type params on action controller
m7madmagdy d916ed8
Merge branch 'main' into fix/reload-records-with-gridview
m7madmagdy a232523
lint
m7madmagdy 051b8c9
fix lint
m7madmagdy 3d706d1
Merge branch 'main' into fix/reload-records-with-gridview
m7madmagdy 9e6001a
refactor view_type
Paul-Bob 1d6546b
separate methods
Paul-Bob cc75a2b
Merge branch 'main' into fix/reload-records-with-gridview
Paul-Bob 8b6cccd
Merge branch 'main' into fix/reload-records-with-gridview
m7madmagdy ff962cd
removed unnecessary update product action
m7madmagdy ddef1d8
Merge branch 'fix/reload-records-with-gridview' of github.com:m7madma…
m7madmagdy 9da6753
removed updated_at field from product resource
m7madmagdy 9650dcd
Merge branch 'main' into fix/reload-records-with-gridview
m7madmagdy 3358458
Merge branch 'main' into fix/reload-records-with-gridview
Paul-Bob File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
class Avo::Actions::UpdateProduct < Avo::BaseAction | ||
self.name = "Update Product" | ||
|
||
def handle(**args) | ||
records, resource = args.values_at(:records, :resource) | ||
view_type = arguments[:view_type] || resource.default_view_type | ||
|
||
records.each do |record| | ||
record.update!(updated_at: Time.current) | ||
end | ||
|
||
reload_records(records, view_type) | ||
end | ||
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.