From d7e329c6164930fe6550f6eb844f69598f35b3e7 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Mon, 2 Aug 2021 18:42:57 +0000 Subject: [PATCH] --- .vscode/launch.json | 2 +- server/AyaNova/Controllers/EnumListController.cs | 13 +++++++------ server/AyaNova/biz/PMBiz.cs | 1 + 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index b77f3b95..fcc80a75 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -53,7 +53,7 @@ "AYANOVA_FOLDER_USER_FILES": "c:\\temp\\RavenTestData\\userfiles", "AYANOVA_FOLDER_BACKUP_FILES": "c:\\temp\\RavenTestData\\backupfiles", "AYANOVA_FOLDER_TEMPORARY_SERVER_FILES": "c:\\temp\\RavenTestData\\tempfiles", - "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\\postgres_13\\bin\\" diff --git a/server/AyaNova/Controllers/EnumListController.cs b/server/AyaNova/Controllers/EnumListController.cs index ef73373c..7cac8537 100644 --- a/server/AyaNova/Controllers/EnumListController.cs +++ b/server/AyaNova/Controllers/EnumListController.cs @@ -386,7 +386,7 @@ namespace AyaNova.Api.Controllers TranslationKeysToFetch.Add("NotifyEventQuoteStatusChange"); TranslationKeysToFetch.Add("NotifyEventQuoteStatusAge"); TranslationKeysToFetch.Add("NotifyEventObjectAge"); - // TranslationKeysToFetch.Add("NotifyEventServiceBankDepleted"); + TranslationKeysToFetch.Add("NotifyEventServiceBankDepleted"); TranslationKeysToFetch.Add("NotifyEventReminderImminent"); TranslationKeysToFetch.Add("NotifyEventScheduledOnWorkorder"); TranslationKeysToFetch.Add("NotifyEventScheduledOnWorkorderImminent"); @@ -397,7 +397,7 @@ namespace AyaNova.Api.Controllers TranslationKeysToFetch.Add("NotifyEventNotifyHealthCheck"); TranslationKeysToFetch.Add("NotifyEventBackupStatus"); TranslationKeysToFetch.Add("NotifyEventCustomerServiceImminent"); - //TranslationKeysToFetch.Add("NotifyEventPartRequested"); REMOVED REDUNDANT COVERED BY OTHERS + TranslationKeysToFetch.Add("NotifyEventPMStopGeneratingDateReached"); TranslationKeysToFetch.Add("NotifyEventWorkorderTotalExceedsThreshold"); TranslationKeysToFetch.Add("NotifyEventWorkorderStatusAge"); TranslationKeysToFetch.Add("NotifyEventUnitWarrantyExpiry"); @@ -406,7 +406,8 @@ namespace AyaNova.Api.Controllers TranslationKeysToFetch.Add("NotifyEventGeneralNotification"); TranslationKeysToFetch.Add("NotifyEventCopyOfCustomerNotification"); TranslationKeysToFetch.Add("NotifyEventWorkorderCreatedForCustomer"); - //TranslationKeysToFetch.Add("NotifyEventWorkorderCompletedFollowUp"); REMOVED REDUNDANT COVERED BY OTHERS + TranslationKeysToFetch.Add("NotifyEventPMGenerationFailed"); + TranslationKeysToFetch.Add("NotifyEventPMInsufficientInventory"); var LT = await TranslationBiz.GetSubsetStaticAsync(TranslationKeysToFetch, translationId); @@ -421,7 +422,7 @@ namespace AyaNova.Api.Controllers ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventQuoteStatusChange"], Id = (long)NotifyEventType.QuoteStatusChange }); ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventQuoteStatusAge"], Id = (long)NotifyEventType.QuoteStatusAge }); 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["NotifyEventPMInsufficientInventory"], Id = (long)NotifyEventType.PMInsufficientInventory }); ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventReminderImminent"], Id = (long)NotifyEventType.ReminderImminent }); ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventScheduledOnWorkorder"], Id = (long)NotifyEventType.ScheduledOnWorkorder }); ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventScheduledOnWorkorderImminent"], Id = (long)NotifyEventType.ScheduledOnWorkorderImminent }); @@ -432,7 +433,7 @@ namespace AyaNova.Api.Controllers ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventNotifyHealthCheck"], Id = (long)NotifyEventType.NotifyHealthCheck }); ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventBackupStatus"], Id = (long)NotifyEventType.BackupStatus }); ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventCustomerServiceImminent"], Id = (long)NotifyEventType.CustomerServiceImminent }); - //ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventPartRequested"], Id = (long)NotifyEventType.PartRequested }); + ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventPMStopGeneratingDateReached"], Id = (long)NotifyEventType.PMStopGeneratingDateReached }); ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventWorkorderTotalExceedsThreshold"], Id = (long)NotifyEventType.WorkorderTotalExceedsThreshold }); ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventWorkorderStatusAge"], Id = (long)NotifyEventType.WorkorderStatusAge }); ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventUnitWarrantyExpiry"], Id = (long)NotifyEventType.UnitWarrantyExpiry }); @@ -442,7 +443,7 @@ namespace AyaNova.Api.Controllers ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventCopyOfCustomerNotification"], Id = (long)NotifyEventType.CopyOfCustomerNotification }); ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventWorkorderCreatedForCustomer"], Id = (long)NotifyEventType.WorkorderCreatedForCustomer }); - //ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventWorkorderCompletedFollowUp"], Id = (long)NotifyEventType.WorkorderCompletedFollowUp }); + ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventPMGenerationFailed"], Id = (long)NotifyEventType.PMGenerationFailed }); } else if (keyNameInLowerCase == StringUtil.TrimTypeName(typeof(NotifyDeliveryMethod).ToString()).ToLowerInvariant()) diff --git a/server/AyaNova/biz/PMBiz.cs b/server/AyaNova/biz/PMBiz.cs index 3383a331..06bd21d7 100644 --- a/server/AyaNova/biz/PMBiz.cs +++ b/server/AyaNova/biz/PMBiz.cs @@ -4802,6 +4802,7 @@ namespace AyaNova.Biz } try { + throw new Exception("TEST EXCEPTION IN PM GENERATION"); //make new workorder if (await NewServiceWorkOrderFromPMAsync(p, ct, log)) {