Creata pagina step della commessa
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace salesbook.Shared.Core.Dto.JobProgress;
|
||||
|
||||
public class CRMJobProgressResponseDTO
|
||||
{
|
||||
[JsonPropertyName("steps")]
|
||||
public List<CRMJobStepDTO> Steps { get; set; }
|
||||
}
|
||||
15
salesbook.Shared/Core/Dto/JobProgress/CRMJobStatusDTO.cs
Normal file
15
salesbook.Shared/Core/Dto/JobProgress/CRMJobStatusDTO.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace salesbook.Shared.Core.Dto.JobProgress;
|
||||
|
||||
public class CRMJobStatusDTO
|
||||
{
|
||||
[JsonPropertyName("completed")]
|
||||
public bool Completed { get; set; }
|
||||
|
||||
[JsonPropertyName("progress")]
|
||||
public bool Progress { get; set; }
|
||||
|
||||
[JsonPropertyName("skip")]
|
||||
public bool Skip { get; set; }
|
||||
}
|
||||
15
salesbook.Shared/Core/Dto/JobProgress/CRMJobStepDTO.cs
Normal file
15
salesbook.Shared/Core/Dto/JobProgress/CRMJobStepDTO.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace salesbook.Shared.Core.Dto.JobProgress;
|
||||
|
||||
public class CRMJobStepDTO
|
||||
{
|
||||
[JsonPropertyName("stepName")]
|
||||
public string? StepName { get; set; }
|
||||
|
||||
[JsonPropertyName("status")]
|
||||
public CRMJobStatusDTO? Status { get; set; }
|
||||
|
||||
[JsonPropertyName("date")]
|
||||
public DateTime? Date { get; set; }
|
||||
}
|
||||
8
salesbook.Shared/Core/Dto/PageState/JobSteps.cs
Normal file
8
salesbook.Shared/Core/Dto/PageState/JobSteps.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
using salesbook.Shared.Core.Dto.JobProgress;
|
||||
|
||||
namespace salesbook.Shared.Core.Dto.PageState;
|
||||
|
||||
public class JobSteps
|
||||
{
|
||||
public List<CRMJobStepDTO>? Steps { get; set; }
|
||||
}
|
||||
9
salesbook.Shared/Core/Dto/PageState/UserListState.cs
Normal file
9
salesbook.Shared/Core/Dto/PageState/UserListState.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using salesbook.Shared.Core.Dto.Users;
|
||||
|
||||
namespace salesbook.Shared.Core.Dto.PageState;
|
||||
|
||||
public class UserListState
|
||||
{
|
||||
public List<UserDisplayItem>? GroupedUserList { get; set; }
|
||||
public List<UserDisplayItem>? FilteredGroupedUserList { get; set; }
|
||||
}
|
||||
15
salesbook.Shared/Core/Dto/PageState/UserPageState.cs
Normal file
15
salesbook.Shared/Core/Dto/PageState/UserPageState.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using salesbook.Shared.Core.Dto.JobProgress;
|
||||
using salesbook.Shared.Core.Entity;
|
||||
|
||||
namespace salesbook.Shared.Core.Dto.PageState;
|
||||
|
||||
public class UserPageState
|
||||
{
|
||||
public string? CodUser { get; set; }
|
||||
|
||||
public ContactDTO Anag { get; set; }
|
||||
public List<PersRifDTO>? PersRif { get; set; }
|
||||
public List<JtbComt> Commesse { get; set; }
|
||||
public StbUser? Agente { get; set; }
|
||||
public Dictionary<string, List<CRMJobStepDTO>?> Steps { get; set; }
|
||||
}
|
||||
8
salesbook.Shared/Core/Dto/Users/UserDisplayItem.cs
Normal file
8
salesbook.Shared/Core/Dto/Users/UserDisplayItem.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace salesbook.Shared.Core.Dto.Users;
|
||||
|
||||
public class UserDisplayItem
|
||||
{
|
||||
public required ContactDTO User { get; set; }
|
||||
public bool ShowHeader { get; set; }
|
||||
public string? HeaderLetter { get; set; }
|
||||
}
|
||||
@@ -107,4 +107,7 @@ public class JtbComt
|
||||
|
||||
[Column("note_tecniche"), JsonPropertyName("noteTecniche")]
|
||||
public string NoteTecniche { get; set; }
|
||||
|
||||
[Ignore, JsonIgnore]
|
||||
public DateTime? LastUpd { get; set; }
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using salesbook.Shared.Core.Dto;
|
||||
using salesbook.Shared.Core.Dto.JobProgress;
|
||||
using salesbook.Shared.Core.Entity;
|
||||
|
||||
namespace salesbook.Shared.Core.Interface;
|
||||
@@ -22,6 +23,8 @@ public interface IIntegryApiService
|
||||
Task<List<ActivityFileDto>> GetActivityFile(string activityId);
|
||||
Task<Stream> DownloadFile(string activityId, string fileName);
|
||||
|
||||
Task<CRMJobProgressResponseDTO> RetrieveJobProgress(string codJcom);
|
||||
|
||||
//Position
|
||||
Task<PositionDTO> SavePosition(PositionDTO position);
|
||||
Task<PositionDTO> RetrievePosition(string id);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using IntegryApiClient.Core.Domain.Abstraction.Contracts.Account;
|
||||
using IntegryApiClient.Core.Domain.RestClient.Contacts;
|
||||
using salesbook.Shared.Core.Dto;
|
||||
using salesbook.Shared.Core.Dto.JobProgress;
|
||||
using salesbook.Shared.Core.Entity;
|
||||
using salesbook.Shared.Core.Interface;
|
||||
using System.Net.Http.Headers;
|
||||
@@ -146,4 +147,11 @@ public class IntegryApiService(IIntegryApiRestClient integryApiRestClient, IUser
|
||||
|
||||
return integryApiRestClient.Get<PositionDTO>("retrievePosition", queryParams)!;
|
||||
}
|
||||
|
||||
public Task<CRMJobProgressResponseDTO> RetrieveJobProgress(string codJcom)
|
||||
{
|
||||
var queryParams = new Dictionary<string, object> { { "codJcom", codJcom } };
|
||||
|
||||
return integryApiRestClient.Get<CRMJobProgressResponseDTO>("crm/retrieveJobProgress", queryParams)!;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user