This commit is contained in:
2020-07-15 19:53:48 +00:00
parent 5318fa261d
commit 6e217ad012
10 changed files with 76 additions and 66 deletions

View File

@@ -239,7 +239,7 @@ namespace AyaNova.Api.Controllers
TranslationKeysToFetch.Add("NotifyEventCSRRejected");
TranslationKeysToFetch.Add("NotifyEventWorkorderClosed");
TranslationKeysToFetch.Add("NotifyEventQuoteStatusChange");
//TranslationKeysToFetch.Add("NotifyEventWorkorderFollowUp");
TranslationKeysToFetch.Add("NotifyEventObjectAge");
TranslationKeysToFetch.Add("NotifyEventServiceBankDepleted");
TranslationKeysToFetch.Add("NotifyEventReminderImminent");
TranslationKeysToFetch.Add("NotifyEventScheduledOnWorkorder");
@@ -269,7 +269,7 @@ namespace AyaNova.Api.Controllers
ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventCSRRejected"], Id = (long)NotifyEventType.CSRRejected });
ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventWorkorderClosed"], Id = (long)NotifyEventType.WorkorderClosed });
ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventQuoteStatusChange"], Id = (long)NotifyEventType.QuoteStatusChange });
// ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventWorkorderFollowUp"], Id = (long)NotifyEventType.WorkorderFollowUp });
ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventObjectAge"], Id = (long)NotifyEventType.ObjectAge });
ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventServiceBankDepleted"], Id = (long)NotifyEventType.ServiceBankDepleted });
ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventReminderImminent"], Id = (long)NotifyEventType.ReminderImminent });
ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventScheduledOnWorkorder"], Id = (long)NotifyEventType.ScheduledOnWorkorder });
@@ -286,7 +286,7 @@ namespace AyaNova.Api.Controllers
ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventWorkorderStatusAge"], Id = (long)NotifyEventType.WorkorderStatusAge });
ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventUnitWarrantyExpiry"], Id = (long)NotifyEventType.UnitWarrantyExpiry });
ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventUnitMeterReadingMultipleExceeded"], Id = (long)NotifyEventType.UnitMeterReadingMultipleExceeded });
//ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventDefaultNotification"], Id = (long)NotifyEventType.DefaultNotification });
// ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventDefaultNotification"], Id = (long)NotifyEventType.DefaultNotification });
}
else if (keyNameInLowerCase == StringUtil.TrimTypeName(typeof(NotifyDeliveryMethod).ToString()).ToLowerInvariant())

View File

@@ -13,30 +13,30 @@ namespace AyaNova.Biz
ObjectDeleted = 1,
ObjectCreated = 2,
ObjectModified = 3,
WorkorderStatusChange=4,
ContractExpiring=5,
CSRAccepted=6,
CSRRejected=7,
WorkorderClosed=8,
QuoteStatusChange=9,
// WorkorderFollowUp=10,
ServiceBankDepleted=11,
ReminderImminent=12,
ScheduledOnWorkorder=13,
ScheduledOnWorkorderImminent=14,
WorkorderCloseByPassed=15,
OutsideServiceOverdue=16,
OutsideServiceReceived=17,
PartRequestReceived=18,
NotifyHealthCheck=19,//with timespan to set frequency
BackupStatus=20,
CustomerServiceImminent=21,
PartRequested=22,
WorkorderTotalExceedsThreshold=23,//"the Andy"
WorkorderStatusAge=24,//sitting too long in same status
UnitWarrantyExpiry=25,
UnitMeterReadingMultipleExceeded=26,
DefaultNotification=27//old quick notification, refers now to any direct text notification internal or user to user used for system notifications
WorkorderStatusChange = 4,
ContractExpiring = 5,
CSRAccepted = 6,
CSRRejected = 7,
WorkorderClosed = 8,
QuoteStatusChange = 9,
ObjectAge = 10,
ServiceBankDepleted = 11,
ReminderImminent = 12,
ScheduledOnWorkorder = 13,
ScheduledOnWorkorderImminent = 14,
WorkorderCloseByPassed = 15,
OutsideServiceOverdue = 16,
OutsideServiceReceived = 17,
PartRequestReceived = 18,
NotifyHealthCheck = 19,//with timespan to set frequency
BackupStatus = 20,
CustomerServiceImminent = 21,
PartRequested = 22,
WorkorderTotalExceedsThreshold = 23,//"the Andy"
WorkorderStatusAge = 24,//sitting too long in same status
UnitWarrantyExpiry = 25,
UnitMeterReadingMultipleExceeded = 26,
DefaultNotification = 27//old quick notification, refers now to any direct text notification internal or user to user used for system notifications
//NEW ITEMS REQUIRE translation KEYS

View File

@@ -22,6 +22,7 @@ namespace AyaNova.Models
public TimeSpan? AdvanceNotice { get; set; } //Note: I've been doing nullable wrong sort of: https://stackoverflow.com/a/29149207/8939
public long? IdValue { get; set; }
public decimal? DecValue { get; set; }
public TimeSpan? AgeValue {get;set;}//for events that depend on an age of something (e.g. WorkorderStatusAge)
[Required]
public NotifyDeliveryMethod DeliveryMethod { get; set; }
public string DeliveryAddress { get; set; }

View File

@@ -1548,7 +1548,7 @@
"PageOfPageText": "{0}-{1} von {2}",
"Loading": "Wird geladen...",
"Tags": "Kategorien",
"Tag":"Tag",
"Tag": "Tag",
"UserTypeServiceContractor": "Subunternehmer",
"AuthorizationRoles": "Autorisierungsrollen",
"AuthorizationRoleNoRole": "Keine Rolle",
@@ -1850,14 +1850,14 @@
"MoveSelected": "Verschieben Sie ausgewählte Elemente",
"DeleteSelected": "Ausgewählte Elemente löschen",
"Event": "Veranstaltung",
"Extensions":"Erweiterungen",
"SelectedItems":"Ausgewählte Elemente",
"Remove":"Entfernen",
"NotifyDeliveryMethod":"Benachrichtigungsversandmethode",
"NotifyEventType":"Benachrichtigungsereignis",
"NotifyDeliveryAddress":"An Adresse liefern",
"InTags":"Filtern Sie in diesen Tags",
"OutTags":"Filtern Sie diese Tags heraus",
"Extensions": "Erweiterungen",
"SelectedItems": "Ausgewählte Elemente",
"Remove": "Entfernen",
"NotifyDeliveryMethod": "Benachrichtigungsversandmethode",
"NotifyEventType": "Benachrichtigungsereignis",
"NotifyDeliveryAddress": "An Adresse liefern",
"InTags": "Filtern Sie in diesen Tags",
"OutTags": "Filtern Sie diese Tags heraus",
"NotifyEventObjectDeleted": "Objekt gelöscht",
"NotifyEventObjectCreated": "Objekt erstellt",
"NotifyEventObjectModified": "Objekt geändert",
@@ -1866,7 +1866,7 @@
"NotifyEventCSRAccepted": "Kundendienstanfrage angenommen",
"NotifyEventCSRRejected": "Kundendienstanfrage abgelehnt",
"NotifyEventWorkorderClosed": "Arbeitsauftrag geschlossen",
"NotifyEventQuoteStatusChange": "Angebotsstatus geändert",
"NotifyEventQuoteStatusChange": "Angebotsstatus geändert",
"NotifyEventServiceBankDepleted": "Service Bank erschöpft",
"NotifyEventReminderImminent": "Erinnerung unmittelbar bevorsteht",
"NotifyEventScheduledOnWorkorder": "Geplant auf Arbeitsauftrag",
@@ -1885,5 +1885,7 @@
"NotifyEventUnitMeterReadingMultipleExceeded": "Zählerstand überschritten (Vielfaches)",
"NotifyEventDefaultNotification": "Standardbenachrichtigung",
"NotifyDeliveryMethodApp": "In Anwendung liefern",
"NotifyDeliveryMethodSMTP": "An E-Mail-Adresse liefern"
"NotifyDeliveryMethodSMTP": "An E-Mail-Adresse liefern",
"NotifyEventObjectAge":"Objektalter seit der Erstellung",
"Duration": "Dauer"
}

View File

@@ -1853,11 +1853,11 @@
"Extensions": "Extensions",
"SelectedItems": "Selected items",
"Remove": "Remove",
"NotifyDeliveryMethod":"Notification delivery method",
"NotifyEventType":"Notification event",
"NotifyDeliveryAddress":"Deliver to address",
"InTags":"Filter include tags",
"OutTags":"Filter exclude tags",
"NotifyDeliveryMethod": "Notification delivery method",
"NotifyEventType": "Notification event",
"NotifyDeliveryAddress": "Deliver to address",
"InTags": "Filter include tags",
"OutTags": "Filter exclude tags",
"NotifyEventObjectDeleted": "Object deleted",
"NotifyEventObjectCreated": "Object created",
"NotifyEventObjectModified": "Object changed",
@@ -1866,7 +1866,7 @@
"NotifyEventCSRAccepted": "Customer service request accepted",
"NotifyEventCSRRejected": "Customer service request rejected",
"NotifyEventWorkorderClosed": "Work order closed",
"NotifyEventQuoteStatusChange": "Quote status changed",
"NotifyEventQuoteStatusChange": "Quote status changed",
"NotifyEventServiceBankDepleted": "Service bank empty",
"NotifyEventReminderImminent": "Reminder imminent",
"NotifyEventScheduledOnWorkorder": "Scheduled on work order",
@@ -1885,5 +1885,7 @@
"NotifyEventUnitMeterReadingMultipleExceeded": "Unit meter reading multiple exceeded",
"NotifyEventDefaultNotification": "Default notification",
"NotifyDeliveryMethodApp": "Deliver in application",
"NotifyDeliveryMethodSMTP": "Deliver to email address"
"NotifyDeliveryMethodSMTP": "Deliver to email address",
"NotifyEventObjectAge":"Object age since created",
"Duration": "Duration"
}

View File

@@ -1548,7 +1548,7 @@
"PageOfPageText": "{0}-{1} de {2}",
"Loading": "Cargando...",
"Tags": "Etiquetas",
"Tag":"Etiqueta",
"Tag": "Etiqueta",
"UserTypeServiceContractor": "Subcontratista",
"AuthorizationRoles": "Roles de autorización",
"AuthorizationRoleNoRole": "Sin rol",
@@ -1850,14 +1850,14 @@
"MoveSelected": "Mover elementos seleccionados",
"DeleteSelected": "Eliminar elementos seleccionados",
"Event": "Evento",
"Extensions":"Extensiones",
"SelectedItems":"Elementos seleccionados",
"Remove":"Eliminar",
"NotifyDeliveryMethod":"Método de entrega de notificaciones",
"NotifyEventType":"Evento de notificación",
"NotifyDeliveryAddress":"Entregar a la dirección de correo electrónico",
"InTags":"Filtrar incluir etiquetas",
"OutTags":"Filtrar etiquetas excluidas",
"Extensions": "Extensiones",
"SelectedItems": "Elementos seleccionados",
"Remove": "Eliminar",
"NotifyDeliveryMethod": "Método de entrega de notificaciones",
"NotifyEventType": "Evento de notificación",
"NotifyDeliveryAddress": "Entregar a la dirección de correo electrónico",
"InTags": "Filtrar incluir etiquetas",
"OutTags": "Filtrar etiquetas excluidas",
"NotifyEventObjectDeleted": "Objeto eliminado",
"NotifyEventObjectCreated": "Objeto creado",
"NotifyEventObjectModified": "Objeto cambiado",
@@ -1885,5 +1885,7 @@
"NotifyEventUnitMeterReadingMultipleExceeded": "Lectura de medidor de unidad excedida (múltiple)",
"NotifyEventDefaultNotification": "Notificación predeterminada",
"NotifyDeliveryMethodApp": "Entregar en programa",
"NotifyDeliveryMethodSMTP": "Entregar a la dirección de correo electrónico"
"NotifyDeliveryMethodSMTP": "Entregar a la dirección de correo electrónico",
"NotifyEventObjectAge":"Edad del objeto desde su creación",
"Duration": "Duración"
}

View File

@@ -1548,7 +1548,7 @@
"PageOfPageText": "{0}-{1} sur {2}",
"Loading": "Chargement...",
"Tags": "Balises",
"Tag":"Balise",
"Tag": "Balise",
"UserTypeServiceContractor": "Sous-traitant",
"AuthorizationRoles": "Rôles d'autorisation",
"AuthorizationRoleNoRole": "Pas de rôle",
@@ -1853,11 +1853,11 @@
"Extensions": "Extensions",
"SelectedItems": "Éléments sélectionnés",
"Remove": "Retirer",
"NotifyDeliveryMethod":"Méthode de remise des notifications",
"NotifyEventType":"Événement de notification",
"NotifyDeliveryAddress":"Livrer à l'adresse",
"InTags":"Filtrer les balises inclusives",
"OutTags":"Filtrer les tags exclusifs",
"NotifyDeliveryMethod": "Méthode de remise des notifications",
"NotifyEventType": "Événement de notification",
"NotifyDeliveryAddress": "Livrer à l'adresse",
"InTags": "Filtrer les balises inclusives",
"OutTags": "Filtrer les tags exclusifs",
"NotifyEventObjectDeleted": "Objet supprimé",
"NotifyEventObjectCreated": "Objet créé",
"NotifyEventObjectModified": "Objet changé",
@@ -1885,5 +1885,7 @@
"NotifyEventUnitMeterReadingMultipleExceeded": "Lecture du compteur unitaire dépassée (multiple)",
"NotifyEventDefaultNotification": "Notification par défaut",
"NotifyDeliveryMethodApp": "Livrer dans le programme",
"NotifyDeliveryMethodSMTP": "Livrer à l'adresse e-mail"
"NotifyDeliveryMethodSMTP": "Livrer à l'adresse e-mail",
"NotifyEventObjectAge":"Âge de l'objet depuis sa création",
"Duration": "Durée"
}

View File

@@ -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 = 380;
internal const long EXPECTED_COLUMN_COUNT = 381;
internal const long EXPECTED_INDEX_COUNT = 139;
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
@@ -685,7 +685,7 @@ $BODY$;
await ExecQueryAsync("CREATE TABLE anotifysubscription (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, " +
"userid bigint not null, ayatype integer, eventtype integer not null, advancenotice interval, " +
"idvalue bigint, decvalue decimal(19,4), deliverymethod integer not null, deliveryaddress text, attachreportid bigint, intags varchar(255) ARRAY, outtags varchar(255) ARRAY)");
"idvalue bigint, decvalue decimal(19,4), agevalue interval, deliverymethod integer not null, deliveryaddress text, attachreportid bigint, intags varchar(255) ARRAY, outtags varchar(255) ARRAY)");
await ExecQueryAsync("CREATE TABLE anotifyevent (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, created timestamp not null, " +
"ayatype integer, objectid bigint, eventtype integer not null, subscriptionid bigint not null, idvalue bigint, decvalue decimal(19,4), eventdate timestamp, message text)");