Autoselect interaction creator
This commit is contained in:
@@ -21,7 +21,7 @@ namespace FoodsharingSiegen.Server.Controls
|
|||||||
|
|
||||||
private async Task AddInteraction(InteractionType type)
|
private async Task AddInteraction(InteractionType type)
|
||||||
{
|
{
|
||||||
await InteractionModal.Show(type, Prospect?.Id);
|
await InteractionModal.ShowAsync(type, Prospect?.Id);
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<Interaction> GetTyped(InteractionType type)
|
private List<Interaction> GetTyped(InteractionType type)
|
||||||
|
|||||||
@@ -24,21 +24,21 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col">
|
@* <div class="col"> *@
|
||||||
<Field>
|
@* <Field> *@
|
||||||
<FieldLabel>Wer?</FieldLabel>
|
@* <FieldLabel>Wer?</FieldLabel> *@
|
||||||
<Select TValue="Guid" @bind-SelectedValue="SelectedUser">
|
@* <Select TValue="Guid" @bind-SelectedValue="SelectedUser"> *@
|
||||||
@foreach (var user in Users ?? new List<User>())
|
@* @foreach (var user in Users ?? new List<User>()) *@
|
||||||
{
|
@* { *@
|
||||||
<SelectItem Value="@user.Id">@user.Name</SelectItem>
|
@* <SelectItem Value="@user.Id">@user.Name</SelectItem> *@
|
||||||
}
|
@* } *@
|
||||||
</Select>
|
@* </Select> *@
|
||||||
</Field>
|
@* </Field> *@
|
||||||
</div>
|
@* </div> *@
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>Wann?</FieldLabel>
|
<FieldLabel>Wann?</FieldLabel>
|
||||||
<DatePicker TValue="DateTime" @bind-Date="Interaction.Date" ElementId="aim-datepicker" Max="DateTime.UtcNow.AddDays(7)"/>
|
<DatePicker TValue="DateTime" @bind-Date="Interaction.Date" ElementId="aim-datepicker" Max="DateTime.UtcNow.AddDays(7)" DisplayFormat="dd.MM.yyyy" />
|
||||||
</Field>
|
</Field>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ namespace FoodsharingSiegen.Server.Dialogs
|
|||||||
await base.OnParametersSetAsync();
|
await base.OnParametersSetAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task Show(InteractionType type, Guid? prospectId)
|
public async Task ShowAsync(InteractionType type, Guid? prospectId)
|
||||||
{
|
{
|
||||||
if (prospectId == null) return;
|
if (prospectId == null) return;
|
||||||
_showInfo = false;
|
_showInfo = false;
|
||||||
|
|||||||
@@ -112,6 +112,7 @@ namespace FoodsharingSiegen.Server.Pages
|
|||||||
/// <param name="arg">The arg</param>
|
/// <param name="arg">The arg</param>
|
||||||
private async Task OnAddInteraction(Interaction arg)
|
private async Task OnAddInteraction(Interaction arg)
|
||||||
{
|
{
|
||||||
|
arg.UserID = CurrentUser.Id;
|
||||||
await ProspectService.AddInteraction(arg);
|
await ProspectService.AddInteraction(arg);
|
||||||
await LoadProspects();
|
await LoadProspects();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -110,6 +110,7 @@ namespace FoodsharingSiegen.Server.Pages
|
|||||||
/// <param name="arg">The arg</param>
|
/// <param name="arg">The arg</param>
|
||||||
private async Task OnAddInteraction(Interaction arg)
|
private async Task OnAddInteraction(Interaction arg)
|
||||||
{
|
{
|
||||||
|
arg.UserID = CurrentUser.Id;
|
||||||
await ProspectService.AddInteraction(arg);
|
await ProspectService.AddInteraction(arg);
|
||||||
await LoadProspects();
|
await LoadProspects();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user