Added signed up options for role reminder

Added option to opt out of reminders
This commit is contained in:
Sarah Faey 2022-12-09 22:26:16 +01:00
parent 64ce169094
commit c88bf5b133
18 changed files with 911 additions and 99 deletions

View file

@ -14,30 +14,24 @@
<th>Hours</th>
<th>Minutes</th>
<th>Type</th>
@{bool channelReminderExists = _raidReminders.Where(r => r.Type == RaidReminder.ReminderType.Channel).Any();
bool groupReminderExists = _raidReminders.Where(r => r.Type == RaidReminder.ReminderType.Group).Any();}
@if(channelReminderExists && groupReminderExists)
@if(_raidReminders.Where(r => r.Type == RaidReminder.ReminderType.Group).Any())
{
<th>Group</th>
<th>Server</th>
<th>Channel</th>
}
else if(channelReminderExists)
{
<th></th>
<th>Server</th>
<th>Channel</th>
}
else if(groupReminderExists)
{
<th>Group</th>
<th></th>
<th></th>
<th>Signed Up</th>
}
else
{
<th></th>
<th></th>
}
@if(_raidReminders.Where(r => r.Type == RaidReminder.ReminderType.Channel).Any())
{
<th>Server</th>
<th>Channel</th>
}
else
{
<th></th>
<th></th>
}
<th>Message</th>
@ -66,6 +60,14 @@
}
</InputSelect>
</td>
<td>
<InputSelect @bind-Value="reminder.RoleType" hidden="@groupHidden">
@foreach(RaidReminder.RoleReminderType type in Enum.GetValues(typeof(RaidReminder.RoleReminderType)))
{
<option value="@type">@type.ToString()</option>
}
</InputSelect>
</td>
<td>
<InputSelect @bind-Value="reminder.DiscordServerId" hidden="@discordHidden">
@foreach(DiscordServer item in _discordServers)

View file

@ -13,30 +13,24 @@
<th>Date</th>
<th>Time</th>
<th>Type</th>
@{bool channelReminderExists = _raidReminders.Where(r => r.Type == RaidReminder.ReminderType.Channel).Any();
bool groupReminderExists = _raidReminders.Where(r => r.Type == RaidReminder.ReminderType.Group).Any();}
@if(channelReminderExists && groupReminderExists)
@if(_raidReminders.Where(r => r.Type == RaidReminder.ReminderType.Group).Any())
{
<th>Group</th>
<th>Server</th>
<th>Channel</th>
}
else if(channelReminderExists)
{
<th></th>
<th>Server</th>
<th>Channel</th>
}
else if(groupReminderExists)
{
<th>Group</th>
<th></th>
<th></th>
<th>Signed Up</th>
}
else
{
<th></th>
<th></th>
}
@if(_raidReminders.Where(r => r.Type == RaidReminder.ReminderType.Channel).Any())
{
<th>Server</th>
<th>Channel</th>
}
else
{
<th></th>
<th></th>
}
<th>Message</th>
@ -73,6 +67,14 @@
}
</InputSelect>
</td>
<td>
<InputSelect @bind-Value="reminder.RoleType" hidden="@groupHidden">
@foreach(RaidReminder.RoleReminderType type in Enum.GetValues(typeof(RaidReminder.RoleReminderType)))
{
<option value="@type">@type.ToString()</option>
}
</InputSelect>
</td>
<td>
<InputSelect @bind-Value="reminder.DiscordServerId" hidden="@discordHidden">
@foreach(DiscordServer item in _discordServers)

View file

@ -26,6 +26,9 @@
<p>
<input type="checkbox" @bind="_user.AlwaysSignUpWithMainAccount" /> Always sign up with main account
</p>
<p>
<input type="checkbox" @bind="_user.ReminderSubscription" /> Get Raid Reminders
</p>
@*<p>
<label>
Pronouns: