mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-06-28 18:36:27 +00:00
Add acceptance parameter to MandatoryInfoDialog
This commit is contained in:
parent
b68c62693f
commit
0989506396
@ -3,7 +3,7 @@
|
|||||||
<MudDialog>
|
<MudDialog>
|
||||||
<DialogContent>
|
<DialogContent>
|
||||||
<div class="pt-6" style="max-height: calc(100vh - 11rem); overflow-y: auto; overflow-x: hidden; padding-right: 0.5rem;">
|
<div class="pt-6" style="max-height: calc(100vh - 11rem); overflow-y: auto; overflow-x: hidden; padding-right: 0.5rem;">
|
||||||
<MandatoryInfoDisplay Info="@this.Info" ShowAcceptanceMetadata="@true" />
|
<MandatoryInfoDisplay Info="@this.Info" Acceptance="@this.Acceptance" ShowAcceptanceMetadata="@true" />
|
||||||
</div>
|
</div>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
<DialogActions>
|
<DialogActions>
|
||||||
|
|||||||
@ -13,6 +13,9 @@ public partial class MandatoryInfoDialog : MSGComponentBase
|
|||||||
[Parameter]
|
[Parameter]
|
||||||
public DataMandatoryInfo Info { get; set; } = new();
|
public DataMandatoryInfo Info { get; set; } = new();
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public DataMandatoryInfoAcceptance? Acceptance { get; set; }
|
||||||
|
|
||||||
private void Accept() => this.MudDialog.Close(DialogResult.Ok(true));
|
private void Accept() => this.MudDialog.Close(DialogResult.Ok(true));
|
||||||
|
|
||||||
private void Reject() => this.MudDialog.Close(DialogResult.Ok(false));
|
private void Reject() => this.MudDialog.Close(DialogResult.Ok(false));
|
||||||
|
|||||||
@ -424,9 +424,11 @@ public partial class MainLayout : LayoutComponentBase, IMessageBusReceiver, ILan
|
|||||||
|
|
||||||
private async Task<bool> ShowMandatoryInfoDialog(DataMandatoryInfo info)
|
private async Task<bool> ShowMandatoryInfoDialog(DataMandatoryInfo info)
|
||||||
{
|
{
|
||||||
|
var acceptance = this.SettingsManager.ConfigurationData.MandatoryInformation.FindAcceptance(info.Id);
|
||||||
var dialogParameters = new DialogParameters<MandatoryInfoDialog>
|
var dialogParameters = new DialogParameters<MandatoryInfoDialog>
|
||||||
{
|
{
|
||||||
{ x => x.Info, info },
|
{ x => x.Info, info },
|
||||||
|
{ x => x.Acceptance, acceptance },
|
||||||
};
|
};
|
||||||
|
|
||||||
var dialogReference = await this.DialogService.ShowAsync<MandatoryInfoDialog>(info.Title, dialogParameters, DialogOptions.BLOCKING_FULLSCREEN);
|
var dialogReference = await this.DialogService.ShowAsync<MandatoryInfoDialog>(info.Title, dialogParameters, DialogOptions.BLOCKING_FULLSCREEN);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user