Fix apertura fotocamera e fix codJcom interno

This commit is contained in:
2025-10-01 12:35:34 +02:00
parent 7359310c48
commit 36fe05e3c3
6 changed files with 94 additions and 26 deletions

View File

@@ -6,7 +6,7 @@
<MudDialog Class="customDialog-form disable-safe-area">
<DialogContent>
<HeaderLayout ShowProfile="false" SmallHeader="true" Cancel="true" OnCancel="() => MudDialog.Cancel()" Title="Aggiungi allegati"/>
<HeaderLayout ShowProfile="false" SmallHeader="true" Cancel="true" OnCancel="() => MudDialog.Cancel()" Title="@TitleModal"/>
@if (RequireNewName)
{
@@ -71,9 +71,21 @@
private AttachedDTO? Attached { get; set; }
private bool RequireNewName { get; set; }
private bool _requireNewName;
private bool RequireNewName
{
get => _requireNewName;
set
{
_requireNewName = value;
TitleModal = _requireNewName ? "Nome allegato" : "Aggiungi allegati";
StateHasChanged();
}
}
private bool SelectTypePicture { get; set; }
private string TitleModal { get; set; } = "Aggiungi allegati";
private string? _newName;
private string? NewName
{
@@ -102,16 +114,22 @@
{
Attached = await AttachedService.SelectImageFromCamera();
RequireNewName = true;
StateHasChanged();
if (Attached != null)
{
RequireNewName = true;
StateHasChanged();
}
}
private async Task OnGallery()
{
Attached = await AttachedService.SelectImageFromGallery();
RequireNewName = true;
StateHasChanged();
if (Attached != null)
{
RequireNewName = true;
StateHasChanged();
}
}
private async Task OnFile()
@@ -124,8 +142,11 @@
{
Attached = await AttachedService.SelectPosition();
RequireNewName = true;
StateHasChanged();
if (Attached != null)
{
RequireNewName = true;
StateHasChanged();
}
}
private void OnNewName()