diff --git a/src/WorkFlowCheck.API/appsettings.Development.json b/src/WorkFlowCheck.API/appsettings.Development.json index a61fe6e..783c729 100644 --- a/src/WorkFlowCheck.API/appsettings.Development.json +++ b/src/WorkFlowCheck.API/appsettings.Development.json @@ -2,7 +2,7 @@ "ConnectionStrings": { //"DefaultConnection": "Data Source=NSINB-37\\WFC;Initial Catalog=WFC;Integrated Security=True;Connect Timeout=30;Encrypt=False;Trust Server Certificate=False;Application Intent=ReadWrite;Multi Subnet Failover=False" //"DefaultConnection": "Data Source=WS2016DC\\SQLEXPRESS;Initial Catalog=WFC;Integrated Security=True;Connect Timeout=30;Encrypt=False;Trust Server Certificate=False;Application Intent=ReadWrite;Multi Subnet Failover=False", - "DefaultConnection": "Data Source=WS2016DC\\SQLEXPRESS;Initial Catalog=WFCUAT;Integrated Security=True;Connect Timeout=30;Encrypt=False;Trust Server Certificate=False;Application Intent=ReadWrite;Multi Subnet Failover=False" + "DefaultConnection": "Data Source=MASERVER;Initial Catalog=WFCUAT;Integrated Security=True;Connect Timeout=30;Encrypt=False;Trust Server Certificate=False;Application Intent=ReadWrite;Multi Subnet Failover=False" }, "Logging": { "LogLevel": { diff --git a/src/WorkFlowCheck.API/appsettings.json b/src/WorkFlowCheck.API/appsettings.json index eb68076..f28ace9 100644 --- a/src/WorkFlowCheck.API/appsettings.json +++ b/src/WorkFlowCheck.API/appsettings.json @@ -1,6 +1,6 @@ { "ConnectionStrings": { - "DefaultConnection": "Data Source=WS2016DC\\SQLEXPRESS;Initial Catalog=WFCUAT;Integrated Security=True;Connect Timeout=30;Encrypt=False;Trust Server Certificate=False;Application Intent=ReadWrite;Multi Subnet Failover=False" + "DefaultConnection": "Data Source=MASERVER;Initial Catalog=WFCUAT;Integrated Security=True;Connect Timeout=30;Encrypt=False;Trust Server Certificate=False;Application Intent=ReadWrite;Multi Subnet Failover=False" }, "ApiKey": "RUJeLSpSMzVASUdaRCEzUyYxRSE0VyFISFRSJC0zRzhLM1hCSDU=", "Jwt": { diff --git a/src/WorkFlowCheck.Web/Pages/Account/ChangePassword.cshtml b/src/WorkFlowCheck.Web/Pages/Account/ChangePassword.cshtml index 9bed548..e22cbb7 100644 --- a/src/WorkFlowCheck.Web/Pages/Account/ChangePassword.cshtml +++ b/src/WorkFlowCheck.Web/Pages/Account/ChangePassword.cshtml @@ -15,15 +15,175 @@ @ViewData["Title"] + + + - -
-

Jelszó módosítása

+ +
+ +
+ +
- + diff --git a/src/WorkFlowCheck.Web/Pages/Index.cshtml b/src/WorkFlowCheck.Web/Pages/Index.cshtml index 53add77..c4e0c01 100644 --- a/src/WorkFlowCheck.Web/Pages/Index.cshtml +++ b/src/WorkFlowCheck.Web/Pages/Index.cshtml @@ -1,10 +1,112 @@ -@page +@page @model IndexModel +@using System.Text.Json @{ - ViewData["Title"] = "Home page"; + ViewData["Title"] = "Áttekintés"; + var jsonOptions = new JsonSerializerOptions { PropertyNamingPolicy = JsonNamingPolicy.CamelCase }; } -
-

Üdvözlöm!

-

WorkFlowCheck Tablet & WEB & API rendszer.

+@section Styles { + +} + +
+
+

Gyártási ellenőrzések áttekintése

@Model.PeriodLabel · Frissítve: @Model.GeneratedAt.ToString("yyyy. MM. dd. HH:mm")

+ Mintaadatokkal +
+ +
+
@Model.MonthlyChangePercent.ToString("0.0")%
@Model.InspectionsThisMonth
Ellenőrzés ebben a hónapban
+
@Model.AwaitingApproval jóváhagyásra vár
@Model.InProgress
Folyamatban lévő ellenőrzés
+
@Model.ApprovalRate.ToString("0.0")% arány
@Model.ApprovedThisMonth
Jóváhagyás ebben a hónapban
+
átlagos idő
@Model.AverageDurationMinutes.ToString("0.0") perc
Egy ellenőrzés végrehajtása
+
+ +
+
+

Ellenőrzések az utolsó 6 hónapban

Összes ellenőrzés és jóváhagyott tételek havi bontásban

+
+
+
+

Aktuális állapotok

Az e havi ellenőrzések megoszlása

+
@foreach(var status in Model.Statuses){
@status.Name@status.Count
}
+
+
+ +
+
+

Jóváhagyások személyenként

Aktuális hónap · jóváhagyott ellenőrzések száma

+
+
+
+

Figyelmet igényel

Elakadt vagy határidős tételek

@Model.AttentionItems.Count
+
@foreach(var item in Model.AttentionItems){
@item.Title
@item.Description
}
+
+
+ +
+

Legutóbbi ellenőrzések

A rendszerben legutóbb módosított tételek

Összes megtekintése
+
+ @foreach(var item in Model.RecentInspections){} +
AzonosítóEllenőrzésLokációFelelősMódosítvaÁllapot
@item.Code@item.Name@item.Location@item.Responsible@item.ModifiedAt.ToString("yyyy. MM. dd. HH:mm")@item.Status
+
+ +@section Scripts { + + +} diff --git a/src/WorkFlowCheck.Web/Pages/Index.cshtml.cs b/src/WorkFlowCheck.Web/Pages/Index.cshtml.cs index 11c1aa9..98d353a 100644 --- a/src/WorkFlowCheck.Web/Pages/Index.cshtml.cs +++ b/src/WorkFlowCheck.Web/Pages/Index.cshtml.cs @@ -1,22 +1,76 @@ -using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; +using System.Globalization; namespace WorkFlowCheck.Web.Pages { - //[Authorize] public class IndexModel : PageModel { private readonly ILogger _logger; - public IndexModel(ILogger logger) - { - _logger = logger; - } + public DateTime GeneratedAt { get; private set; } + public string PeriodLabel { get; private set; } = string.Empty; + public int InspectionsThisMonth { get; private set; } + public decimal MonthlyChangePercent { get; private set; } + public int InProgress { get; private set; } + public int AwaitingApproval { get; private set; } + public int ApprovedThisMonth { get; private set; } + public decimal ApprovalRate { get; private set; } + public decimal AverageDurationMinutes { get; private set; } + public List MonthlyInspections { get; private set; } = []; + public List Statuses { get; private set; } = []; + public List Approvers { get; private set; } = []; + public List AttentionItems { get; private set; } = []; + public List RecentInspections { get; private set; } = []; + + public IndexModel(ILogger logger) => _logger = logger; public void OnGet() { - + // TODO: A következő körben ezt az egy blokkot cseréljük IDashboardService hívásra. + LoadDemoData(); } + + private void LoadDemoData() + { + GeneratedAt = DateTime.Now; + PeriodLabel = GeneratedAt.ToString("yyyy. MMMM", CultureInfo.GetCultureInfo("hu-HU")); + InspectionsThisMonth = 128; + MonthlyChangePercent = 18.5m; + InProgress = 17; + AwaitingApproval = 9; + ApprovedThisMonth = 96; + ApprovalRate = 75.0m; + AverageDurationMinutes = 14.2m; + + var totals = new[] { 76, 89, 84, 105, 112, 128 }; + var approved = new[] { 55, 63, 61, 79, 86, 96 }; + var firstMonth = new DateTime(GeneratedAt.Year, GeneratedAt.Month, 1).AddMonths(-5); + var culture = CultureInfo.GetCultureInfo("hu-HU"); + MonthlyInspections = Enumerable.Range(0, 6).Select(i => new MonthlyInspectionPoint(firstMonth.AddMonths(i).ToString("MMM", culture).TrimEnd('.'), totals[i], approved[i])).ToList(); + + Statuses = [new("Jóváhagyott",96,"#16875b"),new("Beküldött",9,"#38bdf8"),new("Folyamatban",17,"#e28a17"),new("Lezárt",6,"#94a3b8")]; + Approvers = [new("Kovács Péter",28),new("Nagy Anna",24),new("Tóth Gábor",19),new("Szabó Éva",15),new("Varga Tamás",10)]; + AttentionItems = + [ + new("3 ellenőrzés több mint 48 órája beküldve", "Jóváhagyásra várnak a C2 gyártócsarnokban.", true), + new("Kalibrálás hamarosan lejár", "A CNC–04 berendezés következő határideje 3 nap.", false), + new("Hiányzó fényképes dokumentáció", "2 folyamatban lévő ellenőrzésnél nincs csatolmány.", true), + new("Heti ellenőrzési terv", "A tervezett 34 ellenőrzésből még 7 nem kezdődött el.", false) + ]; + RecentInspections = + [ + new("WFC-260912-018","Műszakindító gépellenőrzés","C2 gyártócsarnok","Kiss Dániel",GeneratedAt.AddMinutes(-18),"Jóváhagyott","status-approved","bi-check-circle"), + new("WFC-260912-017","Hegesztőcella biztonsági ellenőrzés","A1 csarnok","Farkas András",GeneratedAt.AddMinutes(-42),"Beküldött","status-submitted","bi-send-check"), + new("WFC-260912-016","Csomagolósor minőségellenőrzés","B3 csomagoló","Molnár Rita",GeneratedAt.AddHours(-1.4),"Folyamatban","status-progress","bi-hourglass-split"), + new("WFC-260912-015","Napi karbantartási ellenőrzés","CNC terület","Kiss Dániel",GeneratedAt.AddHours(-2.1),"Lezárt","status-closed","bi-lock"), + new("WFC-260912-014","Beérkező alapanyag vizsgálata","Központi raktár","Nagy Júlia",GeneratedAt.AddHours(-3.3),"Jóváhagyott","status-approved","bi-check-circle") + ]; + } + + public sealed record MonthlyInspectionPoint(string Month, int Total, int Approved); + public sealed record DashboardStatus(string Name, int Count, string Color); + public sealed record ApproverStatistic(string Name, int Count); + public sealed record AttentionItem(string Title, string Description, bool IsCritical); + public sealed record RecentInspection(string Code, string Name, string Location, string Responsible, DateTime ModifiedAt, string Status, string StatusCss, string StatusIcon); } } diff --git a/src/WorkFlowCheck.Web/Pages/Shared/_Layout.cshtml b/src/WorkFlowCheck.Web/Pages/Shared/_Layout.cshtml index 5be61f4..bd172af 100644 --- a/src/WorkFlowCheck.Web/Pages/Shared/_Layout.cshtml +++ b/src/WorkFlowCheck.Web/Pages/Shared/_Layout.cshtml @@ -1,229 +1,321 @@ - - - @ViewData["Title"] - WorkFlowCheck.Web + @ViewData["Title"] - Workflow Check + + + + - - - @* *@ - + + + + + + + @await RenderSectionAsync("Styles", required: false) -
- -
-
-
- @RenderBody() -
+ + + + + + +
+ +
+
+ + +
@ViewData["Title"]
+
+ +
+ @RenderBody() +
+ +
+ +
+
- - - -