Fix apertura fotocamera e fix codJcom interno
This commit is contained in:
@@ -10,17 +10,17 @@
|
||||
|
||||
.activity-card.memo {
|
||||
border-left: 5px solid var(--mud-palette-info-darken);
|
||||
background-color: hsl(from var(--mud-palette-info-darken) h s 98%);
|
||||
background-color: hsl(from var(--mud-palette-info-darken) h s 99%);
|
||||
}
|
||||
|
||||
.activity-card.interna {
|
||||
border-left: 5px solid var(--mud-palette-success-darken);
|
||||
background-color: hsl(from var(--mud-palette-success-darken) h s 98%);
|
||||
background-color: hsl(from var(--mud-palette-success-darken) h s 99%);
|
||||
}
|
||||
|
||||
.activity-card.commessa {
|
||||
border-left: 5px solid var(--mud-palette-warning);
|
||||
background-color: hsl(from var(--mud-palette-warning) h s 98%);
|
||||
background-color: hsl(from var(--mud-palette-warning) h s 99%);
|
||||
}
|
||||
|
||||
.activity-left-section {
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -72,8 +72,15 @@ public class IntegryApiService(IIntegryApiRestClient integryApiRestClient, IUser
|
||||
return integryApiRestClient.AuthorizedGet<object>($"activity/delete", queryParams);
|
||||
}
|
||||
|
||||
public Task<List<StbActivity>?> SaveActivity(ActivityDTO activity) =>
|
||||
integryApiRestClient.AuthorizedPost<List<StbActivity>?>("crm/saveActivity", activity);
|
||||
public Task<List<StbActivity>?> SaveActivity(ActivityDTO activity)
|
||||
{
|
||||
if (activity.CodJcom is null && userSession.ProfileDb != null && userSession.ProfileDb.Equals("smetar", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
activity.CodJcom = "0000";
|
||||
}
|
||||
|
||||
return integryApiRestClient.AuthorizedPost<List<StbActivity>?>("crm/saveActivity", activity);
|
||||
}
|
||||
|
||||
public Task<CRMCreateContactResponseDTO?> SaveContact(CRMCreateContactRequestDTO request) =>
|
||||
integryApiRestClient.AuthorizedPost<CRMCreateContactResponseDTO>("crm/createContact", request);
|
||||
|
||||
Reference in New Issue
Block a user