Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Core/Resgrid.Services/AuthorizationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,9 @@ public async Task<bool> CanUserViewUserAsync(string viewerUserId, string targetU
var department = await _departmentsService.GetDepartmentByUserIdAsync(viewerUserId);
var department1 = await _departmentsService.GetDepartmentByUserIdAsync(targetUserId);

if (department == null || department1 == null)
return false;

if (department.DepartmentId != department1.DepartmentId)
return false;

Expand Down
20 changes: 19 additions & 1 deletion Core/Resgrid.Services/CallEmailTemplates/ResgridEmailTemplate.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics.Eventing.Reader;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
Expand Down Expand Up @@ -57,8 +58,25 @@ public async Task<Call> GenerateCall(CallEmail email, string managingUser, List<
c.MapPage = data[4];

c.NatureOfCall = data[5];
c.Address = data[3];

if (!string.IsNullOrEmpty(data[3]))
{
c.Address = data[3];

try
{
var address = await geolocationProvider.GetLatLonFromAddress(c.Address);


if (address != null)
c.GeoLocationData = address;
}
catch (Exception ex)
{
Resgrid.Framework.Logging.LogException( ex,
$"Failed to geocode address '{c.Address}' for email {email.MessageId}");
}
}
StringBuilder title = new StringBuilder();

title.Append("Email Call ");
Expand Down
5 changes: 4 additions & 1 deletion Core/Resgrid.Services/ShiftsService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,10 @@ public async Task<Dictionary<int, Dictionary<int, int>>> GetShiftDayNeedsObjAsyn
}
}

shiftGroups.Add(group.DepartmentGroupId, roleRequirements);
if (shiftGroups.ContainsKey(group.DepartmentGroupId))
shiftGroups[group.DepartmentGroupId] = roleRequirements;
else
shiftGroups.Add(group.DepartmentGroupId, roleRequirements);
}
}

Expand Down
185 changes: 0 additions & 185 deletions Web/Resgrid.Web.Services/Controllers/v3/AuthController.cs

This file was deleted.

Loading
Loading