From f68127f33c6a1e9d3f7b1f8f91fcb5775635e0dc Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Tue, 31 Aug 2021 23:05:05 +0000 Subject: [PATCH] --- source/Plugins/AyaNova.Plugin.V8/V8.cs | 30 +++++++++++++++++++----- source/Plugins/AyaNova.Plugin.V8/util.cs | 9 ++----- 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/source/Plugins/AyaNova.Plugin.V8/V8.cs b/source/Plugins/AyaNova.Plugin.V8/V8.cs index 9369306..c1737c6 100644 --- a/source/Plugins/AyaNova.Plugin.V8/V8.cs +++ b/source/Plugins/AyaNova.Plugin.V8/V8.cs @@ -1724,19 +1724,37 @@ namespace AyaNova.PlugIn.V8 #region Global settings - //Global / ops settings + //Global / ops / notification settings private async System.Threading.Tasks.Task ExportGlobalSettings(ProgressForm progress) { if (!progress.KeepGoing) return; - if (V7UseInventory) - progress.Append("Info: v7 Use inventory is Active and will be migrated"); - else - progress.Append("Info: v7 Use inventory is OFF, not migrating inventory"); + progress.Op("Start Global settings export"); + progress.SubOp("Global 'Biz' settings"); + + //GlobalBizSettings var a = await util.GetAsync("global-biz-setting"); dynamic d = a.ObjectResponse["data"]; - d.useInventory = V7UseInventory; + d.allowScheduleConflicts = true;//was not exposed in v7 so setting to same functionality people are used to for v8 + d.searchCaseSensitiveOnly = false;//v8 default, not a v7 setting + d.taxPartPurchaseId = await Getv7v8IdMapNullOk(AyaBizUtils.GlobalSettings.TaxPartPurchaseID, RootObjectTypes.TaxCode, false, true);//ok if doesn't migrate + d.taxPartSaleId = await Getv7v8IdMapNullOk(AyaBizUtils.GlobalSettings.TaxPartSaleID, RootObjectTypes.TaxCode, false, true);//ok if doesn't migrate + d.taxRateSaleId = await Getv7v8IdMapNullOk(AyaBizUtils.GlobalSettings.TaxRateSaleID, RootObjectTypes.TaxCode, false, true);//ok if doesn't migrate + d.workLaborScheduleDefaultMinutes = AyaBizUtils.GlobalSettings.LaborSchedUserDfltTimeSpan; + d.workOrderTravelDefaultMinutes = AyaBizUtils.GlobalSettings.TravelDfltTimeSpan; + d.workOrderCompleteByAge = TimeSpan.FromMinutes(AyaBizUtils.GlobalSettings.WorkorderCloseByAge); + d.customerAllowCSR = false; + d.customerAllowViewWO = false; + d.customerAllowWOWiki = false; + d.customerAllowUserSettings = false; + d.customerAllowNotifyServiceImminent = false; + d.customerAllowNotifyCSRAccepted = false; + d.customerAllowNotifyCSRRejected = false; + d.customerAllowNotifyWOCreated = false; + d.customerAllowNotifyWOCompleted = false; await util.PutAsync("global-biz-setting", d); + //GlobalOpsBackupSettingsController + } #endregion Global settings diff --git a/source/Plugins/AyaNova.Plugin.V8/util.cs b/source/Plugins/AyaNova.Plugin.V8/util.cs index a54d55f..e1512ec 100644 --- a/source/Plugins/AyaNova.Plugin.V8/util.cs +++ b/source/Plugins/AyaNova.Plugin.V8/util.cs @@ -28,15 +28,10 @@ namespace AyaNova.PlugIn.V8 //url once known to be good internal static string ApiBaseUrl { get; set; } internal static string JWT { get; set; } - // public static bool Initialized { get; set; } - // internal static string ServerState { get; set; } + public static Guid WBIIntegrationID { get { return new Guid("{6946040C-1B50-4eab-BE08-A0E93DB7449F}"); } } + public static Guid RIIntegrationID { get { return new Guid("{F3E11847-B148-4CDC-88A7-BDB144EE5743}"); } } - //public util() - //{ - // // Initialized = false; - // JWT = string.Empty; - //} #region INIT / AUTH