Aggiunto tasto per il suggerimento della descrizione attvità in base al tipo
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
using salesbook.Shared.Components.SingleElements.Modal;
|
||||
using salesbook.Shared.Core.Dto;
|
||||
using salesbook.Shared.Core.Dto.Activity;
|
||||
using salesbook.Shared.Core.Entity;
|
||||
|
||||
namespace salesbook.Shared.Core.Helpers;
|
||||
|
||||
@@ -46,7 +47,7 @@ public class ModalHelpers
|
||||
return await modal.Result;
|
||||
}
|
||||
|
||||
public static async Task<DialogResult?> OpenPersRifForm(IDialogService dialog, PersRifDTO? persRif,
|
||||
public static async Task<DialogResult?> OpenPersRifForm(IDialogService dialog, PersRifDTO? persRif,
|
||||
ContactDTO? contactModel = null, List<PersRifDTO>? persRifList = null)
|
||||
{
|
||||
var modal = await dialog.ShowAsync<PersRifForm>(
|
||||
@@ -54,7 +55,7 @@ public class ModalHelpers
|
||||
new DialogParameters<PersRifForm>
|
||||
{
|
||||
{ x => x.OriginalModel, persRif },
|
||||
{ x => x.ContactModel, contactModel},
|
||||
{ x => x.ContactModel, contactModel },
|
||||
{ x => x.PersRifList, persRifList }
|
||||
},
|
||||
new DialogOptions
|
||||
@@ -74,7 +75,7 @@ public class ModalHelpers
|
||||
"Add attached",
|
||||
new DialogParameters<AddAttached>
|
||||
{
|
||||
{ x => x.CanAddPosition, canAddPosition}
|
||||
{ x => x.CanAddPosition, canAddPosition }
|
||||
},
|
||||
new DialogOptions
|
||||
{
|
||||
@@ -87,4 +88,25 @@ public class ModalHelpers
|
||||
|
||||
return await modal.Result;
|
||||
}
|
||||
|
||||
public static async Task<DialogResult?> OpenSuggestActivityDescription(IDialogService dialog,
|
||||
List<StbActivityTyper>? activityTypers)
|
||||
{
|
||||
var modal = await dialog.ShowAsync<ModalSuggestDescription>(
|
||||
"Suggest activity description",
|
||||
new DialogParameters<ModalSuggestDescription>
|
||||
{
|
||||
{ x => x.ActivityTypers, activityTypers }
|
||||
},
|
||||
new DialogOptions
|
||||
{
|
||||
FullScreen = false,
|
||||
CloseButton = false,
|
||||
NoHeader = true,
|
||||
BackdropClick = false
|
||||
}
|
||||
);
|
||||
|
||||
return await modal.Result;
|
||||
}
|
||||
}
|
||||
@@ -31,6 +31,8 @@ public interface IIntegryApiService
|
||||
Task<Stream> DownloadFileFromRefUuid(string refUuid, string fileName);
|
||||
|
||||
Task<CRMJobProgressResponseDTO> RetrieveJobProgress(string codJcom);
|
||||
|
||||
Task<List<StbActivityTyper>?> SuggestActivityDescription(string activityType);
|
||||
|
||||
//Position
|
||||
Task<PositionDTO> SavePosition(PositionDTO position);
|
||||
|
||||
@@ -26,7 +26,7 @@ public class IntegryApiService(IIntegryApiRestClient integryApiRestClient, IUser
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public Task<List<StbActivity>?> RetrieveActivity(CRMRetrieveActivityRequestDTO activityRequest) =>
|
||||
integryApiRestClient.AuthorizedPost<List<StbActivity>?>("crm/retrieveActivity", activityRequest);
|
||||
|
||||
@@ -42,10 +42,10 @@ public class IntegryApiService(IIntegryApiRestClient integryApiRestClient, IUser
|
||||
return integryApiRestClient.AuthorizedGet<List<JtbComt>?>("crm/retrieveCommesse", queryParams);
|
||||
}
|
||||
|
||||
public Task<UsersSyncResponseDTO> RetrieveAnagClie(CRMAnagRequestDTO request) =>
|
||||
public Task<UsersSyncResponseDTO> RetrieveAnagClie(CRMAnagRequestDTO request) =>
|
||||
integryApiRestClient.AuthorizedPost<UsersSyncResponseDTO>("crm/retrieveClienti", request)!;
|
||||
|
||||
public Task<UsersSyncResponseDTO> RetrieveProspect(CRMProspectRequestDTO request) =>
|
||||
public Task<UsersSyncResponseDTO> RetrieveProspect(CRMProspectRequestDTO request) =>
|
||||
integryApiRestClient.AuthorizedPost<UsersSyncResponseDTO>("crm/retrieveProspect", request)!;
|
||||
|
||||
public Task<SettingsResponseDTO> RetrieveSettings() =>
|
||||
@@ -74,7 +74,8 @@ public class IntegryApiService(IIntegryApiRestClient integryApiRestClient, IUser
|
||||
|
||||
public Task<List<StbActivity>?> SaveActivity(ActivityDTO activity)
|
||||
{
|
||||
if (activity.CodJcom is null && userSession.ProfileDb != null && userSession.ProfileDb.Equals("smetar", StringComparison.OrdinalIgnoreCase))
|
||||
if (activity.CodJcom is null && userSession.ProfileDb != null &&
|
||||
userSession.ProfileDb.Equals("smetar", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
activity.CodJcom = "0000";
|
||||
}
|
||||
@@ -188,4 +189,10 @@ public class IntegryApiService(IIntegryApiRestClient integryApiRestClient, IUser
|
||||
|
||||
return integryApiRestClient.Get<CRMJobProgressResponseDTO>("crm/retrieveJobProgress", queryParams)!;
|
||||
}
|
||||
|
||||
public Task<List<StbActivityTyper>?> SuggestActivityDescription(string activityType) =>
|
||||
integryApiRestClient.Get<List<StbActivityTyper>>(
|
||||
"activity/suggestActivityDescription",
|
||||
new Dictionary<string, object> { { "activityType", activityType } }
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user