Modify aygetname postgres function to handle translation of items that do not have a name, also code to back it at server

This commit is contained in:
2021-11-10 01:02:09 +00:00
parent cd6ee9890f
commit 92f06ec12f
23 changed files with 229 additions and 97 deletions

View File

@@ -46,7 +46,7 @@ namespace AyaNova.Biz
/// Get the event log for a specified object
/// Presentation is the client's responsibility (localization internationalization etc)
/// </summary>
internal static async Task<AyaNova.Api.Controllers.EventLogController.ObjectEventLog> GetLogForObjectAsync(AyaNova.Api.Controllers.EventLogController.EventLogOptions opt, AyContext ct)
internal static async Task<AyaNova.Api.Controllers.EventLogController.ObjectEventLog> GetLogForObjectAsync(AyaNova.Api.Controllers.EventLogController.EventLogOptions opt, long translationId, AyContext ct)
{
AyaNova.Api.Controllers.EventLogController.ObjectEventLog ret = new Api.Controllers.EventLogController.ObjectEventLog();
@@ -72,10 +72,10 @@ namespace AyaNova.Biz
UserId = z.UserId,
Event = z.AyEvent,
Textra = z.Textra,
Name = BizObjectNameFetcherDirect.Name(AyaType.User, z.UserId, command)
Name = BizObjectNameFetcherDirect.Name(AyaType.User, z.UserId, translationId, command)
}).ToArray();
ret.Name = BizObjectNameFetcherDirect.Name(opt.AyaType, opt.AyId, command);
ret.Name = BizObjectNameFetcherDirect.Name(opt.AyaType, opt.AyId, translationId, command);
return ret;
}
}
@@ -86,7 +86,7 @@ namespace AyaNova.Biz
/// Get the event log for a specified User
/// Presentation is the client's responsibility (localization internationalization etc)
/// </summary>
internal static async Task<AyaNova.Api.Controllers.EventLogController.UserEventLog> GetLogForUserAsync(AyaNova.Api.Controllers.EventLogController.UserEventLogOptions opt, AyContext ct)
internal static async Task<AyaNova.Api.Controllers.EventLogController.UserEventLog> GetLogForUserAsync(AyaNova.Api.Controllers.EventLogController.UserEventLogOptions opt, long translationId, AyContext ct)
{
AyaNova.Api.Controllers.EventLogController.UserEventLog ret = new Api.Controllers.EventLogController.UserEventLog();
@@ -115,10 +115,10 @@ namespace AyaNova.Biz
ObjectId = z.AyId,
Event = z.AyEvent,
Textra = z.Textra,
Name = BizObjectNameFetcherDirect.Name(z.AyaType, z.AyId, command)
Name = BizObjectNameFetcherDirect.Name(z.AyaType, z.AyId, translationId, command)
}).ToArray();
ret.Name = BizObjectNameFetcherDirect.Name(AyaType.User, opt.UserId, command);
ret.Name = BizObjectNameFetcherDirect.Name(AyaType.User, opt.UserId, translationId, command);
return ret;
}