diff --git a/.gitignore b/.gitignore
index 95b3136..90a3256 100644
--- a/.gitignore
+++ b/.gitignore
@@ -342,3 +342,4 @@ healthchecksdb
/src/WorkFlowCheck.API/Images
*.pdf
/src/WorkFlowCheck.API/Pdf/c86f3a6a-c646-4627-823c-7e24134b7725.docx
+/src/WorkFlowCheck.API/Downloads/APK/com.nuvolar.wfcapp-Signed.apk
diff --git a/src/WorkFlowCheck.API/Downloads/APK/com.nuvolar.wfcapp-Signed.apk b/src/WorkFlowCheck.API/Downloads/APK/com.nuvolar.wfcapp-Signed.apk
deleted file mode 100644
index c4ae6ff..0000000
Binary files a/src/WorkFlowCheck.API/Downloads/APK/com.nuvolar.wfcapp-Signed.apk and /dev/null differ
diff --git a/src/WorkFlowCheck.BL/Services/CheckListService.cs b/src/WorkFlowCheck.BL/Services/CheckListService.cs
index d6ed01b..3e810c0 100644
--- a/src/WorkFlowCheck.BL/Services/CheckListService.cs
+++ b/src/WorkFlowCheck.BL/Services/CheckListService.cs
@@ -170,7 +170,7 @@ namespace WorkFlowCheck.BL.Services
IsEditable = true,
UserId = checkListHeaderNewDTO.UserId,
ShortName = "",
- Description = "",
+ Description = checkListTemplateHeader.Description ?? "",
DocumentNumber = documentNumber,
GuidNumber = Guid.NewGuid(),
IsDeleted = false,
@@ -227,7 +227,10 @@ namespace WorkFlowCheck.BL.Services
checkListHeader.CheckStatus = CheckStatus.Signed;
checkListHeader.IsEditable = false;
checkListHeader.AcceptUserId = userid;
- Log.ForContext("TAG", "BusinessFlow").Warning($"Ellenőrzési lap státuszváltozása, jóváhasyás: Ellenőrzés:{id}, Felhasználó:{userid}");
+
+ checkListHeader.DateExecution = DateTime.Now;
+
+ Log.ForContext("TAG", "BusinessFlow").Warning($"Ellenőrzési lap státuszváltozása, jóváhagyás: Ellenőrzés:{checkListHeader.DocumentNumber}, Felhasználó: {checkListHeader.AcceptUser.LastName} {checkListHeader.AcceptUser.FirstName}");
await _dbContext.SaveChangesAsync();
var pdf = await CreateCheckListHeaderPDFAsync(id);
diff --git a/src/WorkFlowCheck.BL/Services/SyncService.cs b/src/WorkFlowCheck.BL/Services/SyncService.cs
index 85c8744..0bd085d 100644
--- a/src/WorkFlowCheck.BL/Services/SyncService.cs
+++ b/src/WorkFlowCheck.BL/Services/SyncService.cs
@@ -212,8 +212,7 @@ namespace WorkFlowCheck.BL.Services
var res = await _dbContext.Locations.Where(w => w.Id == LocationDTO.Id).FirstOrDefaultAsync();
if (res != null)
{
- res = _mapper.Map
(LocationDTO);
-
+ res.FullName = LocationDTO.FullName;
await _dbContext.SaveChangesAsync();
retVal = _mapper.Map(res);
@@ -349,9 +348,10 @@ namespace WorkFlowCheck.BL.Services
try
{
var res = await _dbContext.CheckListHeaders
- .Where(w => (w.IsEditable &&
- w.IsDeleted != true) || (w.CheckStatus == CheckStatus.Blocked)
- )
+ .Where(w => w.CheckStatus == CheckStatus.Open ||
+ w.CheckStatus == CheckStatus.InProgress ||
+ w.CheckStatus == CheckStatus.Blocked ||
+ w.CheckStatus == CheckStatus.Sent)
.Include(i => i.CheckListRows)
//.ThenInclude(i => i.CheckListTemplateRow)
.AsNoTracking()
@@ -385,43 +385,6 @@ namespace WorkFlowCheck.BL.Services
if (res != null && (res.CheckStatus == CheckStatus.Open ||
res.CheckStatus == CheckStatus.InProgress))
{
- if (NeedBlocking(checkListHeaderDTO))
- {
- /// TODO: blokkolás miatt
- res.CheckStatus = CheckStatus.Blocked;
- await _dbContext.SaveChangesAsync();
-
- Log.ForContext("TAG", "BusinessFlow").Warning($"Ellenőrzési lap blokkolva: Ellenőrzés:{checkListHeaderDTO.Id}, Felhasználó:{_requestContext.CurrentUsername}");
-
- var user = await _userService.GetUserAsync(_requestContext.CurrentUserId ?? 1);
-
- foreach (var item in user.RoleDTO)
- {
- var deviceMessageDTO = new DeviceMessageDTO()
- {
- IsReaded = false,
- Message = $"Ellenőrző lap blokkolva! [{checkListHeaderDTO.DocumentNumber}]",
- SendDate = DateTime.UtcNow,
- ExtraDataJSON = "",
- RoleId = item.ParentId,
- DeviceIdFrom = "",
- DeviceIdTo = "",
- };
-
- await this.DeviceMessageSend(deviceMessageDTO);
-
- var fCMMessageDTO = new FCMMessageDTO
- {
- Body = deviceMessageDTO.Message,
- Title = "Blokkolási értesítés",
- UserId = user.Id,
- };
- await _messageService.SendFCMMessageToLastToken(fCMMessageDTO);
- }
- return retVal;
- }
-
- res.CheckStatus = CheckStatus.InProgress;
var ids = checkListHeaderDTO.CheckListRowDTO?.Select(r => r.Id).ToList();
if (ids != null && ids.Count > 0)
{
@@ -448,6 +411,47 @@ namespace WorkFlowCheck.BL.Services
}
}
}
+ await _dbContext.SaveChangesAsync();
+ retVal = _mapper.Map(res);
+
+ if (NeedBlocking(checkListHeaderDTO))
+ {
+ /// TODO: blokkolás miatt
+ res.CheckStatus = CheckStatus.Blocked;
+ await _dbContext.SaveChangesAsync();
+
+ Log.ForContext("TAG", "BusinessFlow").Warning($"Ellenőrzési lap blokkolva: Ellenőrzés:{checkListHeaderDTO.Id}, Felhasználó:{_requestContext.CurrentUsername}");
+
+ var user = await _userService.GetUserAsync(_requestContext.CurrentUserId ?? 1);
+
+ foreach (var item in user.RoleDTO)
+ {
+ var deviceMessageDTO = new DeviceMessageDTO()
+ {
+ IsReaded = false,
+ Message = $"Ellenőrző lap blokkolva! [{checkListHeaderDTO.DocumentNumber}]",
+ SendDate = DateTime.UtcNow,
+ ExtraDataJSON = "",
+ RoleId = item.ParentId,
+ DeviceIdFrom = "",
+ DeviceIdTo = "",
+ };
+
+ await this.DeviceMessageSend(deviceMessageDTO);
+
+ var fCMMessageDTO = new FCMMessageDTO
+ {
+ Body = deviceMessageDTO.Message,
+ Title = "Blokkolási értesítés",
+ UserId = user.Id,
+ };
+ await _messageService.SendFCMMessageToLastToken(fCMMessageDTO);
+ }
+ return retVal;
+ }
+
+ res.CheckStatus = CheckStatus.InProgress;
+
if (CheckIfLastReached(checkListHeaderDTO))
{
/// TODO: most kell a CheckStatust állítani és menjen üzenet !
diff --git a/src/WorkFlowCheck.Common/DTO/EquipmentDTO.cs b/src/WorkFlowCheck.Common/DTO/EquipmentDTO.cs
index c738bc6..d9d737f 100644
--- a/src/WorkFlowCheck.Common/DTO/EquipmentDTO.cs
+++ b/src/WorkFlowCheck.Common/DTO/EquipmentDTO.cs
@@ -1,5 +1,7 @@
using System;
using System.Collections.Generic;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@@ -9,7 +11,13 @@ namespace WorkFlowCheck.Common.DTO
public class EquipmentDTO
{
public int Id { get; set; }
+
+ [Required(ErrorMessage = "A megnevezést megadása kötelező.")]
+ [DisplayName("Megnevezés")]
public string ShortName { get; set; } = null!;
+
+ [Required(ErrorMessage = "Az azonosító megadása kötelező.")]
+ [DisplayName("Azonosító")]
public string EquipmentNumber { get; set; } = null!;
}
}
diff --git a/src/WorkFlowCheck.Common/DTO/LocationDTO.cs b/src/WorkFlowCheck.Common/DTO/LocationDTO.cs
index 6f4e74b..7237f7a 100644
--- a/src/WorkFlowCheck.Common/DTO/LocationDTO.cs
+++ b/src/WorkFlowCheck.Common/DTO/LocationDTO.cs
@@ -1,5 +1,7 @@
using System;
using System.Collections.Generic;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@@ -9,6 +11,9 @@ namespace WorkFlowCheck.Common.DTO
public class LocationDTO
{
public int Id { get; set; }
+
+ [Required(ErrorMessage = "A megnevezést megadása kötelező.")]
+ [DisplayName("Megnevezés")]
public string FullName { get; set; } = null!;
}
}
diff --git a/src/WorkFlowCheck.Common/DTO/RoleCheckListTemplateHeaderDTO.cs b/src/WorkFlowCheck.Common/DTO/RoleCheckListTemplateHeaderDTO.cs
index a7f8f43..e8eafe5 100644
--- a/src/WorkFlowCheck.Common/DTO/RoleCheckListTemplateHeaderDTO.cs
+++ b/src/WorkFlowCheck.Common/DTO/RoleCheckListTemplateHeaderDTO.cs
@@ -1,5 +1,7 @@
using System;
using System.Collections.Generic;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
using System.Data;
using System.Linq;
using System.Text;
@@ -10,10 +12,19 @@ namespace WorkFlowCheck.Common.DTO
public class RoleCheckListTemplateHeaderDTO
{
public int Id { get; set; }
+
+ [Required(ErrorMessage = "A szabály megnevezésének megadása kötelező.")]
+ [DisplayName("Szabály")]
public int RoleId { get; set; }
public RoleDTO? RoleDTO { get; set; } = null!;
+
+ [Required(ErrorMessage = "Az ellenőrzési sablon megadása kötelező.")]
+ [DisplayName("Ellenőrzési sablon")]
public int CheckListTemplateHeaderId { get; set; }
public CheckListTemplateHeaderDTO? CheckListTemplateHeaderDTO { get; set; } = null!;
+
+
+ [DisplayName("Engedélyezve?")]
public bool Enabled { get; set; } = false;
}
}
diff --git a/src/WorkFlowCheck.Common/DTO/RoleCheckPointDTO.cs b/src/WorkFlowCheck.Common/DTO/RoleCheckPointDTO.cs
index f12040b..d07b23b 100644
--- a/src/WorkFlowCheck.Common/DTO/RoleCheckPointDTO.cs
+++ b/src/WorkFlowCheck.Common/DTO/RoleCheckPointDTO.cs
@@ -1,5 +1,7 @@
using System;
using System.Collections.Generic;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
using System.Data;
using System.Linq;
using System.Text;
@@ -10,10 +12,18 @@ namespace WorkFlowCheck.Common.DTO
public class RoleCheckPointDTO
{
public int Id { get; set; }
+
+ [Required(ErrorMessage = "A szabály megadása kötelező.")]
+ [DisplayName("Szabály")]
public int RoleId { get; set; }
public RoleDTO? RoleDTO { get; set; } = null!;
+
+ [Required(ErrorMessage = "Az ellenőrzési pont megadása kötelező.")]
+ [DisplayName("Ellenőrzési pont")]
public int CheckPointId { get; set; }
public CheckPointDTO? CheckPointDTO { get; set; } = null!;
+
+ [DisplayName("Engedélyezve?")]
public bool Enabled { get; set; } = false;
}
}
diff --git a/src/WorkFlowCheck.Common/DTO/UserChangePassword2FADTO.cs b/src/WorkFlowCheck.Common/DTO/UserChangePassword2FADTO.cs
index d4f7cd9..f6522fe 100644
--- a/src/WorkFlowCheck.Common/DTO/UserChangePassword2FADTO.cs
+++ b/src/WorkFlowCheck.Common/DTO/UserChangePassword2FADTO.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@@ -16,9 +17,13 @@ namespace WorkFlowCheck.Common.DTO
[DisplayName("Régi jelszó")]
public string OldPassword { get; set; } = null!;
+ [Required(ErrorMessage = "A jelszó kötelező.")]
+ [RegularExpression(@"^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[\W_]).{6,}$", ErrorMessage = "Az új jelszónak legalább 6 karakter hosszúnak kell lennie, és tartalmaznia kell kis- és nagybetűt, számot és speciális karaktert.")]
[DisplayName("Új jelszó")]
public string NewPassword1 { get; set; } = null!;
+ [Required(ErrorMessage = "A jelszó kötelező.")]
+ [RegularExpression(@"^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[\W_]).{6,}$", ErrorMessage = "Az új jelszónak legalább 6 karakter hosszúnak kell lennie, és tartalmaznia kell kis- és nagybetűt, számot és speciális karaktert.")]
[DisplayName("Jelszó megerősítése")]
public string NewPassword2 { get; set; } = null!;
diff --git a/src/WorkFlowCheck.Common/DTO/UserDTO.cs b/src/WorkFlowCheck.Common/DTO/UserDTO.cs
index 705245b..3230ddf 100644
--- a/src/WorkFlowCheck.Common/DTO/UserDTO.cs
+++ b/src/WorkFlowCheck.Common/DTO/UserDTO.cs
@@ -25,9 +25,12 @@ namespace WorkFlowCheck.Common.DTO
[DisplayName("Felhasználó neve")]
public string UserName { get;set; } = null!;
+ [Required(ErrorMessage = "A jelszó kötelező.")]
+ [RegularExpression(@"^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[\W_]).{6,}$", ErrorMessage = "A jelszónak legalább 6 karakter hosszúnak kell lennie, és tartalmaznia kell kis- és nagybetűt, számot és speciális karaktert.")]
[DisplayName("Jelszó")]
- public string Password { get; set; }
-
+ public string Password { get; set; } = null!;
+
+
public string JwtToken { get; set; } = null!;
[DisplayName("Aktív")]
diff --git a/src/WorkFlowCheck.MAUI/Helper/SystemHelper.cs b/src/WorkFlowCheck.MAUI/Helper/SystemHelper.cs
index a07517b..b1d1405 100644
--- a/src/WorkFlowCheck.MAUI/Helper/SystemHelper.cs
+++ b/src/WorkFlowCheck.MAUI/Helper/SystemHelper.cs
@@ -19,7 +19,7 @@ namespace WorkFlowCheck.MAUI.Helper
public static string DatabaseName = "";
public static bool Syncronised = false;
public static UserDTO SystemUserDTO;
- public static string ProgramVersion = "v1.1.027";
+ public static string ProgramVersion = "v1.1.030";
#if DEBUG
public static string ApiBaseUrl = $"https://dev.wfcapi.nuvolar.hu/";
diff --git a/src/WorkFlowCheck.MAUI/Pages/CheckList/CheckListPage.xaml b/src/WorkFlowCheck.MAUI/Pages/CheckList/CheckListPage.xaml
index 1ceea00..9d8b944 100644
--- a/src/WorkFlowCheck.MAUI/Pages/CheckList/CheckListPage.xaml
+++ b/src/WorkFlowCheck.MAUI/Pages/CheckList/CheckListPage.xaml
@@ -38,7 +38,7 @@
-
+
@@ -63,7 +63,7 @@
CornerRadius="25"
VerticalOptions="Center" />
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
_isRefreshing;
@@ -64,6 +66,18 @@ public partial class CheckListPage : ContentPage
}
}
}
+ public bool IsRefreshingT
+ {
+ get => _isRefreshingT;
+ set
+ {
+ if (_isRefreshingT != value)
+ {
+ _isRefreshingT = value;
+ OnPropertyChanged(nameof(IsRefreshingT));
+ }
+ }
+ }
public CheckListPage()
{
@@ -79,6 +93,7 @@ public partial class CheckListPage : ContentPage
InfoCommand = new Command(OnInfoItem);
CloseCommand = new Command(OnCloseItem);
RefreshCommand = new Command(async () => await OnRefresh());
+ RefreshCommandT = new Command(async () => await OnRefreshT());
}
private async void OnSyncClicked(object sender, EventArgs e)
@@ -128,6 +143,16 @@ public partial class CheckListPage : ContentPage
IsRefreshing = false;
}
+ private async Task OnRefreshT()
+ {
+ IsRefreshingT = true;
+
+ //await _syncService.SyncCheckListHeader_Down((d, s) => { });
+
+ await LoadCheckListTemplate();
+
+ IsRefreshingT = false;
+ }
private void SetInfo()
{
_currentUser = _userService.GetCurrentUser();
diff --git a/src/WorkFlowCheck.Web/Helpers/AspForDataTypeTagHelper.cs b/src/WorkFlowCheck.Web/Helpers/AspForDataTypeTagHelper.cs
new file mode 100644
index 0000000..de3375e
--- /dev/null
+++ b/src/WorkFlowCheck.Web/Helpers/AspForDataTypeTagHelper.cs
@@ -0,0 +1,44 @@
+using Microsoft.AspNetCore.Mvc.ViewFeatures;
+using Microsoft.AspNetCore.Razor.TagHelpers;
+
+namespace WorkFlowCheck.Web.Helpers
+{
+ [HtmlTargetElement("input", Attributes = "asp-for-datatype")]
+ public class AspForDataTypeTagHelper : TagHelper
+ {
+ [HtmlAttributeName("asp-for-datatype")]
+ public ModelExpression For { get; set; }
+
+ public override void Process(TagHelperContext context, TagHelperOutput output)
+ {
+ if (For == null) return;
+
+ var type = For.ModelExplorer.ModelType;
+
+ string dataType = GetDataTypeString(type);
+ output.Attributes.SetAttribute("data-type", dataType);
+
+ // 🔥 EZ HIÁNYZIK → Rakd be!
+ output.Attributes.RemoveAll("asp-for-datatype");
+ }
+
+
+ private string GetDataTypeString(Type type)
+ {
+ // Nullable esetén nyerjük ki az alaptípust
+ if (Nullable.GetUnderlyingType(type) is Type underlyingType)
+ {
+ type = underlyingType;
+ }
+
+ if (type == typeof(string)) return "string";
+ if (type == typeof(int) || type == typeof(long) || type == typeof(float) ||
+ type == typeof(double) || type == typeof(decimal)) return "number";
+ if (type == typeof(bool)) return "bool";
+ if (type == typeof(DateTime)) return "date";
+
+ return "string"; // default fallback
+ }
+
+ }
+}
diff --git a/src/WorkFlowCheck.Web/Helpers/SystemHelper.cs b/src/WorkFlowCheck.Web/Helpers/SystemHelper.cs
index 40cb4a8..7519383 100644
--- a/src/WorkFlowCheck.Web/Helpers/SystemHelper.cs
+++ b/src/WorkFlowCheck.Web/Helpers/SystemHelper.cs
@@ -7,7 +7,7 @@ namespace WorkFlowCheck.Web.Helpers
public static class SystemHelper
{
public static string DatabaseName = "";
- public static string ProgramVersion = "v1.1.025";
+ public static string ProgramVersion = "v1.1.027";
public async static Task GetAPIInfoAsync(IConfiguration configuration)
{
diff --git a/src/WorkFlowCheck.Web/Pages/BaseStock/Equipments/EquipmentsPage.cshtml b/src/WorkFlowCheck.Web/Pages/BaseStock/Equipments/EquipmentsPage.cshtml
index ab5b443..1c7a0ff 100644
--- a/src/WorkFlowCheck.Web/Pages/BaseStock/Equipments/EquipmentsPage.cshtml
+++ b/src/WorkFlowCheck.Web/Pages/BaseStock/Equipments/EquipmentsPage.cshtml
@@ -79,7 +79,7 @@
$('#tbEquipmentsPage').on('click', '.delete-btn', function ()
{
const row = table.row($(this).closest('tr')).data();
- deleteEntity(table, '/BaseStock/Equipments/EquipmentPage?handler=DeleteEquipment', row.id);
+ deleteEntity(table, '/BaseStock/Equipments/EquipmentsPage?handler=DeleteEquipment', row.id);
});
}
diff --git a/src/WorkFlowCheck.Web/Pages/BaseStock/Locations/LocationsPage.cshtml b/src/WorkFlowCheck.Web/Pages/BaseStock/Locations/LocationsPage.cshtml
index b0cc1a8..649e0d0 100644
--- a/src/WorkFlowCheck.Web/Pages/BaseStock/Locations/LocationsPage.cshtml
+++ b/src/WorkFlowCheck.Web/Pages/BaseStock/Locations/LocationsPage.cshtml
@@ -17,14 +17,14 @@
| ID |
- Full name |
+ @DisplayNameHelper.GetDisplayName(nameof(LocationDTO.FullName), typeof(LocationDTO)) |
Action |
| ID |
- Full name |
+ @DisplayNameHelper.GetDisplayName(nameof(LocationDTO.FullName), typeof(LocationDTO)) |
Action |
diff --git a/src/WorkFlowCheck.Web/Pages/CheckList/CheckListHeader/CheckListHeaderEditPage.cshtml b/src/WorkFlowCheck.Web/Pages/CheckList/CheckListHeader/CheckListHeaderEditPage.cshtml
index 47e2a92..78f9c11 100644
--- a/src/WorkFlowCheck.Web/Pages/CheckList/CheckListHeader/CheckListHeaderEditPage.cshtml
+++ b/src/WorkFlowCheck.Web/Pages/CheckList/CheckListHeader/CheckListHeaderEditPage.cshtml
@@ -33,23 +33,23 @@