InteractionModal umstellen

This commit is contained in:
Andre Beging
2025-03-28 19:22:51 +01:00
parent d754da76cd
commit 91bff3c127
8 changed files with 205 additions and 235 deletions

View File

@@ -1,61 +1,37 @@
@using FoodsharingSiegen.Contracts.Entity
@inherits FsBase
@inherits FsBase
@if (ShowNotNeeded)
{
<div class="row">
<div class="col">
<Field>
<Switch TValue="bool" @bind-Checked="Interaction.NotNeeded">Nicht benötigt</Switch>
</Field>
</div>
<div class="col">
<Field>
<Switch TValue="bool" @bind-Checked="Interaction.Alert">Achtung!</Switch>
</Field>
</div>
</div>
}
<Modal @ref="ModalReference">
<ModalContent Centered Size="ModalSize.Default">
<ModalHeader>
<h6>@_header</h6>
<CloseButton/>
</ModalHeader>
<ModalBody>
@if (_showNotNeeded)
{
<div class="row">
<div class="col">
<Field>
<Switch TValue="bool" @bind-Checked="Interaction.NotNeeded">Nicht benötigt</Switch>
</Field>
</div>
<div class="col">
<Field>
<Switch TValue="bool" @bind-Checked="Interaction.Alert">Achtung!</Switch>
</Field>
</div>
</div>
}
<div class="row">
<div class="col">
<Field>
<FieldLabel>Wann?</FieldLabel>
<DatePicker TValue="DateTime" @bind-Date="Interaction.Date" ElementId="aim-datepicker" Max="DateTime.UtcNow.AddDays(7)" DisplayFormat="dd.MM.yyyy"/>
</Field>
</div>
</div>
<div class="row">
@* <div class="col"> *@
@* <Field> *@
@* <FieldLabel>Wer?</FieldLabel> *@
@* <Select TValue="Guid" @bind-SelectedValue="SelectedUser"> *@
@* @foreach (var user in Users ?? []) *@
@* { *@
@* <SelectItem Value="@user.Id">@user.Name</SelectItem> *@
@* } *@
@* </Select> *@
@* </Field> *@
@* </div> *@
<div class="col">
<Field>
<FieldLabel>Wann?</FieldLabel>
<DatePicker TValue="DateTime" @bind-Date="Interaction.Date" ElementId="aim-datepicker" Max="DateTime.UtcNow.AddDays(7)" DisplayFormat="dd.MM.yyyy" />
</Field>
</div>
</div>
@if (ShowInfo)
{
<Field>
<FieldLabel>@InfoName</FieldLabel>
<TextEdit @bind-Text="Interaction.Info"></TextEdit>
</Field>
}
@if (_showInfo)
{
<Field>
<FieldLabel>@_infoName</FieldLabel>
<TextEdit @bind-Text="Interaction.Info"></TextEdit>
</Field>
}
</ModalBody>
<ModalFooter>
<Button Color="Color.Secondary" Clicked="ModalReference.Hide">Abbrechen</Button>
<Button Color="Color.Primary" Clicked="@AddInteraction">OK</Button>
</ModalFooter>
</ModalContent>
</Modal>
<Button Color="Color.Secondary" Clicked="@ModalService.Hide">Abbrechen</Button>
<Button Color="Color.Primary" Clicked="@AddInteractionAsync">OK</Button>