seas-computing / course-planner

SEAS Course Planning Application. JSDoc Docs at: https://seas-computing.github.io/course-planner/
0 stars 1 forks source link

Add Edit Room Modal #581

Closed natalynyu closed 1 year ago

natalynyu commented 1 year ago

This PR adds the edit room modal, which allows admin users to update the room name and capacity for rooms in the Room Admin tab. Both fields are required, and capacity must be a positive whole number.

Types of changes

Checklist:

Priority:

Related Issues:

Fixes #571

codecov[bot] commented 1 year ago

Codecov Report

Merging #581 (07548c9) into develop (651c875) will decrease coverage by 0.09%. The diff coverage is 92.17%.

@@             Coverage Diff             @@
##           develop     #581      +/-   ##
===========================================
- Coverage    95.80%   95.70%   -0.10%     
===========================================
  Files          189      191       +2     
  Lines         4604     4777     +173     
  Branches       596      631      +35     
===========================================
+ Hits          4411     4572     +161     
- Misses          99      102       +3     
- Partials        94      103       +9     
Impacted Files Coverage Δ
src/server/location/location.controller.ts 90.00% <75.00%> (-3.75%) :arrow_down:
...lient/components/pages/RoomAdmin/EditRoomModal.tsx 89.55% <89.55%> (ø)
src/client/api/rooms.ts 100.00% <100.00%> (ø)
...ent/components/pages/RoomAdmin/CreateRoomModal.tsx 93.00% <100.00%> (ø)
...rc/client/components/pages/RoomAdmin/RoomAdmin.tsx 100.00% <100.00%> (ø)
src/common/dto/room/UpdateRoom.dto.ts 100.00% <100.00%> (ø)
src/server/location/location.service.ts 96.55% <100.00%> (+0.55%) :arrow_up:
...t/components/pages/Faculty/FacultyAbsenceModal.tsx 85.71% <0.00%> (-1.63%) :arrow_down:
...rc/client/components/pages/Faculty/FacultyPage.tsx 98.41% <0.00%> (-1.59%) :arrow_down:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

natalynyu commented 1 year ago

I had forgotten to add in validation to make sure that the edited room was not a duplicate of a separate and already existing room, so the service was updated to check for duplicates and a few tests were added as well.