diff --git a/server/AyaNova/biz/UserBiz.cs b/server/AyaNova/biz/UserBiz.cs index 64f7a0e8..e90884b0 100644 --- a/server/AyaNova/biz/UserBiz.cs +++ b/server/AyaNova/biz/UserBiz.cs @@ -629,7 +629,7 @@ namespace AyaNova.Biz public async Task ImportV7Async(JObject j, List importMap, Guid jobId, Dictionary> tagLists) { -//NEEDS 3 of the tag lists + //NEEDS 3 of the tag lists //TODO: Some of these items will need to be imported in future USEROPTIONS object that doesn't exist yet #region V7 record format @@ -747,6 +747,39 @@ namespace AyaNova.Biz i.EmployeeNumber = j["EmployeeNumber"].Value(); i.Notes = j["Notes"].Value(); + //TAGS + var MemberOfGroupId = new Guid(j["MemberOfGroup"].Value()); + if (MemberOfGroupId != Guid.Empty) + { + string sTag = string.Empty; + if (tagLists["ScheduleableUserGroup"].TryGetValue(MemberOfGroupId, out sTag)) + { + i.Tags.Add(sTag); + } + } + + var RegionID = new Guid(j["RegionID"].Value()); + if (RegionID != Guid.Empty) + { + string sTag = string.Empty; + if (tagLists["Region"].TryGetValue(RegionID, out sTag)) + { + i.Tags.Add(sTag); + } + } + + var DispatchZoneID = new Guid(j["DispatchZoneID"].Value()); + if (DispatchZoneID != Guid.Empty) + { + string sTag = string.Empty; + if (tagLists["DispatchZone"].TryGetValue(DispatchZoneID, out sTag)) + { + i.Tags.Add(sTag); + } + } + + + //Set unusable random login credentials i.Salt = Hasher.GenerateSalt(); i.Login = Hasher.GenerateSalt();