3 Commits

Author SHA1 Message Date
12c86bcb16 Added ability to use ignored tables in relation picker 2026-01-19 19:51:41 +01:00
a826ddbfb1 Fixed #37 2026-01-19 19:44:25 +01:00
297cf00891 Fixed #38 2026-01-19 19:39:25 +01:00
7 changed files with 53 additions and 38 deletions

View File

@@ -12,10 +12,9 @@
</component>
<component name="ChangeListManager">
<list default="true" id="0648788e-7696-4e60-bf12-5d5601f33d8c" name="Changes" comment="">
<change beforePath="$PROJECT_DIR$/.gitlab-ci.yml" beforeDir="false" afterPath="$PROJECT_DIR$/.gitlab-ci.yml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/.idea.HopFrame/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.HopFrame/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/HopFrame.Web/Components/Dialogs/HopFrameEditor.razor" beforeDir="false" afterPath="$PROJECT_DIR$/src/HopFrame.Web/Components/Dialogs/HopFrameEditor.razor" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/HopFrame.Core/Services/Implementations/ContextExplorer.cs" beforeDir="false" afterPath="$PROJECT_DIR$/src/HopFrame.Core/Services/Implementations/ContextExplorer.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/HopFrame.Web/Components/Pages/HopFrameTablePage.razor" beforeDir="false" afterPath="$PROJECT_DIR$/src/HopFrame.Web/Components/Pages/HopFrameTablePage.razor" afterDir="false" />
<change beforePath="$PROJECT_DIR$/testing/HopFrame.Testing/Program.cs" beforeDir="false" afterPath="$PROJECT_DIR$/testing/HopFrame.Testing/Program.cs" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -279,31 +278,9 @@
<workItem from="1751713720880" duration="8243000" />
<workItem from="1751741813788" duration="4623000" />
<workItem from="1768753475773" duration="455000" />
<workItem from="1768753946559" duration="344000" />
</task>
<task id="LOCAL-00016" summary="Added documentation for the configurators and service extensions methods">
<option name="closed" value="true" />
<created>1737208088933</created>
<option name="number" value="00016" />
<option name="presentableId" value="LOCAL-00016" />
<option name="project" value="LOCAL" />
<updated>1737208088933</updated>
</task>
<task id="LOCAL-00017" summary="Created tests for the core module">
<option name="closed" value="true" />
<created>1737212497960</created>
<option name="number" value="00017" />
<option name="presentableId" value="LOCAL-00017" />
<option name="project" value="LOCAL" />
<updated>1737212497960</updated>
</task>
<task id="LOCAL-00018" summary="Added more tests">
<option name="closed" value="true" />
<created>1737285123218</created>
<option name="number" value="00018" />
<option name="presentableId" value="LOCAL-00018" />
<option name="project" value="LOCAL" />
<updated>1737285123218</updated>
<workItem from="1768753946559" duration="690000" />
<workItem from="1768756619311" duration="94000" />
<workItem from="1768847832546" duration="758000" />
</task>
<task id="LOCAL-00019" summary="Added web module tests">
<option name="closed" value="true" />
@@ -673,7 +650,31 @@
<option name="project" value="LOCAL" />
<updated>1751750495636</updated>
</task>
<option name="localTasksCounter" value="65" />
<task id="LOCAL-00065" summary="Code cleanup + new pipeline setup">
<option name="closed" value="true" />
<created>1768754560236</created>
<option name="number" value="00065" />
<option name="presentableId" value="LOCAL-00065" />
<option name="project" value="LOCAL" />
<updated>1768754560236</updated>
</task>
<task id="LOCAL-00066" summary="Fixed #38">
<option name="closed" value="true" />
<created>1768847968844</created>
<option name="number" value="00066" />
<option name="presentableId" value="LOCAL-00066" />
<option name="project" value="LOCAL" />
<updated>1768847968844</updated>
</task>
<task id="LOCAL-00067" summary="Fixed #37">
<option name="closed" value="true" />
<created>1768848267710</created>
<option name="number" value="00067" />
<option name="presentableId" value="LOCAL-00067" />
<option name="project" value="LOCAL" />
<updated>1768848267710</updated>
</task>
<option name="localTasksCounter" value="68" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
@@ -714,9 +715,6 @@
</component>
<component name="VcsManagerConfiguration">
<option name="CLEAR_INITIAL_COMMIT_MESSAGE" value="true" />
<MESSAGE value="Added default button removal feature" />
<MESSAGE value="Added custom search functionality" />
<MESSAGE value="Added fully virtual properties" />
<MESSAGE value="Added basic export and import feature" />
<MESSAGE value="Finished converter plugin" />
<MESSAGE value="Patched CI" />
@@ -739,6 +737,9 @@
<MESSAGE value="Updated coverage extraction" />
<MESSAGE value="fixed coverage percentage printing" />
<MESSAGE value="fixed echo cmd" />
<option name="LAST_COMMIT_MESSAGE" value="fixed echo cmd" />
<MESSAGE value="Code cleanup + new pipeline setup" />
<MESSAGE value="Fixed #38" />
<MESSAGE value="Fixed #37" />
<option name="LAST_COMMIT_MESSAGE" value="Fixed #37" />
</component>
</project>

View File

@@ -63,7 +63,7 @@ public sealed class TableConfigurator<TModel>(TableConfig config) {
/// <summary>
/// Determines if the table should be ignored in the admin ui
/// </summary>
public TableConfigurator<TModel> Ignore(bool ignore) {
public TableConfigurator<TModel> Ignore(bool ignore = true) {
InnerConfig.Ignored = ignore;
return this;
}

View File

@@ -9,6 +9,7 @@
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageId>HopFrame.Core</PackageId>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
<ItemGroup>

View File

@@ -18,7 +18,9 @@ internal sealed class ContextExplorer(HopFrameConfig config, IServiceProvider pr
public TableConfig? GetTable(string tableDisplayName) {
foreach (var context in config.Contexts) {
var table = context.Tables.FirstOrDefault(table => table.DisplayName.Equals(tableDisplayName, StringComparison.CurrentCultureIgnoreCase));
var table = context.Tables
.Where(t => !t.Ignored)
.FirstOrDefault(table => table.DisplayName.Equals(tableDisplayName, StringComparison.CurrentCultureIgnoreCase));
if (table is null) continue;
SeedTableData(table);
@@ -30,7 +32,8 @@ internal sealed class ContextExplorer(HopFrameConfig config, IServiceProvider pr
public TableConfig? GetTable(Type tableEntity) {
foreach (var context in config.Contexts) {
var table = context.Tables.FirstOrDefault(table => table.TableType == tableEntity);
var table = context.Tables
.FirstOrDefault(table => table.TableType == tableEntity);
if (table is null) continue;
SeedTableData(table);

View File

@@ -9,6 +9,7 @@
DisplayActions="false"
DisplaySelection="true"
TableDisplayName="@Content.SourceTable.DisplayName"
TableType="@Content.SourceTable.TableType"
PerPage="15"
DialogData="Content"
SelectionMode="@(Content.AllowMultiple ? DataGridSelectMode.Multiple : DataGridSelectMode.Single)"/>

View File

@@ -135,7 +135,7 @@
Items="Enumerable.Range(0, _totalPages)"
OptionValue="@(p => p.ToString())"
OptionText="@(p => (p + 1).ToString())"
ValueChanged="async s => await ChangePage(Convert.ToInt32(s))"
ValueChanged="@(async s => await ChangePage(Convert.ToInt32(s)))"
Width="max-content" SelectedOption="@_currentPage"/>
<span>of @_totalPages</span>
@@ -188,7 +188,10 @@
@code {
[Parameter]
public required string TableDisplayName { get; set; }
public string TableDisplayName { get; set; } = null!;
[Parameter]
public Type? TableType { get; set; }
[Parameter]
public bool DisplaySelection { get; set; }
@@ -229,6 +232,11 @@
protected override void OnInitialized() {
CurrentInstance = this;
if (TableType is not null) {
_config ??= Explorer.GetTable(TableType);
}
_config ??= Explorer.GetTable(TableDisplayName);
if (_config is null || (_config.Ignored && DialogData is null)) {

View File

@@ -9,6 +9,7 @@
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageId>HopFrame.Web</PackageId>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
<ItemGroup>