fix conflict
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
using _0_Framework.Application;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.Domain;
|
||||
using _0_Framework.Domain.CustomizeCheckoutShared.Enums;
|
||||
using _0_Framework.Domain.CustomizeCheckoutShared.ValueObjects;
|
||||
using Company.Domain.CustomizeCheckoutAgg.ValueObjects;
|
||||
using Company.Domain.EmployeeAgg;
|
||||
using Company.Domain.WorkshopAgg;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using _0_Framework.Domain.CustomizeCheckoutShared.Enums;
|
||||
using Microsoft.AspNetCore.Authentication.Cookies;
|
||||
|
||||
|
||||
namespace Company.Domain.CustomizeCheckoutAgg;
|
||||
@@ -16,8 +16,7 @@ namespace Company.Domain.CustomizeCheckoutAgg;
|
||||
public class CustomizeCheckout : EntityBase
|
||||
{
|
||||
private CustomizeCheckout()
|
||||
{
|
||||
}
|
||||
{ }
|
||||
public CustomizeCheckout(DateTime contractStart, DateTime contractEnd, long employeeId, string employeeFName,
|
||||
string employeeLName, DateTime employeeDateOfBirth,
|
||||
string employeeNationalCode, string workshopFullName, long workshopId, long? contractId,
|
||||
@@ -32,7 +31,8 @@ public class CustomizeCheckout : EntityBase
|
||||
ICollection<CustomizeCheckoutLoanInstallments> customizeCheckoutLoanInstallments,
|
||||
ICollection<CustomizeCheckoutSalaryAid> customizeCheckoutSalaryAids,
|
||||
ICollection<CustomizeCheckoutReward> customizeCheckoutRewards, TimeSpan lateToWorkValue, double settingSalary,
|
||||
double dailyWage, WorkshopShiftStatus shiftStatus)
|
||||
double dailyWage, WorkshopShiftStatus shiftStatus, IrregularShift irregularShift,
|
||||
ICollection<CustomizeRotatingShift> customizeRotatingShifts, ICollection<CustomizeCheckoutRegularShift> employeeSettingsShifts)
|
||||
{
|
||||
YearInt = Convert.ToInt32(contractStart.ToFarsi().Substring(0, 4));
|
||||
MonthInt = Convert.ToInt32(contractStart.ToFarsi().Substring(5, 2));
|
||||
@@ -79,6 +79,9 @@ public class CustomizeCheckout : EntityBase
|
||||
SettingSalary = settingSalary;
|
||||
DailyWage = dailyWage;
|
||||
ShiftStatus = shiftStatus;
|
||||
IrregularShift = irregularShift;
|
||||
CustomizeRotatingShifts = customizeRotatingShifts;
|
||||
RegularShifts = employeeSettingsShifts;
|
||||
}
|
||||
|
||||
|
||||
@@ -283,6 +286,12 @@ public class CustomizeCheckout : EntityBase
|
||||
public ICollection<CustomizeCheckoutSalaryAid> CustomizeCheckoutSalaryAids { get; set; }
|
||||
public ICollection<CustomizeCheckoutReward> CustomizeCheckoutRewards { get; set; }
|
||||
|
||||
public IrregularShift IrregularShift { get; set; }
|
||||
public ICollection<CustomizeRotatingShift> CustomizeRotatingShifts { get; set; }
|
||||
public ICollection<CustomizeCheckoutRegularShift> RegularShifts { get; set; }
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region Relations
|
||||
|
||||
@@ -3,6 +3,7 @@ using _0_Framework.Domain;
|
||||
using CompanyManagment.App.Contracts.CustomizeCheckout;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using _0_Framework.Application;
|
||||
|
||||
namespace Company.Domain.CustomizeCheckoutAgg
|
||||
{
|
||||
|
||||
@@ -19,6 +19,7 @@ public class CustomizeCheckoutLoanInstallments
|
||||
public string Month { get; private set; }
|
||||
public string Year { get; private set; }
|
||||
public string LoanRemaining { get; set; }
|
||||
public string LoanAmount { get; set; }
|
||||
public IsActive IsActive { get; private set; }
|
||||
public string LoanAmount { get; set; }
|
||||
|
||||
}
|
||||
@@ -7,6 +7,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using Company.Domain.CustomizeCheckoutTempAgg.ValueObjects;
|
||||
using _0_Framework.Domain.CustomizeCheckoutShared.Enums;
|
||||
using _0_Framework.Domain.CustomizeCheckoutShared.ValueObjects;
|
||||
|
||||
|
||||
namespace Company.Domain.CustomizeCheckoutTempAgg;
|
||||
@@ -34,7 +35,8 @@ public class CustomizeCheckoutTemp : EntityBase
|
||||
ICollection<CustomizeCheckoutTempLoanInstallments> customizeCheckoutLoanInstallments,
|
||||
ICollection<CustomizeCheckoutTempSalaryAid> customizeCheckoutSalaryAids,
|
||||
ICollection<CustomizeCheckoutTempReward> customizeCheckoutRewards,
|
||||
TimeSpan lateToWorkValue, double settingSalary, double dailyWage, WorkshopShiftStatus shiftStatus)
|
||||
TimeSpan lateToWorkValue, double settingSalary, double dailyWage, WorkshopShiftStatus shiftStatus, IrregularShift irregularShift,
|
||||
ICollection<CustomizeRotatingShift> customizeRotatingShifts, ICollection<CustomizeCheckoutRegularShift> employeeSettingsShifts)
|
||||
{
|
||||
YearInt = Convert.ToInt32(contractStart.ToFarsi().Substring(0, 4));
|
||||
MonthInt = Convert.ToInt32(contractStart.ToFarsi().Substring(5, 2));
|
||||
@@ -81,7 +83,10 @@ public class CustomizeCheckoutTemp : EntityBase
|
||||
SettingSalary = settingSalary;
|
||||
DailyWage = dailyWage;
|
||||
ShiftStatus = shiftStatus;
|
||||
}
|
||||
IrregularShift = irregularShift;
|
||||
CustomizeRotatingShifts = customizeRotatingShifts;
|
||||
RegularShifts = employeeSettingsShifts;
|
||||
}
|
||||
|
||||
#region Getters
|
||||
/// <summary>
|
||||
@@ -114,6 +119,10 @@ public class CustomizeCheckoutTemp : EntityBase
|
||||
public ICollection<CustomizeCheckoutTempSalaryAid> CustomizeCheckoutSalaryAids { get; set; }
|
||||
public ICollection<CustomizeCheckoutTempReward> CustomizeCheckoutRewards { get; set; }
|
||||
|
||||
public IrregularShift IrregularShift { get; set; }
|
||||
public ICollection<CustomizeRotatingShift> CustomizeRotatingShifts { get; set; }
|
||||
public ICollection<CustomizeCheckoutRegularShift> RegularShifts { get; set; }
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Security.AccessControl;
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.Domain.CustomizeCheckoutShared.Base;
|
||||
using _0_Framework.Domain.CustomizeCheckoutShared.Enums;
|
||||
using _0_Framework.Domain.CustomizeCheckoutShared.ValueObjects;
|
||||
using CompanyManagment.App.Contracts.CustomizeWorkshopSettings;
|
||||
using CompanyManagment.App.Contracts.File1;
|
||||
using CompanyManagment.App.Contracts.Fine;
|
||||
using CompanyManagment.App.Contracts.Loan;
|
||||
@@ -13,10 +17,13 @@ namespace CompanyManagment.App.Contracts.CustomizeCheckout;
|
||||
|
||||
public class CustomizeCheckoutMandatoryViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// حقوق ماهانه
|
||||
/// </summary>
|
||||
public double MonthlySalary { get; set; }
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// حقوق ماهانه
|
||||
/// </summary>
|
||||
public double MonthlySalary { get; set; }
|
||||
|
||||
|
||||
#region Payments
|
||||
@@ -106,6 +113,8 @@ public class CustomizeCheckoutMandatoryViewModel
|
||||
public double EarlyExitDeduction { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// مساعده
|
||||
@@ -131,6 +140,7 @@ public class CustomizeCheckoutMandatoryViewModel
|
||||
#region Values
|
||||
public TimeSpan LateToWorkValue { get; set; }
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// تعداد روزهای کارکرد
|
||||
/// </summary>
|
||||
@@ -183,16 +193,20 @@ public class CustomizeCheckoutMandatoryViewModel
|
||||
public int Year { get; set; }
|
||||
public int Month { get; set; }
|
||||
#endregion
|
||||
|
||||
public List<FineViewModel> FineViewModels { get; set; } = [];
|
||||
public List<RewardViewModel> RewardViewModels { get; set; } = [];
|
||||
public List<LoanInstallmentViewModel> InstallmentViewModels { get; set; } = [];
|
||||
public List<SalaryAidViewModel> SalaryAidViewModels { get; set; } = [];
|
||||
|
||||
public List<FineViewModel> FineViewModels { get; set; }
|
||||
public List<RewardViewModel> RewardViewModels { get; set; }
|
||||
public List<LoanInstallmentViewModel> InstallmentViewModels{ get; set; }
|
||||
public List<SalaryAidViewModel> SalaryAidViewModels { get; set; }
|
||||
|
||||
public double SettingSalary { get; set; }
|
||||
public double DailyWage { get; set; }
|
||||
|
||||
public WorkshopShiftStatus ShiftStatus { get; set; }
|
||||
public WorkshopShiftStatus ShiftStatus { get; set; }
|
||||
|
||||
public IrregularShift IrregularShift { get; set; }
|
||||
public ICollection<CustomizeRotatingShift> CustomizeRotatingShifts { get; set; }
|
||||
|
||||
public ICollection<CustomizeSifts> EmployeeSettingsShifts { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,11 @@
|
||||
using CompanyManagment.App.Contracts.RollCall;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime;
|
||||
using System.Security.AccessControl;
|
||||
using _0_Framework.Domain.CustomizeCheckoutShared.Base;
|
||||
using _0_Framework.Domain.CustomizeCheckoutShared.Enums;
|
||||
using _0_Framework.Domain.CustomizeCheckoutShared.ValueObjects;
|
||||
using CompanyManagment.App.Contracts.Fine;
|
||||
using CompanyManagment.App.Contracts.Loan;
|
||||
using CompanyManagment.App.Contracts.Reward;
|
||||
@@ -67,7 +71,7 @@ namespace CompanyManagment.App.Contracts.CustomizeCheckout
|
||||
public string LeavePay { get; set; }
|
||||
public string RewardPay { get; set; }
|
||||
|
||||
|
||||
public bool IsBirthday { get; set; } = true;
|
||||
public string FineDeduction { get; set; }
|
||||
public string InsuranceDeduction { get; set; }
|
||||
public string TaxDeducation { get; set; }
|
||||
@@ -87,22 +91,23 @@ namespace CompanyManagment.App.Contracts.CustomizeCheckout
|
||||
public List<LoanInstallmentViewModel> InstallmentViewModels { get; set; }
|
||||
public List<SalaryAidViewModel> SalaryAidViewModels { get; set; }
|
||||
public bool TotalPaymentHide { get; set; }
|
||||
public PersonnelCheckoutDailyRollCallViewModel MonthlyRollCall { get; set; }
|
||||
public double TotalPaymentD { get; set; }
|
||||
|
||||
public PersonnelCheckoutDailyRollCallViewModel MonthlyRollCall { get; set; }
|
||||
|
||||
|
||||
|
||||
public string TotalLateToWorkDeduction { get; set; }
|
||||
public string TotalLateToWorkDeduction { get; set; }
|
||||
|
||||
public string LateToWorkValue { get; set; }
|
||||
|
||||
public string SettingSalary { get; set; }
|
||||
public string DailyWage { get; set; }
|
||||
public WorkshopShiftStatus ShiftStatus { get; set; }
|
||||
|
||||
public string SettingSalary { get; set; }
|
||||
public string DailyWage { get; set; }
|
||||
public WorkshopShiftStatus ShiftStatus { get; set; }
|
||||
public string EmployeePicture { get; set; }
|
||||
|
||||
public string EmployeePicture { get; set; }
|
||||
|
||||
public IrregularShift IrregularShift { get; set; }
|
||||
public List<CustomizeRotatingShift> CustomizeRotatingShifts { get; set; }
|
||||
public List<CustomizeSifts> RegularShift { get; set; }
|
||||
|
||||
//public bool HasLeft { get; set; }
|
||||
//public string IsBlockCantracingParty { get; set; }
|
||||
|
||||
@@ -7,7 +7,8 @@ namespace CompanyManagment.App.Contracts.CustomizeCheckout
|
||||
{
|
||||
public interface ICustomizeCheckoutApplication
|
||||
{
|
||||
public List<CustomizeCheckoutViewModel> Search(SearchCustomizeCheckout searchModel);
|
||||
List<CustomizeCheckoutViewModel> Search(SearchCustomizeCheckout searchModel);
|
||||
|
||||
OperationResult<List<EligibleEmployeesForCustomizeCheckoutViewModel>>
|
||||
GetWorkshopEmployeesEligibleForCheckoutInDates(long workshopId, int yearFa, int monthFa);
|
||||
|
||||
|
||||
@@ -4,9 +4,7 @@ public class SearchCustomizeCheckout
|
||||
{
|
||||
|
||||
public long WorkshopId { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
public int Month { get; set; }
|
||||
public int Year { get; set; }
|
||||
|
||||
@@ -14,6 +12,7 @@ public class SearchCustomizeCheckout
|
||||
public string SearchEndFa { get; set; }
|
||||
|
||||
public long EmployeeId { get; set; }
|
||||
|
||||
public long BankId { get; set; }
|
||||
|
||||
public CustomizeCheckoutOrderByEnum OrderBy { get; set; } = CustomizeCheckoutOrderByEnum.ContractStartDesc;
|
||||
|
||||
@@ -50,8 +50,6 @@ namespace CompanyManagment.Application
|
||||
|
||||
public List<CustomizeCheckoutViewModel> Search(SearchCustomizeCheckout searchModel)
|
||||
{
|
||||
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(searchModel.SearchStartFa) || !string.IsNullOrWhiteSpace(searchModel.SearchEndFa))
|
||||
{
|
||||
if (!searchModel.SearchStartFa.TryToGeorgianDateTime(out DateTime start) ||
|
||||
@@ -99,9 +97,11 @@ namespace CompanyManagment.Application
|
||||
new CustomizeCheckoutLoanInstallments(x.Amount, x.Month, x.Year, x.IsActive,x.RemainingAmount,x.LoanAmount)).ToList();
|
||||
|
||||
var salaryAids = result.SalaryAidViewModels.Select(x =>
|
||||
new CustomizeCheckoutSalaryAid(x.Amount, x.SalaryAidDateTimeGe, x.SalaryAidDateTimeFa)).ToList();
|
||||
new CustomizeCheckoutSalaryAid(x.Amount, x.SalaryAidDateTimeGe, x.SalaryAidDateTimeFa)).ToList();
|
||||
|
||||
|
||||
var regularShift = result.EmployeeSettingsShifts.Select(x =>
|
||||
new CustomizeCheckoutRegularShift(x.StartTime, x.EndTime, x.Placement)).ToList();
|
||||
|
||||
var entity = new CustomizeCheckout(command.ContractStart, command.ContractEnd, command.EmployeeId, employee.FName, employee.LName, employee.DateOfBirth, employee.NationalCode,
|
||||
workshop.WorkshopFullName, command.WorkshopId, contract?.Id,
|
||||
@@ -110,7 +110,8 @@ namespace CompanyManagment.Application
|
||||
result.FamilyAllowance, result.LeavePay, result.InsuranceDeduction, result.FineAbsenceDeduction,
|
||||
result.LateToWorkDeduction, result.EarlyExitDeduction, result.RewardPay, result.SalaryAidDeduction, result.InstallmentDeduction, result.FineDeduction,
|
||||
result.TaxDeduction, result.SumOfWorkingDays, result.TotalClaimsStr, result.TotalDeductionsStr, result.TotalPayment, contract?.ContractNo ?? "-",
|
||||
fines,loanInstallments,salaryAids,rewards, result.LateToWorkValue, result.SettingSalary, result.DailyWage, result.ShiftStatus);
|
||||
fines,loanInstallments,salaryAids,rewards, result.LateToWorkValue, result.SettingSalary, result.DailyWage, result.ShiftStatus,result.IrregularShift,result.CustomizeRotatingShifts,
|
||||
regularShift);
|
||||
|
||||
|
||||
_customizeCheckoutRepository.Create(entity);
|
||||
@@ -155,6 +156,9 @@ namespace CompanyManagment.Application
|
||||
var salaryAids = computations.SalaryAidViewModels.Select(x =>
|
||||
new CustomizeCheckoutSalaryAid(x.Amount, x.SalaryAidDateTimeGe, x.SalaryAidDateTimeFa)).ToList();
|
||||
|
||||
var regularShift = computations.EmployeeSettingsShifts.Select(x =>
|
||||
new CustomizeCheckoutRegularShift(x.StartTime, x.EndTime, x.Placement)).ToList();
|
||||
|
||||
var entity = new CustomizeCheckout(command.ContractStart, command.ContractEnd, employeeId, employee.FName, employee.LName, employee.DateOfBirth, employee.NationalCode,
|
||||
workshop.WorkshopFullName, command.WorkshopId, contract?.Id,
|
||||
computations.MonthlySalary, computations.FridayPay, computations.OverTimePay, computations.BaseYearsPay,
|
||||
@@ -162,7 +166,8 @@ namespace CompanyManagment.Application
|
||||
computations.FamilyAllowance, computations.LeavePay, computations.InsuranceDeduction, computations.FineAbsenceDeduction,
|
||||
computations.LateToWorkDeduction, computations.EarlyExitDeduction, computations.RewardPay, computations.SalaryAidDeduction, computations.InstallmentDeduction, computations.FineDeduction,
|
||||
computations.TaxDeduction, computations.SumOfWorkingDays, computations.TotalClaimsStr, computations.TotalDeductionsStr, computations.TotalPayment, contract?.ContractNo ?? "-",
|
||||
fines,loanInstallments,salaryAids,rewards, computations.LateToWorkValue, computations.SettingSalary, computations.DailyWage, computations.ShiftStatus);
|
||||
fines,loanInstallments,salaryAids,rewards, computations.LateToWorkValue, computations.SettingSalary, computations.DailyWage, computations.ShiftStatus,computations.IrregularShift,
|
||||
computations.CustomizeRotatingShifts, regularShift);
|
||||
|
||||
_customizeCheckoutRepository.Create(entity);
|
||||
_customizeCheckoutRepository.RemoveEmployeeCustomizeCheckoutInDates(command.WorkshopId, employeeId, command.ContractStart, command.ContractEnd);
|
||||
|
||||
@@ -20,6 +20,7 @@ using System.Linq;
|
||||
using Company.Domain.CustomizeCheckoutTempAgg.ValueObjects;
|
||||
using Company.Domain.PersonnelCodeAgg;
|
||||
using CompanyManagment.App.Contracts.PersonnleCode;
|
||||
using _0_Framework.Domain.CustomizeCheckoutShared.ValueObjects;
|
||||
|
||||
namespace CompanyManagment.Application
|
||||
{
|
||||
@@ -84,6 +85,9 @@ namespace CompanyManagment.Application
|
||||
var salaryAids = result.SalaryAidViewModels.Select(x =>
|
||||
new CustomizeCheckoutTempSalaryAid(x.Amount, x.SalaryAidDateTimeGe, x.SalaryAidDateTimeFa)).ToList();
|
||||
|
||||
var regularShift = result.EmployeeSettingsShifts.Select(x =>
|
||||
new CustomizeCheckoutRegularShift(x.StartTime, x.EndTime, x.Placement)).ToList();
|
||||
|
||||
var entity = new CustomizeCheckoutTemp(command.ContractStart, command.ContractEnd, command.EmployeeId, employee.FName, employee.LName, employee.DateOfBirth, employee.NationalCode,
|
||||
workshop.WorkshopFullName, command.WorkshopId, contract?.Id,
|
||||
result.MonthlySalary, result.FridayPay, result.OverTimePay, result.BaseYearsPay,
|
||||
@@ -91,7 +95,8 @@ namespace CompanyManagment.Application
|
||||
result.FamilyAllowance, result.LeavePay, result.InsuranceDeduction, result.FineAbsenceDeduction,
|
||||
result.LateToWorkDeduction, result.EarlyExitDeduction, result.RewardPay, result.SalaryAidDeduction, result.InstallmentDeduction, result.FineDeduction,
|
||||
result.TaxDeduction, result.SumOfWorkingDays, result.TotalClaimsStr, result.TotalDeductionsStr, result.TotalPayment, contract?.ContractNo ?? "-",
|
||||
fines, loanInstallments, salaryAids, rewards,result.LateToWorkValue, result.SettingSalary, result.DailyWage, result.ShiftStatus);
|
||||
fines, loanInstallments, salaryAids, rewards,result.LateToWorkValue, result.SettingSalary,result.DailyWage, result.ShiftStatus, result.IrregularShift, result.CustomizeRotatingShifts,
|
||||
regularShift);
|
||||
|
||||
|
||||
_customizeCheckoutTempRepository.Create(entity);
|
||||
@@ -137,6 +142,9 @@ namespace CompanyManagment.Application
|
||||
|
||||
var employee = employees.FirstOrDefault(x => x.id == employeeId);
|
||||
|
||||
var regularShift = computations.EmployeeSettingsShifts.Select(x =>
|
||||
new CustomizeCheckoutRegularShift(x.StartTime, x.EndTime, x.Placement)).ToList();
|
||||
|
||||
var entity = new CustomizeCheckoutTemp(command.ContractStart, command.ContractEnd, employeeId, employee.FName, employee.LName, employee.DateOfBirth, employee.NationalCode,
|
||||
workshop.WorkshopFullName, command.WorkshopId, contract?.Id,
|
||||
computations.MonthlySalary, computations.FridayPay, computations.OverTimePay, computations.BaseYearsPay,
|
||||
@@ -144,8 +152,9 @@ namespace CompanyManagment.Application
|
||||
computations.FamilyAllowance, computations.LeavePay, computations.InsuranceDeduction, computations.FineAbsenceDeduction,
|
||||
computations.LateToWorkDeduction, computations.EarlyExitDeduction, computations.RewardPay, computations.SalaryAidDeduction, computations.InstallmentDeduction, computations.FineDeduction,
|
||||
computations.TaxDeduction, computations.SumOfWorkingDays, computations.TotalClaimsStr, computations.TotalDeductionsStr, computations.TotalPayment, contract?.ContractNo ?? "-",
|
||||
fines, loanInstallments, salaryAids, rewards,computations.LateToWorkValue, computations.SettingSalary, computations.DailyWage, computations.ShiftStatus);
|
||||
_customizeCheckoutTempRepository.Create(entity);
|
||||
fines, loanInstallments, salaryAids, rewards,computations.LateToWorkValue, computations.SettingSalary, computations.DailyWage, computations.ShiftStatus, computations.IrregularShift,
|
||||
computations.CustomizeRotatingShifts, regularShift);
|
||||
_customizeCheckoutTempRepository.Create(entity);
|
||||
_customizeCheckoutTempRepository.RemoveEmployeeTemporaryCheckoutInDates(command.WorkshopId, employeeId, command.ContractStart, command.ContractEnd);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.Domain.CustomizeCheckoutShared.Enums;
|
||||
using _0_Framework.InfraStructure;
|
||||
using Company.Domain.CustomizeCheckoutAgg;
|
||||
using Microsoft.AspNetCore.Components.Forms;
|
||||
@@ -97,6 +98,23 @@ public class CustomizeCheckoutMapping : IEntityTypeConfiguration<CustomizeChecko
|
||||
rewards.Property(x=>x.Description).HasColumnType("ntext");
|
||||
});
|
||||
|
||||
builder.OwnsOne(x => x.IrregularShift, irregularShift =>
|
||||
{
|
||||
irregularShift.Property(x => x.WorkshopIrregularShifts).HasConversion<string>().HasMaxLength(30);
|
||||
irregularShift.Property(x => x.StartTime).IsRequired();
|
||||
irregularShift.Property(x => x.EndTime).IsRequired();
|
||||
});
|
||||
|
||||
builder.OwnsMany(x => x.RegularShifts, shift =>
|
||||
{
|
||||
|
||||
shift.HasKey(x => x.id);
|
||||
shift.Property(x => x.Placement).HasConversion<string>().HasMaxLength(20);
|
||||
});
|
||||
|
||||
builder.OwnsMany(x => x.CustomizeRotatingShifts);
|
||||
|
||||
|
||||
builder.Property(x => x.ShiftStatus).HasConversion<string>().HasMaxLength(10);
|
||||
|
||||
|
||||
|
||||
@@ -97,10 +97,26 @@ public class CustomizeCheckoutTempMapping : IEntityTypeConfiguration<CustomizeCh
|
||||
rewards.Property(x => x.Description).HasColumnType("ntext");
|
||||
});
|
||||
|
||||
|
||||
builder.OwnsOne(x => x.IrregularShift, irregularShift =>
|
||||
{
|
||||
irregularShift.Property(x => x.WorkshopIrregularShifts).HasConversion<string>().HasMaxLength(30);
|
||||
irregularShift.Property(x => x.StartTime).IsRequired();
|
||||
irregularShift.Property(x => x.EndTime).IsRequired();
|
||||
});
|
||||
|
||||
builder.OwnsMany(x => x.RegularShifts, shift =>
|
||||
{
|
||||
//shift.ToTable("RegularShifts");
|
||||
shift.HasKey(x => x.id);
|
||||
shift.Property(x => x.Placement).HasConversion<string>().HasMaxLength(20);
|
||||
});
|
||||
|
||||
builder.OwnsMany(x => x.CustomizeRotatingShifts);
|
||||
|
||||
builder.Property(x => x.ShiftStatus).HasConversion<string>().HasMaxLength(10);
|
||||
|
||||
|
||||
#region Relastions
|
||||
#region Relastions
|
||||
|
||||
//builder.HasOne(x => x.Workshop)
|
||||
// .WithMany(x => x.CustomizeCheckouts)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -17,7 +17,7 @@ using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using AccountMangement.Infrastructure.EFCore;
|
||||
using _0_Framework.Domain.CustomizeCheckoutShared.Base;
|
||||
using Company.Domain.CustomizeCheckoutAgg.ValueObjects;
|
||||
using CompanyManagment.App.Contracts.EmployeeDocuments;
|
||||
using CompanyManagment.App.Contracts.Fine;
|
||||
@@ -224,45 +224,49 @@ namespace CompanyManagment.EFCore.Repository
|
||||
SalaryAidDateTimeGe = s.SalaryAidDateTime
|
||||
}).ToList(),
|
||||
|
||||
LateToWorkValue = x.LateToWorkValue == TimeSpan.Zero ? "-" : $"{(int)x.LateToWorkValue.TotalHours}:{Convert.ToInt32(x.LateToWorkValue.TotalMinutes % 60):00}",
|
||||
SettingSalary = x.SettingSalary.ToMoney(),
|
||||
DailyWage = x.DailyWage.ToMoney(),
|
||||
ShiftStatus = x.ShiftStatus,
|
||||
LateToWorkValue = x.LateToWorkValue == TimeSpan.Zero ? "-" : $"{(int)x.LateToWorkValue.TotalHours}:{Convert.ToInt32(x.LateToWorkValue.TotalMinutes % 60):00}",
|
||||
|
||||
}).ToList();
|
||||
List<WorkshopViewModel> workshopsList = workshopsQuery.Select(x => new WorkshopViewModel
|
||||
{
|
||||
WorkshopFullName = x.WorkshopFullName,
|
||||
Id = x.id
|
||||
}).ToList();
|
||||
List<EmployerViewModel> workshopEmployersList = employersQuery.Select(x => new EmployerViewModel
|
||||
{
|
||||
Id = x.id,
|
||||
FullName = x.FullName
|
||||
}).ToList();
|
||||
//List<LeftWorkViewModel> leftWorksList = leftWorksQuery.Select(x => new LeftWorkViewModel
|
||||
//{
|
||||
// EmployeeId = x.EmployeeId,
|
||||
// WorkshopId = x.WorkshopId,
|
||||
// Id = x.id,
|
||||
// StartWorkDateGr = x.StartWorkDate,
|
||||
// LeftWorkDateGr = x.LeftWorkDate
|
||||
//}).ToList();
|
||||
//List<EmployeeViewModel> employees = employeesQuery.Select(x => new EmployeeViewModel()
|
||||
//{
|
||||
// Id = x.id,
|
||||
// FName = x.FName,
|
||||
// LName = x.LName,
|
||||
// FatherName = x.FatherName,
|
||||
// NationalCode = x.NationalCode,
|
||||
// DateOfBirth = x.DateOfBirth.ToFarsi()
|
||||
//}).ToList();
|
||||
List<PersonnelCodeViewModel> personnelCodeList = personnelCodesQuery.Select(x => new PersonnelCodeViewModel
|
||||
{
|
||||
EmployeeId = x.EmployeeId,
|
||||
WorkshopId = x.WorkshopId,
|
||||
PersonnelCode = Convert.ToInt64(x.PersonnelCode)
|
||||
}).ToList();
|
||||
SettingSalary = x.SettingSalary.ToMoney(),
|
||||
DailyWage = x.DailyWage.ToMoney(),
|
||||
ShiftStatus = x.ShiftStatus,
|
||||
IrregularShift = x.IrregularShift,
|
||||
CustomizeRotatingShifts = x.CustomizeRotatingShifts.ToList(),
|
||||
RegularShift = x.RegularShifts.Select(s=> (CustomizeSifts)s).ToList()
|
||||
|
||||
}).ToList();
|
||||
List<WorkshopViewModel> workshopsList = workshopsQuery.Select(x => new WorkshopViewModel
|
||||
{
|
||||
WorkshopFullName = x.WorkshopFullName,
|
||||
Id = x.id
|
||||
}).ToList();
|
||||
List<EmployerViewModel> workshopEmployersList = employersQuery.Select(x => new EmployerViewModel
|
||||
{
|
||||
Id = x.id,
|
||||
FullName = x.FullName
|
||||
}).ToList();
|
||||
//List<LeftWorkViewModel> leftWorksList = leftWorksQuery.Select(x => new LeftWorkViewModel
|
||||
//{
|
||||
// EmployeeId = x.EmployeeId,
|
||||
// WorkshopId = x.WorkshopId,
|
||||
// Id = x.id,
|
||||
// StartWorkDateGr = x.StartWorkDate,
|
||||
// LeftWorkDateGr = x.LeftWorkDate
|
||||
//}).ToList();
|
||||
//List<EmployeeViewModel> employees = employeesQuery.Select(x => new EmployeeViewModel()
|
||||
//{
|
||||
// Id = x.id,
|
||||
// FName = x.FName,
|
||||
// LName = x.LName,
|
||||
// FatherName = x.FatherName,
|
||||
// NationalCode = x.NationalCode,
|
||||
// DateOfBirth = x.DateOfBirth.ToFarsi()
|
||||
//}).ToList();
|
||||
List<PersonnelCodeViewModel> personnelCodeList = personnelCodesQuery.Select(x => new PersonnelCodeViewModel
|
||||
{
|
||||
EmployeeId = x.EmployeeId,
|
||||
WorkshopId = x.WorkshopId,
|
||||
PersonnelCode = Convert.ToInt64(x.PersonnelCode)
|
||||
}).ToList();
|
||||
|
||||
var date = customizeCheckoutsList.FirstOrDefault();
|
||||
|
||||
@@ -302,10 +306,8 @@ namespace CompanyManagment.EFCore.Repository
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void RemoveEmployeeCustomizeCheckoutInDates(long workshopId, long employeeId, DateTime startOfMonth, DateTime endOfMonth)
|
||||
|
||||
public void RemoveEmployeeCustomizeCheckoutInDates(long workshopId, long employeeId, DateTime startOfMonth, DateTime endOfMonth)
|
||||
{
|
||||
var checkout = _companyContext.CustomizeCheckouts.FirstOrDefault(x => x.WorkshopId == workshopId && x.EmployeeId == employeeId &&
|
||||
x.ContractStart.Date <= endOfMonth.Date && x.ContractEnd.Date >= startOfMonth.Date);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.Domain.CustomizeCheckoutShared.Base;
|
||||
using _0_Framework.InfraStructure;
|
||||
using AccountMangement.Infrastructure.EFCore;
|
||||
using Company.Domain.CustomizeCheckoutTempAgg;
|
||||
@@ -360,11 +361,14 @@ namespace CompanyManagment.EFCore.Repository
|
||||
SalaryAidDateTimeGe = s.SalaryAidDateTime
|
||||
}).ToList(),
|
||||
|
||||
LateToWorkValue = x.LateToWorkValue == TimeSpan.Zero ? "-" : $"{(int)x.LateToWorkValue.TotalHours}:{Convert.ToInt32(x.LateToWorkValue.TotalMinutes % 60):00}",
|
||||
SettingSalary = x.SettingSalary.ToMoney(),
|
||||
DailyWage = x.DailyWage.ToMoney(),
|
||||
ShiftStatus = x.ShiftStatus,
|
||||
|
||||
//LateToWorkValue = x.LateToWorkValue == TimeSpan.Zero ? "-" : $"{(int)x.LateToWorkValue.TotalHours}:{x.LateToWorkValue.Minutes:D2}"
|
||||
LateToWorkValue = x.LateToWorkValue == TimeSpan.Zero ? "-" : $"{(int)x.LateToWorkValue.TotalHours}:{Convert.ToInt32(x.LateToWorkValue.TotalMinutes % 60):00}",
|
||||
SettingSalary = x.SettingSalary.ToMoney(),
|
||||
DailyWage = x.DailyWage.ToMoney(),
|
||||
ShiftStatus = x.ShiftStatus,
|
||||
IrregularShift = x.IrregularShift,
|
||||
CustomizeRotatingShifts = x.CustomizeRotatingShifts.ToList(),
|
||||
RegularShift = x.RegularShifts.Select(x => (CustomizeSifts)x).ToList()
|
||||
|
||||
|
||||
}).ToList();
|
||||
|
||||
@@ -2392,9 +2392,12 @@ CreateWorkingHoursTemp command, bool holidayWorking)
|
||||
LateToWorkValue = totalLateToWorkSpan,
|
||||
SettingSalary = customizeWorkshopEmployeeSettings.Salary,
|
||||
DailyWage = dailyWage,
|
||||
ShiftStatus = customizeWorkshopEmployeeSettings.WorkshopShiftStatus
|
||||
|
||||
};
|
||||
ShiftStatus = customizeWorkshopEmployeeSettings.WorkshopShiftStatus,
|
||||
IrregularShift = customizeWorkshopEmployeeSettings.IrregularShift,
|
||||
CustomizeRotatingShifts = customizeWorkshopEmployeeSettings.CustomizeRotatingShifts,
|
||||
EmployeeSettingsShifts = customizeWorkshopEmployeeSettings.CustomizeWorkshopEmployeeSettingsShifts
|
||||
.Select(x => (CustomizeSifts)x).ToList(),
|
||||
};
|
||||
}
|
||||
|
||||
private CustomizeCheckoutMandatoryViewModel CheckoutWithoutCalculationForKebabMahdi(long workshopId, long employeeId, DateTime contractStart, DateTime contractEnd)
|
||||
|
||||
@@ -108,21 +108,63 @@
|
||||
<td style="font-size: 10px;font-weight: bold;">فیش حقوقی: سال @Model.Year</td>
|
||||
<td style="font-size: 10px;font-weight: bold;">ماه @Model.Month</td>
|
||||
<td style="font-size: 10px;font-weight: bold;">
|
||||
@* @if (Model.ShiftStatus == WorkshopShiftStatus.Irregular)
|
||||
{
|
||||
<div style="display: flex;align-items: center;gap: 6px;">
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;text-align: center;padding: 2px 0;border-radius: 5px;width: 66.666667%;">12 ساعت کار 24 ساعت استراحت</div>
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;text-align: center;padding: 2px 0;border-radius: 5px;width: 33.333333%;">17:00 الی 00:30</div>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div style="display: flex;align-items: center;gap: 6px;">
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;width: 100%;text-align: center;padding: 2px 0;border-radius: 5px;">09:00 الی 17:00</div>
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;width: 100%;text-align: center;padding: 2px 0;border-radius: 5px;">17:00 الی 00:30</div>
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;width: 100%;text-align: center;padding: 2px 0;border-radius: 5px;">-</div>
|
||||
</div>
|
||||
} *@
|
||||
@if (Model.ShiftStatus == WorkshopShiftStatus.Irregular)
|
||||
{
|
||||
string type = Model.IrregularShift.WorkshopIrregularShifts switch
|
||||
{
|
||||
WorkshopIrregularShifts.TwelveTwentyFour => "12 ساعت کار 24 ساعت استراحت",
|
||||
WorkshopIrregularShifts.TwelveThirtySix => "12 ساعت کار 24 ساعت استراحت",
|
||||
WorkshopIrregularShifts.TwentyFourFortyEight => "24 ساعت کار 48 ساعت استراحت",
|
||||
WorkshopIrregularShifts.TwentyFourTwentyFour => "24 ساعت کار 24 ساعت استراحت",
|
||||
_ => ""
|
||||
};
|
||||
string time = $"{Model.IrregularShift.StartTime:HH:mm} الی {Model.IrregularShift.EndTime:HH:mm}";
|
||||
<div style="display: flex;align-items: center;gap: 6px;">
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;text-align: center;padding: 2px 0;border-radius: 5px;width: 66.666667%;">@type</div>
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;text-align: center;padding: 2px 0;border-radius: 5px;width: 33.333333%;">@time</div>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div style="display: flex;align-items: center;gap: 6px;">
|
||||
@if (Model.ShiftStatus == WorkshopShiftStatus.Regular)
|
||||
{
|
||||
@for (int i = 0; i < 3; i++)
|
||||
{
|
||||
if (i >= 0 && i < Model.RegularShift.Count)
|
||||
{
|
||||
string time = $"{Model.RegularShift[i].StartTime:HH:mm} الی {Model.RegularShift[i].EndTime:HH:mm}";
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;width: 100%;text-align: center;padding: 2px 0;border-radius: 5px;">@time</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;width: 100%;text-align: center;padding: 2px 0;border-radius: 5px;">-</div>
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else if (Model.ShiftStatus == WorkshopShiftStatus.Rotating)
|
||||
{
|
||||
@for (int i = 0; i < 3; i++)
|
||||
{
|
||||
if (i >= 0 && i < Model.CustomizeRotatingShifts.Count)
|
||||
{
|
||||
string time = $"{Model.CustomizeRotatingShifts[i].StartTime:HH:mm} الی {Model.CustomizeRotatingShifts[i].EndTime:HH:mm}";
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;width: 100%;text-align: center;padding: 2px 0;border-radius: 5px;">@time</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;width: 100%;text-align: center;padding: 2px 0;border-radius: 5px;">-</div>
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@* <div style="background-color: #ffffff;border: 1px solid #E1E1E1;width: 100%;text-align: center;padding: 2px 0;border-radius: 5px;">17:00 الی 00:30</div>
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;width: 100%;text-align: center;padding: 2px 0;border-radius: 5px;">-</div> *@
|
||||
</div>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -6,40 +6,40 @@
|
||||
<link href="~/assetsclient/pages/checkouts/css/printonerollcall.css" rel="stylesheet" />
|
||||
|
||||
@{
|
||||
string clientVersion = _0_Framework.Application.Version.StyleVersion;
|
||||
int indexTable = 0;
|
||||
string clientVersion = _0_Framework.Application.Version.StyleVersion;
|
||||
int indexTable = 0;
|
||||
int indexSalaryAid = 0;
|
||||
int indexLoan = 0;
|
||||
int indexReward = 0;
|
||||
int indexLoan = 0;
|
||||
int indexReward = 0;
|
||||
|
||||
<style>
|
||||
.trTable:nth-child(even) {
|
||||
background-color: #f1f1f1 !important;
|
||||
}
|
||||
<style>
|
||||
.trTable:nth-child(even) {
|
||||
background-color: #f1f1f1 !important;
|
||||
}
|
||||
|
||||
.table-container {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.table-container {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.table-container table {
|
||||
flex: 1; /*Ensures equal width */
|
||||
}
|
||||
.table-container table {
|
||||
flex: 1; /*Ensures equal width */
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
table-layout: auto;
|
||||
}
|
||||
table {
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
table-layout: auto;
|
||||
}
|
||||
|
||||
@@media print {
|
||||
#printSize {
|
||||
width: 20cm !important;
|
||||
margin: 3mm 0 0 4mm !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@media print {
|
||||
#printSize {
|
||||
width: 20cm !important;
|
||||
margin: 3mm 0 0 4mm !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
}
|
||||
|
||||
<div class="modal-header" style="border-bottom: unset">
|
||||
@@ -64,14 +64,14 @@
|
||||
</div>
|
||||
<div class="col-3 d-inline-block">
|
||||
<div style="width: 55px; height: 62px; margin: 3px auto -5px 0; border: 1px solid #999; border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center;">
|
||||
@if (string.IsNullOrWhiteSpace(Model.EmployeePicture))
|
||||
{
|
||||
<span>عکس</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<img style="width: 100%;" src="data:image/jpeg;base64,@Model.EmployeePicture" alt="عکس" />
|
||||
}
|
||||
@if (string.IsNullOrWhiteSpace(Model.EmployeePicture))
|
||||
{
|
||||
<span>عکس</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<img style="width: 100%;" src="data:image/jpeg;base64,@Model.EmployeePicture" alt="عکس" />
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -110,21 +110,63 @@
|
||||
<td style="font-size: 10px;font-weight: bold;">فیش حقوقی: سال @Model.Year</td>
|
||||
<td style="font-size: 10px;font-weight: bold;">ماه @Model.Month</td>
|
||||
<td style="font-size: 10px;font-weight: bold;">
|
||||
@* @if (Model.ShiftStatus == WorkshopShiftStatus.Irregular)
|
||||
@if (Model.ShiftStatus == WorkshopShiftStatus.Irregular)
|
||||
{
|
||||
string type = Model.IrregularShift.WorkshopIrregularShifts switch
|
||||
{
|
||||
WorkshopIrregularShifts.TwelveTwentyFour => "12 ساعت کار 24 ساعت استراحت",
|
||||
WorkshopIrregularShifts.TwelveThirtySix => "12 ساعت کار 24 ساعت استراحت",
|
||||
WorkshopIrregularShifts.TwentyFourFortyEight => "24 ساعت کار 48 ساعت استراحت",
|
||||
WorkshopIrregularShifts.TwentyFourTwentyFour => "24 ساعت کار 24 ساعت استراحت",
|
||||
_ => ""
|
||||
};
|
||||
string time = $"{Model.IrregularShift.StartTime:HH:mm} الی {Model.IrregularShift.EndTime:HH:mm}";
|
||||
<div style="display: flex;align-items: center;gap: 6px;">
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;text-align: center;padding: 2px 0;border-radius: 5px;width: 66.666667%;">12 ساعت کار 24 ساعت استراحت</div>
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;text-align: center;padding: 2px 0;border-radius: 5px;width: 33.333333%;">17:00 الی 00:30</div>
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;text-align: center;padding: 2px 0;border-radius: 5px;width: 66.666667%;">@type</div>
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;text-align: center;padding: 2px 0;border-radius: 5px;width: 33.333333%;">@time</div>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div style="display: flex;align-items: center;gap: 6px;">
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;width: 100%;text-align: center;padding: 2px 0;border-radius: 5px;">09:00 الی 17:00</div>
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;width: 100%;text-align: center;padding: 2px 0;border-radius: 5px;">17:00 الی 00:30</div>
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;width: 100%;text-align: center;padding: 2px 0;border-radius: 5px;">-</div>
|
||||
@if (Model.ShiftStatus == WorkshopShiftStatus.Regular)
|
||||
{
|
||||
@for (int i = 0; i < 3; i++)
|
||||
{
|
||||
if (i >= 0 && i < Model.RegularShift.Count)
|
||||
{
|
||||
string time = $"{Model.RegularShift[i].StartTime:HH:mm} الی {Model.RegularShift[i].EndTime:HH:mm}";
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;width: 100%;text-align: center;padding: 2px 0;border-radius: 5px;">@time</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;width: 100%;text-align: center;padding: 2px 0;border-radius: 5px;">-</div>
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else if (Model.ShiftStatus == WorkshopShiftStatus.Rotating)
|
||||
{
|
||||
@for (int i = 0; i < 3; i++)
|
||||
{
|
||||
if (i >= 0 && i < Model.CustomizeRotatingShifts.Count)
|
||||
{
|
||||
string time = $"{Model.CustomizeRotatingShifts[i].StartTime:HH:mm} الی {Model.CustomizeRotatingShifts[i].EndTime:HH:mm}";
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;width: 100%;text-align: center;padding: 2px 0;border-radius: 5px;">@time</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;width: 100%;text-align: center;padding: 2px 0;border-radius: 5px;">-</div>
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@* <div style="background-color: #ffffff;border: 1px solid #E1E1E1;width: 100%;text-align: center;padding: 2px 0;border-radius: 5px;">17:00 الی 00:30</div>
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;width: 100%;text-align: center;padding: 2px 0;border-radius: 5px;">-</div> *@
|
||||
</div>
|
||||
} *@
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -132,7 +174,7 @@
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row" style="margin-top: 10px;padding: 0 12px;">
|
||||
<div class="row" style="margin-top: 10px;padding: 0 12px;">
|
||||
<fieldset style="border: 1px solid black !important;-webkit-print-color-adjust: exact;print-color-adjust: exact; border-radius: 10px 10px 10px 10px; margin: 0px 0px; overflow: hidden;padding: 0;">
|
||||
<table style="/* table-layout: fixed; */ width: 100%">
|
||||
|
||||
@@ -723,7 +765,7 @@
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</fieldset>
|
||||
</div>
|
||||
@@ -739,10 +781,10 @@
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12 text-start">
|
||||
<button type="button" class="btn btn-rounded waves-effect waves-light m-b-10 text-white" data-bs-dismiss="modal" aria-label="Close" style="background-color: #454D5C;">بستن فرم</button>
|
||||
<button type="button" class="btn btn-rounded waves-effect waves-light m-b-10 text-white" data-bs-dismiss="modal" aria-label="Close" style="background-color: #454D5C;">بستن فرم</button>
|
||||
<button id="btnPrint" type="button" class="btn btn-success btn-rounded waves-effect waves-light">پرینت</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -85,21 +85,63 @@
|
||||
<td style="font-size: 10px;font-weight: bold;">فیش حقوقی: سال @Model.Year</td>
|
||||
<td style="font-size: 10px;font-weight: bold;">ماه @Model.Month</td>
|
||||
<td style="font-size: 10px;font-weight: bold;">
|
||||
@* @if (Model.ShiftStatus == WorkshopShiftStatus.Irregular)
|
||||
@if (Model.ShiftStatus == WorkshopShiftStatus.Irregular)
|
||||
{
|
||||
<div style="display: flex;align-items: center;gap: 6px;">
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;text-align: center;padding: 2px 0;border-radius: 5px;width: 66.666667%;">12 ساعت کار 24 ساعت استراحت</div>
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;text-align: center;padding: 2px 0;border-radius: 5px;width: 33.333333%;">17:00 الی 00:30</div>
|
||||
</div>
|
||||
string type = Model.IrregularShift.WorkshopIrregularShifts switch
|
||||
{
|
||||
WorkshopIrregularShifts.TwelveTwentyFour => "12 ساعت کار 24 ساعت استراحت",
|
||||
WorkshopIrregularShifts.TwelveThirtySix => "12 ساعت کار 24 ساعت استراحت",
|
||||
WorkshopIrregularShifts.TwentyFourFortyEight => "24 ساعت کار 48 ساعت استراحت",
|
||||
WorkshopIrregularShifts.TwentyFourTwentyFour => "24 ساعت کار 24 ساعت استراحت",
|
||||
_ => ""
|
||||
};
|
||||
string time = $"{Model.IrregularShift.StartTime:HH:mm} الی {Model.IrregularShift.EndTime:HH:mm}";
|
||||
<div style="display: flex;align-items: center;gap: 6px;">
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;text-align: center;padding: 2px 0;border-radius: 5px;width: 66.666667%;">@type</div>
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;text-align: center;padding: 2px 0;border-radius: 5px;width: 33.333333%;">@time</div>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div style="display: flex;align-items: center;gap: 6px;">
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;width: 100%;text-align: center;padding: 2px 0;border-radius: 5px;">09:00 الی 17:00</div>
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;width: 100%;text-align: center;padding: 2px 0;border-radius: 5px;">17:00 الی 00:30</div>
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;width: 100%;text-align: center;padding: 2px 0;border-radius: 5px;">-</div>
|
||||
</div>
|
||||
} *@
|
||||
<div style="display: flex;align-items: center;gap: 6px;">
|
||||
@if (Model.ShiftStatus == WorkshopShiftStatus.Regular)
|
||||
{
|
||||
@for (int i = 0; i < 3; i++)
|
||||
{
|
||||
if (i >= 0 && i < Model.RegularShift.Count)
|
||||
{
|
||||
string time = $"{Model.RegularShift[i].StartTime:HH:mm} الی {Model.RegularShift[i].EndTime:HH:mm}";
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;width: 100%;text-align: center;padding: 2px 0;border-radius: 5px;">@time</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;width: 100%;text-align: center;padding: 2px 0;border-radius: 5px;">-</div>
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else if (Model.ShiftStatus == WorkshopShiftStatus.Rotating)
|
||||
{
|
||||
@for (int i = 0; i < 3; i++)
|
||||
{
|
||||
if (i >= 0 && i < Model.CustomizeRotatingShifts.Count)
|
||||
{
|
||||
string time = $"{Model.CustomizeRotatingShifts[i].StartTime:HH:mm} الی {Model.CustomizeRotatingShifts[i].EndTime:HH:mm}";
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;width: 100%;text-align: center;padding: 2px 0;border-radius: 5px;">@time</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;width: 100%;text-align: center;padding: 2px 0;border-radius: 5px;">-</div>
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@* <div style="background-color: #ffffff;border: 1px solid #E1E1E1;width: 100%;text-align: center;padding: 2px 0;border-radius: 5px;">17:00 الی 00:30</div>
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;width: 100%;text-align: center;padding: 2px 0;border-radius: 5px;">-</div> *@
|
||||
</div>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -84,21 +84,63 @@
|
||||
<td style="font-size: 10px;font-weight: bold;">فیش حقوقی: سال @Model.Year</td>
|
||||
<td style="font-size: 10px;font-weight: bold;">ماه @Model.Month</td>
|
||||
<td style="font-size: 10px;font-weight: bold;">
|
||||
@* @if (Model.ShiftStatus == WorkshopShiftStatus.Irregular)
|
||||
@if (Model.ShiftStatus == WorkshopShiftStatus.Irregular)
|
||||
{
|
||||
<div style="display: flex;align-items: center;gap: 6px;">
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;text-align: center;padding: 2px 0;border-radius: 5px;width: 66.666667%;">12 ساعت کار 24 ساعت استراحت</div>
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;text-align: center;padding: 2px 0;border-radius: 5px;width: 33.333333%;">17:00 الی 00:30</div>
|
||||
</div>
|
||||
string type = Model.IrregularShift.WorkshopIrregularShifts switch
|
||||
{
|
||||
WorkshopIrregularShifts.TwelveTwentyFour => "12 ساعت کار 24 ساعت استراحت",
|
||||
WorkshopIrregularShifts.TwelveThirtySix => "12 ساعت کار 24 ساعت استراحت",
|
||||
WorkshopIrregularShifts.TwentyFourFortyEight => "24 ساعت کار 48 ساعت استراحت",
|
||||
WorkshopIrregularShifts.TwentyFourTwentyFour => "24 ساعت کار 24 ساعت استراحت",
|
||||
_ => ""
|
||||
};
|
||||
string time = $"{Model.IrregularShift.StartTime:HH:mm} الی {Model.IrregularShift.EndTime:HH:mm}";
|
||||
<div style="display: flex;align-items: center;gap: 6px;">
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;text-align: center;padding: 2px 0;border-radius: 5px;width: 66.666667%;">@type</div>
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;text-align: center;padding: 2px 0;border-radius: 5px;width: 33.333333%;">@time</div>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div style="display: flex;align-items: center;gap: 6px;">
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;width: 100%;text-align: center;padding: 2px 0;border-radius: 5px;">09:00 الی 17:00</div>
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;width: 100%;text-align: center;padding: 2px 0;border-radius: 5px;">17:00 الی 00:30</div>
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;width: 100%;text-align: center;padding: 2px 0;border-radius: 5px;">-</div>
|
||||
</div>
|
||||
} *@
|
||||
<div style="display: flex;align-items: center;gap: 6px;">
|
||||
@if (Model.ShiftStatus == WorkshopShiftStatus.Regular)
|
||||
{
|
||||
@for (int i = 0; i < 3; i++)
|
||||
{
|
||||
if (i >= 0 && i < Model.RegularShift.Count)
|
||||
{
|
||||
string time = $"{Model.RegularShift[i].StartTime:HH:mm} الی {Model.RegularShift[i].EndTime:HH:mm}";
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;width: 100%;text-align: center;padding: 2px 0;border-radius: 5px;">@time</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;width: 100%;text-align: center;padding: 2px 0;border-radius: 5px;">-</div>
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else if (Model.ShiftStatus == WorkshopShiftStatus.Rotating)
|
||||
{
|
||||
@for (int i = 0; i < 3; i++)
|
||||
{
|
||||
if (i >= 0 && i < Model.CustomizeRotatingShifts.Count)
|
||||
{
|
||||
string time = $"{Model.CustomizeRotatingShifts[i].StartTime:HH:mm} الی {Model.CustomizeRotatingShifts[i].EndTime:HH:mm}";
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;width: 100%;text-align: center;padding: 2px 0;border-radius: 5px;">@time</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;width: 100%;text-align: center;padding: 2px 0;border-radius: 5px;">-</div>
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@* <div style="background-color: #ffffff;border: 1px solid #E1E1E1;width: 100%;text-align: center;padding: 2px 0;border-radius: 5px;">17:00 الی 00:30</div>
|
||||
<div style="background-color: #ffffff;border: 1px solid #E1E1E1;width: 100%;text-align: center;padding: 2px 0;border-radius: 5px;">-</div> *@
|
||||
</div>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user