complete front but backend still not finished

This commit is contained in:
2025-06-19 13:51:05 +03:30
parent 7b2eefa954
commit a6c25ec8e8
6 changed files with 53 additions and 9 deletions

View File

@@ -28,6 +28,7 @@ public class CreateEmployeeByClient
public List<AddEmployeeDocumentItem> EmployeeDocumentItems { get; set; }
public bool HasEmployeeDocument { get; set; }
public bool HasRollCallService { get; set; }
public bool CanceledAuthorize { get; set; }
}

View File

@@ -176,6 +176,8 @@ public class LeftWorkTempApplication : ILeftWorkTempApplication
_leftWorkTempRepository.Remove(leftWorkTemp);
await _leftWorkRepository.SaveChangesAsync();
await _leftWorkTempRepository.SaveChangesAsync();
return op.Succcedded();
}

View File

@@ -33,7 +33,7 @@
</div>
</div>
<div class="col-6 col-md-12 pe-1 custom-pe-md-3 form-personal my-1">
<div class="col-6 col-md-12 pe-1 custom-pe-md-3 form-personal my-1">
<div id="nationalCodeS2Section" class="input-group shadow-none disable">
<label class="input-group-text d-flex justify-content-center align-items-center" for="nationalCodeStep2">کد ملی</label>
<input class="form-control text-center" name="Command.NationalCode" pattern="[0-9]*" inputmode="numeric" id="nationalCodeStep2" style="direction: ltr">
@@ -71,7 +71,7 @@
</div>
<div id="genderS2Section" class="col-lg-6 col-6 form-personal checkByNationalCode disable mightBeNullDB2 my-1">
<div class="input-group">
<div class="input-group validGender">
<label class="input-group-text d-flex justify-content-center align-items-center">جنسیت</label>
<div class="inputGroup-sizing-marriage d-flex align-items-center justify-content-center">
<input class="form-check-input genderStatus" type="radio" id="gender1" name="Command.Gender" value="مرد" required>
@@ -142,7 +142,7 @@
</div>
</div>
</div>
<input type="checkbox" id="canceledAuthorizedStep2" name="Command.CanceledAuthorize" style="display: none;" value="false" />
<div class="spinner-loading loading" style="display: none;">
<span class="spinner-border spinner-border-sm text-white" role="status" aria-hidden="true"></span>

View File

@@ -381,7 +381,6 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
}
}
result = _rollCallEmployeeApplication.UploadedImage(employeeId, workshopId);
if (result.IsSuccedded == false)
{

View File

@@ -5,7 +5,7 @@ $(document).ready(function () {
language: "fa",
dir: "rtl"
});
var jobsLoadAjaxURL = '';
var jobsLoadAjaxURL = '';
if (currentUrl.includes("/Client#showmodal=/Client?handler=CreateEmployee")) {
jobsLoadAjaxURL = jobsLoadHomeAjaxUrl;
} else if (currentUrl.includes("/Client/Company/Employees/EmployeeList")) {
@@ -76,7 +76,7 @@ function checkInputs() {
const startWork = $("#startWork").val().trim();
const startWorkIsValidDate = /^\d{4}[-\/]\d{2}[-\/]\d{2}$/.test(startWork);
const semat = $("#sematSelect").val();
debugger;
let isEmpty = false;
if (!genderSelected || !maritalStatusSelected || !nationality || !fName || !lName || !startWork || !startWorkIsValidDate || semat === "0") {
@@ -88,7 +88,18 @@ function checkInputs() {
validateField(".validMariage", "لطفا وضعیت تاهل را مشخص کنید.");
return false;
}
if (!$("input[name='Command.Gender']:checked").val()) {
validateField(".validGender", "لطفا جنسیت را مشخص کنید.");
return false;
}
if (fName === "") {
validateField("#firstName", "لطفا نام پرسنل را وارد کنید.");
return false;
}
if (lName === "") {
validateField("#lastName", "لطفا نام خانوادگی پرسنل را وارد کنید.");
return false;
}
if (startWork === "") {
validateField("#startWork", "لطفا تاریخ شروع بکار را مشخص کنید");
return false;

View File

@@ -186,6 +186,10 @@ function checkNationalCode(nationalCode, birthDate) {
else if (response.data.authorizedCanceled) {
$(".checkByHistoryCode2").removeClass("disable");
$("#AuthorizedCanceled").removeClass("disable");
$("#canceledAuthorizedStep2").prop("checked", true);
$("#canceledAuthorizedStep2").val("true");
$('.alert-msg').show();
$('.alert-msg p').text(response.message);
setTimeout(function () {
@@ -193,7 +197,6 @@ function checkNationalCode(nationalCode, birthDate) {
$('.alert-msg p').text(response.message);
}, 3500);
$("#IdentityLoading").hide();
goToStep2 = true;
}
else {
@@ -231,7 +234,30 @@ function checkNationalCode(nationalCode, birthDate) {
});
$('#authorizedCheckboxInput').change(function () {
if ($(this).is(':checked')) {
console.log("tik");
let nationalCode = $("#nationalCode").val().trim();
let birthDate = $("#birthDate").val().trim();
if (nationalCode === "") {
validateField("#nationalCode", "لطفا شماره ملی پرسنل را وارد کنید.");
$("#authorizedCheckboxInput").prop("checked", false);
return;
} else if (!/^\d{10}$/.test(nationalCode)) {
validateField("#nationalCode", "شماره ملی باید ۱۰ رقم باشد.");
$("#authorizedCheckboxInput").prop("checked", false);
return;
}
if (birthDate === "") {
validateField("#birthDate", "لطفا تاریخ تولد پرسنل را وارد کنید.");
$("#authorizedCheckboxInput").prop("checked", false);
return;
} else if (!/^\d{4}[-\/]\d{2}[-\/]\d{2}$/.test(birthDate) || birthDate.length !== 10) {
validateField("#birthDate", "تاریخ تولد را به درستی وارد کنید.");
$("#authorizedCheckboxInput").prop("checked", false);
return;
}
$("#nationalCodeS2Section").removeClass("disable");
$("#birthDateS2Section").removeClass("disable");
$("#genderS2Section").removeClass("disable");
@@ -240,7 +266,12 @@ function checkNationalCode(nationalCode, birthDate) {
$("#fNameS2Section").removeClass("disable");
$("#startworkS2Section").removeClass("disable");
$("#jobS2Section").removeClass("disable");
$("#nationalCodeStep2").val(nationalCode);
$("#birthDateStep2").val(birthDate);
goToStep2 = true;
$("#nextStep1").click();
}
});