From d3de360a153b8b9cb9076bd0c475d8bccab6cbe3 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Thu, 9 Apr 2020 16:38:26 +0000 Subject: [PATCH] --- devdocs/todo.txt | 4 +++- server/AyaNova/biz/UserBiz.cs | 9 +++++++++ server/AyaNova/biz/WidgetBiz.cs | 6 +++--- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/devdocs/todo.txt b/devdocs/todo.txt index e5f996d2..fdb8feb2 100644 --- a/devdocs/todo.txt +++ b/devdocs/todo.txt @@ -37,7 +37,9 @@ todo: Server ops EMAIL address for server to send health messages to!!!! - Boot config setting - maybe this should be mirrored as a setting in global biz admin as well because the biz admin needs to know about critical server issues or impending doom of the server (disk space etc) just as much as OPS - also OPS people are not always trustworthy - + +todo: at server, should corebizobjects have an interface for them set in their model so that they can be identified as such + - and then they can be forced to have the common attributes like searchableobject etc? DO CLIENT STUFF NOW COME BACK TO THIS STUFF LATER diff --git a/server/AyaNova/biz/UserBiz.cs b/server/AyaNova/biz/UserBiz.cs index 5b49f9e9..f59af1e0 100644 --- a/server/AyaNova/biz/UserBiz.cs +++ b/server/AyaNova/biz/UserBiz.cs @@ -229,6 +229,15 @@ namespace AyaNova.Biz await Search.ProcessUpdatedObjectKeywordsAsync(SearchParams); } + public async Task GetSearchResultSummary(long id) + { + var obj = await ct.User.SingleOrDefaultAsync(m => m.Id == id); + var SearchParams = new Search.SearchIndexProcessObjectParameters(); + if (obj != null) + SearchParams.AddText(obj.Notes).AddText(obj.Name).AddText(obj.EmployeeNumber).AddText(obj.Tags).AddCustomFields(obj.CustomFields); + + return SearchParams; + } //////////////////////////////////////////////////////////////////////////////////////////////// //DELETE diff --git a/server/AyaNova/biz/WidgetBiz.cs b/server/AyaNova/biz/WidgetBiz.cs index d8b9813a..14c34a83 100644 --- a/server/AyaNova/biz/WidgetBiz.cs +++ b/server/AyaNova/biz/WidgetBiz.cs @@ -215,9 +215,9 @@ namespace AyaNova.Biz { var obj = await ct.Widget.SingleOrDefaultAsync(m => m.Id == id); var SearchParams = new Search.SearchIndexProcessObjectParameters(); - SearchParams.AddText(obj.Notes).AddText(obj.Name).AddText(obj.Serial).AddText(obj.Tags).AddCustomFields(obj.CustomFields); - - return SearchParams; + if (obj != null) + SearchParams.AddText(obj.Notes).AddText(obj.Name).AddText(obj.Serial).AddText(obj.Tags).AddCustomFields(obj.CustomFields); + return SearchParams; } ////////////////////////////////////////////////////////////////////////////////////////////////