Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -185,7 +185,7 @@ public class CreateOrEditCheckoutCommandHandler : IBaseCommandHandler<CreateOrEd
|
||||
var endMonth = Convert.ToInt32(endDate.Substring(5, 2));
|
||||
var endDay = Convert.ToInt32(endDate.Substring(8, 2));
|
||||
var persianEnd = new PersianDateTime(endYear, endMonth, endDay);
|
||||
var holidays = await _holidayQueryService.GetHolidaysInDates(start, end) ;
|
||||
var holidays = await _holidayQueryService.GetHolidaysInDates(start, end);
|
||||
int mandatoryHours = 0;
|
||||
for (var currentDay = persianStart; currentDay <= persianEnd; currentDay = currentDay.AddDays(1))
|
||||
{
|
||||
@@ -205,13 +205,9 @@ public class CreateOrEditCheckoutCommandHandler : IBaseCommandHandler<CreateOrEd
|
||||
Console.WriteLine((int)getDaySetting.ShiftDuration.TotalMinutes + " " + currentDay + " - " + day);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
//حقوق نهایی
|
||||
var monthlySalaryPay = (totalHoursWorked * monthlySalaryDefined) / mandatoryHours;
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
using GozareshgirProgramManager.Domain._Common;
|
||||
using GozareshgirProgramManager.Domain.HolidayItemAgg;
|
||||
|
||||
namespace GozareshgirProgramManager.Domain.HolidayAgg;
|
||||
|
||||
public class Holiday : EntityBase<long>
|
||||
{
|
||||
public Holiday(string year)
|
||||
{
|
||||
Year = year;
|
||||
|
||||
}
|
||||
|
||||
public string Year { get; private set; }
|
||||
public List<HolidayItem> HolidayItems { get; set; }
|
||||
|
||||
public Holiday()
|
||||
{
|
||||
HolidayItems = new List<HolidayItem>();
|
||||
}
|
||||
public void Edit(string year)
|
||||
{
|
||||
Year = year;
|
||||
}
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
using GozareshgirProgramManager.Domain._Common;
|
||||
using GozareshgirProgramManager.Domain.HolidayAgg;
|
||||
|
||||
namespace GozareshgirProgramManager.Domain.HolidayItemAgg;
|
||||
|
||||
public class HolidayItem : EntityBase<long>
|
||||
{
|
||||
public HolidayItem(DateTime holidaydate, long holidayId, string holidayYear)
|
||||
{
|
||||
Holidaydate = holidaydate;
|
||||
HolidayId = holidayId;
|
||||
HolidayYear = holidayYear;
|
||||
}
|
||||
|
||||
public DateTime Holidaydate { get; private set; }
|
||||
public long HolidayId { get; private set; }
|
||||
public string HolidayYear { get; private set; }
|
||||
|
||||
public Holiday Holidayss { get; set; }
|
||||
|
||||
public void Edit(DateTime holidaydate, long holidayId, string holidayYear)
|
||||
{
|
||||
Holidaydate = holidaydate;
|
||||
HolidayId = holidayId;
|
||||
HolidayYear = holidayYear;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
using GozareshgirProgramManager.Domain.HolidayItemAgg;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
namespace GozareshgirProgramManager.Infrastructure.Persistence.Mappings;
|
||||
|
||||
public class HolidayItemMapping : IEntityTypeConfiguration<HolidayItem>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<HolidayItem> builder)
|
||||
{
|
||||
builder.ToTable("Holidayitems");
|
||||
builder.HasKey(x => x.Id);
|
||||
|
||||
builder.Property(x => x.HolidayYear).HasMaxLength(4);
|
||||
|
||||
builder.HasOne(x => x.Holidayss)
|
||||
.WithMany(x => x.HolidayItems)
|
||||
.HasForeignKey(x => x.HolidayId);
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
using GozareshgirProgramManager.Domain.HolidayAgg;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
namespace GozareshgirProgramManager.Infrastructure.Persistence.Mappings;
|
||||
|
||||
public class HolidayMapping : IEntityTypeConfiguration<Holiday>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<Holiday> builder)
|
||||
{
|
||||
builder.ToTable("Holidays");
|
||||
builder.HasKey(x => x.Id);
|
||||
|
||||
builder.Property(x => x.Year).HasMaxLength(4);
|
||||
|
||||
builder.HasMany(x => x.HolidayItems)
|
||||
.WithOne(x => x.Holidayss)
|
||||
.HasForeignKey(x => x.HolidayId);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user