Hibajavítás hegyek

This commit is contained in:
2025-06-04 11:05:29 +02:00
parent 11aea1eb5d
commit 6839fc0b78
23 changed files with 284 additions and 146 deletions
@@ -20,30 +20,46 @@
<meta name="csrf-token" content="@Antiforgery.GetAndStoreTokens(HttpContext).RequestToken" />
<input type="hidden" asp-for="UserDTO.Id" />
<input type="hidden" asp-for="UserDTO.Password" value="" />
<input type="hidden" asp-for="UserDTO.NFCCode" value="" />
<input type="hidden" asp-for="UserDTO.JwtToken" value="" />
<input type="hidden" asp-for="UserDTO.RoleDTO" value="" />
<div class="mb-3">
<label asp-for="UserDTO.UserName"></label>
<input asp-for="UserDTO.UserName" class="form-control" />
<span asp-validation-for="UserDTO.UserName" class="text-danger"></span>
</div>
@if (Model.UserDTO.Id == 0)
{
<div class="mb-3">
<label asp-for="UserDTO.UserName"></label>
<input asp-for="UserDTO.UserName" class="form-control" autocomplete="off" />
<span asp-validation-for="UserDTO.UserName" class="text-danger"></span>
</div>
}
else
{
<div class="mb-3">
<label asp-for="UserDTO.UserName"></label>
<input asp-for="UserDTO.UserName" class="form-control" readonly />
<span asp-validation-for="UserDTO.UserName" class="text-danger"></span>
</div>
}
@if (Model.UserDTO.Id == 0)
{
<div class="row">
<div class="mb-6">
<label asp-for="UserDTO.Password"></label>
<input asp-for="UserDTO.Password" class="form-control" type="password" />
<div class="mb-3">
<label asp-for="UserDTO.Password" class="form-label"></label>
<div class="input-group">
<input asp-for="UserDTO.Password" class="form-control" type="password" id="passwordInput" autocomplete="off" />
<button class="btn btn-outline-secondary" type="button" onclick="togglePasswordVisibility()" tabindex="-1">
<i class="bi bi-eye" id="toggleIcon"></i>
</button>
</div>
<span asp-validation-for="UserDTO.Password" class="text-danger"></span>
</div>
<div class="mb-6">
<label asp-for="UserDTO.NFCCode"></label>
<input asp-for="UserDTO.NFCCode" class="form-control" type="password" />
<span asp-validation-for="UserDTO.NFCCode" class="text-danger"></span>
</div>
</div>
}
<div class="mb-3">
<label asp-for="UserDTO.NFCCode"></label>
<input asp-for="UserDTO.NFCCode" class="form-control" />
<span asp-validation-for="UserDTO.NFCCode" class="text-danger"></span>
</div>
<div class="mb-3">
<label asp-for="UserDTO.Email"></label>
<input asp-for="UserDTO.Email" class="form-control" />
@@ -78,35 +94,38 @@
</div>
</form>
</div>
<br></br>
<div class="card shadow p-4">
<table id="tbUserPage" class="table table-bordered table-hover table-sm" style="width:100%">
<thead class="table-primary">
<tr>
<th>ID</th>
<th>@DisplayNameHelper.GetDisplayName(nameof(RoleDTO.RoleName), typeof(RoleDTO))</th>
<th>@DisplayNameHelper.GetDisplayName(nameof(RoleDTO.ParentRoleName), typeof(RoleDTO))</th>
<th>@DisplayNameHelper.GetDisplayName(nameof(RoleDTO.IsAdmin), typeof(RoleDTO))</th>
<th>@DisplayNameHelper.GetDisplayName(nameof(RoleDTO.CanEnableBlocked), typeof(RoleDTO))</th>
<th>@DisplayNameHelper.GetDisplayName(nameof(RoleDTO.CanDownloadAPK), typeof(RoleDTO))</th>
<th>@DisplayNameHelper.GetDisplayName(nameof(RoleDTO.CanUseMobilApp), typeof(RoleDTO))</th>
<th>@DisplayNameHelper.GetDisplayName(nameof(RoleDTO.CanUseWebAdmin), typeof(RoleDTO))</th>
</tr>
</thead>
<tfoot class="table-light">
<tr>
<th>ID</th>
<th>@DisplayNameHelper.GetDisplayName(nameof(RoleDTO.RoleName), typeof(RoleDTO))</th>
<th>@DisplayNameHelper.GetDisplayName(nameof(RoleDTO.ParentRoleName), typeof(RoleDTO))</th>
<th>@DisplayNameHelper.GetDisplayName(nameof(RoleDTO.IsAdmin), typeof(RoleDTO))</th>
<th>@DisplayNameHelper.GetDisplayName(nameof(RoleDTO.CanEnableBlocked), typeof(RoleDTO))</th>
<th>@DisplayNameHelper.GetDisplayName(nameof(RoleDTO.CanDownloadAPK), typeof(RoleDTO))</th>
<th>@DisplayNameHelper.GetDisplayName(nameof(RoleDTO.CanUseMobilApp), typeof(RoleDTO))</th>
<th>@DisplayNameHelper.GetDisplayName(nameof(RoleDTO.CanUseWebAdmin), typeof(RoleDTO))</th>
</tr>
</tfoot>
</table>
</div>
@if (Model.UserDTO.Id != 0)
{
<br></br>
<div class="card shadow p-4">
<table id="tbUserPage" class="table table-bordered table-hover table-sm" style="width:100%">
<thead class="table-primary">
<tr>
<th>ID</th>
<th>@DisplayNameHelper.GetDisplayName(nameof(RoleDTO.RoleName), typeof(RoleDTO))</th>
<th>@DisplayNameHelper.GetDisplayName(nameof(RoleDTO.ParentRoleName), typeof(RoleDTO))</th>
<th>@DisplayNameHelper.GetDisplayName(nameof(RoleDTO.IsAdmin), typeof(RoleDTO))</th>
<th>@DisplayNameHelper.GetDisplayName(nameof(RoleDTO.CanEnableBlocked), typeof(RoleDTO))</th>
<th>@DisplayNameHelper.GetDisplayName(nameof(RoleDTO.CanDownloadAPK), typeof(RoleDTO))</th>
<th>@DisplayNameHelper.GetDisplayName(nameof(RoleDTO.CanUseMobilApp), typeof(RoleDTO))</th>
<th>@DisplayNameHelper.GetDisplayName(nameof(RoleDTO.CanUseWebAdmin), typeof(RoleDTO))</th>
</tr>
</thead>
<tfoot class="table-light">
<tr>
<th>ID</th>
<th>@DisplayNameHelper.GetDisplayName(nameof(RoleDTO.RoleName), typeof(RoleDTO))</th>
<th>@DisplayNameHelper.GetDisplayName(nameof(RoleDTO.ParentRoleName), typeof(RoleDTO))</th>
<th>@DisplayNameHelper.GetDisplayName(nameof(RoleDTO.IsAdmin), typeof(RoleDTO))</th>
<th>@DisplayNameHelper.GetDisplayName(nameof(RoleDTO.CanEnableBlocked), typeof(RoleDTO))</th>
<th>@DisplayNameHelper.GetDisplayName(nameof(RoleDTO.CanDownloadAPK), typeof(RoleDTO))</th>
<th>@DisplayNameHelper.GetDisplayName(nameof(RoleDTO.CanUseMobilApp), typeof(RoleDTO))</th>
<th>@DisplayNameHelper.GetDisplayName(nameof(RoleDTO.CanUseWebAdmin), typeof(RoleDTO))</th>
</tr>
</tfoot>
</table>
</div>
}
@section Scripts {
<script>
@@ -189,6 +208,7 @@
const $form = $('#UserForm');
formData.UserDTO.RoleDTO=[];
formData.UserDTO.JwtToken='';
formData.UserDTO.Active = $('#UserForm input[name="UserDTO.Active"]').is(':checked');
formData.UserDTO.NFCActive = $('#UserForm input[name="UserDTO.NFCActive"]').is(':checked');