This commit is contained in:
2020-04-28 23:26:19 +00:00
parent 88c27f7d28
commit 1e0059d324

View File

@@ -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