mirror of
https://github.com/internetee/registry.git
synced 2025-08-03 16:32:04 +02:00
Invoice filtering in registrar
This commit is contained in:
parent
1f2f483e34
commit
23098add74
13 changed files with 83 additions and 7 deletions
|
@ -4,6 +4,7 @@ class Registrar::InvoicesController < RegistrarController
|
|||
before_action :set_invoice, only: [:show, :forward, :download_pdf]
|
||||
|
||||
def index
|
||||
params[:q] ||= {}
|
||||
invoices = current_user.registrar.invoices.includes(:invoice_items, :account_activity)
|
||||
@q = invoices.search(params[:q])
|
||||
@q.sorts = 'id desc' if @q.sorts.empty?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue