From 71ff1da98016eaf76e577936166670ff0e76c8dc Mon Sep 17 00:00:00 2001 From: SamSys Date: Tue, 6 Aug 2024 17:11:26 +0330 Subject: [PATCH] fixed lost code 4 --- 0_Framework/Application/Version.cs | 4 +- .../Admin/Pages/Accounts/Account/Index.cshtml | 1218 +++--- .../Pages/Company/Checkouts/Index.cshtml | 2277 ++++++----- .../Company/ContractingParties/Index.cshtml | 3116 +++++++------- .../Pages/Company/Contracts/Index.cshtml | 3622 +++++++++-------- .../Pages/Company/Employees/Index.cshtml | 1985 ++++----- .../Pages/Company/Employers/Index.cshtml | 2524 ++++++------ .../Admin/Pages/Company/Holidays/Index.cshtml | 386 +- .../Pages/Company/InsuranceList/Index.cshtml | 1014 ++--- .../InsuranceList/InsuranceConfirm.cshtml | 1000 ++--- .../InsuranceList/InsuranceSummary.cshtml | 343 +- .../Admin/Pages/Company/Jobs/Index.cshtml | 326 +- .../Pages/Company/MandatoryHours/Index.cshtml | 758 ++-- .../Pages/Company/Representative/Index.cshtml | 1560 +++---- .../Pages/Company/Workshops/Index.cshtml | 1067 ++--- .../Pages/Company/Workshops/Index.cshtml.cs | 13 + .../Workshops/PrintListWorkshop.cshtml | 528 +++ .../Admin/Pages/Shared/_AdminLayout.cshtml | 25 +- .../Areas/Admin/Pages/Shared/_Menu.cshtml | 34 +- ServiceHost/Pages/Index.cshtml | 82 +- ServiceHost/ServiceHost.csproj | 5 +- .../wwwroot/AdminTheme/assets/css/style.css | 15 +- 22 files changed, 11357 insertions(+), 10545 deletions(-) create mode 100644 ServiceHost/Areas/Admin/Pages/Company/Workshops/PrintListWorkshop.cshtml diff --git a/0_Framework/Application/Version.cs b/0_Framework/Application/Version.cs index 9d6abaec..6f239308 100644 --- a/0_Framework/Application/Version.cs +++ b/0_Framework/Application/Version.cs @@ -10,8 +10,8 @@ public static class Version { static Version() { - StyleVersion = "2.11.33"; - AdminVersion = "2.5.18"; + StyleVersion = "2.11.34"; + AdminVersion = "2.5.19"; CameraVersion = "1.0.3"; } diff --git a/ServiceHost/Areas/Admin/Pages/Accounts/Account/Index.cshtml b/ServiceHost/Areas/Admin/Pages/Accounts/Account/Index.cshtml index b21d6a4e..5cd3ac53 100644 --- a/ServiceHost/Areas/Admin/Pages/Accounts/Account/Index.cshtml +++ b/ServiceHost/Areas/Admin/Pages/Accounts/Account/Index.cshtml @@ -1,21 +1,24 @@ @page +@using CompanyManagment.App.Contracts.PersonalContractingParty +@using Microsoft.EntityFrameworkCore +@using _0_Framework.Application @model ServiceHost.Areas.Admin.Pages.Accounts.Account.IndexModel @{ - var i = 1; - var j = 1; - var r = 1; - //string colaps = "in"; - //string act = "active"; + + var i = 1; + var j = 1; + var r = 1; + //string colaps = "in"; + //string act = "active"; } @{ - Layout = "Shared/_AdminLayout"; - ViewData["title"] = "مدیریت کاربران"; - } - +
-
+
-

- ایجاد کاربر جدید +

+ ایجاد کاربر جدید -

-

- ایجاد نقش جدید +

+

+ ایجاد نقش جدید -

-

- - -

- -
+

+ +
@@ -86,194 +98,202 @@
@*==================================================================Adminusers=====*@
-
-
-
-
-

جستجو در کاربران

-
-
-
-
-
-
-
- - -
-
-
-
- - +
+
+
+
+

جستجو در کاربران

+
+
+ +
+
+
+
+ + +
+
+
+
+ + -
+
-
-
+
+
-
- - -
-
-
+
+ + +
+
+
-
- - -
-
- - -
- -
-
- - مشاهده همه -
- - -
- - -
- - -
- - -
- - - -
-
-
-
- -
-
-
-
-
-
-
-
- - - - - - - - @**@ - - - - - - - @foreach (var item in Model.AdminAccounts.OrderBy(x => x.Id)) - { - - - - - - @**@ - - - @{ - i++; - } - - - - } +
+ + +
+ - -
#عکسنامنام کاربری شماره تماس نقش تاریخ ثبت نام عملیات
@i - @if (!string.IsNullOrWhiteSpace(item.ProfilePhoto)) - { - - } - - @item.Fullname@item.Username@item.Mobile@item.Role@item.CreationDate - - - تغییر گذرواژه - - - - - - - - @if (item.IsActiveString == "true" && item.Role != "مدیر سیستم") - { - - - - } - else if (item.IsActiveString == "false") - { - - - - } -
-
-
-
-
-
-
+ + +
+ +
+
+ + مشاهده همه +
+ + +
+ + +
+ + +
+ + + +
+ + + +
+
+
+
+ +
+
+
+
+
+
+
+
+
+ + + + + + + + @**@ + + + + + + + @foreach (var item in @Model.AdminAccounts.OrderBy(x => x.Id)) + { + + + + + + + @**@ + + + @{ + i++; + } + + + + + + } + + + + +
#عکسنامنام کاربری شماره تماس نقش تاریخ ثبت نام عملیات
@i + @if (!string.IsNullOrWhiteSpace(@item.ProfilePhoto)) + { + + } + + @item.Fullname@item.Username@item.Mobile@item.Role@item.CreationDate + + + تغییر گذرواژه + + + + + + + + @if (item.IsActiveString == "true" && item.Role != "مدیر سیستم") + { + + } + else if (item.IsActiveString == "false") + { + + } +
+
+
+
+
+
+
+
@@ -281,61 +301,67 @@
-
-
-
-
-

لیست نقش ها

-
-
-
-
- - - - - - - - - - - - - - @foreach (var items in Model.Roless) - { - - - - - - - - @{ - r++; - } - - - - } - -
#نام تاریخ ثبت عملیات
@r@items.Name@items.CreationDate - - - - -
-
-
-
-
-
-
+
+
+
+
+

لیست نقش ها

+
+
+
+
+
+ + + + + + + + + + + + + + @foreach (var items in Model.Roless) + { + + + + + + + + + @{ + r++; + } + + + + } + + + + +
#نام تاریخ ثبت عملیات
@r@items.Name@items.CreationDate + + + + +
+
+
+
+
+
+
+
@@ -343,403 +369,395 @@ @*==================================================================Clientusers=====*@
-
-
-
-
-

جستجو در کاربران

-
-
-
-
-
-
-
- - -
-
-
-
- - +
+
+
+
+

جستجو در کاربران

+
+
+ +
+
+
+
+ + +
+
+
+
+ + -
+
-
-
+
+
-
- - -
-
-
+
+ + +
+
+
-
- - -
-
- - -
- -
-
- - مشاهده همه -
- - -
- -
- - -
- - -
- - - -
-
-
-
- -
-
-
-
-

لیست کاربران

-
-
-
-
- - - - - - - - @**@ - - - - - - - @foreach (var item in Model.ClientAccounts.OrderBy(x => x.Id)) - { - - - - - - @**@ - - - @{ - j++; - } - - - - } +
+ + +
+ - -
#عکسنامنام کاربری شماره تماس نقش تاریخ ثبت نام عملیات
@j - @if (!string.IsNullOrWhiteSpace(item.ProfilePhoto)) - { - - } - @item.Fullname@item.Username@item.Mobile@item.Role@item.CreationDate - - ورود به کلاینت - - - - - - - - - @if (item.IsActiveString == "true" && item.Role != "مدیر سیستم") - { - - - - } - else if (item.IsActiveString == "false") - { - - - - } - -
-
-
-
-
-
-
+ + +
+ +
+
+ + مشاهده همه +
+ + +
+ +
+ + +
+ + + +
+ + + +
+
+
+
+ +
+
+
+
+

لیست کاربران

+
+
+
+
+
+ + + + + + + + @**@ + + + + + + + @foreach (var item in @Model.ClientAccounts.OrderBy(x => x.Id)) + { + + + + + + + @**@ + + + @{ + j++; + } + + + + + + } + + + + +
#عکسنامنام کاربری شماره تماس نقش تاریخ ثبت نام عملیات
@j + @if (!string.IsNullOrWhiteSpace(@item.ProfilePhoto)) + { + + } + @item.Fullname@item.Username@item.Mobile@item.Role@item.CreationDate + + + + + تغییر گذرواژه + + @if (item.IsActiveString == "true" && item.Role != "مدیر سیستم") + { + + } + else if (item.IsActiveString == "false") + { + + } +
+
+
+
+
+
+
+
+
+ + + +
+ @section Script { - - - - - + + + + - - - + + + + - + + +} + - -} \ No newline at end of file diff --git a/ServiceHost/Areas/Admin/Pages/Company/Checkouts/Index.cshtml b/ServiceHost/Areas/Admin/Pages/Company/Checkouts/Index.cshtml index c9e44df9..1dad3f2b 100644 --- a/ServiceHost/Areas/Admin/Pages/Company/Checkouts/Index.cshtml +++ b/ServiceHost/Areas/Admin/Pages/Company/Checkouts/Index.cshtml @@ -1,18 +1,19 @@ @page +@using CompanyManagment.App.Contracts.PersonalContractingParty @model ServiceHost.Areas.Admin.Pages.Company.Checkouts.IndexModel @{ - //int i = 1; + //int i = 1; } @{ - //Layout = "~/Pages/Shared/_Layout.cshtml"; - Layout = "Shared/_AdminLayout"; - ViewData["title"] = "تصفیه حساب"; - -@section Styles{ - - - -} + @section Styles{ + + + + } @*@section Script{ }*@ }
-
-
+
+
-

- ایجاد تصفیه حساب - @* ویرایش *@ +

+ ایجاد تصفیه حساب +@* ویرایش *@ -

- @*href="#showmodal=@Url.Page("./Index", "PrintAll", new {ids = idss})"*@ -
-
-
-
+

+ @*href="#showmodal=@Url.Page("./Index", "PrintAll", new {ids = idss})"*@ +
+
+
+
- - + + -
-
-

- -

+
+ -
-
- @*===================================================================================================================*@ -
-
-
-
-
-
-
- -
-
-
-
- -
-
-
- - - -
-
    -
-
-
-
-
- - -
-
-
-
-
-
-
- انتخاب تاریخ -
-
- -
-
- -
-
-
-
- @**@ - -
+
+
+
+ @*===================================================================================================================*@ +
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+ + + +
+
    +
+
+
+
+
+ + +
+
+
+
+
+
+
+ انتخاب تاریخ +
+
+ +
+
+ +
+
+
+
+ @**@ + +
-
-
-
- @**@ +
+
+
+ @**@ - -
-
+ +
+
-
-
- @**@ - @* @@ -734,167 +735,169 @@ *@ -
-
-
-
-
- @* *@ - @* *@ -
+
-
- جستجو - - مشاهده همه -
-
-
- +
+ جستجو + + مشاهده همه +
+
+
+ -
-
- @*==================================================================personal=====*@ -
-
-
-
-
+
+
+ @*==================================================================personal=====*@ +
+
+
+
+
-
-
-
-

لیست تصفیه حساب ها

-
-
-
-
- -
-
-
-
-
+
+
+
+

لیست تصفیه حساب ها

+
+
+
+
+ +
+
+
+
+
+ @section Script { - - - - - + + + + - + - + - + - + - - }); - }); - - - @**@ - - + + - + +} - function signatureAll() { - $('.sweet-alert').removeClass("successSwall"); - $('.sweet-alert').removeClass("errorSwall"); - var workshopId = Number($("#workshops").val()); - var year = $("#SearchModel_Year").val(); - var month = $("#SearchModel_Month").val(); - if (year.trim() == "" && month.trim() == "" && workshopId == "0") { - swal({ - title: "لطفا در قسمت جستجوی تصفیه حساب آیتمهای کارگاه، سال و ماه را انتخاب نموده و روی کلید جستجو کلیک کنید ", - text: "", - type: "warning", - showCancelButton: true, - confirmButtonColor: "#DD6B55", - //confirmButtonText: "بستن", - cancelButtonText: "بستن", - closeOnConfirm: false, - customClass: "errorSwall" - }); - //$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', " ابتدا آیتمهای کارگاه و سال , ماه را انتخاب کنید "); - } else if (year.trim() == "" && month.trim() == "" && workshopId != "0") { - swal({ - title: "لطفا در قسمت جستجوی تصفیه حساب آیتمهای سال و ماه را انتخاب نموده و روی کلید جستجو کلیک کنید ", - text: "", - type: "warning", - showCancelButton: true, - confirmButtonColor: "#DD6B55", - //confirmButtonText: "بستن", - cancelButtonText: "بستن", - closeOnConfirm: false, - customClass: "errorSwall" - }); - //$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', " ابتدا آیتمهای سال و ماه را انتخاب کنید "); - } else if (year.trim() != "" && month.trim() == "" && workshopId == "0") { - swal({ - title: "لطفا در قسمت جستجوی تصفیه حساب آیتمهای کارگاه و ماه را انتخاب نموده و روی کلید جستجو کلیک کنید ", - text: "", - type: "warning", - showCancelButton: true, - confirmButtonColor: "#DD6B55", - //confirmButtonText: "بستن", - cancelButtonText: "بستن", - closeOnConfirm: false, - customClass: "errorSwall" - }); - //$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', " ابتدا آیتمهای کارگاه و ماه را انتخاب کنید "); - } else if (year.trim() == "" && month.trim() != "" && workshopId == "0") { - //$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', " ابتدا آیتمهای کارگاه و سال را انتخاب کنید "); - swal({ - title: "لطفا در قسمت جستجوی تصفیه حساب آیتمهای کارگاه و سال را انتخاب نموده و روی کلید جستجو کلیک کنید ", - text: "", - type: "warning", - showCancelButton: true, - confirmButtonColor: "#DD6B55", - //confirmButtonText: "بستن", - cancelButtonText: "بستن", - closeOnConfirm: false, - customClass: "errorSwall" - }); - } else if (year.trim() != "" && month.trim() == "" && workshopId != "0") { - swal({ - title: "لطفا در قسمت جستجوی تصفیه حساب آیتم ماه را انتخاب نموده و روی کلید جستجو کلیک کنید ", - text: "", - type: "warning", - showCancelButton: true, - confirmButtonColor: "#DD6B55", - //confirmButtonText: "بستن", - cancelButtonText: "بستن", - closeOnConfirm: false, - customClass: "errorSwall" - }); - //$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', " ابتدا آیتم ماه را انتخاب کنید "); - } else if (year.trim() != "" && month.trim() != "" && workshopId == "0") { - swal({ - title: "لطفا در قسمت جستجوی تصفیه حساب آیتم کارگاه را انتخاب نموده و روی کلید جستجو کلیک کنید ", //"ابتدا آیتم کارگاه را انتخاب کنید ", - text: "", - type: "warning", - showCancelButton: true, - confirmButtonColor: "#DD6B55", - //confirmButtonText: "بستن", - cancelButtonText: "بستن", - closeOnConfirm: false, - customClass: "errorSwall" - }); - // $.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', " ابتدا آیتم کارگاه را انتخاب کنید "); - } else if (year.trim() == "" && month.trim() != "" && workshopId != "0") { - //$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', " ابتدا آیتم سال را انتخاب کنید "); - swal({ - title: "لطفا در قسمت جستجوی تصفیه حساب آیتم سال را انتخاب نموده و روی کلید جستجو کلیک کنید ", - text: "", - type: "warning", - showCancelButton: true, - confirmButtonColor: "#DD6B55", - //confirmButtonText: "بستن", - cancelButtonText: "بستن", - closeOnConfirm: false, - customClass: "errorSwall" - }); - } else { - let ids = []; - $("input[name=foo]:checked").each(function() { - const id = $(this).val(); - ids.push(id); - }); - if (ids.length == 0) { - //$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', " هیچ تصفیه حسابی انتخاب نشده است "); - swal({ - title: "هیچ تصفیه حسابی انتخاب نشده است ", - text: "لطفا از تیک های سمت راست جدول، تصفیه حسابهای مورد نظر را انتخاب کنید.", - type: "warning", - showCancelButton: true, - confirmButtonColor: "#DD6B55", - //confirmButtonText: "بستن", - cancelButtonText: "بستن", - closeOnConfirm: false, - customClass: "errorSwall" - }); - - } else if (document.getElementById("sercheSignCheck").value == "false") { - swal({ - title: "لطفا روی کلید جستجو کلیک کنید ", - text: "", - type: "warning", - showCancelButton: true, - confirmButtonColor: "#DD6B55", - //confirmButtonText: "بستن", - cancelButtonText: "بستن", - closeOnConfirm: false, - customClass: "errorSwall" - }); - } else { - swal({ - title: "آیا امضای تصفیه حسابهای انتخاب شده اطمینان دارید؟", - text: "", - type: "warning", - showCancelButton: true, - confirmButtonColor: "#DD6B55", - confirmButtonText: "بله", - cancelButtonText: "خیر", - closeOnConfirm: false, - closeOnCancel: true - }, - function(isConfirm) { - if (isConfirm) { - $(".alarm").removeClass('alarm'); - $.ajax({ - async: false, - dataType: 'json', - type: 'POST', - url: '@Url.Page("/Company/Checkouts/Index", "SignatureAll")', - headers: { "RequestVerificationToken": $('@Html.AntiForgeryToken()').val() }, - data: { "ids": ids, "workshopId": workshopId }, - success: function(response) { - console.log(response); - if (response.isSuccedded) { - swal({ - title: "امضای تصفیه حسابهای انتخاب شده با موفقیت انجام شد ", - text: "", - type: "success", - showCancelButton: true, - confirmButtonColor: "#DD6B55", - confirmButtonText: "بستن", - cancelButtonText: "خیر", - closeOnConfirm: true, - customClass: "successSwall" - }, - function(isConfirm) { - if (isConfirm) { - for (let index = 0; index < ids.length; index++) { - $(`#td_${ids[index]}`).html(` `); - } - $('.myLinkSign').click(function(event) { - signAjax(event, this); - }); - } - }); - } - //$.Notification.notify('success', 'top center', 'پیام سیستم ', " امضای تصفیه حسابهای انتخاب شده با موفقیت انجام شد."); - else - //$.Notification.notify('error', 'top center', 'پیام سیستم ', " امضای تصفیه حسابهای انتخاب شده با خطا مواجه شد."); - { - swal({ - title: "امضای تصفیه حسابهای انتخاب شده با خطا مواجه شد ", - text: "", - type: "warning", - showCancelButton: true, - confirmButtonColor: "#DD6B55", - //confirmButtonText: "بستن", - cancelButtonText: "بستن", - closeOnConfirm: false, - customClass: "errorSwall" - }); - } - }, - failure: function(response) { - //console.log(5, response); - } - }); - } - }); - } - } - } - - function deleteAllSignature() { - $('.sweet-alert').removeClass("successSwall"); - $('.sweet-alert').removeClass("errorSwall"); - var workshopId = Number($("#workshops").val()); - var year = $("#SearchModel_Year").val(); - var month = $("#SearchModel_Month").val(); - if (year.trim() == "" && month.trim() == "" && workshopId == "0") { - swal({ - title: "لطفا در قسمت جستجوی تصفیه حساب آیتمهای کارگاه، سال و ماه را انتخاب نموده و روی کلید جستجو کلیک کنید ", - text: "", - type: "warning", - showCancelButton: true, - confirmButtonColor: "#DD6B55", - //confirmButtonText: "بستن", - cancelButtonText: "بستن", - closeOnConfirm: false, - customClass: "errorSwall" - }); - //$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', " ابتدا آیتمهای کارگاه و سال , ماه را انتخاب کنید "); - } else if (year.trim() == "" && month.trim() == "" && workshopId != "0") { - swal({ - title: "لطفا در قسمت جستجوی تصفیه حساب آیتمهای سال و ماه را انتخاب نموده و روی کلید جستجو کلیک کنید ", - text: "", - type: "warning", - showCancelButton: true, - confirmButtonColor: "#DD6B55", - //confirmButtonText: "بستن", - cancelButtonText: "بستن", - closeOnConfirm: false, - customClass: "errorSwall" - }); - //$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', " ابتدا آیتمهای سال و ماه را انتخاب کنید "); - } else if (year.trim() != "" && month.trim() == "" && workshopId == "0") { - swal({ - title: "لطفا در قسمت جستجوی تصفیه حساب آیتمهای کارگاه و ماه را انتخاب نموده و روی کلید جستجو کلیک کنید ", - text: "", - type: "warning", - showCancelButton: true, - confirmButtonColor: "#DD6B55", - //confirmButtonText: "بستن", - cancelButtonText: "بستن", - closeOnConfirm: false, - customClass: "errorSwall" - }); - //$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', " ابتدا آیتمهای کارگاه و ماه را انتخاب کنید "); - } else if (year.trim() == "" && month.trim() != "" && workshopId == "0") { - //$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', " ابتدا آیتمهای کارگاه و سال را انتخاب کنید "); - swal({ - title: "لطفا در قسمت جستجوی تصفیه حساب آیتمهای کارگاه و سال را انتخاب نموده و روی کلید جستجو کلیک کنید ", - text: "", - type: "warning", - showCancelButton: true, - confirmButtonColor: "#DD6B55", - //confirmButtonText: "بستن", - cancelButtonText: "بستن", - closeOnConfirm: false, - customClass: "errorSwall" - }); - } else if (year.trim() != "" && month.trim() == "" && workshopId != "0") { - swal({ - title: "لطفا در قسمت جستجوی تصفیه حساب آیتم ماه را انتخاب نموده و روی کلید جستجو کلیک کنید ", - text: "", - type: "warning", - showCancelButton: true, - confirmButtonColor: "#DD6B55", - //confirmButtonText: "بستن", - cancelButtonText: "بستن", - closeOnConfirm: false, - customClass: "errorSwall" - }); - //$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', " ابتدا آیتم ماه را انتخاب کنید "); - } else if (year.trim() != "" && month.trim() != "" && workshopId == "0") { - swal({ - title: "لطفا در قسمت جستجوی تصفیه حساب آیتم کارگاه را انتخاب نموده و روی کلید جستجو کلیک کنید ", //"ابتدا آیتم کارگاه را انتخاب کنید ", - text: "", - type: "warning", - showCancelButton: true, - confirmButtonColor: "#DD6B55", - //confirmButtonText: "بستن", - cancelButtonText: "بستن", - closeOnConfirm: false, - customClass: "errorSwall" - }); - // $.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', " ابتدا آیتم کارگاه را انتخاب کنید "); - } else if (year.trim() == "" && month.trim() != "" && workshopId != "0") { - //$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', " ابتدا آیتم سال را انتخاب کنید "); - swal({ - title: "لطفا در قسمت جستجوی تصفیه حساب آیتم سال را انتخاب نموده و روی کلید جستجو کلیک کنید ", - text: "", - type: "warning", - showCancelButton: true, - confirmButtonColor: "#DD6B55", - //confirmButtonText: "بستن", - cancelButtonText: "بستن", - closeOnConfirm: false, - customClass: "errorSwall" - }); - } else { - let ids = []; - $("input[name=foo]:checked").each(function() { - const id = $(this).val(); - ids.push(id); - }); - if (ids.length == 0) { - swal({ - title: "هیچ تصفیه حسابی انتخاب نشده است ", - text: "لطفا از تیک های سمت راست جدول، تصفیه حسابهای مورد نظر را انتخاب کنید.", - type: "warning", - showCancelButton: true, - confirmButtonColor: "#DD6B55", - //confirmButtonText: "بستن", - cancelButtonText: "بستن", - closeOnConfirm: false, - customClass: "errorSwall" - }); - //$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', " هیچ تصفیه حسابی انتخاب نشده است "); - } else if (document.getElementById("sercheSignCheck").value != "true") { - swal({ - title: "لطفا روی کلید جستجو کلیک کنید ", - text: "", - type: "warning", - showCancelButton: true, - confirmButtonColor: "#DD6B55", - //confirmButtonText: "بستن", - cancelButtonText: "بستن", - closeOnConfirm: false, - customClass: "errorSwall" - }); - } else { - swal({ - title: "آیا از حذف امضای تصفیه حسابهای انتخاب شده اطمینان دارید؟", - text: "", - type: "warning", - showCancelButton: true, - confirmButtonColor: "#DD6B55", - confirmButtonText: "بله", - cancelButtonText: "خیر", - closeOnConfirm: false, - closeOnCancel: true - }, - function(isConfirm) { - if (isConfirm) { - $(".alarm").removeClass('alarm'); - $.ajax({ - async: false, - dataType: 'json', - type: 'POST', - url: '@Url.Page("/Company/Checkouts/Index", "DeleteAllSignature")', - headers: { "RequestVerificationToken": $('@Html.AntiForgeryToken()').val() }, - data: { "ids": ids, "workshopId": workshopId }, - success: function(response) { - if (response.isSuccedded) { - //$.Notification.notify('success', 'top center', 'پیام سیستم ', "حذف امضای تصفیه حسابهای انتخاب شده با موفقیت انجام شد."); - swal({ - title: "حذف امضای تصفیه حسابهای انتخاب شده با موفقیت انجام شد ", - text: "", - type: "success", - showCancelButton: true, - confirmButtonColor: "#DD6B55", - confirmButtonText: "بستن", - //cancelButtonText: "خیر", - closeOnConfirm: true, - customClass: "successSwall" - }, - function(isConfirm) { - if (isConfirm) { - for (let index = 0; index < ids.length; index++) { - $(`#td_${ids[index]}`).html(` `); - } - $('.myLinkSign').click(function(event) { - signAjax(event, this); - }); - } - }); - - } else { - swal({ - title: "حذف امضای تصفیه حسابهای انتخاب شده با خطا مواجه شد", - text: "", - type: "warning", - showCancelButton: true, - confirmButtonColor: "#DD6B55", - //confirmButtonText: "بستن", - cancelButtonText: "بستن", - closeOnConfirm: false, - customClass: "errorSwall" - }); - } - - }, - failure: function(response) { - //console.log(5, response); - } - }); - } - }); - } - } - } - - $("#empSearch").keypress(function(event) { - if (event.keyCode === 13) { - if ($("#SearchModel_EmployeeId").val() == "0") - $("#SearchModel_EmployeeName").val($("#empSearch").val()); - $("#btnSearch").click(); - } - }); - - //------------End new Change--------------- - -} \ No newline at end of file diff --git a/ServiceHost/Areas/Admin/Pages/Company/ContractingParties/Index.cshtml b/ServiceHost/Areas/Admin/Pages/Company/ContractingParties/Index.cshtml index fc3ee624..96a72864 100644 --- a/ServiceHost/Areas/Admin/Pages/Company/ContractingParties/Index.cshtml +++ b/ServiceHost/Areas/Admin/Pages/Company/ContractingParties/Index.cshtml @@ -1,18 +1,18 @@ @page +@using CompanyManagment.App.Contracts.PersonalContractingParty @model ServiceHost.Areas.Admin.Pages.Company.ContractingParties.IndexModel @{ - //string colaps = "in"; - //string act = "active"; - var i = 1; - var withOutContract = "withOutInstitutionContract"; + //string colaps = "in"; + //string act = "active"; + int i = 1; + string withOutContract = "withOutInstitutionContract"; } -@{ - var employerList = ""; - Layout = "Shared/_AdminLayout"; - ViewData["title"] = "طرف حساب ها"; - - var selctedOption = "selectedOption"; + var selctedOption = "selectedOption"; } @section Styles { - + } -
- -
-
-
- -
-
- @*===================================================================================================================*@ -
-
-
-
-
-
- - - - - -
-
- - - - -
-
- - - - - -
-
-
-
-
- - - - -
-
- جستجو - - حذف فیلتر -
-
-
-
-
-
- @*==================================================================personal=====*@ -
-
-
-
-
+ +
+
+
+ +
+
+ @*===================================================================================================================*@ +
+
+
+
+
+
+ + + + + +
+
+ + + + +
+
+ + + + + +
+
+
+
+
+ + + + +
+
+ جستجو + + حذف فیلتر +
+
+
+
+
+
+ @*==================================================================personal=====*@ +
+
+
+
+
-
-
-
-

لیست طرف حساب ها

-
-
-
-
- - - - - - - - - @**@ - - - - - - -@foreach (var item in Model.Personals) -{ - employerList = ""; +
+
+
+

لیست طرف حساب ها

+
+
+
+
+
#نام طرف حسابشمارهشناسنامه / شماره ثبتعملیات
+ + + + + + + + @**@ + + + + + + + @foreach (var item in Model.Personals) + { + employerList = ""; - - - - - - - - + + + + + + + + + + - - { - i++; - } -} - -
#نام طرف حسابشمارهشناسنامه / شماره ثبتعملیات
@i - - @if (item.IsLegal == "حقیقی") - { - @item.FName -   - @item.LName - } - else - { - @item.LName - } - -
-

- @if (item.IsLegal == "حقیقی") - { - @item.FName -   - @item.LName - } - else - { - @item.LName - } -

- - @if (item.IsLegal == "حقیقی") - { - @item.FName -   - @item.LName - } - else - { - @item.LName - } - -
-
@item.IdNumber@item.RegisterId
@i + + @if (item.IsLegal == "حقیقی") + { + @item.FName +   + @item.LName + } + else + { + @item.LName + } + +
+

+ @if (item.IsLegal == "حقیقی") + { + @item.FName +   + @item.LName + } + else + { + @item.LName + } +

+ + @if (item.IsLegal == "حقیقی") + { + @item.FName +   + @item.LName + } + else + { + @item.LName + } + +
+
@item.IdNumber@item.RegisterId +
+ @if (item.IsActiveString == "true") + { -
-
- @if (item.IsActiveString == "true") - { - if (item.HasInstitutionContract) - { - - - - } - else - { - - - - } - } - else - { - - - - } - @if (item.IsLegal == "حقیقی") - { - - - + if (item.HasInstitutionContract) + { + + + + } + else + { + + + + } + } + else + { + + + + } + @if (item.IsLegal == "حقیقی") + { + + + - @if (item.IsBlock == "true") - { - - @item.BlockTimes - - - } - else if (item.BlockTimes == 2) - { - - @item.BlockTimes - - - } - else if (item.BlockTimes == 1) - { - - @item.BlockTimes - - - } - else if (item.BlockTimes == 0 || item.IsBlock != "true") - { - - @item.BlockTimes - - - } - - - - } - else - { - - - - @if (item.IsBlock == "true") - { - - @item.BlockTimes - - - } - else if (item.BlockTimes == 2) - { - - @item.BlockTimes - - - } - else if (item.BlockTimes == 1) - { - - @item.BlockTimes - - - } - else if (item.BlockTimes == 0) - { - - @item.BlockTimes - - - } - - - - } -
-
-
- - - -
+ @if (item.IsBlock == "true") + { + + @item.BlockTimes + + + } + else if(item.BlockTimes==2) + { + + @item.BlockTimes + + + } + else if(item.BlockTimes==1) + { + + @item.BlockTimes + + + } + else if(item.BlockTimes==0 || item.IsBlock != "true") + { + + @item.BlockTimes + + + } + + + + } + else + { + + + + @if (item.IsBlock == "true") + { + + @item.BlockTimes + + + } + else if(item.BlockTimes==2) + { + + @item.BlockTimes + + + } + else if(item.BlockTimes==1) + { + + @item.BlockTimes + + + } + else if(item.BlockTimes==0 ) + { + + @item.BlockTimes + + + } + + + + } +
+
+
+ +
- @if (item.IsLegal == "حقیقی") - { - - - + @if (item.IsLegal == "حقیقی") + { + + + - @if (item.IsBlock == "true") - { - - @item.BlockTimes - - - } - else if (item.BlockTimes == 2) - { - - @item.BlockTimes - - - } - else if (item.BlockTimes == 1) - { - - @item.BlockTimes - - - } - else if (item.BlockTimes == 0 || item.IsBlock != "true") - { - - @item.BlockTimes - - - } - - - - } - else - { - - - - @if (item.IsBlock == "true") - { - - @item.BlockTimes - - - } - else if (item.BlockTimes == 2) - { - - @item.BlockTimes - - - } - else if (item.BlockTimes == 1) - { - - @item.BlockTimes - - - } - else if (item.BlockTimes == 0) - { - - @item.BlockTimes - - - } + @if (item.IsBlock == "true") + { + + @item.BlockTimes + + + } + else if(item.BlockTimes==2) + { + + @item.BlockTimes + + + } + else if(item.BlockTimes==1) + { + + @item.BlockTimes + + + } + else if(item.BlockTimes==0 || item.IsBlock != "true") + { + + @item.BlockTimes + + + } + + + + } + else + { + + + + @if (item.IsBlock == "true") + { + + @item.BlockTimes + + + } + else if(item.BlockTimes==2) + { + + @item.BlockTimes + + + } + else if(item.BlockTimes==1) + { + + @item.BlockTimes + + + } + else if(item.BlockTimes==0 ) + { + + @item.BlockTimes + + + } - - - - } - @if (item.IsActiveString == "true") - { - if (item.HasInstitutionContract) - { - - - - } - else - { - - - - } - } - else - { - - - - } -
-
-
-
-
-
-
-
-
+ + + + } + @if (item.IsActiveString == "true") + { + if (item.HasInstitutionContract) + { + + + + } + else + { + + + + } + } + else + { + + + + } +
+ + + + + { + i++; + } + } + + + + + + + + + @section Script { - - - - - - - - - - - - - - - - - - } + + + + + + + + + + + + + + + + + +} diff --git a/ServiceHost/Areas/Admin/Pages/Company/Contracts/Index.cshtml b/ServiceHost/Areas/Admin/Pages/Company/Contracts/Index.cshtml index 59f11557..3b3957cd 100644 --- a/ServiceHost/Areas/Admin/Pages/Company/Contracts/Index.cshtml +++ b/ServiceHost/Areas/Admin/Pages/Company/Contracts/Index.cshtml @@ -1,20 +1,21 @@ @page +@using CompanyManagment.App.Contracts.PersonalContractingParty @model ServiceHost.Areas.Admin.Pages.Company.Contracts.IndexModel @{ - //string colaps = "in"; - //string act = "active"; - var i = 1; + //string colaps = "in"; + //string act = "active"; + int i = 1; } @{ - //Layout = "~/Pages/Shared/_Layout.cshtml"; - Layout = "Shared/_AdminLayout"; - ViewData["title"] = "قرارداد"; - - var selctedOption = "selectedOption"; + var selctedOption = "selectedOption"; } - @section Styles { - + } -
-
-
-

- -

-

- -

- - - +
+
+

+ +

+

+ +

+ + + - @*href="#showmodal=@Url.Page("./Index", "PrintAll", new {ids = idss})"*@ -
-
+ @*href="#showmodal=@Url.Page("./Index", "PrintAll", new {ids = idss})"*@ +
+
-
-
- -
-
- @*===================================================================================================================*@ -
-
-
-
-
-
-
- -
-
-
-
- -
-
-
- - - - -
-
    - -
-
-
-
-
- - -
-
-
-
-
-
-
- انتخاب تاریخ -
-
- -
-
- -
-
- -
-
- @**@ - -
-
-
-
- @**@ - -
- -
- -
-
- @**@ - - -
-
-
- -
-
- - -
-
- جستجو - - حذف فیلتر -
-
-
-
-
-
- @*==================================================================personal=====*@ -
-
-
- -
-
- -
-
-
-

لیست قرارداد ها

-
-
-
-
- - - - - - - - - - - - - - - - - - - - - -@foreach (var item in Model.Contracts) -{ - - - - - - - - - - - - - - @{ - i++; - } - - - +
+
+ +
+
+ @*===================================================================================================================*@ +
+
+
+
+
+
+
+ +
+
+
+
+ +
+
+
+ + + + +
+
    + +
+
+
+
+
+ + +
+
+
+
+
+
+
+ انتخاب تاریخ +
+
+ +
+
+ +
+
+ +
+
+ @**@ + +
+
+
+
+ @**@ + +
+ +
+ +
+
+ @**@ + + +
+
+
+ +
+
+ + +
+
+ جستجو + + حذف فیلتر +
+
+
+ +
+
+ @*==================================================================personal=====*@ +
+
+
+ +
+ + +
+
+
+

لیست قرارداد ها

+
+
+
+
+
#کارگاه پرسنل آغاز قراردادپایان قرارداد - - - - - - - - - -
@i - - @item.WorkshopName - -
-

- @item.WorkshopName -

- - @item.WorkshopName - -
-
- - @item.EmployeeName - -
-

- @item.EmployeeName -

- - @item.EmployeeName - -
-
- - @item.ContarctStart - -
-

- @item.ContarctStart -

- - @item.ContarctStart - -
-
- - @item.ContractEnd - -
-

- @item.ContractEnd -

- - @item.ContractEnd - -
-
- - -
+ + + + + + + + + + + + + + + + + + + + + @foreach (var item in Model.Contracts) + { + + + + + + + + + + + + + + + + @{ + i++; + } + + + + } + +
#کارگاه پرسنل آغاز قراردادپایان قرارداد + + + + + + + + + +
@i + + @item.WorkshopName + +
+

+ @item.WorkshopName +

+ + @item.WorkshopName + +
+
+ + @item.EmployeeName + +
+

+ @item.EmployeeName +

+ + @item.EmployeeName + +
+
+ + @item.ContarctStart + +
+

+ @item.ContarctStart +

+ + @item.ContarctStart + +
+
+ + @item.ContractEnd + +
+

+ @item.ContractEnd +

+ + @item.ContractEnd + +
+
+ + +
+
+
+
+
+
-
-
- +
+
@section Script { - - - - @* *@ - - - - - - - - - - + + +@* *@ + + + + + + + + + + + - - + + } - - }); - }); + - //if (employeeSearch != '' && workshopId != "0") { - // در صورتیکه پرسنل و کارگاه سرچ شد، نیاز به انتخاب سال و ماه نباشد - // swal({ - // title: "لطفا در قسمت جستجوی قرارداد آیتمهای کارگاه، سال و ماه را انتخاب نموده و روی کلید جستجو کلیک کنید ", - // text: "", - // type: "warning", - // showCancelButton: true, - // confirmButtonColor: "#DD6B55", - // //confirmButtonText: "بستن", - // cancelButtonText: "بستن", - // closeOnConfirm: false, - // customClass: "errorSwall" - // }); - // } - // else{ - if (year.trim() == "" && month.trim() == "" && workshopId == "0") { - swal({ - title: "لطفا در قسمت جستجوی قرارداد آیتمهای کارگاه، سال و ماه را انتخاب نموده و روی کلید جستجو کلیک کنید ", - text: "", - type: "warning", - showCancelButton: true, - confirmButtonColor: "#DD6B55", - //confirmButtonText: "بستن", - cancelButtonText: "بستن", - closeOnConfirm: false, - customClass: "errorSwall" - }); - //$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', " ابتدا آیتمهای کارگاه و سال , ماه را انتخاب کنید "); - } else if (year.trim() == "" && month.trim() == "" && workshopId != "0") { - swal({ - title: "لطفا در قسمت جستجوی قرارداد آیتمهای سال و ماه را انتخاب نموده و روی کلید جستجو کلیک کنید ", - text: "", - type: "warning", - showCancelButton: true, - confirmButtonColor: "#DD6B55", - //confirmButtonText: "بستن", - cancelButtonText: "بستن", - closeOnConfirm: false, - customClass: "errorSwall" - }); - //$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', " ابتدا آیتمهای سال و ماه را انتخاب کنید "); - } else if (year.trim() != "" && month.trim() == "" && workshopId == "0") { - swal({ - title: "لطفا در قسمت جستجوی قرارداد آیتمهای کارگاه و ماه را انتخاب نموده و روی کلید جستجو کلیک کنید ", - text: "", - type: "warning", - showCancelButton: true, - confirmButtonColor: "#DD6B55", - //confirmButtonText: "بستن", - cancelButtonText: "بستن", - closeOnConfirm: false, - customClass: "errorSwall" - }); - //$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', " ابتدا آیتمهای کارگاه و ماه را انتخاب کنید "); - } else if (year.trim() == "" && month.trim() != "" && workshopId == "0") { - //$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', " ابتدا آیتمهای کارگاه و سال را انتخاب کنید "); - swal({ - title: "لطفا در قسمت جستجوی قرارداد آیتمهای کارگاه و سال را انتخاب نموده و روی کلید جستجو کلیک کنید ", - text: "", - type: "warning", - showCancelButton: true, - confirmButtonColor: "#DD6B55", - //confirmButtonText: "بستن", - cancelButtonText: "بستن", - closeOnConfirm: false, - customClass: "errorSwall" - }); - } else if (year.trim() != "" && month.trim() == "" && workshopId != "0") { - swal({ - title: "لطفا در قسمت جستجوی قرارداد آیتم ماه را انتخاب نموده و روی کلید جستجو کلیک کنید ", - text: "", - type: "warning", - showCancelButton: true, - confirmButtonColor: "#DD6B55", - //confirmButtonText: "بستن", - cancelButtonText: "بستن", - closeOnConfirm: false, - customClass: "errorSwall" - }); - //$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', " ابتدا آیتم ماه را انتخاب کنید "); - } else if (year.trim() != "" && month.trim() != "" && workshopId == "0") { - swal({ - title: "لطفا در قسمت جستجوی قرارداد آیتم کارگاه را انتخاب نموده و روی کلید جستجو کلیک کنید ", //"ابتدا آیتم کارگاه را انتخاب کنید ", - text: "", - type: "warning", - showCancelButton: true, - confirmButtonColor: "#DD6B55", - //confirmButtonText: "بستن", - cancelButtonText: "بستن", - closeOnConfirm: false, - customClass: "errorSwall" - }); - // $.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', " ابتدا آیتم کارگاه را انتخاب کنید "); - } else if (year.trim() == "" && month.trim() != "" && workshopId != "0") { - //$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', " ابتدا آیتم سال را انتخاب کنید "); - swal({ - title: "لطفا در قسمت جستجوی قرارداد آیتم سال را انتخاب نموده و روی کلید جستجو کلیک کنید ", - text: "", - type: "warning", - showCancelButton: true, - confirmButtonColor: "#DD6B55", - //confirmButtonText: "بستن", - cancelButtonText: "بستن", - closeOnConfirm: false, - customClass: "errorSwall" - }); - } else { - let ids = []; - $("input[name=foo]:checked").each(function() { - const id = $(this).val(); - ids.push(id); - }); - if (ids.length == 0) { - //$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', " هیچ قراردادی انتخاب نشده است "); - swal({ - title: "هیچ قراردادی انتخاب نشده است ", - text: "لطفا از تیک های سمت راست جدول، قراردادهای مورد نظر را انتخاب کنید.", - type: "warning", - showCancelButton: true, - confirmButtonColor: "#DD6B55", - //confirmButtonText: "بستن", - cancelButtonText: "بستن", - closeOnConfirm: false, - customClass: "errorSwall" - }); +} - } else if (document.getElementById("sercheSignCheck").value == "false") { - swal({ - title: "لطفا روی کلید جستجو کلیک کنید ", - text: "", - type: "warning", - showCancelButton: true, - confirmButtonColor: "#DD6B55", - //confirmButtonText: "بستن", - cancelButtonText: "بستن", - closeOnConfirm: false, - customClass: "errorSwall" - }); - } else { - swal({ - title: "آیا امضای قراردادهای انتخاب شده اطمینان دارید؟", - text: "", - type: "warning", - showCancelButton: true, - confirmButtonColor: "#DD6B55", - confirmButtonText: "بله", - cancelButtonText: "خیر", - closeOnConfirm: false, - closeOnCancel: true - }, - function(isConfirm) { - if (isConfirm) { - $(".alarm").removeClass('alarm'); - $.ajax({ - async: false, - dataType: 'json', - type: 'POST', - url: '@Url.Page("/Company/Contracts/Index", "SignatureAll")', - headers: { "RequestVerificationToken": $('@Html.AntiForgeryToken()').val() }, - data: { "ids": ids, "workshopId": workshopId }, - success: function(response) { - console.log(response); - if (response.isSuccedded) { - swal({ - title: "امضای قراردادهای انتخاب شده با موفقیت انجام شد ", - text: "", - type: "success", - showCancelButton: true, - confirmButtonColor: "#DD6B55", - confirmButtonText: "بستن", - cancelButtonText: "خیر", - closeOnConfirm: true, - customClass: "successSwall" - }, - function(isConfirm) { - if (isConfirm) { - for (let index = 0; index < ids.length; index++) { - $(`#td_${ids[index]}`).html(` `); - } - $('.myLinkSign').click(function(event) { - signAjax(event, this); - }); - } - }); - } - //$.Notification.notify('success', 'top center', 'پیام سیستم ', " امضای قراردادهای انتخاب شده با موفقیت انجام شد."); - else - //$.Notification.notify('error', 'top center', 'پیام سیستم ', " امضای قراردادهای انتخاب شده با خطا مواجه شد."); - { - swal({ - title: "امضای قراردادهای انتخاب شده با خطا مواجه شد ", - text: "", - type: "warning", - showCancelButton: true, - confirmButtonColor: "#DD6B55", - //confirmButtonText: "بستن", - cancelButtonText: "بستن", - closeOnConfirm: false, - customClass: "errorSwall" - }); - } - }, - failure: function(response) { - //console.log(5, response); - } - }); - } - }); - } - } - // } - } - function deleteAllSignature() { - $('.sweet-alert').removeClass("successSwall"); - $('.sweet-alert').removeClass("errorSwall"); - var workshopId = Number($("#SearchModel_WorkshopIds").val()); - var year = $("#SearchModel_Year").val(); - var month = $("#SearchModel_Month").val(); - if (year.trim() == "" && month.trim() == "" && workshopId == "0") { - swal({ - title: "لطفا در قسمت جستجوی قرارداد آیتمهای کارگاه، سال و ماه را انتخاب نموده و روی کلید جستجو کلیک کنید ", - text: "", - type: "warning", - showCancelButton: true, - confirmButtonColor: "#DD6B55", - //confirmButtonText: "بستن", - cancelButtonText: "بستن", - closeOnConfirm: false, - customClass: "errorSwall" - }); - //$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', " ابتدا آیتمهای کارگاه و سال , ماه را انتخاب کنید "); - } else if (year.trim() == "" && month.trim() == "" && workshopId != "0") { - swal({ - title: "لطفا در قسمت جستجوی قرارداد آیتمهای سال و ماه را انتخاب نموده و روی کلید جستجو کلیک کنید ", - text: "", - type: "warning", - showCancelButton: true, - confirmButtonColor: "#DD6B55", - //confirmButtonText: "بستن", - cancelButtonText: "بستن", - closeOnConfirm: false, - customClass: "errorSwall" - }); - //$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', " ابتدا آیتمهای سال و ماه را انتخاب کنید "); - } else if (year.trim() != "" && month.trim() == "" && workshopId == "0") { - swal({ - title: "لطفا در قسمت جستجوی قرارداد آیتمهای کارگاه و ماه را انتخاب نموده و روی کلید جستجو کلیک کنید ", - text: "", - type: "warning", - showCancelButton: true, - confirmButtonColor: "#DD6B55", - //confirmButtonText: "بستن", - cancelButtonText: "بستن", - closeOnConfirm: false, - customClass: "errorSwall" - }); - //$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', " ابتدا آیتمهای کارگاه و ماه را انتخاب کنید "); - } else if (year.trim() == "" && month.trim() != "" && workshopId == "0") { - //$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', " ابتدا آیتمهای کارگاه و سال را انتخاب کنید "); - swal({ - title: "لطفا در قسمت جستجوی قرارداد آیتمهای کارگاه و سال را انتخاب نموده و روی کلید جستجو کلیک کنید ", - text: "", - type: "warning", - showCancelButton: true, - confirmButtonColor: "#DD6B55", - //confirmButtonText: "بستن", - cancelButtonText: "بستن", - closeOnConfirm: false, - customClass: "errorSwall" - }); - } else if (year.trim() != "" && month.trim() == "" && workshopId != "0") { - swal({ - title: "لطفا در قسمت جستجوی قرارداد آیتم ماه را انتخاب نموده و روی کلید جستجو کلیک کنید ", - text: "", - type: "warning", - showCancelButton: true, - confirmButtonColor: "#DD6B55", - //confirmButtonText: "بستن", - cancelButtonText: "بستن", - closeOnConfirm: false, - customClass: "errorSwall" - }); - //$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', " ابتدا آیتم ماه را انتخاب کنید "); - } else if (year.trim() != "" && month.trim() != "" && workshopId == "0") { - swal({ - title: "لطفا در قسمت جستجوی قرارداد آیتم کارگاه را انتخاب نموده و روی کلید جستجو کلیک کنید ", //"ابتدا آیتم کارگاه را انتخاب کنید ", - text: "", - type: "warning", - showCancelButton: true, - confirmButtonColor: "#DD6B55", - //confirmButtonText: "بستن", - cancelButtonText: "بستن", - closeOnConfirm: false, - customClass: "errorSwall" - }); - // $.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', " ابتدا آیتم کارگاه را انتخاب کنید "); - } else if (year.trim() == "" && month.trim() != "" && workshopId != "0") { - //$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', " ابتدا آیتم سال را انتخاب کنید "); - swal({ - title: "لطفا در قسمت جستجوی قرارداد آیتم سال را انتخاب نموده و روی کلید جستجو کلیک کنید ", - text: "", - type: "warning", - showCancelButton: true, - confirmButtonColor: "#DD6B55", - //confirmButtonText: "بستن", - cancelButtonText: "بستن", - closeOnConfirm: false, - customClass: "errorSwall" - }); - } else { - let ids = []; - $("input[name=foo]:checked").each(function() { - const id = $(this).val(); - ids.push(id); - }); - if (ids.length == 0) { - swal({ - title: "هیچ قراردادی انتخاب نشده است ", - text: "لطفا از تیک های سمت راست جدول، قراردادهای مورد نظر را انتخاب کنید.", - type: "warning", - showCancelButton: true, - confirmButtonColor: "#DD6B55", - //confirmButtonText: "بستن", - cancelButtonText: "بستن", - closeOnConfirm: false, - customClass: "errorSwall" - }); - //$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', " هیچ قراردادی انتخاب نشده است "); - } else if (document.getElementById("sercheSignCheck").value == "false") { - swal({ - title: "لطفا روی کلید جستجو کلیک کنید ", - text: "", - type: "warning", - showCancelButton: true, - confirmButtonColor: "#DD6B55", - //confirmButtonText: "بستن", - cancelButtonText: "بستن", - closeOnConfirm: false, - customClass: "errorSwall" - }); - } else { - swal({ - title: "آیا از حذف امضای قراردادهای انتخاب شده اطمینان دارید؟", - text: "", - type: "warning", - showCancelButton: true, - confirmButtonColor: "#DD6B55", - confirmButtonText: "بله", - cancelButtonText: "خیر", - closeOnConfirm: false, - closeOnCancel: true - }, - function(isConfirm) { - if (isConfirm) { - $(".alarm").removeClass('alarm'); - $.ajax({ - async: false, - dataType: 'json', - type: 'POST', - url: '@Url.Page("/Company/Contracts/Index", "DeleteAllSignature")', - headers: { "RequestVerificationToken": $('@Html.AntiForgeryToken()').val() }, - data: { "ids": ids, "workshopId": workshopId }, - success: function(response) { - if (response.isSuccedded) { - //$.Notification.notify('success', 'top center', 'پیام سیستم ', "حذف امضای قراردادهای انتخاب شده با موفقیت انجام شد."); - swal({ - title: "حذف امضای قراردادهای انتخاب شده با موفقیت انجام شد ", - text: "", - type: "success", - showCancelButton: true, - confirmButtonColor: "#DD6B55", - confirmButtonText: "بستن", - //cancelButtonText: "خیر", - closeOnConfirm: true, - customClass: "successSwall" - }, - function(isConfirm) { - if (isConfirm) { - for (let index = 0; index < ids.length; index++) { - $(`#td_${ids[index]}`).html(` `); - } - $('.myLinkSign').click(function(event) { - signAjax(event, this); - }); - } - }); - } else { - swal({ - title: "حذف امضای قراردادهای انتخاب شده با خطا مواجه شد", - text: "", - type: "warning", - showCancelButton: true, - confirmButtonColor: "#DD6B55", - //confirmButtonText: "بستن", - cancelButtonText: "بستن", - closeOnConfirm: false, - customClass: "errorSwall" - }); - } - - }, - failure: function(response) { - //console.log(5, response); - } - }); - } - }); - } - } - } - - $("#empSearch").keypress(function(event) { - if (event.keyCode === 13) { - if ($("#SearchModel_EmployeeId").val() == "0") - $("#SearchModel_EmployeeName").val($("#empSearch").val()); - $("#btnSearch").click(); - } - }); - - //------------End new Change--------------- - - - -} \ No newline at end of file diff --git a/ServiceHost/Areas/Admin/Pages/Company/Employees/Index.cshtml b/ServiceHost/Areas/Admin/Pages/Company/Employees/Index.cshtml index 3d1f7d2e..51278d85 100644 --- a/ServiceHost/Areas/Admin/Pages/Company/Employees/Index.cshtml +++ b/ServiceHost/Areas/Admin/Pages/Company/Employees/Index.cshtml @@ -1,16 +1,17 @@ @page +@using CompanyManagment.App.Contracts.PersonalContractingParty @model ServiceHost.Areas.Admin.Pages.Company.Employees.IndexModel @{ - //string colaps = "in"; - //string act = "active"; - var i = 1; + //string colaps = "in"; + //string act = "active"; + int i = 1; } @{ - Layout = "Shared/_AdminLayout"; - ViewData["title"] = "پرسنل"; - - var selctedOption = "selectedOption"; + var selctedOption = "selectedOption"; } - @section Styles -{ - - -} - + { + + + }
-
-
-
- -
-
- @*===================================================================================================================*@ -
-
-
-
-
-
- - @* *@ - - - - -
-
- - @* *@ - - - - +
+
+
+ +
+
+ @*===================================================================================================================*@ +
+
+ +
+
+
+ + @* *@ + + + + +
+
+ + @* *@ + + + + -
-
- - - - -
-
    -
-
-
-
- - -
+
+
+ + + + +
+
    +
+
+
+
+ + +
-
-
-
- @*
+
+
+
+ @*
*@ -
- - -
-
- - -
-
- - -
-
- -
-
-
- +
+ -
- @* +
+
+ @* *@ - جستجو - + جستجو + - حذف فیلتر -
-
-
- -
-
- @*==================================================================personal=====*@ -
-
-
+ حذف فیلتر +
+
+
+ +
+
+ @*==================================================================personal=====*@ +
+
+
+
+
- -
-
- -
-
-
-

لیست کارفرما

-
-
-
-
- - - - - @* *@ - - - - - - - - - - - - @foreach (var item in Model.Employees) - { - - - @* *@ - @* + + } + +
#نام و نام خانوادگیکد ملی عملیات
@i +
+
+
+

لیست کارفرما

+
+
+
+
+ + + + + @* *@ + + + + + + + + + + + + @foreach (var item in Model.Employees) + { + + + @* *@ +@* *@ - - - - - - - - - @{ - i++; - } - + + + + + + + + @{ + i++; + } + - - } - -
#نام و نام خانوادگیکد ملی عملیات
@i @item.FName   @item.LName - - @item.FName -   - @item.LName - -
-

- @item.FName - @item.LName -

- - @item.FName - @item.LName - -
-
- @item.NationalCode - -
- @*
+
+ + @item.FName +   + @item.LName + +
+

+ @item.FName + @item.LName +

+ + @item.FName + @item.LName + +
+
+ @item.NationalCode + + - +
-
-
-
-
-
+ + +

ویرایش اطلاعات

+
+ @if (item.IsActiveString == "true") + { + + +

حذف اطلاعات

+
+ } + else + { + + +

حذف اطلاعات

+
+ } + + + +
+
+
+
+
+
@section Script { - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + } \ No newline at end of file diff --git a/ServiceHost/Areas/Admin/Pages/Company/Employers/Index.cshtml b/ServiceHost/Areas/Admin/Pages/Company/Employers/Index.cshtml index c37edfa7..64e33aaf 100644 --- a/ServiceHost/Areas/Admin/Pages/Company/Employers/Index.cshtml +++ b/ServiceHost/Areas/Admin/Pages/Company/Employers/Index.cshtml @@ -1,19 +1,20 @@ @page +@using CompanyManagment.App.Contracts.PersonalContractingParty @model ServiceHost.Areas.Admin.Pages.Company.Employers.IndexModel @{ - //string colaps = "in"; - //string act = "active"; - var i = 1; - var withOutContractingParty = "withOutContractingParty"; + //string colaps = "in"; + //string act = "active"; + int i = 1; + string withOutContractingParty = "withOutContractingParty"; } @{ - var selctedOption = "selectedOption"; - var workshopList = ""; - Layout = "Shared/_AdminLayout"; - ViewData["title"] = "کارفرما"; - @*select2 css start*@ - } - @section Styles { - + } -
- -
-
-
-
-

- -

- @* + +
+
+
+ -
-
- @*===================================================================================================================*@ -
-
- @*
+
+
+
+ @*===================================================================================================================*@ +
+
+ @*

جستجو

-
*@ -
-
-
-
- - - - -
+
*@ + +
+
+
+ + + + +
+ +
+ + @* *@ -
- - @* *@ + + + +
- - - -
+
+ + + + +
+ -
- - - - -
+
+ + + + + +
+
+
+
+
+ + + + +
+
+ جستجو + + حذف فیلتر +
+
+
+ +
+
+ @*==================================================================personal=====*@ +
+
+
+
+
+ +
+
+
+

لیست کارفرما

+
+
+
+
+ + + + + + + + @**@ + + + + + + + @foreach (var item in Model.Employers) + { + workshopList = ""; + + + + + + + + + + { + i++; + } + } + +
#نام کارفرماشمارهشناسنامه / شماره ثبتعملیات
@i + + @if (item.IsLegal == "حقیقی") + { + @item.FName +   + @item.LName + } + else + { + @item.LName + } + +
+

+ @if (item.IsLegal == "حقیقی") + { + @item.FName +   + @item.LName + } + else + { + @item.LName + } +

+ + @if (item.IsLegal == "حقیقی") + { + @item.FName +   + @item.LName + } + else + { + @item.LName + } + +
+
@item.IdNumber@item.RegisterId +
+ @if (item.IsLegal == "حقیقی") + { + + + + + + + } + else + { + + + + + + + } -
- - - - - -
-
-
-
-
- - - - -
-
- جستجو - - حذف فیلتر -
-
- - - - - @*==================================================================personal=====*@ - - - - + @if (item.IsActive) + { + + } + else + { + + } + +
+
+ +
+ @if (item.IsLegal == "حقیقی") + { + + + + + + + } + else + { + + + + + + + + } + @if (item.IsActive) + { + + } + else + { + + } +
+
+
+ +
+
+
+
+
+
-
-
-
-

لیست کارفرما

-
-
-
-
- - - - - - - - @**@ - - - - - - - @foreach (var item in Model.Employers) - { - workshopList = ""; - - - - - - - - - - { - i++; - } - } - -
#نام کارفرماشمارهشناسنامه / شماره ثبتعملیات
@i - - @if (item.IsLegal == "حقیقی") - { - @item.FName -   - @item.LName - } - else - { - @item.LName - } - -
-

- @if (item.IsLegal == "حقیقی") - { - @item.FName -   - @item.LName - } - else - { - @item.LName - } -

- - @if (item.IsLegal == "حقیقی") - { - @item.FName -   - @item.LName - } - else - { - @item.LName - } - -
-
@item.IdNumber@item.RegisterId -
- @if (item.IsLegal == "حقیقی") - { - - - - - - - } - else - { - - - - - - - } - - @if (item.IsActive) - { - - - - } - else - { - - - - } -
-
-
- - - -
- @if (item.IsLegal == "حقیقی") - { - - - - - - - } - else - { - - - - - - - } - @if (item.IsActive) - { - - - - } - else - { - - - - } -
-
-
- -
-
-
-
-
-
-
@section Script { - - - - @* + + + + @* *@ - - - - - - - - - - - - - - - - - -} \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + +} + + + + diff --git a/ServiceHost/Areas/Admin/Pages/Company/Holidays/Index.cshtml b/ServiceHost/Areas/Admin/Pages/Company/Holidays/Index.cshtml index fd27066f..69c2dad9 100644 --- a/ServiceHost/Areas/Admin/Pages/Company/Holidays/Index.cshtml +++ b/ServiceHost/Areas/Admin/Pages/Company/Holidays/Index.cshtml @@ -1,18 +1,21 @@ @page +@using CompanyManagment.App.Contracts.PersonalContractingParty +@using Microsoft.EntityFrameworkCore +@using CompanyManagment.App.Contracts.Holiday @model ServiceHost.Areas.Admin.Pages.Company.Holidays.IndexModel @{ @* *@ - var i = 1; + int i = 1; } @{ - //Layout = "~/Pages/Shared/_Layout.cshtml"; - Layout = "Shared/_AdminLayout"; - ViewData["title"] = "تعطیلات رسمی"; - } @*@section Styles @@ -70,176 +77,159 @@
- - -
- - -
- - - -
- - - @*

+

+
+ + +
+ @*

*@ +
+ +
+
+
+ +
+
+ @*===================================================================================================================*@ +
+ +
+ +
+
+
+
+ + +
+
+ +
+ + +
+ +
+ +
+ + مشاهده همه +
+
+ + +
+ + +
+ +
+ + +
+ + @*==================================================================personal=====*@ + +
+
+
+
+
+ +
+
+
+

لیست تعطیلات

+
+
+
+
+ + + + + + + + @**@ + + + + + + @foreach (var item in Model.holidays) + { + + + + + + @**@ - + + -
-
+ @{ + i++; + } +
+ + - - - - - - - - - - -
-
-
-

لیست تعطیلات

-
-
-
-
-
# سال کد شغل عملیات
@i @item.JobName + @item.Year + + -
- -
-
- @*===================================================================================================================*@ - - -
- -
- -
-
-
-
- - -
- - -
- -
- - -
- -
- -
- - مشاهده همه -
-
- - -
- - -
- -
- - -
- - @*==================================================================personal=====*@ + + ویرایش + +
- - - - - - - - @**@ - - - - - - @foreach (var item in Model.holidays) - { - - - - @**@ - - - - - - @{ - i++; - } - - - - } + } - -
# سال کد شغل عملیات
@i @item.JobName - @item.Year - - - - - ویرایش - - - -
-
-
-
-
-
+ + +
+
+
+
+
+ @section Script { - - - - @* + + + + @* *@ - - - + + + + + + + +} - if (isValid) { - inputField2.style.backgroundColor = '#a6e9a6'; - - const url1 = '#showmodal='; - const url2 = '@Url.Page("/Company/Holidays/Index", "Create")'; - const url3 = document.getElementById('yearSend').value; - window.location.href = url1 + url2 + '&years=' + url3; - } else { - inputField2.style.backgroundColor = '#f94c4c'; - $.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', " لطفا سال را بصورت صحیح وارد کنید - مثال : 1400"); - Valid = false; - } - - /*return isValid;*/ - } - -} \ No newline at end of file diff --git a/ServiceHost/Areas/Admin/Pages/Company/InsuranceList/Index.cshtml b/ServiceHost/Areas/Admin/Pages/Company/InsuranceList/Index.cshtml index 8cee1d29..aac56660 100644 --- a/ServiceHost/Areas/Admin/Pages/Company/InsuranceList/Index.cshtml +++ b/ServiceHost/Areas/Admin/Pages/Company/InsuranceList/Index.cshtml @@ -2,9 +2,9 @@ @model ServiceHost.Areas.Admin.Pages.Company.InsuranceList.IndexModel @{ - Layout = "Shared/_AdminLayout"; - ViewData["title"] = "بیمه"; - var selctedOption = "selectedOption"; + Layout = "Shared/_AdminLayout"; + ViewData["title"] = "بیمه"; + var selctedOption = "selectedOption"; } @*select2 css start*@ @@ -81,574 +81,586 @@ border-color: grey !important; } - +
-
- -

- ایجاد لیست بیمه -

-
-
-
-
- -
-
- @*===================================================================================================================*@ -
-
-
-
-
-
-
انتخاب تاریخ
-
- - -
-
- - -
-
-
- - -
-
- - - - - - @* *@ -
-
- - - - - - @* *@ -
-
-
-
-
- - -
-
- - -
-
- -
-
- -
-
-
-
-
-
- - حذف جستجو -
-
-
-
-
-
-
-
-
-
-
-
-
-
-

لیست بیمه ی کارگاه ها

-
-
-
-
- -
-
-
-
-
+
+ +

+ @* pull-right *@ + ایجاد لیست بیمه +

+
+
+
+
+ +
+
+ @*===================================================================================================================*@ +
+
+
+
+
+
+
انتخاب تاریخ
+
+ + +
+
+ + +
+
+
+ + +
+
+ + + + + + @* *@ +
+
+ + + + + + @* *@ +
+
+
+
+
+ + +
+
+ + +
+
+ +
+
+ +
+
+
+
+
+
+ + حذف جستجو +
+
+
+
+
+
+
+
+
+
+
+
+
+
+

لیست بیمه ی کارگاه ها

+
+
+
+
+ +
+
+
+
+
+ + @section Script -{ - - - - - - - + { + + + + + + + } + \ No newline at end of file diff --git a/ServiceHost/Areas/Admin/Pages/Company/InsuranceList/InsuranceConfirm.cshtml b/ServiceHost/Areas/Admin/Pages/Company/InsuranceList/InsuranceConfirm.cshtml index 3994b6dc..a40c8ca0 100644 --- a/ServiceHost/Areas/Admin/Pages/Company/InsuranceList/InsuranceConfirm.cshtml +++ b/ServiceHost/Areas/Admin/Pages/Company/InsuranceList/InsuranceConfirm.cshtml @@ -1,4 +1,5 @@ @using _0_Framework.Application +@using _0_Framework.Application @model CompanyManagment.App.Contracts.InsuranceList.EditInsuranceList @@ -41,7 +42,7 @@ } .last-div{ width: 100%; - /* height: 55px; */ + /* height: 55px; */ } .printBtns { @@ -476,539 +477,542 @@ + @section Script { - - - - @* + + + + @* *@ - - - - @* + + + @**@ - @* - - - - @* *@ - - + + + +@* *@ + + + - + }); + - + } + else { + swal({ + title: response.message, + type: "warning", + showCancelButton: true, + confirmButtonColor: "#DD6B55", + //confirmButtonText: "بستن", + cancelButtonText: "بستن", + closeOnConfirm: false, + closeOnCancel: true, + customClass: "errorSwall" + }); + } + }, + failure: function (response) { + console.log(5, response) + } + }); + } + + }); + } + - + + + } - if ($("#SearchModel_ContractingPartyId").val() == "0" || $("#SearchModel_ContractingPartyId").val() == "") - $("#SearchModel_ContractingPartyName").val($("#empSearchContractingPartyID").val()); - - $("#btnSearch").click(); - }); - -} \ No newline at end of file diff --git a/ServiceHost/Areas/Admin/Pages/Company/Workshops/Index.cshtml b/ServiceHost/Areas/Admin/Pages/Company/Workshops/Index.cshtml index 24d563df..9dbaabfd 100644 --- a/ServiceHost/Areas/Admin/Pages/Company/Workshops/Index.cshtml +++ b/ServiceHost/Areas/Admin/Pages/Company/Workshops/Index.cshtml @@ -1,19 +1,20 @@ @page +@using CompanyManagment.App.Contracts.PersonalContractingParty @model ServiceHost.Areas.Admin.Pages.Company.Workshops.IndexModel @{ - //string colaps = "in"; - //string act = "active"; - var i = 1; + //string colaps = "in"; + //string act = "active"; + int i = 1; } @{ - //Layout = "~/Pages/Shared/_Layout.cshtml"; - Layout = "Shared/_AdminLayout"; - ViewData["title"] = "کارگاه"; - var employerList = ""; - var selctedOption = "selectedOption"; - @*select2 css start*@ - } - @section Styles { - + } - +
-
-
- -

- - ایجاد کارگاه - -

-
-
-
-
-
- -
-
- @*===================================================================================================================*@ -
-
-
-
-
-
-
- - - - - -
-
-
- - - - - @* + + + + +
+
+
+ + + + + @* *@ -
+
-
- - - @* @* + @* @* *@ -
-
-
-
-
-
-
-
- - -
-
-
-
- - + +
+
+
+
+ + +
+
+
+
+ +
+
+
+
+
+ +
+
+
+ +
+
+
+
+ + حذف فیلتر +
+
+ + +
+
+
+
+ + +
+
+ جستجو + + حذف فیلتر +
+
+
+
+
+ +
+
+
+
+
+
+
- -
-
-
-
- -
-
-
-
-
+
+
+
+

+ + لیست کارگاه ها +

+
+ +
+
+
+
+
+ + + + + + + + + + + + + + + + + @foreach (var item in Model.Workshops) + { + employerList = ""; + + + + + + + + + + + @{ + i++; + } + + + } + +
#نام کارگاهعملیات
@i + @item.WorkshopFullName +
+

@item.WorkshopFullName

+ @item.WorkshopFullName +
+
+
+
+ عملیات +
+ + +

+ اطلاعات پرسنل +

+
+ @* *@ + + + + + + + + + + -
-
-
-

لیست کارگاه ها

-
-
-
-
- - - - - - - - - - - - - - - - -@foreach (var item in Model.Workshops) -{ - employerList = ""; - - - - - - - - - - - @{ - i++; - } - - -} - -
#نام کارگاهعملیات
@i - @item.WorkshopFullName -
-

@item.WorkshopFullName

- @item.WorkshopFullName -
-
- -
- +
+
+ +
+ + + + + + + + + + + + + + + + - - - - - - + + + + + + + + + + + + + + + + + + @if (item.IsActiveString == "true") + { + + + + } + else + { + + + + } +
- - - - - - - - - - - @if (item.IsActiveString == "true") - { - - - - } - else - { - - - - } -
- -
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
@* *@ - @section Script { @@ -889,8 +952,8 @@ "lengthMenu": [[25, 10, 50, 100, -1], [25, 10, 50, 100, "All"]] //"autoWidth" :false }); - const state = $('#SearchModel_State').val(); - const city = $('#SearchModel_City').val(); + let state = $('#SearchModel_State').val(); + let city = $('#SearchModel_City').val(); console.log(state); console.log(city); @@ -905,7 +968,7 @@ } }); } else { - const option = new Option("شهرستان", 0); + var option = new Option("شهرستان", 0); $("#city2").append(option); $("#city2").trigger("change"); } @@ -919,7 +982,7 @@ //}); - $("#closeModal").click(function() { $('#MainModal').modal('hide'); }); + $("#closeModal").click(function() { $('#MainModal').modal('hide'); }) const $modal = $('#MainModal'); const $fixedDiv = $('.printBtns'); @@ -939,8 +1002,8 @@ }); function deActiveWorkshop(Id) { - const u2 = `&id=${Id}`; - const url = '#showmodal=@Url.Page("/Company/Workshops/Index", "ShowPersonnelList")'; + let u2 = '&id=' + Id; + let url = '#showmodal=@Url.Page("/Company/Workshops/Index", "ShowPersonnelList")'; var showList = url + u2; $('.sweet-alert').removeClass("successSwall"); $('.sweet-alert').removeClass("errorSwall"); @@ -1027,7 +1090,7 @@ }); $(document).on("click", function(event) { - const target = $(event.target); + var target = $(event.target); if (!target.closest(".buttons-container").length && !target.is(".employee-operations") && !target.is("#personelList") && !target.is("#personelList *") && !target.is("#createWorkshop") && !target.is("#createWorkshop *") && !target.is("#details") && !target.is("#details *") && !target.is("#editWorkshop") && !target.is("#editWorkshop *") ) { $(".buttons-container").removeClass("active").addClass("reverse"); @@ -1065,11 +1128,11 @@ } function locateButtonContainer() { - const beforePosition = $(".screen-view .employee-operations").position(); - const containerWidth = $('.screen-view .buttons-container').outerWidth(); - const containerHeight = $('.screen-view .buttons-container').outerHeight(); - const containerLeft = beforePosition.left + $(".screen-view .employee-operations").outerWidth() + 20; - const containerTop = beforePosition.top + ($(".screen-view .employee-operations").outerHeight() / 2) - (containerHeight / 2); + var beforePosition = $(".screen-view .employee-operations").position(); + var containerWidth = $('.screen-view .buttons-container').outerWidth(); + var containerHeight = $('.screen-view .buttons-container').outerHeight(); + var containerLeft = beforePosition.left + $(".screen-view .employee-operations").outerWidth() + 20; + var containerTop = beforePosition.top + ($(".screen-view .employee-operations").outerHeight() / 2) - (containerHeight / 2); $('.screen-view .buttons-container').css({ left: containerLeft, top: containerTop @@ -1077,11 +1140,11 @@ } function locateButtonContainerMobile() { - const beforePosition = $(".mobile-view .employee-operations").position(); - const containerWidth = $('.mobile-view .buttons-container').outerWidth(); - const containerHeight = $('.mobile-view .buttons-container').outerHeight(); - const containerLeft = beforePosition.left + $(".mobile-view .employee-operations").outerWidth() + 25; - const containerTop = beforePosition.top + ($(".mobile-view .employee-operations").outerHeight() / 2) - (containerHeight / 2); + var beforePosition = $(".mobile-view .employee-operations").position(); + var containerWidth = $('.mobile-view .buttons-container').outerWidth(); + var containerHeight = $('.mobile-view .buttons-container').outerHeight(); + var containerLeft = beforePosition.left + $(".mobile-view .employee-operations").outerWidth() + 25; + var containerTop = beforePosition.top + ($(".mobile-view .employee-operations").outerHeight() / 2) - (containerHeight / 2); $('.mobile-view .buttons-container').css({ left: containerLeft, top: containerTop @@ -1102,7 +1165,7 @@ var liPointerWorkshop; let countWorkshop = 0; - //close search Employee when click on body +//close search Employee when click on body $(document).on('click', function(event) { if (!$(event.target).closest(containerWorkshop).length) { @@ -1110,7 +1173,7 @@ } }); - //select option by mouse +//select option by mouse function selectItemWorkshop(id, employeeFullName) { searchBoxWorkshop.val(employeeFullName); hiddenInputValWorkshop.val(id); @@ -1118,7 +1181,7 @@ searchBoxWorkshop.addClass("selectedOption"); }; - //search by Ajax +//search by Ajax searchBoxWorkshop.on('keyup keypress', function(e) { $(".form-control").removeClass("selectedOption"); @@ -1173,7 +1236,7 @@ $(".noResult").remove(); containerWorkshop.show(); - const noResult = `
  • نتیجه ای یافت نشد
  • `; + let noResult = `
  • نتیجه ای یافت نشد
  • `; searchResulWorkshop.append(noResult); } } // endOfSuccess @@ -1237,7 +1300,7 @@ if (event.keyCode === 13) { if ($("#SearchModel_Id").val() == "0") - $("#SearchModel_WorkshopFullName").val($("#empSearchWorkshop").val()); + $("#SearchModel_WorkshopFullName").val($("#empSearchWorkshop").val()) $("#btnSearch").click(); } }); @@ -1257,7 +1320,7 @@ var liPointer; let count = 0; - //close search Employee when click on body +//close search Employee when click on body $(document).on('click', function(event) { if (!$(event.target).closest(container).length) { @@ -1265,7 +1328,7 @@ } }); - //select option by mouse +//select option by mouse function selectItem(id, employeeFullName) { searchBox.val(employeeFullName); hiddenInputVal.val(id); @@ -1273,7 +1336,7 @@ searchBox.addClass("selectedOption"); }; - //search by Ajax +//search by Ajax searchBox.on('keyup keypress', function(e) { $(".form-control").removeClass("selectedOption"); @@ -1317,14 +1380,14 @@ container.show(); $.each(response.mylist, function(i, item) { - const li = `
  • ${item.lName}
  • `; + let li = `
  • ${item.lName}
  • `; searchResul.append(li); }); } else { //result NotFounded $(".noResult").remove(); container.show(); - const noResult = `
  • نتیجه ای یافت نشد
  • `; + let noResult = `
  • نتیجه ای یافت نشد
  • `; searchResul.append(noResult); } } // endOfSuccess @@ -1386,7 +1449,7 @@ $("#SearchModel_WorkshopFullName").val(''); if (event.keyCode === 13) { if ($("#SearchModel_EmployerId").val() == "0") - $("#SearchModel_EmployerLName").val($("#empSearch").val()); + $("#SearchModel_EmployerLName").val($("#empSearch").val()) $("#btnSearch").click(); } }); @@ -1452,7 +1515,7 @@ function(isConfirm) { if (isConfirm) { //$("#btnSearch").click(); - const url = '@Url.Page("/Company/Workshops/Index")'; + var url = '@Url.Page("/Company/Workshops/Index")'; window.location.href = url; } }); @@ -1474,7 +1537,7 @@ function(isConfirm) { if (isConfirm) { //$("#btnSearch").click(); - const url = '@Url.Page("/Company/Workshops/Index")'; + var url = '@Url.Page("/Company/Workshops/Index")'; window.location.href = url; } }); @@ -1495,7 +1558,7 @@ } }, failure: function(response) { - console.log(5, response); + console.log(5, response) } }); } @@ -1544,7 +1607,7 @@ }, function(isConfirm) { if (isConfirm) { - const url = '@Url.Page("/Company/Workshops/Index")'; + var url = '@Url.Page("/Company/Workshops/Index")'; window.location.href = url; // $("#btnSearch").click(); } @@ -1566,7 +1629,7 @@ }, failure: function(response) { - console.log(5, response); + console.log(5, response) } }); } @@ -1581,12 +1644,46 @@ } function selectCity(element) { - const value = $(element).val(); + var value = $(element).val(); if (value != "0" && value != "") { $("#SearchModel_City").val($(element).find('option:selected').text()); } } + + $(document).ready(function() { + $(".accountList").select2({ + placeholder: "نام و نام خانوادگی اعضاء", + allowClear: true, + dir: "rtl" + }); + }); + + function printListWorkshopModal() { + var insuranceCode = $('#SearchModel_InsuranceCode').val(); + var state = $('#SearchModel_State').val(); + var city = $('#SearchModel_City').val(); + var isActiveString = $('#SearchModel_IsActiveString').val(); + var accountId = $('#SearchModel_AccountId').val(); + var accountIds = $('#SearchModel_AccountIds').val(); + + // if (accountIds == null) { + // $.Notification.autoHideNotify('error', 'bottom right', 'پیام سیستم ', "لطفا نام و نام خانوادگی اعضاء را انتخاب نمایید."); + // return false; + // } + + // var accountIdsNumbers = accountIds.map(function(value) { + // return Number(value); + // }); + // var accountIdsQuery = accountIdsNumbers.map(function(id) { + // return `SearchModel.AccountIds=${id}`; + // }).join('&'); + + // var parameter = `&SearchModel.InsuranceCode=${insuranceCode}&SearchModel.State=${state}&SearchModel.City=${city}&SearchModel.IsActiveString=${isActiveString}&${accountIdsQuery}`; + var parameter = `&SearchModel.InsuranceCode=${insuranceCode}&SearchModel.State=${state}&SearchModel.City=${city}&SearchModel.IsActiveString=${isActiveString}&SearchModel.AccountId=${accountId}`; + var url = '#showmodal=@Url.Page("/Company/Workshops/Index", "PrintListWorkshop")'; + window.location.href = url + parameter; + } +} -} \ No newline at end of file diff --git a/ServiceHost/Areas/Admin/Pages/Company/Workshops/Index.cshtml.cs b/ServiceHost/Areas/Admin/Pages/Company/Workshops/Index.cshtml.cs index 90f085d0..b9242b3e 100644 --- a/ServiceHost/Areas/Admin/Pages/Company/Workshops/Index.cshtml.cs +++ b/ServiceHost/Areas/Admin/Pages/Company/Workshops/Index.cshtml.cs @@ -810,4 +810,17 @@ public class IndexModel : PageModel } #endregion + + + #region Vafa + + public IActionResult OnGetPrintListWorkshop(WorkshopSearchModel searchModel) + { + var result = _workshopApplication.PrintWorkshopList(searchModel) + .OrderByDescending(x => !x.HasBlockContractingParty) + .ToList(); + return Partial("PrintListWorkshop", result); + } + + #endregion } \ No newline at end of file diff --git a/ServiceHost/Areas/Admin/Pages/Company/Workshops/PrintListWorkshop.cshtml b/ServiceHost/Areas/Admin/Pages/Company/Workshops/PrintListWorkshop.cshtml new file mode 100644 index 00000000..06133cfa --- /dev/null +++ b/ServiceHost/Areas/Admin/Pages/Company/Workshops/PrintListWorkshop.cshtml @@ -0,0 +1,528 @@ +@model IEnumerable +@{ + int index = 1; + + +} + + + +
    + + @* *@ +
    + + \ No newline at end of file diff --git a/ServiceHost/Areas/Admin/Pages/Shared/_AdminLayout.cshtml b/ServiceHost/Areas/Admin/Pages/Shared/_AdminLayout.cshtml index 16574599..022d9cbd 100644 --- a/ServiceHost/Areas/Admin/Pages/Shared/_AdminLayout.cshtml +++ b/ServiceHost/Areas/Admin/Pages/Shared/_AdminLayout.cshtml @@ -371,6 +371,9 @@ language: "fa", dir: "rtl" }); + + $('.has_sub.active').find(".md-add").removeClass("md-add").addClass("md-remove"); + $('.has_sub.active').find('.MainMenuItem').addClass('active'); }) @@ -392,7 +395,6 @@ $('.clik').filter(function() { if (this.href == url || this.href == url2) { - $(".sdf1").slideDown(1); /*$(".wav").addClass("subdrop");*/ $(this).parentsUntil("#sidebar-menu > ul > li > a").addClass('active'); @@ -400,7 +402,6 @@ }); $('.clik2').filter(function() { if (this.href == url || this.href == url2) { - $(".sdf2").slideDown(350); /* $(".wav").addClass("subdrop");*/ $(this).parentsUntil("#sidebar-menu > ul > li > a").addClass('active'); @@ -408,7 +409,6 @@ }); $('.clik3').filter(function () { if (this.href == url || this.href == url2) { - $(".sdf3").slideDown(350); /* $(".wav").addClass("subdrop");*/ $(this).parentsUntil("#sidebar-menu > ul > li > a").addClass('active'); @@ -416,7 +416,6 @@ }); $('.clik4').filter(function () { if (this.href == url || this.href == url2) { - $(".sdf4").slideDown(350); /* $(".wav").addClass("subdrop");*/ $(this).closest("li").addClass('active'); @@ -424,46 +423,30 @@ }); $('.clik5').filter(function () { if (this.href == url || this.href == url2) { - $(".sdf5").slideDown(350); - - /*$(".wav").addClass("subdrop");*/ $(this).closest("li").addClass('active'); - }; }); $('.clik6').filter(function () { if (this.href == url || this.href == url2) { - $(".sdf6").slideDown(350); - - /*$(".wav").addClass("subdrop");*/ $(this).closest("li").addClass('active'); - }; }); $('.clik7').filter(function () { if (this.href == url || this.href == url2) { - $(".sdf7").slideDown(350); - - /*$(".wav").addClass("subdrop");*/ $(this).closest("li").addClass('active'); - }; }); $('.clik8').filter(function () { if (this.href == url || this.href == url2) { - $(".sdf8").slideDown(350); - - /*$(".wav").addClass("subdrop");*/ - $(this).closest("li").addClass('active'); - + $(this).parentsUntil("#sidebar-menu > ul > li > a").addClass('active'); }; }); diff --git a/ServiceHost/Areas/Admin/Pages/Shared/_Menu.cshtml b/ServiceHost/Areas/Admin/Pages/Shared/_Menu.cshtml index 821fc54c..eb2407cd 100644 --- a/ServiceHost/Areas/Admin/Pages/Shared/_Menu.cshtml +++ b/ServiceHost/Areas/Admin/Pages/Shared/_Menu.cshtml @@ -257,12 +257,14 @@ کارفرما -
  • مخاطب - - - - -
  • +
  • + + + + + مخاطب + +
  • @@ -285,18 +287,18 @@ وظایف -
  • - - - - گروهبندی -
  • - - - + + + وظیفه جدید -
  • + +
  • + + + + گروهبندی +
  • diff --git a/ServiceHost/Pages/Index.cshtml b/ServiceHost/Pages/Index.cshtml index ab8c8ab1..39f6bf1a 100644 --- a/ServiceHost/Pages/Index.cshtml +++ b/ServiceHost/Pages/Index.cshtml @@ -306,59 +306,59 @@ // }); // } - if ('serviceWorker' in navigator && 'PushManager' in window) { - window.addEventListener('beforeinstallprompt', (e) => { - if (localStorage.getItem('pwaPromptDismissed') === 'true') { - return; - } + // if ('serviceWorker' in navigator && 'PushManager' in window) { + // window.addEventListener('beforeinstallprompt', (e) => { + // if (localStorage.getItem('pwaPromptDismissed') === 'true') { + // return; + // } - e.preventDefault(); + // e.preventDefault(); - const deferredPrompt = e; + // const deferredPrompt = e; - const containerDiv = document.createElement('div'); - containerDiv.className = 'prompt-container'; + // const containerDiv = document.createElement('div'); + // containerDiv.className = 'prompt-container'; - const promptText = document.createElement('p'); - promptText.textContent = 'آیا می خواهید برنامه را نصب کنید؟'; - containerDiv.appendChild(promptText); + // const promptText = document.createElement('p'); + // promptText.textContent = 'آیا می خواهید برنامه را نصب کنید؟'; + // containerDiv.appendChild(promptText); - const yesButton = document.createElement('button'); - yesButton.textContent = 'بله'; - yesButton.classList.add('btn-grad'); - yesButton.style.background = '#84cc16'; + // const yesButton = document.createElement('button'); + // yesButton.textContent = 'بله'; + // yesButton.classList.add('btn-grad'); + // yesButton.style.background = '#84cc16'; - const noButton = document.createElement('button'); - noButton.textContent = 'خیر'; - noButton.classList.add('btn-grad'); - noButton.style.background = '#ef4444'; + // const noButton = document.createElement('button'); + // noButton.textContent = 'خیر'; + // noButton.classList.add('btn-grad'); + // noButton.style.background = '#ef4444'; - yesButton.addEventListener('click', () => { - deferredPrompt.prompt(); + // yesButton.addEventListener('click', () => { + // deferredPrompt.prompt(); - deferredPrompt.userChoice.then(choiceResult => { - if (choiceResult.outcome === 'accepted') { - console.log('App installed'); - } else { - console.log('App installation declined'); - } + // deferredPrompt.userChoice.then(choiceResult => { + // if (choiceResult.outcome === 'accepted') { + // console.log('App installed'); + // } else { + // console.log('App installation declined'); + // } - containerDiv.style.display = 'none'; - }); - }); + // containerDiv.style.display = 'none'; + // }); + // }); - noButton.addEventListener('click', () => { - console.log('App installation declined'); - containerDiv.style.display = 'none'; - localStorage.setItem('pwaPromptDismissed', 'true'); - }); + // noButton.addEventListener('click', () => { + // console.log('App installation declined'); + // containerDiv.style.display = 'none'; + // localStorage.setItem('pwaPromptDismissed', 'true'); + // }); - containerDiv.appendChild(yesButton); - containerDiv.appendChild(noButton); + // containerDiv.appendChild(yesButton); + // containerDiv.appendChild(noButton); - document.body.appendChild(containerDiv); - }); - } + // document.body.appendChild(containerDiv); + // }); + // }