CheckListHeader már indul
This commit is contained in:
@@ -131,7 +131,7 @@ namespace WorkFlowCheck.BL.Services
|
|||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
var currentDate = DateTime.UtcNow;
|
var currentDate = DateTime.UtcNow;
|
||||||
var documentNumber = await _numberGeneratorService.GenerateNextNumberAsync(checkListTemplateHeader.NumberGenerator1.Id, currentDate);
|
var documentNumber = await _numberGeneratorService.GenerateNextNumberAsync(checkListTemplateHeader.NumberGenerator1Id ?? 1, currentDate);
|
||||||
CheckListHeader checkListHeader = new CheckListHeader()
|
CheckListHeader checkListHeader = new CheckListHeader()
|
||||||
{
|
{
|
||||||
CheckListTemplateHeaderId = checkListHeaderNewDTO.CheckListTemplateHeaderId,
|
CheckListTemplateHeaderId = checkListHeaderNewDTO.CheckListTemplateHeaderId,
|
||||||
|
|||||||
@@ -9,5 +9,6 @@ namespace WorkFlowCheck.BL.Services.Interfaces
|
|||||||
public interface INumberGeneratorService
|
public interface INumberGeneratorService
|
||||||
{
|
{
|
||||||
Task<string> GenerateNextNumberAsync(int templateId, DateTime? baseDate = null);
|
Task<string> GenerateNextNumberAsync(int templateId, DateTime? baseDate = null);
|
||||||
|
Task<string> GetSampleAsync(int templateId, DateTime? baseDate = null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,17 +15,24 @@
|
|||||||
<thead class="table-primary">
|
<thead class="table-primary">
|
||||||
<tr>
|
<tr>
|
||||||
<th>ID</th>
|
<th>ID</th>
|
||||||
<th>Description</th>
|
<th>IsEditable</th>
|
||||||
|
<th>DocumentNumber</th>
|
||||||
|
<th>DateExecution</th>
|
||||||
<th>ShortName</th>
|
<th>ShortName</th>
|
||||||
<th>Description</th>
|
<th>Description</th>
|
||||||
|
<th>User</th>
|
||||||
<th class="text-center">Action</th>
|
<th class="text-center">Action</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tfoot class="table-light">
|
<tfoot class="table-light">
|
||||||
<tr>
|
<tr>
|
||||||
<th>ID</th>
|
<th>ID</th>
|
||||||
|
<th>IsEditable</th>
|
||||||
|
<th>DocumentNumber</th>
|
||||||
|
<th>DateExecution</th>
|
||||||
<th>ShortName</th>
|
<th>ShortName</th>
|
||||||
<th>Description</th>
|
<th>Description</th>
|
||||||
|
<th>User</th>
|
||||||
<th class="text-center">Action</th>
|
<th class="text-center">Action</th>
|
||||||
</tr>
|
</tr>
|
||||||
</tfoot>
|
</tfoot>
|
||||||
@@ -42,8 +49,36 @@
|
|||||||
},
|
},
|
||||||
columns: [
|
columns: [
|
||||||
{ data: "id" },
|
{ 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: "shortName" },
|
||||||
{ data: "description" },
|
{ data: "description" },
|
||||||
|
{ data: "user.userName" },
|
||||||
{ data: null, render: function (data, type, row) {
|
{ data: null, render: function (data, type, row) {
|
||||||
return renderActionButtons(row.id);
|
return renderActionButtons(row.id);
|
||||||
}}
|
}}
|
||||||
|
|||||||
+14
-1
@@ -1,12 +1,25 @@
|
|||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||||
|
using WorkFlowCheck.Web.Services.Interfaces;
|
||||||
|
|
||||||
namespace WorkFlowCheck.Web.Pages.CheckList.CheckListHeader
|
namespace WorkFlowCheck.Web.Pages.CheckList.CheckListHeader
|
||||||
{
|
{
|
||||||
public class CheckListHeaderPageModel : PageModel
|
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://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@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/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)
|
@await RenderSectionAsync("Scripts", required: false)
|
||||||
<partial name="_ValidationScriptsPartial" />
|
<partial name="_ValidationScriptsPartial" />
|
||||||
|
|||||||
Reference in New Issue
Block a user