Added ability to use ignored tables in relation picker

This commit is contained in:
2026-01-19 19:51:41 +01:00
parent a826ddbfb1
commit 12c86bcb16
4 changed files with 23 additions and 15 deletions

View File

@@ -12,8 +12,8 @@
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="0648788e-7696-4e60-bf12-5d5601f33d8c" name="Changes" comment=""> <list default="true" id="0648788e-7696-4e60-bf12-5d5601f33d8c" name="Changes" comment="">
<change beforePath="$PROJECT_DIR$/src/HopFrame.Core/Config/TableConfig.cs" beforeDir="false" afterPath="$PROJECT_DIR$/src/HopFrame.Core/Config/TableConfig.cs" 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.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" /> <change beforePath="$PROJECT_DIR$/testing/HopFrame.Testing/Program.cs" beforeDir="false" afterPath="$PROJECT_DIR$/testing/HopFrame.Testing/Program.cs" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
@@ -280,15 +280,7 @@
<workItem from="1768753475773" duration="455000" /> <workItem from="1768753475773" duration="455000" />
<workItem from="1768753946559" duration="690000" /> <workItem from="1768753946559" duration="690000" />
<workItem from="1768756619311" duration="94000" /> <workItem from="1768756619311" duration="94000" />
<workItem from="1768847832546" duration="354000" /> <workItem from="1768847832546" duration="758000" />
</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>
</task> </task>
<task id="LOCAL-00019" summary="Added web module tests"> <task id="LOCAL-00019" summary="Added web module tests">
<option name="closed" value="true" /> <option name="closed" value="true" />
@@ -674,7 +666,15 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1768847968844</updated> <updated>1768847968844</updated>
</task> </task>
<option name="localTasksCounter" value="67" /> <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 /> <servers />
</component> </component>
<component name="TypeScriptGeneratedFilesManager"> <component name="TypeScriptGeneratedFilesManager">
@@ -715,7 +715,6 @@
</component> </component>
<component name="VcsManagerConfiguration"> <component name="VcsManagerConfiguration">
<option name="CLEAR_INITIAL_COMMIT_MESSAGE" value="true" /> <option name="CLEAR_INITIAL_COMMIT_MESSAGE" value="true" />
<MESSAGE value="Added fully virtual properties" />
<MESSAGE value="Added basic export and import feature" /> <MESSAGE value="Added basic export and import feature" />
<MESSAGE value="Finished converter plugin" /> <MESSAGE value="Finished converter plugin" />
<MESSAGE value="Patched CI" /> <MESSAGE value="Patched CI" />
@@ -740,6 +739,7 @@
<MESSAGE value="fixed echo cmd" /> <MESSAGE value="fixed echo cmd" />
<MESSAGE value="Code cleanup + new pipeline setup" /> <MESSAGE value="Code cleanup + new pipeline setup" />
<MESSAGE value="Fixed #38" /> <MESSAGE value="Fixed #38" />
<option name="LAST_COMMIT_MESSAGE" value="Fixed #38" /> <MESSAGE value="Fixed #37" />
<option name="LAST_COMMIT_MESSAGE" value="Fixed #37" />
</component> </component>
</project> </project>

View File

@@ -33,7 +33,6 @@ internal sealed class ContextExplorer(HopFrameConfig config, IServiceProvider pr
public TableConfig? GetTable(Type tableEntity) { public TableConfig? GetTable(Type tableEntity) {
foreach (var context in config.Contexts) { foreach (var context in config.Contexts) {
var table = context.Tables var table = context.Tables
.Where(t => !t.Ignored)
.FirstOrDefault(table => table.TableType == tableEntity); .FirstOrDefault(table => table.TableType == tableEntity);
if (table is null) continue; if (table is null) continue;

View File

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

View File

@@ -186,9 +186,12 @@
@inject ISearchSuggestionProvider SearchSuggestions @inject ISearchSuggestionProvider SearchSuggestions
@code { @code {
[Parameter]
public string TableDisplayName { get; set; } = null!;
[Parameter] [Parameter]
public required string TableDisplayName { get; set; } public Type? TableType { get; set; }
[Parameter] [Parameter]
public bool DisplaySelection { get; set; } public bool DisplaySelection { get; set; }
@@ -229,6 +232,11 @@
protected override void OnInitialized() { protected override void OnInitialized() {
CurrentInstance = this; CurrentInstance = this;
if (TableType is not null) {
_config ??= Explorer.GetTable(TableType);
}
_config ??= Explorer.GetTable(TableDisplayName); _config ??= Explorer.GetTable(TableDisplayName);
if (_config is null || (_config.Ignored && DialogData is null)) { if (_config is null || (_config.Ignored && DialogData is null)) {