EmployeeComputeOption and Workshop new options merged
This commit is contained in:
@@ -9,30 +9,83 @@ namespace Company.Domain.EmployeeComputeOptionsAgg
|
||||
{
|
||||
public class EmployeeComputeOptions : EntityBase
|
||||
{
|
||||
public EmployeeComputeOptions(long workshopId, long employeeId, string computeOptions, string bonusesOptions, string yearsOptions)
|
||||
{
|
||||
WorkshopId = workshopId;
|
||||
EmployeeId = employeeId;
|
||||
ComputeOptions = computeOptions;
|
||||
BonusesOptions = bonusesOptions;
|
||||
YearsOptions = yearsOptions;
|
||||
}
|
||||
public EmployeeComputeOptions(long workshopId, long employeeId, string computeOptions, string bonusesOptions, string yearsOptions,
|
||||
bool createContract, bool signContract, bool createCheckout, bool signCheckout)
|
||||
{
|
||||
WorkshopId = workshopId;
|
||||
EmployeeId = employeeId;
|
||||
ComputeOptions = computeOptions;
|
||||
BonusesOptions = bonusesOptions;
|
||||
YearsOptions = yearsOptions;
|
||||
|
||||
public long WorkshopId { get; private set;}
|
||||
public long EmployeeId { get; private set;}
|
||||
SetContractAndCheckoutOptions(createContract, signContract, createCheckout, signCheckout);
|
||||
}
|
||||
|
||||
//نحوه محاسبه مزد مرخصی
|
||||
public string ComputeOptions { get; private set; }
|
||||
//نحوه محاسبه عیدی
|
||||
public string BonusesOptions { get; private set; }
|
||||
//نحوه محاسبه سنوات
|
||||
public string YearsOptions { get; private set; }
|
||||
|
||||
public void Edit(string computeOptions, string bonusesOptions, string yearsOptions)
|
||||
{
|
||||
ComputeOptions = computeOptions;
|
||||
BonusesOptions = bonusesOptions;
|
||||
YearsOptions = yearsOptions;
|
||||
}
|
||||
}
|
||||
|
||||
public long WorkshopId { get; private set; }
|
||||
public long EmployeeId { get; private set; }
|
||||
|
||||
//نحوه محاسبه مزد مرخصی
|
||||
public string ComputeOptions { get; private set; }
|
||||
//نحوه محاسبه عیدی
|
||||
public string BonusesOptions { get; private set; }
|
||||
//نحوه محاسبه سنوات
|
||||
public string YearsOptions { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// ایجاد قرارداد
|
||||
/// </summary>
|
||||
public bool CreateContract { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// امضای قرارداد
|
||||
/// </summary>
|
||||
public bool SignContract { get; private set; }
|
||||
/// <summary>
|
||||
/// ایجاد تصفیه
|
||||
/// </summary>
|
||||
public bool CreateCheckout { get; private set; }
|
||||
/// <summary>
|
||||
/// امضای تصفیه
|
||||
/// </summary>
|
||||
public bool SignCheckout { get; private set; }
|
||||
|
||||
public void Edit(string computeOptions, string bonusesOptions, string yearsOptions, bool createContract, bool signContract, bool createCheckout,
|
||||
bool signCheckout)
|
||||
{
|
||||
ComputeOptions = computeOptions;
|
||||
BonusesOptions = bonusesOptions;
|
||||
YearsOptions = yearsOptions;
|
||||
SetContractAndCheckoutOptions(createContract, signContract, createCheckout, signCheckout);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void SetContractAndCheckoutOptions(bool createContract, bool signContract, bool createCheckout,
|
||||
bool signCheckout)
|
||||
{
|
||||
CreateContract = createContract;
|
||||
if (createContract)
|
||||
{
|
||||
SignContract = signContract;
|
||||
CreateCheckout = createCheckout;
|
||||
if (createCheckout)
|
||||
{
|
||||
SignCheckout = signCheckout;
|
||||
}
|
||||
else
|
||||
{
|
||||
SignCheckout = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SignContract = false;
|
||||
CreateCheckout = false;
|
||||
SignCheckout = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Security.AccessControl;
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.Domain;
|
||||
using Company.Domain.CheckoutAgg;
|
||||
using Company.Domain.ClientEmployeeWorkshopAgg;
|
||||
@@ -92,7 +93,7 @@ public class Workshop : EntityBase
|
||||
string state, string city, string address, string typeOfInsuranceSend, string typeOfContract, string contractTerm,
|
||||
string agreementNumber, bool fixedSalary, string population,long? insuranceJobId, string zoneName, bool addBonusesPay, bool addYearsPay, bool addLeavePay, bool totalPaymentHide,
|
||||
bool isClassified, string computeOptions, string bonusesOptions, string yearsOptions, string hasRollCallFreeVip, bool workshopHolidayWorking,
|
||||
bool insuranceCheckoutOvertime, bool insuranceCheckoutFamilyAllowance)
|
||||
bool insuranceCheckoutOvertime, bool insuranceCheckoutFamilyAllowance, bool createContract, bool signContract, bool createCheckout, bool signCheckout, IsActive cutContractEndOfYear)
|
||||
{
|
||||
WorkshopName = workshopName;
|
||||
WorkshopSureName = workshopSureName;
|
||||
@@ -136,7 +137,12 @@ public class Workshop : EntityBase
|
||||
WorkshopHolidayWorking = workshopHolidayWorking;
|
||||
InsuranceCheckoutOvertime = insuranceCheckoutOvertime;
|
||||
InsuranceCheckoutFamilyAllowance = insuranceCheckoutFamilyAllowance;
|
||||
}
|
||||
CreateContract = createContract;
|
||||
SignContract = signContract;
|
||||
CreateCheckout = createCheckout;
|
||||
SignCheckout = signCheckout;
|
||||
CutContractEndOfYear = cutContractEndOfYear;
|
||||
}
|
||||
|
||||
|
||||
public string WorkshopName { get; private set; }
|
||||
@@ -210,6 +216,19 @@ public class Workshop : EntityBase
|
||||
/// محاسبه حق اولاد در لیست بیمه
|
||||
/// </summary>
|
||||
public bool InsuranceCheckoutFamilyAllowance { get; private set; }
|
||||
|
||||
public bool CreateContract { get; private set; }
|
||||
public bool SignContract { get; private set; }
|
||||
public bool CreateCheckout { get; private set; }
|
||||
public bool SignCheckout { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// اگر قرارداد بیش از یک ماه باشد و گزینه انتخاب شده منتهی به پایان سال باشد
|
||||
/// این آیتم
|
||||
/// True
|
||||
/// است
|
||||
/// </summary>
|
||||
public IsActive CutContractEndOfYear { get; private set; }
|
||||
//public Employer Employer { get; private set; }
|
||||
|
||||
public Workshop()
|
||||
@@ -243,7 +262,7 @@ public class Workshop : EntityBase
|
||||
string state, string city, string address, string typeOfInsuranceSend, string typeOfContract, string contractTerm,
|
||||
string agreementNumber, bool fixedSalary, string population, long? insuranceJobId, string zoneName, bool addBonusesPay, bool addYearsPay, bool addLeavePay,
|
||||
bool totalPaymentHide, bool isClassified, string computeOptions, string bonusesOptions, string yearsOptions, string hasRollCallFreeVip, bool workshopHolidayWorking,
|
||||
bool insuranceCheckoutOvertime, bool insuranceCheckoutFamilyAllowance)
|
||||
bool insuranceCheckoutOvertime, bool insuranceCheckoutFamilyAllowance, bool createContract, bool signContract, bool createCheckout, bool signCheckout, IsActive cutContractEndOfYear)
|
||||
{
|
||||
WorkshopName = workshopName;
|
||||
WorkshopSureName = workshopSureName;
|
||||
@@ -284,7 +303,12 @@ public class Workshop : EntityBase
|
||||
WorkshopHolidayWorking = workshopHolidayWorking;
|
||||
InsuranceCheckoutOvertime = insuranceCheckoutOvertime;
|
||||
InsuranceCheckoutFamilyAllowance = insuranceCheckoutFamilyAllowance;
|
||||
}
|
||||
CreateContract = createContract;
|
||||
SignContract = signContract;
|
||||
CreateCheckout = createCheckout;
|
||||
SignCheckout = signCheckout;
|
||||
CutContractEndOfYear = cutContractEndOfYear;
|
||||
}
|
||||
|
||||
|
||||
public void Active(string archiveCode)
|
||||
|
||||
@@ -17,5 +17,22 @@ namespace CompanyManagment.App.Contracts.EmployeeComputeOptions
|
||||
public string BonusesOptions { get; set; }
|
||||
//نحوه محاسبه سنوات
|
||||
public string YearsOptions { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ایجاد قرارداد
|
||||
/// </summary>
|
||||
public bool CreateContract { get; set; }
|
||||
/// <summary>
|
||||
/// امضای قرارداد
|
||||
/// </summary>
|
||||
public bool SignContract { get; set; }
|
||||
/// <summary>
|
||||
/// ایجاد تصفیه
|
||||
/// </summary>
|
||||
public bool CreateCheckout { get; set; }
|
||||
/// <summary>
|
||||
/// امضای تصفیه
|
||||
/// </summary>
|
||||
public bool SignCheckout { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,4 +12,20 @@ public class EmployeeComputeOptionsViewModel
|
||||
public string BonusesOptions { get; set; }
|
||||
//نحوه محاسبه سنوات
|
||||
public string YearsOptions { get; set; }
|
||||
/// <summary>
|
||||
/// ایجاد قرارداد
|
||||
/// </summary>
|
||||
public bool CreateContract { get; set; }
|
||||
/// <summary>
|
||||
/// امضای قرارداد
|
||||
/// </summary>
|
||||
public bool SignContract { get; set; }
|
||||
/// <summary>
|
||||
/// ایجاد تصفیه
|
||||
/// </summary>
|
||||
public bool CreateCheckout { get; set; }
|
||||
/// <summary>
|
||||
/// امضای تصفیه
|
||||
/// </summary>
|
||||
public bool SignCheckout { get; set; }
|
||||
}
|
||||
@@ -26,4 +26,21 @@ public class ConnectedPersonnelViewModel
|
||||
public string BonusesOptions { get; set; }
|
||||
//نحوه محاسبه سنوات
|
||||
public string YearsOptions { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// ایجاد قرارداد
|
||||
/// </summary>
|
||||
public bool CreateContract { get; set; }
|
||||
/// <summary>
|
||||
/// امضای قرارداد
|
||||
/// </summary>
|
||||
public bool SignContract { get; set; }
|
||||
/// <summary>
|
||||
/// ایجاد تصفیه
|
||||
/// </summary>
|
||||
public bool CreateCheckout { get; set; }
|
||||
/// <summary>
|
||||
/// امضای تصفیه
|
||||
/// </summary>
|
||||
public bool SignCheckout { get; set; }
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using _0_Framework.Application;
|
||||
using AccountManagement.Application.Contracts.Account;
|
||||
using CompanyManagment.App.Contracts.Employer;
|
||||
using CompanyManagment.App.Contracts.InsuranceJob;
|
||||
@@ -116,4 +117,29 @@ public class CreateWorkshop
|
||||
/// </summary>
|
||||
public bool InsuranceCheckoutFamilyAllowance { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// ایجاد قرارداد
|
||||
/// </summary>
|
||||
public bool CreateContract { get; set; }
|
||||
/// <summary>
|
||||
/// امضاء قراداد
|
||||
/// </summary>
|
||||
public bool SignContract { get; set; }
|
||||
/// <summary>
|
||||
/// ایجات تصفیه حساب
|
||||
/// </summary>
|
||||
public bool CreateCheckout { get; set; }
|
||||
/// <summary>
|
||||
/// امضاء تصفیه حساب
|
||||
/// </summary>
|
||||
public bool SignCheckout { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// اگر قرارداد بیش از یک ماه باشد و گزینه انتخاب شده منتهی به پایان سال باشد
|
||||
/// این آیتم
|
||||
/// True
|
||||
/// است
|
||||
/// </summary>
|
||||
public IsActive CutContractEndOfYear { get; set; }
|
||||
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using _0_Framework.Application;
|
||||
using CompanyManagment.App.Contracts.Employee;
|
||||
using CompanyManagment.App.Contracts.Employer;
|
||||
using CompanyManagment.App.Contracts.LeftWork;
|
||||
@@ -80,5 +81,31 @@ public class WorkshopViewModel
|
||||
|
||||
public string HasRollCallFreeVip { get; set; }
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ایجاد قرارداد
|
||||
/// </summary>
|
||||
public bool CreateContract { get; set; }
|
||||
/// <summary>
|
||||
/// امضاء قراداد
|
||||
/// </summary>
|
||||
public bool SignContract { get; set; }
|
||||
/// <summary>
|
||||
/// ایجات تصفیه حساب
|
||||
/// </summary>
|
||||
public bool CreateCheckout { get; set; }
|
||||
/// <summary>
|
||||
/// امضاء تصفیه حساب
|
||||
/// </summary>
|
||||
public bool SignCheckout { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// اگر قرارداد بیش از یک ماه باشد و گزینه انتخاب شده منتهی به پایان سال باشد
|
||||
/// این آیتم
|
||||
/// True
|
||||
/// است
|
||||
/// </summary>
|
||||
public IsActive CutContractEndOfYear { get; set; }
|
||||
}
|
||||
@@ -21,41 +21,46 @@ public class EmployeeComputeOptionsApplication : IEmployeeComputeOptionsApplicat
|
||||
|
||||
public OperationResult Create(CreateEmployeeComputeOptions command)
|
||||
{
|
||||
var opration = new OperationResult();
|
||||
try
|
||||
{
|
||||
if (_employeeComputeOptionsRepository.Exists(x =>
|
||||
x.EmployeeId == command.EmployeeId && x.WorkshopId == command.WorkshopId))
|
||||
{
|
||||
var query = GetEmployeeOptions(command.WorkshopId, command.EmployeeId);
|
||||
var editOptions = _employeeComputeOptionsRepository.Get(query.Id);
|
||||
editOptions.Edit(command.ComputeOptions, command.BonusesOptions, command.YearsOptions);
|
||||
_employeeComputeOptionsRepository.SaveChanges();
|
||||
return opration.Succcedded();
|
||||
}
|
||||
else
|
||||
{
|
||||
var createOptions = new EmployeeComputeOptions(command.WorkshopId, command.EmployeeId,
|
||||
command.ComputeOptions, command.BonusesOptions, command.YearsOptions);
|
||||
_employeeComputeOptionsRepository.Create(createOptions);
|
||||
_employeeComputeOptionsRepository.SaveChanges();
|
||||
return opration.Succcedded();
|
||||
}
|
||||
}
|
||||
catch (Exception a)
|
||||
{
|
||||
return opration.Failed("ثبت با خطا مواجه شد");
|
||||
}
|
||||
|
||||
var opration = new OperationResult();
|
||||
try
|
||||
{
|
||||
if (_employeeComputeOptionsRepository.Exists(x =>
|
||||
x.EmployeeId == command.EmployeeId && x.WorkshopId == command.WorkshopId))
|
||||
{
|
||||
var query = GetEmployeeOptions(command.WorkshopId, command.EmployeeId);
|
||||
var editOptions = _employeeComputeOptionsRepository.Get(query.Id);
|
||||
|
||||
editOptions.Edit(command.ComputeOptions, command.BonusesOptions, command.YearsOptions,
|
||||
command.CreateContract, command.SignContract, command.CreateCheckout, command.SignCheckout);
|
||||
|
||||
_employeeComputeOptionsRepository.SaveChanges();
|
||||
return opration.Succcedded();
|
||||
}
|
||||
else
|
||||
{
|
||||
var createOptions = new EmployeeComputeOptions(command.WorkshopId, command.EmployeeId,
|
||||
command.ComputeOptions, command.BonusesOptions, command.YearsOptions, command.CreateContract,
|
||||
command.SignContract, command.CreateCheckout, command.SignCheckout);
|
||||
|
||||
_employeeComputeOptionsRepository.Create(createOptions);
|
||||
_employeeComputeOptionsRepository.SaveChanges();
|
||||
return opration.Succcedded();
|
||||
}
|
||||
}
|
||||
catch (Exception a)
|
||||
{
|
||||
return opration.Failed("ثبت با خطا مواجه شد");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public EmployeeComputeOptionsViewModel GetEmployeeOptions(long workshopId, long employeeId)
|
||||
{
|
||||
return _employeeComputeOptionsRepository.GetEmployeeOptions(workshopId, employeeId);
|
||||
return _employeeComputeOptionsRepository.GetEmployeeOptions(workshopId, employeeId);
|
||||
}
|
||||
|
||||
public List<EmployeeComputeOptionsViewModel> GetAllByWorkshopId(long workshopId)
|
||||
{
|
||||
return _employeeComputeOptionsRepository.GetAllByWorkshopId(workshopId);
|
||||
return _employeeComputeOptionsRepository.GetAllByWorkshopId(workshopId);
|
||||
}
|
||||
}
|
||||
@@ -73,10 +73,28 @@ public class WorkshopAppliction : IWorkshopApplication
|
||||
if (string.IsNullOrEmpty(command.WorkshopName) || string.IsNullOrEmpty(command.ArchiveCode))
|
||||
return operation.Failed("موارد اجباری را پر کنید");
|
||||
|
||||
//if (_workshopRepository.Exists(x => x.WorkshopName == command.WorkshopName))
|
||||
// return operation.Failed("نام کارگاه تکراری است");
|
||||
//if (_workshopRepository.Exists(x => x.WorkshopName == command.WorkshopName))
|
||||
// return operation.Failed("نام کارگاه تکراری است");
|
||||
|
||||
if (_workshopRepository.Exists(x => !string.IsNullOrEmpty(x.InsuranceCode) && x.InsuranceCode == command.InsuranceCode))
|
||||
if (command.ContractTerm != "1" && command.ContractTerm != "ForEver" && (command.CutContractEndOfYear != IsActive.False && command.CutContractEndOfYear != IsActive.True))
|
||||
return operation.Failed("لطفا تیک قرداداد منتهی به پایان سال را تعیین وضعیت کنید");
|
||||
|
||||
if (command.ContractTerm == "1" && command.ContractTerm == "ForEver")
|
||||
command.CutContractEndOfYear = IsActive.None;
|
||||
if (!command.CreateContract)
|
||||
{
|
||||
command.SignContract = false;
|
||||
command.CreateCheckout = false;
|
||||
command.SignCheckout = false;
|
||||
}
|
||||
|
||||
if (!command.CreateCheckout)
|
||||
{
|
||||
command.SignCheckout = false;
|
||||
}
|
||||
|
||||
|
||||
if (_workshopRepository.Exists(x => !string.IsNullOrEmpty(x.InsuranceCode) && x.InsuranceCode == command.InsuranceCode))
|
||||
return operation.Failed("کد بیمه کارگاه تکراری است");
|
||||
|
||||
if (!string.IsNullOrEmpty(command.Address) && string.IsNullOrEmpty(command.State))
|
||||
@@ -145,7 +163,11 @@ public class WorkshopAppliction : IWorkshopApplication
|
||||
command.ArchiveCode, command.AgentName, command.AgentPhone, command.State, command.City,
|
||||
command.Address,
|
||||
command.TypeOfInsuranceSend, command.TypeOfContract,command.ContractTerm,command.AgreementNumber
|
||||
,command.FixedSalary, command.Population,command.InsuranceJobId,command.ZoneName,command.AddBonusesPay,command.AddYearsPay,command.AddLeavePay,command.TotalPaymentHide,command.IsClassified,command.ComputeOptions,command.BonusesOptions,command.YearsOptions,command.HasRollCallFreeVip,command.WorkshopHolidayWorking, command.InsuranceCheckoutOvertime, command.InsuranceCheckoutFamilyAllowance);
|
||||
,command.FixedSalary, command.Population,command.InsuranceJobId,command.ZoneName,command.AddBonusesPay,
|
||||
command.AddYearsPay,command.AddLeavePay,command.TotalPaymentHide,command.IsClassified,command.ComputeOptions,
|
||||
command.BonusesOptions,command.YearsOptions,command.HasRollCallFreeVip,command.WorkshopHolidayWorking,
|
||||
command.InsuranceCheckoutOvertime, command.InsuranceCheckoutFamilyAllowance, command.CreateContract, command.SignContract,
|
||||
command.CreateCheckout, command.SignCheckout, command.CutContractEndOfYear);
|
||||
_workshopRepository.Create(workshop);
|
||||
_workshopRepository.SaveChanges();
|
||||
|
||||
@@ -211,10 +233,28 @@ public class WorkshopAppliction : IWorkshopApplication
|
||||
return operation.Failed("لطفا کارفرما را انتخاب نمایید");
|
||||
var employer = command.EmployerIdList.ToList();
|
||||
|
||||
//if (_workshopRepository.Exists(x => x.WorkshopName == command.WorkshopName && x.id != command.Id))
|
||||
// return operation.Failed(" نام کارگاه تکراری است ");
|
||||
//if (_workshopRepository.Exists(x => x.WorkshopName == command.WorkshopName && x.id != command.Id))
|
||||
// return operation.Failed(" نام کارگاه تکراری است ");
|
||||
|
||||
if (command.TypeOfInsuranceSend != null && string.IsNullOrEmpty(command.InsuranceCode))
|
||||
if (command.ContractTerm != "1" && command.ContractTerm != "ForEver" && (command.CutContractEndOfYear != IsActive.False && command.CutContractEndOfYear != IsActive.True))
|
||||
return operation.Failed("لطفا تیک قرداداد منتهی به پایان سال را تعیین وضعیت کنید");
|
||||
|
||||
if (command.ContractTerm == "1" && command.ContractTerm == "ForEver")
|
||||
command.CutContractEndOfYear = IsActive.None;
|
||||
if (!command.CreateContract)
|
||||
{
|
||||
command.SignContract = false;
|
||||
command.CreateCheckout = false;
|
||||
command.SignCheckout = false;
|
||||
}
|
||||
|
||||
if (!command.CreateCheckout)
|
||||
{
|
||||
command.SignCheckout = false;
|
||||
}
|
||||
|
||||
|
||||
if (command.TypeOfInsuranceSend != null && string.IsNullOrEmpty(command.InsuranceCode))
|
||||
return operation.Failed("لطفا کد بیمه کارگاه را وارد کنید");
|
||||
if (_workshopRepository.Exists(x => !string.IsNullOrEmpty(x.InsuranceCode) && x.InsuranceCode == command.InsuranceCode && x.id != command.Id))
|
||||
return operation.Failed("کد بیمه کارگاه تکراری است");
|
||||
@@ -315,7 +355,10 @@ public class WorkshopAppliction : IWorkshopApplication
|
||||
command.Address,
|
||||
command.TypeOfInsuranceSend, command.TypeOfContract,command.ContractTerm, command.AgreementNumber
|
||||
, command.FixedSalary, command.Population, command.InsuranceJobId, command.ZoneName,
|
||||
command.AddBonusesPay, command.AddYearsPay, command.AddLeavePay, command.TotalPaymentHide,command.IsClassified, command.ComputeOptions,command.BonusesOptions, command.YearsOptions,command.HasRollCallFreeVip, command.WorkshopHolidayWorking, command.InsuranceCheckoutOvertime,command.InsuranceCheckoutFamilyAllowance);
|
||||
command.AddBonusesPay, command.AddYearsPay, command.AddLeavePay, command.TotalPaymentHide,command.IsClassified,
|
||||
command.ComputeOptions,command.BonusesOptions, command.YearsOptions,command.HasRollCallFreeVip,
|
||||
command.WorkshopHolidayWorking, command.InsuranceCheckoutOvertime,command.InsuranceCheckoutFamilyAllowance,
|
||||
command.CreateContract, command.SignContract, command.CreateCheckout, command.SignCheckout, command.CutContractEndOfYear);
|
||||
_workshopRepository.SaveChanges();
|
||||
|
||||
_workshopRepository.RemoveOldRelation(command.Id);
|
||||
@@ -535,159 +578,169 @@ public class WorkshopAppliction : IWorkshopApplication
|
||||
{
|
||||
return _workshopRepository.SearchForClient(searchModel);
|
||||
}
|
||||
|
||||
public OperationResult CreateForClient(CreateWorkshop command)
|
||||
{
|
||||
|
||||
var accountIds = new List<long>();
|
||||
var operation = new OperationResult();
|
||||
//if (command.EmployerIdList == null)
|
||||
// return operation.Failed("لطفا کارفرما را انتخاب نمایید");
|
||||
var employer = command.EmployerIdList.ToList();
|
||||
if (command.AccountIdsList != null)
|
||||
{
|
||||
accountIds = command.AccountIdsList.ToList();
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(command.WorkshopName) || string.IsNullOrEmpty(command.ArchiveCode) || command.ArchiveCode == "0")
|
||||
return operation.Failed("موارد اجباری را پر کنید");
|
||||
//if (_workshopRepository.Exists(x => x.WorkshopName == command.WorkshopName))
|
||||
// return operation.Failed("نام کارگاه تکراری است");
|
||||
if (_workshopRepository.Exists(x => x.InsuranceCode != null && x.InsuranceCode == command.InsuranceCode))
|
||||
{
|
||||
if (_workshopRepository.ExistsWorkshopAccountInsuranceCode(command.InsuranceCode))
|
||||
return operation.Failed("کد بیمه کارگاه تکراری است");
|
||||
}
|
||||
|
||||
if (_workshopRepository.ExistsWorkshopAccountArchiveCode(command.ArchiveCode))
|
||||
return operation.Failed("شماره بایگانی تکراری است");
|
||||
|
||||
if (string.IsNullOrEmpty(command.State)) //(!string.IsNullOrEmpty(command.Address) && string.IsNullOrEmpty(command.State))
|
||||
return operation.Failed("لطفا استان و شهر را انتخاب کنید");
|
||||
|
||||
if (command.City == "0" || command.City == "شهرستان")
|
||||
return operation.Failed("لطفا شهر را انتخاب کنید");
|
||||
if (string.IsNullOrEmpty(command.Address))
|
||||
return operation.Failed("لطفا آدرس را وارد کنید");
|
||||
|
||||
if (!string.IsNullOrEmpty(command.TypeOfInsuranceSend) && command.TypeOfInsuranceSend != "false" && string.IsNullOrEmpty(command.InsuranceCode))
|
||||
return operation.Failed("لطفا کد بیمه کارگاه را وارد کنید");
|
||||
|
||||
if (command.FixedSalary)
|
||||
{
|
||||
if (command.InsuranceJobId == 0 || command.InsuranceJobId == null)
|
||||
return operation.Failed("لطفا صنف را انتخاب کنید");
|
||||
if (string.IsNullOrWhiteSpace(command.Population))
|
||||
return operation.Failed("لطفا جمعیت شهر را انتخاب کنید");
|
||||
}
|
||||
|
||||
//if (string.IsNullOrWhiteSpace(command.TypeOfInsuranceSend))
|
||||
// return operation.Failed("لطفا نوع ارسال لیست بیمه را مشخص کنید");
|
||||
|
||||
var workshop = new Workshop(command.WorkshopName, command.WorkshopSureName, command.InsuranceCode,command.TypeOfOwnership,
|
||||
command.ArchiveCode, command.AgentName, command.AgentPhone, command.State, command.City, command.Address,
|
||||
command.TypeOfInsuranceSend, command.TypeOfContract, command.ContractTerm, command.AgreementNumber, command.FixedSalary,
|
||||
command.Population, command.InsuranceJobId, command.ZoneName, command.AddBonusesPay,
|
||||
command.AddYearsPay, command.AddLeavePay,command.TotalPaymentHide, command.IsClassified, command.ComputeOptions,
|
||||
command.BonusesOptions, command.YearsOptions,command.HasRollCallFreeVip, command.WorkshopHolidayWorking,
|
||||
command.InsuranceCheckoutOvertime,command.InsuranceCheckoutFamilyAllowance);
|
||||
_workshopRepository.Create(workshop);
|
||||
_workshopRepository.SaveChanges();
|
||||
|
||||
|
||||
|
||||
foreach (var e in employer)
|
||||
{
|
||||
_workshopRepository.EmployerWorkshop(workshop.id, e);
|
||||
}
|
||||
|
||||
|
||||
_workshopRepository.CreateWorkshopAccounts(accountIds, workshop.id);
|
||||
|
||||
|
||||
|
||||
return operation.Succcedded();
|
||||
|
||||
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public OperationResult EditForClient(EditWorkshop command)
|
||||
{
|
||||
var leftSearch = new LeftWorkSearchModel()
|
||||
{
|
||||
WorkshopId = command.Id
|
||||
};
|
||||
var leftWork = _leftWorkRepository.search(leftSearch);
|
||||
var accountIds = new List<long>();
|
||||
var operation = new OperationResult();
|
||||
var workshop = _workshopRepository.Get(command.Id);
|
||||
if (command.AccountIdsList != null)
|
||||
{
|
||||
accountIds = command.AccountIdsList.ToList();
|
||||
}
|
||||
if (workshop == null)
|
||||
operation.Failed("رکورد مورد نظر وجود ندارد");
|
||||
if (command.EmployerIdList == null)
|
||||
return operation.Failed("لطفا کارفرما را انتخاب نمایید");
|
||||
var employer = command.EmployerIdList.ToList();
|
||||
|
||||
if (string.IsNullOrEmpty(command.WorkshopName) || string.IsNullOrEmpty(command.ArchiveCode) || command.ArchiveCode == "0")
|
||||
return operation.Failed("موارد اجباری را پر کنید");
|
||||
|
||||
//if (_workshopRepository.Exists(x => x.WorkshopName == command.WorkshopName && x.id != command.Id))
|
||||
// return operation.Failed(" رکورد مورد نظر تکراری است ");
|
||||
if (_workshopRepository.Exists(x =>
|
||||
x.InsuranceCode != null && x.InsuranceCode == command.InsuranceCode && x.id != command.Id))
|
||||
{
|
||||
if (_workshopRepository.ExistsWorkshopAccountInsuranceCodeByworkshopId(command.Id, command.InsuranceCode))
|
||||
return operation.Failed("کد بیمه کارگاه تکراری است");
|
||||
}
|
||||
|
||||
if (_workshopRepository.ExistsWorkshopAccountArchiveCodeByWorkshopId(command.Id, command.ArchiveCode))
|
||||
return operation.Failed("شماره بایگانی تکراری است");
|
||||
|
||||
if (command.State == null)
|
||||
return operation.Failed("لطفا استان و شهر را انتخاب کنید");
|
||||
if ((command.City == "0" || command.City == "شهرستان"))
|
||||
return operation.Failed("لطفا شهر را انتخاب کنید");
|
||||
if (command.TypeOfInsuranceSend != null && command.InsuranceCode == null)
|
||||
return operation.Failed("لطفا کد بیمه کارگاه را وارد کنید");
|
||||
if (command.Address == null)
|
||||
return operation.Failed("لطفا آدرس را وارد کنید");
|
||||
if (command.FixedSalary)
|
||||
{
|
||||
if (command.InsuranceJobId == 0 || command.InsuranceJobId == null)
|
||||
return operation.Failed("لطفا صنف را انتخاب کنید");
|
||||
if (string.IsNullOrWhiteSpace(command.Population))
|
||||
return operation.Failed("لطفا جمعیت شهر را انتخاب کنید");
|
||||
}
|
||||
|
||||
workshop.Edit(command.WorkshopName, command.WorkshopSureName, command.InsuranceCode, command.TypeOfOwnership,
|
||||
command.ArchiveCode, command.AgentName, command.AgentPhone, command.State, command.City,
|
||||
command.Address,
|
||||
command.TypeOfInsuranceSend, command.TypeOfContract, command.ContractTerm, command.AgreementNumber
|
||||
, command.FixedSalary, command.Population, command.InsuranceJobId, command.ZoneName,
|
||||
command.AddBonusesPay, command.AddYearsPay, command.AddLeavePay,command.TotalPaymentHide,command.IsClassified,
|
||||
command.ComputeOptions, command.BonusesOptions, command.YearsOptions,command.HasRollCallFreeVip, command.WorkshopHolidayWorking,
|
||||
command.InsuranceCheckoutOvertime, command.InsuranceCheckoutFamilyAllowance);
|
||||
_workshopRepository.SaveChanges();
|
||||
|
||||
//_workshopRepository.RemoveOldRelation(command.Id);
|
||||
_workshopRepository.RemoveEmployerWorkshop(command.Id);
|
||||
foreach (var e in employer)
|
||||
{
|
||||
_workshopRepository.EmployerWorkshop(workshop.id, e);
|
||||
}
|
||||
// _workshopRepository.WorkshopAccounts(accountIds, workshop.id);
|
||||
foreach (var item in leftWork)
|
||||
{
|
||||
var editLeft = _leftWorkRepository.Get(item.Id);
|
||||
|
||||
editLeft.EditBonuses(command.AddBonusesPay, command.AddYearsPay, command.AddLeavePay);
|
||||
_leftWorkRepository.SaveChanges();
|
||||
}
|
||||
return operation.Succcedded();
|
||||
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
//public OperationResult CreateForClient(CreateWorkshop command)
|
||||
//{
|
||||
|
||||
// var accountIds = new List<long>();
|
||||
// var operation = new OperationResult();
|
||||
// //if (command.EmployerIdList == null)
|
||||
// // return operation.Failed("لطفا کارفرما را انتخاب نمایید");
|
||||
// var employer = command.EmployerIdList.ToList();
|
||||
// if (command.AccountIdsList != null)
|
||||
// {
|
||||
// accountIds = command.AccountIdsList.ToList();
|
||||
// }
|
||||
|
||||
// if (string.IsNullOrEmpty(command.WorkshopName) || string.IsNullOrEmpty(command.ArchiveCode) || command.ArchiveCode == "0")
|
||||
// return operation.Failed("موارد اجباری را پر کنید");
|
||||
// //if (_workshopRepository.Exists(x => x.WorkshopName == command.WorkshopName))
|
||||
// // return operation.Failed("نام کارگاه تکراری است");
|
||||
// if (_workshopRepository.Exists(x => x.InsuranceCode != null && x.InsuranceCode == command.InsuranceCode))
|
||||
// {
|
||||
// if (_workshopRepository.ExistsWorkshopAccountInsuranceCode(command.InsuranceCode))
|
||||
// return operation.Failed("کد بیمه کارگاه تکراری است");
|
||||
// }
|
||||
|
||||
// if (_workshopRepository.ExistsWorkshopAccountArchiveCode(command.ArchiveCode))
|
||||
// return operation.Failed("شماره بایگانی تکراری است");
|
||||
|
||||
// if (string.IsNullOrEmpty(command.State)) //(!string.IsNullOrEmpty(command.Address) && string.IsNullOrEmpty(command.State))
|
||||
// return operation.Failed("لطفا استان و شهر را انتخاب کنید");
|
||||
|
||||
// if (command.City == "0" || command.City == "شهرستان")
|
||||
// return operation.Failed("لطفا شهر را انتخاب کنید");
|
||||
// if (string.IsNullOrEmpty(command.Address))
|
||||
// return operation.Failed("لطفا آدرس را وارد کنید");
|
||||
|
||||
// if (!string.IsNullOrEmpty(command.TypeOfInsuranceSend) && command.TypeOfInsuranceSend != "false" && string.IsNullOrEmpty(command.InsuranceCode))
|
||||
// return operation.Failed("لطفا کد بیمه کارگاه را وارد کنید");
|
||||
|
||||
// if (command.FixedSalary)
|
||||
// {
|
||||
// if (command.InsuranceJobId == 0 || command.InsuranceJobId == null)
|
||||
// return operation.Failed("لطفا صنف را انتخاب کنید");
|
||||
// if (string.IsNullOrWhiteSpace(command.Population))
|
||||
// return operation.Failed("لطفا جمعیت شهر را انتخاب کنید");
|
||||
// }
|
||||
|
||||
// //if (string.IsNullOrWhiteSpace(command.TypeOfInsuranceSend))
|
||||
// // return operation.Failed("لطفا نوع ارسال لیست بیمه را مشخص کنید");
|
||||
|
||||
// var workshop = new Workshop(command.WorkshopName, command.WorkshopSureName, command.InsuranceCode,command.TypeOfOwnership,
|
||||
// command.ArchiveCode, command.AgentName, command.AgentPhone, command.State, command.City, command.Address,
|
||||
// command.TypeOfInsuranceSend, command.TypeOfContract, command.ContractTerm, command.AgreementNumber, command.FixedSalary,
|
||||
// command.Population, command.InsuranceJobId, command.ZoneName, command.AddBonusesPay,
|
||||
// command.AddYearsPay, command.AddLeavePay,command.TotalPaymentHide, command.IsClassified, command.ComputeOptions,
|
||||
// command.BonusesOptions, command.YearsOptions,command.HasRollCallFreeVip, command.WorkshopHolidayWorking,
|
||||
// command.InsuranceCheckoutOvertime,command.InsuranceCheckoutFamilyAllowance);
|
||||
// _workshopRepository.Create(workshop);
|
||||
// _workshopRepository.SaveChanges();
|
||||
|
||||
|
||||
|
||||
// foreach (var e in employer)
|
||||
// {
|
||||
// _workshopRepository.EmployerWorkshop(workshop.id, e);
|
||||
// }
|
||||
|
||||
|
||||
// _workshopRepository.CreateWorkshopAccounts(accountIds, workshop.id);
|
||||
|
||||
|
||||
|
||||
// return operation.Succcedded();
|
||||
|
||||
|
||||
//}
|
||||
|
||||
//public OperationResult EditForClient(EditWorkshop command)
|
||||
//{
|
||||
// var leftSearch = new LeftWorkSearchModel()
|
||||
// {
|
||||
// WorkshopId = command.Id
|
||||
// };
|
||||
// var leftWork = _leftWorkRepository.search(leftSearch);
|
||||
// var accountIds = new List<long>();
|
||||
// var operation = new OperationResult();
|
||||
// var workshop = _workshopRepository.Get(command.Id);
|
||||
// if (command.AccountIdsList != null)
|
||||
// {
|
||||
// accountIds = command.AccountIdsList.ToList();
|
||||
// }
|
||||
// if (workshop == null)
|
||||
// operation.Failed("رکورد مورد نظر وجود ندارد");
|
||||
// if (command.EmployerIdList == null)
|
||||
// return operation.Failed("لطفا کارفرما را انتخاب نمایید");
|
||||
// var employer = command.EmployerIdList.ToList();
|
||||
|
||||
// if (string.IsNullOrEmpty(command.WorkshopName) || string.IsNullOrEmpty(command.ArchiveCode) || command.ArchiveCode == "0")
|
||||
// return operation.Failed("موارد اجباری را پر کنید");
|
||||
|
||||
// //if (_workshopRepository.Exists(x => x.WorkshopName == command.WorkshopName && x.id != command.Id))
|
||||
// // return operation.Failed(" رکورد مورد نظر تکراری است ");
|
||||
// if (_workshopRepository.Exists(x =>
|
||||
// x.InsuranceCode != null && x.InsuranceCode == command.InsuranceCode && x.id != command.Id))
|
||||
// {
|
||||
// if (_workshopRepository.ExistsWorkshopAccountInsuranceCodeByworkshopId(command.Id, command.InsuranceCode))
|
||||
// return operation.Failed("کد بیمه کارگاه تکراری است");
|
||||
// }
|
||||
|
||||
// if (_workshopRepository.ExistsWorkshopAccountArchiveCodeByWorkshopId(command.Id, command.ArchiveCode))
|
||||
// return operation.Failed("شماره بایگانی تکراری است");
|
||||
|
||||
// if (command.State == null)
|
||||
// return operation.Failed("لطفا استان و شهر را انتخاب کنید");
|
||||
// if ((command.City == "0" || command.City == "شهرستان"))
|
||||
// return operation.Failed("لطفا شهر را انتخاب کنید");
|
||||
// if (command.TypeOfInsuranceSend != null && command.InsuranceCode == null)
|
||||
// return operation.Failed("لطفا کد بیمه کارگاه را وارد کنید");
|
||||
// if (command.Address == null)
|
||||
// return operation.Failed("لطفا آدرس را وارد کنید");
|
||||
// if (command.FixedSalary)
|
||||
// {
|
||||
// if (command.InsuranceJobId == 0 || command.InsuranceJobId == null)
|
||||
// return operation.Failed("لطفا صنف را انتخاب کنید");
|
||||
// if (string.IsNullOrWhiteSpace(command.Population))
|
||||
// return operation.Failed("لطفا جمعیت شهر را انتخاب کنید");
|
||||
// }
|
||||
|
||||
// workshop.Edit(command.WorkshopName, command.WorkshopSureName, command.InsuranceCode, command.TypeOfOwnership,
|
||||
// command.ArchiveCode, command.AgentName, command.AgentPhone, command.State, command.City,
|
||||
// command.Address,
|
||||
// command.TypeOfInsuranceSend, command.TypeOfContract, command.ContractTerm, command.AgreementNumber
|
||||
// , command.FixedSalary, command.Population, command.InsuranceJobId, command.ZoneName,
|
||||
// command.AddBonusesPay, command.AddYearsPay, command.AddLeavePay,command.TotalPaymentHide,command.IsClassified,
|
||||
// command.ComputeOptions, command.BonusesOptions, command.YearsOptions,command.HasRollCallFreeVip, command.WorkshopHolidayWorking,
|
||||
// command.InsuranceCheckoutOvertime, command.InsuranceCheckoutFamilyAllowance);
|
||||
// _workshopRepository.SaveChanges();
|
||||
|
||||
// //_workshopRepository.RemoveOldRelation(command.Id);
|
||||
// _workshopRepository.RemoveEmployerWorkshop(command.Id);
|
||||
// foreach (var e in employer)
|
||||
// {
|
||||
// _workshopRepository.EmployerWorkshop(workshop.id, e);
|
||||
// }
|
||||
// // _workshopRepository.WorkshopAccounts(accountIds, workshop.id);
|
||||
// foreach (var item in leftWork)
|
||||
// {
|
||||
// var editLeft = _leftWorkRepository.Get(item.Id);
|
||||
|
||||
// editLeft.EditBonuses(command.AddBonusesPay, command.AddYearsPay, command.AddLeavePay);
|
||||
// _leftWorkRepository.SaveChanges();
|
||||
// }
|
||||
// return operation.Succcedded();
|
||||
|
||||
//}
|
||||
|
||||
public bool GetWorkshopAccountByAcountID(long acountID)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using Company.Domain.InsurancWorkshopInfoAgg;
|
||||
using System;
|
||||
using _0_Framework.Application;
|
||||
using Company.Domain.InsurancWorkshopInfoAgg;
|
||||
using Company.Domain.WorkshopAgg;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
@@ -38,10 +40,13 @@ partial class WorkshopMapping : IEntityTypeConfiguration<Workshop>
|
||||
builder.Property(x => x.IsOldContract);
|
||||
builder.Property(x => x.HasRollCallFreeVip).HasMaxLength(5);
|
||||
builder.Property(x => x.WorkshopHolidayWorking);
|
||||
//builder.HasOne(x => x.Employer)
|
||||
// .WithMany(x => x.Workshops)
|
||||
// .HasForeignKey(x => x.EmployerId);
|
||||
builder.HasMany(x => x.LeftWorks)
|
||||
|
||||
builder.Property(x => x.CutContractEndOfYear).HasConversion(x => x.ToString()
|
||||
, x => ((IsActive)Enum.Parse(typeof(IsActive), x))).HasMaxLength(5);
|
||||
//builder.HasOne(x => x.Employer)
|
||||
// .WithMany(x => x.Workshops)
|
||||
// .HasForeignKey(x => x.EmployerId);
|
||||
builder.HasMany(x => x.LeftWorks)
|
||||
.WithOne(x => x.Workshop)
|
||||
.HasForeignKey(x => x.WorkshopId);
|
||||
|
||||
|
||||
9736
CompanyManagment.EFCore/Migrations/20250611160351_add workshop create contract settings.Designer.cs
generated
Normal file
9736
CompanyManagment.EFCore/Migrations/20250611160351_add workshop create contract settings.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,74 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace CompanyManagment.EFCore.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class addworkshopcreatecontractsettings : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "CreateCheckout",
|
||||
table: "Workshops",
|
||||
type: "bit",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "CreateContract",
|
||||
table: "Workshops",
|
||||
type: "bit",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "CutContractEndOfYear",
|
||||
table: "Workshops",
|
||||
type: "nvarchar(5)",
|
||||
maxLength: 5,
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "SignCheckout",
|
||||
table: "Workshops",
|
||||
type: "bit",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "SignContract",
|
||||
table: "Workshops",
|
||||
type: "bit",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CreateCheckout",
|
||||
table: "Workshops");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CreateContract",
|
||||
table: "Workshops");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CutContractEndOfYear",
|
||||
table: "Workshops");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "SignCheckout",
|
||||
table: "Workshops");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "SignContract",
|
||||
table: "Workshops");
|
||||
}
|
||||
}
|
||||
}
|
||||
9748
CompanyManagment.EFCore/Migrations/20250611172746_add settings for employee compute options.Designer.cs
generated
Normal file
9748
CompanyManagment.EFCore/Migrations/20250611172746_add settings for employee compute options.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,62 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace CompanyManagment.EFCore.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class addsettingsforemployeecomputeoptions : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "CreateCheckout",
|
||||
table: "EmployeeComputeOptions",
|
||||
type: "bit",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "CreateContract",
|
||||
table: "EmployeeComputeOptions",
|
||||
type: "bit",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "SignCheckout",
|
||||
table: "EmployeeComputeOptions",
|
||||
type: "bit",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "SignContract",
|
||||
table: "EmployeeComputeOptions",
|
||||
type: "bit",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CreateCheckout",
|
||||
table: "EmployeeComputeOptions");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CreateContract",
|
||||
table: "EmployeeComputeOptions");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "SignCheckout",
|
||||
table: "EmployeeComputeOptions");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "SignContract",
|
||||
table: "EmployeeComputeOptions");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1809,12 +1809,24 @@ namespace CompanyManagment.EFCore.Migrations
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<bool>("CreateCheckout")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("CreateContract")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<long>("EmployeeId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<bool>("SignCheckout")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("SignContract")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<long>("WorkshopId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
@@ -5646,9 +5658,20 @@ namespace CompanyManagment.EFCore.Migrations
|
||||
.HasMaxLength(10)
|
||||
.HasColumnType("nvarchar(10)");
|
||||
|
||||
b.Property<bool>("CreateCheckout")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("CreateContract")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("CutContractEndOfYear")
|
||||
.IsRequired()
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("nvarchar(5)");
|
||||
|
||||
b.Property<bool>("FixedSalary")
|
||||
.HasColumnType("bit");
|
||||
|
||||
@@ -5686,6 +5709,12 @@ namespace CompanyManagment.EFCore.Migrations
|
||||
.HasMaxLength(25)
|
||||
.HasColumnType("nvarchar(25)");
|
||||
|
||||
b.Property<bool>("SignCheckout")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("SignContract")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("State")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
@@ -30,8 +30,12 @@ public class EmployeeComputeOptionsRepository : RepositoryBase<long, EmployeeCom
|
||||
ComputeOptions = x.ComputeOptions,
|
||||
YearsOptions = x.YearsOptions,
|
||||
BonusesOptions = x.BonusesOptions,
|
||||
SignCheckout = x.SignCheckout,
|
||||
CreateCheckout = x.CreateCheckout,
|
||||
CreateContract = x.CreateContract,
|
||||
SignContract = x.SignContract,
|
||||
|
||||
}).FirstOrDefault(x => x.WorkshopId == workshopId && x.EmployeeId == employeeId);
|
||||
}).FirstOrDefault(x => x.WorkshopId == workshopId && x.EmployeeId == employeeId);
|
||||
|
||||
if (result == null)
|
||||
{
|
||||
@@ -45,7 +49,11 @@ public class EmployeeComputeOptionsRepository : RepositoryBase<long, EmployeeCom
|
||||
ComputeOptions = getFromWorkshop.ComputeOptions,
|
||||
YearsOptions = getFromWorkshop.YearsOptions,
|
||||
BonusesOptions= getFromWorkshop.BonusesOptions,
|
||||
};
|
||||
CreateCheckout = true,
|
||||
CreateContract = true,
|
||||
SignCheckout = true,
|
||||
SignContract = true
|
||||
};
|
||||
|
||||
result = fromWorkshop;
|
||||
|
||||
|
||||
@@ -197,9 +197,14 @@ public class WorkshopRepository : RepositoryBase<long, Company.Domain.WorkshopAg
|
||||
HasRollCallFreeVip = x.HasRollCallFreeVip,
|
||||
WorkshopHolidayWorking = x.WorkshopHolidayWorking,
|
||||
InsuranceCheckoutOvertime = x.InsuranceCheckoutOvertime,
|
||||
InsuranceCheckoutFamilyAllowance = x.InsuranceCheckoutFamilyAllowance
|
||||
InsuranceCheckoutFamilyAllowance = x.InsuranceCheckoutFamilyAllowance,
|
||||
CutContractEndOfYear = x.CutContractEndOfYear,
|
||||
CreateContract = x.CreateContract,
|
||||
SignContract = x.SignContract,
|
||||
CreateCheckout = x.CreateCheckout,
|
||||
SignCheckout = x.SignCheckout,
|
||||
|
||||
}).FirstOrDefault(x => x.Id == id);
|
||||
}).FirstOrDefault(x => x.Id == id);
|
||||
}
|
||||
|
||||
public List<long> GetRelation(long workshopid)
|
||||
|
||||
@@ -2,620 +2,204 @@
|
||||
@model ServiceHost.Areas.Admin.Pages.Company.ConnectedPersonnels.IndexModel
|
||||
|
||||
@{
|
||||
Layout = "Shared/_AdminLayout";
|
||||
ViewData["title"] = "لیست پرسنلهای " + Model.WorkshopFullName;
|
||||
|
||||
var i = 1;
|
||||
|
||||
|
||||
<style>
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
td, th {
|
||||
border-bottom: 1px solid #cfe5e0;
|
||||
font-size: 1rem;
|
||||
text-align: right;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
th {
|
||||
padding: 1.5rem 1rem;
|
||||
}
|
||||
|
||||
td {
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
tbody tr {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
tbody tr.selected td {
|
||||
background: #e0eeeb;
|
||||
}
|
||||
|
||||
tbody tr:hover:not(.selected) td,
|
||||
tbody tr.hover:not(.selected) td {
|
||||
background: #f0f7f5;
|
||||
}
|
||||
|
||||
.table-footer, .table-header {
|
||||
font-size: .875rem;
|
||||
}
|
||||
|
||||
.table-footer {
|
||||
margin: -1.5rem 0 0;
|
||||
}
|
||||
|
||||
.table-header {
|
||||
margin: 0 0 1rem;
|
||||
}
|
||||
|
||||
.table-footer.grid,
|
||||
.table-header.grid {
|
||||
align-items: center;
|
||||
display: grid;
|
||||
grid-auto-flow: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.border-index {
|
||||
background: #dbeafe;
|
||||
height: 30px;
|
||||
width: 30px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 6px;
|
||||
color: #3f3f46;
|
||||
}
|
||||
|
||||
.black {
|
||||
background: #00000070
|
||||
}
|
||||
|
||||
button:disabled,
|
||||
button[disabled] {
|
||||
border: 1px solid #999999 !important;
|
||||
background-color: #cccccc !important;
|
||||
color: #666666 !important;
|
||||
}
|
||||
|
||||
.top-information,
|
||||
.bottom-information {
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
table.dataTable.dtr-inline.collapsed > tbody > tr[role="row"] > td:first-child:before,
|
||||
table.dataTable.dtr-inline.collapsed > tbody > tr[role="row"] > th:first-child:before {
|
||||
background-color: #29cc97;
|
||||
top: 14px;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
line-height: 16px;
|
||||
border: 0;
|
||||
font-weight: bold;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
table.dataTable.dtr-inline.collapsed > tbody > tr.parent > td:first-child:before, table.dataTable.dtr-inline.collapsed > tbody > tr.parent > th:first-child:before {
|
||||
background-color: fec400;
|
||||
}
|
||||
|
||||
.dataTables_wrapper {
|
||||
direction: rtl;
|
||||
}
|
||||
|
||||
.dataTables_length {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.dataTables_filter {
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#DataTables_Table_0_last {
|
||||
-moz-border-radius-bottomright: 0px;
|
||||
-webkit-border-bottom-right-radius: 0px;
|
||||
-khtml-border-bottom-right-radius: 0px;
|
||||
border-bottom-right-radius: 0px;
|
||||
-moz-border-radius-topright: 0px;
|
||||
-webkit-border-top-right-radius: 0px;
|
||||
-khtml-border-top-right-radius: 0px;
|
||||
border-top-right-radius: 0px;
|
||||
-moz-border-radius-bottomleft: 6px;
|
||||
-webkit-border-bottom-left-radius: 6px;
|
||||
-khtml-border-bottom-left-radius: 6px;
|
||||
border-bottom-left-radius: 6px;
|
||||
-moz-border-radius-topleft: 6px;
|
||||
-webkit-border-top-left-radius: 6px;
|
||||
-khtml-border-top-left-radius: 6px;
|
||||
border-top-left-radius: 6px;
|
||||
}
|
||||
|
||||
#DataTables_Table_0_first {
|
||||
-moz-border-radius-bottomright: 6px;
|
||||
-webkit-border-bottom-right-radius: 6px;
|
||||
-khtml-border-bottom-right-radius: 6px;
|
||||
border-bottom-right-radius: 6px;
|
||||
-moz-border-radius-topright: 6px;
|
||||
-webkit-border-top-right-radius: 6px;
|
||||
-khtml-border-top-right-radius: 6px;
|
||||
border-top-right-radius: 6px;
|
||||
-moz-border-radius-bottomleft: 0px;
|
||||
-webkit-border-bottom-left-radius: 0px;
|
||||
-khtml-border-bottom-left-radius: 0px;
|
||||
border-bottom-left-radius: 0px;
|
||||
-moz-border-radius-topleft: 0px;
|
||||
-webkit-border-top-left-radius: 0px;
|
||||
-khtml-border-top-left-radius: 0px;
|
||||
border-top-left-radius: 0px;
|
||||
}
|
||||
|
||||
.dataTables_info {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.dataTables_paginate {
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
div.dataTables_wrapper div.dataTables_paginate ul.pagination {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
table.dataTable > tbody > tr.child ul.dtr-details {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
Layout = "Shared/_AdminLayout";
|
||||
ViewData["title"] = "لیست پرسنلهای " + @Model.WorkshopFullName;
|
||||
string adminVersion = _0_Framework.Application.Version.AdminVersion;
|
||||
int i = 1;
|
||||
}
|
||||
|
||||
@section Styles
|
||||
{
|
||||
<link href="@Href("~/admintheme/css/moreBtnsPopup.css")" rel="stylesheet"/>
|
||||
<link href="~/admintheme/assets/datatables-new/css/dataTables.bootstrap4.min.css" rel="stylesheet"/>
|
||||
<link href="~/admintheme/assets/datatables-new/css/responsive.bootstrap4.min.css" rel="stylesheet"/>
|
||||
<link href="@Href("~/admintheme/css/moreBtnsPopup.css")" rel="stylesheet" />
|
||||
<link href="~/admintheme/assets/datatables-new/css/dataTables.bootstrap4.min.css" rel="stylesheet" />
|
||||
<link href="~/admintheme/assets/datatables-new/css/responsive.bootstrap4.min.css" rel="stylesheet" />
|
||||
<link href="~/assetsadmin/page/connectedpersonnels/css/index.css?ver=@adminVersion" rel="stylesheet" />
|
||||
}
|
||||
|
||||
<input type="hidden" asp-for="@Model.workshopId" value="@Model.workshopId" id="workshopId"/>
|
||||
<input type="hidden" asp-for="@Model.workshopId" value="@Model.workshopId" id="workshopId" />
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div permission="10312" class="panel panel-default">
|
||||
<div class="panel-heading" style="background-color: #465149">
|
||||
<h3 class="panel-title"><i class="fa fa-list" style="padding-left: 3px; font-size: 14px"></i> لیست پرسنلهای @Model.WorkshopFullName</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-sm-12 col-xs-12">
|
||||
<table id="responsive-data-table" class="table dt-responsive nowrap" style="width:100%" dir="rtl">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ردیف</th>
|
||||
<th>نام و نام خانوادگی</th>
|
||||
<th>کد پرسنلی</th>
|
||||
<th>دارای قرارداد</th>
|
||||
<th>دارای بیمه</th>
|
||||
<th>انتخاب نوع محاسبه طلب مرخصی</th>
|
||||
<th>انتخاب نوع محاسبه سنوات</th>
|
||||
<th>انتخاب نوع محاسبه عیدی و پاداش</th>
|
||||
<th>عملیات</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in Model.PersonnelList.ConnectedPersonnelViewModels)
|
||||
{
|
||||
<tr class="tableFindBtn @(item.Black ? "black" : "")">
|
||||
<td class="text-center">
|
||||
<div class="border-index">@i</div>
|
||||
</td>
|
||||
@{
|
||||
i++;
|
||||
}
|
||||
<td>
|
||||
<h6>@item.PersonName</h6>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<h6>@item.PersonelCode</h6>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
@if (item.ContractPerson && !item.ContractLeft)
|
||||
{
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="12" cy="12" r="9" fill="#BEF264"/>
|
||||
<path d="M12 21C14.0822 21 16.1 20.278 17.7095 18.9571C19.3191 17.6362 20.4209 15.798 20.8271 13.7558C21.2333 11.7136 20.9188 9.59376 19.9373 7.75743C18.9558 5.9211 17.3679 4.48191 15.4442 3.68508C13.5205 2.88826 11.38 2.78311 9.38744 3.38754C7.3949 3.99197 5.67358 5.26858 4.51677 6.99987C3.35997 8.73115 2.83925 10.81 3.04334 12.8822C3.24743 14.9543 4.1637 16.8916 5.63604 18.364" stroke="#3F6212" stroke-width="1.2" stroke-linecap="round"/>
|
||||
<path d="M16 10L12.402 14.3175C11.7465 15.1042 11.4187 15.4976 10.9781 15.5176C10.5375 15.5375 10.1755 15.1755 9.45139 14.4514L8 13" stroke="#3F6212" stroke-width="1.2" stroke-linecap="round"/>
|
||||
</svg>
|
||||
}
|
||||
else
|
||||
{
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="12" cy="12" r="9" fill="#FCA5A5"/>
|
||||
<path d="M12 21C14.0822 21 16.1 20.278 17.7095 18.9571C19.3191 17.6362 20.4209 15.798 20.8271 13.7558C21.2333 11.7136 20.9188 9.59376 19.9373 7.75743C18.9558 5.9211 17.3679 4.48191 15.4442 3.68508C13.5205 2.88826 11.38 2.78311 9.38744 3.38754C7.3949 3.99197 5.67358 5.26858 4.51677 6.99987C3.35997 8.73115 2.83925 10.81 3.04334 12.8822C3.24743 14.9543 4.1637 16.8916 5.63604 18.364" stroke="#B91C1C" stroke-width="1.2" stroke-linecap="round"/>
|
||||
<path d="M8 12H16" stroke="#B91C1C" stroke-width="1.2" stroke-linecap="round"/>
|
||||
</svg>
|
||||
}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
@if (item.InsurancePerson && !item.InsurancetLeft)
|
||||
{
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="12" cy="12" r="9" fill="#BEF264"/>
|
||||
<path d="M12 21C14.0822 21 16.1 20.278 17.7095 18.9571C19.3191 17.6362 20.4209 15.798 20.8271 13.7558C21.2333 11.7136 20.9188 9.59376 19.9373 7.75743C18.9558 5.9211 17.3679 4.48191 15.4442 3.68508C13.5205 2.88826 11.38 2.78311 9.38744 3.38754C7.3949 3.99197 5.67358 5.26858 4.51677 6.99987C3.35997 8.73115 2.83925 10.81 3.04334 12.8822C3.24743 14.9543 4.1637 16.8916 5.63604 18.364" stroke="#3F6212" stroke-width="1.2" stroke-linecap="round"/>
|
||||
<path d="M16 10L12.402 14.3175C11.7465 15.1042 11.4187 15.4976 10.9781 15.5176C10.5375 15.5375 10.1755 15.1755 9.45139 14.4514L8 13" stroke="#3F6212" stroke-width="1.2" stroke-linecap="round"/>
|
||||
</svg>
|
||||
}
|
||||
else
|
||||
{
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="12" cy="12" r="9" fill="#FCA5A5"/>
|
||||
<path d="M12 21C14.0822 21 16.1 20.278 17.7095 18.9571C19.3191 17.6362 20.4209 15.798 20.8271 13.7558C21.2333 11.7136 20.9188 9.59376 19.9373 7.75743C18.9558 5.9211 17.3679 4.48191 15.4442 3.68508C13.5205 2.88826 11.38 2.78311 9.38744 3.38754C7.3949 3.99197 5.67358 5.26858 4.51677 6.99987C3.35997 8.73115 2.83925 10.81 3.04334 12.8822C3.24743 14.9543 4.1637 16.8916 5.63604 18.364" stroke="#B91C1C" stroke-width="1.2" stroke-linecap="round"/>
|
||||
<path d="M8 12H16" stroke="#B91C1C" stroke-width="1.2" stroke-linecap="round"/>
|
||||
</svg>
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
@if (item.ContractPerson)
|
||||
{
|
||||
<select class="form-control" data-ComputeOptions="@item.EmployeeId" id="ComputeOptionsSelect" asp-for="@item.ComputeOptions" style="width: 230px;font-size: 12px;">
|
||||
<option value="OnEndOfContract">محاسبه در پایان قرارداد</option>
|
||||
<option value="OnLeftWork"> محاسبه در پایان همکاری (ترک کار از مجموعه) </option>
|
||||
<option value="OnEndOfYear"> محاسبه در پایان سال به شرطی که قرارداد منتهی به پایان سال باشد </option>
|
||||
</select>
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
@if (item.ContractPerson)
|
||||
{
|
||||
<select class="form-control" data-YearsOptions="@item.EmployeeId" asp-for="@item.YearsOptions" style="width: 230px;font-size: 12px;">
|
||||
<option value="OnCheckoutOfMonth"> محاسبه در فیش حقوقی ماهیانه </option>
|
||||
<option value="OnEndOfContract"> محاسبه در پایان قرارداد </option>
|
||||
<option value="OnLeftWork"> محاسبه در پایان همکاری (ترک کار از مجموعه) </option>
|
||||
<option value="OnEndOfYear"> محاسبه در پایان سال به شرطی که قرارداد منتهی به پایان سال باشد </option>
|
||||
</select>
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
@if (item.ContractPerson)
|
||||
{
|
||||
<select class="form-control" data-BonusesOptions="@item.EmployeeId" asp-for="@item.BonusesOptions" style="width: 230px;font-size: 12px;">
|
||||
<option value="OnCheckoutOfMonth"> محاسبه در فیش حقوقی ماهیانه </option>
|
||||
<option value="OnEndOfContract"> محاسبه در پایان قرارداد </option>
|
||||
<option value="OnEndOfYear"> محاسبه در پایان سال </option>
|
||||
</select>
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
@if (item.ContractPerson)
|
||||
{
|
||||
<button onclick="save(@item.EmployeeId)" class="btn btn-success save" data-save="@item.EmployeeId" disabled="disabled">ذخیره</button>
|
||||
}
|
||||
<a class="btn btn-success pull-left rad" style="margin-left: 5px"
|
||||
href="#showmodal=@Url.Page("./Index", "TakePicture", new { employeeId = item.EmployeeId, workshopId = item.WorkshopId })">
|
||||
<i class="ion-information-circled ionSize"></i>
|
||||
</a>
|
||||
</td>
|
||||
<div class="col-sm-12">
|
||||
<div permission="10312" class="panel panel-default">
|
||||
<div class="panel-heading" style="background-color: #465149">
|
||||
<h3 class="panel-title"><i class="fa fa-list" style="padding-left: 3px; font-size: 14px"></i> لیست پرسنلهای @Model.WorkshopFullName</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-sm-12 col-xs-12">
|
||||
<table id="responsive-data-table" class="table dt-responsive nowrap" style="width:100%" dir="rtl">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ردیف</th>
|
||||
<th>نام و نام خانوادگی</th>
|
||||
<th>کد پرسنلی</th>
|
||||
<th>دارای قرارداد</th>
|
||||
<th>دارای بیمه</th>
|
||||
<th>انتخاب نوع محاسبه طلب مرخصی</th>
|
||||
<th>انتخاب نوع محاسبه سنوات</th>
|
||||
<th>انتخاب نوع محاسبه عیدی و پاداش</th>
|
||||
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th>عدم قرارداد</th>
|
||||
<th>عدم تصفیه حساب</th>
|
||||
|
||||
|
||||
<th>عملیات</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in @Model.PersonnelList.ConnectedPersonnelViewModels)
|
||||
{
|
||||
<tr class="tableFindBtn @(item.Black ? "black" : "")">
|
||||
<td class="text-center">
|
||||
<div class="border-index">@i</div>
|
||||
</td>
|
||||
@{
|
||||
i++;
|
||||
}
|
||||
<td>
|
||||
<h6>@item.PersonName</h6>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<h6>@item.PersonelCode</h6>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
@if (@item.ContractPerson && !@item.ContractLeft)
|
||||
{
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="12" cy="12" r="9" fill="#BEF264" />
|
||||
<path d="M12 21C14.0822 21 16.1 20.278 17.7095 18.9571C19.3191 17.6362 20.4209 15.798 20.8271 13.7558C21.2333 11.7136 20.9188 9.59376 19.9373 7.75743C18.9558 5.9211 17.3679 4.48191 15.4442 3.68508C13.5205 2.88826 11.38 2.78311 9.38744 3.38754C7.3949 3.99197 5.67358 5.26858 4.51677 6.99987C3.35997 8.73115 2.83925 10.81 3.04334 12.8822C3.24743 14.9543 4.1637 16.8916 5.63604 18.364" stroke="#3F6212" stroke-width="1.2" stroke-linecap="round" />
|
||||
<path d="M16 10L12.402 14.3175C11.7465 15.1042 11.4187 15.4976 10.9781 15.5176C10.5375 15.5375 10.1755 15.1755 9.45139 14.4514L8 13" stroke="#3F6212" stroke-width="1.2" stroke-linecap="round" />
|
||||
</svg>
|
||||
}
|
||||
else
|
||||
{
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="12" cy="12" r="9" fill="#FCA5A5" />
|
||||
<path d="M12 21C14.0822 21 16.1 20.278 17.7095 18.9571C19.3191 17.6362 20.4209 15.798 20.8271 13.7558C21.2333 11.7136 20.9188 9.59376 19.9373 7.75743C18.9558 5.9211 17.3679 4.48191 15.4442 3.68508C13.5205 2.88826 11.38 2.78311 9.38744 3.38754C7.3949 3.99197 5.67358 5.26858 4.51677 6.99987C3.35997 8.73115 2.83925 10.81 3.04334 12.8822C3.24743 14.9543 4.1637 16.8916 5.63604 18.364" stroke="#B91C1C" stroke-width="1.2" stroke-linecap="round" />
|
||||
<path d="M8 12H16" stroke="#B91C1C" stroke-width="1.2" stroke-linecap="round" />
|
||||
</svg>
|
||||
}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
@if (@item.InsurancePerson && !@item.InsurancetLeft)
|
||||
{
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="12" cy="12" r="9" fill="#BEF264" />
|
||||
<path d="M12 21C14.0822 21 16.1 20.278 17.7095 18.9571C19.3191 17.6362 20.4209 15.798 20.8271 13.7558C21.2333 11.7136 20.9188 9.59376 19.9373 7.75743C18.9558 5.9211 17.3679 4.48191 15.4442 3.68508C13.5205 2.88826 11.38 2.78311 9.38744 3.38754C7.3949 3.99197 5.67358 5.26858 4.51677 6.99987C3.35997 8.73115 2.83925 10.81 3.04334 12.8822C3.24743 14.9543 4.1637 16.8916 5.63604 18.364" stroke="#3F6212" stroke-width="1.2" stroke-linecap="round" />
|
||||
<path d="M16 10L12.402 14.3175C11.7465 15.1042 11.4187 15.4976 10.9781 15.5176C10.5375 15.5375 10.1755 15.1755 9.45139 14.4514L8 13" stroke="#3F6212" stroke-width="1.2" stroke-linecap="round" />
|
||||
</svg>
|
||||
}
|
||||
else
|
||||
{
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="12" cy="12" r="9" fill="#FCA5A5" />
|
||||
<path d="M12 21C14.0822 21 16.1 20.278 17.7095 18.9571C19.3191 17.6362 20.4209 15.798 20.8271 13.7558C21.2333 11.7136 20.9188 9.59376 19.9373 7.75743C18.9558 5.9211 17.3679 4.48191 15.4442 3.68508C13.5205 2.88826 11.38 2.78311 9.38744 3.38754C7.3949 3.99197 5.67358 5.26858 4.51677 6.99987C3.35997 8.73115 2.83925 10.81 3.04334 12.8822C3.24743 14.9543 4.1637 16.8916 5.63604 18.364" stroke="#B91C1C" stroke-width="1.2" stroke-linecap="round" />
|
||||
<path d="M8 12H16" stroke="#B91C1C" stroke-width="1.2" stroke-linecap="round" />
|
||||
</svg>
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
@if (@item.ContractPerson)
|
||||
{
|
||||
<select class="form-control" data-ComputeOptions="@item.EmployeeId" id="ComputeOptionsSelect" asp-for="@item.ComputeOptions" style="width: 170px;font-size: 12px;">
|
||||
<option value="OnEndOfContract">محاسبه در پایان قرارداد</option>
|
||||
<option value="OnLeftWork"> محاسبه در پایان همکاری (ترک کار از مجموعه) </option>
|
||||
<option value="OnEndOfYear"> محاسبه در پایان سال به شرطی که قرارداد منتهی به پایان سال باشد </option>
|
||||
</select>
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
@if (@item.ContractPerson)
|
||||
{
|
||||
<select class="form-control" data-YearsOptions="@item.EmployeeId" asp-for="@item.YearsOptions" style="width: 170px;font-size: 12px;">
|
||||
<option value="OnCheckoutOfMonth"> محاسبه در فیش حقوقی ماهیانه </option>
|
||||
<option value="OnEndOfContract"> محاسبه در پایان قرارداد </option>
|
||||
<option value="OnLeftWork"> محاسبه در پایان همکاری (ترک کار از مجموعه) </option>
|
||||
<option value="OnEndOfYear"> محاسبه در پایان سال به شرطی که قرارداد منتهی به پایان سال باشد </option>
|
||||
</select>
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
@if (@item.ContractPerson)
|
||||
{
|
||||
<select class="form-control" data-BonusesOptions="@item.EmployeeId" asp-for="@item.BonusesOptions" style="width: 170px;font-size: 12px;">
|
||||
<option value="OnCheckoutOfMonth"> محاسبه در فیش حقوقی ماهیانه </option>
|
||||
<option value="OnEndOfContract"> محاسبه در پایان قرارداد </option>
|
||||
<option value="OnEndOfYear"> محاسبه در پایان سال </option>
|
||||
</select>
|
||||
}
|
||||
</td>
|
||||
|
||||
<td style="user-select: none">
|
||||
@if (@item.ContractPerson)
|
||||
{
|
||||
<div>
|
||||
<label for="FailureCreateContract_@item.EmployeeId" style="display: flex; align-items: center; gap: 5px;">
|
||||
<input type="checkbox" id="FailureCreateContract_@item.EmployeeId" @(!item.CreateContract ? "checked" : "") />
|
||||
عدم ایجاد قرارداد
|
||||
</label>
|
||||
</div>
|
||||
<div>
|
||||
<label for="FailureSignContract_@item.EmployeeId" style="display: flex; align-items: center; gap: 5px;">
|
||||
<input type="checkbox" id="FailureSignContract_@item.EmployeeId" @(!item.SignContract ? "checked" : "") />
|
||||
عدم امضا قرارداد
|
||||
</label>
|
||||
</div>
|
||||
}
|
||||
</td>
|
||||
|
||||
<td style="user-select: none">
|
||||
@if (@item.ContractPerson)
|
||||
{
|
||||
<div>
|
||||
<label for="FailureCreateCheckout_@item.EmployeeId" style="display: flex; align-items: center; gap: 5px;">
|
||||
<input type="checkbox" id="FailureCreateCheckout_@item.EmployeeId" @(!item.CreateCheckout ? "checked" : "") />
|
||||
عدم ایجاد تصفیه حساب
|
||||
</label>
|
||||
</div>
|
||||
<div>
|
||||
<label for="FailureSignCheckout_@item.EmployeeId" style="display: flex; align-items: center; gap: 5px;">
|
||||
<input type="checkbox" id="FailureSignCheckout_@item.EmployeeId" @(!item.SignCheckout ? "checked" : "") />
|
||||
عدم امضا تصفیه حساب
|
||||
</label>
|
||||
</div>
|
||||
}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
@if (@item.ContractPerson)
|
||||
{
|
||||
<button onclick="save(@item.EmployeeId)" class="btn btn-success save" data-save="@item.EmployeeId" disabled="disabled">ذخیره</button>
|
||||
}
|
||||
<a class="btn btn-success pull-left rad" style="margin-left: 5px"
|
||||
href="#showmodal=@Url.Page("./Index", "TakePicture", new { employeeId = item.EmployeeId, workshopId = item.WorkshopId})">
|
||||
<i class="ion-information-circled ionSize"></i>
|
||||
</a>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@section Script {
|
||||
<script src="~/AdminTheme/assets/js/site.js"></script>
|
||||
<script src="~/AdminTheme/assets/js/site.js"></script>
|
||||
|
||||
<script src="~/adminTheme/assets/datatables-new/js/jquery.dataTables.min.js"></script>
|
||||
<script src="~/adminTheme/assets/datatables-new/js/dataTables.bootstrap4.min.js"></script>
|
||||
<script src="~/adminTheme/assets/datatables-new/js/dataTables.responsive.min.js"></script>
|
||||
<script src="~/adminTheme/assets/datatables-new/js/jquery.dataTables.min.js"></script>
|
||||
<script src="~/adminTheme/assets/datatables-new/js/dataTables.bootstrap4.min.js"></script>
|
||||
<script src="~/adminTheme/assets/datatables-new/js/dataTables.responsive.min.js"></script>
|
||||
|
||||
@* <script src="~/adminTheme/assets/datatables/jquery.dataTables.min.js"></script>
|
||||
@* <script src="~/adminTheme/assets/datatables/jquery.dataTables.min.js"></script>
|
||||
<script src="~/adminTheme/assets/datatables/dataTables.bootstrap.js"></script> *@
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#responsive-data-table').DataTable({
|
||||
"alengthMenu": [["All", 10, 50, 100, -1], ["All", 10, 50, 100, "All"]],
|
||||
"order": [[0, 'asc']],
|
||||
"dom": '<"row justify-content-between top-information"lf>rt<"row justify-content-between bottom-information"ip><"clear">',
|
||||
"language": {
|
||||
"emptyTable": "هیچ دادهای در جدول وجود ندارد",
|
||||
"info": "نمایش _START_ تا _END_ از _TOTAL_ ردیف",
|
||||
"infoEmpty": "نمایش 0 تا 0 از 0 ردیف",
|
||||
"infoFiltered": "(فیلتر شده از _MAX_ ردیف)",
|
||||
"infoThousands": ",",
|
||||
"lengthMenu": "نمایش _MENU_ ردیف",
|
||||
"processing": "در حال پردازش...",
|
||||
"search": "جستجو:",
|
||||
"zeroRecords": "رکوردی با این مشخصات پیدا نشد",
|
||||
"paginate": {
|
||||
"next": "بعدی",
|
||||
"previous": "قبلی",
|
||||
"first": "ابتدا",
|
||||
"last": "انتها"
|
||||
},
|
||||
"aria": {
|
||||
"sortAscending": ": فعال سازی نمایش به صورت صعودی",
|
||||
"sortDescending": ": فعال سازی نمایش به صورت نزولی"
|
||||
},
|
||||
"autoFill": {
|
||||
"cancel": "انصراف",
|
||||
"fill": "پر کردن همه سلول ها با ساختار سیستم",
|
||||
"fillHorizontal": "پر کردن سلول به صورت افقی",
|
||||
"fillVertical": "پرکردن سلول به صورت عمودی"
|
||||
},
|
||||
"buttons": {
|
||||
"collection": "مجموعه",
|
||||
"colvis": "قابلیت نمایش ستون",
|
||||
"colvisRestore": "بازنشانی قابلیت نمایش",
|
||||
"copy": "کپی",
|
||||
"copySuccess": {
|
||||
"1": "یک ردیف داخل حافظه کپی شد",
|
||||
"_": "%ds ردیف داخل حافظه کپی شد"
|
||||
},
|
||||
"copyTitle": "کپی در حافظه",
|
||||
"pageLength": {
|
||||
"-1": "نمایش همه ردیفها",
|
||||
"_": "نمایش %d ردیف",
|
||||
"1": "نمایش 1 ردیف"
|
||||
},
|
||||
"print": "چاپ",
|
||||
"copyKeys": "برای کپی داده جدول در حافظه سیستم کلید های ctrl یا ⌘ + C را فشار دهید",
|
||||
"csv": "فایل CSV",
|
||||
"pdf": "فایل PDF",
|
||||
"renameState": "تغییر نام",
|
||||
"updateState": "به روز رسانی",
|
||||
"excel": "فایل اکسل",
|
||||
"createState": "ایجاد وضعیت جدول",
|
||||
"removeAllStates": "حذف همه وضعیت ها",
|
||||
"removeState": "حذف",
|
||||
"savedStates": "وضعیت های ذخیره شده",
|
||||
"stateRestore": "بازگشت به وضعیت %d"
|
||||
},
|
||||
"searchBuilder": {
|
||||
"add": "افزودن شرط",
|
||||
"button": {
|
||||
"0": "جستجو ساز",
|
||||
"_": "جستجوساز (%d)"
|
||||
},
|
||||
"clearAll": "خالی کردن همه",
|
||||
"condition": "شرط",
|
||||
"conditions": {
|
||||
"date": {
|
||||
"after": "بعد از",
|
||||
"before": "بعد از",
|
||||
"between": "میان",
|
||||
"empty": "خالی",
|
||||
"not": "نباشد",
|
||||
"notBetween": "میان نباشد",
|
||||
"notEmpty": "خالی نباشد",
|
||||
"equals": "برابر باشد با"
|
||||
},
|
||||
"number": {
|
||||
"between": "میان",
|
||||
"empty": "خالی",
|
||||
"gt": "بزرگتر از",
|
||||
"gte": "برابر یا بزرگتر از",
|
||||
"lt": "کمتر از",
|
||||
"lte": "برابر یا کمتر از",
|
||||
"not": "نباشد",
|
||||
"notBetween": "میان نباشد",
|
||||
"notEmpty": "خالی نباشد",
|
||||
"equals": "برابر باشد با"
|
||||
},
|
||||
"string": {
|
||||
"contains": "حاوی",
|
||||
"empty": "خالی",
|
||||
"endsWith": "به پایان می رسد با",
|
||||
"not": "نباشد",
|
||||
"notEmpty": "خالی نباشد",
|
||||
"startsWith": "شروع شود با",
|
||||
"notContains": "نباشد حاوی",
|
||||
"notEndsWith": "پایان نیابد با",
|
||||
"notStartsWith": "شروع نشود با",
|
||||
"equals": "برابر باشد با"
|
||||
},
|
||||
"array": {
|
||||
"empty": "خالی",
|
||||
"contains": "حاوی",
|
||||
"not": "نباشد",
|
||||
"notEmpty": "خالی نباشد",
|
||||
"without": "بدون",
|
||||
"equals": "برابر باشد با"
|
||||
}
|
||||
},
|
||||
"data": "اطلاعات",
|
||||
"logicAnd": "و",
|
||||
"logicOr": "یا",
|
||||
"title": {
|
||||
"0": "جستجو ساز",
|
||||
"_": "جستجوساز (%d)"
|
||||
},
|
||||
"value": "مقدار",
|
||||
"deleteTitle": "حذف شرط فیلتر",
|
||||
"leftTitle": "شرط بیرونی",
|
||||
"rightTitle": "شرط فرورفتگی"
|
||||
},
|
||||
"select": {
|
||||
"cells": {
|
||||
"1": "1 سلول انتخاب شد",
|
||||
"_": "%d سلول انتخاب شد"
|
||||
},
|
||||
"columns": {
|
||||
"1": "یک ستون انتخاب شد",
|
||||
"_": "%d ستون انتخاب شد"
|
||||
},
|
||||
"rows": {
|
||||
"1": "1ردیف انتخاب شد",
|
||||
"_": "%d انتخاب شد"
|
||||
}
|
||||
},
|
||||
"thousands": ",",
|
||||
"searchPanes": {
|
||||
"clearMessage": "همه را پاک کن",
|
||||
"collapse": {
|
||||
"0": "صفحه جستجو",
|
||||
"_": "صفحه جستجو (٪ d)"
|
||||
},
|
||||
"count": "{total}",
|
||||
"countFiltered": "{shown} ({total})",
|
||||
"emptyPanes": "صفحه جستجو وجود ندارد",
|
||||
"loadMessage": "در حال بارگیری صفحات جستجو ...",
|
||||
"title": "فیلترهای فعال - %d",
|
||||
"showMessage": "نمایش همه",
|
||||
"collapseMessage": "بستن همه"
|
||||
},
|
||||
"loadingRecords": "در حال بارگذاری...",
|
||||
"datetime": {
|
||||
"previous": "قبلی",
|
||||
"next": "بعدی",
|
||||
"hours": "ساعت",
|
||||
"minutes": "دقیقه",
|
||||
"seconds": "ثانیه",
|
||||
"amPm": [
|
||||
"صبح",
|
||||
"عصر"
|
||||
],
|
||||
"months": {
|
||||
"0": "ژانویه",
|
||||
"1": "فوریه",
|
||||
"10": "نوامبر",
|
||||
"4": "می",
|
||||
"8": "سپتامبر",
|
||||
"11": "دسامبر",
|
||||
"3": "آوریل",
|
||||
"9": "اکتبر",
|
||||
"7": "اوت",
|
||||
"2": "مارس",
|
||||
"5": "ژوئن",
|
||||
"6": "ژوئیه"
|
||||
},
|
||||
"unknown": "-",
|
||||
"weekdays": [
|
||||
"یکشنبه",
|
||||
"دوشنبه",
|
||||
"سهشنبه",
|
||||
"چهارشنبه",
|
||||
"پنجشنبه",
|
||||
"جمعه",
|
||||
"شنبه"
|
||||
]
|
||||
},
|
||||
"editor": {
|
||||
"close": "بستن",
|
||||
"create": {
|
||||
"button": "جدید",
|
||||
"title": "ثبت جدید",
|
||||
"submit": "ایجــاد"
|
||||
},
|
||||
"edit": {
|
||||
"button": "ویرایش",
|
||||
"title": "ویرایش",
|
||||
"submit": "به روز رسانی"
|
||||
},
|
||||
"remove": {
|
||||
"button": "حذف",
|
||||
"title": "حذف",
|
||||
"submit": "حذف",
|
||||
"confirm": {
|
||||
"_": "آیا از حذف %d خط اطمینان دارید؟",
|
||||
"1": "آیا از حذف یک خط اطمینان دارید؟"
|
||||
}
|
||||
},
|
||||
"multi": {
|
||||
"restore": "واگرد",
|
||||
"noMulti": "این ورودی را می توان به صورت جداگانه ویرایش کرد، اما نه بخشی از یک گروه",
|
||||
"title": "مقادیر متعدد",
|
||||
"info": "مقادیر متعدد"
|
||||
},
|
||||
"error": {
|
||||
"system": "خطایی رخ داده (اطلاعات بیشتر)"
|
||||
}
|
||||
},
|
||||
"decimal": ".",
|
||||
"stateRestore": {
|
||||
"creationModal": {
|
||||
"button": "ایجاد",
|
||||
"columns": {
|
||||
"search": "جستجوی ستون",
|
||||
"visible": "وضعیت نمایش ستون"
|
||||
},
|
||||
"name": "نام:",
|
||||
"order": "مرتب سازی",
|
||||
"paging": "صفحه بندی",
|
||||
"search": "جستجو",
|
||||
"select": "انتخاب",
|
||||
"title": "ایجاد وضعیت جدید",
|
||||
"toggleLabel": "شامل:",
|
||||
"scroller": "موقعیت جدول (اسکرول)",
|
||||
"searchBuilder": "صفحه جستجو"
|
||||
},
|
||||
"emptyError": "نام نمیتواند خالی باشد.",
|
||||
"removeConfirm": "آیا از حذف %s مطمئنید؟",
|
||||
"removeJoiner": "و",
|
||||
"renameButton": "تغییر نام",
|
||||
"renameLabel": "نام جدید برای $s :",
|
||||
"duplicateError": "وضعیتی با این نام از پیش ذخیره شده.",
|
||||
"emptyStates": "هیچ وضعیتی ذخیره نشده",
|
||||
"removeError": "حذف با خطا موماجه شد",
|
||||
"removeSubmit": "حذف وضعیت",
|
||||
"removeTitle": "حذف وضعیت جدول",
|
||||
"renameTitle": "تغییر نام وضعیت"
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('change',
|
||||
'.tableFindBtn',
|
||||
function() {
|
||||
$(this).find(".save").prop("disabled", false);
|
||||
});
|
||||
});
|
||||
|
||||
function save(EmployeeId) {
|
||||
var command = {};
|
||||
command.WorkshopId = Number($("#workshopId").val());
|
||||
command.EmployeeId = Number(EmployeeId);
|
||||
command.ComputeOptions = $(`[data-ComputeOptions="${EmployeeId}"]`).val();
|
||||
command.BonusesOptions = $(`[data-BonusesOptions="${EmployeeId}"]`).val();
|
||||
command.YearsOptions = $(`[data-YearsOptions="${EmployeeId}"]`).val();
|
||||
|
||||
$.ajax({
|
||||
async: false,
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
url: '@Url.Page("./Index", "Create")',
|
||||
data: command,
|
||||
headers: { "RequestVerificationToken": $('@Html.AntiForgeryToken()').val() },
|
||||
success: function(response) {
|
||||
if (response.isSuccedded) {
|
||||
command = {};
|
||||
console.log();
|
||||
$(`[data-save="${EmployeeId}"]`).prop("disabled", true);
|
||||
$.Notification.autoHideNotify('success', 'top center', 'پیام سیستم ', response.message);
|
||||
|
||||
} else {
|
||||
command = {};
|
||||
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', response.message);
|
||||
|
||||
}
|
||||
},
|
||||
failure: function(response) {
|
||||
console.log(5, response);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
<script>
|
||||
var AntiForgeryToken = $('@Html.AntiForgeryToken()').val();
|
||||
var saveCreateUrl = `@Url.Page("./Index", "Create")`;
|
||||
</script>
|
||||
<script src="~/AssetsAdmin/page/ConnectedPersonnels/js/Index.js?ver=@adminVersion"></script>
|
||||
}
|
||||
@@ -1,170 +1,204 @@
|
||||
using _0_Framework.Application;
|
||||
using CompanyManagment.App.Contracts.EmployeeComputeOptions;
|
||||
using CompanyManagment.App.Contracts.RollCallEmployee;
|
||||
using CompanyManagment.App.Contracts.RollCallEmployeeStatus;
|
||||
using CompanyManagment.App.Contracts.Workshop;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
using System.Transactions;
|
||||
using CompanyManagment.App.Contracts.Employee;
|
||||
using CompanyManagment.App.Contracts.Contract;
|
||||
|
||||
namespace ServiceHost.Areas.Admin.Pages.Company.ConnectedPersonnels;
|
||||
|
||||
public class IndexModel : PageModel
|
||||
namespace ServiceHost.Areas.Admin.Pages.Company.ConnectedPersonnels
|
||||
{
|
||||
private readonly IAuthHelper _authHelper;
|
||||
private readonly IEmployeeComputeOptionsApplication _employeeComputeOptionsApplication;
|
||||
private readonly IWebHostEnvironment _webHostEnvironment;
|
||||
private readonly IWorkshopApplication _workshopApplication;
|
||||
public ConnectedPersonnelViewModel PersonnelList;
|
||||
public string WorkshopFullName;
|
||||
public long workshopId;
|
||||
public class IndexModel : PageModel
|
||||
{
|
||||
public ConnectedPersonnelViewModel PersonnelList;
|
||||
public string WorkshopFullName;
|
||||
private readonly IWorkshopApplication _workshopApplication;
|
||||
private readonly IEmployeeComputeOptionsApplication _employeeComputeOptionsApplication;
|
||||
private readonly IRollCallEmployeeApplication _rollCallEmployeeApplication;
|
||||
private readonly IRollCallEmployeeStatusApplication _rollCallEmployeeStatusApplication;
|
||||
private readonly IEmployeeApplication _employeeApplication;
|
||||
private readonly IAuthHelper _authHelper;
|
||||
public long workshopId;
|
||||
private readonly IWebHostEnvironment _webHostEnvironment;
|
||||
|
||||
public IndexModel(IAuthHelper authHelper, IWorkshopApplication workshopApplication,
|
||||
IEmployeeComputeOptionsApplication employeeComputeOptionsApplication, IWebHostEnvironment webHostEnvironment)
|
||||
{
|
||||
_authHelper = authHelper;
|
||||
_workshopApplication = workshopApplication;
|
||||
_employeeComputeOptionsApplication = employeeComputeOptionsApplication;
|
||||
_webHostEnvironment = webHostEnvironment;
|
||||
}
|
||||
public IndexModel(IAuthHelper authHelper, IWorkshopApplication workshopApplication, IEmployeeComputeOptionsApplication employeeComputeOptionsApplication, IWebHostEnvironment webHostEnvironment, IRollCallEmployeeApplication rollCallEmployeeApplication, IRollCallEmployeeStatusApplication rollCallEmployeeStatusApplication, IEmployeeApplication employeeApplication)
|
||||
{
|
||||
_authHelper = authHelper;
|
||||
_workshopApplication = workshopApplication;
|
||||
_employeeComputeOptionsApplication = employeeComputeOptionsApplication;
|
||||
_webHostEnvironment = webHostEnvironment;
|
||||
_rollCallEmployeeApplication = rollCallEmployeeApplication;
|
||||
_rollCallEmployeeStatusApplication = rollCallEmployeeStatusApplication;
|
||||
_employeeApplication = employeeApplication;
|
||||
}
|
||||
|
||||
public void OnGet(long workshopID)
|
||||
{
|
||||
var workshop = _workshopApplication.GetWorkshopInfo(workshopID);
|
||||
WorkshopFullName = workshop.WorkshopFullName;
|
||||
workshopId = workshopID;
|
||||
public void OnGet(long workshopID)
|
||||
{
|
||||
var workshop = _workshopApplication.GetWorkshopInfo(workshopID);
|
||||
WorkshopFullName = workshop.WorkshopFullName;
|
||||
workshopId = workshopID;
|
||||
|
||||
var result = _workshopApplication.GetConnectedPersonnels(workshopID).GroupBy(x => x.PersonName)
|
||||
.Select(x => x.First()).ToList();
|
||||
var result = _workshopApplication.GetConnectedPersonnels(workshopID).GroupBy(x => x.PersonName).Select(x => x.First()).ToList();
|
||||
|
||||
|
||||
var final = new List<ConnectedPersonnelViewModel>();
|
||||
foreach (var item in result)
|
||||
{
|
||||
var option = new EmployeeComputeOptionsViewModel();
|
||||
if (item.ContractPerson)
|
||||
option = _employeeComputeOptionsApplication.GetEmployeeOptions(workshopID, item.EmployeeId);
|
||||
var final = new List<ConnectedPersonnelViewModel>();
|
||||
foreach (var item in result)
|
||||
{
|
||||
var option = new EmployeeComputeOptionsViewModel();
|
||||
if (item.ContractPerson)
|
||||
{
|
||||
option = _employeeComputeOptionsApplication.GetEmployeeOptions(workshopID, item.EmployeeId);
|
||||
}
|
||||
|
||||
var finalResult = new ConnectedPersonnelViewModel
|
||||
{
|
||||
WorkshopId = item.WorkshopId,
|
||||
EmployeeId = item.EmployeeId,
|
||||
PersonName = item.PersonName,
|
||||
PersonelCode = item.PersonelCode,
|
||||
ContractPerson = item.ContractPerson,
|
||||
InsurancePerson = item.InsurancePerson,
|
||||
ContractLeft = item.ContractLeft,
|
||||
InsurancetLeft = item.InsurancetLeft,
|
||||
Black = item.Black,
|
||||
StartWork = item.StartWork,
|
||||
BonusesOptions = item.ContractPerson ? option.BonusesOptions : "null",
|
||||
ComputeOptions = item.ContractPerson ? option.ComputeOptions : "null",
|
||||
YearsOptions = item.ContractPerson ? option.YearsOptions : "null"
|
||||
};
|
||||
var finalResult = new ConnectedPersonnelViewModel()
|
||||
{
|
||||
WorkshopId = item.WorkshopId,
|
||||
EmployeeId = item.EmployeeId,
|
||||
PersonName = item.PersonName,
|
||||
PersonelCode = item.PersonelCode,
|
||||
ContractPerson = item.ContractPerson,
|
||||
InsurancePerson = item.InsurancePerson,
|
||||
ContractLeft = item.ContractLeft,
|
||||
InsurancetLeft = item.InsurancetLeft,
|
||||
Black = item.Black,
|
||||
StartWork = item.StartWork,
|
||||
BonusesOptions = item.ContractPerson ? option.BonusesOptions : "null",
|
||||
ComputeOptions = item.ContractPerson ? option.ComputeOptions : "null",
|
||||
YearsOptions = item.ContractPerson ? option.YearsOptions : "null",
|
||||
CreateContract = item.ContractPerson ? option.CreateContract :false,
|
||||
CreateCheckout = item.ContractPerson ? option.CreateCheckout : false,
|
||||
SignContract = item.ContractPerson ? option.SignContract : false,
|
||||
SignCheckout = item.ContractPerson ? option.SignCheckout : false
|
||||
};
|
||||
|
||||
final.Add(finalResult);
|
||||
}
|
||||
final.Add(finalResult);
|
||||
}
|
||||
|
||||
PersonnelList = new ConnectedPersonnelViewModel
|
||||
{
|
||||
ConnectedPersonnelViewModels = final.OrderBy(x => x.Black ? 1 : 0).ThenBy(x => x.PersonelCode).ToList()
|
||||
};
|
||||
}
|
||||
PersonnelList = new ConnectedPersonnelViewModel()
|
||||
{
|
||||
ConnectedPersonnelViewModels = final.OrderBy(x => x.Black ? 1 : 0).ThenBy(x => x.PersonelCode).ToList(),
|
||||
};
|
||||
}
|
||||
|
||||
public IActionResult OnGetCreate(CreateEmployeeComputeOptions command)
|
||||
{
|
||||
var result = _employeeComputeOptionsApplication.Create(command);
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccedded = result.IsSuccedded,
|
||||
message = result.Message
|
||||
});
|
||||
}
|
||||
public IActionResult OnPostCreate(CreateEmployeeComputeOptions command)
|
||||
{
|
||||
var result = _employeeComputeOptionsApplication.Create(command);
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccedded = result.IsSuccedded,
|
||||
message = result.Message
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnGetTakePicture(long employeeId, long workshopId)
|
||||
{
|
||||
var res = new TakePictureModel
|
||||
{
|
||||
EmployeeId = employeeId,
|
||||
WorkshopId = workshopId
|
||||
};
|
||||
public IActionResult OnGetTakePicture(long employeeId, long workshopId)
|
||||
{
|
||||
var res = new TakePictureModel()
|
||||
{
|
||||
EmployeeId = employeeId,
|
||||
WorkshopId = workshopId
|
||||
};
|
||||
|
||||
return Partial("TakePicture", res);
|
||||
}
|
||||
|
||||
public IActionResult OnPostTakePicture(string base64pic1, string base64pic2, long workshopId, long employeeId)
|
||||
{
|
||||
try
|
||||
{
|
||||
var directoryPath = $"{_webHostEnvironment.ContentRootPath}\\Faces\\{workshopId}\\{employeeId}";
|
||||
if (!Directory.Exists(directoryPath))
|
||||
Directory.CreateDirectory(directoryPath);
|
||||
|
||||
var filePath1 = Path.Combine(directoryPath) + $@"\1.jpg";
|
||||
CreateImageFromBase64(base64pic1, filePath1);
|
||||
var filePath2 = Path.Combine(directoryPath) + $@"\2.jpg";
|
||||
CreateImageFromBase64(base64pic2, filePath2);
|
||||
|
||||
var employee = _employeeApplication.GetDetailsForClient(employeeId, workshopId);
|
||||
var rollCallEmployee = _rollCallEmployeeApplication.GetByEmployeeIdAndWorkshopId(employeeId, workshopId);
|
||||
|
||||
var result = new OperationResult()
|
||||
{
|
||||
IsSuccedded = false,
|
||||
Message = "åäæÒ Úãá?ÇÊ? ÇäÌÇã äÔÏå ÇÓÊ"
|
||||
};
|
||||
var result2 = new OperationResult()
|
||||
{
|
||||
IsSuccedded = false,
|
||||
Message = "åäæÒ Úãá?ÇÊ? ÇäÌÇã äÔÏå ÇÓÊ"
|
||||
};
|
||||
using var transaction = new TransactionScope();
|
||||
|
||||
if (rollCallEmployee == null)
|
||||
{
|
||||
var createCommand = new CreateRollCallEmployee()
|
||||
{
|
||||
EmployeeId = employeeId,
|
||||
WorkshopId = workshopId,
|
||||
EmployeeFullName = employee.EmployeeFullName,
|
||||
HasUploadedImage = "true",
|
||||
};
|
||||
result = _rollCallEmployeeApplication.Create(createCommand);
|
||||
result2 = _rollCallEmployeeStatusApplication.Create(new CreateRollCallEmployeeStatus()
|
||||
{ RollCallEmployeeId = result.SendId });
|
||||
}
|
||||
else
|
||||
{
|
||||
result = _rollCallEmployeeApplication.UploadedImage(employeeId, workshopId);
|
||||
}
|
||||
|
||||
if (result.IsSuccedded && result2.IsSuccedded)
|
||||
{
|
||||
transaction.Complete();
|
||||
return new JsonResult(new
|
||||
{
|
||||
IsSuccedded = result.IsSuccedded,
|
||||
Message = result.Message,
|
||||
src = Tools.ResizeImage(Path.Combine(_webHostEnvironment.ContentRootPath, "Faces", workshopId.ToString(), employeeId.ToString(), "1.jpg"), 150, 150)
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
if (result.IsSuccedded == false)
|
||||
return new JsonResult(new
|
||||
{
|
||||
IsSuccedded = result.IsSuccedded,
|
||||
Message = result.Message,
|
||||
});
|
||||
else
|
||||
return new JsonResult(new
|
||||
{
|
||||
IsSuccedded = result2.IsSuccedded,
|
||||
Message = result2.Message
|
||||
});
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine(e);
|
||||
return new JsonResult(new
|
||||
{
|
||||
IsSuccedded = false,
|
||||
Message = e.Message,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
return Partial("TakePicture", res);
|
||||
}
|
||||
}
|
||||
|
||||
public IActionResult OnPostTakePicture(string base64pic1, string base64pic2, long workshopId, long employeeId)
|
||||
{
|
||||
try
|
||||
{
|
||||
var directoryPath = $"{_webHostEnvironment.WebRootPath}\\Faces\\{workshopId}\\{employeeId}";
|
||||
if (!Directory.Exists(directoryPath))
|
||||
Directory.CreateDirectory(directoryPath);
|
||||
|
||||
var filePath1 = Path.Combine(directoryPath) + @"\1.jpg";
|
||||
CreateImageFromBase64(base64pic1, filePath1);
|
||||
var filePath2 = Path.Combine(directoryPath) + @"\2.jpg";
|
||||
CreateImageFromBase64(base64pic2, filePath2);
|
||||
return new JsonResult(new
|
||||
{
|
||||
IsSuccedded = true
|
||||
});
|
||||
//var fileName = file.FileName;
|
||||
|
||||
//var fileExtention = Path.GetExtension(fileName);
|
||||
|
||||
//if (!string.IsNullOrWhiteSpace(filePath))
|
||||
//{
|
||||
// StoreInFolder(file, filePath);
|
||||
//}
|
||||
//var files = HttpContext.Request.Form.Files;
|
||||
//if (files != null)
|
||||
//{
|
||||
// foreach (var file in files)
|
||||
// {
|
||||
// if (file.Length > 0)
|
||||
// {
|
||||
// var fileName = file.FileName;
|
||||
// var uniqName = "1";
|
||||
// var fileExtention = Path.GetExtension(fileName);
|
||||
// var filePath = Path.Combine(_webHostEnvironment.WebRootPath, "Faces") + $@"\uniqName";
|
||||
// if (!string.IsNullOrWhiteSpace(filePath))
|
||||
// {
|
||||
// StoreInFolder(file, filePath);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// return new JsonResult(new
|
||||
// {
|
||||
// IsSuccedded = true,
|
||||
|
||||
// });
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// return new JsonResult(new
|
||||
// {
|
||||
// IsSuccedded = false,
|
||||
|
||||
// });
|
||||
//}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine(e);
|
||||
return new JsonResult(new
|
||||
{
|
||||
IsSuccedded = false
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public void CreateImageFromBase64(string base64, string imagePathWithExtension)
|
||||
{
|
||||
var subBase64 = base64.Substring(base64.LastIndexOf(',') + 1);
|
||||
//Convert the base64 to byte array
|
||||
var bytes = Convert.FromBase64String(subBase64);
|
||||
//Here you can save the byte array to the SQL database. You can use your own function
|
||||
//bool saved = DAL.SaveUserPhoto(bytes);
|
||||
//Create the physical image from the byte array
|
||||
System.IO.File.WriteAllBytes(imagePathWithExtension, bytes);
|
||||
}
|
||||
}
|
||||
public void CreateImageFromBase64(string base64, string imagePathWithExtension)
|
||||
{
|
||||
var subBase64 = base64.Substring(base64.LastIndexOf(',') + 1);
|
||||
//Convert the base64 to byte array
|
||||
byte[] bytes = Convert.FromBase64String(subBase64);
|
||||
//Here you can save the byte array to the SQL database. You can use your own function
|
||||
//bool saved = DAL.SaveUserPhoto(bytes);
|
||||
//Create the physical image from the byte array
|
||||
System.IO.File.WriteAllBytes(imagePathWithExtension, bytes);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -51,7 +51,8 @@ namespace ServiceHost.Areas.Admin.Pages.Company.Workshops
|
||||
SeniorInsuranceAccountList = accounts.Where(x => x.RoleId == 7).ToList(),
|
||||
JuniorInsuranceAccountsList = accounts.Where(x => x.RoleId == 8).ToList(),
|
||||
InsuranceJobViewModels = new SelectList(insuranceJob, "Id", "InsuranceJobTitle"),
|
||||
};
|
||||
CutContractEndOfYear = IsActive.None
|
||||
};
|
||||
|
||||
var res = _workshopApplication.GetWorkshop();
|
||||
var checkOk = res.Any();
|
||||
|
||||
@@ -1,457 +1,10 @@
|
||||
@page
|
||||
@using _0_Framework.Application
|
||||
@using Microsoft.AspNetCore.Mvc.TagHelpers
|
||||
@model ServiceHost.Areas.Admin.Pages.Company.Workshops.EditWorkshopModel
|
||||
@{
|
||||
<link href="~/admintheme/css/workshop-create.css" rel="stylesheet" />
|
||||
|
||||
<style>
|
||||
#titleHead {
|
||||
font-size: 20px;
|
||||
margin: 0 0 5px 0;
|
||||
}
|
||||
|
||||
input[type=checkbox], input[type=radio]
|
||||
{
|
||||
accent-color: #495d2b;
|
||||
}
|
||||
|
||||
#radio2, #radio3, #radio4 {
|
||||
position:relative;
|
||||
margin: 25px 0 0 0;
|
||||
display:flex;
|
||||
flex-direction:column;
|
||||
justify-content:center
|
||||
}
|
||||
#radio2 h4, #radio3 h4,#radio4 h4{
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
position: absolute;
|
||||
top: -24px;
|
||||
background-color: white;
|
||||
padding: 1px 3px;
|
||||
}
|
||||
#radio2 label, #radio3 label, #radio4 label{
|
||||
font-size: 12px;
|
||||
font-weight: 300;
|
||||
margin: 0 0 0px 0;
|
||||
}
|
||||
|
||||
.textFloat {
|
||||
position:relative;
|
||||
margin: 25px 0 0 0;
|
||||
}
|
||||
.textFloat h5{
|
||||
font-size: 13px;
|
||||
font-weight: 400;
|
||||
position: absolute;
|
||||
top: -10px;
|
||||
background-color: white;
|
||||
padding: 0;
|
||||
margin: 0 20px;
|
||||
}
|
||||
|
||||
.box {
|
||||
height: 500px !important;
|
||||
}
|
||||
|
||||
#form1 {
|
||||
right: 0px;
|
||||
}
|
||||
|
||||
#form2 {
|
||||
left: 0px;
|
||||
}
|
||||
|
||||
#form3 {
|
||||
right: 0px;
|
||||
}
|
||||
|
||||
#form4 {
|
||||
right: 0px;
|
||||
}
|
||||
|
||||
#progress {
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
.btn-default.btn-on-2.active {
|
||||
background-color: #00d554;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.btn-default.btn-off-2.active {
|
||||
background-color: #A7A7A7;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.classifidedField1 {
|
||||
margin: 7px;
|
||||
border-radius: 15px;
|
||||
border: 2px dotted #4b9082;
|
||||
margin-top: 14px;
|
||||
background-color: #88aba58a;
|
||||
height: 90px;
|
||||
}
|
||||
|
||||
.classifidedField1 input {
|
||||
background-color: #ecfcfc !important;
|
||||
}
|
||||
|
||||
.classifidedField1 label {
|
||||
color: #0a4c53;
|
||||
}
|
||||
|
||||
.classifidedField2 {
|
||||
margin: 7px;
|
||||
border: 1px solid #939393;
|
||||
border-radius: 15px;
|
||||
margin-top: 14px;
|
||||
height: 230px;
|
||||
}
|
||||
|
||||
.blured {
|
||||
filter: blur(2px);
|
||||
}
|
||||
|
||||
.cat {
|
||||
background: #8fceb8;
|
||||
padding: 7px 0px;
|
||||
color: aliceblue;
|
||||
width: 100.2%;
|
||||
border: 1px solid #939393;
|
||||
border-radius: 15px 15px 0px 0px;
|
||||
position: relative;
|
||||
right: -1px;
|
||||
left: -6px;
|
||||
top: -11px;
|
||||
}
|
||||
|
||||
.cat1 {
|
||||
padding: 7px 16px;
|
||||
border-left: 1px solid #939393;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.cat2 {
|
||||
padding: 7px 140px;
|
||||
border-left: 1px solid #939393;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.cat3 {
|
||||
padding: 7px 42px;
|
||||
border-left: 1px solid #939393;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.cat4 {
|
||||
padding: 7px 38px;
|
||||
border-left: 1px solid #939393;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.cat5 {
|
||||
padding: 7px 30px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.trContainer {
|
||||
display: inline-block;
|
||||
height: 190px;
|
||||
width: 100.4%;
|
||||
overflow-y: auto;
|
||||
position: relative;
|
||||
top: -8px;
|
||||
left: 0px;
|
||||
border-radius: 0px 0px 18px 18px;
|
||||
}
|
||||
|
||||
.groupTr {
|
||||
display: flex;
|
||||
position: relative;
|
||||
margin: 1px auto;
|
||||
top: -3px;
|
||||
padding: 5px 0px;
|
||||
/* min-height: 44px; */
|
||||
/* height: auto; */
|
||||
background-color: #b8dfdf;
|
||||
}
|
||||
|
||||
.groupTr input {
|
||||
background-color: #ecfcfc !important;
|
||||
}
|
||||
|
||||
.groupTr:nth-child(even) {
|
||||
background-color: #aad5cd !important;
|
||||
}
|
||||
|
||||
.groupTr:nth-child(even) select {
|
||||
background-color: #ecfcf8 !important;
|
||||
}
|
||||
|
||||
.groups {
|
||||
width: 9.5%;
|
||||
margin: 0px 5px;
|
||||
text-align: center;
|
||||
padding: 7px 9px;
|
||||
color: #3aa892;
|
||||
background: #cff3e75c;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.jobTitles {
|
||||
width: 366px;
|
||||
max-width: 366px;
|
||||
overflow-y: hidden;
|
||||
padding: 0px 3px;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.jobSalary {
|
||||
width: 16.33%;
|
||||
padding: 0px 3px;
|
||||
direction: ltr;
|
||||
}
|
||||
|
||||
.baseSalary {
|
||||
width: 17%;
|
||||
padding: 0px 3px;
|
||||
direction: ltr;
|
||||
}
|
||||
|
||||
.mabna {
|
||||
width: 14.4%;
|
||||
padding: 0px 3px;
|
||||
direction: ltr;
|
||||
}
|
||||
|
||||
.trContainer.hide-scrollbar::-webkit-scrollbar {
|
||||
width: 0px;
|
||||
}
|
||||
|
||||
.trContainer::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
}
|
||||
|
||||
.trContainer::-webkit-scrollbar-track {
|
||||
background-color: #3aa89200;
|
||||
}
|
||||
|
||||
.trContainer::-webkit-scrollbar-thumb {
|
||||
background-color: #3aa892;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.trContainer::-webkit-scrollbar-thumb:hover {
|
||||
background-color: #1bba9a;
|
||||
margin-right: 5px !important
|
||||
}
|
||||
|
||||
.ul-search {
|
||||
list-style: none;
|
||||
display: revert;
|
||||
width: 106%;
|
||||
right: 2.6rem;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.ul-search li:last-of-type {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.custom-select {
|
||||
position: relative;
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 5px 0px;
|
||||
border-radius: 5px;
|
||||
background-color: #fff;
|
||||
text-align: left;
|
||||
cursor: pointer;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.options {
|
||||
right: 0px !important;
|
||||
border: 1px solid #0000002e;
|
||||
border-top: 0;
|
||||
width: 100% !important;
|
||||
top: 13px;
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
max-height: 156px;
|
||||
overflow-y: scroll;
|
||||
border-bottom-left-radius: 8px;
|
||||
border-bottom-right-radius: 13px;
|
||||
}
|
||||
|
||||
.options::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
}
|
||||
|
||||
.options::-webkit-scrollbar-track {
|
||||
background-color: #8bd8ed42;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.options::-webkit-scrollbar-thumb {
|
||||
background-color: #3159adb8;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.options::-webkit-scrollbar-thumb:hover {
|
||||
background-color: #aaa;
|
||||
}
|
||||
|
||||
.options.visible {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.options li {
|
||||
padding: 12px 20px 27px 20px;
|
||||
box-shadow: 0 2px 2px 0 rgb(136 137 141), 0 -1px 3px 0 rgba(0, 0, 0, 0.12);
|
||||
border-top: none;
|
||||
background-color: #fff;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.options li:hover {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.input-text {
|
||||
padding-right: 5px;
|
||||
border: 0;
|
||||
direction: rtl;
|
||||
background: inherit;
|
||||
}
|
||||
|
||||
.input-text {
|
||||
width: 2.4rem;
|
||||
}
|
||||
|
||||
.items-selected {
|
||||
float: right;
|
||||
border: 1px solid #a7a6a6;
|
||||
background: #e5e5e5;
|
||||
margin: 2px;
|
||||
border-radius: 7px;
|
||||
padding-right: 0px;
|
||||
padding-left: 2px;
|
||||
font-size: 13px;
|
||||
color: #343434;
|
||||
position: relative;
|
||||
bottom: 3px;
|
||||
}
|
||||
|
||||
.del-selected {
|
||||
margin: 0px 4px;
|
||||
color: #e11414;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.select2-container .select2-search--inline {
|
||||
float: right !important;
|
||||
}
|
||||
|
||||
|
||||
.name-right {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
max-width: 23rem;
|
||||
overflow: hidden;
|
||||
white-space: nowrap !important;
|
||||
direction: rtl;
|
||||
}
|
||||
|
||||
.code-left {
|
||||
position: absolute;
|
||||
left: 10px;
|
||||
}
|
||||
|
||||
.job-item {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.groupTr .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
|
||||
color: #f06f3d !important;
|
||||
}
|
||||
|
||||
.groupTr .select2-container--default[dir=rtl] .select2-selection--multiple .select2-selection__choice {
|
||||
color: #458c73 !important;
|
||||
background-color: #d7f6e9 !important;
|
||||
border-color: #d7f6e9 !important;
|
||||
font-size: 13px !important;
|
||||
}
|
||||
|
||||
#form5 {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.disabled {
|
||||
filter: blur(1px);
|
||||
}
|
||||
</style>
|
||||
@*select2 css start*@
|
||||
<style>
|
||||
.opt {
|
||||
background-color: #f5f5f5;
|
||||
border-radius: 10px;
|
||||
text-align: right;
|
||||
padding: 2px 5px;
|
||||
text-overflow: ellipsis;
|
||||
overflow-x: hidden;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.opt:hover {
|
||||
background-color: #d3f3f5 !important;
|
||||
}
|
||||
|
||||
.selectDiv {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
border-radius: 10px;
|
||||
min-height: 20px;
|
||||
max-height: 190px;
|
||||
overflow: hidden scroll;
|
||||
width: 100%;
|
||||
background-color: rgb(255 255 255);
|
||||
display: block;
|
||||
box-shadow: 0px -1px 12px 0px rgba(0,0,0,.16), 2px 1px 10px 0 rgba(0,0,0,.12);
|
||||
}
|
||||
|
||||
.selectedOption {
|
||||
color: #04556a !important;
|
||||
background-color: #e0f8ff !important;
|
||||
}
|
||||
|
||||
.keyboardSelected {
|
||||
color: #04556a !important;
|
||||
background-color: #e0f8ff !important;
|
||||
}
|
||||
|
||||
.handle-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.handle-title a {
|
||||
background-color: #1e293b;
|
||||
color: #ffffff;
|
||||
border-radius: 7px;
|
||||
padding: 3px 5px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.handle-title a:hover {
|
||||
color: #ffffff !important;
|
||||
}
|
||||
</style>
|
||||
string adminVersion = _0_Framework.Application.Version.AdminVersion;
|
||||
<link href="~/admintheme/css/workshop-create.css?ver=@adminVersion" rel="stylesheet" />
|
||||
}
|
||||
|
||||
<div class="container">
|
||||
@@ -670,11 +223,11 @@
|
||||
<div class="col-md-4 col-sm-4 col-xs-12">
|
||||
<div class="form-group">
|
||||
@* <div class="neighborField">
|
||||
<input type="text" asp-for="ZoneName" class="neighborInput form-control">
|
||||
<a class="addNeighbor">
|
||||
<i class="fa fa-plus"></i>
|
||||
</a>
|
||||
</div> *@
|
||||
<input type="text" asp-for="ZoneName" class="neighborInput form-control">
|
||||
<a class="addNeighbor">
|
||||
<i class="fa fa-plus"></i>
|
||||
</a>
|
||||
</div> *@
|
||||
|
||||
<div class="neighborField">
|
||||
<input type="text" class="neighborInput form-control" disabled="disabled">
|
||||
@@ -766,12 +319,12 @@
|
||||
<div style="@(Model.HasPermissionContract ? "" : "display: none;")">
|
||||
<div class="col-lg-12 col-md-12 col-xs-12">
|
||||
@* <div class="" style="margin-top: 5px;">
|
||||
<label>تعیین سطح دسترسی برای قرارداد </label>
|
||||
<select class="form-control select-city" multiple asp-for="@Model.Command.AccountIdsList" asp-items='new SelectList(Model.Command.AccountsList, "Id", "Fullname")'>
|
||||
</select>
|
||||
<label>تعیین سطح دسترسی برای قرارداد </label>
|
||||
<select class="form-control select-city" multiple asp-for="@Model.Command.AccountIdsList" asp-items='new SelectList(Model.Command.AccountsList, "Id", "Fullname")'>
|
||||
</select>
|
||||
</div> *@
|
||||
<div class="" style="display: flex; align-items: center;">
|
||||
<input type="checkbox" asp-for="Command.WorkshopHolidayWorking" class="form-control" style="width: 15px;margin: 0 0 0 10px;"/>
|
||||
<input type="checkbox" asp-for="Command.WorkshopHolidayWorking" class="form-control" style="width: 15px;margin: 0 0 0 10px;" />
|
||||
<label asp-for="Command.WorkshopHolidayWorking" style="margin: 0;">این کارگاه در ایام تعطیلات رسمی باز است</label>
|
||||
</div>
|
||||
</div>
|
||||
@@ -828,32 +381,106 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-12" style="margin: 13px 0 0 0;">
|
||||
<div class="card area-workshop-3">
|
||||
<label class="circle-checkbox">
|
||||
<input type="checkbox" class="real-checkbox" data-role="createContract" asp-for="Command.CreateContract" />
|
||||
<span class="fake-checkbox">
|
||||
<svg class="icon check-icon" viewBox="0 0 24 24">
|
||||
<path d="M5 13l4 4L19 7" fill="none" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
||||
</svg>
|
||||
<svg class="icon cross-icon" viewBox="0 0 24 24">
|
||||
<path d="M6 6L18 18M6 18L18 6" fill="none" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
||||
</svg>
|
||||
</span>
|
||||
ایجاد قرارداد
|
||||
</label>
|
||||
|
||||
<label class="circle-checkbox">
|
||||
<input type="checkbox" class="real-checkbox" data-role="signContract" asp-for="Command.SignContract" />
|
||||
<span class="fake-checkbox">
|
||||
<svg class="icon check-icon" viewBox="0 0 24 24">
|
||||
<path d="M5 13l4 4L19 7" fill="none" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
||||
</svg>
|
||||
<svg class="icon cross-icon" viewBox="0 0 24 24">
|
||||
<path d="M6 6L18 18M6 18L18 6" fill="none" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
||||
</svg>
|
||||
</span>
|
||||
امضا قرارداد
|
||||
</label>
|
||||
|
||||
<label class="circle-checkbox">
|
||||
<input type="checkbox" class="real-checkbox" data-role="createCheckout" asp-for="Command.CreateCheckout" />
|
||||
<span class="fake-checkbox">
|
||||
<svg class="icon check-icon" viewBox="0 0 24 24">
|
||||
<path d="M5 13l4 4L19 7" fill="none" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
||||
</svg>
|
||||
<svg class="icon cross-icon" viewBox="0 0 24 24">
|
||||
<path d="M6 6L18 18M6 18L18 6" fill="none" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
||||
</svg>
|
||||
</span>
|
||||
ایجاد تصفیه حساب
|
||||
</label>
|
||||
|
||||
<label class="circle-checkbox">
|
||||
<input type="checkbox" class="real-checkbox" data-role="signCheckout" asp-for="Command.SignCheckout" />
|
||||
<span class="fake-checkbox">
|
||||
<svg class="icon check-icon" viewBox="0 0 24 24">
|
||||
<path d="M5 13l4 4L19 7" fill="none" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
||||
</svg>
|
||||
<svg class="icon cross-icon" viewBox="0 0 24 24">
|
||||
<path d="M6 6L18 18M6 18L18 6" fill="none" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
||||
</svg>
|
||||
</span>
|
||||
امضا تصفیه حساب
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-12 area-workshop-2">
|
||||
<div class="card textFloat">
|
||||
<h5 class="title-contract">لطفا مدت قرارداد خود را انتخاب کنید :</h5>
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12 col-xs-12 spanBox1">
|
||||
<div>
|
||||
<span class="btn btn-deactive waves-effect waves-light contractDuration">1 ماهه</span>
|
||||
<span class="btn btn-deactive waves-effect waves-light contractDuration" data-duration="1">1 ماهه</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="btn btn-deactive waves-effect waves-light contractDuration">2 ماهه</span>
|
||||
<span class="btn btn-deactive waves-effect waves-light contractDuration" data-duration="2">2 ماهه</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="btn btn-deactive waves-effect waves-light contractDuration">3 ماهه</span>
|
||||
<span class="btn btn-deactive waves-effect waves-light contractDuration" data-duration="3">3 ماهه</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="btn btn-deactive waves-effect waves-light contractDuration">6 ماهه</span>
|
||||
<span class="btn btn-deactive waves-effect waves-light contractDuration" data-duration="6">6 ماهه</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="btn btn-deactive waves-effect waves-light contractDuration">1 ساله</span>
|
||||
<span class="btn btn-deactive waves-effect waves-light contractDuration" data-duration="12">1 ساله</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="btn btn-deactive waves-effect waves-light contractDuration">دائمی</span>
|
||||
<span class="btn btn-deactive waves-effect waves-light contractDuration" data-duration="permanent">دائمی</span>
|
||||
</div>
|
||||
<input type="hidden" id="asp-contract-hidden" asp-for="Command.ContractTerm" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12 col-xs-12">
|
||||
<input type="hidden" id="CutContractEndOfYear" asp-for="Command.CutContractEndOfYear" />
|
||||
<div style="display: flex; align-items: center; gap: 14px;">
|
||||
آیا قراردادهای بالای یک ماه منتهی به پایان سال باشد یا نباشد؟
|
||||
<div style="display: flex; align-items: center; gap: 15px;">
|
||||
<label class="@(Model.Command.CutContractEndOfYear == IsActive.None ? "disable" : "")" style="display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; margin: 0;">
|
||||
<input type="checkbox" class="form-control single-check" style="margin: 0;" value="@IsActive.True" @(Model.Command.CutContractEndOfYear == IsActive.True ? "checked" : "")/>
|
||||
باشد
|
||||
</label>
|
||||
<label class="@(Model.Command.CutContractEndOfYear == IsActive.None ? "disable" : "")" style="display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; margin: 0;">
|
||||
<input type="checkbox" class="form-control single-check" style="margin: 0;" value="@IsActive.False" @(Model.Command.CutContractEndOfYear == IsActive.False ? "checked" : "")/>
|
||||
نباشد
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card textFloat">
|
||||
<h5>در صورت تمایل به محاسبه ی عناوین ذیل در فیش حقوقی، گزینه های موردنظر را فعال نمایید</h5>
|
||||
@@ -883,11 +510,11 @@
|
||||
<label class="input-label"><input type="checkbox" asp-for="Command.InsuranceCheckoutOvertime" class="checkboxes"> <span>اضافه کار فیش حقوقی در لیست بیمه محاسبه گردد</span></label>
|
||||
</div>
|
||||
<div>
|
||||
<label class="input-label"><input type="checkbox" asp-for="Command.InsuranceCheckoutFamilyAllowance" class="checkboxes"><span class="m-r-5">حق عائله مندی فیش حقوقی در لیست بیمه محاسبه گردد </span></label>
|
||||
<label class="input-label"><input type="checkbox" asp-for="Command.InsuranceCheckoutFamilyAllowance" class="checkboxes"><span class="m-r-5">حق عائله مندی فیش حقوقی در لیست بیمه محاسبه گردد </span></label>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="row card">
|
||||
<div class="col-md-6 col-xs-12">
|
||||
@@ -901,7 +528,7 @@
|
||||
<div>
|
||||
<label class="form-control-label"><input type="checkbox" value="Familylist" class="myCheckbox checkboxes sendList"> ارسال لیست بیمه کارگاه خانوادگی</label>
|
||||
</div>
|
||||
<input type="hidden" asp-for="Command.TypeOfInsuranceSend" id="asp-hidden"/>
|
||||
<input type="hidden" asp-for="Command.TypeOfInsuranceSend" id="asp-hidden" />
|
||||
</div>
|
||||
<div class="col-md-3 col-xs-12 disabled" id="myDiv4">
|
||||
<label class="input-label">کد کارگاهی بیمه</label>
|
||||
@@ -998,12 +625,12 @@
|
||||
<script>
|
||||
$("#hasRollCall").on("click", function () {
|
||||
if ($(this).is(":checked")) {
|
||||
$("#hasChekoutService").removeAttr("disabled");
|
||||
}else{
|
||||
$("#hasChekoutService").attr("disabled", "disabled");
|
||||
$("#hasChekoutService").removeAttr("disabled");
|
||||
} else {
|
||||
$("#hasChekoutService").attr("disabled", "disabled");
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1161,20 +788,20 @@
|
||||
</div>
|
||||
<div class="col-md-12 col-sm-12 col-xs-12">
|
||||
@* <div class="card">
|
||||
<div class="d-flex align-items-center text-white">
|
||||
<div class="header">گروه بندی</div>
|
||||
<div class="header">عناوین شغلی</div>
|
||||
<div class="header">مزد شغل</div>
|
||||
<div class="header">مزد سنوات</div>
|
||||
<div class="header">مزد مبنا</div>
|
||||
</div>
|
||||
<div class="d-flex align-items-center text-white">
|
||||
<div class="row-col">گروه بندی</div>
|
||||
<div class="row-col">عناوین شغلی</div>
|
||||
<div class="row-col">مزد شغل</div>
|
||||
<div class="row-col">مزد سنوات</div>
|
||||
<div class="row-col">مزد مبنا</div>
|
||||
</div>
|
||||
<div class="d-flex align-items-center text-white">
|
||||
<div class="header">گروه بندی</div>
|
||||
<div class="header">عناوین شغلی</div>
|
||||
<div class="header">مزد شغل</div>
|
||||
<div class="header">مزد سنوات</div>
|
||||
<div class="header">مزد مبنا</div>
|
||||
</div>
|
||||
<div class="d-flex align-items-center text-white">
|
||||
<div class="row-col">گروه بندی</div>
|
||||
<div class="row-col">عناوین شغلی</div>
|
||||
<div class="row-col">مزد شغل</div>
|
||||
<div class="row-col">مزد سنوات</div>
|
||||
<div class="row-col">مزد مبنا</div>
|
||||
</div>
|
||||
</div> *@
|
||||
</div>
|
||||
|
||||
@@ -1226,4 +853,4 @@
|
||||
var employerIdList = Number(@Model.Command.EmployerIdList[0]);
|
||||
</script>
|
||||
|
||||
<script src="~/AssetsAdmin/page/Workshop/js/EditWorkshopAdmin.js"></script>
|
||||
<script src="~/AssetsAdmin/page/Workshop/js/EditWorkshopAdmin.js?ver=@adminVersion"></script>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,163 @@
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
td, th {
|
||||
border-bottom: 1px solid #cfe5e0;
|
||||
font-size: 1rem;
|
||||
text-align: right;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
th {
|
||||
padding: 1.5rem 1rem;
|
||||
}
|
||||
|
||||
td {
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
tbody tr {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
tbody tr.selected td {
|
||||
background: #e0eeeb;
|
||||
}
|
||||
|
||||
tbody tr:hover:not(.selected) td,
|
||||
tbody tr.hover:not(.selected) td {
|
||||
background: #f0f7f5;
|
||||
}
|
||||
|
||||
.table-footer, .table-header {
|
||||
font-size: .875rem;
|
||||
}
|
||||
|
||||
.table-footer {
|
||||
margin: -1.5rem 0 0;
|
||||
}
|
||||
|
||||
.table-header {
|
||||
margin: 0 0 1rem;
|
||||
}
|
||||
|
||||
.table-footer.grid,
|
||||
.table-header.grid {
|
||||
align-items: center;
|
||||
display: grid;
|
||||
grid-auto-flow: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.border-index {
|
||||
background: #dbeafe;
|
||||
height: 30px;
|
||||
width: 30px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 6px;
|
||||
color: #3f3f46;
|
||||
}
|
||||
|
||||
.black {
|
||||
background: #00000070
|
||||
}
|
||||
|
||||
button:disabled,
|
||||
button[disabled] {
|
||||
border: 1px solid #999999 !important;
|
||||
background-color: #cccccc !important;
|
||||
color: #666666 !important;
|
||||
}
|
||||
|
||||
.top-information,
|
||||
.bottom-information {
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
table.dataTable.dtr-inline.collapsed > tbody > tr[role="row"] > td:first-child:before,
|
||||
table.dataTable.dtr-inline.collapsed > tbody > tr[role="row"] > th:first-child:before {
|
||||
background-color: #29cc97;
|
||||
top: 14px;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
line-height: 16px;
|
||||
border: 0;
|
||||
font-weight: bold;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
table.dataTable.dtr-inline.collapsed > tbody > tr.parent > td:first-child:before, table.dataTable.dtr-inline.collapsed > tbody > tr.parent > th:first-child:before {
|
||||
background-color: #fec400;
|
||||
}
|
||||
|
||||
.dataTables_wrapper {
|
||||
direction: rtl;
|
||||
}
|
||||
|
||||
.dataTables_length {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.dataTables_filter {
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#DataTables_Table_0_last {
|
||||
-moz-border-radius-bottomright: 0px;
|
||||
-webkit-border-bottom-right-radius: 0px;
|
||||
-khtml-border-bottom-right-radius: 0px;
|
||||
border-bottom-right-radius: 0px;
|
||||
-moz-border-radius-topright: 0px;
|
||||
-webkit-border-top-right-radius: 0px;
|
||||
-khtml-border-top-right-radius: 0px;
|
||||
border-top-right-radius: 0px;
|
||||
-moz-border-radius-bottomleft: 6px;
|
||||
-webkit-border-bottom-left-radius: 6px;
|
||||
-khtml-border-bottom-left-radius: 6px;
|
||||
border-bottom-left-radius: 6px;
|
||||
-moz-border-radius-topleft: 6px;
|
||||
-webkit-border-top-left-radius: 6px;
|
||||
-khtml-border-top-left-radius: 6px;
|
||||
border-top-left-radius: 6px;
|
||||
}
|
||||
|
||||
#DataTables_Table_0_first {
|
||||
-moz-border-radius-bottomright: 6px;
|
||||
-webkit-border-bottom-right-radius: 6px;
|
||||
-khtml-border-bottom-right-radius: 6px;
|
||||
border-bottom-right-radius: 6px;
|
||||
-moz-border-radius-topright: 6px;
|
||||
-webkit-border-top-right-radius: 6px;
|
||||
-khtml-border-top-right-radius: 6px;
|
||||
border-top-right-radius: 6px;
|
||||
-moz-border-radius-bottomleft: 0px;
|
||||
-webkit-border-bottom-left-radius: 0px;
|
||||
-khtml-border-bottom-left-radius: 0px;
|
||||
border-bottom-left-radius: 0px;
|
||||
-moz-border-radius-topleft: 0px;
|
||||
-webkit-border-top-left-radius: 0px;
|
||||
-khtml-border-top-left-radius: 0px;
|
||||
border-top-left-radius: 0px;
|
||||
}
|
||||
|
||||
.dataTables_info {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.dataTables_paginate {
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
div.dataTables_wrapper div.dataTables_paginate ul.pagination {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
table.dataTable > tbody > tr.child ul.dtr-details {
|
||||
width: 100%;
|
||||
}
|
||||
@@ -0,0 +1,412 @@
|
||||
|
||||
class CheckboxNode {
|
||||
constructor(id) {
|
||||
this.id = id;
|
||||
this.checkbox = document.getElementById(id);
|
||||
this.children = [];
|
||||
this.parents = [];
|
||||
|
||||
if (this.checkbox) {
|
||||
this.checkbox.addEventListener("change", () => this.handleChange());
|
||||
}
|
||||
}
|
||||
|
||||
addChild(childNode) {
|
||||
this.children.push(childNode);
|
||||
childNode.parents.push(this);
|
||||
}
|
||||
|
||||
setChecked(value) {
|
||||
this.checkbox.checked = value;
|
||||
}
|
||||
|
||||
isChecked() {
|
||||
return this.checkbox.checked;
|
||||
}
|
||||
|
||||
hasActiveParents() {
|
||||
return this.parents.some(p => p.isChecked());
|
||||
}
|
||||
|
||||
handleChange() {
|
||||
if (this.isChecked()) {
|
||||
// اگه تیک زد (یعنی نمیخوای انجامش بدی) → بقیه هم باید انجام نشن
|
||||
this.children.forEach(child => {
|
||||
if (!child.isChecked()) {
|
||||
child.setChecked(true);
|
||||
child.handleChange();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// اگه تیک رو برداشتی (یعنی میخوای انجامش بدی) → فقط اگه والد هنوز تیک داره، نمیتونی
|
||||
this.parents.forEach(parent => {
|
||||
if (parent.isChecked()) {
|
||||
parent.setChecked(false);
|
||||
parent.handleChange();
|
||||
}
|
||||
});
|
||||
|
||||
// حالا بچهها باید بررسی کنن که دیگه هیچ والد فعالی ندارن
|
||||
this.children.forEach(child => {
|
||||
if (!child.hasActiveParents() && child.isChecked()) {
|
||||
child.setChecked(false);
|
||||
child.handleChange();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
$(document).ready(function () {
|
||||
$('#responsive-data-table').DataTable({
|
||||
"alengthMenu": [["All", 10, 50, 100, -1], ["All", 10, 50, 100, "All"]],
|
||||
"order": [[0, 'asc']],
|
||||
"dom": '<"row justify-content-between top-information"lf>rt<"row justify-content-between bottom-information"ip><"clear">',
|
||||
"language": {
|
||||
"emptyTable": "هیچ دادهای در جدول وجود ندارد",
|
||||
"info": "نمایش _START_ تا _END_ از _TOTAL_ ردیف",
|
||||
"infoEmpty": "نمایش 0 تا 0 از 0 ردیف",
|
||||
"infoFiltered": "(فیلتر شده از _MAX_ ردیف)",
|
||||
"infoThousands": ",",
|
||||
"lengthMenu": "نمایش _MENU_ ردیف",
|
||||
"processing": "در حال پردازش...",
|
||||
"search": "جستجو:",
|
||||
"zeroRecords": "رکوردی با این مشخصات پیدا نشد",
|
||||
"paginate": {
|
||||
"next": "بعدی",
|
||||
"previous": "قبلی",
|
||||
"first": "ابتدا",
|
||||
"last": "انتها"
|
||||
},
|
||||
"aria": {
|
||||
"sortAscending": ": فعال سازی نمایش به صورت صعودی",
|
||||
"sortDescending": ": فعال سازی نمایش به صورت نزولی"
|
||||
},
|
||||
"autoFill": {
|
||||
"cancel": "انصراف",
|
||||
"fill": "پر کردن همه سلول ها با ساختار سیستم",
|
||||
"fillHorizontal": "پر کردن سلول به صورت افقی",
|
||||
"fillVertical": "پرکردن سلول به صورت عمودی"
|
||||
},
|
||||
"buttons": {
|
||||
"collection": "مجموعه",
|
||||
"colvis": "قابلیت نمایش ستون",
|
||||
"colvisRestore": "بازنشانی قابلیت نمایش",
|
||||
"copy": "کپی",
|
||||
"copySuccess": {
|
||||
"1": "یک ردیف داخل حافظه کپی شد",
|
||||
"_": "%ds ردیف داخل حافظه کپی شد"
|
||||
},
|
||||
"copyTitle": "کپی در حافظه",
|
||||
"pageLength": {
|
||||
"-1": "نمایش همه ردیفها",
|
||||
"_": "نمایش %d ردیف",
|
||||
"1": "نمایش 1 ردیف"
|
||||
},
|
||||
"print": "چاپ",
|
||||
"copyKeys": "برای کپی داده جدول در حافظه سیستم کلید های ctrl یا ⌘ + C را فشار دهید",
|
||||
"csv": "فایل CSV",
|
||||
"pdf": "فایل PDF",
|
||||
"renameState": "تغییر نام",
|
||||
"updateState": "به روز رسانی",
|
||||
"excel": "فایل اکسل",
|
||||
"createState": "ایجاد وضعیت جدول",
|
||||
"removeAllStates": "حذف همه وضعیت ها",
|
||||
"removeState": "حذف",
|
||||
"savedStates": "وضعیت های ذخیره شده",
|
||||
"stateRestore": "بازگشت به وضعیت %d"
|
||||
},
|
||||
"searchBuilder": {
|
||||
"add": "افزودن شرط",
|
||||
"button": {
|
||||
"0": "جستجو ساز",
|
||||
"_": "جستجوساز (%d)"
|
||||
},
|
||||
"clearAll": "خالی کردن همه",
|
||||
"condition": "شرط",
|
||||
"conditions": {
|
||||
"date": {
|
||||
"after": "بعد از",
|
||||
"before": "بعد از",
|
||||
"between": "میان",
|
||||
"empty": "خالی",
|
||||
"not": "نباشد",
|
||||
"notBetween": "میان نباشد",
|
||||
"notEmpty": "خالی نباشد",
|
||||
"equals": "برابر باشد با"
|
||||
},
|
||||
"number": {
|
||||
"between": "میان",
|
||||
"empty": "خالی",
|
||||
"gt": "بزرگتر از",
|
||||
"gte": "برابر یا بزرگتر از",
|
||||
"lt": "کمتر از",
|
||||
"lte": "برابر یا کمتر از",
|
||||
"not": "نباشد",
|
||||
"notBetween": "میان نباشد",
|
||||
"notEmpty": "خالی نباشد",
|
||||
"equals": "برابر باشد با"
|
||||
},
|
||||
"string": {
|
||||
"contains": "حاوی",
|
||||
"empty": "خالی",
|
||||
"endsWith": "به پایان می رسد با",
|
||||
"not": "نباشد",
|
||||
"notEmpty": "خالی نباشد",
|
||||
"startsWith": "شروع شود با",
|
||||
"notContains": "نباشد حاوی",
|
||||
"notEndsWith": "پایان نیابد با",
|
||||
"notStartsWith": "شروع نشود با",
|
||||
"equals": "برابر باشد با"
|
||||
},
|
||||
"array": {
|
||||
"empty": "خالی",
|
||||
"contains": "حاوی",
|
||||
"not": "نباشد",
|
||||
"notEmpty": "خالی نباشد",
|
||||
"without": "بدون",
|
||||
"equals": "برابر باشد با"
|
||||
}
|
||||
},
|
||||
"data": "اطلاعات",
|
||||
"logicAnd": "و",
|
||||
"logicOr": "یا",
|
||||
"title": {
|
||||
"0": "جستجو ساز",
|
||||
"_": "جستجوساز (%d)"
|
||||
},
|
||||
"value": "مقدار",
|
||||
"deleteTitle": "حذف شرط فیلتر",
|
||||
"leftTitle": "شرط بیرونی",
|
||||
"rightTitle": "شرط فرورفتگی"
|
||||
},
|
||||
"select": {
|
||||
"cells": {
|
||||
"1": "1 سلول انتخاب شد",
|
||||
"_": "%d سلول انتخاب شد"
|
||||
},
|
||||
"columns": {
|
||||
"1": "یک ستون انتخاب شد",
|
||||
"_": "%d ستون انتخاب شد"
|
||||
},
|
||||
"rows": {
|
||||
"1": "1ردیف انتخاب شد",
|
||||
"_": "%d انتخاب شد"
|
||||
}
|
||||
},
|
||||
"thousands": ",",
|
||||
"searchPanes": {
|
||||
"clearMessage": "همه را پاک کن",
|
||||
"collapse": {
|
||||
"0": "صفحه جستجو",
|
||||
"_": "صفحه جستجو (٪ d)"
|
||||
},
|
||||
"count": "{total}",
|
||||
"countFiltered": "{shown} ({total})",
|
||||
"emptyPanes": "صفحه جستجو وجود ندارد",
|
||||
"loadMessage": "در حال بارگیری صفحات جستجو ...",
|
||||
"title": "فیلترهای فعال - %d",
|
||||
"showMessage": "نمایش همه",
|
||||
"collapseMessage": "بستن همه"
|
||||
},
|
||||
"loadingRecords": "در حال بارگذاری...",
|
||||
"datetime": {
|
||||
"previous": "قبلی",
|
||||
"next": "بعدی",
|
||||
"hours": "ساعت",
|
||||
"minutes": "دقیقه",
|
||||
"seconds": "ثانیه",
|
||||
"amPm": [
|
||||
"صبح",
|
||||
"عصر"
|
||||
],
|
||||
"months": {
|
||||
"0": "ژانویه",
|
||||
"1": "فوریه",
|
||||
"10": "نوامبر",
|
||||
"4": "می",
|
||||
"8": "سپتامبر",
|
||||
"11": "دسامبر",
|
||||
"3": "آوریل",
|
||||
"9": "اکتبر",
|
||||
"7": "اوت",
|
||||
"2": "مارس",
|
||||
"5": "ژوئن",
|
||||
"6": "ژوئیه"
|
||||
},
|
||||
"unknown": "-",
|
||||
"weekdays": [
|
||||
"یکشنبه",
|
||||
"دوشنبه",
|
||||
"سهشنبه",
|
||||
"چهارشنبه",
|
||||
"پنجشنبه",
|
||||
"جمعه",
|
||||
"شنبه"
|
||||
]
|
||||
},
|
||||
"editor": {
|
||||
"close": "بستن",
|
||||
"create": {
|
||||
"button": "جدید",
|
||||
"title": "ثبت جدید",
|
||||
"submit": "ایجــاد"
|
||||
},
|
||||
"edit": {
|
||||
"button": "ویرایش",
|
||||
"title": "ویرایش",
|
||||
"submit": "به روز رسانی"
|
||||
},
|
||||
"remove": {
|
||||
"button": "حذف",
|
||||
"title": "حذف",
|
||||
"submit": "حذف",
|
||||
"confirm": {
|
||||
"_": "آیا از حذف %d خط اطمینان دارید؟",
|
||||
"1": "آیا از حذف یک خط اطمینان دارید؟"
|
||||
}
|
||||
},
|
||||
"multi": {
|
||||
"restore": "واگرد",
|
||||
"noMulti": "این ورودی را می توان به صورت جداگانه ویرایش کرد، اما نه بخشی از یک گروه",
|
||||
"title": "مقادیر متعدد",
|
||||
"info": "مقادیر متعدد"
|
||||
},
|
||||
"error": {
|
||||
"system": "خطایی رخ داده (اطلاعات بیشتر)"
|
||||
}
|
||||
},
|
||||
"decimal": ".",
|
||||
"stateRestore": {
|
||||
"creationModal": {
|
||||
"button": "ایجاد",
|
||||
"columns": {
|
||||
"search": "جستجوی ستون",
|
||||
"visible": "وضعیت نمایش ستون"
|
||||
},
|
||||
"name": "نام:",
|
||||
"order": "مرتب سازی",
|
||||
"paging": "صفحه بندی",
|
||||
"search": "جستجو",
|
||||
"select": "انتخاب",
|
||||
"title": "ایجاد وضعیت جدید",
|
||||
"toggleLabel": "شامل:",
|
||||
"scroller": "موقعیت جدول (اسکرول)",
|
||||
"searchBuilder": "صفحه جستجو"
|
||||
},
|
||||
"emptyError": "نام نمیتواند خالی باشد.",
|
||||
"removeConfirm": "آیا از حذف %s مطمئنید؟",
|
||||
"removeJoiner": "و",
|
||||
"renameButton": "تغییر نام",
|
||||
"renameLabel": "نام جدید برای $s :",
|
||||
"duplicateError": "وضعیتی با این نام از پیش ذخیره شده.",
|
||||
"emptyStates": "هیچ وضعیتی ذخیره نشده",
|
||||
"removeError": "حذف با خطا موماجه شد",
|
||||
"removeSubmit": "حذف وضعیت",
|
||||
"removeTitle": "حذف وضعیت جدول",
|
||||
"renameTitle": "تغییر نام وضعیت"
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('change', '.tableFindBtn', function () {
|
||||
$(this).find(".save").prop("disabled", false);
|
||||
});
|
||||
|
||||
//function handleCheckboxLogic1(employeeId) {
|
||||
// const $createContract = $(`#FailureCreateContract_${employeeId}`);
|
||||
// const $signContract = $(`#FailureSignContract_${employeeId}`);
|
||||
// const $createCheckout = $(`#FailureCreateCheckout_${employeeId}`);
|
||||
// const $signCheckout = $(`#FailureSignCheckout_${employeeId}`);
|
||||
|
||||
// const isFailureCreateContract = $createContract.is(':checked');
|
||||
// const isFailureCreateCheckout = $createCheckout.is(':checked');
|
||||
|
||||
// if (isFailureCreateContract) {
|
||||
// $signContract.prop('checked', true);
|
||||
// $createCheckout.prop('checked', true);
|
||||
// $signCheckout.prop('checked', true);
|
||||
// } else {
|
||||
// //$createCheckout.prop('checked', false);
|
||||
// if (isFailureCreateCheckout) {
|
||||
// $signCheckout.prop('checked', true);
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
//$('[id^="FailureCreateContract_"], [id^="FailureSignContract_"], [id^="FailureCreateCheckout_"], [id^="FailureSignCheckout_"]').on('change', function () {
|
||||
// const employeeId = this.id.split('_')[1];
|
||||
// handleCheckboxLogic1(employeeId);
|
||||
//});
|
||||
//$('[id^="FailureCreateContract_"]').each(function () {
|
||||
// const employeeId = this.id.split('_')[1];
|
||||
// handleCheckboxLogic1(employeeId);
|
||||
//});
|
||||
|
||||
$('[id^="FailureCreateContract_"]').each(function () {
|
||||
const employeeId = this.id.split('_')[1];
|
||||
|
||||
const $notCreateContract = document.getElementById(`FailureCreateContract_${employeeId}`);
|
||||
const $notSignContract = document.getElementById(`FailureSignContract_${employeeId}`);
|
||||
const $notCreateCheckout = document.getElementById(`FailureCreateCheckout_${employeeId}`);
|
||||
const $notSignCheckout = document.getElementById(`FailureSignCheckout_${employeeId}`);
|
||||
|
||||
$notCreateContract.addEventListener("change", () => handler());
|
||||
$notSignContract.addEventListener("change", () => handler());
|
||||
$notCreateCheckout.addEventListener("change", () => handler());
|
||||
$notSignCheckout.addEventListener("change", () => handler());
|
||||
//// تعریف روابط
|
||||
//$createContract.addChild($signContract);
|
||||
//$createContract.addChild($createCheckout);
|
||||
//$createCheckout.addChild($signCheckout);
|
||||
function handler() {
|
||||
if ($notCreateContract.checked) {
|
||||
$notSignContract.checked = true;
|
||||
$notCreateCheckout.checked = true;
|
||||
}
|
||||
|
||||
if ($notCreateCheckout.checked) {
|
||||
$notSignCheckout.checked = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function save(EmployeeId) {
|
||||
var command = {};
|
||||
command.WorkshopId = Number($("#workshopId").val());
|
||||
command.EmployeeId = Number(EmployeeId);
|
||||
command.ComputeOptions = $('[data-ComputeOptions="' + EmployeeId + '"]').val();
|
||||
command.BonusesOptions = $('[data-BonusesOptions="' + EmployeeId + '"]').val();
|
||||
command.YearsOptions = $('[data-YearsOptions="' + EmployeeId + '"]').val();
|
||||
|
||||
command.CreateContract = !$(`#FailureCreateContract_${EmployeeId}`).prop("checked");
|
||||
command.SignContract = !$(`#FailureSignContract_${EmployeeId}`).prop("checked");
|
||||
command.CreateCheckout = !$(`#FailureCreateCheckout_${EmployeeId}`).prop("checked");
|
||||
command.SignCheckout = !$(`#FailureSignCheckout_${EmployeeId}`).prop("checked");
|
||||
|
||||
$.ajax({
|
||||
async: false,
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
url: saveCreateUrl,
|
||||
data: command,
|
||||
headers: { "RequestVerificationToken": AntiForgeryToken },
|
||||
success: function (response) {
|
||||
if (response.isSuccedded) {
|
||||
command = {};
|
||||
console.log()
|
||||
$('[data-save="' + EmployeeId + '"]').prop("disabled", true);
|
||||
$.Notification.autoHideNotify('success', 'top center', 'پیام سیستم ', response.message);
|
||||
|
||||
} else {
|
||||
command = {};
|
||||
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', response.message);
|
||||
|
||||
}
|
||||
},
|
||||
failure: function (response) {
|
||||
console.log(5, response);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
if ($(window).width() < 992) {
|
||||
|
||||
Webcam.set({
|
||||
width: 1800,
|
||||
height: 1800,
|
||||
|
||||
// final cropped size
|
||||
// crop_width: 296,
|
||||
// crop_height: 396,
|
||||
image_format: 'jpeg',
|
||||
jpeg_quality: 90
|
||||
|
||||
});
|
||||
Webcam.attach('#my_camera');
|
||||
Webcam.attach('#video');
|
||||
var demo = $('#video');
|
||||
let demoVideo = $('#video').find('video[playsinline="playsinline"]');
|
||||
demo.css({
|
||||
width: "300px",
|
||||
height: "300px",
|
||||
});
|
||||
demoVideo.css({
|
||||
width: "300px",
|
||||
height: "300px",
|
||||
});
|
||||
} else {
|
||||
|
||||
Webcam.set({
|
||||
width: 600,
|
||||
height: 600,
|
||||
image_format: 'jpeg',
|
||||
jpeg_quality: 100
|
||||
|
||||
});
|
||||
Webcam.attach('#my_camera');
|
||||
Webcam.attach('#video');
|
||||
var demo = $('#video');
|
||||
let demoVideo = $('#video').find('video[playsinline="playsinline"]');
|
||||
demo.css({
|
||||
width: "300px",
|
||||
height: "400px",
|
||||
});
|
||||
demoVideo.css({
|
||||
width: "300px",
|
||||
height: "400px",
|
||||
});
|
||||
}
|
||||
|
||||
function take_snapshot1() {
|
||||
Webcam.snap(function (data_uri) {
|
||||
document.getElementById('result1').innerHTML = '<img style="display:none;" id="pic1" data-uri="' + data_uri + '" src="' + data_uri + '"/>';
|
||||
document.getElementById('demoResult1').innerHTML = '<img style="width: 300px; height: 300px;" data-uri="' + data_uri + '" src="' + data_uri + '"/>';
|
||||
|
||||
});
|
||||
}
|
||||
function take_snapshot2() {
|
||||
Webcam.snap(function (data_uri) {
|
||||
document.getElementById('result2').innerHTML = '<img style="display:none;" id="pic2" data-uri="' + data_uri + '" src="' + data_uri + '"/>';
|
||||
document.getElementById('demoResult2').innerHTML = '<img style="width: 300px; height: 300px;" data-uri="' + data_uri + '" src="' + data_uri + '"/>';
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function set() {
|
||||
|
||||
|
||||
let pic1 = $("#pic1").attr('src');
|
||||
let pic2 = $("#pic2").attr('src');
|
||||
let workshopId = Number($('#workshopId').val());
|
||||
let employeeId = Number($('#employeeId').val());
|
||||
if (pic1 != null && pic2 != null) {
|
||||
$.ajax({
|
||||
// async: false,
|
||||
// contentType: 'application/json',
|
||||
// dataType: 'data',
|
||||
type: 'POST',
|
||||
url: '@Url.Page("./Index", "TakePicture")',
|
||||
data: { "base64pic1": pic1, "base64pic2": pic2, "workshopId": workshopId, "employeeId": employeeId },
|
||||
headers: { "RequestVerificationToken": $('input[name="__RequestVerificationToken"]').val() },
|
||||
success: function (response) {
|
||||
if (response.isSuccedded) {
|
||||
|
||||
$.Notification.autoHideNotify('success', 'top center', 'پیام سیستم ', "ok");
|
||||
|
||||
} else {
|
||||
|
||||
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', "not");
|
||||
|
||||
}
|
||||
},
|
||||
failure: function (response) {
|
||||
console.log(5, response);
|
||||
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', "گرفتن دو عکس الزامیست");
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1635,3 +1635,56 @@ function checkEnValid(fixDate1) {
|
||||
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
$('.real-checkbox').on('change', function () {
|
||||
const $CreateContract = $('[data-role="createContract"]');
|
||||
const $SignContract = $('[data-role="signContract"]');
|
||||
const $CreateCheckout = $('[data-role="createCheckout"]');
|
||||
const $SignCheckout = $('[data-role="signCheckout"]');
|
||||
|
||||
if (!$CreateContract.is(':checked')) {
|
||||
$SignContract.prop('checked', false);
|
||||
$CreateCheckout.prop('checked', false);
|
||||
}
|
||||
|
||||
if (!$CreateCheckout.is(':checked')) {
|
||||
$SignCheckout.prop('checked', false);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$(".single-check").click(function () {
|
||||
if ($(this).is(":checked")) {
|
||||
$(".single-check").not(this).prop("checked", false);
|
||||
$('#CutContractEndOfYear').val($(this).val());
|
||||
} else {
|
||||
$('#CutContractEndOfYear').val('None');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('change', '.checkbox-colored', function () {
|
||||
if ($(this).is(':checked')) {
|
||||
$(this).addClass('checked');
|
||||
} else {
|
||||
$(this).removeClass('checked');
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '.contractDuration', function () {
|
||||
const duration = $(this).data('duration');
|
||||
|
||||
$('.contractDuration').removeClass('btn-active').addClass('btn-deactive');
|
||||
$(this).removeClass('btn-deactive').addClass('btn-active');
|
||||
|
||||
const $checkboxes = $('label:contains("باشد") input[type="checkbox"], label:contains("نباشد") input[type="checkbox"]');
|
||||
|
||||
if (duration == 1) {
|
||||
$checkboxes.prop('disabled', true).prop('checked', false);
|
||||
$checkboxes.closest('label').addClass('disable');
|
||||
$('#CutContractEndOfYear').val('None');
|
||||
} else {
|
||||
$checkboxes.prop('disabled', false);
|
||||
$checkboxes.closest('label').removeClass('disable');
|
||||
}
|
||||
});
|
||||
@@ -554,6 +554,10 @@ video {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.tw-col-span-1 {
|
||||
grid-column: span 1 / span 1;
|
||||
}
|
||||
|
||||
.tw-col-span-2 {
|
||||
grid-column: span 2 / span 2;
|
||||
}
|
||||
@@ -571,10 +575,14 @@ video {
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.tw-mb-3 {
|
||||
margin-bottom: 0.75rem;
|
||||
.tw-mb-4 {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.tw-mb-\[3px\] {
|
||||
margin-bottom: 3px;
|
||||
.tw-mt-0 {
|
||||
margin-top: 0px;
|
||||
}
|
||||
@@ -595,6 +603,8 @@ video {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.tw-h-\[20px\] {
|
||||
height: 20px;
|
||||
.tw-h-\[25px\] {
|
||||
height: 25px;
|
||||
}
|
||||
@@ -603,30 +613,54 @@ video {
|
||||
height: 35px;
|
||||
}
|
||||
|
||||
.tw-h-full {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.tw-w-\[10\%\] {
|
||||
width: 10%;
|
||||
}
|
||||
|
||||
.tw-w-\[100\%\] {
|
||||
width: 100%;
|
||||
.tw-w-\[13\%\] {
|
||||
width: 13%;
|
||||
}
|
||||
|
||||
.tw-w-\[14\%\] {
|
||||
width: 14%;
|
||||
}
|
||||
|
||||
.tw-w-\[15\%\] {
|
||||
width: 15%;
|
||||
}
|
||||
|
||||
.tw-w-\[18\%\] {
|
||||
width: 18%;
|
||||
.tw-w-\[25px\] {
|
||||
width: 25px;
|
||||
}
|
||||
|
||||
.tw-w-\[2\%\] {
|
||||
width: 2%;
|
||||
.tw-w-\[3\%\] {
|
||||
width: 3%;
|
||||
}
|
||||
|
||||
.tw-w-\[20\%\] {
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
.tw-w-\[25\%\] {
|
||||
width: 25%;
|
||||
}
|
||||
|
||||
.tw-w-\[35\%\] {
|
||||
width: 35%;
|
||||
}
|
||||
|
||||
.tw-w-\[40\%\] {
|
||||
width: 40%;
|
||||
.tw-w-\[4\%\] {
|
||||
width: 4%;
|
||||
}
|
||||
@@ -639,10 +673,26 @@ video {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.tw-w-\[58px\] {
|
||||
width: 58px;
|
||||
}
|
||||
|
||||
.tw-w-\[7\%\] {
|
||||
width: 7%;
|
||||
}
|
||||
|
||||
.tw-w-\[70\%\] {
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
.tw-w-\[8\%\] {
|
||||
width: 8%;
|
||||
}
|
||||
|
||||
.tw-w-\[95\%\] {
|
||||
width: 95%;
|
||||
}
|
||||
|
||||
.tw-w-\[97\%\] {
|
||||
width: 97%;
|
||||
}
|
||||
@@ -656,6 +706,18 @@ video {
|
||||
width: max-content;
|
||||
}
|
||||
|
||||
.tw-w-60 {
|
||||
width: 15rem;
|
||||
}
|
||||
|
||||
.tw-w-\[30\%\] {
|
||||
width: 30%;
|
||||
}
|
||||
|
||||
.tw-cursor-pointer {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.tw-grid-cols-12 {
|
||||
grid-template-columns: repeat(12, minmax(0, 1fr));
|
||||
}
|
||||
@@ -684,6 +746,14 @@ video {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.tw-justify-between {
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.tw-gap-1 {
|
||||
gap: 0.25rem;
|
||||
}
|
||||
|
||||
.tw-gap-2 {
|
||||
gap: 0.5rem;
|
||||
}
|
||||
@@ -700,6 +770,14 @@ video {
|
||||
gap: 10rem;
|
||||
}
|
||||
|
||||
.tw-gap-5 {
|
||||
gap: 1.25rem;
|
||||
}
|
||||
|
||||
.tw-gap-6 {
|
||||
gap: 1.5rem;
|
||||
}
|
||||
|
||||
.tw-overflow-x-auto {
|
||||
overflow-x: auto;
|
||||
}
|
||||
@@ -714,6 +792,8 @@ video {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.tw-rounded-\[15px\] {
|
||||
border-radius: 15px;
|
||||
.tw-rounded-\[10px\] {
|
||||
border-radius: 10px;
|
||||
}
|
||||
@@ -722,12 +802,14 @@ video {
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.tw-bg-\[\#3B73D0\] {
|
||||
.tw-rounded-full {
|
||||
border-radius: 9999px;
|
||||
}
|
||||
|
||||
.tw-bg-\[\#2090C2\] {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(59 115 208 / var(--tw-bg-opacity, 1));
|
||||
background-color: rgb(32 144 194 / var(--tw-bg-opacity, 1));
|
||||
}
|
||||
|
||||
@@ -741,18 +823,24 @@ video {
|
||||
background-color: rgb(69 77 92 / var(--tw-bg-opacity, 1));
|
||||
}
|
||||
|
||||
.tw-bg-\[\#DFF0FF\] {
|
||||
.tw-bg-\[\#84CC16\] {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(223 240 255 / var(--tw-bg-opacity, 1));
|
||||
background-color: rgb(132 204 22 / var(--tw-bg-opacity, 1));
|
||||
}
|
||||
|
||||
.tw-bg-blue-500 {
|
||||
.tw-bg-\[\#84D500\] {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(59 130 246 / var(--tw-bg-opacity, 1));
|
||||
background-color: rgb(132 213 0 / var(--tw-bg-opacity, 1));
|
||||
}
|
||||
|
||||
.tw-bg-white {
|
||||
.tw-bg-\[\#ADE7F2\] {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));
|
||||
background-color: rgb(173 231 242 / var(--tw-bg-opacity, 1));
|
||||
}
|
||||
|
||||
@@ -766,21 +854,27 @@ video {
|
||||
background-color: rgb(255 135 152 / var(--tw-bg-opacity, 1));
|
||||
}
|
||||
|
||||
.tw-bg-\[\#BABDBF\] {
|
||||
.tw-bg-\[\#b1c3c3\] {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(186 189 191 / var(--tw-bg-opacity, 1));
|
||||
background-color: rgb(177 195 195 / var(--tw-bg-opacity, 1));
|
||||
}
|
||||
|
||||
.tw-bg-\[\#DDF4F4\] {
|
||||
.tw-bg-\[\#ddf4f4\] {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(221 244 244 / var(--tw-bg-opacity, 1));
|
||||
}
|
||||
|
||||
.tw-bg-\[\#ECFFFF\] {
|
||||
.tw-bg-\[\#ecffff\] {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(236 255 255 / var(--tw-bg-opacity, 1));
|
||||
}
|
||||
|
||||
.tw-bg-\[linear-gradient\(180deg\,_\#41D1D1_0\%\,_\#2CD0D0_100\%\)\] {
|
||||
background-image: linear-gradient(180deg, #41D1D1 0%, #2CD0D0 100%);
|
||||
.tw-bg-white {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));
|
||||
@@ -790,6 +884,8 @@ video {
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.tw-p-2 {
|
||||
padding: 0.5rem;
|
||||
.tw-p-\[4px\] {
|
||||
padding: 4px;
|
||||
}
|
||||
@@ -799,6 +895,9 @@ video {
|
||||
padding-right: 0.5rem;
|
||||
}
|
||||
|
||||
.tw-px-4 {
|
||||
padding-left: 1rem;
|
||||
padding-right: 1rem;
|
||||
.tw-px-6 {
|
||||
padding-left: 1.5rem;
|
||||
padding-right: 1.5rem;
|
||||
@@ -817,18 +916,41 @@ video {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.tw-text-start {
|
||||
text-align: start;
|
||||
}
|
||||
|
||||
.tw-text-end {
|
||||
text-align: end;
|
||||
}
|
||||
|
||||
.tw-text-\[10px\] {
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.tw-text-\[12px\] {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.tw-text-\[14px\] {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.tw-text-\[16px\] {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.tw-text-\[8px\] {
|
||||
font-size: 8px;
|
||||
}
|
||||
|
||||
.tw-text-xs {
|
||||
font-size: 0.75rem;
|
||||
line-height: 1rem;
|
||||
}
|
||||
|
||||
.tw-text-\[13px\] {
|
||||
font-size: 13px;
|
||||
.tw-text-\[18px\] {
|
||||
font-size: 18px;
|
||||
}
|
||||
@@ -841,11 +963,19 @@ video {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.tw-font-\[600\] {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.tw-ordinal {
|
||||
--tw-ordinal: ordinal;
|
||||
font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction);
|
||||
}
|
||||
|
||||
.tw-leading-\[20px\] {
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.tw-text-green-500 {
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(34 197 94 / var(--tw-text-opacity, 1));
|
||||
@@ -856,24 +986,88 @@ video {
|
||||
color: rgb(255 255 255 / var(--tw-text-opacity, 1));
|
||||
}
|
||||
|
||||
.tw-transition {
|
||||
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;
|
||||
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
|
||||
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;
|
||||
.tw-transition-all {
|
||||
transition-property: all;
|
||||
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
||||
transition-duration: 150ms;
|
||||
}
|
||||
|
||||
.tw-delay-150 {
|
||||
transition-delay: 150ms;
|
||||
}
|
||||
|
||||
.tw-duration-300 {
|
||||
transition-duration: 300ms;
|
||||
}
|
||||
|
||||
.tw-ease-in-out {
|
||||
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
||||
}
|
||||
|
||||
.even\:tw-bg-\[\#D1E9FF\]:nth-child(even) {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(209 233 255 / var(--tw-bg-opacity, 1));
|
||||
}
|
||||
|
||||
.hover\:tw-bg-\[\#C9F0F0\]:hover {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(201 240 240 / var(--tw-bg-opacity, 1));
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.md\:tw-col-span-2 {
|
||||
grid-column: span 2 / span 2;
|
||||
.hover\:tw-bg-\[\#bbc6c6\]:hover {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(187 198 198 / var(--tw-bg-opacity, 1));
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.md\:tw-block {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.md\:tw-hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.md\:tw-h-\[28px\] {
|
||||
height: 28px;
|
||||
}
|
||||
|
||||
.md\:tw-w-\[98px\] {
|
||||
width: 98px;
|
||||
}
|
||||
|
||||
.md\:tw-grid-cols-12 {
|
||||
grid-template-columns: repeat(12, minmax(0, 1fr));
|
||||
}
|
||||
|
||||
.md\:tw-text-\[14px\] {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.md\:tw-text-\[20px\] {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.md\:tw-text-\[13px\] {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.md\:tw-font-\[400\] {
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.md\:tw-font-\[600\] {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.md\:tw-leading-\[28px\] {
|
||||
line-height: 28px;
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user