diff --git a/.vscode/launch.json b/.vscode/launch.json index 396abc9b..bcfc56be 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -50,7 +50,7 @@ "AYANOVA_USE_URLS": "http://*:7575;", "AYANOVA_FOLDER_USER_FILES": "c:\\temp\\RavenTestData\\userfiles", "AYANOVA_FOLDER_BACKUP_FILES": "c:\\temp\\RavenTestData\\backupfiles", - "AYANOVA_SERVER_TEST_MODE":"false", + "AYANOVA_SERVER_TEST_MODE":"true", "AYANOVA_SERVER_TEST_MODE_SEEDLEVEL":"small", "AYANOVA_SERVER_TEST_MODE_TZ_OFFSET":"-7", "AYANOVA_BACKUP_PG_DUMP_PATH":"C:\\data\\code\\PostgreSQLPortable_12.0\\App\\PgSQL\\bin\\" diff --git a/server/AyaNova/models/UserOptions.cs b/server/AyaNova/models/UserOptions.cs index b57b06c5..6ac04db3 100644 --- a/server/AyaNova/models/UserOptions.cs +++ b/server/AyaNova/models/UserOptions.cs @@ -10,11 +10,11 @@ namespace AyaNova.Models [Required] public long TranslationId { get; set; } - + //------------- [EmailAddress] public string EmailAddress { get; set; } - + public bool CopyGeneralNotificationsToEmail { get; set; }//in addition to deliving general notification in-app, also send a copy to email address /* Hexadecimal notation: #RGB[A] R (red), G (green), B (blue), and A (alpha) are hexadecimal characters (0–9, A–F). A is optional. The three-digit notation (#RGB) is a shorter version of the six-digit form (#RRGGBB). For example, #f09 is the same color as #ff0099. Likewise, the four-digit RGB notation (#RGBA) is a shorter version of the eight-digit form (#RRGGBBAA). For example, #0f38 is the same color as #00ff3388. @@ -29,6 +29,7 @@ namespace AyaNova.Models public bool Hour12 { get; set; } + //relations //https://docs.microsoft.com/en-us/ef/core/modeling/relationships#other-relationship-patterns [JsonIgnore]//hide from being returned (as null anyway) in routes @@ -42,6 +43,7 @@ namespace AyaNova.Models CurrencyName = "USD"; Hour12 = true; UiColor = "#000000";//black is the default + CopyGeneralNotificationsToEmail = false; } } diff --git a/server/AyaNova/resource/de.json b/server/AyaNova/resource/de.json index 2eed47ea..e8507c02 100644 --- a/server/AyaNova/resource/de.json +++ b/server/AyaNova/resource/de.json @@ -1902,5 +1902,6 @@ "ConnectionSecurity": "SMTP-Verbindungssicherheit", "SmtpServerPort": "SMTP-Server-Port", "NotifyFromAddress": "SMTP-Benachrichtigungsadresse", - "AyaNovaServerURL": "AyaNova Server URL" + "AyaNovaServerURL": "AyaNova Server URL", + "CopyGeneralNotificationsToEmail":"Senden Sie eine Kopie der allgemeinen Benachrichtigungen an die E-Mail-Adresse" } \ No newline at end of file diff --git a/server/AyaNova/resource/en.json b/server/AyaNova/resource/en.json index ef105e94..04889664 100644 --- a/server/AyaNova/resource/en.json +++ b/server/AyaNova/resource/en.json @@ -1902,5 +1902,6 @@ "ConnectionSecurity": "SMTP connection security", "SmtpServerPort": "SMTP server port", "NotifyFromAddress": "SMTP notify from address", - "AyaNovaServerURL": "AyaNova server URL" + "AyaNovaServerURL": "AyaNova server URL", + "CopyGeneralNotificationsToEmail":"Send a copy of general notifications via email" } \ No newline at end of file diff --git a/server/AyaNova/resource/es.json b/server/AyaNova/resource/es.json index af3ef6ea..00e90d0b 100644 --- a/server/AyaNova/resource/es.json +++ b/server/AyaNova/resource/es.json @@ -1902,5 +1902,6 @@ "ConnectionSecurity": "Seguridad de conexión del servidor SMTP", "SmtpServerPort": "Puerto SMTP", "NotifyFromAddress": "Notificación SMTP desde la dirección", - "AyaNovaServerURL": "URL del servidor AyaNova" + "AyaNovaServerURL": "URL del servidor AyaNova", + "CopyGeneralNotificationsToEmail":"Enviar una copia de las notificaciones generales a la dirección de correo electrónico" } \ No newline at end of file diff --git a/server/AyaNova/resource/fr.json b/server/AyaNova/resource/fr.json index bd3d16f4..ddd531c3 100644 --- a/server/AyaNova/resource/fr.json +++ b/server/AyaNova/resource/fr.json @@ -1902,5 +1902,6 @@ "ConnectionSecurity": "Sécurité de la connexion SMTP", "SmtpServerPort": "Port du serveur SMTP", "NotifyFromAddress": "Notification SMTP envoyée depuis l'adresse", - "AyaNovaServerURL": "URL du serveur AyaNova" + "AyaNovaServerURL": "URL du serveur AyaNova", + "CopyGeneralNotificationsToEmail": "Envoyer une copie des notifications générales à l'adresse e-mail" } \ No newline at end of file diff --git a/server/AyaNova/util/AySchema.cs b/server/AyaNova/util/AySchema.cs index 8578de00..8a0fa34e 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::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!! private const int DESIRED_SCHEMA_LEVEL = 12; - internal const long EXPECTED_COLUMN_COUNT = 383; + internal const long EXPECTED_COLUMN_COUNT = 384; internal const long EXPECTED_INDEX_COUNT = 139; //!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!! @@ -337,7 +337,8 @@ $BODY$; //Add user options table await ExecQueryAsync("CREATE TABLE auseroptions (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, " + - "userid bigint not null, translationid bigint not null REFERENCES atranslation (id), languageoverride text, timezoneoverride text, currencyname text, hour12 bool not null, emailaddress text, uicolor varchar(12) not null default '#000000')"); + "userid bigint not null, translationid bigint not null REFERENCES atranslation (id), languageoverride text, timezoneoverride text, "+ + "currencyname text, hour12 bool not null, emailaddress text, copygeneralnotificationstoemail bool not null uicolor varchar(12) not null default '#000000')"); //Prime the db with the default SuperUser account