-
Notifications
You must be signed in to change notification settings - Fork 58
[Invoices] Add sorting ability #10651
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
Open
manuthecoder
wants to merge
43
commits into
main
Choose a base branch
from
add-invoice-sorting-ability
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 12 commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
8cecccc
Add basic styling
manuthecoder ac6f4bc
[Buttons] Adjust SVG visibility for sort button active state
manuthecoder 7cc65ce
Fix hover and focus states
manuthecoder a3bf6d0
[Buttons] Enhance sort button styles with active state and rotation e…
manuthecoder ed81fc3
Add filters for all columns
manuthecoder a5aa684
Fix table links
manuthecoder 2c198a0
Fix arrow styling and add basic sorting functionality to the invoices…
manuthecoder f06d23c
Finalize logic
manuthecoder 5539579
Refactor invoice table header to remove unnecessary text alignment class
manuthecoder 9b6b5f6
Lint!
manuthecoder 2aa6f5e
Remove unused styles
manuthecoder ccc44ac
Fix failing checks
manuthecoder 6038246
Update app/controllers/invoices_controller.rb
manuthecoder b49dc63
Merge branch 'main' into add-invoice-sorting-ability
manuthecoder 6e59634
Merge branch 'main' into add-invoice-sorting-ability
manuthecoder ae0c9d8
Merge branch 'main' into add-invoice-sorting-ability
manuthecoder 9c4e512
[Buttons] Update sort button color for dark mode
manuthecoder e0c822a
Fix syntax for dark mode color in sort button styles
manuthecoder a5c7fdb
Improve controller!
manuthecoder bc9cd4c
Merge branch 'main' into add-invoice-sorting-ability
manuthecoder 2c87cce
Merge branch 'main' into add-invoice-sorting-ability
manuthecoder 24269a6
Merge branch 'main' into add-invoice-sorting-ability
manuthecoder 7382574
Fix invoice assignment in the index action
manuthecoder 51b3ade
Change instance varian;e
manuthecoder 963bb94
Merge branch 'main' into add-invoice-sorting-ability
manuthecoder beeeae4
[Invoices] Simplify sort column and direction assignment logic
manuthecoder ff82793
Refactor sorting logic in event table header for clarity and maintain…
manuthecoder fe326a5
Refactor direction variable assignment for improved clarity in sortin…
manuthecoder 0019163
Update app/views/events/_sort_table_header.html.erb
manuthecoder cfcefa0
Update app/views/events/_sort_table_header.html.erb
manuthecoder ea4ae5b
Update app/views/events/_sort_table_header.html.erb
manuthecoder 0828e78
Update app/views/events/_sort_table_header.html.erb
manuthecoder b76899c
Merge branch 'main' into add-invoice-sorting-ability
manuthecoder 022a036
Merge branch 'main' into add-invoice-sorting-ability
manuthecoder bc01976
Merge branch 'main' into add-invoice-sorting-ability
manuthecoder 2623087
Update app/controllers/invoices_controller.rb
manuthecoder c270816
Merge branch 'main' into add-invoice-sorting-ability
manuthecoder 5ef0c32
Update app/controllers/invoices_controller.rb
manuthecoder a2adc39
Refactor sorting logic in events table header for clarity and correct…
manuthecoder 730145b
Refactor invoice table header to use dynamic columns for improved mai…
manuthecoder b934f31
Refactor invoices view to use instance variable for table columns and…
manuthecoder 9a960ec
Merge branch 'main' into add-invoice-sorting-ability
manuthecoder c274173
Merge branch 'main' into add-invoice-sorting-ability
manuthecoder 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<% @active = params[:sort] == sort || (params[:sort].nil? && defined?(default) && default) %> | ||
|
||
<%= link_to( | ||
upsert_query_params( | ||
sort: sort, | ||
direction: params[:sort] == sort ? | ||
(params[:direction] == "asc" ? "desc" : "asc") : | ||
params[:direction] || "asc" | ||
), | ||
class: "sort-button #{@active ? 'sort-button--active' : ''} #{'sort-button--right' if defined?(right) && right}" | ||
) do %> | ||
<%= defined?(display) && display ? display : sort.humanize %> | ||
<%= inline_icon( | ||
params[:direction] == "desc" ? "down-caret" : "up-caret", | ||
size: 16 | ||
) %> | ||
<% 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.