Skip to content

Commit

Permalink
updated the files as per review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
edwin-jebaraj committed Jan 21, 2025
1 parent 6e24f28 commit 56750d0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
10 changes: 9 additions & 1 deletion app/controllers/evaluation/download_documents_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,15 @@ def download_document_data
end

def update_support_details
Support::EvaluatorsDownloadDocument.upsert({ support_case_upload_document_id: params[:document_id], support_case_id: @download_document.support_case_id, email: current_user.email, has_downloaded_documents: true }, unique_by: :idx_on_email_support_case_id_support_case_upload_do_e4a88327e6)
Support::EvaluatorsDownloadDocument.upsert(
{
support_case_upload_document_id: params[:document_id],
support_case_id: @download_document.support_case_id,
email: current_user.email,
has_downloaded_documents: true,
},
unique_by: %i[email support_case_id support_case_upload_document_id],
)
end

def set_download_document
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/evaluation/tasks_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ def set_uploaded_documents
end

def download_document_status
@download_document_status = if @documents.count == @downloaded_documents.count && @documents.count.positive?
@download_document_status = if @documents.count == @downloaded_documents.count && @documents.any?
"complete"
elsif @documents.count > @downloaded_documents.count && @downloaded_documents.count.positive?
elsif @documents.count > @downloaded_documents.count && @downloaded_documents.any?
"in_progress"
else
"to_do"
Expand Down

0 comments on commit 56750d0

Please sign in to comment.