fix(asset_location): added duty_staff endpoint
Feature Request
Proposed Changes
- Adds
duty_stafffield toasset locationmodel and serializer
Associated PR
- Required by coronasafe/care_fe#6512
Merge Checklist
- [ ] Tests added/fixed
- [ ] Update docs in
/docs - [x] Linting Complete
@coronasafe/code-reviewers
Codecov Report
Attention: Patch coverage is 70.21277% with 14 lines in your changes are missing coverage. Please review.
Project coverage is 61.43%. Comparing base (
5177552) to head (7e690cf). Report is 179 commits behind head on develop.
| Files | Patch % | Lines |
|---|---|---|
| care/facility/api/viewsets/asset.py | 60.60% | 8 Missing and 5 partials :warning: |
| care/facility/models/asset.py | 87.50% | 1 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## develop #1689 +/- ##
===========================================
+ Coverage 61.39% 61.43% +0.03%
===========================================
Files 211 211
Lines 11593 11639 +46
Branches 1660 1674 +14
===========================================
+ Hits 7118 7150 +32
- Misses 4203 4212 +9
- Partials 272 277 +5
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@cp-Coder remove the maximum limit of 3 users
Okay, I will remove the validation
LGTM
When removing a duty staff user from asset location, those records are not set to
deleted=Trueinstead it's permanently deleted right?cc: @sainak
yeah we can use a custom through model
cc: @vigneshhari
When removing a duty staff user from asset location, those records are not set to deleted=True instead it's permanently deleted right?
There still seems to be no API endpoint/way to unlink a staff from a location.
We can just remove the staff from the doctor/staff list in the location form and it will automatically unlink the staff.
Marking as hold as the requirements have changed and a more refined feature "User Availability" will be built that adds more depth and it would replace the "Duty Staff for Locations" feature.
Issue: https://github.com/coronasafe/care_fe/issues/6968