Update calendario
This commit is contained in:
@@ -56,9 +56,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body bg-body text-dark p-1">
|
||||
<CalendarContainer DisplayedView="@ModoDisplay" TasksList="TasksList.ToArray()" FirstDate="@firstDate" Draggable="true">
|
||||
<AnnualView Months="@MonthDispl" />
|
||||
<MonthlyView />
|
||||
<CalendarContainer DisplayedView="@ModoDisplay" TasksList="TasksList.ToArray()" FirstDate="@firstDate" Draggable="false">
|
||||
<AnnualView Months="@MonthDispl" TaskClick="SetWeek" EmptyDayClick="SetWeek" />
|
||||
<MonthlyView TaskClick="SetWeek" DayClick="SetWeek" />
|
||||
<WeekView TaskClick="ResetCal" EmptyDayClick="ResetCal" DayClick="ResetCal" />
|
||||
</CalendarContainer>
|
||||
</div>
|
||||
</div>
|
||||
@@ -119,8 +119,13 @@ namespace GPW.CORE.WRKLOG.Components.Compo
|
||||
private async Task evToggled(SelectGlobalToggle newTogData)
|
||||
{
|
||||
ToggleData = newTogData;
|
||||
ModoDisplay = ToggleData.isActive ? DisplayedView.Annual : DisplayedView.Monthly;
|
||||
FixCalendar();
|
||||
await Task.Delay(1);
|
||||
}
|
||||
|
||||
private void FixCalendar()
|
||||
{
|
||||
ModoDisplay = ToggleData.isActive ? DisplayedView.Annual : DisplayedView.Monthly;
|
||||
// se annuale --> riporto firstDate
|
||||
if (ModoDisplay == DisplayedView.Annual)
|
||||
{
|
||||
@@ -128,6 +133,22 @@ namespace GPW.CORE.WRKLOG.Components.Compo
|
||||
}
|
||||
}
|
||||
|
||||
protected void SetWeek(ClickTaskParameter taskVal)
|
||||
{
|
||||
firstDate = taskVal.Day;
|
||||
ModoDisplay = DisplayedView.Weekly;
|
||||
}
|
||||
protected void SetWeek(ClickEmptyDayParameter taskVal)
|
||||
{
|
||||
firstDate = taskVal.Day;
|
||||
ModoDisplay = DisplayedView.Weekly;
|
||||
}
|
||||
|
||||
protected void ResetCal()
|
||||
{
|
||||
FixCalendar();
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -198,9 +198,9 @@ namespace GPW.CORE.WRKLOG.Components.Pages
|
||||
{
|
||||
DateStart = x.DtStart,
|
||||
DateEnd = x.DtEnd,
|
||||
Caption = x.DipNav.Abbrev,
|
||||
Comment = x.CodGiust == "PERM" ? $"{x.DipNav.Abbrev} {x.DtStart:HH:mm}--> {x.DtEnd:HH:mm}" : x.DipNav.Abbrev,
|
||||
Code = x.CodGiust,
|
||||
Caption = x.CodGiust == "PERM" ? $"{x.CodGiust} | {x.DipNav.Abbrev} | {x.DtStart:HH:mm}--> {x.DtEnd:HH:mm}" : $"{x.CodGiust} | {x.DipNav.Abbrev} | {x.DtStart:yyyy/MM/dd} -> {x.DtEnd:yyyy/MM/dd}",//x.DipNav.Abbrev,
|
||||
Comment = x.CodGiust == "PERM" ? $"{x.CodGiust} | {x.DipNav.Abbrev} | {x.DtStart:HH:mm}--> {x.DtEnd:HH:mm}" : $"{x.CodGiust} | {x.DipNav.Abbrev} | {x.DtStart:yyyy/MM/dd} -> {x.DtEnd:yyyy/MM/dd}",
|
||||
Code = x.CodGiust, //$"{x.CodGiust} | {x.DipNav.Abbrev}",
|
||||
Color = colorByGiustStato(x.CodGiust, x.Conf),
|
||||
ForeColor = colorTextByGiustStato(x.CodGiust, x.Conf),
|
||||
NotBeDraggable = x.IdxDipendente != idxDipendente
|
||||
@@ -216,9 +216,10 @@ namespace GPW.CORE.WRKLOG.Components.Pages
|
||||
{
|
||||
DateStart = x.DtInizio,
|
||||
DateEnd = x.DtInizio.AddDays(x.NumGG - 1),
|
||||
Caption = x.DipNav.Abbrev,
|
||||
Comment = x.DipNav.Abbrev,
|
||||
Caption = $"MAL | {x.DipNav.Abbrev} {x.DtInizio:yyyy/MM/dd} -> {x.DtInizio.AddDays(x.NumGG - 1):yyyy/MM/dd}",
|
||||
Comment = $"MAL | {x.DipNav.Abbrev} {x.DtInizio:yyyy/MM/dd} -> {x.DtInizio.AddDays(x.NumGG - 1):yyyy/MM/dd}",
|
||||
Code = "MAL",
|
||||
//Code = "MAL",
|
||||
Color = colorByGiustStato("MAL", x.Conf),
|
||||
ForeColor = colorTextByGiustStato("MAL", x.Conf),
|
||||
NotBeDraggable = x.IdxDipendente != idxDipendente
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="BlazorCalendar" Version="2.5.3" />
|
||||
<PackageReference Include="BlazorCalendar" Version="2.6.8" />
|
||||
<PackageReference Include="EgwCoreLib.Razor" Version="1.5.2408.2710" />
|
||||
<PackageReference Include="EgwCoreLib.Utils" Version="1.5.2408.2710" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.Negotiate" Version="8.0.8" />
|
||||
|
||||
Reference in New Issue
Block a user