Feature: Quick Search
Device/Job/User Search refactoring. Quick-Search implemented.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
using Disco.Models.BI.Search;
|
||||
using Disco.Models.Services.Jobs.JobLists;
|
||||
using Disco.Models.Services.Jobs.JobLists;
|
||||
using Disco.Models.Services.Searching;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -12,20 +12,20 @@ namespace Disco.Web.Areas.API.Models.DocumentTemplate
|
||||
public string value { get; set; }
|
||||
public string label { get; set; }
|
||||
|
||||
public static ImporterUndetectedDataIdLookupModel FromSearchResultItem(Disco.Models.BI.Search.DeviceSearchResultItem item)
|
||||
public static ImporterUndetectedDataIdLookupModel FromSearchResultItem(DeviceSearchResultItem item)
|
||||
{
|
||||
return new ImporterUndetectedDataIdLookupModel
|
||||
{
|
||||
value = item.SerialNumber,
|
||||
label = string.Format("{0} - {1} - {2}", item.SerialNumber, item.ComputerName, item.DeviceModelDescription)
|
||||
value = item.Id,
|
||||
label = string.Format("{0} - {1} - {2}", item.Id, item.ComputerName, item.DeviceModelDescription)
|
||||
};
|
||||
}
|
||||
public static ImporterUndetectedDataIdLookupModel FromSearchResultItem(JobTableItemModel item)
|
||||
{
|
||||
return new ImporterUndetectedDataIdLookupModel
|
||||
{
|
||||
value = item.Id.ToString(),
|
||||
label = string.Format("{0} ({1}; {2})", item.Id, item.DeviceSerialNumber, item.UserDisplayName)
|
||||
value = item.JobId.ToString(),
|
||||
label = string.Format("{0} ({1}; {2})", item.JobId, item.DeviceSerialNumber, item.UserDisplayName)
|
||||
};
|
||||
}
|
||||
public static ImporterUndetectedDataIdLookupModel FromSearchResultItem(UserSearchResultItem item)
|
||||
|
||||
Reference in New Issue
Block a user