Skip to content

Commit

Permalink
Merge pull request #1376 from sparc-request/jl-approval-timestamp-bug
Browse files Browse the repository at this point in the history
Jl - Approval timestamp bug
  • Loading branch information
Stuart-Johnson committed Jun 15, 2018
2 parents 2bad293 + bab4504 commit cabeb77
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/models/sub_service_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -389,19 +389,19 @@ def candidate_owners

def generate_approvals current_user, params
if params[:nursing_nutrition_approved]
self.approvals.create({:identity_id => current_user.id, :sub_service_request_id => self.id, :approval_date => Date.today, :approval_type => "Nursing/Nutrition Approved"})
self.approvals.create({:identity_id => current_user.id, :sub_service_request_id => self.id, :approval_date => Time.now, :approval_type => "Nursing/Nutrition Approved"})
end

if params[:lab_approved]
self.approvals.create({:identity_id => current_user.id, :sub_service_request_id => self.id, :approval_date => Date.today, :approval_type => "Lab Approved"})
self.approvals.create({:identity_id => current_user.id, :sub_service_request_id => self.id, :approval_date => Time.now, :approval_type => "Lab Approved"})
end

if params[:imaging_approved]
self.approvals.create({:identity_id => current_user.id, :sub_service_request_id => self.id, :approval_date => Date.today, :approval_type => "Imaging Approved"})
self.approvals.create({:identity_id => current_user.id, :sub_service_request_id => self.id, :approval_date => Time.now, :approval_type => "Imaging Approved"})
end

if params[:committee_approved]
self.approvals.create({:identity_id => current_user.id, :sub_service_request_id => self.id, :approval_date => Date.today, :approval_type => "Committee Approved"})
self.approvals.create({:identity_id => current_user.id, :sub_service_request_id => self.id, :approval_date => Time.now, :approval_type => "Committee Approved"})
end
end

Expand Down

0 comments on commit cabeb77

Please sign in to comment.