prihlášení nutné
This commit is contained in:
@@ -10,7 +10,10 @@
|
||||
@using Web_Jarmark.Data.Models
|
||||
@inject ApplicationDbContext Db
|
||||
@inject NavigationManager Nav
|
||||
@using Microsoft.AspNetCore.Authorization
|
||||
|
||||
@attribute [Authorize]
|
||||
<AuthorizeView Context="authContext">
|
||||
<PageTitle>@(Id is null ? "Nová kategorie" : "Upravit kategorii")</PageTitle>
|
||||
|
||||
<h3>@(Id is null ? "Nová kategorie" : "Upravit kategorii")</h3>
|
||||
@@ -51,7 +54,7 @@ else
|
||||
<a class="btn btn-secondary" href="/admin/kategorie">Zrušit</a>
|
||||
</EditForm>
|
||||
}
|
||||
|
||||
</AuthorizeView>
|
||||
@code {
|
||||
[Parameter] public int? Id { get; set; }
|
||||
|
||||
|
||||
@@ -5,7 +5,10 @@
|
||||
@using Web_Jarmark.Data.Models
|
||||
@inject ApplicationDbContext Db
|
||||
@inject NavigationManager Nav
|
||||
@using Microsoft.AspNetCore.Authorization
|
||||
|
||||
@attribute [Authorize]
|
||||
<AuthorizeView>
|
||||
<PageTitle>Kategorie</PageTitle>
|
||||
|
||||
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||
@@ -64,7 +67,7 @@ else
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
||||
|
||||
</AuthorizeView>
|
||||
@code {
|
||||
private List<CategoryRow>? categories;
|
||||
private string? error;
|
||||
@@ -109,4 +112,4 @@ else
|
||||
}
|
||||
|
||||
private record CategoryRow(int Id, string Name, string Slug, bool IsActive, int ProductCount);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,10 @@
|
||||
@using Web_Jarmark.Data.Models
|
||||
@inject ApplicationDbContext Db
|
||||
@inject NavigationManager Nav
|
||||
@using Microsoft.AspNetCore.Authorization
|
||||
|
||||
@attribute [Authorize]
|
||||
<AuthorizeView Context="authContext1">
|
||||
<PageTitle>@(Id is null ? "Nové zboží" : "Upravit zboží")</PageTitle>
|
||||
|
||||
<h3>@(Id is null ? "Nové zboží" : "Upravit zboží")</h3>
|
||||
@@ -86,7 +89,7 @@ else
|
||||
<a class="btn btn-secondary" href="/admin/zbozi">Zrušit</a>
|
||||
</EditForm>
|
||||
}
|
||||
|
||||
</AuthorizeView>
|
||||
@code {
|
||||
[Parameter] public int? Id { get; set; }
|
||||
|
||||
|
||||
@@ -4,7 +4,10 @@
|
||||
@using Web_Jarmark.Data
|
||||
@using Web_Jarmark.Data.Models
|
||||
@inject ApplicationDbContext Db
|
||||
@using Microsoft.AspNetCore.Authorization
|
||||
|
||||
@attribute [Authorize]
|
||||
<AuthorizeView>
|
||||
<PageTitle>Zboží</PageTitle>
|
||||
|
||||
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||
@@ -60,7 +63,7 @@ else
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
||||
|
||||
</AuthorizeView>
|
||||
@code {
|
||||
private List<ProductRow>? products;
|
||||
private string? error;
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user