This commit is contained in:
2023-01-12 20:15:20 +00:00
parent 3f4a23faab
commit 1641754318
4 changed files with 61 additions and 39 deletions

View File

@@ -471,41 +471,22 @@ namespace Sockeye.Api.Controllers
TranslationKeysToFetch.Add("NotifyEventObjectDeleted");
TranslationKeysToFetch.Add("NotifyEventObjectCreated");
TranslationKeysToFetch.Add("NotifyEventObjectModified");
TranslationKeysToFetch.Add("NotifyEventWorkorderStatusChange");
TranslationKeysToFetch.Add("NotifyEventContractExpiring");
TranslationKeysToFetch.Add("NotifyEventCSRAccepted");
TranslationKeysToFetch.Add("NotifyEventCSRRejected");
TranslationKeysToFetch.Add("NotifyEventWorkorderCompleted");
TranslationKeysToFetch.Add("NotifyEventQuoteStatusChange");
TranslationKeysToFetch.Add("NotifyEventQuoteStatusAge");
TranslationKeysToFetch.Add("NotifyEventObjectAge");
TranslationKeysToFetch.Add("NotifyEventServiceBankDepleted");
TranslationKeysToFetch.Add("NotifyEventReminderImminent");
TranslationKeysToFetch.Add("NotifyEventScheduledOnWorkorder");
TranslationKeysToFetch.Add("NotifyEventScheduledOnWorkorderImminent");
TranslationKeysToFetch.Add("NotifyEventWorkorderCompletedStatusOverdue");
TranslationKeysToFetch.Add("NotifyEventOutsideServiceOverdue");
TranslationKeysToFetch.Add("NotifyEventOutsideServiceReceived");
TranslationKeysToFetch.Add("NotifyEventPartRequestReceived");
TranslationKeysToFetch.Add("NotifyEventNotifyHealthCheck");
TranslationKeysToFetch.Add("NotifyEventBackupStatus");
TranslationKeysToFetch.Add("NotifyEventCustomerServiceImminent");
TranslationKeysToFetch.Add("NotifyEventPMStopGeneratingDateReached");
TranslationKeysToFetch.Add("NotifyEventWorkorderTotalExceedsThreshold");
TranslationKeysToFetch.Add("NotifyEventWorkorderStatusAge");
TranslationKeysToFetch.Add("NotifyEventUnitWarrantyExpiry");
TranslationKeysToFetch.Add("NotifyEventUnitMeterReadingMultipleExceeded");
TranslationKeysToFetch.Add("NotifyEventServerOperationsProblem");
TranslationKeysToFetch.Add("NotifyEventGeneralNotification");
//TranslationKeysToFetch.Add("NotifyEventCopyOfCustomerNotification");
TranslationKeysToFetch.Add("NotifyEventWorkorderCreatedForCustomer");
TranslationKeysToFetch.Add("NotifyEventPMGenerationFailed");
TranslationKeysToFetch.Add("NotifyEventPMInsufficientInventory");
TranslationKeysToFetch.Add("NotifyEventReviewImminent");
TranslationKeysToFetch.Add("NotifyEventDirectSMTPMessage");
TranslationKeysToFetch.Add("NotifyEventServerStateStatusChange");
TranslationKeysToFetch.Add("NotifyEventServerStateStatusAge");
TranslationKeysToFetch.Add("NotifyEventSubscriptionServerExpiring");
TranslationKeysToFetch.Add("NotifyEventSubscriptionServerLastUpdateAge");
TranslationKeysToFetch.Add("NotifyEventSubscriptionServerRequestReceived");
TranslationKeysToFetch.Add("NotifyEventLicenseTrialRequestReceived");
TranslationKeysToFetch.Add("NotifyEventPurchaseNotificationReceived");
var LT = await TranslationBiz.GetSubsetStaticAsync(TranslationKeysToFetch, translationId);
ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventObjectDeleted"], Id = (long)NotifyEventType.ObjectDeleted });
ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventObjectCreated"], Id = (long)NotifyEventType.ObjectCreated });
ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventObjectModified"], Id = (long)NotifyEventType.ObjectModified });
@@ -516,8 +497,14 @@ namespace Sockeye.Api.Controllers
ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventBackupStatus"], Id = (long)NotifyEventType.BackupStatus });
ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventServerOperationsProblem"], Id = (long)NotifyEventType.ServerOperationsProblem });
ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventGeneralNotification"], Id = (long)NotifyEventType.GeneralNotification });
ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventDirectSMTPMessage"], Id = (long)NotifyEventType.DirectSMTPMessage });
ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventServerStateStatusChange"], Id = (long)NotifyEventType.ServerStateStatusChange });
ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventServerStateStatusAge"], Id = (long)NotifyEventType.ServerStateStatusAge });
ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventSubscriptionServerExpiring"], Id = (long)NotifyEventType.SubscriptionServerExpiring });
ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventSubscriptionServerLastUpdateAge"], Id = (long)NotifyEventType.SubscriptionServerLastUpdateAge });
ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventSubscriptionServerRequestReceived"], Id = (long)NotifyEventType.SubscriptionServerRequestReceived });
ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventLicenseTrialRequestReceived"], Id = (long)NotifyEventType.LicenseTrialRequestReceived });
ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventPurchaseNotificationReceived"], Id = (long)NotifyEventType.PurchaseNotificationReceived });
}
else if (keyNameInLowerCase == StringUtil.TrimTypeName(typeof(NotifyDeliveryMethod).ToString()).ToLowerInvariant())
@@ -588,7 +575,7 @@ namespace Sockeye.Api.Controllers
ReturnList.Add(new NameIdItem() { Name = LT["ProductGroupRavenPerpetual"], Id = (long)ProductGroup.RavenPerpetual });
ReturnList.Add(new NameIdItem() { Name = LT["ProductGroupRavenSubscription"], Id = (long)ProductGroup.RavenSubscription });
}
else if (keyNameInLowerCase == StringUtil.TrimTypeName(typeof(ServerState).ToString()).ToLowerInvariant())
else if (keyNameInLowerCase == StringUtil.TrimTypeName(typeof(ServerState).ToString()).ToLowerInvariant())
{
TranslationKeysToFetch.Add("ServerStateRequested");
TranslationKeysToFetch.Add("ServerStateActiveHealthy");

View File

@@ -28,10 +28,16 @@ Inspiring quotes used to help complete this huge project by myself
NotifyHealthCheck = 19,//* NO OBJECT, direct subscription to receive recurring daily notify system "ping" sent out between 8am and 10am once every 24 hours minimum every day server local time
BackupStatus = 20,//* NO OBJECT, direct subscription to receive results of last backup operation
GeneralNotification = 27,//* NO OBJECT old quick notification, refers now to any direct text notification internal or user to user used for system notifications (default delivers in app but user can opt to also get email)
ServerOperationsProblem = 28,//* NO OBJECT and serious issue with server operations requiring intervention,
ServerOperationsProblem = 28,//* NO OBJECT and serious issue with SOCKEY server (NOT CUSTOMER SUBSCRIPTION SERVER) operations requiring intervention,
ReviewImminent = 34,//*Review object, Advance notice setting tag conditional
DirectSMTPMessage= 35 //Used internally when sending a message via email directly to a Customer (initially) and possibly other objects in future. Shows in sent log but not user subscribable
DirectSMTPMessage= 35, //Used internally when sending a message via email directly to a Customer (initially) and possibly other objects in future. Shows in sent log but not user subscribable
ServerStateStatusChange = 36,
ServerStateStatusAge=37,
SubscriptionServerExpiring = 38,
SubscriptionServerLastUpdateAge = 39,
SubscriptionServerRequestReceived = 40,
LicenseTrialRequestReceived = 41,
PurchaseNotificationReceived = 42
//NEW ITEMS REQUIRE translation KEYS
}

View File

@@ -1272,20 +1272,52 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
#endregion gzcase
#region CUSTOMER ADDITIONS
#region ADDITIONAL
//english translations
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'DoNotContact', 'Do not contact' FROM atranslation t where t.baselanguage = 'en'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'NotifyEventServerStateStatusChange', 'Server status changed' FROM atranslation t where t.baselanguage = 'en'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'NotifyEventServerStateStatusAge', 'Server status age' FROM atranslation t where t.baselanguage = 'en'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'NotifyEventSubscriptionServerExpiring', 'Subscription server expiring' FROM atranslation t where t.baselanguage = 'en'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'NotifyEventSubscriptionServerLastUpdateAge', 'Subscription server last update age' FROM atranslation t where t.baselanguage = 'en'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'NotifyEventSubscriptionServerRequestReceived', 'Subscription server requested' FROM atranslation t where t.baselanguage = 'en'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'NotifyEventLicenseTrialRequestReceived', 'Trial license request' FROM atranslation t where t.baselanguage = 'en'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'NotifyEventPurchaseNotificationReceived', 'Purchase notification received' FROM atranslation t where t.baselanguage = 'en'");
//spanish translations
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'DoNotContact', 'Do not contact' FROM atranslation t where t.baselanguage = 'es'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'NotifyEventServerStateStatusChange', 'Server status changed' FROM atranslation t where t.baselanguage = 'es'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'NotifyEventServerStateStatusAge', 'Server status age' FROM atranslation t where t.baselanguage = 'es'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'NotifyEventSubscriptionServerExpiring', 'Subscription server expiring' FROM atranslation t where t.baselanguage = 'es'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'NotifyEventSubscriptionServerLastUpdateAge', 'Subscription server last update age' FROM atranslation t where t.baselanguage = 'es'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'NotifyEventSubscriptionServerRequestReceived', 'Subscription server requested' FROM atranslation t where t.baselanguage = 'es'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'NotifyEventLicenseTrialRequestReceived', 'Trial license request' FROM atranslation t where t.baselanguage = 'es'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'NotifyEventPurchaseNotificationReceived', 'Purchase notification received' FROM atranslation t where t.baselanguage = 'es'");
//french translations
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'DoNotContact', 'Do not contact' FROM atranslation t where t.baselanguage = 'fr'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'NotifyEventServerStateStatusChange', 'Server status changed' FROM atranslation t where t.baselanguage = 'fr'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'NotifyEventServerStateStatusAge', 'Server status age' FROM atranslation t where t.baselanguage = 'fr'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'NotifyEventSubscriptionServerExpiring', 'Subscription server expiring' FROM atranslation t where t.baselanguage = 'fr'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'NotifyEventSubscriptionServerLastUpdateAge', 'Subscription server last update age' FROM atranslation t where t.baselanguage = 'fr'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'NotifyEventSubscriptionServerRequestReceived', 'Subscription server requested' FROM atranslation t where t.baselanguage = 'fr'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'NotifyEventLicenseTrialRequestReceived', 'Trial license request' FROM atranslation t where t.baselanguage = 'fr'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'NotifyEventPurchaseNotificationReceived', 'Purchase notification received' FROM atranslation t where t.baselanguage = 'fr'");
//german translations
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'DoNotContact', 'Do not contact' FROM atranslation t where t.baselanguage = 'de'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'NotifyEventServerStateStatusChange', 'Server status changed' FROM atranslation t where t.baselanguage = 'de'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'NotifyEventServerStateStatusAge', 'Server status age' FROM atranslation t where t.baselanguage = 'de'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'NotifyEventSubscriptionServerExpiring', 'Subscription server expiring' FROM atranslation t where t.baselanguage = 'de'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'NotifyEventSubscriptionServerLastUpdateAge', 'Subscription server last update age' FROM atranslation t where t.baselanguage = 'de'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'NotifyEventSubscriptionServerRequestReceived', 'Subscription server requested' FROM atranslation t where t.baselanguage = 'de'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'NotifyEventLicenseTrialRequestReceived', 'Trial license request' FROM atranslation t where t.baselanguage = 'de'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'NotifyEventPurchaseNotificationReceived', 'Purchase notification received' FROM atranslation t where t.baselanguage = 'de'");
#endregion customer additions
#endregion additional
currentSchema = 16;
await SetSchemaLevelAsync(currentSchema);

View File

@@ -51,7 +51,8 @@ TODO:
- Button to trigger D.O. API to requisition server automatically, spin it up etc
- Add ui to front the route under /api/v8/license/v7-reset-manager-creds
- Need ui that shows money required for paying future for yearly subs so at a glance know what money need in bank each month
////////////////////////////////////////////////////////////////////////////////////////////
@@ -151,11 +152,7 @@ LICENSE_SERVER_URL_CALLISTO = "https://callisto.ayanova.com/";//4th production
DTR
- Add ui to front the route under /api/v8/license/v7-reset-manager-creds
License routes test locally and ensure works for v7 and v8
automatic jobs to create purchase record from vendor data
send license emails based on event etc, really gets into the new stuff here
Need ui that shows money required for paying future for yearly subs so at a glance know what money need in bank each month
Also, sidebar, check if can pay d.o. in advance, or do I want that??