IsEnabled a CheckPoint-hoz

This commit is contained in:
2025-03-31 13:39:02 +02:00
parent 56f17681be
commit 7996f887ba
14 changed files with 1155 additions and 21 deletions
@@ -27,6 +27,11 @@
<input asp-for="CheckPoint.Code" class="form-control" />
<span asp-validation-for="CheckPoint.Code" class="text-danger"></span>
</div>
<div class="col-md-3">
<label asp-for="CheckPoint.IsEnabled"></label>
<input type="checkbox" asp-for="CheckPoint.IsEnabled" class="form-check-input" />
<span asp-validation-for="CheckPoint.IsEnabled" class="text-danger"></span>
</div>
<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>
@@ -15,7 +15,7 @@
<thead class="table-primary">
<tr>
<th>ID</th>
<th>Short Name</th>
<th>Enabled</th>
<th>Code</th>
<th class="text-center">Action</th>
</tr>
@@ -23,6 +23,7 @@
<tfoot class="table-light">
<tr>
<th>ID</th>
<th>Enabled</th>
<th>Short Name</th>
<th>Code</th>
<th>Action</th>
@@ -41,6 +42,22 @@
},
columns: [
{ data: "id" },
{
data: "isEnabled",
searchable: false,
sortable: false,
className: "text-center",
render: function ( data, type, row ) {
if (data === true) {
return '<input type="checkbox" class="form-check-input no-click" checked>';
}
if (data === false) {
return '<input type="checkbox" class="form-check-input no-click" >';
}
return data;
}
},
{ data: "shortName" },
{ data: "code" },
{ data: null, render: function (data, type, row) {