From 2732ec09b29e2697f573b03999f3e566820c4fe5 Mon Sep 17 00:00:00 2001 From: MahanCh Date: Sat, 23 Aug 2025 13:11:10 +0330 Subject: [PATCH 1/2] fix: sort payment transactions by creation date --- .../Repository/PaymentTransactionRepository.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CompanyManagment.EFCore/Repository/PaymentTransactionRepository.cs b/CompanyManagment.EFCore/Repository/PaymentTransactionRepository.cs index 91805e05..0b53caf1 100644 --- a/CompanyManagment.EFCore/Repository/PaymentTransactionRepository.cs +++ b/CompanyManagment.EFCore/Repository/PaymentTransactionRepository.cs @@ -57,7 +57,7 @@ public class PaymentTransactionRepository : RepositoryBase x.CreationDate) .AsNoTracking() .Skip(searchModel.PageIndex) .Take(30) @@ -83,7 +83,6 @@ var matchedBankAccounts = (await _companyContext.ContractingPartyBankAccounts.Wh // 4. ساختن خروجی var result = paymentTransactionsData - .OrderByDescending(x => x.CreationDate) .Select(x => { var prefix = x.CardNumber?.Substring(0, 4); From 5e7bfe06344ec4fa948f4d6f98f68220acf83724 Mon Sep 17 00:00:00 2001 From: MahanCh Date: Sat, 23 Aug 2025 16:22:26 +0330 Subject: [PATCH 2/2] fix: improve case history data handling and add debugging logs --- .../AssetsClient/pages/RollCall/js/CaseHistory.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/ServiceHost/wwwroot/AssetsClient/pages/RollCall/js/CaseHistory.js b/ServiceHost/wwwroot/AssetsClient/pages/RollCall/js/CaseHistory.js index 910675df..8e8a9eb1 100644 --- a/ServiceHost/wwwroot/AssetsClient/pages/RollCall/js/CaseHistory.js +++ b/ServiceHost/wwwroot/AssetsClient/pages/RollCall/js/CaseHistory.js @@ -295,6 +295,8 @@ $(".date").on('input', function () { }).mask("0000/00/00"); function caseHistoryLoadAjax() { + debugger; + console.log(hasData +"111"); var filterEmployeeId = 0; var filterStart = ""; @@ -342,10 +344,10 @@ function caseHistoryLoadAjax() { data: data, headers: { "RequestVerificationToken": antiForgeryToken }, success: function (response) { + debugger; var caseHistoryData = response.data; var caseHistoryEmployeeData = response.dataEmployee; - - + if (response.isSuccedded) { if (caseHistoryData == null) { @@ -674,7 +676,7 @@ function caseHistoryLoadAjax() { hasData = false; } } else { - if (caseHistoryData.dateFa !== null) { + if (caseHistoryData?.dateFa !== null&&caseHistoryData.activeEmployees.length>0) { $('#dateFaEmployee').hide(); html += ` @@ -959,7 +961,8 @@ function caseHistoryLoadAjax() { hasData = false; } } - } else { + } + else { hasData = false; } @@ -981,6 +984,7 @@ function loadUntilHeightExceeds() { } if (hasData) { + console.log(hasData); loadUntilHeightExceeds(); }