Skip to content

Commit 347110e

Browse files
committed
CU-868d85dv8 Minor bug fixes
1 parent 209ebc7 commit 347110e

File tree

6 files changed

+95
-128
lines changed

6 files changed

+95
-128
lines changed

Web/Resgrid.Web/Areas/User/Controllers/DispatchController.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,10 @@ public async Task<IActionResult> UpdateCall(int callId)
510510

511511
UpdateCallView model = new UpdateCallView();
512512
model.Call = await _callsService.GetCallByIdAsync(callId);
513+
514+
if (model.Call == null || model.Call.DepartmentId != DepartmentId)
515+
Unauthorized();
516+
513517
model.Call = await _callsService.PopulateCallData(model.Call, true, true, true, true, true, true, true, true, true);
514518
model.CallPriority = model.Call.Priority;
515519
model = await FillUpdateCallView(model);
@@ -2263,7 +2267,7 @@ private async Task<ViewCallView> FillViewCallView(ViewCallView model)
22632267
var ungroupedUsers = from u in allUsers
22642268
where !(groupedUserIds.Contains(u.UserId))
22652269
select u;
2266-
2270+
22672271
foreach (var u in ungroupedUsers)
22682272
{
22692273
model.UnGroupedUsers.Add(allUsers.Where(x => x.UserId == u.UserId).FirstOrDefault());

Web/Resgrid.Web/Areas/User/Controllers/ShiftsController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1223,8 +1223,8 @@ public async Task<IActionResult> GetPersonnelForShift(int shiftId, int? groupId)
12231223
var shift = await _shiftsService.GetShiftByIdAsync(shiftId);
12241224
var group = await _departmentGroupsService.GetAllGroupsForDepartmentAsync(DepartmentId);
12251225

1226-
if (shift.DepartmentId != DepartmentId)
1227-
return null;
1226+
if (shift == null || shift.DepartmentId != DepartmentId)
1227+
return Json(usersJson);
12281228

12291229
shift = await _shiftsService.PopulateShiftData(shift, true, true, true, true, true);
12301230

0 commit comments

Comments
 (0)