Mentés fölé csík
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
@page
|
||||
@model WorkFlowCheck.Web.Pages.BaseStock.CheckPoints.CheckPointEditPageModel
|
||||
@using Microsoft.AspNetCore.Antiforgery
|
||||
@using WorkFlowCheck.Common.Helper
|
||||
@using WorkFlowCheck.Common.DTO
|
||||
@inject IAntiforgery Antiforgery
|
||||
@{
|
||||
ViewData["Title"] = "Ellenőrzési pont";
|
||||
@@ -37,6 +39,7 @@
|
||||
<input type="checkbox" asp-for="CheckPointDTO.IsEnabled" class="form-check-input" />
|
||||
<span asp-validation-for="CheckPointDTO.IsEnabled" class="text-danger"></span>
|
||||
</div>
|
||||
<hr class="mt-4 mb-3 border-secondary">
|
||||
<div class="mb-3">
|
||||
<button type="button" id="saveCheckPoint" class="btn btn-primary">Mentés</button>
|
||||
<button type="button" class="btn btn-secondary" onclick="history.back()">Mégsem</button>
|
||||
@@ -54,19 +57,17 @@
|
||||
<thead class="table-primary">
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>RowIndex</th>
|
||||
<th>OperationDescription</th>
|
||||
<th>AnswerType</th>
|
||||
<th class="text-center">Action</th>
|
||||
<th>@DisplayNameHelper.GetDisplayName(nameof(CheckListTemplateRowDTO.RowIndex), typeof(CheckListTemplateRowDTO))</th>
|
||||
<th>@DisplayNameHelper.GetDisplayName(nameof(CheckListTemplateRowDTO.OperationDescription), typeof(CheckListTemplateRowDTO))</th>
|
||||
<th>@DisplayNameHelper.GetDisplayName(nameof(CheckListTemplateRowDTO.AnswerType), typeof(CheckListTemplateRowDTO))</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot class="table-light">
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>RowIndex</th>
|
||||
<th>OperationDescription</th>
|
||||
<th>AnswerType</th>
|
||||
<th class="text-center">Action</th>
|
||||
<th>@DisplayNameHelper.GetDisplayName(nameof(CheckListTemplateRowDTO.RowIndex), typeof(CheckListTemplateRowDTO))</th>
|
||||
<th>@DisplayNameHelper.GetDisplayName(nameof(CheckListTemplateRowDTO.OperationDescription), typeof(CheckListTemplateRowDTO))</th>
|
||||
<th>@DisplayNameHelper.GetDisplayName(nameof(CheckListTemplateRowDTO.AnswerType), typeof(CheckListTemplateRowDTO))</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
@@ -89,23 +90,16 @@
|
||||
data: "answerType",
|
||||
searchable: false,
|
||||
sortable: false,
|
||||
render: function ( data, type, row ) {
|
||||
render: function ( data, type, row )
|
||||
{
|
||||
return renderAnswerType(data);
|
||||
}
|
||||
},
|
||||
{ data: null, render: function (data, type, row) {
|
||||
return renderActionButtons(row.id);
|
||||
}}
|
||||
}
|
||||
],
|
||||
columnDefs: [
|
||||
{
|
||||
"targets": 0,
|
||||
"visible": false
|
||||
},
|
||||
{
|
||||
"targets": 4,
|
||||
"className": "text-center",
|
||||
"width": "10%"
|
||||
}
|
||||
],
|
||||
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
@page
|
||||
@model WorkFlowCheck.Web.Pages.BaseStock.CheckPoints.CheckPointsPageModel
|
||||
@using Microsoft.AspNetCore.Antiforgery
|
||||
@using WorkFlowCheck.Common.Helper
|
||||
@using WorkFlowCheck.Common.DTO
|
||||
|
||||
@inject IAntiforgery Antiforgery
|
||||
@{
|
||||
ViewData["Title"] = "Ellenőrzési pontok";
|
||||
@@ -17,17 +20,20 @@
|
||||
<thead class="table-primary">
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Enabled</th>
|
||||
<th>Code</th>
|
||||
<th>@DisplayNameHelper.GetDisplayName(nameof(CheckPointDTO.IsEnabled), typeof(CheckPointDTO))</th>
|
||||
<th>@DisplayNameHelper.GetDisplayName(nameof(CheckPointDTO.ShortName), typeof(CheckPointDTO))</th>
|
||||
<th>@DisplayNameHelper.GetDisplayName(nameof(CheckPointDTO.Code), typeof(CheckPointDTO))</th>
|
||||
<th>@DisplayNameHelper.GetDisplayName(nameof(CheckPointDTO.RoleName), typeof(CheckPointDTO))</th>
|
||||
<th class="text-center">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot class="table-light">
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Enabled</th>
|
||||
<th>Short Name</th>
|
||||
<th>Code</th>
|
||||
<th>@DisplayNameHelper.GetDisplayName(nameof(CheckPointDTO.IsEnabled), typeof(CheckPointDTO))</th>
|
||||
<th>@DisplayNameHelper.GetDisplayName(nameof(CheckPointDTO.ShortName), typeof(CheckPointDTO))</th>
|
||||
<th>@DisplayNameHelper.GetDisplayName(nameof(CheckPointDTO.Code), typeof(CheckPointDTO))</th>
|
||||
<th>@DisplayNameHelper.GetDisplayName(nameof(CheckPointDTO.RoleName), typeof(CheckPointDTO))</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
@@ -56,6 +62,7 @@
|
||||
},
|
||||
{ data: "shortName" },
|
||||
{ data: "code" },
|
||||
{ data: "roleName" },
|
||||
{ data: null, render: function (data, type, row) {
|
||||
return renderActionButtons(row.id);
|
||||
}}
|
||||
@@ -66,7 +73,7 @@
|
||||
"visible": false
|
||||
},
|
||||
{
|
||||
"targets": 3,
|
||||
"targets": 5,
|
||||
"className": "text-center",
|
||||
"width": "10%"
|
||||
}
|
||||
@@ -91,17 +98,7 @@
|
||||
$('#tbCheckPointsPage').on('click', '.delete-btn', function ()
|
||||
{
|
||||
const row = table.row($(this).closest('tr')).data();
|
||||
console.log(row);
|
||||
showConfirmModal({
|
||||
title: 'Törlés megerősítése',
|
||||
message: 'Biztosan törölni szeretnéd ezt az elemet?',
|
||||
okText: 'Törlés',
|
||||
cancelText: 'Mégsem'
|
||||
}).then(function(result) {
|
||||
if(result === 'ok') {
|
||||
console.log('Törlés végrehajtva');
|
||||
}
|
||||
});
|
||||
deleteEntity(table, './CheckPointPage?handler=DeleteCheckPoint', row.id);
|
||||
});
|
||||
</script>
|
||||
}
|
||||
@@ -24,6 +24,11 @@ namespace WorkFlowCheck.Web.Pages.BaseStock.CheckPoints
|
||||
var results = await _baseStockService.GetAllCheckPoints();
|
||||
return new JsonResult(new { data = results });
|
||||
}
|
||||
public async Task<JsonResult> OnGetDeleteCheckPoint(int id)
|
||||
{
|
||||
var isSuccess = await _baseStockService.DeleteCheckPoint(id);
|
||||
return new JsonResult(new { result = isSuccess });
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
<input asp-for="EquipmentDTO.EquipmentNumber" class="form-control" />
|
||||
<span asp-validation-for="EquipmentDTO.EquipmentNumber" class="text-danger"></span>
|
||||
</div>
|
||||
<hr class="mt-4 mb-3 border-secondary">
|
||||
<div class="mb-3 d-flex justify-content-between">
|
||||
<button type="button" id="saveEquipment" class="btn btn-primary">Mentés</button>
|
||||
<button type="button" class="btn btn-secondary" onclick="history.back()">Mégsem</button>
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
<input asp-for="LocationDTO.FullName" class="form-control" />
|
||||
<span asp-validation-for="LocationDTO.FullName" class="text-danger"></span>
|
||||
</div>
|
||||
<hr class="mt-4 mb-3 border-secondary">
|
||||
<div class="mb-3 d-flex justify-content-between">
|
||||
<button type="button" id="saveLocation" class="btn btn-primary">Mentés</button>
|
||||
<button type="button" class="btn btn-secondary" onclick="history.back()">Mégsem</button>
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
<input asp-for="CheckListHeaderDTO.DocumentNumber" class="form-control" />
|
||||
<span asp-validation-for="CheckListHeaderDTO.DocumentNumber" class="text-danger"></span>
|
||||
</div>
|
||||
<hr class="mt-4 mb-3 border-secondary">
|
||||
<div class="mb-3 d-flex justify-content-between">
|
||||
<button type="button" id="saveCheckListHeader" class="btn btn-primary">Mentés</button>
|
||||
<button type="button" class="btn btn-secondary" onclick="history.back()">Mégsem</button>
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<input asp-for="CheckListRow.Photo" type="file" class="form-control" />
|
||||
<span asp-validation-for="CheckListRow.Photo" class="text-danger"></span>
|
||||
</div>
|
||||
|
||||
<hr class="mt-4 mb-3 border-secondary">
|
||||
<div class="mb-3">
|
||||
<button type="button" id="saveCheckListRow" class="btn btn-primary">Mentés</button>
|
||||
<button type="button" class="btn btn-secondary" onclick="history.back()">Mégsem</button>
|
||||
|
||||
+1
@@ -39,6 +39,7 @@
|
||||
<span asp-validation-for="CheckListTemplateHeaderDTO.NumberGenerator2" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="mt-4 mb-3 border-secondary">
|
||||
<div class="mb-3 d-flex justify-content-between">
|
||||
<button type="button" id="saveCheckListTemplateHeader" class="btn btn-primary">Mentés</button>
|
||||
<button type="button" class="btn btn-secondary" onclick="history.back()">Mégsem</button>
|
||||
|
||||
+1
-1
@@ -47,7 +47,7 @@
|
||||
<textarea asp-for="CheckListTemplateRow.OperationDescription" class="form-control" rows="4"></textarea>
|
||||
<span asp-validation-for="CheckListTemplateRow.OperationDescription" class="text-danger"></span>
|
||||
</div>
|
||||
|
||||
<hr class="mt-4 mb-3 border-secondary">
|
||||
<div class="mb-3">
|
||||
<button type="button" id="saveCheckListTemplateRow" class="btn btn-primary">Mentés</button>
|
||||
<button type="button" class="btn btn-secondary" onclick="history.back()">Mégsem</button>
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
<span asp-validation-for="RoleCheckListTemplateHeaderDTO.Enabled" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="mt-4 mb-3 border-secondary">
|
||||
<div class="mb-3 d-flex justify-content-between">
|
||||
<button type="button" id="saveRoleCheckListTemplateHeader" class="btn btn-primary">Mentés</button>
|
||||
<button type="button" class="btn btn-secondary" onclick="history.back()">Mégsem</button>
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
<span asp-validation-for="RoleCheckPointDTO.Enabled" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="mt-4 mb-3 border-secondary">
|
||||
<div class="mb-3 d-flex justify-content-between">
|
||||
<button type="button" id="saveRoleCheckPoint" class="btn btn-primary">Mentés</button>
|
||||
<button type="button" class="btn btn-secondary" onclick="history.back()">Mégsem</button>
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="mt-4 mb-3 border-secondary">
|
||||
<div class="mb-3 d-flex justify-content-between">
|
||||
<button type="button" id="saveRole" class="btn btn-primary">Mentés</button>
|
||||
<button type="button" class="btn btn-secondary" onclick="history.back()">Mégsem</button>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
@using Microsoft.AspNetCore.Antiforgery
|
||||
@inject IAntiforgery Antiforgery
|
||||
@{
|
||||
ViewData["Title"] = "Ellenőrzési pont";
|
||||
ViewData["Title"] = "Felhasználó szerkesztése";
|
||||
var UserId = Model.UserDTO.Id;
|
||||
var url = Url.Page("./UserEditPage", "LoadRoles", new { id = UserId });
|
||||
var urlPost = Url.Page("./UserEditPage", "Save");
|
||||
@@ -48,16 +48,19 @@
|
||||
<input asp-for="UserDTO.LastName" class="form-control" />
|
||||
<span asp-validation-for="UserDTO.LastName" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label asp-for="UserDTO.Active"></label>
|
||||
<input type="checkbox" asp-for="UserDTO.Active" class="form-check-input" />
|
||||
<span asp-validation-for="UserDTO.Active" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label asp-for="UserDTO.NFCActive"></label>
|
||||
<input type="checkbox" asp-for="UserDTO.NFCActive" class="form-check-input" />
|
||||
<span asp-validation-for="UserDTO.NFCActive" class="text-danger"></span>
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<label asp-for="UserDTO.Active"></label>
|
||||
<input type="checkbox" asp-for="UserDTO.Active" class="form-check-input" />
|
||||
<span asp-validation-for="UserDTO.Active" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label asp-for="UserDTO.NFCActive"></label>
|
||||
<input type="checkbox" asp-for="UserDTO.NFCActive" class="form-check-input" />
|
||||
<span asp-validation-for="UserDTO.NFCActive" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="mt-4 mb-3 border-secondary">
|
||||
<div class="mb-3 d-flex justify-content-between">
|
||||
<button type="button" id="saveUser" class="btn btn-primary">Mentés</button>
|
||||
<button type="button" class="btn btn-secondary" onclick="history.back()">Mégsem</button>
|
||||
@@ -83,7 +86,7 @@
|
||||
</div>
|
||||
@section Scripts {
|
||||
<script>
|
||||
|
||||
|
||||
console.log($('#UserEditUrl').val());
|
||||
|
||||
const table = new DataTable('#tbUserPage', {
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
<span asp-validation-for="UserRoleDTO.UserId" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="mt-4 mb-3 border-secondary">
|
||||
<div class="mb-3 d-flex justify-content-between">
|
||||
<button type="button" id="saveUserRole" class="btn btn-primary">Mentés</button>
|
||||
<button type="button" class="btn btn-secondary" onclick="history.back()">Mégsem</button>
|
||||
|
||||
Reference in New Issue
Block a user