aktueller stand
This commit is contained in:
@@ -12,7 +12,7 @@ using static C4IT.Logging.cLogManager;
|
||||
namespace FasdDesktopUi.Basics.Services.SupportCase.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
/// Used to manage the <see cref="ISupportCase"/> for the UI via the <see cref="SupportCaseProcessor"/>"
|
||||
/// Used to manage the <see cref="ISupportCase"/> for the UI via the <see cref="SupportCaseProcessor"/>
|
||||
/// </summary>
|
||||
public class SupportCaseController
|
||||
{
|
||||
@@ -81,8 +81,8 @@ namespace FasdDesktopUi.Basics.Services.SupportCase.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
private void HandleAvailableCaseRelationsAdded(object sender, RelationEventArgs e)
|
||||
=> AvailableCaseRelationsAdded?.Invoke(this, e);
|
||||
private void HandleAvailableCaseRelationsAdded(object sender, RelationEventArgs e)
|
||||
=> AvailableCaseRelationsAdded?.Invoke(this, e);
|
||||
|
||||
private void HandleCaseDataChanged(object sender, SupportCaseDataEventArgs e)
|
||||
{
|
||||
@@ -127,13 +127,16 @@ namespace FasdDesktopUi.Basics.Services.SupportCase.Controllers
|
||||
|
||||
SupportCaseDataProviderArtifact.HealthCardDataHelper.TrySetSelectedHealthcard(requiredInformationClasses);
|
||||
|
||||
_focusedRelation = relation;
|
||||
|
||||
if (!_selectedRelations.Values.Contains(relation))
|
||||
_hasDirectionConnection = false;
|
||||
|
||||
_selectedRelations[cF4sdIdentityEntry.GetFromSearchResult(relation.Type)] = relation;
|
||||
_ = Task.Run(async () => await UpdateStatusOfSelectedRelations());
|
||||
_focusedRelation = relation;
|
||||
|
||||
if (!_selectedRelations.Values.Contains(relation) || relation.Type == enumF4sdSearchResultClass.Computer)
|
||||
{
|
||||
_hasDirectionConnection = false;
|
||||
SupportCaseDataProviderArtifact.DirectConnectionHelper.Reset();
|
||||
}
|
||||
|
||||
_selectedRelations[cF4sdIdentityEntry.GetFromSearchResult(relation.Type)] = relation;
|
||||
_ = Task.Run(async () => await UpdateStatusOfSelectedRelations());
|
||||
|
||||
var focusedRelations = new cF4sdApiSearchResultRelation[1] { _focusedRelation };
|
||||
FocusedRelationsChanged?.Invoke(this, new RelationEventArgs()
|
||||
@@ -147,7 +150,7 @@ namespace FasdDesktopUi.Basics.Services.SupportCase.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
private async Task UpdateStatusOfSelectedRelations()
|
||||
private async Task UpdateStatusOfSelectedRelations()
|
||||
{
|
||||
const string StatusString = "Status";
|
||||
|
||||
@@ -220,9 +223,8 @@ namespace FasdDesktopUi.Basics.Services.SupportCase.Controllers
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public async Task RefreshDataForCurrentlyFocusedRelationAsync()
|
||||
{
|
||||
|
||||
@@ -65,18 +65,19 @@ namespace FasdDesktopUi.Basics.Services.SupportCase
|
||||
if (relations is null)
|
||||
return;
|
||||
|
||||
foreach (var relationType in relations)
|
||||
{
|
||||
if (_caseRelations.TryGetValue(relationType.Key, out var caseRelation))
|
||||
caseRelation = caseRelation.Union(relationType).ToList();
|
||||
else
|
||||
_caseRelations.Add(relationType.Key, relationType.ToList());
|
||||
|
||||
if (SupportCaseDataProviderArtifact?.CaseRelations?.TryGetValue(relationType.Key, out var caseRelations) ?? false)
|
||||
caseRelations = caseRelations.Union(relationType).ToList();
|
||||
else
|
||||
SupportCaseDataProviderArtifact?.CaseRelations?.Add(relationType.Key, relationType.ToList());
|
||||
}
|
||||
foreach (var relationType in relations)
|
||||
{
|
||||
//TODO Max fragen obs passt! Bug: in den Ticketrelations (Header Ticketauswahl) sind nur zwei Tickets sichtbar anstatt 5 oder mehr..
|
||||
if (_caseRelations.TryGetValue(relationType.Key, out var caseRelation))
|
||||
_caseRelations[relationType.Key] = caseRelation.Union(relationType).ToList();
|
||||
else
|
||||
_caseRelations.Add(relationType.Key, relationType.ToList());
|
||||
|
||||
if (SupportCaseDataProviderArtifact?.CaseRelations?.TryGetValue(relationType.Key, out var caseRelations) ?? false)
|
||||
SupportCaseDataProviderArtifact.CaseRelations[relationType.Key] = caseRelations.Union(relationType).ToList();
|
||||
else
|
||||
SupportCaseDataProviderArtifact?.CaseRelations?.Add(relationType.Key, relationType.ToList());
|
||||
}
|
||||
|
||||
CaseRelationsAdded?.Invoke(this, new RelationEventArgs() { Relations = relations });
|
||||
}
|
||||
|
||||
@@ -68,8 +68,6 @@ namespace FasdDesktopUi.Basics.UserControls
|
||||
};
|
||||
|
||||
private const string CategoryTableNamePrimary = "M42Wpm-Ticket-Categories";
|
||||
private const string CategoryTableNameLegacy = "M42Wpm-Ticket-CloseCase-Categories";
|
||||
private string activeCategoryTableName = CategoryTableNamePrimary;
|
||||
|
||||
private static readonly Brush SharedValidationBorderBrush = CreateValidationBrush();
|
||||
private static readonly Brush DefaultTextBoxBorderBrush = CreateDefaultTextBoxBorderBrush();
|
||||
@@ -1009,20 +1007,7 @@ namespace FasdDesktopUi.Basics.UserControls
|
||||
|
||||
isCategoryLoading = true;
|
||||
|
||||
var tableCandidates = new[] { CategoryTableNamePrimary, CategoryTableNameLegacy };
|
||||
bool initialized = false;
|
||||
|
||||
foreach (var tableName in tableCandidates)
|
||||
{
|
||||
if (await TryPopulateCategoryHierarchyAsync(tableName))
|
||||
{
|
||||
activeCategoryTableName = tableName;
|
||||
initialized = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (initialized)
|
||||
if (await TryPopulateCategoryHierarchyAsync(CategoryTableNamePrimary))
|
||||
{
|
||||
CategorySelectionControl.ItemsSource = categoryHierarchy;
|
||||
TrySelectTicketCategoryFromTicketInfos();
|
||||
|
||||
@@ -70,10 +70,8 @@ namespace FasdDesktopUi.Basics.UserControls
|
||||
};
|
||||
|
||||
private const string CategoryTableNamePrimary = "M42Wpm-Ticket-Categories";
|
||||
private const string CategoryTableNameLegacy = "M42Wpm-Ticket-CloseCase-Categories";
|
||||
private const string TicketDetailsTableName = "M42Wpm-Tickets";
|
||||
private const string TicketDetailsCategoryIdColumnName = "CategoryId";
|
||||
private string activeCategoryTableName = CategoryTableNamePrimary;
|
||||
|
||||
private static readonly Brush SharedValidationBorderBrush = CreateValidationBrush();
|
||||
private static readonly Brush DefaultTextBoxBorderBrush = CreateDefaultTextBoxBorderBrush();
|
||||
@@ -1014,20 +1012,7 @@ namespace FasdDesktopUi.Basics.UserControls
|
||||
|
||||
isCategoryLoading = true;
|
||||
|
||||
var tableCandidates = new[] { CategoryTableNamePrimary, CategoryTableNameLegacy };
|
||||
bool initialized = false;
|
||||
|
||||
foreach (var tableName in tableCandidates)
|
||||
{
|
||||
if (await TryPopulateCategoryHierarchyAsync(tableName))
|
||||
{
|
||||
activeCategoryTableName = tableName;
|
||||
initialized = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (initialized)
|
||||
if (await TryPopulateCategoryHierarchyAsync(CategoryTableNamePrimary))
|
||||
{
|
||||
CategorySelectionControl.ItemsSource = categoryHierarchy;
|
||||
TrySelectTicketCategoryFromTicketInfos();
|
||||
|
||||
Reference in New Issue
Block a user