Fix vari
This commit is contained in:
@@ -308,6 +308,8 @@ public class ManageDataService(
|
||||
private Task UpdateDbUsers(UsersSyncResponseDTO response)
|
||||
{
|
||||
return Task.Run(async () =>
|
||||
{
|
||||
try
|
||||
{
|
||||
if (response.AnagClie != null)
|
||||
{
|
||||
@@ -323,6 +325,13 @@ public class ManageDataService(
|
||||
|
||||
if (response.PtbProsRif != null) await localDb.InsertOrUpdate(response.PtbProsRif);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine(e.Message);
|
||||
SentrySdk.CaptureException(e);
|
||||
throw;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -425,7 +425,7 @@ else
|
||||
set
|
||||
{
|
||||
_filteredActivity = value;
|
||||
StateHasChanged();
|
||||
InvokeAsync(StateHasChanged);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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" });
|
||||
|
||||
@@ -150,6 +150,8 @@
|
||||
}
|
||||
|
||||
private void OnNewName()
|
||||
{
|
||||
if (Attached != null)
|
||||
{
|
||||
switch (Attached.Type)
|
||||
{
|
||||
@@ -174,6 +176,7 @@
|
||||
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