diff --git a/Wonky.Client/Components/CompanyTable.razor b/Wonky.Client/Components/CompanyTable.razor index d1dbcf79..de595741 100644 --- a/Wonky.Client/Components/CompanyTable.razor +++ b/Wonky.Client/Components/CompanyTable.razor @@ -19,20 +19,25 @@ @using Wonky.Client.Helpers; @if (Companies.Any()) { - - +
+
- - - - - - +
  • +
    +
    + @company.Name +
    +
    + Konto:@company.AccountBynavn:@company.City +
    +
    + Vis +
  • } - -
    @company.Name@company.Account@company.CityVis
    + + } else { diff --git a/Wonky.Client/Components/CompanyTable.razor.cs b/Wonky.Client/Components/CompanyTable.razor.cs index 0645098a..d3e416be 100644 --- a/Wonky.Client/Components/CompanyTable.razor.cs +++ b/Wonky.Client/Components/CompanyTable.razor.cs @@ -14,7 +14,6 @@ // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] // - using Microsoft.AspNetCore.Components; using Wonky.Client.Shared; using Wonky.Entity.DTO; @@ -26,6 +25,7 @@ namespace Wonky.Client.Components [Parameter] public List Companies { get; set; } = new(); [Parameter] public EventCallback OnDelete { get; set; } [Parameter] public EventCallback OnSelect { get; set; } + [Inject] public NavigationManager NavManager { get; set; } private Confirmation _confirmation = new (); private string _companyId = string.Empty; @@ -41,5 +41,10 @@ namespace Wonky.Client.Components _confirmation.Hide(); await OnDelete.InvokeAsync(_companyId); } + + private void NavigateCompany(string companyId) + { + NavManager.NavigateTo($"/company/{companyId}"); + } } } diff --git a/Wonky.Client/Components/DisplayStateComponent.razor b/Wonky.Client/Components/DisplayStateComponent.razor index 6e18f05e..6f292acf 100644 --- a/Wonky.Client/Components/DisplayStateComponent.razor +++ b/Wonky.Client/Components/DisplayStateComponent.razor @@ -15,7 +15,7 @@ // *@ -state +state @code{ [Parameter] public string StateClass { get; set; } = "the-dead"; }