From a9c5c8f8ca9c1f87d480bfbb752c028eeda6d494 Mon Sep 17 00:00:00 2001 From: MahanCh Date: Sat, 10 May 2025 14:08:18 +0330 Subject: [PATCH] fix js bugs --- .../ModalCreateAccountSetting.cshtml | 3 - .../RollCall/WorkshopSetting/Index.cshtml | 6 +- .../Client/Pages/Shared/_ClientLayout.cshtml | 7 +- .../AssetsClient/pages/Loan/js/Index.js | 150 +++++++------- .../CameraAccounts/js/ModalCameraAccount.js | 187 ++++++++++++++++++ 5 files changed, 271 insertions(+), 82 deletions(-) create mode 100644 ServiceHost/wwwroot/AssetsClient/pages/RollCall/CameraAccounts/js/ModalCameraAccount.js diff --git a/ServiceHost/Areas/Client/Pages/Company/RollCall/CameraAccounts/_Partials/ModalCreateAccountSetting.cshtml b/ServiceHost/Areas/Client/Pages/Company/RollCall/CameraAccounts/_Partials/ModalCreateAccountSetting.cshtml index c12507a3..ad65804d 100644 --- a/ServiceHost/Areas/Client/Pages/Company/RollCall/CameraAccounts/_Partials/ModalCreateAccountSetting.cshtml +++ b/ServiceHost/Areas/Client/Pages/Company/RollCall/CameraAccounts/_Partials/ModalCreateAccountSetting.cshtml @@ -164,8 +164,5 @@ var antiForgeryToken = $('@Html.AntiForgeryToken()').val(); var checkAccountAjax = `@Url.Page("./Index", "CheckAccount")`; var saveCreateCameraAccountUrl = `@Url.Page("./Index", "CreateCameraAccount")`; - - console.log(checkAccountAjax); - console.log(saveCreateCameraAccountUrl); \ No newline at end of file diff --git a/ServiceHost/Areas/Client/Pages/Company/RollCall/WorkshopSetting/Index.cshtml b/ServiceHost/Areas/Client/Pages/Company/RollCall/WorkshopSetting/Index.cshtml index 2dbc3868..ce35ebdd 100644 --- a/ServiceHost/Areas/Client/Pages/Company/RollCall/WorkshopSetting/Index.cshtml +++ b/ServiceHost/Areas/Client/Pages/Company/RollCall/WorkshopSetting/Index.cshtml @@ -216,7 +216,7 @@ { @foreach (var item in Model.WorkshopSettingsDetails.ShiftsList.OrderBy(x => x.Placement)) { -
+
@if (item.Placement == ShiftPlacement.First) { @@ -257,7 +257,7 @@ } else { -
+
مجموعه بدون وقفه و بصورت مستمر فعال می‌باشد
} @@ -265,7 +265,7 @@ else { -
+
نوبت اول diff --git a/ServiceHost/Areas/Client/Pages/Shared/_ClientLayout.cshtml b/ServiceHost/Areas/Client/Pages/Shared/_ClientLayout.cshtml index 2a443eca..ccd0e369 100644 --- a/ServiceHost/Areas/Client/Pages/Shared/_ClientLayout.cshtml +++ b/ServiceHost/Areas/Client/Pages/Shared/_ClientLayout.cshtml @@ -110,6 +110,11 @@ var ajaxServiceLayout = new AjaxService(antiForgeryTokenLayout); $(document).ready(function () { + statusCameraAccountAndWorkshopSetting(); + }); + + function statusCameraAccountAndWorkshopSetting() + { ajaxServiceLayout.get(statusCameraAccountAndWorkshopSettingUrl) .then(response => { const disableIds = [ @@ -137,7 +142,7 @@ $('#RollCallSubMenu').addClass('disable'); } }); - }); + } $('#MainModal').on('hidden.bs.modal', function () { $("#ModalContent").html(""); diff --git a/ServiceHost/wwwroot/AssetsClient/pages/Loan/js/Index.js b/ServiceHost/wwwroot/AssetsClient/pages/Loan/js/Index.js index 217d4958..812e2dae 100644 --- a/ServiceHost/wwwroot/AssetsClient/pages/Loan/js/Index.js +++ b/ServiceHost/wwwroot/AssetsClient/pages/Loan/js/Index.js @@ -41,70 +41,70 @@ $(document).ready(function () { element.val(value); }); - new Cleave(this', { + new Cleave(this, { delimiters: ['/', '/'], blocks: [4, 2, 2], numericOnly: true }); - // new Cleave(this, { - // date: true, - // delimiter: '/', - // datePattern: ['Y', 'm', 'd'] - // }); - }); + // new Cleave(this, { + // date: true, + // delimiter: '/', + // datePattern: ['Y', 'm', 'd'] + // }); +}); - //******************** انتخاب همه ی چک باکس ها ******************** - $(".checkAll").change(function () { - //let dataValYear = $('#year').val(); - //let dataValMonth = $('#month').val(); - //let dataValPersonel = Number($('#employeeId').val()); +//******************** انتخاب همه ی چک باکس ها ******************** +$(".checkAll").change(function () { + //let dataValYear = $('#year').val(); + //let dataValMonth = $('#month').val(); + //let dataValPersonel = Number($('#employeeId').val()); - //if ((dataValYear == '' || dataValMonth == '') && dataValPersonel == 0) { - //$('#dropdown-year').addClass("errored"); - //$('#dropdown-month').addClass("errored"); + //if ((dataValYear == '' || dataValMonth == '') && dataValPersonel == 0) { + //$('#dropdown-year').addClass("errored"); + //$('#dropdown-month').addClass("errored"); - //$(this).prop('checked', false); - //$('.alert-msg').show(); - //$('.alert-msg p').text('جهت انتخاب گروهی قراردادها ابتدا میبایست سال و ماه مورد نظر را انتخاب نمائید.'); - //setTimeout(function () { - // $('.alert-msg').hide(); - // $('.alert-msg p').text(''); - // $('#dropdown-year').removeClass("errored"); - // $('#dropdown-month').removeClass("errored"); - //}, - //3500); - //} else { - //loadAllToPrint(); - $('input:checkbox').not(this).not("#group, #list").prop('checked', this.checked); + //$(this).prop('checked', false); + //$('.alert-msg').show(); + //$('.alert-msg p').text('جهت انتخاب گروهی قراردادها ابتدا میبایست سال و ماه مورد نظر را انتخاب نمائید.'); + //setTimeout(function () { + // $('.alert-msg').hide(); + // $('.alert-msg p').text(''); + // $('#dropdown-year').removeClass("errored"); + // $('#dropdown-month').removeClass("errored"); + //}, + //3500); + //} else { + //loadAllToPrint(); + $('input:checkbox').not(this).not("#group, #list").prop('checked', this.checked); - //} - }); + //} +}); - $("input:checkbox").not("#group,#list,.checkAll").change(function () { - if ($("input:checkbox").not("#group,#list,.checkAll").filter(":not(:checked)").length) { - $(".checkAll").prop("checked", false); - } else { - $(".checkAll").prop("checked", true); - } - }); - //******************** انتخاب همه ی چک باکس ها ******************** +$("input:checkbox").not("#group,#list,.checkAll").change(function () { + if ($("input:checkbox").not("#group,#list,.checkAll").filter(":not(:checked)").length) { + $(".checkAll").prop("checked", false); + } else { + $(".checkAll").prop("checked", true); + } +}); +//******************** انتخاب همه ی چک باکس ها ******************** - //*********************ستون نام پرسنل در حالتی که فقط اسم پرسنل هست باید هاید بشه************************ - $("#searchJustName").hide(); +//*********************ستون نام پرسنل در حالتی که فقط اسم پرسنل هست باید هاید بشه************************ +$("#searchJustName").hide(); - //************تنظیم چک باکس تایپ لیست******************* - $('#group, #groupMobile').change(function () { - if ($(this).is(':checked')) { - $('#list , #listMobile').prop('checked', false); - } - }); +//************تنظیم چک باکس تایپ لیست******************* +$('#group, #groupMobile').change(function () { + if ($(this).is(':checked')) { + $('#list , #listMobile').prop('checked', false); + } +}); - $('#list, #listMobile').change(function () { - if ($(this).is(':checked')) { - $('#group , #groupMobile').prop('checked', false); - } - }); +$('#list, #listMobile').change(function () { + if ($(this).is(':checked')) { + $('#group , #groupMobile').prop('checked', false); + } +}); //************تنظیم چک باکس تایپ لیست******************* }); @@ -393,8 +393,8 @@ function htmlLoadSimpleListData(loadLoanListData) { ${detailsPermission - ? - `` - : - ``} ${deletePermission - ? - `` - : - `` - } + } ${detailsPermission - ? - `` - : - ``} ${deletePermission - ? - `` - : - `` - } + }
`; - + pageIndexJs++; }); @@ -805,7 +805,7 @@ function htmlLoadWithEmployeeDataByFullname(loadLoanListData) {
${item.personnelCode}
-
${item.totalAmountFa + " ریال" ?? "-"}
+
${item.totalAmountFa + " ریال" ?? "-"}
${item.amountPerMonth + " ریال"}
@@ -1029,7 +1029,7 @@ function htmlLoadWithEmployeeMobileDataByFullname(loadLoanListData) { ${detailsPermission ? - `
مبلغ
-
${loanItem.totalAmountFa + " ریال" ??"-"}
+
${loanItem.totalAmountFa + " ریال" ?? "-"}
مبلغ هر ماه
@@ -1203,7 +1203,7 @@ function htmlLoadWithEmployeeMobileDataByDate(loadLoanListData) { ${detailsPermission ? - `