From 8f9e5df8476e97d85963e036ade7cadda8c653e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Szab=C3=B3?= Date: Tue, 11 Mar 2025 16:54:50 +0100 Subject: [PATCH] =?UTF-8?q?WEB=20most=20j=C3=B3l=20m=C5=B1k=C3=B6dik=20Dat?= =?UTF-8?q?atables-sel.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/WorkFlowCheck.MOBILE.sln | 3 + .../CheckPoints/CheckPointEditPage.cshtml | 101 ++++++++++++++++++ .../CheckPoints/CheckPointEditPage.cshtml.cs | 32 ++++++ .../CheckPoints/CheckPointsPage.cshtml | 74 +++++++++++++ .../CheckPoints/CheckPointsPage.cshtml.cs | 27 +++++ .../Pages/Shared/_Layout.cshtml | 18 +++- src/WorkFlowCheck.Web/Program.cs | 8 +- src/WorkFlowCheck.Web/Services/BaseService.cs | 23 ++++ .../Services/BaseStockService.cs | 64 +++++++++++ .../Services/Interfaces/IBaseStockService.cs | 11 ++ .../WorkFlowCheck.Web.csproj | 16 ++- 11 files changed, 370 insertions(+), 7 deletions(-) create mode 100644 src/WorkFlowCheck.Web/Pages/BaseStock/CheckPoints/CheckPointEditPage.cshtml create mode 100644 src/WorkFlowCheck.Web/Pages/BaseStock/CheckPoints/CheckPointEditPage.cshtml.cs create mode 100644 src/WorkFlowCheck.Web/Pages/BaseStock/CheckPoints/CheckPointsPage.cshtml create mode 100644 src/WorkFlowCheck.Web/Pages/BaseStock/CheckPoints/CheckPointsPage.cshtml.cs create mode 100644 src/WorkFlowCheck.Web/Services/BaseService.cs create mode 100644 src/WorkFlowCheck.Web/Services/BaseStockService.cs create mode 100644 src/WorkFlowCheck.Web/Services/Interfaces/IBaseStockService.cs diff --git a/src/WorkFlowCheck.MOBILE.sln b/src/WorkFlowCheck.MOBILE.sln index 0b8a3a6..b153d31 100644 --- a/src/WorkFlowCheck.MOBILE.sln +++ b/src/WorkFlowCheck.MOBILE.sln @@ -39,4 +39,7 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {42493626-0B67-416A-A154-08ACD837DAEA} + EndGlobalSection EndGlobal diff --git a/src/WorkFlowCheck.Web/Pages/BaseStock/CheckPoints/CheckPointEditPage.cshtml b/src/WorkFlowCheck.Web/Pages/BaseStock/CheckPoints/CheckPointEditPage.cshtml new file mode 100644 index 0000000..bf2f677 --- /dev/null +++ b/src/WorkFlowCheck.Web/Pages/BaseStock/CheckPoints/CheckPointEditPage.cshtml @@ -0,0 +1,101 @@ +@page +@model WorkFlowCheck.Web.Pages.BaseStock.CheckPoints.CheckPointEditPageModel +@{ + ViewData["Title"] = "Ellenőrzési pont"; + var checkpointId = Model.CheckPoint.Id; + var url = Url.Page("./CheckPointEditPage", "LoadCheckListTemplateRows", new { id = checkpointId }); +} +

@ViewData["Title"]

+ + + +
+
+ + +
+ + + +
+
+ + + +
+ +
+
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + +
IDRowIndexOperationDescriptionAnswerTypeAction
IDRowIndexOperationDescriptionAnswerTypeAction
+
+ +@section Scripts { + +} diff --git a/src/WorkFlowCheck.Web/Pages/BaseStock/CheckPoints/CheckPointEditPage.cshtml.cs b/src/WorkFlowCheck.Web/Pages/BaseStock/CheckPoints/CheckPointEditPage.cshtml.cs new file mode 100644 index 0000000..f3784e3 --- /dev/null +++ b/src/WorkFlowCheck.Web/Pages/BaseStock/CheckPoints/CheckPointEditPage.cshtml.cs @@ -0,0 +1,32 @@ +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.RazorPages; +using WorkFlowCheck.Common.DTO; +using WorkFlowCheck.Web.Services.Interfaces; + +namespace WorkFlowCheck.Web.Pages.BaseStock.CheckPoints +{ + public class CheckPointEditPageModel : PageModel + { + private readonly ILogger _logger; + private readonly IBaseStockService _baseStockService; + + [BindProperty] + public CheckPointDTO CheckPoint { get; set; } + + public CheckPointEditPageModel(ILogger logger, IBaseStockService baseStockService) + { + _baseStockService = baseStockService; + _logger = logger; + } + public async Task OnGet(int id) + { + CheckPoint = await _baseStockService.GetCheckPoint(id); + + } + public async Task OnGetLoadCheckListTemplateRows(int id) + { + CheckPoint = await _baseStockService.GetCheckPoint(id); + return new JsonResult(new { data = CheckPoint.CheckListTemplateRowDTO }); + } + } +} diff --git a/src/WorkFlowCheck.Web/Pages/BaseStock/CheckPoints/CheckPointsPage.cshtml b/src/WorkFlowCheck.Web/Pages/BaseStock/CheckPoints/CheckPointsPage.cshtml new file mode 100644 index 0000000..71c14d2 --- /dev/null +++ b/src/WorkFlowCheck.Web/Pages/BaseStock/CheckPoints/CheckPointsPage.cshtml @@ -0,0 +1,74 @@ +@page +@model WorkFlowCheck.Web.Pages.BaseStock.CheckPoints.CheckPointsPageModel +@{ + ViewData["Title"] = "Ellenőrzési pontok"; +} +

@ViewData["Title"]

+
+ +
+
+ + + + + + + + + + + + + + + + + +
IDShort NameCodeAction
IDShort NameCodeAction
+
+ +@section Scripts { + +} \ No newline at end of file diff --git a/src/WorkFlowCheck.Web/Pages/BaseStock/CheckPoints/CheckPointsPage.cshtml.cs b/src/WorkFlowCheck.Web/Pages/BaseStock/CheckPoints/CheckPointsPage.cshtml.cs new file mode 100644 index 0000000..9a549a4 --- /dev/null +++ b/src/WorkFlowCheck.Web/Pages/BaseStock/CheckPoints/CheckPointsPage.cshtml.cs @@ -0,0 +1,27 @@ +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.RazorPages; +using WorkFlowCheck.Common.DTO; +using WorkFlowCheck.Web.Services.Interfaces; + +namespace WorkFlowCheck.Web.Pages.BaseStock.CheckPoints +{ + public class CheckPointsPageModel : PageModel + { + private readonly ILogger _logger; + private readonly IBaseStockService _baseStockService; + public CheckPointsPageModel(ILogger logger, IBaseStockService baseStockService) + { + _logger = logger; + _baseStockService = baseStockService; + } + public void OnGet() + { + } + public async Task OnGetLoadCheckPoints() + { + var results = await _baseStockService.GetAllCheckPoints(); + return new JsonResult(new { data = results }); + } + + } +} diff --git a/src/WorkFlowCheck.Web/Pages/Shared/_Layout.cshtml b/src/WorkFlowCheck.Web/Pages/Shared/_Layout.cshtml index 5f9efe9..f6590cb 100644 --- a/src/WorkFlowCheck.Web/Pages/Shared/_Layout.cshtml +++ b/src/WorkFlowCheck.Web/Pages/Shared/_Layout.cshtml @@ -7,12 +7,13 @@ +