Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wth - step 3 additional details link bug #837

Merged
merged 1 commit into from Jan 2, 2017

Conversation

wtholt
Copy link
Contributor

@wtholt wtholt commented Dec 28, 2016

Reordered logic to include line_item_id param, which fixes this issue.
Also, noticed logic errors in Dashboard. [#132778407]

new_service_additional_details_submission_path(line_item.service_id, protocol_id: @protocol.id, line_item_id: line_item.id), remote: true
- service = Service.find(line_item.service_id)
- if service.questionnaires.active.present?
- unless line_item.submissions.present?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the expression in the unless should be tacked on to the if clause on line 4.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, thanks

%td
.text-center
- if service.identity_submission(current_identity).present?
= link_to "javascript:void(0);", class: 'btn btn-danger delete-submission', data: { id: "#{service.identity_submission(current_identity).first.id}", service_id: "#{service.id}", sr_id: "#{@service_request.id}", protocol_id: "#{@service_request.protocol_id}", line_item_id: "#{line_item.id}" } do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, is it necessary to string-interpolate all these data attributes? Just curious.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reordered logic to include line_item_id param, which fixes this issue.
Also, noticed logic errors in Dashboard. [#132778407]
@wtholt wtholt force-pushed the wth-additional-details-link-bug branch from 2be5424 to 8a5c3b6 Compare December 28, 2016 15:40
@jleonardw9 jleonardw9 merged commit d7d6bed into master Jan 2, 2017
@jleonardw9 jleonardw9 deleted the wth-additional-details-link-bug branch January 2, 2017 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants