diff --git a/server/AyaNova/models/GlobalBizSettings.cs b/server/AyaNova/models/GlobalBizSettings.cs index 44a3ee3e..37f65972 100644 --- a/server/AyaNova/models/GlobalBizSettings.cs +++ b/server/AyaNova/models/GlobalBizSettings.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using Newtonsoft.Json; namespace AyaNova.Models @@ -30,15 +31,55 @@ namespace AyaNova.Models public long? TaxRateSaleId { get; set; } - //DEFAULT WO MINUTES - [Required] - public int WorkLaborScheduleDefaultMinutes {get;set;} - [Required] - public int WorkOrderTravelDefaultMinutes {get;set;} + //DEFAULT WO MINUTES + [Required] + public int WorkLaborScheduleDefaultMinutes { get; set; } + [Required] + public int WorkOrderTravelDefaultMinutes { get; set; } [Required] public TimeSpan WorkOrderCompleteByAge { get; set; } = TimeSpan.Zero;//was workorderclosebyage + + //CUSTOMER ACCESS FEATURES AND SETTINGS + public long? CustomerDefaultWorkOrderReportId { get; set; } + public string CustomerServiceRequestInfoHTML { get; set; } + + public bool CustomerAllowCSR { get; set; } + public List CustomerAllowCSRInTags { get; set; } + public List CustomerAllowCSROutTags { get; set; } + + public bool CustomerAllowViewWO { get; set; } + public List CustomerAllowViewWOInTags { get; set; } + public List CustomerAllowViewWOOutTags { get; set; } + + public bool CustomerAllowWOWiki { get; set; } + public List CustomerAllowWOWikiInTags { get; set; } + public List CustomerAllowWOWikiOutTags { get; set; } + + public bool CustomerAllowUserSettings { get; set; } + public List CustomerAllowUserSettingsInTags { get; set; } + public List CustomerAllowUserSettingsOutTags { get; set; } + + public bool CustomerAllowNotifyServiceImminent { get; set; } + public List CustomerAllowNotifyServiceImminentInTags { get; set; } + public List CustomerAllowNotifyServiceImminentOutTags { get; set; } + + public bool CustomerAllowNotifyCSRAccepted { get; set; } + public List CustomerAllowNotifyCSRAcceptedInTags { get; set; } + public List CustomerAllowNotifyCSRAcceptedOutTags { get; set; } + + public bool CustomerAllowNotifyCSRRejected { get; set; } + public List CustomerAllowNotifyCSRRejectedInTags { get; set; } + public List CustomerAllowNotifyCSRRejectedOutTags { get; set; } + + public bool CustomerAllowNotifyWorkorderCreated { get; set; } + public List CustomerAllowNotifyWorkorderCreatedInTags { get; set; } + public List CustomerAllowNotifyWorkorderCreatedOutTags { get; set; } + + + + public GlobalBizSettings() { Id = 1;//always 1 diff --git a/server/AyaNova/util/AySchema.cs b/server/AyaNova/util/AySchema.cs index b9a6edac..c9fbd1d1 100644 --- a/server/AyaNova/util/AySchema.cs +++ b/server/AyaNova/util/AySchema.cs @@ -255,7 +255,10 @@ namespace AyaNova.Util + "useinventory BOOL DEFAULT TRUE, " + "workordercompletebyage INTERVAL NOT NULL DEFAULT '00:00:00', " + "workordertraveldefaultminutes INTEGER NOT NULL DEFAULT 0, " - + "worklaborscheduledefaultminutes INTEGER NOT NULL DEFAULT 0 " + + "worklaborscheduledefaultminutes INTEGER NOT NULL DEFAULT 0, " + + "customerdefaultworkorderreportid BIGINT NULL REFERENCES areport(id), " + + "CustomerServiceRequestInfoHTML TEXT, " + + "customerallowcsr BOOL DEFAULT FALSE, customerallowcsrintags VARCHAR(255) ARRAY, customerallowcsrouttags VARCHAR(255) ARRAY, " + ")"); //create global ops BACKUP settings table