From 10bfbad3cb958ae1ca7c6300df6269b47ca4f473 Mon Sep 17 00:00:00 2001 From: MahanCh Date: Tue, 22 Apr 2025 18:31:00 +0330 Subject: [PATCH] add institution plan front --- .../Areas/Admin/Pages/Shared/_Menu.cshtml | 16 +- .../CreateServiceModal.cshtml | 126 +++++ .../ServiceAmountsManagement/Index.cshtml | 251 ++++++++++ .../ServiceAmountsManagement/Index.cshtml.cs | 50 ++ .../AdminNew/Pages/Shared/_Layout.cshtml | 4 +- .../Areas/AdminNew/Pages/Shared/_Menu.cshtml | 8 + .../css/CreateServiceModal.css | 32 ++ .../ServiceAmountsManagement/css/Index.css | 469 ++++++++++++++++++ .../js/CreateServiceModal.js | 62 +++ .../ServiceAmountsManagement/js/Index.js | 211 ++++++++ 10 files changed, 1224 insertions(+), 5 deletions(-) create mode 100644 ServiceHost/Areas/AdminNew/Pages/Company/ServiceAmountsManagement/CreateServiceModal.cshtml create mode 100644 ServiceHost/Areas/AdminNew/Pages/Company/ServiceAmountsManagement/Index.cshtml create mode 100644 ServiceHost/Areas/AdminNew/Pages/Company/ServiceAmountsManagement/Index.cshtml.cs create mode 100644 ServiceHost/wwwroot/AssetsAdminNew/ServiceAmountsManagement/css/CreateServiceModal.css create mode 100644 ServiceHost/wwwroot/AssetsAdminNew/ServiceAmountsManagement/css/Index.css create mode 100644 ServiceHost/wwwroot/AssetsAdminNew/ServiceAmountsManagement/js/CreateServiceModal.js create mode 100644 ServiceHost/wwwroot/AssetsAdminNew/ServiceAmountsManagement/js/Index.js diff --git a/ServiceHost/Areas/Admin/Pages/Shared/_Menu.cshtml b/ServiceHost/Areas/Admin/Pages/Shared/_Menu.cshtml index 83cf0976..61cbdcb9 100644 --- a/ServiceHost/Areas/Admin/Pages/Shared/_Menu.cshtml +++ b/ServiceHost/Areas/Admin/Pages/Shared/_Menu.cshtml @@ -221,10 +221,18 @@ لیست مشاغل
  • - - - - تعطیلات رسمی + + + + تعطیلات رسمی +
  • +
  • + + + + + مبالغ سرویس‌ها +
  • diff --git a/ServiceHost/Areas/AdminNew/Pages/Company/ServiceAmountsManagement/CreateServiceModal.cshtml b/ServiceHost/Areas/AdminNew/Pages/Company/ServiceAmountsManagement/CreateServiceModal.cshtml new file mode 100644 index 00000000..d52deade --- /dev/null +++ b/ServiceHost/Areas/AdminNew/Pages/Company/ServiceAmountsManagement/CreateServiceModal.cshtml @@ -0,0 +1,126 @@ +@model CompanyManagment.App.Contracts.InstitutionPlan.EditInstitutionPlanPercentage + +@{ + string clientVersion = _0_Framework.Application.Version.StyleVersion; + +} + +
    + +
    + + + + + + + + + \ No newline at end of file diff --git a/ServiceHost/Areas/AdminNew/Pages/Company/ServiceAmountsManagement/Index.cshtml b/ServiceHost/Areas/AdminNew/Pages/Company/ServiceAmountsManagement/Index.cshtml new file mode 100644 index 00000000..2f184282 --- /dev/null +++ b/ServiceHost/Areas/AdminNew/Pages/Company/ServiceAmountsManagement/Index.cshtml @@ -0,0 +1,251 @@ +@page +@model ServiceHost.Areas.AdminNew.Pages.Company.ServiceAmountsManagement.IndexModel + +@{ + string adminVersion = _0_Framework.Application.Version.AdminVersion; + var index = 1; +} + + +@section Styles { + + + + + + + + + + + + + +} + + +
    + + + +@* *@ + + +
    +
    +
    + @*Search Box *@ + +
    + +
    +
    + +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    + + + +
    + +
    +
    +
    + +
    + +
    +
    + +
    +
    + + لیست سرویس ها + +
    +
    +
    +
    +
    +
    + +
    + +
    +
    تعداد پرسنل
    +
    مبلغ قرداد و تصفیه
    +
    خدمات بیمه
    +
    خدمات خصور و غیاب
    +
    خدمات فیش حقوقی غیر رسمی
    +
    خدمات حضوری قرارداد و تصفیه
    +
    خدمات حضور بیمه
    +
    خدمات حضوری موسسه
    +
    مبلغ کل خدمات سامانه بدون خدمات خصوری
    +
    مبلغ کل خدمات سامانه + خدمات خصوری
    +
    + +
    +
    +
    +
    + +
    +
    +
    +
    +
    + + + + + +@section Script { + + + + +} \ No newline at end of file diff --git a/ServiceHost/Areas/AdminNew/Pages/Company/ServiceAmountsManagement/Index.cshtml.cs b/ServiceHost/Areas/AdminNew/Pages/Company/ServiceAmountsManagement/Index.cshtml.cs new file mode 100644 index 00000000..f12dd9c7 --- /dev/null +++ b/ServiceHost/Areas/AdminNew/Pages/Company/ServiceAmountsManagement/Index.cshtml.cs @@ -0,0 +1,50 @@ +using CompanyManagment.App.Contracts.InstitutionPlan; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.RazorPages; + +namespace ServiceHost.Areas.AdminNew.Pages.Company.ServiceAmountsManagement +{ + [Authorize] + public class IndexModel : PageModel + { + private readonly IInstitutionPlanApplication _institutionPlanApplication; + + public IndexModel(IInstitutionPlanApplication institutionPlanApplication) + { + _institutionPlanApplication = institutionPlanApplication; + } + + public void OnGet() + { + } + + public IActionResult OnGetInstitutionPlanList(int pageIndex, int countPeron) + { + var resultData = _institutionPlanApplication.GetInstitutionPlanList(pageIndex, countPeron); + return new JsonResult(new + { + success = true, + data = resultData, + pageIndex = resultData.Count() + }); + } + + public IActionResult OnGetCreateInstitutionPlan() + { + var command = _institutionPlanApplication.GetByFirst(); + return Partial("CreateServiceModal", command); + } + + public IActionResult OnPostCreateInstitutionPlan(CreateInstitutionPlanPercentage command) + { + var result = _institutionPlanApplication.CreateInstitutionPlanPercentage(command); + + return new JsonResult(new + { + success = result.IsSuccedded, + message = result.Message + }); + } + } +} diff --git a/ServiceHost/Areas/AdminNew/Pages/Shared/_Layout.cshtml b/ServiceHost/Areas/AdminNew/Pages/Shared/_Layout.cshtml index a32ad9c5..c41df2fe 100644 --- a/ServiceHost/Areas/AdminNew/Pages/Shared/_Layout.cshtml +++ b/ServiceHost/Areas/AdminNew/Pages/Shared/_Layout.cshtml @@ -60,7 +60,9 @@ - + + + @* *@ diff --git a/ServiceHost/Areas/AdminNew/Pages/Shared/_Menu.cshtml b/ServiceHost/Areas/AdminNew/Pages/Shared/_Menu.cshtml index 3e407686..0a2349ab 100644 --- a/ServiceHost/Areas/AdminNew/Pages/Shared/_Menu.cshtml +++ b/ServiceHost/Areas/AdminNew/Pages/Shared/_Menu.cshtml @@ -304,6 +304,14 @@ تعطیلات رسمی
  • +
  • + + + + + مبالغ سرویس‌ها + +
  • diff --git a/ServiceHost/wwwroot/AssetsAdminNew/ServiceAmountsManagement/css/CreateServiceModal.css b/ServiceHost/wwwroot/AssetsAdminNew/ServiceAmountsManagement/css/CreateServiceModal.css new file mode 100644 index 00000000..275d9513 --- /dev/null +++ b/ServiceHost/wwwroot/AssetsAdminNew/ServiceAmountsManagement/css/CreateServiceModal.css @@ -0,0 +1,32 @@ +.modal-body { + user-select: none; +} + +.titleInput { + font-size: 14px; + color: #4E4E4E; +} + +.btn-cancel { + padding: 6px 10px; + width: 190px; +} + +.btn-save { + padding: 6px 10px; + width: 190px; + background-color: #84CC16; + border-radius: 5px; + color: #ffffff; + font-size: 14px; + font-style: normal; + font-weight: 600; + line-height: 24px; +} + +.percentageInput { + top: 50%; + left: 8px; + color: #8B8B8B; + transform: translate(0, -50%); +} \ No newline at end of file diff --git a/ServiceHost/wwwroot/AssetsAdminNew/ServiceAmountsManagement/css/Index.css b/ServiceHost/wwwroot/AssetsAdminNew/ServiceAmountsManagement/css/Index.css new file mode 100644 index 00000000..2358fdce --- /dev/null +++ b/ServiceHost/wwwroot/AssetsAdminNew/ServiceAmountsManagement/css/Index.css @@ -0,0 +1,469 @@ +.ServiceModal-width { + max-width: 710px; +} + +.sticky { + position: sticky; + top: 5px; + z-index: 10; +} + +.goToTop { + position: fixed; + bottom: -10px; + margin-right: 100px; + z-index: 100; + color: #fff; + background-color: #25acacd6; +} + +.goToTop:hover { + color: #fff; + background-color: #2ca4a4; +} + +.btn-create { + background-color: #84CC16; + border-radius: 7px; + color: #ffffff; + padding: 3px 12px; + font-size: 12px; + font-style: normal; + font-weight: 400; + line-height: 24px; +} + +.Rtable .Rtable-row .Rtable-cell.column-heading { + height: 100%; + align-items: center; + justify-content: center; +} + +.service-list .Rtable-cell.width2, +.service-list .Rtable-cell.width3, +.service-list .Rtable-cell.width4, +.service-list .Rtable-cell.width5 { + background: #16b7971f; + padding: 8px 0; +} + +.service-list .Rtable-cell.width6, +.service-list .Rtable-cell.width7 { + background: #359bb130; + padding: 8px 0; +} + +.service-list .Rtable-cell.width8, +.service-list .Rtable-cell.width9, +.service-list .Rtable-cell.width10 { + background: #d3d00836; + padding: 8px 0; +} + +.table-service .width1, +.table-service .service-list .width1 { + width: 5% !important; +} + +.table-service .width2, +.table-service .service-list .width2 { + width: 10% !important; +} + +.table-service .width3, +.table-service .service-list .width3 { + width: 10% !important; +} + +.table-service .width4, +.table-service .service-list .width4 { + width: 10% !important; +} + +.table-service .width5, +.table-service .service-list .width5 { + width: 10% !important; +} + +.table-service .width6, +.table-service .service-list .width6 { + width: 11% !important; +} + +.table-service .width7, +.table-service .service-list .width7 { + width: 11% !important; +} + +.table-service .width8, +.table-service .service-list .width8 { + width: 11% !important; +} + +.table-service .width9, +.table-service .service-list .width9 { + width: 11% !important; +} + +.table-service .width10, +.table-service .service-list .width10 { + width: 11% !important; +} + +.table-service .width11, +.table-service .service-list .width11 { + width: 95% !important; +} + +.table-service .service-list .width3 .Rtable-cell--content, +.table-service .service-list .width7 .Rtable-cell--content { + text-align: center; + text-align: -webkit-center; +} + +.table-service .ticket-list .green { + background-color: #C4FFC2; +} + +.badget-inprogress { + color: #ffffff; + background-color: #EAB308; + width: 60%; + text-align: center; + padding: 3px 6px; + border-radius: 30px; + display: inline-block; +} + +.badget-open { + color: #353535; + background-color: #E2E8F0; + width: 60%; + text-align: center; + padding: 3px 6px; + border-radius: 30px; + display: inline-block; +} + +.badget-answer { + color: #ffffff; + background-color: #60A5FA; + width: 60%; + text-align: center; + padding: 3px 6px; + border-radius: 30px; + display: inline-block; +} + +.badget-closed { + color: #ffffff; + background-color: #84CC16; + width: 60%; + text-align: center; + padding: 3px 6px; + border-radius: 30px; + display: inline-block; +} + + +.btn-ticket-detail { + background: rgba(93, 209, 52, 0.3); + border: 0.5px solid #2E8F2F54; + border-radius: 6px; + position: relative; + overflow: hidden; + color: #ffffff; + text-align: right; + font-size: 11px; + padding: 3px; + font-style: normal; + font-weight: 400; + line-height: normal; + white-space: nowrap; +} + +.btn-ticket-task { + background: #C9EEFE; + border: 0.5px solid #FFFFFF; + border-radius: 6px; + position: relative; + overflow: hidden; + color: #ffffff; + text-align: right; + font-size: 11px; + padding: 3px; + font-style: normal; + font-weight: 400; + line-height: normal; + white-space: nowrap; + margin: 0 2px; +} + +.btn-ticket-edit { + background: rgba(52, 209, 209, 0.3); + border-radius: 6px; + position: relative; + overflow: hidden; + color: #009EE2; + text-align: right; + font-size: 11px; + padding: 3px; + font-style: normal; + font-weight: 400; + line-height: normal; + white-space: nowrap; +} + +.btn-ticket-delete { + background: rgba(209, 50, 50, 0.15); + border-radius: 6px; + position: relative; + overflow: hidden; + color: #BF3737; + text-align: right; + font-size: 11px; + padding: 3px; + font-style: normal; + font-weight: 400; + line-height: normal; + white-space: nowrap; +} + +.btn-ticket-detail:hover { + background: rgba(93, 209, 52, 0.4); +} + +.btn-ticket-edit:hover { + background: rgba(52, 209, 209, 0.5); +} + +.btn-ticket-delete:hover { + background: rgba(209, 50, 50, 0.3); +} + + +.btn-ticket-more { + background: #C7F8F8; + border: 1px solid #0B5959; + border-radius: 7px; + position: relative; + overflow: hidden; + color: #0B5959; + text-align: right; + font-size: 11px; + padding: 3px; + font-style: normal; + font-weight: 400; + line-height: normal; + white-space: nowrap; +} + + .btn-ticket-more:hover { + background: #ACD2D2; + } + +.table-service .Rtable .Rtable-row .Rtable-cell .Rtable-cell--content > span { + border-radius: 5px; + background: rgba(87, 227, 227, 0.25); + width: 32px; + height: 32px; + display: inline-block; + padding: 0 10px; + font-weight: 600; +} + +.operations-btns .span1 { + color: #0B5959; + font-size: 14px; + font-weight: 500; +} + +.operations-btns .span2 { + color: #0B5959; + font-size: 13px; + font-weight: 500; +} + +.black-background { + background-color: #E3E3E3 !important; +} + +.status { + display: inline-block; + padding: 6px; + width: 60px; + border-radius: 20px; + color: #ffffff; + font-weight: 500; +} + +.status-green { + background-color: #84cc16; +} + +.status-red { + background-color: #ef4444; +} + +@media (max-width: 1380px) { + .badget-inprogress, + .badget-answer, + .badget-closed, + .badget-open { + width: 110px; + font-size: 10px; + } + + .Rtable .Rtable-row .Rtable-cell .Rtable-cell--content { + font-size: 10px; + } + + .table-service .Rtable-cell.column-heading { + font-size: 12px !important; + } + + /*.table-service .width1, + .table-service .ticket-list .width1 { + width: 5% !important; + }*/ + + .table-service .Rtable-cell.column-heading.width2 { + width: 18% !important; + } + + .table-service .width2, + .table-service .ticket-list .width2 { + width: 12% !important; + } + + /* .table-service .width3, + .table-service .ticket-list .width3 { + width: 5% !important; + }*/ + + /*/*.table-service .width3, + .table-service .ticket-list .width3 { + width: 17% !important; + text-align: center !important; + } + + .table-service .width4, + .table-service .ticket-list .width4 { + width: 15% !important; + } + + .table-service .width5, + .table-service .ticket-list .width5 { + width: 15% !important;*/ + /*text-align: center !important;*/ + /*}*/ + + .table-service .ticket-list .width3 .Rtable-cell--content { + text-align: center; + text-align: -webkit-center; + } + + .table-service .ticket-list .Rtable-cell--content { + font-size: 11px; + } + + .table-service .width6, + .table-service .ticket-list .width6 { + width: 16% !important; + } + + .table-service .width7, + .table-service .ticket-list .width7 { + width: 8% !important; + text-align: center !important; + } + + .table-service .width8, + .table-service .ticket-list .width8 { + width: 5% !important; + } +} + + + +@media (max-width: 992px) { + .table-service .width1 { + width: 4% !important; + } + + .table-service .width7, .table-service .ticket-list .width7 { + width: 4% !important; + text-align: end !important; + } +} + +@media (max-width: 767px) { + .goToTop { + position: fixed; + bottom: 54px; + margin-right: 39%; + z-index: 100; + color: #fff; + background-color: #25acac70; + } + + .Rtable--collapse .Rtable-row { + outline: 0; + border: 1px solid #ECFFFF; + padding: 0; + margin: 5px 0px 0; + } + + .Rtable--collapse .Rtable-row .Rtable-cell.width3 .Rtable-cell--content { + justify-content: right; + display: flex; + } + + .Rtable--collapse .Rtable-row .Rtable-cell.width8 { + justify-content: end; + } + + .Rtable--collapse .Rtable-row .Rtable-cell.width8 { + justify-content: end; + } + + .Rtable--collapse .Rtable-row .Rtable-cell.width5 { + justify-content: center; + } + + .Rtable--collapse .Rtable-row .Rtable-cell.width4 { + justify-content: center; + } + + .Rtable--collapse .Rtable-row .Rtable-cell.width8 .Rtable-cell--content { + justify-content: end; + display: flex; + } + + .Rtable--collapse .Rtable-row .Rtable-cell { + border-bottom: 0; + } + + .badget-inprogress, + .badget-answer, + .badget-closed { + border-radius: 0; + } + + .btn-ticket-detail { + border: 1px solid #248826; + border-radius: 8px; + color: #248826; + background-color: #B7EABA; + } + + .table-service .width1, + .table-service .service-list .width1 { + width: 10% !important; + } + + .table-service .width11, + .table-service .service-list .width11 { + width: 90% !important; + } +} diff --git a/ServiceHost/wwwroot/AssetsAdminNew/ServiceAmountsManagement/js/CreateServiceModal.js b/ServiceHost/wwwroot/AssetsAdminNew/ServiceAmountsManagement/js/CreateServiceModal.js new file mode 100644 index 00000000..c2c5c686 --- /dev/null +++ b/ServiceHost/wwwroot/AssetsAdminNew/ServiceAmountsManagement/js/CreateServiceModal.js @@ -0,0 +1,62 @@ +var ajax = new AjaxService(antiForgeryToken); +$(document).ready(function () { + $(".select2Option").select2({ + language: "fa", + dir: "rtl", + dropdownParent: $('#MainModal'), + templateResult: function (data, container) { + if (data.element) { + $(container).addClass($(data.element).attr("class")); + } + return data.text; + } + }); + + $(document).ready(function () { + $('.numeric-only').on('input', function () { + let element = $(this); + let value = convertPersianNumbersToEnglish(element.val()); + + value = value.replace(/[^0-9]/g, ''); + + element.val(value); + }); + }); + +}); + +function SaveDataAjax() { + var loading = $('#createData .spinner-loading'); + + var data = $('#create-form').serialize(); + + ajax.post(createInstitutionPlanUrl, data, false) + .then(response => { + if (response.success) { + loading.show(); + $('.alert-success-msg').show(); + $('.alert-success-msg p').text(response.message); + setTimeout(function () { + $('.alert-success-msg').hide(); + $('.alert-success-msg p').text(''); + }, 2000); + + pageIndexMain = 0; + $('#LoadDataOfServices').html('
    '); + ajaxDataService(); + + loading.hide(); + $('#MainModal').modal('hide'); + + } else { + $('.alert-msg').show(); + $('.alert-msg p').text(response.message); + setTimeout(function () { + $('.alert-msg').hide(); + $('.alert-msg p').text(''); + }, 3500); + + loading.hide(); + } + }); +} \ No newline at end of file diff --git a/ServiceHost/wwwroot/AssetsAdminNew/ServiceAmountsManagement/js/Index.js b/ServiceHost/wwwroot/AssetsAdminNew/ServiceAmountsManagement/js/Index.js new file mode 100644 index 00000000..2083fee6 --- /dev/null +++ b/ServiceHost/wwwroot/AssetsAdminNew/ServiceAmountsManagement/js/Index.js @@ -0,0 +1,211 @@ +var ajax = new AjaxService(antiForgeryToken); +var pageIndexMain = 0; + +$(document).on('click', ".openAction", function () { + if (window.matchMedia('(max-width: 767px)').matches) { + $(this).next().find(".operations-btns").slideToggle(500); + $(".operations-btns").not($(this).next().find(".operations-btns")).slideUp(500); + } +}); + +$(document).ready(function () { + ajaxDataService(); + + const { countPerson } = getSearchParamsFromUrl(); + $('#countPersonInput').val(countPerson); + $('#countPersonInputMobile').val(countPerson); + + if (countPerson !== "") { + $('.btn-clear-filter').removeClass('disable'); + } else { + $('.btn-clear-filter').addClass('disable'); + } + + $(window).scroll(function () { + if ($(window).scrollTop() + $(window).height() > $(document).height() - 600) { + ajaxDataService(); + } + + if ($(this).scrollTop() > 100) { + $('.goToTop').show().fadeIn(); + } else { + $('.goToTop').fadeOut().hide(); + } + }); + + $('.goToTop').on('click', function () { + $('html, body').animate({ scrollTop: 0 }, 360); + return false; + }); + + $('.btn-search-click').click(function () { + var isMobile = window.matchMedia('(max-width: 767px)').matches; + var inputCountPerson = isMobile ? $('#countPersonInputMobile') : $('#countPersonInput'); + + if (inputCountPerson.val().trim() === '') { + inputCountPerson.addClass('errored'); + $('.alert-msg').show(); + $('.alert-msg p').text('لطفا تعداد پرسنل وارد کنید.'); + + setTimeout(function () { + $('.alert-msg').hide(); + $('.alert-msg p').text(''); + inputCountPerson.removeClass('errored'); + }, 3500); + + return; + } + + const { countPerson } = getSearchParamsFromUrl(); + var countPersonParams = countPerson; + + if (countPersonParams !== '') { + $('.btn-clear-filter').removeClass('disable'); + } else { + $('.btn-clear-filter').addClass('disable'); + } + + paramsUrl(inputCountPerson.val()); + + pageIndexMain = 0; + $('#LoadDataOfServices').html('
    '); + ajaxDataService(); + + if (isMobile) { + $('#searchModal').modal('hide'); + } + + }); +}); + +function ajaxDataService() { + var htmlContent = ''; + const { countPerson } = getSearchParamsFromUrl(); + ajax.get(loadInstitutionPlanListUrl, { pageIndex: pageIndexMain, countPeron: countPerson }, false) + .then(response => { + pageIndexMain = pageIndexMain + response.pageIndex; + var data = response.data; + + if (data.length > 0) { + data.forEach(function (item, index) { + htmlContent += ` +
    +
    +
    ${item.countPerson}
    +
    +
    +
    ${item.contractAndCheckout}
    +
    +
    +
    ${item.insurance}
    +
    +
    +
    ${item.rollCall}
    +
    +
    +
    ${item.customizeCheckout}
    +
    +
    +
    ${item.contractAndCheckoutInPerson}
    +
    +
    +
    ${item.insuranceInPerson}
    +
    +
    +
    ${item.inPersonSumAmountStr}
    +
    +
    +
    ${item.onlineOnlySumAmountStr}
    +
    +
    +
    ${item.onlineAndInPersonSumAmountStr}
    +
    + +
    +
    +
    + عملیات بیشتر +
    +
    +
    +
    +
    +
    +
    +
    + تعداد پرسنل + ${item.countPerson} +
    +
    + مبلغ قرداد و تصفیه + ${item.contractAndCheckout} ریال +
    +
    + خدمات بیمه + ${item.insurance} ریال +
    +
    + خدمات خصور و غیاب + ${item.rollCall} ریال +
    +
    + خدمات فیش حقوقی غیر رسمی + ${item.customizeCheckout} ریال +
    +
    + خدمات حضوری قرارداد و تصفیه + ${item.contractAndCheckoutInPerson} ریال +
    +
    + خدمات حضور بیمه + ${item.insuranceInPerson} ریال +
    +
    + خدمات حضوری موسسه + ${item.inPersonSumAmountStr} ریال +
    +
    + مبلغ کل خدمات سامانه بدون خدمات خصوری + ${item.onlineOnlySumAmountStr} ریال +
    +
    + مبلغ کل خدمات سامانه + خدمات خصوری + ${item.onlineAndInPersonSumAmountStr} ریال +
    +
    +
    +
    + `; + }); + $('#LoadDataOfServices').append(htmlContent); + } + }); +} + +function openCreateModal() { + AjaxUrlContentModal(showModalNewServiceUrl); +} + +function paramsUrl(countPerson) { + const params = new URLSearchParams(); + let hasAnyFilter = false; + + if (countPerson !== '') { + params.set("count-person", countPerson); + hasAnyFilter = true; + } + + const newUrl = hasAnyFilter + ? `${window.location.origin}/AdminNew/Company/ServiceAmountsManagement?${params.toString()}` + : `${window.location.origin}/AdminNew/Company/ServiceAmountsManagement`; + + window.history.pushState({}, '', newUrl); +} + +function getSearchParamsFromUrl() { + const urlParams = new URLSearchParams(window.location.search); + + return { + countPerson : urlParams.get("count-person") || "" + }; +} \ No newline at end of file