This commit is contained in:
@@ -629,7 +629,7 @@ namespace AyaNova.Biz
|
|||||||
public async Task<bool> ImportV7Async(JObject j, List<ImportAyaNova7MapItem> importMap, Guid jobId, Dictionary<string, Dictionary<Guid, string>> tagLists)
|
public async Task<bool> ImportV7Async(JObject j, List<ImportAyaNova7MapItem> importMap, Guid jobId, Dictionary<string, Dictionary<Guid, string>> 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
|
//TODO: Some of these items will need to be imported in future USEROPTIONS object that doesn't exist yet
|
||||||
#region V7 record format
|
#region V7 record format
|
||||||
@@ -747,6 +747,39 @@ namespace AyaNova.Biz
|
|||||||
i.EmployeeNumber = j["EmployeeNumber"].Value<string>();
|
i.EmployeeNumber = j["EmployeeNumber"].Value<string>();
|
||||||
i.Notes = j["Notes"].Value<string>();
|
i.Notes = j["Notes"].Value<string>();
|
||||||
|
|
||||||
|
//TAGS
|
||||||
|
var MemberOfGroupId = new Guid(j["MemberOfGroup"].Value<string>());
|
||||||
|
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<string>());
|
||||||
|
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<string>());
|
||||||
|
if (DispatchZoneID != Guid.Empty)
|
||||||
|
{
|
||||||
|
string sTag = string.Empty;
|
||||||
|
if (tagLists["DispatchZone"].TryGetValue(DispatchZoneID, out sTag))
|
||||||
|
{
|
||||||
|
i.Tags.Add(sTag);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//Set unusable random login credentials
|
//Set unusable random login credentials
|
||||||
i.Salt = Hasher.GenerateSalt();
|
i.Salt = Hasher.GenerateSalt();
|
||||||
i.Login = Hasher.GenerateSalt();
|
i.Login = Hasher.GenerateSalt();
|
||||||
|
|||||||
Reference in New Issue
Block a user