Skip to content

Commit

Permalink
Update Licence Scope for Student View of Review and Submit steps
Browse files Browse the repository at this point in the history
  • Loading branch information
asadaqain committed Aug 13, 2024
1 parent 5957d31 commit 206e4c7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 3 additions & 3 deletions app/controllers/student_view_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ def thesis_process_router
when Thesis::PROCESS_REVIEW
@primary_documents = @thesis.documents.not_deleted.primary
@supplemental_documents = @thesis.documents.not_deleted.supplemental
@licence_documents = @thesis.documents.not_deleted.supplemental.licence_type
@licence_documents = @thesis.documents.not_deleted.licence
render_according_to_validation('student_view/process/review')
when Thesis::PROCESS_SUBMIT
@primary_documents = @thesis.documents.not_deleted.primary
@supplemental_documents = @thesis.documents.not_deleted.supplemental
@licence_documents = @thesis.documents.not_deleted.supplemental.licence_type
@embargo_documents = @thesis.documents.not_deleted.supplemental.embargo_type
@licence_documents = @thesis.documents.not_deleted.licence
@embargo_documents = @thesis.documents.not_deleted.embargo
render_according_to_validation('student_view/process/submit')
when Thesis::PROCESS_STATUS
render_according_to_validation('student_view/process/status')
Expand Down
4 changes: 1 addition & 3 deletions app/models/document.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ class Document < ApplicationRecord
scope :supplemental, -> { where(usage: :thesis).where('supplemental = ? ', true) }
scope :deleted, -> { where('deleted = ?', true) }
scope :not_deleted, -> { where('deleted = ?', false) }
scope :licence_type, -> { where(usage: :licence) }
scope :embargo_type, -> { where(usage: [:embargo, :embargo_letter])}


scope :licence, -> { where(usage: :licence) }
scope :embargo, -> { where(usage: [:embargo, :embargo_letter])}

Expand Down

0 comments on commit 206e4c7

Please sign in to comment.