fix bug create employee part 2
This commit is contained in:
@@ -191,13 +191,18 @@ function loadEmployee(nationalCode, employeeFullName) {
|
||||
<div class="Rtable-cell--content text-end d-flex justify-content-end">
|
||||
|
||||
<button class="btn-leftwork ${item.black ? "disable" : ""}" type="button" onclick="openCreateLeftWorkSingleEmployeeModal(${item.employeeId}, '${item.fullName}')">
|
||||
<svg width="23" height="23" viewBox="0 0 23 23" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M14.375 18.2085C14.375 16.0914 11.8006 14.3752 8.625 14.3752C5.44936 14.3752 2.875 16.0914 2.875 18.2085M16.2917 13.4168L18.2083 11.5002M18.2083 11.5002L20.125 9.5835M18.2083 11.5002L16.2917 9.5835M18.2083 11.5002L20.125 13.4168M8.625 11.5002C6.50791 11.5002 4.79167 9.78388 4.79167 7.66683C4.79167 5.54974 6.50791 3.8335 8.625 3.8335C10.7421 3.8335 12.4583 5.54974 12.4583 7.66683C12.4583 9.78388 10.7421 11.5002 8.625 11.5002Z" stroke="#475569" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
<svg width="20" height="20" viewBox="0 0 24 24" id="_24x24_On_Light_Session-Leave" data-name="24x24/On Light/Session-Leave" xmlns="http://www.w3.org/2000/svg" fill="#000000">
|
||||
<g id="SVGRepo_bgCarrier" stroke-width="0"></g>
|
||||
<g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g>
|
||||
<g id="SVGRepo_iconCarrier">
|
||||
<rect id="view-box" width="24" height="24" fill="none"></rect>
|
||||
<path id="Shape" d="M2.95,17.5A2.853,2.853,0,0,1,0,14.75v-12A2.854,2.854,0,0,1,2.95,0h8.8a.75.75,0,0,1,0,1.5H2.95A1.362,1.362,0,0,0,1.5,2.75v12A1.363,1.363,0,0,0,2.95,16h8.8a.75.75,0,0,1,0,1.5Zm9.269-4.219a.751.751,0,0,1,0-1.061L14.939,9.5H5.75a.75.75,0,0,1,0-1.5h9.19L12.219,5.28A.75.75,0,1,1,13.28,4.22l4,4a.749.749,0,0,1,0,1.06l-4,4a.751.751,0,0,1-1.061,0Z" transform="translate(3.25 3.25)" fill="#ef4444"></path>
|
||||
</g>
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
<button class="btn-print" type="button" onclick="AjaxUrlContentModal('/Client/Company/EmployeeList?handler=PrintOnePersonnelInfo&employeeId=${item.employeeId}');">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor">
|
||||
<path d="M15.0001 11.2493H15.139C16.0279 11.2493 16.4723 11.2493 16.759 10.9866C16.7805 10.967 16.801 10.9464 16.8207 10.9249C17.0834 10.6382 17.0834 10.1938 17.0834 9.3049V9.3049C17.0834 7.52714 17.0834 6.63826 16.558 6.06484C16.5187 6.02194 16.4775 5.98077 16.4346 5.94146C15.8612 5.41602 14.9723 5.41602 13.1945 5.41602H6.91675C5.03113 5.41602 4.08832 5.41602 3.50253 6.0018C2.91675 6.58759 2.91675 7.5304 2.91675 9.41602V10.2493C2.91675 10.7208 2.91675 10.9565 3.06319 11.1029C3.20964 11.2493 3.44534 11.2493 3.91675 11.2493H5.00008"></path>
|
||||
<path d="M5.41675 16.3903L5.41675 9.91732C5.41675 8.97451 5.41675 8.5031 5.70964 8.21021C6.00253 7.91732 6.47394 7.91732 7.41675 7.91732L12.5834 7.91732C13.5262 7.91732 13.9976 7.91732 14.2905 8.21021C14.5834 8.5031 14.5834 8.97451 14.5834 9.91732L14.5834 16.3903C14.5834 16.7068 14.5834 16.8651 14.4796 16.9399C14.3758 17.0148 14.2256 16.9647 13.9253 16.8646L12.2572 16.3086C12.1712 16.2799 12.1282 16.2656 12.0839 16.2669C12.0396 16.2682 11.9975 16.285 11.9134 16.3187L10.1858 17.0097C10.0941 17.0464 10.0482 17.0647 10.0001 17.0647C9.95194 17.0647 9.90609 17.0464 9.81439 17.0097L8.0868 16.3187C8.00267 16.285 7.9606 16.2682 7.91627 16.2669C7.87194 16.2656 7.82896 16.2799 7.74299 16.3086L6.07486 16.8646C5.77455 16.9647 5.62439 17.0148 5.52057 16.9399C5.41675 16.8651 5.41675 16.7068 5.41675 16.3903Z"></path>
|
||||
<path d="M7.91675 11.25L11.2501 11.25" stroke-linecap="round"></path>
|
||||
|
||||
@@ -2,7 +2,10 @@
|
||||
var goToStep2 = false;
|
||||
|
||||
$(document).ready(function () {
|
||||
$("#nationalCode").mask("0000000000");
|
||||
$("#nationalCode").on('input', function () {
|
||||
var value = $(this).val();
|
||||
$(this).val(convertPersianNumbersToEnglish(value));
|
||||
}).mask("0000000000");
|
||||
|
||||
$("#birthDate").each(function () {
|
||||
let element = $(this);
|
||||
|
||||
@@ -145,8 +145,10 @@ function dayOfWeekLoad(input, value) {
|
||||
if (value.length !== 10)
|
||||
return;
|
||||
|
||||
var dayOfWeekUrl = currentUrl.includes("/Client/Company/Employees/EmployeeList") ? dayOfWeekDataUrl : dayOfWeekDataHomeUrl;
|
||||
|
||||
$.ajax({
|
||||
url: dayOfWeekDataUrl,
|
||||
url: dayOfWeekUrl,
|
||||
type: 'GET',
|
||||
data: { dateFa: value },
|
||||
success: function (response) {
|
||||
@@ -178,8 +180,10 @@ function dayOfWeekLoad(input, value) {
|
||||
|
||||
|
||||
function ajaxPersonals() {
|
||||
var employeeListUrl = currentUrl.includes("/Client/Company/Employees/EmployeeList") ? employeeListAjax : employeeListHomeAjax;
|
||||
|
||||
$.ajax({
|
||||
url: employeeListAjax,
|
||||
url: employeeListUrl,
|
||||
type: 'GET',
|
||||
success: function (response) {
|
||||
if (response.success) {
|
||||
@@ -251,11 +255,13 @@ $("#createData").click(function () {
|
||||
|
||||
var data = $('#create-form').serialize();
|
||||
|
||||
var saveLeftWorkUrl = currentUrl.includes("/Client/Company/Employees/EmployeeList") ? saveLeftWorkAjax : saveLeftWorkHomeAjax;
|
||||
|
||||
$.ajax({
|
||||
async: true,
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
url: saveLeftWorkAjax,
|
||||
url: saveLeftWorkUrl,
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
data: data,
|
||||
success: function (response) {
|
||||
@@ -271,7 +277,7 @@ $("#createData").click(function () {
|
||||
if (currentUrl.includes("/Client/Company/Employees/EmployeeList")) {
|
||||
$('#loadEmployeesAjax').html('');
|
||||
loadEmployee();
|
||||
}
|
||||
}
|
||||
|
||||
loading.hide();
|
||||
$('#MainModal').modal('hide');
|
||||
|
||||
@@ -699,11 +699,14 @@ function loadWorkshopSettingList() {
|
||||
let currentUrl = window.location.href; // Get the full URL
|
||||
let workshopSettingListUrl = '';
|
||||
|
||||
if (currentUrl.includes("/Client/Company/RollCall/EmployeeUploadPicture")) {
|
||||
if (currentUrl.includes("/Client#showmodal=/Client?handler=CreateEmployee")) {
|
||||
workshopSettingListUrl = workshopSettingListAjaxHome;
|
||||
} else if (currentUrl.includes("/Client/Company/RollCall/EmployeeUploadPicture")) {
|
||||
workshopSettingListUrl = workshopSettingListAjaxRollCall;
|
||||
} else {
|
||||
workshopSettingListUrl = workshopSettingListAjax;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
async: false,
|
||||
contentType: 'charset=utf-8',
|
||||
|
||||
Reference in New Issue
Block a user