renamed Frequency to Interval

This commit is contained in:
t.ruspekhofer 2022-03-13 17:46:38 +01:00
parent 6e4dce5b1f
commit c00f987f16
4 changed files with 21 additions and 9 deletions

View file

@ -125,7 +125,7 @@ namespace Lieb.Data
EndTime = templateStartTime.AddHours(2),
FreeForAllTime = templateStartTime.AddHours(-2),
VoiceChat = "ts.lieb.games",
Frequency = 7,
Interval = 7,
CreateDaysBefore = 7,
TimeZone = "Europe/Vienna",
Roles = new[] { new PlannedRaidRole(){

View file

@ -60,7 +60,7 @@ namespace Lieb.Data
raidToChange.EndTime = template.EndTime;
raidToChange.FreeForAllTime = template.FreeForAllTime;
raidToChange.TimeZone = template.TimeZone;
raidToChange.Frequency = template.Frequency;
raidToChange.Interval = template.Interval;
raidToChange.CreateDaysBefore = template.CreateDaysBefore;
context.PlannedRaidRoles.RemoveRange(raidToChange.Roles);
@ -105,9 +105,9 @@ namespace Lieb.Data
private void MoveTemplate(RaidTemplate template)
{
template.StartTime = template.StartTime.AddDays(template.Frequency);
template.EndTime = template.EndTime.AddDays(template.Frequency);
template.FreeForAllTime = template.FreeForAllTime.AddDays(template.Frequency);
template.StartTime = template.StartTime.AddDays(template.Interval);
template.EndTime = template.EndTime.AddDays(template.Interval);
template.FreeForAllTime = template.FreeForAllTime.AddDays(template.Interval);
}
}
}

View file

@ -16,7 +16,7 @@ namespace Lieb.Models.GuildWars2.Raid
public string TimeZone { get; set; } = String.Empty;
public int Frequency { get; set; }
public int Interval { get; set; }
public int CreateDaysBefore { get; set; }
}

View file

@ -36,7 +36,7 @@
Raid Type:
<InputSelect @bind-Value="_template.RaidType" disabled="@_isEdit">
<option value="@RaidType.Planned">Planned</option>
<option value="@RaidType.RandomWithBoons">Random with boons covred</option>
<option value="@RaidType.RandomWithBoons">Random with boons covered</option>
<option value="@RaidType.RandomClasses">Random classes</option>
<option value="@RaidType.RandomEliteSpecialization">Random elite specializations</option>
</InputSelect>
@ -123,6 +123,18 @@
<InputText @bind-Value="_template.VoiceChat" />
</label>
</p>
<p>
<label>
Interval in Days:
<InputNumber @bind-Value="_template.Interval" />
</label>
</p>
<p>
<label>
Create Days Before:
<InputNumber @bind-Value="_template.CreateDaysBefore" />
</label>
</p>
@if(_template.RaidType == RaidType.Planned)
{
@ -212,7 +224,7 @@
if (confirmed)
{
await RaidTemplateService.DeleteTemplate(_template.RaidTemplateId);
NavigationManager.NavigateTo("raidoverview");
NavigationManager.NavigateTo("raidtemplateoverview");
}
}
@ -249,6 +261,6 @@
_template.FreeForAllTime = _freeForAllDate.Date + _freeForAllTime.TimeOfDay;
await RaidTemplateService.AddOrEditTemplate(_template);
NavigationManager.NavigateTo("raidoverview");
NavigationManager.NavigateTo("raidtemplateoverview");
}
}