Fix vari
This commit is contained in:
@@ -308,6 +308,8 @@ public class ManageDataService(
|
|||||||
private Task UpdateDbUsers(UsersSyncResponseDTO response)
|
private Task UpdateDbUsers(UsersSyncResponseDTO response)
|
||||||
{
|
{
|
||||||
return Task.Run(async () =>
|
return Task.Run(async () =>
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
if (response.AnagClie != null)
|
if (response.AnagClie != null)
|
||||||
{
|
{
|
||||||
@@ -323,6 +325,13 @@ public class ManageDataService(
|
|||||||
|
|
||||||
if (response.PtbProsRif != null) await localDb.InsertOrUpdate(response.PtbProsRif);
|
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
|
set
|
||||||
{
|
{
|
||||||
_filteredActivity = value;
|
_filteredActivity = value;
|
||||||
StateHasChanged();
|
InvokeAsync(StateHasChanged);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
|
|
||||||
@if (ActivityModel.CodJcom != null && SelectedComessa == null)
|
@if (ActivityModel.CodJcom != null && SelectedComessa == null)
|
||||||
{
|
{
|
||||||
<MudSkeleton />
|
<MudSkeleton/>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -100,7 +100,7 @@
|
|||||||
|
|
||||||
@if (ActivityModel.UserName != null && SelectedUser == null)
|
@if (ActivityModel.UserName != null && SelectedUser == null)
|
||||||
{
|
{
|
||||||
<MudSkeleton />
|
<MudSkeleton/>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -128,7 +128,7 @@
|
|||||||
|
|
||||||
@if (ActivityType.IsNullOrEmpty())
|
@if (ActivityType.IsNullOrEmpty())
|
||||||
{
|
{
|
||||||
<MudSkeleton />
|
<MudSkeleton/>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -400,7 +400,25 @@
|
|||||||
SelectedUser = Users.FindLast(x => x.UserName.Equals(ActivityModel.UserName));
|
SelectedUser = Users.FindLast(x => x.UserName.Equals(ActivityModel.UserName));
|
||||||
|
|
||||||
if (!IsNew && Id != null)
|
if (!IsNew && Id != null)
|
||||||
|
{
|
||||||
ActivityFileList = await IntegryApiService.GetActivityFile(Id);
|
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>();
|
ActivityResult = await ManageData.GetTable<StbActivityResult>();
|
||||||
Clienti = await ManageData.GetClienti(new WhereCondContact { FlagStato = "A" });
|
Clienti = await ManageData.GetClienti(new WhereCondContact { FlagStato = "A" });
|
||||||
|
|||||||
@@ -150,6 +150,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void OnNewName()
|
private void OnNewName()
|
||||||
|
{
|
||||||
|
if (Attached != null)
|
||||||
{
|
{
|
||||||
switch (Attached.Type)
|
switch (Attached.Type)
|
||||||
{
|
{
|
||||||
@@ -174,6 +176,7 @@
|
|||||||
default:
|
default:
|
||||||
throw new ArgumentOutOfRangeException();
|
throw new ArgumentOutOfRangeException();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
MudDialog.Close(Attached);
|
MudDialog.Close(Attached);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ namespace salesbook.Shared.Core.Entity;
|
|||||||
public class PtbProsRif
|
public class PtbProsRif
|
||||||
{
|
{
|
||||||
[PrimaryKey, Column("composite_key")]
|
[PrimaryKey, Column("composite_key")]
|
||||||
public string CompositeKey { get; set; }
|
public string CompositeKey { get; set; } = null!;
|
||||||
|
|
||||||
private string? _codPpro;
|
private string? _codPpro;
|
||||||
|
|
||||||
|
|||||||
@@ -173,4 +173,7 @@ public class StbActivity
|
|||||||
|
|
||||||
[Column("plan_id"), JsonPropertyName("planId")]
|
[Column("plan_id"), JsonPropertyName("planId")]
|
||||||
public long? PlanId { get; set; }
|
public long? PlanId { get; set; }
|
||||||
|
|
||||||
|
[Column("id_posizione"), JsonPropertyName("idPosizione")]
|
||||||
|
public long? IdPosizione { get; set; }
|
||||||
}
|
}
|
||||||
@@ -33,7 +33,7 @@ public interface IIntegryApiService
|
|||||||
|
|
||||||
//Position
|
//Position
|
||||||
Task<PositionDTO> SavePosition(PositionDTO position);
|
Task<PositionDTO> SavePosition(PositionDTO position);
|
||||||
Task<PositionDTO> RetrievePosition(string id);
|
Task<PositionDTO> RetrievePosition(long id);
|
||||||
|
|
||||||
//Google
|
//Google
|
||||||
Task<List<IndirizzoDTO>?> Geocode(string address);
|
Task<List<IndirizzoDTO>?> Geocode(string address);
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ public class IntegryApiService(IIntegryApiRestClient integryApiRestClient, IUser
|
|||||||
public Task<PositionDTO> SavePosition(PositionDTO position) =>
|
public Task<PositionDTO> SavePosition(PositionDTO position) =>
|
||||||
integryApiRestClient.Post<PositionDTO>("savePosition", 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 } };
|
var queryParams = new Dictionary<string, object> { { "id", id } };
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user