From c85d84a458b8ae4bb37eca963c84d3cebfe850d2 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Wed, 25 Nov 2020 19:12:01 +0000 Subject: [PATCH] --- source/Plugins/AyaNova.Plugin.V8/V8.cs | 37 +++++++++++++++----------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/source/Plugins/AyaNova.Plugin.V8/V8.cs b/source/Plugins/AyaNova.Plugin.V8/V8.cs index 2a4b3fe..bb45c0c 100644 --- a/source/Plugins/AyaNova.Plugin.V8/V8.cs +++ b/source/Plugins/AyaNova.Plugin.V8/V8.cs @@ -446,23 +446,28 @@ namespace AyaNova.PlugIn.V8 progress.Op("User " + d.name); //throw new System.Exception("TODO: UserTypes sb done differently now to align"); //TODO: User type - //d.userType = (int)c.UserType; + d.userType = (int)c.UserType; - ////if special 3rd party user type then set their parent object id to -1 to signify will fill in later and satisfy biz rules at server - //switch (c.UserType) - //{ - // case UserTypes.Client: - // d.customerId = -1; - // break; - // case UserTypes.HeadOffice: - // d.headOfficeId = -1; - // break; - //} - //if (c.VendorID != Guid.Empty) - //{ - // d.userType = 7;//7 is the RAVEN user type for subcontractor - // d.subVendorId = -1; - //} + //todo: this needs to be adjusted later + //in order to allow import set the client and ho and sub users to regular non sched and + //they can be fixed up after their target objects are imported + switch (c.UserType) + { + case UserTypes.Client: + // d.customerId = -1; + d.userType = (int)UserTypes.NonSchedulable; + break; + case UserTypes.HeadOffice: + d.userType = (int)UserTypes.NonSchedulable; + // d.headOfficeId = -1; + break; + } + if (c.VendorID != Guid.Empty) + { + d.userType = (int)UserTypes.NonSchedulable; + // d.userType = 7;//7 is the RAVEN user type for subcontractor + // d.subVendorId = -1; + } d.active = false;//all imported users are inactive to start