aktueller Stand
This commit is contained in:
@@ -47,7 +47,6 @@ namespace FasdDesktopUi.Pages.SearchPage
|
||||
private EventHandler _ticketOverviewAutoContinueCaseChangedHandler;
|
||||
private bool _renderTicketOverviewUserNames = false;
|
||||
private readonly HashSet<cSearchHistorySearchResultEntry> _ticketOverviewHistoryEntries = new HashSet<cSearchHistorySearchResultEntry>();
|
||||
private const string DemoTicketHasDetailsInfoKey = "Demo.HasTicketDetails";
|
||||
|
||||
// Event zum auslösen wenn Toggle geändert wird
|
||||
public event EventHandler<bool> FilterToggleCheckedChanged;
|
||||
@@ -216,15 +215,10 @@ namespace FasdDesktopUi.Pages.SearchPage
|
||||
bool isEnabled = cHealthCardDataHelper.HasAvailableHealthCard(requiredInformationClasses);
|
||||
string disabledReason = null;
|
||||
|
||||
if (!isEnabled)
|
||||
{
|
||||
disabledReason = cMultiLanguageSupport.GetItem("Searchbar.NoValidHealthcard") ?? string.Empty;
|
||||
}
|
||||
else if (ShouldDisableTicketRelationForDemo(relation))
|
||||
{
|
||||
isEnabled = false;
|
||||
disabledReason = cMultiLanguageSupport.GetItem("Searchbar.Demo.NoTicketDetails") ?? string.Empty;
|
||||
}
|
||||
if (!isEnabled)
|
||||
{
|
||||
disabledReason = cMultiLanguageSupport.GetItem("Searchbar.NoValidHealthcard") ?? string.Empty;
|
||||
}
|
||||
string trailingText = null;
|
||||
if (_renderTicketOverviewUserNames && relation.Infos != null && relation.Infos.TryGetValue("UserDisplayName", out var relationUserDisplayName))
|
||||
{
|
||||
@@ -268,15 +262,10 @@ namespace FasdDesktopUi.Pages.SearchPage
|
||||
{
|
||||
var required = new List<enumFasdInformationClass> { cF4sdIdentityEntry.GetFromSearchResult(relation.Type) };
|
||||
fallbackIsEnabled = cHealthCardDataHelper.HasAvailableHealthCard(required);
|
||||
if (!fallbackIsEnabled)
|
||||
{
|
||||
fallbackDisabledReason = cMultiLanguageSupport.GetItem("Searchbar.NoValidHealthcard") ?? string.Empty;
|
||||
}
|
||||
else if (ShouldDisableTicketRelationForDemo(relation))
|
||||
{
|
||||
fallbackIsEnabled = false;
|
||||
fallbackDisabledReason = cMultiLanguageSupport.GetItem("Searchbar.Demo.NoTicketDetails") ?? string.Empty;
|
||||
}
|
||||
if (!fallbackIsEnabled)
|
||||
{
|
||||
fallbackDisabledReason = cMultiLanguageSupport.GetItem("Searchbar.NoValidHealthcard") ?? string.Empty;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
@@ -1470,15 +1459,10 @@ namespace FasdDesktopUi.Pages.SearchPage
|
||||
var required = new List<enumFasdInformationClass> { cF4sdIdentityEntry.GetFromSearchResult(r.Type) };
|
||||
bool isEnabled = cHealthCardDataHelper.HasAvailableHealthCard(required);
|
||||
string disabledReason = null;
|
||||
if (!isEnabled)
|
||||
{
|
||||
disabledReason = cMultiLanguageSupport.GetItem("Searchbar.NoValidHealthcard") ?? string.Empty;
|
||||
}
|
||||
else if (ShouldDisableTicketRelationForDemo(r))
|
||||
{
|
||||
isEnabled = false;
|
||||
disabledReason = cMultiLanguageSupport.GetItem("Searchbar.Demo.NoTicketDetails") ?? string.Empty;
|
||||
}
|
||||
if (!isEnabled)
|
||||
{
|
||||
disabledReason = cMultiLanguageSupport.GetItem("Searchbar.NoValidHealthcard") ?? string.Empty;
|
||||
}
|
||||
string trailingUser = null;
|
||||
if (_renderTicketOverviewUserNames && r.Infos != null && r.Infos.TryGetValue("UserDisplayName", out var userDisplayName))
|
||||
{
|
||||
@@ -1574,30 +1558,6 @@ namespace FasdDesktopUi.Pages.SearchPage
|
||||
return "Searchbar.Header.Filter.Overview";
|
||||
}
|
||||
|
||||
private bool ShouldDisableTicketRelationForDemo(cF4sdApiSearchResultRelation relation)
|
||||
{
|
||||
if (relation == null)
|
||||
return false;
|
||||
|
||||
var communication = cFasdCockpitCommunicationBase.Instance;
|
||||
if (communication?.IsDemo() != true)
|
||||
return false;
|
||||
|
||||
if (relation.Type != enumF4sdSearchResultClass.Ticket)
|
||||
return false;
|
||||
|
||||
if (relation.Infos == null)
|
||||
return false;
|
||||
|
||||
if (!relation.Infos.TryGetValue(DemoTicketHasDetailsInfoKey, out var hasDetailsValue))
|
||||
return false;
|
||||
|
||||
if (bool.TryParse(hasDetailsValue, out var hasDetails))
|
||||
return !hasDetails;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private async Task<List<cF4sdApiSearchResultRelation>> LoadRelationsForTileAsync(string key, bool useRoleScope, int count)
|
||||
{
|
||||
var communication = cFasdCockpitCommunicationBase.Instance;
|
||||
|
||||
Reference in New Issue
Block a user