mirror of
https://github.com/we-promise/sure.git
synced 2026-04-17 19:14:11 +00:00
Implement basic transaction pagination (#531)
* install pagy * add pagy to controller, display default pagy UI * display hardcoded custom UI to confirm styling * implement custom UI with pagy methods * move pagination into partial * use lucide icons * only display pagination if 2 or more pages are available * add mobile pagination placeholder * use link_to and display greyed out buttons when no prev or next needed * sort transactions by date so grouping works appropriately with pagination * add space between mobile view buttons * remove debugging
This commit is contained in:
@@ -3,7 +3,7 @@ class TransactionsController < ApplicationController
|
||||
before_action :set_transaction, only: %i[ show edit update destroy ]
|
||||
|
||||
def index
|
||||
@transactions = Current.family.transactions
|
||||
@pagy, @transactions = pagy(Current.family.transactions.order(date: :desc), items: 50)
|
||||
end
|
||||
|
||||
def show
|
||||
|
||||
Reference in New Issue
Block a user