From 6583706db6f35056cdcf728d952bf3b53362f420 Mon Sep 17 00:00:00 2001 From: SamSys Date: Sun, 30 Mar 2025 18:33:51 +0330 Subject: [PATCH] Print & delet Permission Customizechekout ajax ug fixed --- .../Repository/RollCallMandatoryRepository.cs | 6 +- .../CheckoutTemporary.cshtml | 4 +- .../CheckoutTemporary.cshtml.cs | 12 ++- .../CheckoutUnofficial.cshtml | 2 +- .../CheckoutUnofficial.cshtml.cs | 9 ++- .../CustomizeCheckout/js/CheckoutTemporary.js | 80 ++++++++++++------- .../js/CheckoutUnofficial.js | 77 ++++++++++-------- 7 files changed, 119 insertions(+), 71 deletions(-) diff --git a/CompanyManagment.EFCore/Repository/RollCallMandatoryRepository.cs b/CompanyManagment.EFCore/Repository/RollCallMandatoryRepository.cs index 3f871b77..2c321f56 100644 --- a/CompanyManagment.EFCore/Repository/RollCallMandatoryRepository.cs +++ b/CompanyManagment.EFCore/Repository/RollCallMandatoryRepository.cs @@ -2417,9 +2417,9 @@ CreateWorkingHoursTemp command, bool holidayWorking) return new CustomizeCheckoutMandatoryViewModel() { MonthlySalary = dailyWage * mandatoryDays, - ShiftStatus = customizeWorkshopEmployeeSettings.WorkshopShiftStatus, - SettingSalary = customizeWorkshopEmployeeSettings.Salary, - DailyWage = dailyWage + //ShiftStatus = customizeWorkshopEmployeeSettings.WorkshopShiftStatus, + //SettingSalary = customizeWorkshopEmployeeSettings.Salary, + //DailyWage = dailyWage }; } diff --git a/ServiceHost/Areas/Client/Pages/Company/CustomizeCheckout/CheckoutTemporary.cshtml b/ServiceHost/Areas/Client/Pages/Company/CustomizeCheckout/CheckoutTemporary.cshtml index bcae97cc..ab430d45 100644 --- a/ServiceHost/Areas/Client/Pages/Company/CustomizeCheckout/CheckoutTemporary.cshtml +++ b/ServiceHost/Areas/Client/Pages/Company/CustomizeCheckout/CheckoutTemporary.cshtml @@ -453,7 +453,7 @@ - - - + ${response.printPermission === "true" ? ` + + + + + ` : ``} + + ${response.deletePermission === "true" ? ` + + + + ` : ``} +
- - - + + ` : ``} + ${response.deletePermission === "true" ? ` + + + + ` : ``} + + +
diff --git a/ServiceHost/wwwroot/AssetsClient/pages/CustomizeCheckout/js/CheckoutUnofficial.js b/ServiceHost/wwwroot/AssetsClient/pages/CustomizeCheckout/js/CheckoutUnofficial.js index 3518811f..d2446bc4 100644 --- a/ServiceHost/wwwroot/AssetsClient/pages/CustomizeCheckout/js/CheckoutUnofficial.js +++ b/ServiceHost/wwwroot/AssetsClient/pages/CustomizeCheckout/js/CheckoutUnofficial.js @@ -2,7 +2,7 @@ let $checkAll = $("#checkAll2"); let $checkboxes = $(".foo"); - + $checkAll.on("change", function () { $checkboxes.prop("checked", this.checked); @@ -150,7 +150,7 @@ $(document).on('click', '.btn-search-click', function (event) { const selectedMonth = $('#sendDropdownMonth').val(); const isYearMonthSelected = selectedYear === "0" && selectedMonth === "0"; - if (!isYearMonthSelected && (selectedYear === "0" || selectedMonth === "0") ) { + if (!isYearMonthSelected && (selectedYear === "0" || selectedMonth === "0")) { $('#dropdown-year').addClass("errored"); $('#dropdown-month').addClass("errored"); @@ -175,7 +175,7 @@ $(document).on('click', '.btn-search-click', function (event) { const endDate = $('.end-date').val(); const isStartEndDateSelected = startDate.trim() === "" && endDate.trim() === ""; - if (!isStartEndDateSelected && (startDate.trim() === "" || endDate.trim() === "") ) { + if (!isStartEndDateSelected && (startDate.trim() === "" || endDate.trim() === "")) { $('.start-date').addClass("errored"); $('.end-date').addClass("errored"); @@ -223,7 +223,7 @@ $(document).ready(function () { } else { $('.btn-clear-filter').addClass('disable'); } - if(filterStart !== '') { + if (filterStart !== '') { $('#start-date').text(filterStart); } if (filterEnd !== '') { @@ -1447,7 +1447,7 @@ function loadMore() {
${item.salaryAidDeduction}
-
+
مبلغ قابل پرداخت
${item.totalPayment} ریال
@@ -1481,41 +1481,43 @@ function loadMore() { ${item.contractEndFa}
- + ${response.printPermission === "true" ? ` - + + + + ` : ``} + ${response.deletePermission === "true" ? ` + + + ` : ``} + +
- - + + ` : ``} + ${response.deletePermission === "true" ? ` + + + + ` : ``} + +