diff --git a/server/AyaNova/biz/UserBiz.cs b/server/AyaNova/biz/UserBiz.cs index 3b432c0c..f832dcf2 100644 --- a/server/AyaNova/biz/UserBiz.cs +++ b/server/AyaNova/biz/UserBiz.cs @@ -160,7 +160,7 @@ namespace AyaNova.Biz bool ThisWOCanAttachments = false; if (WorkorderIsAllowed) { - + //default report (may be null and may be more detailed tagged version below) ThisWOEffectiveWorkOrderReportId = AyaNova.Util.ServerGlobalBizSettings.Cache.CustomerDefaultWorkOrderReportId; @@ -229,6 +229,9 @@ namespace AyaNova.Biz CustomerUserEffectiveRightsAllowed(AyaNova.Util.ServerGlobalBizSettings.Cache.CustomerAllowCSR, ContactCustomerHOTagsCombined, AyaNova.Util.ServerGlobalBizSettings.Cache.CustomerAllowCSRInTags), + CustomerUserEffectiveRightsAllowed(AyaNova.Util.ServerGlobalBizSettings.Cache.CustomerAllowCreateUnit, + ContactCustomerHOTagsCombined, + AyaNova.Util.ServerGlobalBizSettings.Cache.CustomerAllowCreateUnitInTags), WorkorderIsAllowed, diff --git a/server/AyaNova/models/GlobalBizSettings.cs b/server/AyaNova/models/GlobalBizSettings.cs index 635ad23a..2cab492c 100644 --- a/server/AyaNova/models/GlobalBizSettings.cs +++ b/server/AyaNova/models/GlobalBizSettings.cs @@ -86,6 +86,9 @@ namespace AyaNova.Models public bool CustomerAllowCSR { get; set; } public List CustomerAllowCSRInTags { get; set; } = new List(); + public bool CustomerAllowCreateUnit { get; set; } + public List CustomerAllowCreateUnitInTags { get; set; } = new List(); + public bool CustomerAllowViewWO { get; set; } public List CustomerAllowViewWOInTags { get; set; } = new List(); @@ -126,6 +129,7 @@ namespace AyaNova.Models t.AddRange(this.CustomerWorkOrderReport4Tags); t.AddRange(this.CustomerWorkOrderReport5Tags); t.AddRange(this.CustomerAllowCSRInTags); + t.AddRange(this.CustomerAllowCreateUnitInTags); t.AddRange(this.CustomerAllowViewWOInTags); t.AddRange(this.CustomerAllowWOWikiInTags); t.AddRange(this.CustomerAllowWOAttachmentsInTags); @@ -147,7 +151,7 @@ namespace AyaNova.Models } //Used internally and at client end as extended rights atop roles system in relation only to Contact (customer type users) - public record CustomerRightsRecord(bool CSR, bool WO, bool WOWIKI, bool WOAttachments, bool UserSettings, bool NotifyServiceImminent, bool NotifyCSRAccepted, bool NotifyCSRRejected, bool NotifyWOCreated, bool NotifyWOCompleted, long EntityId, bool EntityActive, long?ThisWOEffectiveWOReportId, bool ThisWOCanWiki, bool ThisWOCanAttachments); + public record CustomerRightsRecord(bool CSR, bool CreateUnit, bool WO, bool WOWIKI, bool WOAttachments, bool UserSettings, bool NotifyServiceImminent, bool NotifyCSRAccepted, bool NotifyCSRRejected, bool NotifyWOCreated, bool NotifyWOCompleted, long EntityId, bool EntityActive, long?ThisWOEffectiveWOReportId, bool ThisWOCanWiki, bool ThisWOCanAttachments); } /* CREATE TABLE [dbo].[AGLOBAL]( diff --git a/server/AyaNova/resource/de.json b/server/AyaNova/resource/de.json index 01f0c962..7a9c3516 100644 --- a/server/AyaNova/resource/de.json +++ b/server/AyaNova/resource/de.json @@ -2256,6 +2256,8 @@ "CustomerAccessWorkOrderWiki": "Arbeitsauftragskopf anzeigen WIKI", "CustomerAccessWorkOrderAttachments": "Anhänge des Arbeitsauftragskopfes öffnen", "CSRInfoText": "Nachricht an den Kunden", + "CustomerAllowCreateUnit": "Dem Kunden erlauben, eine Einheit zu erstellen", + "AddNewUnit": "Neue Einheit hinzufügen", "CustomerAccessWorkOrderReport": "Kundenversion Arbeitsauftragsbericht", "NoFeaturesAvailable": "Für Ihr Konto sind keine Funktionen aktiviert", "CustomerSignature": "Unterschrift des Kunden", @@ -2304,7 +2306,7 @@ "ReportRenderAtCapacity": "Der Server hat derzeit das maximale Limit für die Verarbeitung von Berichten, bitte versuchen Sie es in Kürze erneut", "NativeDateTimeInput": "Verwenden Sie die standardmäßigen Eingabesteuerelemente für Datum und Uhrzeit des Browsers", "CompanyInformation": "Firmeninformation", - "CompanyEmail":"Email", - "CompanyPhone1":"Geschäftstelefon", - "CompanyPhone2":"Telefon 2" + "CompanyEmail": "Email", + "CompanyPhone1": "Geschäftstelefon", + "CompanyPhone2": "Telefon 2" } \ No newline at end of file diff --git a/server/AyaNova/resource/en.json b/server/AyaNova/resource/en.json index 342a0b9b..52cc1923 100644 --- a/server/AyaNova/resource/en.json +++ b/server/AyaNova/resource/en.json @@ -2256,9 +2256,11 @@ "CustomerAccessWorkOrderWiki": "View work order header WIKI", "CustomerAccessWorkOrderAttachments": "Open work order header attachments", "CSRInfoText": "Message to Customer", + "CustomerAllowCreateUnit": "Allow Customer to create Unit", + "AddNewUnit": "Add new Unit", "CustomerAccessWorkOrderReport": "Customer work order report", - "NoFeaturesAvailable": "No features are enabled for your account", "CustomerSignature": "Customer signature", + "NoFeaturesAvailable": "No features are enabled for your account", "TechSignature": "Technician signature", "ScheduleConflict": "Schedule conflict", "ReportIncludeAllWorkOrderItemDescendants": "Include all descendants of work order item", diff --git a/server/AyaNova/resource/es.json b/server/AyaNova/resource/es.json index 7662b154..32419e0f 100644 --- a/server/AyaNova/resource/es.json +++ b/server/AyaNova/resource/es.json @@ -2256,6 +2256,8 @@ "CustomerAccessWorkOrderWiki": "Ver el encabezado de la orden de trabajo WIKI", "CustomerAccessWorkOrderAttachments": "Abrir archivos adjuntos del encabezado de la orden de trabajo", "CSRInfoText": "Mensaje al cliente", + "CustomerAllowCreateUnit": "Permitir al cliente crear unidad", + "AddNewUnit": "Agregar nueva unidad", "CustomerAccessWorkOrderReport": "Informe de orden de trabajo del cliente", "NoFeaturesAvailable": "No hay funciones habilitadas para su cuenta", "CustomerSignature": "Firma del cliente", @@ -2304,7 +2306,7 @@ "ReportRenderAtCapacity": "El servidor se encuentra actualmente en el límite máximo para procesar informes. Vuelva a intentarlo en breve.", "NativeDateTimeInput": "Utilice los controles de entrada de fecha y hora estándar del navegador", "CompanyInformation": "Información de la empresa", - "CompanyEmail":"Email", - "CompanyPhone1":"Teléfono", - "CompanyPhone2":"Teléfono 2" + "CompanyEmail": "Email", + "CompanyPhone1": "Teléfono", + "CompanyPhone2": "Teléfono 2" } \ No newline at end of file diff --git a/server/AyaNova/resource/fr.json b/server/AyaNova/resource/fr.json index 3676f261..e6d16f93 100644 --- a/server/AyaNova/resource/fr.json +++ b/server/AyaNova/resource/fr.json @@ -2256,6 +2256,8 @@ "CustomerAccessWorkOrderWiki": "Voir l'en-tête de l'ordre de travail WIKI", "CustomerAccessWorkOrderAttachments": "Ouvrir les pièces jointes d'en-tête d'ordre de travail", "CSRInfoText": "Message au client", + "CustomerAllowCreateUnit": "Autoriser le client à créer une unité", + "AddNewUnit": "Ajouter une nouvelle unité", "CustomerAccessWorkOrderReport": "Rapport de bon de travail client", "NoFeaturesAvailable": "Aucune fonctionnalité n'est activée pour votre compte", "CustomerSignature": "Signature du client", diff --git a/server/AyaNova/util/AySchema.cs b/server/AyaNova/util/AySchema.cs index 2984a4c2..f592da2f 100644 --- a/server/AyaNova/util/AySchema.cs +++ b/server/AyaNova/util/AySchema.cs @@ -22,7 +22,7 @@ namespace AyaNova.Util //!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImportingAsync WHEN NEW TABLES ADDED!!!! private const int DESIRED_SCHEMA_LEVEL = 1; - internal const long EXPECTED_COLUMN_COUNT = 1322; + internal const long EXPECTED_COLUMN_COUNT = 1324; internal const long EXPECTED_INDEX_COUNT = 153; internal const long EXPECTED_CHECK_CONSTRAINTS = 519; internal const long EXPECTED_FOREIGN_KEY_CONSTRAINTS = 198; @@ -31,7 +31,7 @@ namespace AyaNova.Util //!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImportingAsync WHEN NEW TABLES ADDED!!!! - ///////////////////////////////////////////////////////////////// C1322:I153:CC519:FC198:V11:R2 + ///////////////////////////////////////// C1324:I153:CC519:FC198:V11:R2 @@ -265,6 +265,7 @@ namespace AyaNova.Util + "signaturefooter TEXT, " + "customerservicerequestinfotext TEXT, " + "customerallowcsr BOOL DEFAULT FALSE, customerallowcsrintags VARCHAR(255) ARRAY, " + + "customerallowcreateunit BOOL DEFAULT FALSE, customerallowcreateunitintags VARCHAR(255) ARRAY, " + "customerallowviewwo BOOL DEFAULT FALSE, customerallowviewwointags VARCHAR(255) ARRAY, " + "customerworkorderreport1tags VARCHAR(255) ARRAY, customerworkorderreport2tags VARCHAR(255) ARRAY, " + "customerworkorderreport3tags VARCHAR(255) ARRAY, customerworkorderreport4tags VARCHAR(255) ARRAY, customerworkorderreport5tags VARCHAR(255) ARRAY, " diff --git a/server/AyaNova/util/Seeder.cs b/server/AyaNova/util/Seeder.cs index 39972c57..296115c0 100644 --- a/server/AyaNova/util/Seeder.cs +++ b/server/AyaNova/util/Seeder.cs @@ -1680,6 +1680,7 @@ namespace AyaNova.Util gbiz.TaxPartSaleId = TCGoods; gbiz.TaxRateSaleId = TCServices; gbiz.CustomerAllowCSR = true; + gbiz.CustomerAllowCreateUnit=true; gbiz.CustomerAllowNotifyCSRAccepted = true; gbiz.CustomerAllowNotifyCSRRejected = true; gbiz.CustomerAllowNotifyServiceImminent = true;