From c60ce9cf366dc08a929cd9a6837099fe9db4cddb Mon Sep 17 00:00:00 2001 From: SamSys Date: Wed, 12 Feb 2025 18:47:57 +0330 Subject: [PATCH] insurance bug fixed - new permistion for adminWorkflow and cheker --- 0_Framework/Application/AuthHelper.cs | 2 +- 0_Framework/Application/Tools.cs | 6 +- .../InsuranceListApplication.cs | 4 +- .../Repository/ContractRepository.cs | 5 +- .../Repository/InsuranceListRepository.cs | 8 +-- .../Repository/LeftWorkInsuranceRepository.cs | 42 ++++++----- .../Repository/LeftWorkRepository.cs | 6 +- .../Pages/Accounts/Account/CreateRole.cshtml | 59 +++++++++++++--- .../Pages/Accounts/Account/EditRole.cshtml | 36 ++++++++++ .../Pages/Company/InsuranceList/Create.cshtml | 3 +- .../Pages/Company/InsuranceList/Edit.cshtml | 1 + .../InsuranceList/EmployeeDatatable.cshtml | 4 +- .../Company/InsuranceList/Index.cshtml.cs | 2 +- .../Areas/Admin/Pages/Shared/_Menu.cshtml | 18 ++++- .../Areas/AdminNew/Pages/Shared/_Menu.cshtml | 18 ++++- .../InsuranceList/11/1403_10/DSKKAR00.dbf | Bin 1414 -> 1414 bytes .../InsuranceList/11/1403_10/DSKWOR00.dbf | Bin 13082 -> 13082 bytes .../InsuranceList/396/1403_10/DSKKAR00.dbf | Bin 0 -> 1414 bytes .../InsuranceList/396/1403_10/DSKWOR00.dbf | Bin 0 -> 4526 bytes .../InsuranceList/537/1403_10/DSKKAR00.dbf | Bin 0 -> 1414 bytes .../InsuranceList/537/1403_10/DSKWOR00.dbf | Bin 0 -> 3100 bytes .../wwwroot/AssetsAdminNew/Tasks/js/Index.js | 6 +- .../pages/RollCall/css/CaseHistory.css | 2 +- .../pages/RollCall/js/CaseHistory.js | 8 +-- .../pages/RollCall/js/LeaveCreate.js | 65 +++--------------- 25 files changed, 184 insertions(+), 111 deletions(-) create mode 100644 ServiceHost/InsuranceList/396/1403_10/DSKKAR00.dbf create mode 100644 ServiceHost/InsuranceList/396/1403_10/DSKWOR00.dbf create mode 100644 ServiceHost/InsuranceList/537/1403_10/DSKKAR00.dbf create mode 100644 ServiceHost/InsuranceList/537/1403_10/DSKWOR00.dbf diff --git a/0_Framework/Application/AuthHelper.cs b/0_Framework/Application/AuthHelper.cs index a2344b47..6a2f6e81 100644 --- a/0_Framework/Application/AuthHelper.cs +++ b/0_Framework/Application/AuthHelper.cs @@ -96,7 +96,7 @@ public class AuthHelper : IAuthHelper claimsIdentity.AddClaim(new Claim("WorkshopSlug", newWorkshopSlug)); - claimsIdentity.AddClaim(new Claim("workshopName", newWorkshopName)); + claimsIdentity.AddClaim(new Claim("WorkshopName", newWorkshopName)); var authProperties = new AuthenticationProperties diff --git a/0_Framework/Application/Tools.cs b/0_Framework/Application/Tools.cs index c983cb61..76e8c4e5 100644 --- a/0_Framework/Application/Tools.cs +++ b/0_Framework/Application/Tools.cs @@ -82,9 +82,9 @@ public static class Tools case 40469://ثابت countDays = 7; break; - case 9950://ثابت - countDays = 15; - break; + //case 9950://ثابت + // countDays = 15; + //break; case 9640://ثابت countDays = 15; break; diff --git a/CompanyManagment.Application/InsuranceListApplication.cs b/CompanyManagment.Application/InsuranceListApplication.cs index 46128af0..43338b16 100644 --- a/CompanyManagment.Application/InsuranceListApplication.cs +++ b/CompanyManagment.Application/InsuranceListApplication.cs @@ -1886,8 +1886,8 @@ public class InsuranceListApplication: IInsuranceListApplication case 40469://ثابت countWorkingDays = 7; break; - case 9950://ثابت - countWorkingDays = 15; + //case 9950://ثابت + // countWorkingDays = 15; break; case 9640://ثابت countWorkingDays = 15; diff --git a/CompanyManagment.EFCore/Repository/ContractRepository.cs b/CompanyManagment.EFCore/Repository/ContractRepository.cs index d4809b95..86467dc9 100644 --- a/CompanyManagment.EFCore/Repository/ContractRepository.cs +++ b/CompanyManagment.EFCore/Repository/ContractRepository.cs @@ -690,12 +690,13 @@ public class ContractRepository : RepositoryBase, IContractRepos }; var leftworkList = _leftWorkRepository.search(searchModel); - if(leftworkList.Count == 0) + var lastLeftWork = leftworkList.FirstOrDefault(x => contractStart <= x.LeftWorkDateGr && ContractEnd >= x.StartWorkDateGr); + if (leftworkList.Count == 0 || lastLeftWork == null) return new ContractSeparationViewModel() { checker = false }; - var lastLeftWork = leftworkList.FirstOrDefault(x=>contractStart <= x.LeftWorkDateGr && ContractEnd >= x.StartWorkDateGr); + //if (lastLeftWork.StartWorkDateGr > contractStart) // lastLeftWork = leftworkList.FirstOrDefault(x => // x.StartWorkDateGr <= contractStart && x.LeftWorkDateGr > contractStart); diff --git a/CompanyManagment.EFCore/Repository/InsuranceListRepository.cs b/CompanyManagment.EFCore/Repository/InsuranceListRepository.cs index c4df88a4..86816729 100644 --- a/CompanyManagment.EFCore/Repository/InsuranceListRepository.cs +++ b/CompanyManagment.EFCore/Repository/InsuranceListRepository.cs @@ -376,11 +376,11 @@ public class InsuranceListRepository : RepositoryBase, IIns insurance => insurance.WorkshopId, workshop => workshop.id, (insurance, workshop) => new { insurance, workshop }) - .Join(_context.WorkshopEmployers, + .GroupJoin(_context.WorkshopEmployers, result => result.workshop.id, employer => employer.WorkshopId, (result, employer) => new { result.insurance, result.workshop, employer }) - .Select(result => new InsuranceListViewModel + .Select(result => new InsuranceListViewModel { Id = result.insurance.id, Year = result.insurance.Year, @@ -399,10 +399,10 @@ public class InsuranceListRepository : RepositoryBase, IIns City = "", ConfirmSentlist = result.insurance.ConfirmSentlist, IsBlockCantracingParty = _context.PersonalContractingParties - .Where(p => p.Employers.Any(e => e.id == result.employer.EmployerId)) + .Where(p => p.Employers.Any(e => e.id == result.employer.First().EmployerId)) .Select(p => p.IsBlock) .FirstOrDefault(), - EmployerId = result.employer.EmployerId + EmployerId = result.employer.First().EmployerId }); diff --git a/CompanyManagment.EFCore/Repository/LeftWorkInsuranceRepository.cs b/CompanyManagment.EFCore/Repository/LeftWorkInsuranceRepository.cs index 9cbe1fc6..4255f632 100644 --- a/CompanyManagment.EFCore/Repository/LeftWorkInsuranceRepository.cs +++ b/CompanyManagment.EFCore/Repository/LeftWorkInsuranceRepository.cs @@ -165,11 +165,11 @@ public class LeftWorkInsuranceRepository : RepositoryBase x.EmployeeId == employeeId && x.WorkshopId == workshopId).ToList(); if (list != null && list.Count > 0) _context.LeftWorkInsuranceList.RemoveRange(list); @@ -529,8 +529,9 @@ public class LeftWorkInsuranceRepository : RepositoryBase - x.EmployeeId == employeeId && x.InsuranceListId == item.id && - x.StartWorkDate.Date < date.Date).FirstOrDefault(); - if (insurance!=null) - { - var insuranceListObj= insuranceList.FirstOrDefault(x => x.id == item.id); - string resulDate= insuranceListObj.Month.ToFarsiMonthByNumber() + " " + insuranceListObj.Year; - return op.Failed(" به دلیل استفاده این تاریخ در ایجاد لیست بیمه، ویرایش تاریخ قبل از تاریخ " + resulDate + " امکان پذیر می باشد. "); - } + //TempChange + // بصورت موقت کامنت شد + + //var insurance = _context.EmployeeInsurancListDataSet.Where(x => + // x.EmployeeId == employeeId && x.InsuranceListId == item.id && + // x.StartWorkDate.Date < date.Date).FirstOrDefault(); + //if (insurance!=null) + //{ + // var insuranceListObj= insuranceList.FirstOrDefault(x => x.id == item.id); + // string resulDate= insuranceListObj.Month.ToFarsiMonthByNumber() + " " + insuranceListObj.Year; + // return op.Failed(" به دلیل استفاده این تاریخ در ایجاد لیست بیمه، ویرایش تاریخ قبل از تاریخ " + resulDate + " امکان پذیر می باشد. "); + //} } else @@ -647,12 +651,14 @@ public class LeftWorkInsuranceRepository : RepositoryBase, ILeftWorkRepos var entity = _context.LeftWorkList.FirstOrDefault(x => x.WorkshopId == workshopId && x.EmployeeId == employeeId && (x.StartWorkDate <= dateTime && x.LeftWorkDate >= dateTime)); - return new() + if (entity == null) + { + return null; + } + return new() { EmployeeId = entity.EmployeeId, WorkshopId = entity.WorkshopId, diff --git a/ServiceHost/Areas/Admin/Pages/Accounts/Account/CreateRole.cshtml b/ServiceHost/Areas/Admin/Pages/Accounts/Account/CreateRole.cshtml index 548dee03..8cfdacd8 100644 --- a/ServiceHost/Areas/Admin/Pages/Accounts/Account/CreateRole.cshtml +++ b/ServiceHost/Areas/Admin/Pages/Accounts/Account/CreateRole.cshtml @@ -704,21 +704,58 @@ @* بیمه *@
- + - - @*لیست مشاغل مقطوع*@ -
- - + + @*لیست مشاغل مقطوع*@ +
+ + -
+
+ + @* کارپوشه *@ +
+ + + + + + @*
+ + + +
*@ + +
+ @* بررسی مدارک پرسنل *@ +
+ + + + + + @*
+ + + +
*@ + +
+@* کارپوشه *@ +
+ + + + + + @*
+ + + +
*@ + +
+@* بررسی مدارک پرسنل *@ +
+ + + + + + @*
+ + + +
*@ + +
diff --git a/ServiceHost/Areas/Admin/Pages/Company/InsuranceList/Create.cshtml b/ServiceHost/Areas/Admin/Pages/Company/InsuranceList/Create.cshtml index 9809a744..725e0211 100644 --- a/ServiceHost/Areas/Admin/Pages/Company/InsuranceList/Create.cshtml +++ b/ServiceHost/Areas/Admin/Pages/Company/InsuranceList/Create.cshtml @@ -757,7 +757,8 @@ $(this).find('td:eq(7)').attr('data-monthlybenefits', benefitsIncludedContinuous); $(this).find('td:eq(8)').text($('#hiddenMonthlySalaryPlusBaseYear').val()); - $(this).find('td:eq(8)').attr("data-monthlysalary", monthlySalaryPlusBaseyear); + $(this).find('td:eq(8)').attr("data-monthlysalary", monthlySalaryPlusBaseyear); + $(this).find('td:eq(8)').attr("data-MonthlySalaryPlusBaseyear", monthlySalaryPlusBaseyear); $(this).find('td:eq(11)').text($('#DailyWage').val()); $(this).find('td:eq(11)').attr("data-dailywage", getNumberValue($('#DailyWage').val())); diff --git a/ServiceHost/Areas/Admin/Pages/Company/InsuranceList/Edit.cshtml b/ServiceHost/Areas/Admin/Pages/Company/InsuranceList/Edit.cshtml index 44d23c0a..3b51a3c8 100644 --- a/ServiceHost/Areas/Admin/Pages/Company/InsuranceList/Edit.cshtml +++ b/ServiceHost/Areas/Admin/Pages/Company/InsuranceList/Edit.cshtml @@ -700,6 +700,7 @@ $(this).find('td:eq(8)').text($('#hiddenMonthlySalaryPlusBaseYear').val()); $(this).find('td:eq(8)').attr("data-monthlysalary", monthlySalaryPlusBaseyear); + $(this).find('td:eq(8)').attr("data-MonthlySalaryPlusBaseyear", monthlySalaryPlusBaseyear); $(this).find('td:eq(11)').text($('#DailyWage').val()); $(this).find('td:eq(11)').attr("data-dailywage", getNumberValue($('#DailyWage').val())); diff --git a/ServiceHost/Areas/Admin/Pages/Company/InsuranceList/EmployeeDatatable.cshtml b/ServiceHost/Areas/Admin/Pages/Company/InsuranceList/EmployeeDatatable.cshtml index 9795c8f9..c1b8cd1f 100644 --- a/ServiceHost/Areas/Admin/Pages/Company/InsuranceList/EmployeeDatatable.cshtml +++ b/ServiceHost/Areas/Admin/Pages/Company/InsuranceList/EmployeeDatatable.cshtml @@ -169,11 +169,11 @@ 0 0 0 - 0 + 0 0 0 0 - 0 + 0 @item.IdNumber @item.DateOfBirth @item.PlaceOfIssue diff --git a/ServiceHost/Areas/Admin/Pages/Company/InsuranceList/Index.cshtml.cs b/ServiceHost/Areas/Admin/Pages/Company/InsuranceList/Index.cshtml.cs index 7484e4dd..94c63264 100644 --- a/ServiceHost/Areas/Admin/Pages/Company/InsuranceList/Index.cshtml.cs +++ b/ServiceHost/Areas/Admin/Pages/Company/InsuranceList/Index.cshtml.cs @@ -934,7 +934,7 @@ public class IndexModel : PageModel dailyWag = "0", dailyWagePlusBaseYear = "0", marriedAllowance = "0", - baseYesr = "0", + baseYears = "0", }); diff --git a/ServiceHost/Areas/Admin/Pages/Shared/_Menu.cshtml b/ServiceHost/Areas/Admin/Pages/Shared/_Menu.cshtml index 8a30cba1..5eea31bb 100644 --- a/ServiceHost/Areas/Admin/Pages/Shared/_Menu.cshtml +++ b/ServiceHost/Areas/Admin/Pages/Shared/_Menu.cshtml @@ -416,7 +416,23 @@ - +
  • + + + +
  • + +
  • + + + +
  • diff --git a/ServiceHost/Areas/AdminNew/Pages/Shared/_Menu.cshtml b/ServiceHost/Areas/AdminNew/Pages/Shared/_Menu.cshtml index 838f925e..8059d0a3 100644 --- a/ServiceHost/Areas/AdminNew/Pages/Shared/_Menu.cshtml +++ b/ServiceHost/Areas/AdminNew/Pages/Shared/_Menu.cshtml @@ -624,7 +624,23 @@ - +
  • + + + +
  • + +
  • + + + +
  • diff --git a/ServiceHost/InsuranceList/11/1403_10/DSKKAR00.dbf b/ServiceHost/InsuranceList/11/1403_10/DSKKAR00.dbf index e213a8002b75588cef4234fda5160b8b8dafef0a..46f0d395fa36723e21b2c83c4304455e4efc2aa0 100644 GIT binary patch delta 139 zcmYj~yA6Oa3`85K(lLQY@Hg0d(bHuC7GXJh>_|vl^>n(=XrtZFa;hVw)L2l30Z5!U t0*xO&h&9tuT@dST;j;@S#vXg^u)w@YEY%{bc*pBlw-?yR8vy_S delta 139 zcmYj~yA6Oa5JMZN=$PO}xL=alnU8W@_J8CsYaC@3f(vlSG~4ULSAjVw27a(b{%&J^LF o{7;ex1MlIJnEXRhcQYeDha9top~2*hD$ delta 114 zcmbQ0HY;tzGY)5C129kk0!t%9INQhqE^cUK02fDQD=1i)7?=Zizc89QZVdq~-6aiCJ5jm1ubz$NU z;1B4~v15ly9Z*F`Y9rO~-c``3+;yUFxSYSA_v_wE`+cj`(ljk-cOT%-KNe-Zoj4M5 zNPdrRc@XD8(nUF3!{e=lzYYco@plRyM1zd@v4ZzvP91O;8=xLmjp`4FLg605+m9fg zP<4!drQlm}mh)5#*O5OFt~Uq8M{yRS5^f@wy^n8;0{js9!<$fXqxd`$1LU8PKa%l5 zn!dsQz9{PFNwA4w{HvN{xW{lr}K7j`7^ z#It_7oprU)m++_HGv+w9?s)#PDSs}Y9$y?(#W~!MUCpYZIfrSp*n#x3g2h;PI n<$Cl0U1y%l@KfY84d3+*(hUSqwYAypDH#9qBy{BwsPLY literal 0 HcmV?d00001 diff --git a/ServiceHost/InsuranceList/396/1403_10/DSKWOR00.dbf b/ServiceHost/InsuranceList/396/1403_10/DSKWOR00.dbf new file mode 100644 index 0000000000000000000000000000000000000000..d0d0faa893b5a99a60235df947e31d5891aa02bf G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q|1@-id+^YVW4{^ZT;)SuUCbxD%m)jwQ-sLE!Xb}PqMB7znW}4{YmpPG+5W+rzrnT z(P%rsZvcOUJ9C2mt&Beddl9!Y{-cDuHdF`k??3~v#=NBUby^ni2f&NsyLO|8^}Ppv zDenwA`ZqKFv4s21UG%a(0mrk-3;K&j4^7r*;6?rMtWLte057V~&+6zXk~&To&&Tp?$$AC6=zLrO(*yb6059r~-|@D6 zM-p!f_!cp#Y$)7hhDl^bDI-gPS5;+-O2{-0BQhVylO@}{vWS9cL>9AnGTeOdEaEgi z?uUausq#xSWu^QV`{Bxal`l-z7*&{gxCedghjAa1&Bwunga={pv%1twp)%#Cvm?_a z7dH)!(nL2*)c`fod7>pcWBSsb*9kGWOu?B@${{#cVLnwImfU=jG>eLHVQ2XuGiJyN zXBr{FERL#cLmGJz#bYvmIT?_Xqi`~+B;Dfo*IDp7s&urV<&V1I+#V|B-{_aWewT%atPOb x^y~Yk!>+{RaK&i4rf0``wl}iQ8RztT203>lXLn`Vmvr3zSI=(bwXPOK`vbGQ-Yx(D literal 0 HcmV?d00001 diff --git a/ServiceHost/wwwroot/AssetsAdminNew/Tasks/js/Index.js b/ServiceHost/wwwroot/AssetsAdminNew/Tasks/js/Index.js index 46589cde..a35f5af9 100644 --- a/ServiceHost/wwwroot/AssetsAdminNew/Tasks/js/Index.js +++ b/ServiceHost/wwwroot/AssetsAdminNew/Tasks/js/Index.js @@ -1324,7 +1324,11 @@ $(window).scroll(function () { } else if ($('#btnTaskTicket').hasClass('active')) { loadMore('ticket'); } else if ($('#btnTaskRequest').hasClass('active')) { - loadMore('request'); + loadMoreRequest('request'); + } else if ($('#btnTicketList').hasClass('active')) { + loadMore('TasksHaveTicket'); + } else if ($('#btnTicketRequestList').hasClass('active')) { + loadMoreRequest('TaskHaveTicketRequests') } } }); diff --git a/ServiceHost/wwwroot/AssetsClient/pages/RollCall/css/CaseHistory.css b/ServiceHost/wwwroot/AssetsClient/pages/RollCall/css/CaseHistory.css index 350323b4..0f0d86ab 100644 --- a/ServiceHost/wwwroot/AssetsClient/pages/RollCall/css/CaseHistory.css +++ b/ServiceHost/wwwroot/AssetsClient/pages/RollCall/css/CaseHistory.css @@ -79,7 +79,7 @@ padding: 3px 1px; color: #d97706; margin: auto 1px auto 2px; - background: rgba(217, 119, 6, 0.18); + background: #fef3c7; transition: ease .2s; } diff --git a/ServiceHost/wwwroot/AssetsClient/pages/RollCall/js/CaseHistory.js b/ServiceHost/wwwroot/AssetsClient/pages/RollCall/js/CaseHistory.js index e4c6b0c6..b762d8e9 100644 --- a/ServiceHost/wwwroot/AssetsClient/pages/RollCall/js/CaseHistory.js +++ b/ServiceHost/wwwroot/AssetsClient/pages/RollCall/js/CaseHistory.js @@ -461,7 +461,7 @@ function caseHistoryLoadAjax() {
    عملیات:
    -
    -