Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion roles/FWO.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 18
VisualStudioVersion = 18.1.11312.151 d18.0
VisualStudioVersion = 18.1.11312.151
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Lib", "Lib", "{CE55F125-0CD2-4789-A3C1-045DEF33ABA5}"
EndProject
Expand Down
19 changes: 19 additions & 0 deletions roles/lib/files/FWO.Config.Api/UserConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using FWO.Data;
using FWO.Api.Client.Queries;
using System.Reflection;
using System.Globalization;
using System.Text.Json.Serialization;

namespace FWO.Config.Api
Expand Down Expand Up @@ -264,6 +265,24 @@ private static bool TryGetText(Dictionary<string, Dictionary<string, string>> di
return true;
}

public CultureInfo GetCultureInfo()
{
ThrowIfDisposed();

string currentLanguage = GetUserLanguage();
string? cultureName = GlobalConfig?.UiLanguages
.FirstOrDefault(language => language.Name == currentLanguage)?.CultureInfo;

if (!string.IsNullOrWhiteSpace(cultureName))
{
return CultureInfo.GetCultureInfo(cultureName);
}

return currentLanguage == GlobalConst.kEnglish
? CultureInfo.GetCultureInfo("en")
: CultureInfo.GetCultureInfo("de");
}

public string PureLine(string text)
{
ThrowIfDisposed();
Expand Down
1 change: 1 addition & 0 deletions roles/ui/files/FWO.UI/FWO.Ui.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<PackageReference Include="IPAddressRange" Version="6.3.0" />
<PackageReference Include="BlazorTable" Version="1.17.0" />
<PackageReference Include="PuppeteerSharp" Version="25.10.0" />
<PackageReference Include="SoPro.FancyTable" Version="1.0.8" />
</ItemGroup>

<ItemGroup>
Expand Down
667 changes: 381 additions & 286 deletions roles/ui/files/FWO.UI/Pages/Reporting/Reports/RulesReport.razor

Large diffs are not rendered by default.

This file was deleted.

34 changes: 34 additions & 0 deletions roles/ui/files/FWO.UI/Services/FancyTableTextFactory.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
using FWO.Config.Api;
using SoPro.FancyTable.Components;

namespace FWO.Ui.Services
{
/// <summary>
/// Creates centralized localized text sets for FancyTable-based components.
/// </summary>
public static class FancyTableTextFactory
{
public static FancyTableTexts Create(UserConfig userConfig)
{
return new FancyTableTexts
{
SearchPlaceholder = userConfig.GetText("search"),
RowsPerPageLabel = userConfig.GetText("rows_per_page"),
AllItemsLabel = userConfig.GetText("all"),
HiddenColumnsLabel = userConfig.GetText("hidden_columns"),
PaginationAriaLabel = userConfig.GetText("pagination"),
PreviousPageLabel = userConfig.GetText("previous"),
NextPageLabel = userConfig.GetText("next"),
NoRowsLabel = userConfig.GetText("no_rows"),
NoMatchingRowsFormat = userConfig.GetText("no_matching_rows"),
NoMatchingRowsWithTotalFormat = userConfig.GetText("no_matching_rows_with_total"),
ShowingItemsFormat = userConfig.GetText("showing_items_format"),
ShowingFilteredItemsFormat = userConfig.GetText("showing_filtered_items_format"),
ExpandLabel = userConfig.GetText("expand"),
CollapseLabel = userConfig.GetText("collapse"),
NoMatchingRootItemsFormat = userConfig.GetText("no_matching_root_items_format"),
ShowingVisibleRowsFormat = userConfig.GetText("showing_visible_rows_format")
};
}
}
}
3 changes: 2 additions & 1 deletion roles/ui/files/FWO.UI/_Imports.razor
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@using System.Net.Http
@using System.Net.Http
@using Microsoft.AspNetCore.Authorization
@using Microsoft.AspNetCore.Components.Authorization
@using Microsoft.AspNetCore.Components.Forms
Expand All @@ -15,3 +15,4 @@
@using FWO.Data.Workflow
@using FWO.Services.Modelling
@using FWO.Services.Workflow
@using SoPro.FancyTable.Components
8 changes: 8 additions & 0 deletions roles/ui/files/FWO.UI/wwwroot/css/site.css
Original file line number Diff line number Diff line change
Expand Up @@ -619,3 +619,11 @@ div.modal-content .sticky-header thead {
font-weight: 600;
line-height: 1.2;
}

.sticky-collapse {
padding-left: 0.5rem;
padding-bottom: 0.5rem;
position: sticky;
top: 6rem;
z-index: 14;
}
Loading