diff --git a/source/Plugins/AyaNova.Plugin.V8/V8.cs b/source/Plugins/AyaNova.Plugin.V8/V8.cs index 1deba62..20322c8 100644 --- a/source/Plugins/AyaNova.Plugin.V8/V8.cs +++ b/source/Plugins/AyaNova.Plugin.V8/V8.cs @@ -160,7 +160,8 @@ namespace AyaNova.PlugIn.V8 Map.Clear(); /* - TODO: + TODO: + * custom fields processor for: User, Client, Contract, HeadOffice, LoanItem, part, project, purchaseorder, unit, unitmodel, vendor, workorderitem */ @@ -369,19 +370,20 @@ namespace AyaNova.PlugIn.V8 User c = User.GetItem(i.ID); dynamic d = new JObject(); d.name = c.FirstName + " " + c.LastName; + d.userType = (int)c.UserType; if (c.VendorID != Guid.Empty) d.userType = 7;//7 is the RAVEN user type for subcontractor d.active = false;//all imported users are inactive to start + d.roles=0;//todo: try to determine role from v7 member of group? or is that even possible? + d.employeeNumber = c.EmployeeNumber; d.notes = c.Notes; - if (c.RegionID != Guid.Empty) - { - var t = TagMap[c.RegionID]; - if (TagMap.ContainsKey() { - } - } + Tagit(c.RegionID,tags); + Tagit(c.DispatchZoneID, tags); + + util.PostAsync(" //JObject xtra = new JObject(); @@ -638,8 +640,9 @@ namespace AyaNova.PlugIn.V8 #endregion dump #region Utility methods - private void AddTagIfExists(Guid g, List tags) + private void Tagit(Guid g, List tags) { + if (g == Guid.Empty) return; var t = TagMap[g]; if (!string.IsNullOrWhiteSpace(t)) {