Fix vari
This commit is contained in:
@@ -309,19 +309,28 @@ public class ManageDataService(
|
||||
{
|
||||
return Task.Run(async () =>
|
||||
{
|
||||
if (response.AnagClie != null)
|
||||
try
|
||||
{
|
||||
await localDb.InsertOrUpdate(response.AnagClie);
|
||||
if (response.AnagClie != null)
|
||||
{
|
||||
await localDb.InsertOrUpdate(response.AnagClie);
|
||||
|
||||
if (response.VtbDest != null) await localDb.InsertOrUpdate(response.VtbDest);
|
||||
if (response.VtbCliePersRif != null) await localDb.InsertOrUpdate(response.VtbCliePersRif);
|
||||
if (response.VtbDest != null) await localDb.InsertOrUpdate(response.VtbDest);
|
||||
if (response.VtbCliePersRif != null) await localDb.InsertOrUpdate(response.VtbCliePersRif);
|
||||
}
|
||||
|
||||
if (response.PtbPros != null)
|
||||
{
|
||||
await localDb.InsertOrUpdate(response.PtbPros);
|
||||
|
||||
if (response.PtbProsRif != null) await localDb.InsertOrUpdate(response.PtbProsRif);
|
||||
}
|
||||
}
|
||||
|
||||
if (response.PtbPros != null)
|
||||
catch (Exception e)
|
||||
{
|
||||
await localDb.InsertOrUpdate(response.PtbPros);
|
||||
|
||||
if (response.PtbProsRif != null) await localDb.InsertOrUpdate(response.PtbProsRif);
|
||||
Console.WriteLine(e.Message);
|
||||
SentrySdk.CaptureException(e);
|
||||
throw;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -425,7 +425,7 @@ else
|
||||
set
|
||||
{
|
||||
_filteredActivity = value;
|
||||
StateHasChanged();
|
||||
InvokeAsync(StateHasChanged);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
@if (ActivityModel.CodJcom != null && SelectedComessa == null)
|
||||
{
|
||||
<MudSkeleton />
|
||||
<MudSkeleton/>
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -100,7 +100,7 @@
|
||||
|
||||
@if (ActivityModel.UserName != null && SelectedUser == null)
|
||||
{
|
||||
<MudSkeleton />
|
||||
<MudSkeleton/>
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -128,7 +128,7 @@
|
||||
|
||||
@if (ActivityType.IsNullOrEmpty())
|
||||
{
|
||||
<MudSkeleton />
|
||||
<MudSkeleton/>
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -400,7 +400,25 @@
|
||||
SelectedUser = Users.FindLast(x => x.UserName.Equals(ActivityModel.UserName));
|
||||
|
||||
if (!IsNew && Id != null)
|
||||
{
|
||||
ActivityFileList = await IntegryApiService.GetActivityFile(Id);
|
||||
if (ActivityModel.IdPosizione != null)
|
||||
{
|
||||
ActivityModel.Position = await IntegryApiService.RetrievePosition(ActivityModel.IdPosizione.Value);
|
||||
CanAddPosition = false;
|
||||
|
||||
AttachedList ??= [];
|
||||
AttachedList.Add(
|
||||
new AttachedDTO
|
||||
{
|
||||
Name = ActivityModel.Position.Description!,
|
||||
Lat = ActivityModel.Position.Lat,
|
||||
Lng = ActivityModel.Position.Lng,
|
||||
Type = AttachedDTO.TypeAttached.Position
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
ActivityResult = await ManageData.GetTable<StbActivityResult>();
|
||||
Clienti = await ManageData.GetClienti(new WhereCondContact { FlagStato = "A" });
|
||||
|
||||
@@ -151,28 +151,31 @@
|
||||
|
||||
private void OnNewName()
|
||||
{
|
||||
switch (Attached.Type)
|
||||
if (Attached != null)
|
||||
{
|
||||
case AttachedDTO.TypeAttached.Position:
|
||||
switch (Attached.Type)
|
||||
{
|
||||
CanAddPosition = false;
|
||||
case AttachedDTO.TypeAttached.Position:
|
||||
{
|
||||
CanAddPosition = false;
|
||||
|
||||
Attached.Description = NewName!;
|
||||
Attached.Description = NewName!;
|
||||
Attached.Name = NewName!;
|
||||
|
||||
break;
|
||||
}
|
||||
case AttachedDTO.TypeAttached.Image:
|
||||
{
|
||||
var extension = Path.GetExtension(Attached.Name);
|
||||
Attached.Name = NewName! + extension;
|
||||
break;
|
||||
}
|
||||
case AttachedDTO.TypeAttached.Image:
|
||||
{
|
||||
var extension = Path.GetExtension(Attached.Name);
|
||||
Attached.Name = NewName! + extension;
|
||||
|
||||
break;
|
||||
break;
|
||||
}
|
||||
case AttachedDTO.TypeAttached.Document:
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
case AttachedDTO.TypeAttached.Document:
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
|
||||
MudDialog.Close(Attached);
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace salesbook.Shared.Core.Entity;
|
||||
public class PtbProsRif
|
||||
{
|
||||
[PrimaryKey, Column("composite_key")]
|
||||
public string CompositeKey { get; set; }
|
||||
public string CompositeKey { get; set; } = null!;
|
||||
|
||||
private string? _codPpro;
|
||||
|
||||
|
||||
@@ -173,4 +173,7 @@ public class StbActivity
|
||||
|
||||
[Column("plan_id"), JsonPropertyName("planId")]
|
||||
public long? PlanId { get; set; }
|
||||
|
||||
[Column("id_posizione"), JsonPropertyName("idPosizione")]
|
||||
public long? IdPosizione { get; set; }
|
||||
}
|
||||
@@ -33,7 +33,7 @@ public interface IIntegryApiService
|
||||
|
||||
//Position
|
||||
Task<PositionDTO> SavePosition(PositionDTO position);
|
||||
Task<PositionDTO> RetrievePosition(string id);
|
||||
Task<PositionDTO> RetrievePosition(long id);
|
||||
|
||||
//Google
|
||||
Task<List<IndirizzoDTO>?> Geocode(string address);
|
||||
|
||||
@@ -164,7 +164,7 @@ public class IntegryApiService(IIntegryApiRestClient integryApiRestClient, IUser
|
||||
public Task<PositionDTO> SavePosition(PositionDTO position) =>
|
||||
integryApiRestClient.Post<PositionDTO>("savePosition", position)!;
|
||||
|
||||
public Task<PositionDTO> RetrievePosition(string id)
|
||||
public Task<PositionDTO> RetrievePosition(long id)
|
||||
{
|
||||
var queryParams = new Dictionary<string, object> { { "id", id } };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user