care icon indicating copy to clipboard operation
care copied to clipboard

fix(asset_location): added duty_staff endpoint

Open aeswibon opened this issue 2 years ago • 7 comments

Feature Request

Proposed Changes

  • Adds duty_staff field to asset location model 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

aeswibon avatar Oct 27 '23 13:10 aeswibon

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.

codecov[bot] avatar Oct 27 '23 13:10 codecov[bot]

@cp-Coder remove the maximum limit of 3 users

nihal467 avatar Oct 30 '23 09:10 nihal467

Okay, I will remove the validation

aeswibon avatar Oct 30 '23 16:10 aeswibon

LGTM

nihal467 avatar Oct 31 '23 11:10 nihal467

When removing a duty staff user from asset location, those records are not set to deleted=True instead it's permanently deleted right?

cc: @sainak

yeah we can use a custom through model

cc: @vigneshhari

sainak avatar Nov 03 '23 07:11 sainak

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.

aeswibon avatar Nov 20 '23 12:11 aeswibon

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

rithviknishad avatar Jan 08 '24 06:01 rithviknishad