Moved the applying of selected permissions to the correct place in the role dialogs
This commit was merged in pull request #7.
This commit is contained in:
@@ -18,7 +18,7 @@
|
|||||||
</DialogDescription>
|
</DialogDescription>
|
||||||
</DialogHeader>
|
</DialogHeader>
|
||||||
|
|
||||||
<FormHandler @ref="FormHandler" Model="Request" OnValidSubmit="SubmitAsync">
|
<FormHandler @ref="FormHandler" Model="Request" OnValidSubmit="OnSubmitAsync">
|
||||||
<div class="flex flex-col gap-6">
|
<div class="flex flex-col gap-6">
|
||||||
|
|
||||||
<FormValidationSummary/>
|
<FormValidationSummary/>
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
</FormHandler>
|
</FormHandler>
|
||||||
|
|
||||||
<DialogFooter ClassName="justify-end gap-x-1">
|
<DialogFooter ClassName="justify-end gap-x-1">
|
||||||
<WButtom OnClick="_ => FormHandler.SubmitAsync()">Save changes</WButtom>
|
<WButtom OnClick="SubmitAsync">Save changes</WButtom>
|
||||||
</DialogFooter>
|
</DialogFooter>
|
||||||
|
|
||||||
@code
|
@code
|
||||||
@@ -75,9 +75,12 @@
|
|||||||
private async Task SubmitAsync()
|
private async Task SubmitAsync()
|
||||||
{
|
{
|
||||||
Request.Permissions = Permissions.ToArray();
|
Request.Permissions = Permissions.ToArray();
|
||||||
|
await FormHandler.SubmitAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task OnSubmitAsync()
|
||||||
|
{
|
||||||
await OnSubmit.Invoke(Request);
|
await OnSubmit.Invoke(Request);
|
||||||
|
|
||||||
await CloseAsync();
|
await CloseAsync();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
</DialogDescription>
|
</DialogDescription>
|
||||||
</DialogHeader>
|
</DialogHeader>
|
||||||
|
|
||||||
<FormHandler @ref="FormHandler" Model="Request" OnValidSubmit="SubmitAsync">
|
<FormHandler @ref="FormHandler" Model="Request" OnValidSubmit="OnSubmitAsync">
|
||||||
<div class="flex flex-col gap-6">
|
<div class="flex flex-col gap-6">
|
||||||
|
|
||||||
<FormValidationSummary/>
|
<FormValidationSummary/>
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
</FormHandler>
|
</FormHandler>
|
||||||
|
|
||||||
<DialogFooter ClassName="justify-end gap-x-1">
|
<DialogFooter ClassName="justify-end gap-x-1">
|
||||||
<WButtom OnClick="_ => FormHandler.SubmitAsync()">Save changes</WButtom>
|
<WButtom OnClick="SubmitAsync">Save changes</WButtom>
|
||||||
</DialogFooter>
|
</DialogFooter>
|
||||||
|
|
||||||
@code
|
@code
|
||||||
@@ -74,9 +74,12 @@
|
|||||||
private async Task SubmitAsync()
|
private async Task SubmitAsync()
|
||||||
{
|
{
|
||||||
Request.Permissions = Permissions.ToArray();
|
Request.Permissions = Permissions.ToArray();
|
||||||
|
await FormHandler.SubmitAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task OnSubmitAsync()
|
||||||
|
{
|
||||||
await OnSubmit.Invoke(Request);
|
await OnSubmit.Invoke(Request);
|
||||||
|
|
||||||
await CloseAsync();
|
await CloseAsync();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user