Skip to content

Commit

Permalink
Merge branch 'feature/api-documents-filter-by-contract-signature' int…
Browse files Browse the repository at this point in the history
…o staging
  • Loading branch information
tsubik committed Nov 22, 2024
2 parents a4cf4ba + dc2b9c1 commit 3164988
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/resources/concerns/operator_documentable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ module OperatorDocumentable

filters :type, :status, :operator_id, :fmu_id, :required_operator_document_id, :country_ids, :source, :legal_categories, :forest_types

filter :contract_signature, apply: ->(records, value, _options) {
records.joins(:required_operator_document).where(required_operator_document: {contract_signature: value})
}

privateable :document_visible?, [:start_date, :expire_date, :note, :reason, :response_date, :source_info, :uploaded_by, :created_at, :updated_at]

def admin_comment
Expand Down

0 comments on commit 3164988

Please sign in to comment.