DLSV2-560 Remove Staff member from my staff list results in error #1308
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
JIRA link
https://hee-dls.atlassian.net/browse/DLSV2-560
Description
Fixing unsupported operation (http 405 error) caused by a mismatch of parameters being submitted to controller action
RemoveSupervisorDelegate()method. Confirmation dialog is shown only when there are candidate assessments. So, depending on if there are candidate assessments, I am rendering a link to RemoveConfirm.cshtml or a post button for removing the delegate straightaway.Despite views _StaffMemberCard.cshtml and RemoveConfirm.cshtml are using different models, I can call the same post method, since
Hiddenhelper in the view allows me to set the name of individual fields in the post (unlikeHiddenForthat takes the name from model).Screenshots
Developer checks
Checked both scenarios: deleting a delegate straightaway or deleting with confirmation.
(although all Remove buttons look the same, by hovering over Remove button, a url is shown by the browser if it is a link)