Consume ticket overview capabilities separately
This commit is contained in:
@@ -268,7 +268,7 @@ namespace C4IT.FASD.Cockpit.Communication
|
||||
return ticket;
|
||||
}
|
||||
|
||||
public override Task<Dictionary<string, int>> GetTicketOverviewCounts(IEnumerable<string> keys, bool useRoleScope)
|
||||
public override Task<cF4sdTicketOverviewCountsResult> GetTicketOverviewCounts(IEnumerable<string> keys, bool useRoleScope)
|
||||
{
|
||||
var scopeKey = useRoleScope ? "Role" : "Personal";
|
||||
var comparer = StringComparer.OrdinalIgnoreCase;
|
||||
@@ -286,12 +286,6 @@ namespace C4IT.FASD.Cockpit.Communication
|
||||
if (string.IsNullOrWhiteSpace(key))
|
||||
continue;
|
||||
|
||||
if (string.Equals(key, "TicketAndServiceRequestsEnabled", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
result[key] = 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (TicketOverviewRelations.TryGetValue(key, out var scopeDictionary) &&
|
||||
scopeDictionary != null &&
|
||||
scopeDictionary.TryGetValue(scopeKey, out var definitions) &&
|
||||
@@ -305,7 +299,10 @@ namespace C4IT.FASD.Cockpit.Communication
|
||||
}
|
||||
}
|
||||
|
||||
return Task.FromResult(result);
|
||||
return Task.FromResult(new cF4sdTicketOverviewCountsResult
|
||||
{
|
||||
Counts = result
|
||||
});
|
||||
}
|
||||
|
||||
public override async Task<List<cF4sdApiSearchResultRelation>> GetTicketOverviewRelations(string key, bool useRoleScope, int count)
|
||||
|
||||
Reference in New Issue
Block a user