Create workshop bug : employerSelct2 job list mixed --> buf fixed, Employee bug: NoActive Employee Error on new employee --> bug fixed

This commit is contained in:
SamSys
2024-08-11 21:43:48 +03:30
parent e09da14e15
commit c300e84330
3 changed files with 5 additions and 4 deletions

View File

@@ -37,7 +37,7 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
{
var opration = new OperationResult();
if (_EmployeeRepository.Exists(x =>
x.LName == command.LName && x.NationalCode == command.NationalCode && !string.IsNullOrWhiteSpace(command.NationalCode) && x.NationalCode != null))
x.LName == command.LName && x.NationalCode == command.NationalCode && !string.IsNullOrWhiteSpace(command.NationalCode) && x.NationalCode != null && x.IsActiveString == "true"))
return opration.Failed("امکان ثبت رکورد تکراری وجود ندارد");
//if (_EmployeeRepository.Exists(x => x.IdNumber == command.IdNumber && x.IdNumber !=null))
@@ -182,7 +182,7 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
return opration.Failed("رکورد مورد نظر یافت نشد");
if (_EmployeeRepository.Exists(x =>
x.LName == command.LName && x.NationalCode == command.NationalCode && !string.IsNullOrWhiteSpace(command.NationalCode) && x.id != command.Id))
x.LName == command.LName && x.NationalCode == command.NationalCode && !string.IsNullOrWhiteSpace(command.NationalCode) && x.id != command.Id && x.IsActiveString == "true"))
return opration.Failed("امکان ثبت رکورد تکراری وجود ندارد");
//if (_EmployeeRepository.Exists(x => x.IdNumber == command.IdNumber && x.IdNumber != null && x.id != command.Id))
// return opration.Failed("شماره شناسنامه وارد شده تکراری است");

View File

@@ -1064,6 +1064,7 @@
const keyCode = event.keyCode || event.which;
const selfGroupNo = $(this).parent().parent().parent().parent().parent().parent().children('select');
const selectGroupNo = selfGroupNo.attr("joblist-groupNo");
// if (keyCode != 13) {
// $('.opJob').remove();
// } else {
@@ -1074,7 +1075,7 @@
const searched = $(this).val();
if (searched.length > 2) {
if (searched.length > 2 && selectGroupNo != null) {
$.ajax({
/* contentType: 'charset=utf-8',*/

View File

@@ -1148,7 +1148,7 @@
const searched = $(this).val();
if (searched.length > 2) {
if (searched.length > 2 && selectGroupNo != null) {
$.ajax({
/* contentType: 'charset=utf-8',*/