From 1e0059d324b07b64241aef195937cd4b22245d29 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Tue, 28 Apr 2020 23:26:19 +0000 Subject: [PATCH] --- source/Plugins/AyaNova.Plugin.V8/V8.cs | 28 +++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/source/Plugins/AyaNova.Plugin.V8/V8.cs b/source/Plugins/AyaNova.Plugin.V8/V8.cs index 8d2f7ae..1c65f6a 100644 --- a/source/Plugins/AyaNova.Plugin.V8/V8.cs +++ b/source/Plugins/AyaNova.Plugin.V8/V8.cs @@ -175,7 +175,7 @@ namespace AyaNova.PlugIn.V8 /* TODO: - * How to empty postgres tables and reset autoid to 1 or multiple imports would cause crazy high id numbers + * * Userskill, user cert as tags? * custom fields processor for: User, Client, Contract, HeadOffice, LoanItem, part, project, purchaseorder, unit, unitmodel, vendor, workorderitem * manager user, should it copy email address and stuff or...?? @@ -200,6 +200,8 @@ namespace AyaNova.PlugIn.V8 ExportPartCategories(progress); ExportScheduleableUserGroups(progress); ExportDispatchZones(progress); + ExportUserSkills(progress); + ExportUserCertifications(progress); //BIZ objects await ExportUsers(progress); @@ -380,6 +382,13 @@ namespace AyaNova.PlugIn.V8 d.notes = c.Notes; Tagit(c.RegionID, tags); Tagit(c.DispatchZoneID, tags); + foreach (UserSkillAssigned skill in c.UserSkills) { + Tagit(skill.UserSkillID, tags); + } + foreach (UserCertificationAssigned cert in c.UserCertifications) + { + Tagit(cert.UserCertificationID, tags); + } SetTags(d, tags); var a = await util.PostAsync("User", d.ToString()); @@ -504,6 +513,23 @@ namespace AyaNova.PlugIn.V8 TagMap.Add(i.ID, util.NormalizeTag(i.Name + "." + "dispatchzone")); } #endregion + + private void ExportUserSkills(ProgressForm progress) + { + UserSkills l = UserSkills.GetItems(); + progress.Append("Compiling " + l.Count.ToString() + " User skills"); + foreach (UserSkill i in l) + TagMap.Add(i.ID, util.NormalizeTag(i.Name + "." + "user-skill")); + } + + private void ExportUserCertifications(ProgressForm progress) + { + UserCertifications l = UserCertifications.GetItems(); + progress.Append("Compiling " + l.Count.ToString() + " User certifications"); + foreach (UserCertification i in l) + TagMap.Add(i.ID, util.NormalizeTag(i.Name + "." + "user-certification")); + } + #endregion TAG ITEMS //-------------------------------------------- #endregion object dump methods