diff --git a/.vscode/launch.json b/.vscode/launch.json index 8d51672..db4b77d 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -35,7 +35,7 @@ "SOCKEYE_DB_CONNECTION": "Server=localhost;Username=postgres;Password=sockeye;Database=sockeye;CommandTimeout=300;", "SOCKEYE_DATA_PATH": "c:\\temp\\sockeye", "SOCKEYE_USE_URLS": "http://*:7676;", - "SOCKEYE_PERMANENTLY_ERASE_DATABASE":"true", + //"SOCKEYE_PERMANENTLY_ERASE_DATABASE":"true", //"SOCKEYE_REPORT_RENDERING_TIMEOUT":"1", "SOCKEYE_BACKUP_PG_DUMP_PATH": "C:\\data\\code\\postgres_14\\bin" }, diff --git a/server/Controllers/EnumListController.cs b/server/Controllers/EnumListController.cs index 4730881..3e94523 100644 --- a/server/Controllers/EnumListController.cs +++ b/server/Controllers/EnumListController.cs @@ -88,6 +88,7 @@ namespace Sockeye.Api.Controllers ret.Add(new KeyValuePair(StringUtil.TrimTypeName(typeof(NotifyMailSecurity).ToString()), "Notification SMTP mail server security method")); ret.Add(new KeyValuePair(StringUtil.TrimTypeName(typeof(SockEvent).ToString()), "Event log object change types")); ret.Add(new KeyValuePair(StringUtil.TrimTypeName(typeof(SockDaysOfWeek).ToString()), "Days of the week")); + ret.Add(new KeyValuePair(StringUtil.TrimTypeName(typeof(TrialRequestStatus).ToString()), "Trial license request status")); return Ok(ApiOkResponse.Response(ret)); } @@ -186,7 +187,7 @@ namespace Sockeye.Api.Controllers { var nameToFetch = t.ToString(); - + TranslationKeysToFetch.Add(nameToFetch); } } @@ -197,7 +198,7 @@ namespace Sockeye.Api.Controllers if (t.HasAttribute(typeof(ImportableBizObjectAttribute))) { var tName = t.ToString(); - + string name = string.Empty; if (LT.ContainsKey(tName)) { @@ -498,7 +499,7 @@ namespace Sockeye.Api.Controllers TranslationKeysToFetch.Add("NotifyEventPMGenerationFailed"); TranslationKeysToFetch.Add("NotifyEventPMInsufficientInventory"); TranslationKeysToFetch.Add("NotifyEventReviewImminent"); - TranslationKeysToFetch.Add("NotifyEventDirectSMTPMessage"); + TranslationKeysToFetch.Add("NotifyEventDirectSMTPMessage"); var LT = await TranslationBiz.GetSubsetStaticAsync(TranslationKeysToFetch, translationId); @@ -538,13 +539,7 @@ namespace Sockeye.Api.Controllers ReturnList.Add(new NameIdItem() { Name = LT["NotifyMailSecuritySSLTLS"], Id = (long)NotifyMailSecurity.SSLTLS }); ReturnList.Add(new NameIdItem() { Name = LT["NotifyMailSecurityStartTls"], Id = (long)NotifyMailSecurity.StartTls }); } - - - - - - - + else if (keyNameInLowerCase == StringUtil.TrimTypeName(typeof(SockDaysOfWeek).ToString()).ToLowerInvariant()) { @@ -568,6 +563,20 @@ namespace Sockeye.Api.Controllers ReturnList.Add(new NameIdItem() { Name = LT["DaySunday"], Id = (long)SockDaysOfWeek.Sunday }); } + else if (keyNameInLowerCase == StringUtil.TrimTypeName(typeof(TrialRequestStatus).ToString()).ToLowerInvariant()) + { + TranslationKeysToFetch.Add("TrialRequestStatusNew"); + TranslationKeysToFetch.Add("TrialRequestStatusApproved"); + TranslationKeysToFetch.Add("TrialRequestStatusRejected"); + var LT = await TranslationBiz.GetSubsetStaticAsync(TranslationKeysToFetch, translationId); + ReturnList.Add(new NameIdItem() { Name = LT["TrialRequestStatusNew"], Id = (long)TrialRequestStatus.New }); + ReturnList.Add(new NameIdItem() { Name = LT["TrialRequestStatusApproved"], Id = (long)TrialRequestStatus.Approved }); + ReturnList.Add(new NameIdItem() { Name = LT["TrialRequestStatusRejected"], Id = (long)TrialRequestStatus.Rejected }); + } + + + + //################################################################################################################# //################### NEW HERE DO NOT FORGET TO ADD TO LISTS AVAILABLE ABOVE AS WELL ############################## //################################################################################################################# diff --git a/server/util/AySchema.cs b/server/util/AySchema.cs index 31963e7..f943002 100644 --- a/server/util/AySchema.cs +++ b/server/util/AySchema.cs @@ -705,10 +705,10 @@ BEGIN when 68 then return format('DataListColumnView %L', ayobjectid); when 84 then aytkey= 'CustomerNotifySubscription'; when 92 then aytable = 'aintegration'; - when 93 then aytable = 'alicense'; - when 94 then aytable = 'atriallicenserequest'; + when 93 then aytable = 'alicense'; aynamecolumn = 'regto'; + when 94 then aytable = 'atriallicenserequest'; aynamecolumn = 'companyname'; when 95 then aytable = 'asubscriptionserver'; - when 96 then aytable = 'apurchase'; + when 96 then aytable = 'apurchase'; aynamecolumn = 'salesordernumber'; when 97 then aytable = 'aproduct'; when 98 then aytable = 'agzcase'; @@ -970,6 +970,9 @@ $BODY$ LANGUAGE PLPGSQL STABLE"); await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'TrialLicenseRequestRejectReason', 'Reject reason' FROM atranslation t where t.baselanguage = 'en'"); await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'TrialLicenseRequestFetchedOn', 'Fetched' FROM atranslation t where t.baselanguage = 'en'"); await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'TrialLicenseRequestPerpetual', 'Perpetual' FROM atranslation t where t.baselanguage = 'en'"); + await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'TrialRequestStatusNew', 'New' FROM atranslation t where t.baselanguage = 'en'"); + await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'TrialRequestStatusApproved', 'Approved' FROM atranslation t where t.baselanguage = 'en'"); + await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'TrialRequestStatusRejected', 'Rejected' FROM atranslation t where t.baselanguage = 'en'"); //spanish translations await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'TrialLicenseRequest', 'Trial license request' FROM atranslation t where t.baselanguage = 'es'"); @@ -984,6 +987,9 @@ $BODY$ LANGUAGE PLPGSQL STABLE"); await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'TrialLicenseRequestRejectReason', 'Reject reason' FROM atranslation t where t.baselanguage = 'es'"); await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'TrialLicenseRequestFetchedOn', 'Fetched' FROM atranslation t where t.baselanguage = 'es'"); await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'TrialLicenseRequestPerpetual', 'Perpetual' FROM atranslation t where t.baselanguage = 'es'"); + await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'TrialRequestStatusNew', 'New' FROM atranslation t where t.baselanguage = 'es'"); + await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'TrialRequestStatusApproved', 'Approved' FROM atranslation t where t.baselanguage = 'es'"); + await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'TrialRequestStatusRejected', 'Rejected' FROM atranslation t where t.baselanguage = 'es'"); //french translations await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'TrialLicenseRequest', 'Trial license request' FROM atranslation t where t.baselanguage = 'fr'"); @@ -998,6 +1004,9 @@ $BODY$ LANGUAGE PLPGSQL STABLE"); await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'TrialLicenseRequestRejectReason', 'Reject reason' FROM atranslation t where t.baselanguage = 'fr'"); await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'TrialLicenseRequestFetchedOn', 'Fetched' FROM atranslation t where t.baselanguage = 'fr'"); await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'TrialLicenseRequestPerpetual', 'Perpetual' FROM atranslation t where t.baselanguage = 'fr'"); + await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'TrialRequestStatusNew', 'New' FROM atranslation t where t.baselanguage = 'fr'"); + await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'TrialRequestStatusApproved', 'Approved' FROM atranslation t where t.baselanguage = 'fr'"); + await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'TrialRequestStatusRejected', 'Rejected' FROM atranslation t where t.baselanguage = 'fr'"); //german translations await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'TrialLicenseRequest', 'Trial license request' FROM atranslation t where t.baselanguage = 'de'"); @@ -1012,6 +1021,9 @@ $BODY$ LANGUAGE PLPGSQL STABLE"); await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'TrialLicenseRequestRejectReason', 'Reject reason' FROM atranslation t where t.baselanguage = 'de'"); await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'TrialLicenseRequestFetchedOn', 'Fetched' FROM atranslation t where t.baselanguage = 'de'"); await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'TrialLicenseRequestPerpetual', 'Perpetual' FROM atranslation t where t.baselanguage = 'de'"); + await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'TrialRequestStatusNew', 'New' FROM atranslation t where t.baselanguage = 'de'"); + await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'TrialRequestStatusApproved', 'Approved' FROM atranslation t where t.baselanguage = 'de'"); + await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'TrialRequestStatusRejected', 'Rejected' FROM atranslation t where t.baselanguage = 'de'"); #endregion triallicenserequest diff --git a/todo.txt b/todo.txt index d668c7b..9d8bc94 100644 --- a/todo.txt +++ b/todo.txt @@ -9,18 +9,10 @@ import all vendor data packets from shareit into purchases - all the rockfish functionality for generating new licenses ad-hoc but with a server route doing the work so can be automated -bugs: -search: - Exception data: - Severity: ERROR - SqlState: 42703 - MessageText: column "name" does not exist - InternalPosition: 8 - InternalQuery: SELECT name FROM apurchase WHERE id = '732' - Where: PL/pgSQL function aygetname(bigint,integer,integer) line 53 at EXECUTE - File: parse_relation.c - Line: 3599 - Routine: errorMissingColumn +new roles and bizroles set appropo + Developer - rw cases + Support - read cases, read sales and customer data? + Sales - licenses DTR