Enhance CareerField and CareerMapping components with descriptions
Added a Description property to the CareerField class to provide a short overview of each career field. Updated the CareerFieldDefinitions to include descriptions for all career fields. Modified the CareerMapping component to display the description of the selected career field or event, improving user experience by providing more context about each node.
This commit is contained in:
@@ -42,6 +42,10 @@ else
|
||||
{
|
||||
<MudPaper Elevation="1" Class="pa-4 mb-4" Style="background-color: #f5f5f5;">
|
||||
<MudText Typo="Typo.h6" Class="mb-2">@_selectedNodeInfo.Title</MudText>
|
||||
@if (!string.IsNullOrWhiteSpace(_selectedNodeInfo.Description))
|
||||
{
|
||||
<MudText Typo="Typo.body2" Class="mb-3 mud-text-secondary">@_selectedNodeInfo.Description</MudText>
|
||||
}
|
||||
@if (_selectedNodeInfo.Careers != null && _selectedNodeInfo.Careers.Any())
|
||||
{
|
||||
<MudText Typo="Typo.subtitle2" Class="mb-2">Related Careers:</MudText>
|
||||
@@ -73,6 +77,7 @@ else
|
||||
private class SelectedNodeInfo
|
||||
{
|
||||
public string Title { get; set; } = string.Empty;
|
||||
public string? Description { get; set; }
|
||||
public bool IsCareerField { get; set; }
|
||||
public List<string>? Careers { get; set; }
|
||||
}
|
||||
@@ -274,6 +279,7 @@ else
|
||||
_selectedNodeInfo = new SelectedNodeInfo
|
||||
{
|
||||
Title = field.Name,
|
||||
Description = field.Description,
|
||||
IsCareerField = true,
|
||||
Careers = careers?.ToList() ?? new List<string>()
|
||||
};
|
||||
@@ -288,6 +294,7 @@ else
|
||||
_selectedNodeInfo = new SelectedNodeInfo
|
||||
{
|
||||
Title = evt.Name,
|
||||
Description = evt.Description,
|
||||
IsCareerField = false,
|
||||
Careers = evt.RelatedCareers.Select(c => c.Name).OrderBy(c => c).ToList()
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user