-
Notifications
You must be signed in to change notification settings - Fork 24
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
PSP-7295 : Create/Edit Appraisal and Assessment #3709
Conversation
eddherrera
commented
Jan 11, 2024
# Conflicts: # source/backend/api/Services/DispositionFileService.cs # source/backend/apimodels/Models/Concepts/DispositionFile/DispositionFileAppraisalModel.cs
✅ No secrets were detected in the code. |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## dev #3709 +/- ##
==========================================
- Coverage 75.11% 74.91% -0.21%
==========================================
Files 1435 1439 +4
Lines 36957 37184 +227
Branches 6928 6973 +45
==========================================
+ Hits 27762 27855 +93
- Misses 8917 9051 +134
Partials 278 278
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@eddherrera your implementation, confluence, and uxpin don't seem to match for this story. Please ask Julian/Ana to correct their work so that it is consistent, and then make sure your story is in alignment. |
continuing to type into the year date input causes the app to crash. |
getting this whenever I try and save. |
[ProducesResponseType(typeof(DispositionFileAppraisalModel), 200)] | ||
[SwaggerOperation(Tags = new[] { "dispositionfile" })] | ||
[TypeFilter(typeof(NullJsonResultFilter))] | ||
public IActionResult UpdateDispositionFileAppraisal([FromRoute] long id, [FromRoute] long appraisalId, [FromBody] DispositionFileAppraisalModel dispositionFileAppraisal) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To co-exist with our existing patterns I'd be tempted to remove the add endpoint entirely. In general when editing sub-entities we consider that an update. We only use post endpoints for first class entities like files or persons. sub-entities are all handled with puts, and that single put handles add/edit/delete (allthough in this case it'll just handle add/edit).
return _dispositionFileRepository.GetDispositionFileAppraisal(dispositionFileId); | ||
} | ||
|
||
public PimsDispositionAppraisal AddDispositionFileAppraisal(long dispositionFileId, PimsDispositionAppraisal dispositionAppraisal) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see other comment on add/update.
var dispositionFileParent = _dispositionFileRepository.GetById(dispositionFileId); | ||
if (dispositionFileId != dispositionAppraisal.DispositionFileId || dispositionAppraisal.DispositionAppraisalId != appraisalId || dispositionFileParent is null) | ||
{ | ||
throw new BadRequestException("Invalid dispositionFileId."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
normally we do this at the repository level in my experience.
)} | ||
claim={Claims.DISPOSITION_EDIT} | ||
key={'disposition'} | ||
title={'Add Disposition Offer'} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this title correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Udpated
Would like to see tests for the controller and repository methods added. |
✅ No secrets were detected in the code. |
✅ No secrets were detected in the code. |
# Conflicts: # source/backend/api/Services/DispositionFileService.cs # source/frontend/src/features/mapSideBar/disposition/router/DispositionRouter.tsx
✅ No secrets were detected in the code. |
✅ No secrets were detected in the code. |