diff --git a/src/WorkFlowCheck.API/Downloads/APK/com.nuvolar.wfcapp-Signed.apk b/src/WorkFlowCheck.API/Downloads/APK/com.nuvolar.wfcapp-Signed.apk index 3f19e33..d928926 100644 Binary files a/src/WorkFlowCheck.API/Downloads/APK/com.nuvolar.wfcapp-Signed.apk and b/src/WorkFlowCheck.API/Downloads/APK/com.nuvolar.wfcapp-Signed.apk differ diff --git a/src/WorkFlowCheck.API/Pdf/515590b6-79a6-43fe-a866-4e6d099fc7d3.docx b/src/WorkFlowCheck.API/Pdf/515590b6-79a6-43fe-a866-4e6d099fc7d3.docx new file mode 100644 index 0000000..d1f06b2 Binary files /dev/null and b/src/WorkFlowCheck.API/Pdf/515590b6-79a6-43fe-a866-4e6d099fc7d3.docx differ diff --git a/src/WorkFlowCheck.BL/Services/SyncService.cs b/src/WorkFlowCheck.BL/Services/SyncService.cs index 5b1151a..989e951 100644 --- a/src/WorkFlowCheck.BL/Services/SyncService.cs +++ b/src/WorkFlowCheck.BL/Services/SyncService.cs @@ -426,12 +426,14 @@ namespace WorkFlowCheck.BL.Services row.Answer = dtoRow.Answer; if (dtoRow.Photo != null && dtoRow.Photo.Length > 0) { + string imageDirectory = Path.Combine(Directory.GetCurrentDirectory(), "Images"); var timestamp = DateTime.Now.ToString("yyyyMMdd_HHmmss"); var fileName = $"PH_{timestamp}_{row.CheckListHeaderId}_{row.Id}.jpeg"; row.PhotoFileName = fileName; var filePath = Path.Combine(imageDirectory, fileName); await File.WriteAllBytesAsync(filePath, dtoRow.Photo); + row.Answer = fileName; } } } @@ -480,16 +482,7 @@ namespace WorkFlowCheck.BL.Services retVal = true; break; } - if (row.CheckListTemplateRowDTO.AnswerType == "SI-N" && row.Answer == "Igen") - { - retVal = true; - break; - } - if (row.CheckListTemplateRowDTO.AnswerType == "I-SN" && row.Answer == "Nem") - { - retVal = true; - break; - } + } } } @@ -501,18 +494,18 @@ namespace WorkFlowCheck.BL.Services { var retVal = false; - if (checkListHeaderDTO !=null && checkListHeaderDTO.CheckListRowDTO !=null && checkListHeaderDTO.CheckListRowDTO.Count > 0) + if (checkListHeaderDTO != null && checkListHeaderDTO.CheckListRowDTO != null && checkListHeaderDTO.CheckListRowDTO.Count > 0) { var totalRowCount = checkListHeaderDTO.CheckListRowDTO.Where(w => w.CheckListTemplateRowDTO.AnswerType != "PN" && w.CheckListTemplateRowDTO.CheckPointDTO.IsEnabled == true).Count(); var answeredCount = checkListHeaderDTO.CheckListRowDTO.Where(w => w.CheckListTemplateRowDTO.AnswerType != "PN" && w.CheckListTemplateRowDTO.CheckPointDTO.IsEnabled == true && - string.IsNullOrEmpty(w.Answer) != false).Count(); + string.IsNullOrEmpty(w.Answer) != true).Count(); - if (totalRowCount != answeredCount) { retVal = true; } + if (totalRowCount == answeredCount) { retVal = true; } } - + return retVal; } diff --git a/src/WorkFlowCheck.BL/Services/UserService.cs b/src/WorkFlowCheck.BL/Services/UserService.cs index 0c48b45..da78b07 100644 --- a/src/WorkFlowCheck.BL/Services/UserService.cs +++ b/src/WorkFlowCheck.BL/Services/UserService.cs @@ -198,7 +198,13 @@ namespace WorkFlowCheck.BL.Services user.FirstName = userDTO.FirstName; user.LastName = userDTO.LastName; user.Email = userDTO.Email; + user.NFCActive = userDTO.NFCActive; + user.NFCCode = userDTO.NFCCode; user.JwtToken = ""; + user.Token2FA = ""; + user.IsDeleted = false; + user.Active = userDTO.Active; + user.PasswordHash = PasswordHasher.HashPassword(userDTO.Password); @@ -218,6 +224,8 @@ namespace WorkFlowCheck.BL.Services user.FirstName = userDTO.FirstName; user.LastName = userDTO.LastName; user.Email = userDTO.Email; + user.Active = userDTO.Active; + user.NFCActive = userDTO.NFCActive; await _dbContext.SaveChangesAsync(); retVal = _mapper.Map(user); diff --git a/src/WorkFlowCheck.Common/DTO/UserDTO.cs b/src/WorkFlowCheck.Common/DTO/UserDTO.cs index 9b760fa..f43bb95 100644 --- a/src/WorkFlowCheck.Common/DTO/UserDTO.cs +++ b/src/WorkFlowCheck.Common/DTO/UserDTO.cs @@ -33,7 +33,10 @@ namespace WorkFlowCheck.Common.DTO [DisplayName("NFC belépés")] public bool NFCActive { get; set; } - + + [DisplayName("NFC kód")] + public string NFCCode { get; set; } = null!; + public ICollection? RoleDTO { get; set; } = new List(); } } diff --git a/src/WorkFlowCheck.Web/Pages/UserAndRole/UserEditPage.cshtml b/src/WorkFlowCheck.Web/Pages/UserAndRole/UserEditPage.cshtml index 6c45c0a..c13a8a5 100644 --- a/src/WorkFlowCheck.Web/Pages/UserAndRole/UserEditPage.cshtml +++ b/src/WorkFlowCheck.Web/Pages/UserAndRole/UserEditPage.cshtml @@ -18,6 +18,8 @@ + +
@@ -27,10 +29,17 @@
@if (Model.UserDTO.Id == 0) { -
- - - +
+
+ + + +
+
+ + + +
}
diff --git a/src/WorkFlowCheck.Web/Program.cs b/src/WorkFlowCheck.Web/Program.cs index 25f4019..565a7b2 100644 --- a/src/WorkFlowCheck.Web/Program.cs +++ b/src/WorkFlowCheck.Web/Program.cs @@ -82,7 +82,7 @@ if (!app.Environment.IsDevelopment()) app.UseHsts(); } -app.UseHttpsRedirection(); +//app.UseHttpsRedirection(); app.UseStaticFiles(); app.UseRouting();