108 lines
4.6 KiB
JavaScript
108 lines
4.6 KiB
JavaScript
|
|
|
|
// $(".openAction").click(function () {
|
|
// $(this).next().find(".operations-btns").slideToggle(500);
|
|
// $(".operations-btns").not($(this).next().find(".operations-btns")).slideUp(500);
|
|
// });
|
|
// $(document).ready(function () {
|
|
// $(this).find(".operations-btns").first().slideToggle(500);
|
|
// })
|
|
|
|
$(document).ready(function () {
|
|
var filterEmployeeFullName = $('#EmployeeFullName').val();
|
|
var filterNationalCode = $('#NationalCode').val();
|
|
|
|
if (filterEmployeeFullName != '' || filterNationalCode != '') {
|
|
$('.btn-clear-filter').removeClass('disable');
|
|
} else {
|
|
$('.btn-clear-filter').addClass('disable');
|
|
}
|
|
});
|
|
|
|
$(document).ready(function () {
|
|
$('.loadingButton').on('click', function () {
|
|
var button = $(this);
|
|
var loadingDiv = button.find('.loading');
|
|
loadingDiv.show();
|
|
});
|
|
});
|
|
|
|
// var HasEmployees = $('#hasEmployee').val();
|
|
// if (HasEmployees) {
|
|
// var hasCompletedEmployeesTour = localStorage.getItem('hasCompletedEmployeesTour');
|
|
|
|
// if (!hasCompletedEmployeesTour) {
|
|
// //$('#btnMoreOpenIntro').click();
|
|
|
|
// introJs().setOptions({
|
|
// nextLabel: 'بعد',
|
|
// prevLabel: 'قبل',
|
|
// doneLabel: 'اتمام',
|
|
// showBullets: false,
|
|
// steps: [
|
|
// {
|
|
// element: document.querySelector('#EmployeesListIntro'),
|
|
// intro: 'جهت مشاهده لیست اطلاعات هر پرسنل بر روی این گزینه یا گزینه عملیات بیشتر کلیک نمائید.'
|
|
// },
|
|
// {
|
|
// title: 'عملیات مربوط به مرخصی',
|
|
// element: document.querySelector('#btnCardLeaveIntro'),
|
|
// intro: 'برای عملیات مربوط به مرخصی مانند ثبت مرخصی و لیست مرخصی میتوانید از این دکمه استفاده نمایید.'
|
|
// },
|
|
// {
|
|
// title: 'گزارش وضعیت',
|
|
// element: document.querySelector('#btnCardStatusIntro'),
|
|
// intro: 'گزارش وضعیت قرارداد و تصفیه حساب یک پرسنل در سال را نمایش میدهد.'
|
|
// },
|
|
// {
|
|
// title: 'عملیات پرداخت حقوق پرسنل',
|
|
// element: document.querySelector('#btnCardPaymentToEmployeeIntro'),
|
|
// intro: 'به زودی در درسترس خواهد آمد.'
|
|
// }
|
|
// ]
|
|
// }).start();
|
|
// localStorage.setItem('hasCompletedEmployeesTour', true);
|
|
// }
|
|
// }
|
|
|
|
function printAllPersonnelInfo(workshopId) {
|
|
var idlist = "";
|
|
$('.idPersonnel').each(function () {
|
|
if ($(this).text()) {
|
|
var a = $(this).text();
|
|
var b = a + "+";
|
|
idlist += b;
|
|
}
|
|
});
|
|
|
|
var workshop_ID = Number(workshopId);
|
|
var goTo = `#showmodal=/Client/Company/Employees/Index?workshopID=${workshop_ID}&idlist=${idlist}&handler=PrintAllDetailsPersonnelInfo`;
|
|
window.location.href = goTo;
|
|
}
|
|
|
|
function printAllPersonnelInfoMobile(workshopId) {
|
|
var idlist = "";
|
|
$('.idPersonnel').each(function () {
|
|
if ($(this).text()) {
|
|
var a = $(this).text();
|
|
var b = a + "+";
|
|
idlist += b;
|
|
}
|
|
});
|
|
|
|
var workshop_ID = Number(workshopId);
|
|
var goTo = `#showmodal=/Client/Company/Employees/Index?workshopID=${workshop_ID}&idlist=${idlistidlist}&handler=PrintAllDetailsPersonnelInfoMobile`;
|
|
window.location.href = goTo;
|
|
}
|
|
|
|
function printAllPersonnelList() {
|
|
var idlist = "";
|
|
if (window.matchMedia('(min-width: 992px)').matches) {
|
|
var goTo = `#showmodal=/Client/Company/Employees/Index?idlist=${idlist}&handler=PrintAllPersonnelInfo`;
|
|
window.location.href = goTo;
|
|
} else {
|
|
var goTo = `#showmodal=/Client/Company/Employees/Index?idlist=${idlist}&handler=PrintAllPersonnelInfoMobile`;
|
|
window.location.href = goTo;
|
|
}
|
|
}
|