Fix e migliorati caricamenti
This commit is contained in:
@@ -41,7 +41,7 @@
|
||||
|
||||
<MudAutocomplete
|
||||
Disabled="ActivityModel.Cliente.IsNullOrEmpty()"
|
||||
T="JtbComt?"
|
||||
T="JtbComt?" ReadOnly="IsView"
|
||||
@bind-Value="SelectedComessa"
|
||||
@bind-Value:after="OnCommessaSelectedAfter"
|
||||
SearchFunc="SearchCommesseAsync"
|
||||
@@ -89,8 +89,9 @@
|
||||
<div class="input-card">
|
||||
<div class="form-container">
|
||||
<span class="disable-full-width">Assegnata a</span>
|
||||
|
||||
<MudAutocomplete
|
||||
Disabled="Users.IsNullOrEmpty()"
|
||||
Disabled="Users.IsNullOrEmpty()" ReadOnly="IsView"
|
||||
T="StbUser"
|
||||
@bind-Value="SelectedUser"
|
||||
@bind-Value:after="OnUserSelectedAfter"
|
||||
@@ -166,41 +167,44 @@
|
||||
}
|
||||
</div>
|
||||
|
||||
<div class="container-button">
|
||||
<MudButton Class="button-settings green-icon"
|
||||
FullWidth="true"
|
||||
StartIcon="@Icons.Material.Rounded.AttachFile"
|
||||
Size="Size.Medium"
|
||||
OnClick="OpenAddAttached"
|
||||
Variant="Variant.Outlined">
|
||||
Aggiungi allegati
|
||||
</MudButton>
|
||||
|
||||
@if (!IsNew)
|
||||
{
|
||||
<div class="divider"></div>
|
||||
|
||||
<MudButton Class="button-settings gray-icon"
|
||||
@if (!IsView)
|
||||
{
|
||||
<div class="container-button">
|
||||
<MudButton Class="button-settings green-icon"
|
||||
FullWidth="true"
|
||||
StartIcon="@Icons.Material.Filled.ContentCopy"
|
||||
StartIcon="@Icons.Material.Rounded.AttachFile"
|
||||
Size="Size.Medium"
|
||||
OnClick="Duplica"
|
||||
OnClick="OpenAddAttached"
|
||||
Variant="Variant.Outlined">
|
||||
Duplica
|
||||
Aggiungi allegati
|
||||
</MudButton>
|
||||
|
||||
<div class="divider"></div>
|
||||
@if (!IsNew)
|
||||
{
|
||||
<div class="divider"></div>
|
||||
|
||||
<MudButton Class="button-settings red-icon"
|
||||
FullWidth="true"
|
||||
StartIcon="@Icons.Material.Outlined.Delete"
|
||||
Size="Size.Medium"
|
||||
OnClick="DeleteActivity"
|
||||
Variant="Variant.Outlined">
|
||||
Elimina
|
||||
</MudButton>
|
||||
}
|
||||
</div>
|
||||
<MudButton Class="button-settings gray-icon"
|
||||
FullWidth="true"
|
||||
StartIcon="@Icons.Material.Filled.ContentCopy"
|
||||
Size="Size.Medium"
|
||||
OnClick="Duplica"
|
||||
Variant="Variant.Outlined">
|
||||
Duplica
|
||||
</MudButton>
|
||||
|
||||
<div class="divider"></div>
|
||||
|
||||
<MudButton Class="button-settings red-icon"
|
||||
FullWidth="true"
|
||||
StartIcon="@Icons.Material.Outlined.Delete"
|
||||
Size="Size.Medium"
|
||||
OnClick="DeleteActivity"
|
||||
Variant="Variant.Outlined">
|
||||
Elimina
|
||||
</MudButton>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
<MudMessageBox @ref="ConfirmDelete" Class="c-messageBox" Title="Attenzione!" CancelText="Annulla">
|
||||
@@ -400,6 +404,8 @@
|
||||
if (!ActivityModel.UserName.IsNullOrEmpty())
|
||||
SelectedUser = Users.FindLast(x => x.UserName.Equals(ActivityModel.UserName));
|
||||
|
||||
SelectedComessa = ActivityModel.Commessa;
|
||||
|
||||
ActivityResult = await ManageData.GetTable<StbActivityResult>();
|
||||
Clienti = await ManageData.GetClienti(new WhereCondContact { FlagStato = "A" });
|
||||
Pros = await ManageData.GetProspect();
|
||||
@@ -513,7 +519,7 @@
|
||||
if (com != null)
|
||||
{
|
||||
ActivityModel.CodJcom = com.CodJcom;
|
||||
ActivityModel.Commessa = com.Descrizione;
|
||||
ActivityModel.Commessa = com;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -568,6 +574,8 @@
|
||||
|
||||
private void OpenSelectEsito()
|
||||
{
|
||||
if (IsView) return;
|
||||
|
||||
if (!IsNew && (ActivityModel.UserName is null || !ActivityModel.UserName.Equals(UserSession.User.Username)))
|
||||
{
|
||||
Snackbar.Add("Non puoi inserire un esito per un'attività che non ti è stata assegnata.", Severity.Info);
|
||||
|
||||
Reference in New Issue
Block a user