This commit is contained in:
2022-12-30 01:32:13 +00:00
parent 803aa38bdc
commit 6e795f93bc
4 changed files with 39 additions and 26 deletions

View File

@@ -88,6 +88,7 @@ namespace Sockeye.Api.Controllers
ret.Add(new KeyValuePair<string, string>(StringUtil.TrimTypeName(typeof(NotifyMailSecurity).ToString()), "Notification SMTP mail server security method"));
ret.Add(new KeyValuePair<string, string>(StringUtil.TrimTypeName(typeof(SockEvent).ToString()), "Event log object change types"));
ret.Add(new KeyValuePair<string, string>(StringUtil.TrimTypeName(typeof(SockDaysOfWeek).ToString()), "Days of the week"));
ret.Add(new KeyValuePair<string, string>(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 ##############################
//#################################################################################################################

View File

@@ -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