CheckListHeader már indul
This commit is contained in:
@@ -15,17 +15,24 @@
|
||||
<thead class="table-primary">
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>IsEditable</th>
|
||||
<th>DocumentNumber</th>
|
||||
<th>DateExecution</th>
|
||||
<th>ShortName</th>
|
||||
<th>Description</th>
|
||||
<th>Short Name</th>
|
||||
<th>Description</th>
|
||||
<th>User</th>
|
||||
<th class="text-center">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot class="table-light">
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Short Name</th>
|
||||
<th>IsEditable</th>
|
||||
<th>DocumentNumber</th>
|
||||
<th>DateExecution</th>
|
||||
<th>ShortName</th>
|
||||
<th>Description</th>
|
||||
<th>User</th>
|
||||
<th class="text-center">Action</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
@@ -42,8 +49,36 @@
|
||||
},
|
||||
columns: [
|
||||
{ data: "id" },
|
||||
{
|
||||
data: "isEditable",
|
||||
searchable: false,
|
||||
sortable: false,
|
||||
// visible: (aDurchgang==1 ? true : false),
|
||||
className: "text-center",
|
||||
render: function ( data, type, row ) {
|
||||
if (data === true) {
|
||||
return '<input type="checkbox" class="editor-active" disabled checked>';
|
||||
}
|
||||
if (data === false) {
|
||||
return '<input type="checkbox" class="editor-active" disabled>';
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
},
|
||||
{ data: "documentNumber",
|
||||
render: function (data, type, row) {
|
||||
if (!data) return '';
|
||||
if (type === 'display' || type === 'filter') {
|
||||
return dayjs(data).format('YYYY.MM.DD');
|
||||
}
|
||||
return data;
|
||||
}
|
||||
},
|
||||
{ data: "dateExecution" },
|
||||
{ data: "shortName" },
|
||||
{ data: "description" },
|
||||
{ data: "user.userName" },
|
||||
{ data: null, render: function (data, type, row) {
|
||||
return renderActionButtons(row.id);
|
||||
}}
|
||||
|
||||
+14
-1
@@ -1,12 +1,25 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
using WorkFlowCheck.Web.Services.Interfaces;
|
||||
|
||||
namespace WorkFlowCheck.Web.Pages.CheckList.CheckListHeader
|
||||
{
|
||||
public class CheckListHeaderPageModel : PageModel
|
||||
{
|
||||
public void OnGet()
|
||||
private readonly ILogger<IndexModel> _logger;
|
||||
private readonly ICheckListService _checkListService;
|
||||
public CheckListHeaderPageModel(ILogger<IndexModel> logger, ICheckListService checkListService)
|
||||
{
|
||||
_logger = logger;
|
||||
_checkListService = checkListService;
|
||||
}
|
||||
public async Task OnGet()
|
||||
{
|
||||
}
|
||||
public async Task<JsonResult> OnGetLoadCheckListHeaders()
|
||||
{
|
||||
var results = await _checkListService.GetAllCheckListHeaderAsync();
|
||||
return new JsonResult(new { data = results });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,6 +147,7 @@
|
||||
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/jquery-validation@1.19.5/dist/jquery.validate.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/jquery-validation-unobtrusive@4.0.0/dist/jquery.validate.unobtrusive.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/dayjs@1/dayjs.min.js"></script>
|
||||
|
||||
@await RenderSectionAsync("Scripts", required: false)
|
||||
<partial name="_ValidationScriptsPartial" />
|
||||
|
||||
Reference in New Issue
Block a user