Compare commits
35 Commits
83264731f3
...
v2.1.0(14)
| Author | SHA1 | Date | |
|---|---|---|---|
| 4698e43fd7 | |||
| 5ade3b7a5f | |||
| b7522fb116 | |||
| a593141185 | |||
| 3609749a26 | |||
| 48930550fe | |||
| 11e7b04a88 | |||
| 27588097a3 | |||
| 934258d422 | |||
| c3e646403b | |||
| effdc317c2 | |||
| 9f95bb23e6 | |||
| 5016b3ed8d | |||
| 5981691815 | |||
| f4621f48c8 | |||
| ff36b1cdab | |||
| 36fe05e3c3 | |||
| 0fe1b90417 | |||
| 7359310c48 | |||
| 860a25471e | |||
| 0fab8058f3 | |||
| 2e51420b2c | |||
| fab2836a0e | |||
| 4521b2a02d | |||
| ec7bedeff6 | |||
| ea2f2d47c3 | |||
| 149eb27628 | |||
| 8b331d5824 | |||
| 31db52d0d7 | |||
| ce56e9e57d | |||
| c61093a942 | |||
| 4645b2660e | |||
| 06bda7c881 | |||
| 8a45bffebc | |||
| e9a0ffdb7a |
@@ -1,20 +1,15 @@
|
|||||||
using CommunityToolkit.Mvvm.Messaging;
|
|
||||||
|
|
||||||
namespace salesbook.Maui
|
namespace salesbook.Maui
|
||||||
{
|
{
|
||||||
public partial class App : Application
|
public partial class App : Application
|
||||||
{
|
{
|
||||||
private readonly IMessenger _messenger;
|
public App()
|
||||||
|
|
||||||
public App(IMessenger messenger)
|
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
_messenger = messenger;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override Window CreateWindow(IActivationState? activationState)
|
protected override Window CreateWindow(IActivationState? activationState)
|
||||||
{
|
{
|
||||||
return new Window(new MainPage(_messenger));
|
return new Window(new MainPage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,16 +5,48 @@ namespace salesbook.Maui.Core.Services;
|
|||||||
|
|
||||||
public class AttachedService : IAttachedService
|
public class AttachedService : IAttachedService
|
||||||
{
|
{
|
||||||
public async Task<AttachedDTO?> SelectImage()
|
public async Task<AttachedDTO?> SelectImageFromCamera()
|
||||||
{
|
{
|
||||||
var perm = await Permissions.RequestAsync<Permissions.Photos>();
|
var cameraPerm = await Permissions.RequestAsync<Permissions.Camera>();
|
||||||
if (perm != PermissionStatus.Granted) return null;
|
var storagePerm = await Permissions.RequestAsync<Permissions.StorageWrite>();
|
||||||
|
|
||||||
var result = await FilePicker.PickAsync(new PickOptions
|
if (cameraPerm != PermissionStatus.Granted || storagePerm != PermissionStatus.Granted)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
FileResult? result = null;
|
||||||
|
|
||||||
|
try
|
||||||
{
|
{
|
||||||
PickerTitle = "Scegli un'immagine",
|
result = await MediaPicker.Default.CapturePhotoAsync();
|
||||||
FileTypes = FilePickerFileType.Images
|
}
|
||||||
});
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"Errore cattura foto: {ex.Message}");
|
||||||
|
SentrySdk.CaptureException(ex);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return result is null ? null : await ConvertToDto(result, AttachedDTO.TypeAttached.Image);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<AttachedDTO?> SelectImageFromGallery()
|
||||||
|
{
|
||||||
|
var storagePerm = await Permissions.RequestAsync<Permissions.StorageRead>();
|
||||||
|
if (storagePerm != PermissionStatus.Granted)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
FileResult? result = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
result = await MediaPicker.Default.PickPhotoAsync();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"Errore selezione galleria: {ex.Message}");
|
||||||
|
SentrySdk.CaptureException(ex);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return result is null ? null : await ConvertToDto(result, AttachedDTO.TypeAttached.Image);
|
return result is null ? null : await ConvertToDto(result, AttachedDTO.TypeAttached.Image);
|
||||||
}
|
}
|
||||||
@@ -86,6 +118,7 @@ public class AttachedService : IAttachedService
|
|||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Console.WriteLine($"Errore durante il salvataggio dello stream: {e.Message}");
|
Console.WriteLine($"Errore durante il salvataggio dello stream: {e.Message}");
|
||||||
|
SentrySdk.CaptureException(e);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
|
|||||||
@@ -1,24 +1,26 @@
|
|||||||
using AutoMapper;
|
using AutoMapper;
|
||||||
using MudBlazor.Extensions;
|
|
||||||
using salesbook.Shared.Core.Dto;
|
using salesbook.Shared.Core.Dto;
|
||||||
using salesbook.Shared.Core.Dto.Activity;
|
using salesbook.Shared.Core.Dto.Activity;
|
||||||
using salesbook.Shared.Core.Dto.Contact;
|
using salesbook.Shared.Core.Dto.Contact;
|
||||||
|
using salesbook.Shared.Core.Dto.PageState;
|
||||||
using salesbook.Shared.Core.Entity;
|
using salesbook.Shared.Core.Entity;
|
||||||
|
using salesbook.Shared.Core.Helpers;
|
||||||
using salesbook.Shared.Core.Helpers.Enum;
|
using salesbook.Shared.Core.Helpers.Enum;
|
||||||
using salesbook.Shared.Core.Interface;
|
using salesbook.Shared.Core.Interface;
|
||||||
using salesbook.Shared.Core.Interface.IntegryApi;
|
using salesbook.Shared.Core.Interface.IntegryApi;
|
||||||
using salesbook.Shared.Core.Interface.System.Network;
|
using salesbook.Shared.Core.Interface.System.Network;
|
||||||
using Sentry.Protocol;
|
|
||||||
using System.Linq.Expressions;
|
using System.Linq.Expressions;
|
||||||
using salesbook.Shared.Core.Helpers;
|
using IntegryApiClient.Core.Domain.Abstraction.Contracts.Account;
|
||||||
|
|
||||||
namespace salesbook.Maui.Core.Services;
|
namespace salesbook.Maui.Core.Services;
|
||||||
|
|
||||||
public class ManageDataService(
|
public class ManageDataService(
|
||||||
LocalDbService localDb,
|
LocalDbService localDb,
|
||||||
IMapper mapper,
|
IMapper mapper,
|
||||||
|
UserListState userListState,
|
||||||
IIntegryApiService integryApiService,
|
IIntegryApiService integryApiService,
|
||||||
INetworkService networkService
|
INetworkService networkService,
|
||||||
|
IUserSession userSession
|
||||||
) : IManageDataService
|
) : IManageDataService
|
||||||
{
|
{
|
||||||
public Task<List<T>> GetTable<T>(Expression<Func<T, bool>>? whereCond = null) where T : new() =>
|
public Task<List<T>> GetTable<T>(Expression<Func<T, bool>>? whereCond = null) where T : new() =>
|
||||||
@@ -86,7 +88,7 @@ public class ManageDataService(
|
|||||||
return prospect;
|
return prospect;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<List<ContactDTO>> GetContact(WhereCondContact? whereCond)
|
public async Task<List<ContactDTO>> GetContact(WhereCondContact? whereCond, DateTime? lastSync)
|
||||||
{
|
{
|
||||||
List<AnagClie>? contactList;
|
List<AnagClie>? contactList;
|
||||||
List<PtbPros>? prospectList;
|
List<PtbPros>? prospectList;
|
||||||
@@ -94,26 +96,37 @@ public class ManageDataService(
|
|||||||
|
|
||||||
if (networkService.ConnectionAvailable)
|
if (networkService.ConnectionAvailable)
|
||||||
{
|
{
|
||||||
|
var response = new UsersSyncResponseDTO();
|
||||||
|
|
||||||
var clienti = await integryApiService.RetrieveAnagClie(
|
var clienti = await integryApiService.RetrieveAnagClie(
|
||||||
new CRMAnagRequestDTO
|
new CRMAnagRequestDTO
|
||||||
{
|
{
|
||||||
CodAnag = whereCond.CodAnag,
|
CodAnag = whereCond.CodAnag,
|
||||||
FlagStato = whereCond.FlagStato,
|
FlagStato = whereCond.FlagStato,
|
||||||
PartIva = whereCond.PartIva,
|
PartIva = whereCond.PartIva,
|
||||||
ReturnPersRif = !whereCond.OnlyContact
|
ReturnPersRif = !whereCond.OnlyContact,
|
||||||
|
FilterDate = lastSync
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
_ = UpdateDbUsers(clienti);
|
|
||||||
|
response.AnagClie = clienti.AnagClie;
|
||||||
|
response.VtbDest = clienti.VtbDest;
|
||||||
|
response.VtbCliePersRif = clienti.VtbCliePersRif;
|
||||||
|
|
||||||
var prospect = await integryApiService.RetrieveProspect(
|
var prospect = await integryApiService.RetrieveProspect(
|
||||||
new CRMProspectRequestDTO
|
new CRMProspectRequestDTO
|
||||||
{
|
{
|
||||||
CodPpro = whereCond.CodAnag,
|
CodPpro = whereCond.CodAnag,
|
||||||
PartIva = whereCond.PartIva,
|
PartIva = whereCond.PartIva,
|
||||||
ReturnPersRif = !whereCond.OnlyContact
|
ReturnPersRif = !whereCond.OnlyContact,
|
||||||
|
FilterDate = lastSync
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
_ = UpdateDbUsers(prospect);
|
|
||||||
|
response.PtbPros = prospect.PtbPros;
|
||||||
|
response.PtbProsRif = prospect.PtbProsRif;
|
||||||
|
|
||||||
|
_ = UpdateDbUsers(response);
|
||||||
|
|
||||||
contactList = clienti.AnagClie;
|
contactList = clienti.AnagClie;
|
||||||
prospectList = prospect.PtbPros;
|
prospectList = prospect.PtbPros;
|
||||||
@@ -166,9 +179,9 @@ public class ManageDataService(
|
|||||||
|
|
||||||
activities = await localDb.Get<StbActivity>(x =>
|
activities = await localDb.Get<StbActivity>(x =>
|
||||||
(whereCond.ActivityId != null && x.ActivityId != null && whereCond.ActivityId.Equals(x.ActivityId)) ||
|
(whereCond.ActivityId != null && x.ActivityId != null && whereCond.ActivityId.Equals(x.ActivityId)) ||
|
||||||
(whereCond.Start != null && whereCond.End != null && x.EffectiveDate == null &&
|
(whereCond.Start != null && whereCond.End != null && x.EffectiveTime == null &&
|
||||||
x.EstimatedDate >= whereCond.Start && x.EstimatedDate <= whereCond.End) ||
|
x.EstimatedTime >= whereCond.Start && x.EstimatedTime <= whereCond.End) ||
|
||||||
(x.EffectiveDate >= whereCond.Start && x.EffectiveDate <= whereCond.End) ||
|
(x.EffectiveTime >= whereCond.Start && x.EffectiveTime <= whereCond.End) ||
|
||||||
(whereCond.ActivityId == null && (whereCond.Start == null || whereCond.End == null))
|
(whereCond.ActivityId == null && (whereCond.Start == null || whereCond.End == null))
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -210,9 +223,9 @@ public class ManageDataService(
|
|||||||
{
|
{
|
||||||
activities = await localDb.Get<StbActivity>(x =>
|
activities = await localDb.Get<StbActivity>(x =>
|
||||||
(whereCond.ActivityId != null && x.ActivityId != null && whereCond.ActivityId.Equals(x.ActivityId)) ||
|
(whereCond.ActivityId != null && x.ActivityId != null && whereCond.ActivityId.Equals(x.ActivityId)) ||
|
||||||
(whereCond.Start != null && whereCond.End != null && x.EffectiveDate == null &&
|
(whereCond.Start != null && whereCond.End != null && x.EffectiveTime == null &&
|
||||||
x.EstimatedDate >= whereCond.Start && x.EstimatedDate <= whereCond.End) ||
|
x.EstimatedTime >= whereCond.Start && x.EstimatedTime <= whereCond.End) ||
|
||||||
(x.EffectiveDate >= whereCond.Start && x.EffectiveDate <= whereCond.End) ||
|
(x.EffectiveTime >= whereCond.Start && x.EffectiveTime <= whereCond.End) ||
|
||||||
(whereCond.ActivityId == null && (whereCond.Start == null || whereCond.End == null))
|
(whereCond.ActivityId == null && (whereCond.Start == null || whereCond.End == null))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -220,7 +233,7 @@ public class ManageDataService(
|
|||||||
return await MapActivity(activities);
|
return await MapActivity(activities);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task<List<ActivityDTO>> MapActivity(List<StbActivity>? activities)
|
public async Task<List<ActivityDTO>> MapActivity(List<StbActivity>? activities)
|
||||||
{
|
{
|
||||||
if (activities == null) return [];
|
if (activities == null) return [];
|
||||||
|
|
||||||
@@ -230,21 +243,29 @@ public class ManageDataService(
|
|||||||
.Distinct().ToList();
|
.Distinct().ToList();
|
||||||
|
|
||||||
var jtbComtList = await localDb.Get<JtbComt>(x => codJcomList.Contains(x.CodJcom));
|
var jtbComtList = await localDb.Get<JtbComt>(x => codJcomList.Contains(x.CodJcom));
|
||||||
var commesseDict = jtbComtList.ToDictionary(x => x.CodJcom, x => x.Descrizione);
|
|
||||||
|
|
||||||
var codAnagList = activities
|
var codAnagList = activities
|
||||||
.Select(x => x.CodAnag)
|
.Select(x => x.CodAnag)
|
||||||
.Where(x => !string.IsNullOrEmpty(x))
|
.Where(x => !string.IsNullOrEmpty(x))
|
||||||
.Distinct().ToList();
|
.Distinct().ToList();
|
||||||
var clientList = await localDb.Get<AnagClie>(x => codAnagList.Contains(x.CodAnag));
|
|
||||||
var distinctClient = clientList.ToDictionary(x => x.CodAnag, x => x.RagSoc);
|
|
||||||
|
|
||||||
var prospectList = await localDb.Get<PtbPros>(x => codAnagList.Contains(x.CodPpro));
|
IDictionary<string, string?>? distinctUser = null;
|
||||||
var distinctProspect = prospectList.ToDictionary(x => x.CodPpro, x => x.RagSoc);
|
|
||||||
|
if (userListState.AllUsers != null)
|
||||||
|
{
|
||||||
|
distinctUser = userListState.AllUsers
|
||||||
|
.Where(x => codAnagList.Contains(x.CodContact))
|
||||||
|
.ToDictionary(x => x.CodContact, x => x.RagSoc);
|
||||||
|
}
|
||||||
|
|
||||||
var returnDto = activities
|
var returnDto = activities
|
||||||
.Select(activity =>
|
.Select(activity =>
|
||||||
{
|
{
|
||||||
|
if (activity.CodJcom is "0000" && userSession.ProfileDb != null && userSession.ProfileDb.Equals("smetar", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
activity.CodJcom = null;
|
||||||
|
}
|
||||||
|
|
||||||
var dto = mapper.Map<ActivityDTO>(activity);
|
var dto = mapper.Map<ActivityDTO>(activity);
|
||||||
|
|
||||||
if (activity is { AlarmTime: not null, EstimatedTime: not null })
|
if (activity is { AlarmTime: not null, EstimatedTime: not null })
|
||||||
@@ -269,16 +290,14 @@ public class ManageDataService(
|
|||||||
{
|
{
|
||||||
string? ragSoc;
|
string? ragSoc;
|
||||||
|
|
||||||
if (distinctClient.TryGetValue(activity.CodAnag, out ragSoc) ||
|
if (distinctUser != null && (distinctUser.TryGetValue(activity.CodAnag, out ragSoc) ||
|
||||||
distinctProspect.TryGetValue(activity.CodAnag, out ragSoc))
|
distinctUser.TryGetValue(activity.CodAnag, out ragSoc)))
|
||||||
{
|
{
|
||||||
dto.Cliente = ragSoc;
|
dto.Cliente = ragSoc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dto.Commessa = activity.CodJcom != null && commesseDict.TryGetValue(activity.CodJcom, out var descr)
|
dto.Commessa = jtbComtList.Find(x => x.CodJcom.Equals(dto.CodJcom));
|
||||||
? descr
|
|
||||||
: null;
|
|
||||||
return dto;
|
return dto;
|
||||||
})
|
})
|
||||||
.ToList();
|
.ToList();
|
||||||
@@ -289,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)
|
||||||
{
|
{
|
||||||
@@ -304,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;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -322,6 +350,26 @@ public class ManageDataService(
|
|||||||
public Task InsertOrUpdate<T>(T objectToSave) =>
|
public Task InsertOrUpdate<T>(T objectToSave) =>
|
||||||
localDb.InsertOrUpdate<T>([objectToSave]);
|
localDb.InsertOrUpdate<T>([objectToSave]);
|
||||||
|
|
||||||
|
public async Task DeleteProspect(string codPpro)
|
||||||
|
{
|
||||||
|
var persRifList = await GetTable<PtbProsRif>(x => x.CodPpro!.Equals(codPpro));
|
||||||
|
|
||||||
|
if (!persRifList.IsNullOrEmpty())
|
||||||
|
{
|
||||||
|
foreach (var persRif in persRifList)
|
||||||
|
{
|
||||||
|
await localDb.Delete(persRif);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var ptbPros = (await GetTable<PtbPros>(x => x.CodPpro!.Equals(codPpro))).FirstOrDefault();
|
||||||
|
|
||||||
|
if (ptbPros != null)
|
||||||
|
{
|
||||||
|
await localDb.Delete(ptbPros);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public Task Delete<T>(T objectToDelete) =>
|
public Task Delete<T>(T objectToDelete) =>
|
||||||
localDb.Delete(objectToDelete);
|
localDb.Delete(objectToDelete);
|
||||||
|
|
||||||
|
|||||||
17
salesbook.Maui/ILLink.Descriptors.xml
Normal file
17
salesbook.Maui/ILLink.Descriptors.xml
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<linker>
|
||||||
|
<assembly fullname="salesbook.Shared" preserve="all" />
|
||||||
|
|
||||||
|
<assembly fullname="System.Private.CoreLib">
|
||||||
|
<type fullname="System.Runtime.InteropServices.SafeHandle" preserve="all" />
|
||||||
|
<type fullname="System.IO.FileStream" preserve="all" />
|
||||||
|
</assembly>
|
||||||
|
|
||||||
|
<assembly fullname="SourceGear.sqlite3" preserve="all"/>
|
||||||
|
<assembly fullname="sqlite-net-e" preserve="all"/>
|
||||||
|
|
||||||
|
<assembly fullname="Sentry.Maui" preserve="all"/>
|
||||||
|
<assembly fullname="Shiny.Hosting.Maui" preserve="all"/>
|
||||||
|
<assembly fullname="Shiny.Notifications" preserve="all"/>
|
||||||
|
<assembly fullname="Shiny.Push" preserve="all"/>
|
||||||
|
</linker>
|
||||||
@@ -1,23 +1,10 @@
|
|||||||
using CommunityToolkit.Mvvm.Messaging;
|
|
||||||
using salesbook.Shared.Core.Messages.Back;
|
|
||||||
|
|
||||||
namespace salesbook.Maui
|
namespace salesbook.Maui
|
||||||
{
|
{
|
||||||
public partial class MainPage : ContentPage
|
public partial class MainPage : ContentPage
|
||||||
{
|
{
|
||||||
private readonly IMessenger _messenger;
|
public MainPage()
|
||||||
|
|
||||||
public MainPage(IMessenger messenger)
|
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
_messenger = messenger;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
protected override bool OnBackButtonPressed()
|
|
||||||
{
|
|
||||||
_messenger.Send(new HardwareBackMessage("back"));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -104,6 +104,9 @@ namespace salesbook.Maui
|
|||||||
builder.Services.AddSingleton<INetworkService, NetworkService>();
|
builder.Services.AddSingleton<INetworkService, NetworkService>();
|
||||||
builder.Services.AddSingleton<LocalDbService>();
|
builder.Services.AddSingleton<LocalDbService>();
|
||||||
|
|
||||||
|
_ = typeof(System.Runtime.InteropServices.SafeHandle);
|
||||||
|
_ = typeof(System.IO.FileStream);
|
||||||
|
|
||||||
return builder;
|
return builder;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,24 +1,57 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="it.integry.salesbook">
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
<application android:allowBackup="true" android:icon="@mipmap/appicon" android:usesCleartextTraffic="true" android:supportsRtl="true">
|
package="it.integry.salesbook">
|
||||||
<receiver android:name="com.google.firebase.iid.FirebaseInstanceIdInternalReceiver" android:exported="false" />
|
|
||||||
<receiver android:name="com.google.firebase.iid.FirebaseInstanceIdReceiver" android:exported="true" android:permission="com.google.android.c2dm.permission.SEND">
|
<application
|
||||||
|
android:allowBackup="true"
|
||||||
|
android:icon="@mipmap/appicon"
|
||||||
|
android:usesCleartextTraffic="true"
|
||||||
|
android:supportsRtl="true">
|
||||||
|
|
||||||
|
<!-- Firebase push -->
|
||||||
|
<receiver android:name="com.google.firebase.iid.FirebaseInstanceIdInternalReceiver"
|
||||||
|
android:exported="false" />
|
||||||
|
<receiver android:name="com.google.firebase.iid.FirebaseInstanceIdReceiver"
|
||||||
|
android:exported="true"
|
||||||
|
android:permission="com.google.android.c2dm.permission.SEND">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
|
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
|
||||||
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
|
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
|
||||||
<category android:name="${applicationId}" />
|
<category android:name="${applicationId}" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</receiver>
|
</receiver>
|
||||||
|
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
|
<!-- Rete -->
|
||||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
|
|
||||||
|
<!-- Geolocalizzazione -->
|
||||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||||
<uses-permission android:name="android.permission.ACCESS_MEDIA_LOCATION" />
|
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||||
|
|
||||||
|
<!-- Fotocamera -->
|
||||||
|
<uses-permission android:name="android.permission.CAMERA" />
|
||||||
|
|
||||||
|
<!-- Storage / Media -->
|
||||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||||
|
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||||
|
|
||||||
|
<!-- Android 10+ -->
|
||||||
|
<uses-permission android:name="android.permission.ACCESS_MEDIA_LOCATION" />
|
||||||
|
|
||||||
|
<!-- Android 13+ -->
|
||||||
|
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
|
||||||
|
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
|
||||||
|
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />
|
||||||
|
|
||||||
|
<!-- Background / Notifiche -->
|
||||||
<uses-permission android:name="android.permission.BATTERY_STATS" />
|
<uses-permission android:name="android.permission.BATTERY_STATS" />
|
||||||
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
|
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
|
||||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
||||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
||||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||||
<uses-permission android:name="android.permission.VIBRATE" />
|
<uses-permission android:name="android.permission.VIBRATE" />
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
||||||
@@ -36,11 +36,17 @@
|
|||||||
<true/>
|
<true/>
|
||||||
</dict>
|
</dict>
|
||||||
|
|
||||||
|
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
|
||||||
|
<string>Questa app utilizza la tua posizione per migliorare alcune funzionalità basate sulla localizzazione.</string>
|
||||||
|
|
||||||
<key>NSLocationWhenInUseUsageDescription</key>
|
<key>NSLocationWhenInUseUsageDescription</key>
|
||||||
<string>L'app utilizza la tua posizione per allegarla alle attività.</string>
|
<string>Questa app utilizza la tua posizione solo mentre è in uso per allegarla alle attività.</string>
|
||||||
|
|
||||||
|
<key>NSCameraUsageDescription</key>
|
||||||
|
<string>Questa app necessita di accedere alla fotocamera per scattare foto.</string>
|
||||||
|
|
||||||
<key>NSPhotoLibraryUsageDescription</key>
|
<key>NSPhotoLibraryUsageDescription</key>
|
||||||
<string>Consente di selezionare immagini da allegare alle attività.</string>
|
<string>Questa app necessita di accedere alla libreria foto.</string>
|
||||||
|
|
||||||
<key>NSPhotoLibraryAddUsageDescription</key>
|
<key>NSPhotoLibraryAddUsageDescription</key>
|
||||||
<string>Permette all'app di salvare file o immagini nella tua libreria fotografica se necessario.</string>
|
<string>Permette all'app di salvare file o immagini nella tua libreria fotografica se necessario.</string>
|
||||||
|
|||||||
@@ -1,110 +1,48 @@
|
|||||||
|
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
|
<!-- Elenco dei dati raccolti -->
|
||||||
|
<key>NSPrivacyCollectedDataTypes</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>NSPrivacyCollectedDataType</key>
|
||||||
|
<string>NSPrivacyCollectedDataTypeUserID</string>
|
||||||
|
<key>NSPrivacyCollectedDataTypeLinkedToUser</key>
|
||||||
|
<true/>
|
||||||
|
<key>NSPrivacyCollectedDataTypeTracking</key>
|
||||||
|
<false/>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
|
||||||
|
<!-- API che accedono a dati sensibili -->
|
||||||
<key>NSPrivacyAccessedAPITypes</key>
|
<key>NSPrivacyAccessedAPITypes</key>
|
||||||
<array>
|
<array>
|
||||||
<dict>
|
<dict>
|
||||||
<key>NSPrivacyAccessedAPIType</key>
|
<key>NSPrivacyAccessedAPIType</key>
|
||||||
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
|
<string>NSPrivacyAccessedAPITypeCamera</string>
|
||||||
<key>NSPrivacyAccessedAPITypeReasons</key>
|
<key>NSPrivacyAccessedAPITypeReasons</key>
|
||||||
<array>
|
<array>
|
||||||
<string>C617.1</string>
|
<string>CAMeraCapture</string>
|
||||||
</array>
|
</array>
|
||||||
</dict>
|
</dict>
|
||||||
<dict>
|
<dict>
|
||||||
<key>NSPrivacyAccessedAPIType</key>
|
<key>NSPrivacyAccessedAPIType</key>
|
||||||
<string>NSPrivacyAccessedAPICategorySystemBootTime</string>
|
<string>NSPrivacyAccessedAPITypePhotoLibrary</string>
|
||||||
<key>NSPrivacyAccessedAPITypeReasons</key>
|
<key>NSPrivacyAccessedAPITypeReasons</key>
|
||||||
<array>
|
<array>
|
||||||
<string>35F9.1</string>
|
<string>PHOTOLibraryAdd</string>
|
||||||
</array>
|
<string>PHOTOLibraryRead</string>
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>NSPrivacyAccessedAPIType</key>
|
|
||||||
<string>NSPrivacyAccessedAPICategoryDiskSpace</string>
|
|
||||||
<key>NSPrivacyAccessedAPITypeReasons</key>
|
|
||||||
<array>
|
|
||||||
<string>E174.1</string>
|
|
||||||
</array>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>NSPrivacyAccessedAPIType</key>
|
|
||||||
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
|
|
||||||
<key>NSPrivacyAccessedAPITypeReasons</key>
|
|
||||||
<array>
|
|
||||||
<string>CA92.1</string>
|
|
||||||
</array>
|
</array>
|
||||||
</dict>
|
</dict>
|
||||||
</array>
|
</array>
|
||||||
<key>NSPrivacyCollectedDataTypes</key>
|
|
||||||
<array>
|
|
||||||
<!--user info-->
|
|
||||||
<dict>
|
|
||||||
<key>NSPrivacyCollectedDataTypeUserID</key>
|
|
||||||
<string>NSPrivacyCollectedDataTypeLocation</string>
|
|
||||||
<key>NSPrivacyCollectedDataTypeLinked</key>
|
|
||||||
<true />
|
|
||||||
<key>NSPrivacyCollectedDataTypeTracking</key>
|
|
||||||
<false />
|
|
||||||
<key>NSPrivacyCollectedDataTypePurposes</key>
|
|
||||||
<array>
|
|
||||||
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
|
|
||||||
</array>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>NSPrivacyCollectedDataTypeEmailAddress</key>
|
|
||||||
<string>NSPrivacyCollectedDataTypeLocation</string>
|
|
||||||
<key>NSPrivacyCollectedDataTypeLinked</key>
|
|
||||||
<true />
|
|
||||||
<key>NSPrivacyCollectedDataTypeTracking</key>
|
|
||||||
<false />
|
|
||||||
<key>NSPrivacyCollectedDataTypePurposes</key>
|
|
||||||
<array>
|
|
||||||
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
|
|
||||||
</array>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>NSPrivacyCollectedDataTypePhoneNumber</key>
|
|
||||||
<string>NSPrivacyCollectedDataTypeLocation</string>
|
|
||||||
<key>NSPrivacyCollectedDataTypeLinked</key>
|
|
||||||
<true />
|
|
||||||
<key>NSPrivacyCollectedDataTypeTracking</key>
|
|
||||||
<false />
|
|
||||||
<key>NSPrivacyCollectedDataTypePurposes</key>
|
|
||||||
<array>
|
|
||||||
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
|
|
||||||
</array>
|
|
||||||
</dict>
|
|
||||||
|
|
||||||
<!--crashlytics/analytics-->
|
<!-- Versione e autore -->
|
||||||
<dict>
|
<key>NSPrivacyTracking</key>
|
||||||
<key>NSPrivacyCollectedDataType</key>
|
|
||||||
<string>NSPrivacyCollectedDataTypeOtherDiagnosticData</string>
|
|
||||||
<key>NSPrivacyCollectedDataTypeLinked</key>
|
|
||||||
<false/>
|
<false/>
|
||||||
<key>NSPrivacyCollectedDataTypeTracking</key>
|
<key>NSPrivacyTrackingDomains</key>
|
||||||
<false />
|
<array/>
|
||||||
<key>NSPrivacyCollectedDataTypePurposes</key>
|
<key>NSPrivacyCustomPurposeDescription</key>
|
||||||
<array>
|
<dict/>
|
||||||
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
|
|
||||||
</array>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>NSPrivacyCollectedDataType</key>
|
|
||||||
<string>NSPrivacyCollectedDataTypeCrashData</string>
|
|
||||||
<key>NSPrivacyCollectedDataTypeLinked</key>
|
|
||||||
<true />
|
|
||||||
<key>NSPrivacyCollectedDataTypeTracking</key>
|
|
||||||
<false />
|
|
||||||
<key>NSPrivacyCollectedDataTypePurposes</key>
|
|
||||||
<array>
|
|
||||||
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
|
|
||||||
</array>
|
|
||||||
</dict>
|
|
||||||
|
|
||||||
</array>
|
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1,8 @@
|
|||||||
<svg version="1.2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 230 230" width="230" height="230"><style>.a{fill:#dff2ff}</style><path fill-rule="evenodd" class="a" d="m230 0v230h-230v-230z"/></svg>
|
<svg version="1.2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 456 456" width="456" height="456">
|
||||||
|
<defs>
|
||||||
|
<image width="456" height="456" id="img1" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAcgAAAHIAQMAAADwb+ipAAAAAXNSR0IB2cksfwAAAANQTFRF3/L/KicjZQAAAGhJREFUeJztyzENAAAMA6DVv+l5aHrCT64V0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRN05zNB6OcAcm2KNubAAAAAElFTkSuQmCC"/>
|
||||||
|
</defs>
|
||||||
|
<style>
|
||||||
|
</style>
|
||||||
|
<use id="Background" href="#img1" x="0" y="0"/>
|
||||||
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 201 B After Width: | Height: | Size: 522 B |
@@ -1 +1,10 @@
|
|||||||
<svg version="1.2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 230 230" width="230" height="230"><style>.a{fill:none;stroke:#002339;stroke-linecap:round;stroke-linejoin:round;stroke-width:16}.b{fill:none;stroke:#00a0de;stroke-linecap:round;stroke-linejoin:round;stroke-width:16}</style><path fill-rule="evenodd" class="a" d="m119.9 71.4h34.4c20.3 0 36.8 16.5 36.8 36.9v28.3c0 20.4-16.5 36.9-36.8 36.9h-5.1l0.1 32.2-34.7-32.2h-72.2"/><path fill-rule="evenodd" class="b" d="m117.3 24l-77.1 47.4v102.1l77.1-47.4v-102.1z"/></svg>
|
<svg version="1.2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024" width="1024" height="1024">
|
||||||
|
<defs>
|
||||||
|
<image width="920" height="920" id="img1" href="data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDIzMCAyMzAiIHdpZHRoPSIyMzAiIGhlaWdodD0iMjMwIj48c3R5bGU+LmF7ZmlsbDpub25lO3N0cm9rZTojMDAyMzM5O3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2Utd2lkdGg6MTZ9LmJ7ZmlsbDpub25lO3N0cm9rZTojMDBhMGRlO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2Utd2lkdGg6MTZ9PC9zdHlsZT48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsYXNzPSJhIiBkPSJtMTE5LjkgNzEuNGgzNC40YzIwLjMgMCAzNi44IDE2LjUgMzYuOCAzNi45djI4LjNjMCAyMC40LTE2LjUgMzYuOS0zNi44IDM2LjloLTUuMWwwLjEgMzIuMi0zNC43LTMyLjJoLTcyLjIiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsYXNzPSJiIiBkPSJtMTE3LjMgMjRsLTc3LjEgNDcuNHYxMDIuMWw3Ny4xLTQ3LjR2LTEwMi4xeiIvPjwvc3ZnPg=="/>
|
||||||
|
</defs>
|
||||||
|
<style>
|
||||||
|
</style>
|
||||||
|
<g>
|
||||||
|
<use id="appiconfg" href="#img1" transform="matrix(1.113,0,0,1.113,0,0)"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 529 B After Width: | Height: | Size: 1.0 KiB |
@@ -29,8 +29,8 @@
|
|||||||
<ApplicationId>it.integry.salesbook</ApplicationId>
|
<ApplicationId>it.integry.salesbook</ApplicationId>
|
||||||
|
|
||||||
<!-- Versions -->
|
<!-- Versions -->
|
||||||
<ApplicationDisplayVersion>1.1.0</ApplicationDisplayVersion>
|
<ApplicationDisplayVersion>2.1.0</ApplicationDisplayVersion>
|
||||||
<ApplicationVersion>5</ApplicationVersion>
|
<ApplicationVersion>14</ApplicationVersion>
|
||||||
|
|
||||||
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
|
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
|
||||||
<!--<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">
|
<!--<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">
|
||||||
@@ -79,7 +79,7 @@
|
|||||||
|
|
||||||
<PropertyGroup Condition="'$(TargetFramework)'=='net9.0-ios'">
|
<PropertyGroup Condition="'$(TargetFramework)'=='net9.0-ios'">
|
||||||
<CodesignKey>Apple Distribution: Integry S.r.l. (UNP26J4R89)</CodesignKey>
|
<CodesignKey>Apple Distribution: Integry S.r.l. (UNP26J4R89)</CodesignKey>
|
||||||
<CodesignProvision></CodesignProvision>
|
<CodesignProvision>salesbook</CodesignProvision>
|
||||||
<ProvisioningType>manual</ProvisioningType>
|
<ProvisioningType>manual</ProvisioningType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
@@ -95,16 +95,6 @@
|
|||||||
<BundleResource Include="Platforms\iOS\PrivacyInfo.xcprivacy" LogicalName="PrivacyInfo.xcprivacy" />
|
<BundleResource Include="Platforms\iOS\PrivacyInfo.xcprivacy" LogicalName="PrivacyInfo.xcprivacy" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0-android'">
|
|
||||||
<GoogleServicesJson Include="google-services.json">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</GoogleServicesJson>
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0-ios'">
|
|
||||||
<BundleResource Include="GoogleService-Info.plist" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">
|
<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">
|
||||||
<!-- Android App Icon -->
|
<!-- Android App Icon -->
|
||||||
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" ForegroundScale="0.65" />
|
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" ForegroundScale="0.65" />
|
||||||
@@ -115,6 +105,28 @@
|
|||||||
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" />
|
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<BlazorWebAssemblyLazyLoad Include="salesbook.Shared.dll" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
|
||||||
|
<PublishTrimmed>true</PublishTrimmed>
|
||||||
|
<RunAOTCompilation>true</RunAOTCompilation>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="'$(TargetFramework)'=='net9.0-ios' and '$(Configuration)'=='Release'">
|
||||||
|
<UseInterpreter>true</UseInterpreter>
|
||||||
|
<RunAOTCompilation>true</RunAOTCompilation>
|
||||||
|
<PublishTrimmed>true</PublishTrimmed>
|
||||||
|
<PublishAot>true</PublishAot>
|
||||||
|
<MonoAotMode>Hybrid</MonoAotMode>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<TrimmerRootAssembly Include="salesbook.Shared" RootMode="All" />
|
||||||
|
<TrimmerRootDescriptor Include="ILLink.Descriptors.xml" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<!-- Splash Screen -->
|
<!-- Splash Screen -->
|
||||||
<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#dff2ff" BaseSize="128,128" />
|
<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#dff2ff" BaseSize="128,128" />
|
||||||
@@ -130,20 +142,31 @@
|
|||||||
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
|
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">
|
||||||
|
<GoogleServicesJson Include="google-services.json">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</GoogleServicesJson>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">
|
||||||
|
<BundleResource Include="GoogleService-Info.plist" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="CommunityToolkit.Maui" Version="12.0.0" />
|
<PackageReference Include="CommunityToolkit.Maui" Version="12.2.0" />
|
||||||
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.0" />
|
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.0" />
|
||||||
<PackageReference Include="IntegryApiClient.MAUI" Version="1.2.1" />
|
<PackageReference Include="IntegryApiClient.MAUI" Version="1.2.2" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.6" />
|
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.10" />
|
||||||
<PackageReference Include="Microsoft.Maui.Controls" Version="9.0.81" />
|
<PackageReference Include="Microsoft.Maui.Controls" Version="9.0.120" />
|
||||||
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="9.0.81" />
|
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="9.0.120" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="9.0.81" />
|
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="9.0.120" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.6" />
|
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.10" />
|
||||||
<PackageReference Include="Sentry.Maui" Version="5.11.2" />
|
<PackageReference Include="Sentry.Maui" Version="5.16.1" />
|
||||||
<PackageReference Include="Shiny.Hosting.Maui" Version="3.3.4" />
|
<PackageReference Include="Shiny.Hosting.Maui" Version="3.3.4" />
|
||||||
<PackageReference Include="Shiny.Notifications" Version="3.3.4" />
|
<PackageReference Include="Shiny.Notifications" Version="3.3.4" />
|
||||||
<PackageReference Include="Shiny.Push" Version="3.3.4" />
|
<PackageReference Include="Shiny.Push" Version="3.3.4" />
|
||||||
<PackageReference Include="sqlite-net-pcl" Version="1.9.172" />
|
<PackageReference Include="SourceGear.sqlite3" Version="3.50.4.2" />
|
||||||
|
<PackageReference Include="sqlite-net-e" Version="1.10.0-beta2" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
26
salesbook.Shared/Components/Layout/ConnectionState.razor
Normal file
26
salesbook.Shared/Components/Layout/ConnectionState.razor
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<div class="Connection @(ShowWarning ? "Show" : "Hide") @(IsNetworkAvailable? ServicesIsDown ? "ServicesIsDown" : "SystemOk" : "NetworkKo")">
|
||||||
|
@if (IsNetworkAvailable)
|
||||||
|
{
|
||||||
|
if(ServicesIsDown)
|
||||||
|
{
|
||||||
|
<i class="ri-cloud-off-fill"></i>
|
||||||
|
<span>Servizi offline</span>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<i class="ri-cloud-fill"></i>
|
||||||
|
<span>Online</span>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<i class="ri-wifi-off-line"></i>
|
||||||
|
<span>Nessuna connessione</span>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@code{
|
||||||
|
[Parameter] public bool IsNetworkAvailable { get; set; }
|
||||||
|
[Parameter] public bool ServicesIsDown { get; set; }
|
||||||
|
[Parameter] public bool ShowWarning { get; set; }
|
||||||
|
}
|
||||||
@@ -14,6 +14,8 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.header-content > .title { width: 100%; }
|
||||||
|
|
||||||
.header-content.with-back .page-title {
|
.header-content.with-back .page-title {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
@using System.Globalization
|
@using System.Globalization
|
||||||
@using salesbook.Shared.Core.Interface
|
|
||||||
@using salesbook.Shared.Core.Interface.IntegryApi
|
@using salesbook.Shared.Core.Interface.IntegryApi
|
||||||
@using salesbook.Shared.Core.Interface.System.Network
|
@using salesbook.Shared.Core.Interface.System.Network
|
||||||
@using salesbook.Shared.Core.Messages.Back
|
@using salesbook.Shared.Core.Messages.Back
|
||||||
@@ -14,30 +13,11 @@
|
|||||||
<MudDialogProvider/>
|
<MudDialogProvider/>
|
||||||
<MudSnackbarProvider/>
|
<MudSnackbarProvider/>
|
||||||
|
|
||||||
|
<ConnectionState IsNetworkAvailable="IsNetworkAvailable" ServicesIsDown="ServicesIsDown" ShowWarning="ShowWarning" />
|
||||||
|
|
||||||
<div class="page">
|
<div class="page">
|
||||||
<NavMenu/>
|
<NavMenu/>
|
||||||
|
|
||||||
<div class="Connection @(ShowWarning ? "Show" : "Hide") @(IsNetworkAvailable? ServicesIsDown ? "ServicesIsDown" : "SystemOk" : "NetworkKo")">
|
|
||||||
@if (IsNetworkAvailable)
|
|
||||||
{
|
|
||||||
if(ServicesIsDown)
|
|
||||||
{
|
|
||||||
<i class="ri-cloud-off-fill"></i>
|
|
||||||
<span>Servizi offline</span>
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
<i class="ri-cloud-fill"></i>
|
|
||||||
<span>Online</span>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
<i class="ri-wifi-off-line"></i>
|
|
||||||
<span>Nessuna connessione</span>
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<main>
|
<main>
|
||||||
<article>
|
<article>
|
||||||
@Body
|
@Body
|
||||||
@@ -51,13 +31,12 @@
|
|||||||
private string _mainContentClass = "";
|
private string _mainContentClass = "";
|
||||||
|
|
||||||
//Connection state
|
//Connection state
|
||||||
private bool FirstCheck { get; set; } = true;
|
|
||||||
private bool _isNetworkAvailable;
|
private bool _isNetworkAvailable;
|
||||||
private bool _servicesIsDown;
|
private bool _servicesIsDown;
|
||||||
private bool _showWarning;
|
private bool _showWarning;
|
||||||
|
|
||||||
private DateTime _lastApiCheck = DateTime.MinValue;
|
private DateTime _lastApiCheck = DateTime.MinValue;
|
||||||
private const int DelaySeconds = 180;
|
private const int DelaySeconds = 90;
|
||||||
|
|
||||||
private CancellationTokenSource? _cts;
|
private CancellationTokenSource? _cts;
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
@using salesbook.Shared.Core.Dto.Activity
|
@using salesbook.Shared.Core.Dto.Activity
|
||||||
@using salesbook.Shared.Core.Dto.PageState
|
@using salesbook.Shared.Core.Dto.PageState
|
||||||
@using salesbook.Shared.Core.Entity
|
@using salesbook.Shared.Core.Entity
|
||||||
|
@using salesbook.Shared.Core.Interface.System.Network
|
||||||
@using salesbook.Shared.Core.Messages.Activity.Copy
|
@using salesbook.Shared.Core.Messages.Activity.Copy
|
||||||
@using salesbook.Shared.Core.Messages.Activity.New
|
@using salesbook.Shared.Core.Messages.Activity.New
|
||||||
@using salesbook.Shared.Core.Messages.Contact
|
@using salesbook.Shared.Core.Messages.Contact
|
||||||
@@ -13,6 +14,7 @@
|
|||||||
@inject CopyActivityService CopyActivityService
|
@inject CopyActivityService CopyActivityService
|
||||||
@inject NewPushNotificationService NewPushNotificationService
|
@inject NewPushNotificationService NewPushNotificationService
|
||||||
@inject NotificationState Notification
|
@inject NotificationState Notification
|
||||||
|
@inject INetworkService NetworkService
|
||||||
@inject NotificationsLoadedService NotificationsLoadedService
|
@inject NotificationsLoadedService NotificationsLoadedService
|
||||||
|
|
||||||
<div class="container animated-navbar @(IsVisible ? "show-nav" : "hide-nav") @(IsVisible ? PlusVisible ? "with-plus" : "without-plus" : "with-plus")">
|
<div class="container animated-navbar @(IsVisible ? "show-nav" : "hide-nav") @(IsVisible ? PlusVisible ? "with-plus" : "without-plus" : "with-plus")">
|
||||||
@@ -55,8 +57,8 @@
|
|||||||
<MudFab Class="custom-plus-button" Color="Color.Surface" Size="Size.Medium" IconSize="Size.Medium" IconColor="Color.Primary" StartIcon="@Icons.Material.Filled.Add"/>
|
<MudFab Class="custom-plus-button" Color="Color.Surface" Size="Size.Medium" IconSize="Size.Medium" IconColor="Color.Primary" StartIcon="@Icons.Material.Filled.Add"/>
|
||||||
</ActivatorContent>
|
</ActivatorContent>
|
||||||
<ChildContent>
|
<ChildContent>
|
||||||
<MudMenuItem OnClick="() => CreateUser()">Nuovo contatto</MudMenuItem>
|
<MudMenuItem Disabled="!NetworkService.IsNetworkAvailable()" OnClick="() => CreateUser()">Nuovo contatto</MudMenuItem>
|
||||||
<MudMenuItem OnClick="() => CreateActivity()">Nuova attivit<69></MudMenuItem>
|
<MudMenuItem Disabled="!NetworkService.IsNetworkAvailable()" OnClick="() => CreateActivity()">Nuova attivit<69></MudMenuItem>
|
||||||
</ChildContent>
|
</ChildContent>
|
||||||
</MudMenu>
|
</MudMenu>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
.animated-navbar.show-nav { transform: translateY(0); }
|
.animated-navbar.show-nav { transform: translateY(0); }
|
||||||
|
|
||||||
.animated-navbar.hide-nav { transform: translateY(100%); }
|
.animated-navbar.hide-nav { transform: translateY(150%); }
|
||||||
|
|
||||||
.animated-navbar.with-plus { margin-left: 30px; }
|
.animated-navbar.with-plus { margin-left: 30px; }
|
||||||
|
|
||||||
|
|||||||
@@ -4,11 +4,13 @@
|
|||||||
@using salesbook.Shared.Components.SingleElements
|
@using salesbook.Shared.Components.SingleElements
|
||||||
@using salesbook.Shared.Components.SingleElements.BottomSheet
|
@using salesbook.Shared.Components.SingleElements.BottomSheet
|
||||||
@using salesbook.Shared.Core.Dto.Activity
|
@using salesbook.Shared.Core.Dto.Activity
|
||||||
|
@using salesbook.Shared.Core.Dto.PageState
|
||||||
@using salesbook.Shared.Core.Interface
|
@using salesbook.Shared.Core.Interface
|
||||||
@using salesbook.Shared.Core.Messages.Activity.New
|
@using salesbook.Shared.Core.Messages.Activity.New
|
||||||
@inject IManageDataService ManageData
|
@inject IManageDataService ManageData
|
||||||
@inject IJSRuntime JS
|
@inject IJSRuntime JS
|
||||||
@inject NewActivityService NewActivity
|
@inject NewActivityService NewActivity
|
||||||
|
@inject UserListState UserState
|
||||||
|
|
||||||
<HeaderLayout Title="@_headerTitle"
|
<HeaderLayout Title="@_headerTitle"
|
||||||
ShowFilter="true"
|
ShowFilter="true"
|
||||||
@@ -168,7 +170,6 @@
|
|||||||
<FilterActivity @bind-IsSheetVisible="OpenFilter" @bind-Filter="Filter" @bind-Filter:after="ApplyFilter"/>
|
<FilterActivity @bind-IsSheetVisible="OpenFilter" @bind-Filter="Filter" @bind-Filter:after="ApplyFilter"/>
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
|
|
||||||
// Modelli per ottimizzazione rendering
|
// Modelli per ottimizzazione rendering
|
||||||
private record DayData(DateTime Date, string CssClass, bool HasEvents, CategoryData[] EventCategories, string DayName = "");
|
private record DayData(DateTime Date, string CssClass, bool HasEvents, CategoryData[] EventCategories, string DayName = "");
|
||||||
|
|
||||||
@@ -180,7 +181,7 @@
|
|||||||
private string _headerTitle = string.Empty;
|
private string _headerTitle = string.Empty;
|
||||||
private readonly Dictionary<DateTime, List<ActivityDTO>> _eventsCache = new();
|
private readonly Dictionary<DateTime, List<ActivityDTO>> _eventsCache = new();
|
||||||
private readonly Dictionary<DateTime, CategoryData[]> _categoriesCache = new();
|
private readonly Dictionary<DateTime, CategoryData[]> _categoriesCache = new();
|
||||||
private bool _isInitialized = false;
|
private bool _isInitialized;
|
||||||
|
|
||||||
// Stato UI
|
// Stato UI
|
||||||
private bool Expanded { get; set; }
|
private bool Expanded { get; set; }
|
||||||
@@ -221,11 +222,20 @@
|
|||||||
PrepareRenderingData();
|
PrepareRenderingData();
|
||||||
|
|
||||||
NewActivity.OnActivityCreated += async activityId => await OnActivityCreated(activityId);
|
NewActivity.OnActivityCreated += async activityId => await OnActivityCreated(activityId);
|
||||||
|
UserState.OnUsersLoaded += async () => await InvokeAsync(LoadData);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||||
{
|
{
|
||||||
if (firstRender)
|
if (firstRender && UserState.IsLoaded)
|
||||||
|
{
|
||||||
|
await LoadData();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task LoadData()
|
||||||
|
{
|
||||||
|
if (!_isInitialized)
|
||||||
{
|
{
|
||||||
Filter.User = new HashSet<string> { UserSession.User.Username };
|
Filter.User = new HashSet<string> { UserSession.User.Username };
|
||||||
|
|
||||||
@@ -268,7 +278,7 @@
|
|||||||
|
|
||||||
// Raggruppa le attività per data
|
// Raggruppa le attività per data
|
||||||
var activitiesByDate = MonthActivities
|
var activitiesByDate = MonthActivities
|
||||||
.GroupBy(x => (x.EffectiveDate ?? x.EstimatedDate!).Value.Date)
|
.GroupBy(x => (x.EffectiveTime ?? x.EstimatedTime!).Value.Date)
|
||||||
.ToDictionary(g => g.Key, g => g.ToList());
|
.ToDictionary(g => g.Key, g => g.ToList());
|
||||||
|
|
||||||
foreach (var (date, activities) in activitiesByDate)
|
foreach (var (date, activities) in activitiesByDate)
|
||||||
@@ -472,7 +482,7 @@
|
|||||||
var start = CurrentMonth;
|
var start = CurrentMonth;
|
||||||
var end = start.AddDays(DaysInMonth - 1);
|
var end = start.AddDays(DaysInMonth - 1);
|
||||||
var activities = await ManageData.GetActivity(new WhereCondActivity{Start = start, End = end});
|
var activities = await ManageData.GetActivity(new WhereCondActivity{Start = start, End = end});
|
||||||
MonthActivities = activities.OrderBy(x => x.EffectiveDate ?? x.EstimatedDate).ToList();
|
MonthActivities = activities.OrderBy(x => x.EffectiveTime ?? x.EstimatedTime).ToList();
|
||||||
|
|
||||||
PrepareRenderingData();
|
PrepareRenderingData();
|
||||||
IsLoading = false;
|
IsLoading = false;
|
||||||
@@ -564,7 +574,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var date = activity.EffectiveDate ?? activity.EstimatedDate;
|
var date = activity.EffectiveTime ?? activity.EstimatedTime;
|
||||||
|
|
||||||
if (CurrentMonth.Month != date!.Value.Month)
|
if (CurrentMonth.Month != date!.Value.Month)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -80,13 +80,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.day {
|
.day {
|
||||||
background: var(--mud-palette-surface);
|
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: background 0.3s ease, transform 0.2s ease;
|
transition: background 0.3s ease, transform 0.2s ease;
|
||||||
font-size: 0.95rem;
|
font-size: 0.95rem;
|
||||||
box-shadow: var(--custom-box-shadow);
|
background: var(--mud-palette-background-gray);
|
||||||
width: 38px;
|
width: 38px;
|
||||||
height: 38px;
|
height: 38px;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -94,7 +93,7 @@
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
color: var(--mud-palette-text-primary);
|
color: var(--mud-palette-text-primary);
|
||||||
border: 1px solid var(--mud-palette-surface);
|
border: 1px solid var(--mud-palette-background-gray);
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<div class="container content">
|
<div class="container content pb-safe-area">
|
||||||
@if (CommessaModel == null)
|
@if (CommessaModel == null)
|
||||||
{
|
{
|
||||||
<NoDataAvailable Text="Nessuna commessa trovata"/>
|
<NoDataAvailable Text="Nessuna commessa trovata"/>
|
||||||
@@ -149,8 +149,7 @@ else
|
|||||||
await Task.Run(async () =>
|
await Task.Run(async () =>
|
||||||
{
|
{
|
||||||
var activities = await IntegryApiService.RetrieveActivity(new CRMRetrieveActivityRequestDTO { CodJcom = CodJcom });
|
var activities = await IntegryApiService.RetrieveActivity(new CRMRetrieveActivityRequestDTO { CodJcom = CodJcom });
|
||||||
ActivityList = Mapper.Map<List<ActivityDTO>>(activities)
|
ActivityList = (await ManageData.MapActivity(activities)).OrderByDescending(x =>
|
||||||
.OrderBy(x =>
|
|
||||||
(x.EffectiveTime ?? x.EstimatedTime) ?? x.DataInsAct
|
(x.EffectiveTime ?? x.EstimatedTime) ?? x.DataInsAct
|
||||||
).ToList();
|
).ToList();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -118,7 +118,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
width: -webkit-fill-available;
|
width: -webkit-fill-available;
|
||||||
box-shadow: var(--custom-box-shadow);
|
background: var(--light-card-background);
|
||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
overflow: clip;
|
overflow: clip;
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
@@ -135,7 +135,6 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
background: var(--mud-palette-surface);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* la lineetta */
|
/* la lineetta */
|
||||||
|
|||||||
@@ -21,6 +21,8 @@
|
|||||||
{
|
{
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
|
NetworkService.ConnectionAvailable = NetworkService.IsNetworkAvailable();
|
||||||
|
|
||||||
await LoadNotification();
|
await LoadNotification();
|
||||||
await CheckAndRequestPermissions();
|
await CheckAndRequestPermissions();
|
||||||
|
|
||||||
@@ -54,9 +56,6 @@
|
|||||||
private async Task CheckAndRequestPermissions()
|
private async Task CheckAndRequestPermissions()
|
||||||
{
|
{
|
||||||
await NotificationManager.RequestAccess();
|
await NotificationManager.RequestAccess();
|
||||||
|
|
||||||
// if (BatteryOptimizationManagerService.IsBatteryOptimizationEnabled())
|
|
||||||
// BatteryOptimizationManagerService.OpenBatteryOptimizationSettings(_ => { });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private Task StartSyncUser()
|
private Task StartSyncUser()
|
||||||
|
|||||||
@@ -1,11 +1,8 @@
|
|||||||
@page "/login"
|
@page "/login"
|
||||||
@using salesbook.Shared.Components.Layout.Spinner
|
@using salesbook.Shared.Components.Layout.Spinner
|
||||||
@using salesbook.Shared.Core.Interface
|
|
||||||
@using salesbook.Shared.Core.Interface.System.Network
|
|
||||||
@using salesbook.Shared.Core.Services
|
@using salesbook.Shared.Core.Services
|
||||||
@inject IUserAccountService UserAccountService
|
@inject IUserAccountService UserAccountService
|
||||||
@inject AppAuthenticationStateProvider AuthenticationStateProvider
|
@inject AppAuthenticationStateProvider AuthenticationStateProvider
|
||||||
@inject INetworkService NetworkService
|
|
||||||
|
|
||||||
@if (Spinner)
|
@if (Spinner)
|
||||||
{
|
{
|
||||||
@@ -29,7 +26,7 @@ else
|
|||||||
<MudTextField @bind-Value="UserData.CodHash" Label="Profilo azienda" Variant="Variant.Outlined"/>
|
<MudTextField @bind-Value="UserData.CodHash" Label="Profilo azienda" Variant="Variant.Outlined"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<MudButton Disabled="@(!NetworkService.ConnectionAvailable)" OnClick="SignInUser" Color="Color.Primary" Variant="Variant.Filled">Login</MudButton>
|
<MudButton OnClick="SignInUser" Color="Color.Primary" Variant="Variant.Filled">Login</MudButton>
|
||||||
@if (_attemptFailed)
|
@if (_attemptFailed)
|
||||||
{
|
{
|
||||||
<MudAlert Class="my-3" Dense="true" Severity="Severity.Error" Variant="Variant.Filled">@ErrorMessage</MudAlert>
|
<MudAlert Class="my-3" Dense="true" Severity="Severity.Error" Variant="Variant.Filled">@ErrorMessage</MudAlert>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
@if (IsLoggedIn)
|
@if (IsLoggedIn)
|
||||||
{
|
{
|
||||||
<div class="container content">
|
<div class="container content pb-safe-area">
|
||||||
<div class="container-primary-info">
|
<div class="container-primary-info">
|
||||||
<div class="section-primary-info">
|
<div class="section-primary-info">
|
||||||
<MudAvatar Style="height: 70px; width: 70px; font-size: 2rem; font-weight: bold" Color="Color.Secondary">
|
<MudAvatar Style="height: 70px; width: 70px; font-size: 2rem; font-weight: bold" Color="Color.Secondary">
|
||||||
@@ -85,21 +85,21 @@
|
|||||||
FullWidth="true"
|
FullWidth="true"
|
||||||
StartIcon="@Icons.Material.Outlined.Sync"
|
StartIcon="@Icons.Material.Outlined.Sync"
|
||||||
Size="Size.Medium"
|
Size="Size.Medium"
|
||||||
OnClick="() => UpdateDb(true)"
|
OnClick="() => UpdateDb()"
|
||||||
Variant="Variant.Outlined">
|
Variant="Variant.Outlined">
|
||||||
Sincronizza
|
Sincronizza
|
||||||
</MudButton>
|
</MudButton>
|
||||||
|
|
||||||
<div class="divider"></div>
|
@* <div class="divider"></div> *@
|
||||||
|
|
||||||
<MudButton Class="button-settings red-icon"
|
@* <MudButton Class="button-settings red-icon"
|
||||||
FullWidth="true"
|
FullWidth="true"
|
||||||
StartIcon="@Icons.Material.Outlined.Sync"
|
StartIcon="@Icons.Material.Outlined.Sync"
|
||||||
Size="Size.Medium"
|
Size="Size.Medium"
|
||||||
OnClick="() => UpdateDb()"
|
OnClick="() => UpdateDb()"
|
||||||
Variant="Variant.Outlined">
|
Variant="Variant.Outlined">
|
||||||
Ripristina dati
|
Ripristina dati
|
||||||
</MudButton>
|
</MudButton> *@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="container-button">
|
<div class="container-button">
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
.container-primary-info {
|
.container-primary-info {
|
||||||
box-shadow: var(--custom-box-shadow);
|
background: var(--light-card-background);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-bottom: 2rem;
|
margin-bottom: 2rem;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
|
|||||||
@@ -32,10 +32,10 @@
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<div class="container content" style="overflow: auto;" id="topPage">
|
<div class="container content pb-safe-area" style="overflow: auto;" id="topPage">
|
||||||
<div class="container-primary-info">
|
<div class="container-primary-info">
|
||||||
<div class="section-primary-info">
|
<div class="section-primary-info">
|
||||||
<MudAvatar Style="height: 70px; width: 70px; font-size: 2rem; font-weight: bold" Color="Color.Secondary">
|
<MudAvatar Style="height: 70px; width: 70px; font-size: 2rem; font-weight: bold" Variant="@(IsContact ? Variant.Filled : Variant.Outlined)" Color="Color.Secondary">
|
||||||
@UtilityString.ExtractInitials(Anag.RagSoc)
|
@UtilityString.ExtractInitials(Anag.RagSoc)
|
||||||
</MudAvatar>
|
</MudAvatar>
|
||||||
|
|
||||||
@@ -55,44 +55,49 @@ else
|
|||||||
<div class="divider"></div>
|
<div class="divider"></div>
|
||||||
|
|
||||||
<div class="section-info">
|
<div class="section-info">
|
||||||
|
@if (Agente != null)
|
||||||
|
{
|
||||||
<div class="section-personal-info">
|
<div class="section-personal-info">
|
||||||
|
<div>
|
||||||
|
<span class="info-title">Agente</span>
|
||||||
|
<span class="info-text">@Agente.FullName</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
@if (!string.IsNullOrEmpty(Anag.Telefono))
|
@if (!string.IsNullOrEmpty(Anag.Telefono))
|
||||||
{
|
{
|
||||||
|
<div class="section-personal-info">
|
||||||
<div>
|
<div>
|
||||||
<span class="info-title">Telefono</span>
|
<span class="info-title">Telefono</span>
|
||||||
<span class="info-text">@Anag.Telefono</span>
|
<span class="info-text">@Anag.Telefono</span>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
@if (!string.IsNullOrEmpty(Anag.PartIva))
|
@if (!string.IsNullOrEmpty(Anag.PartIva))
|
||||||
{
|
{
|
||||||
|
<div class="section-personal-info">
|
||||||
<div>
|
<div>
|
||||||
<span class="info-title">P. IVA</span>
|
<span class="info-title">P. IVA</span>
|
||||||
<span class="info-text">@Anag.PartIva</span>
|
<span class="info-text">@Anag.PartIva</span>
|
||||||
</div>
|
</div>
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
<div class="section-personal-info">
|
|
||||||
@if (!string.IsNullOrEmpty(Anag.EMail))
|
@if (!string.IsNullOrEmpty(Anag.EMail))
|
||||||
{
|
{
|
||||||
|
<div class="section-personal-info">
|
||||||
<div>
|
<div>
|
||||||
<span class="info-title">E-mail</span>
|
<span class="info-title">E-mail</span>
|
||||||
<span class="info-text">@Anag.EMail</span>
|
<span class="info-text">@Anag.EMail</span>
|
||||||
</div>
|
</div>
|
||||||
}
|
|
||||||
|
|
||||||
@if (Agente != null)
|
|
||||||
{
|
|
||||||
<div>
|
|
||||||
<span class="info-title">Agente</span>
|
|
||||||
<span class="info-text">@Agente.FullName</span>
|
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
|
<div class="tab-section">
|
||||||
<input type="radio" class="tab-toggle" name="tab-toggle" id="tab1" checked="@(ActiveTab == 0)">
|
<input type="radio" class="tab-toggle" name="tab-toggle" id="tab1" checked="@(ActiveTab == 0)">
|
||||||
<input type="radio" class="tab-toggle" name="tab-toggle" id="tab2" checked="@(ActiveTab == 1)">
|
<input type="radio" class="tab-toggle" name="tab-toggle" id="tab2" checked="@(ActiveTab == 1)">
|
||||||
<input type="radio" class="tab-toggle" name="tab-toggle" id="tab3" checked="@(ActiveTab == 2)">
|
<input type="radio" class="tab-toggle" name="tab-toggle" id="tab3" checked="@(ActiveTab == 2)">
|
||||||
@@ -129,9 +134,12 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
<div class="container-button">
|
<div class="container-button">
|
||||||
|
<div class="divider"></div>
|
||||||
|
|
||||||
<MudButton Class="button-settings infoText"
|
<MudButton Class="button-settings infoText"
|
||||||
FullWidth="true"
|
FullWidth="true"
|
||||||
Size="Size.Medium"
|
Size="Size.Medium"
|
||||||
|
StartIcon="@Icons.Material.Rounded.Add"
|
||||||
OnClick="OpenPersRifForm"
|
OnClick="OpenPersRifForm"
|
||||||
Variant="Variant.Outlined">
|
Variant="Variant.Outlined">
|
||||||
Aggiungi contatto
|
Aggiungi contatto
|
||||||
@@ -152,11 +160,13 @@ else
|
|||||||
else if (Commesse != null)
|
else if (Commesse != null)
|
||||||
{
|
{
|
||||||
<!-- Filtri e ricerca -->
|
<!-- Filtri e ricerca -->
|
||||||
<div class="input-card clearButton">
|
<div class="input-card clearButton custom-border-bottom">
|
||||||
<MudTextField T="string?"
|
<MudTextField T="string?"
|
||||||
Placeholder="Cerca..."
|
Placeholder="Cerca..."
|
||||||
Variant="Variant.Text"
|
Variant="Variant.Text"
|
||||||
@bind-Value="SearchTermCommesse"
|
@bind-Value="SearchTermCommesse"
|
||||||
|
AdornmentIcon="@Icons.Material.Rounded.Search"
|
||||||
|
Adornment="Adornment.Start"
|
||||||
OnDebounceIntervalElapsed="() => ApplyFiltersCommesse()"
|
OnDebounceIntervalElapsed="() => ApplyFiltersCommesse()"
|
||||||
DebounceInterval="500"/>
|
DebounceInterval="500"/>
|
||||||
</div>
|
</div>
|
||||||
@@ -222,10 +232,12 @@ else
|
|||||||
else if (ActivityList != null)
|
else if (ActivityList != null)
|
||||||
{
|
{
|
||||||
<!-- Filtri e ricerca -->
|
<!-- Filtri e ricerca -->
|
||||||
<div class="input-card clearButton">
|
<div class="input-card clearButton custom-border-bottom">
|
||||||
<MudTextField T="string?"
|
<MudTextField T="string?"
|
||||||
Placeholder="Cerca..."
|
Placeholder="Cerca..."
|
||||||
Variant="Variant.Text"
|
Variant="Variant.Text"
|
||||||
|
AdornmentIcon="@Icons.Material.Rounded.Search"
|
||||||
|
Adornment="Adornment.Start"
|
||||||
@bind-Value="SearchTermActivity"
|
@bind-Value="SearchTermActivity"
|
||||||
OnDebounceIntervalElapsed="() => ApplyFiltersActivity()"
|
OnDebounceIntervalElapsed="() => ApplyFiltersActivity()"
|
||||||
DebounceInterval="500"/>
|
DebounceInterval="500"/>
|
||||||
@@ -266,6 +278,7 @@ else
|
|||||||
<MudFab Size="Size.Small" Color="Color.Primary" StartIcon="@Icons.Material.Rounded.KeyboardArrowUp"/>
|
<MudFab Size="Size.Small" Color="Color.Primary" StartIcon="@Icons.Material.Rounded.KeyboardArrowUp"/>
|
||||||
</MudScrollToTop>
|
</MudScrollToTop>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
@@ -412,7 +425,7 @@ else
|
|||||||
set
|
set
|
||||||
{
|
{
|
||||||
_filteredActivity = value;
|
_filteredActivity = value;
|
||||||
StateHasChanged();
|
InvokeAsync(StateHasChanged);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -523,8 +536,7 @@ else
|
|||||||
await Task.Run(async () =>
|
await Task.Run(async () =>
|
||||||
{
|
{
|
||||||
var activities = await IntegryApiService.RetrieveActivity(new CRMRetrieveActivityRequestDTO { CodAnag = Anag.CodContact });
|
var activities = await IntegryApiService.RetrieveActivity(new CRMRetrieveActivityRequestDTO { CodAnag = Anag.CodContact });
|
||||||
ActivityList = Mapper.Map<List<ActivityDTO>>(activities)
|
ActivityList = (await ManageData.MapActivity(activities)).OrderByDescending(x =>
|
||||||
.OrderByDescending(x =>
|
|
||||||
(x.EffectiveTime ?? x.EstimatedTime) ?? x.DataInsAct
|
(x.EffectiveTime ?? x.EstimatedTime) ?? x.DataInsAct
|
||||||
).ToList();
|
).ToList();
|
||||||
});
|
});
|
||||||
@@ -773,7 +785,16 @@ else
|
|||||||
{
|
{
|
||||||
var result = await ModalHelpers.OpenUserForm(Dialog, anag);
|
var result = await ModalHelpers.OpenUserForm(Dialog, anag);
|
||||||
|
|
||||||
if (result is { Canceled: false })
|
if (result is { Canceled: false, Data: not null } && result.Data.GetType() == typeof(AnagClie))
|
||||||
|
{
|
||||||
|
var clie = (AnagClie)result.Data;
|
||||||
|
IsContact = true;
|
||||||
|
CodContact = clie.CodAnag!;
|
||||||
|
|
||||||
|
await LoadAnagAsync();
|
||||||
|
SaveDataToSession();
|
||||||
|
}
|
||||||
|
else if (result is { Canceled: false })
|
||||||
{
|
{
|
||||||
await LoadAnagAsync();
|
await LoadAnagAsync();
|
||||||
SaveDataToSession();
|
SaveDataToSession();
|
||||||
@@ -781,4 +802,5 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,11 @@
|
|||||||
|
.tab-section {
|
||||||
|
width: 100%;
|
||||||
|
border-radius: var(--mud-default-borderradius);
|
||||||
|
background: var(--light-card-background);
|
||||||
|
}
|
||||||
|
|
||||||
.container-primary-info {
|
.container-primary-info {
|
||||||
box-shadow: var(--custom-box-shadow);
|
background: var(--light-card-background);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-bottom: 2rem;
|
margin-bottom: 2rem;
|
||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
@@ -39,9 +45,10 @@
|
|||||||
|
|
||||||
.section-info {
|
.section-info {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
padding: .4rem 1.2rem .8rem;
|
padding: .4rem 1.2rem .8rem;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
.section-personal-info {
|
.section-personal-info {
|
||||||
@@ -84,8 +91,9 @@
|
|||||||
|
|
||||||
.container-button {
|
.container-button {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
box-shadow: var(--custom-box-shadow);
|
background: var(--light-card-background);
|
||||||
padding: .25rem 0;
|
padding: 0 !important;
|
||||||
|
padding-bottom: .5rem !important;
|
||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
margin-bottom: 0 !important;
|
margin-bottom: 0 !important;
|
||||||
}
|
}
|
||||||
@@ -137,8 +145,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 1rem;
|
gap: 1rem;
|
||||||
margin-bottom: 1rem;
|
background: var(--light-card-background);
|
||||||
box-shadow: var(--custom-box-shadow);
|
|
||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
max-height: 32vh;
|
max-height: 32vh;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
@@ -146,7 +153,12 @@
|
|||||||
padding: 1rem 0;
|
padding: 1rem 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container-pers-rif::-webkit-scrollbar { display: none; }
|
.container-pers-rif::-webkit-scrollbar { width: 3px; }
|
||||||
|
|
||||||
|
.container-pers-rif::-webkit-scrollbar-thumb {
|
||||||
|
background: #bbb;
|
||||||
|
border-radius: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
.container-pers-rif .divider {
|
.container-pers-rif .divider {
|
||||||
margin: 0 0 0 3.5rem;
|
margin: 0 0 0 3.5rem;
|
||||||
@@ -175,12 +187,14 @@
|
|||||||
/*--------------
|
/*--------------
|
||||||
TabPanel
|
TabPanel
|
||||||
----------------*/
|
----------------*/
|
||||||
|
|
||||||
.box {
|
.box {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
width: -webkit-fill-available;
|
width: -webkit-fill-available;
|
||||||
box-shadow: var(--custom-box-shadow);
|
background: var(--light-card-background);
|
||||||
border-radius: 16px;
|
border-radius: 20px 20px 0 0;
|
||||||
|
border-bottom: .1rem solid var(--card-border-color);
|
||||||
overflow: clip;
|
overflow: clip;
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
}
|
}
|
||||||
@@ -196,7 +210,6 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
background: var(--mud-palette-surface);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* la lineetta */
|
/* la lineetta */
|
||||||
@@ -267,9 +280,7 @@
|
|||||||
|
|
||||||
#tab1:checked ~ .tab-container .tab-content:nth-child(1),
|
#tab1:checked ~ .tab-container .tab-content:nth-child(1),
|
||||||
#tab2:checked ~ .tab-container .tab-content:nth-child(2),
|
#tab2:checked ~ .tab-container .tab-content:nth-child(2),
|
||||||
#tab3:checked ~ .tab-container .tab-content:nth-child(3) {
|
#tab3:checked ~ .tab-container .tab-content:nth-child(3) { display: block; }
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes fade {
|
@keyframes fade {
|
||||||
from {
|
from {
|
||||||
@@ -285,10 +296,6 @@
|
|||||||
|
|
||||||
.custom-pagination ::deep ul { padding-left: 0 !important; }
|
.custom-pagination ::deep ul { padding-left: 0 !important; }
|
||||||
|
|
||||||
.SelectedPageSize {
|
.SelectedPageSize { width: 100%; }
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.FilterSection {
|
.FilterSection { display: flex; }
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
@using salesbook.Shared.Core.Dto
|
|
||||||
@using salesbook.Shared.Core.Dto.Activity
|
@using salesbook.Shared.Core.Dto.Activity
|
||||||
@using salesbook.Shared.Core.Entity
|
@using salesbook.Shared.Core.Entity
|
||||||
@using salesbook.Shared.Core.Helpers.Enum
|
@using salesbook.Shared.Core.Helpers.Enum
|
||||||
@@ -12,7 +11,7 @@
|
|||||||
@switch (Activity.Category)
|
@switch (Activity.Category)
|
||||||
{
|
{
|
||||||
case ActivityCategoryEnum.Commessa:
|
case ActivityCategoryEnum.Commessa:
|
||||||
@Activity.Commessa
|
@Activity.Commessa?.Descrizione
|
||||||
break;
|
break;
|
||||||
case ActivityCategoryEnum.Interna:
|
case ActivityCategoryEnum.Interna:
|
||||||
@Activity.Cliente
|
@Activity.Cliente
|
||||||
|
|||||||
@@ -5,14 +5,23 @@
|
|||||||
padding: .5rem .5rem;
|
padding: .5rem .5rem;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
box-shadow: var(--custom-box-shadow);
|
/*box-shadow: var(--custom-box-shadow);*/
|
||||||
}
|
}
|
||||||
|
|
||||||
.activity-card.memo { border-left: 5px solid var(--mud-palette-info-darken); }
|
.activity-card.memo {
|
||||||
|
border-left: 5px solid var(--mud-palette-info-darken);
|
||||||
|
background-color: hsl(from var(--mud-palette-info-darken) h s 99%);
|
||||||
|
}
|
||||||
|
|
||||||
.activity-card.interna { border-left: 5px solid var(--mud-palette-success-darken); }
|
.activity-card.interna {
|
||||||
|
border-left: 5px solid var(--mud-palette-success-darken);
|
||||||
|
background-color: hsl(from var(--mud-palette-success-darken) h s 99%);
|
||||||
|
}
|
||||||
|
|
||||||
.activity-card.commessa { border-left: 5px solid var(--mud-palette-warning); }
|
.activity-card.commessa {
|
||||||
|
border-left: 5px solid var(--mud-palette-warning);
|
||||||
|
background-color: hsl(from var(--mud-palette-warning) h s 99%);
|
||||||
|
}
|
||||||
|
|
||||||
.activity-left-section {
|
.activity-left-section {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
padding: .5rem .5rem;
|
padding: .5rem .5rem;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
box-shadow: var(--custom-box-shadow);
|
background: var(--light-card-background);
|
||||||
}
|
}
|
||||||
|
|
||||||
.activity-card.memo { border-left: 5px solid var(--mud-palette-info-darken); }
|
.activity-card.memo { border-left: 5px solid var(--mud-palette-info-darken); }
|
||||||
|
|||||||
@@ -5,15 +5,11 @@
|
|||||||
padding: .5rem .5rem;
|
padding: .5rem .5rem;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
box-shadow: var(--custom-box-shadow);
|
|
||||||
|
border-left: 5px solid var(--card-border-color);
|
||||||
|
background-color: hsl(from var(--card-border-color) h s 99%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.activity-card.memo { border-left: 5px solid var(--mud-palette-info-darken); }
|
|
||||||
|
|
||||||
.activity-card.interna { border-left: 5px solid var(--mud-palette-success-darken); }
|
|
||||||
|
|
||||||
.activity-card.commessa { border-left: 5px solid var(--mud-palette-warning); }
|
|
||||||
|
|
||||||
.activity-left-section {
|
.activity-left-section {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@@ -2,8 +2,7 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
padding: 0 .75rem;
|
padding: 0 .5rem;
|
||||||
border-radius: 16px;
|
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
@using Java.Sql
|
||||||
@using salesbook.Shared.Components.Layout.Spinner
|
@using salesbook.Shared.Components.Layout.Spinner
|
||||||
@using salesbook.Shared.Core.Dto.Activity
|
@using salesbook.Shared.Core.Dto.Activity
|
||||||
@using salesbook.Shared.Core.Entity
|
@using salesbook.Shared.Core.Entity
|
||||||
@@ -92,6 +93,9 @@
|
|||||||
|
|
||||||
var difference = DateTime.Now - timestamp.Value;
|
var difference = DateTime.Now - timestamp.Value;
|
||||||
|
|
||||||
|
if (DateTime.Now.Day != timestamp.Value.Day)
|
||||||
|
return timestamp.Value.ToString("dd/MM/yyyy");
|
||||||
|
|
||||||
switch (difference.TotalMinutes)
|
switch (difference.TotalMinutes)
|
||||||
{
|
{
|
||||||
case < 1:
|
case < 1:
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
border-radius: var(--mud-default-borderradius);
|
border-radius: var(--mud-default-borderradius);
|
||||||
box-shadow: var(--custom-box-shadow);
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -39,7 +38,7 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
background: var(--mud-palette-background);
|
background: var(--light-card-background);
|
||||||
transition: transform .2s ease;
|
transition: transform .2s ease;
|
||||||
touch-action: pan-y;
|
touch-action: pan-y;
|
||||||
will-change: transform;
|
will-change: transform;
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
@using System.Globalization
|
@using System.Globalization
|
||||||
@using System.Text.RegularExpressions
|
|
||||||
@using CommunityToolkit.Mvvm.Messaging
|
@using CommunityToolkit.Mvvm.Messaging
|
||||||
@using salesbook.Shared.Components.Layout
|
@using salesbook.Shared.Components.Layout
|
||||||
@using salesbook.Shared.Components.Layout.Overlay
|
@using salesbook.Shared.Components.Layout.Overlay
|
||||||
@@ -21,17 +20,32 @@
|
|||||||
|
|
||||||
<MudDialog Class="customDialog-form">
|
<MudDialog Class="customDialog-form">
|
||||||
<DialogContent>
|
<DialogContent>
|
||||||
<HeaderLayout ShowProfile="false" Cancel="true" OnCancel="() => MudDialog.Cancel()" LabelSave="@LabelSave" OnSave="Save" Title="@(IsNew ? "Nuova" : $"{ActivityModel.ActivityId}")"/>
|
<HeaderLayout ShowProfile="false" Cancel="true" OnCancel="() => MudDialog.Cancel()" LabelSave="@LabelSave"
|
||||||
|
OnSave="Save" Title="@(IsNew ? "Nuova" : $"{ActivityModel.ActivityId}")"/>
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="input-card">
|
<div class="input-card">
|
||||||
<MudTextField ReadOnly="IsView" T="string?" Placeholder="Descrizione" Variant="Variant.Text" Lines="3" @bind-Value="ActivityModel.ActivityDescription" @bind-Value:after="OnAfterChangeValue" DebounceInterval="500" OnDebounceIntervalElapsed="OnAfterChangeValue"/>
|
<MudTextField ReadOnly="IsView" T="string?" Placeholder="Descrizione" Variant="Variant.Text" Lines="3"
|
||||||
|
@bind-Value="ActivityModel.ActivityDescription" @bind-Value:after="OnAfterChangeValue"
|
||||||
|
DebounceInterval="500" OnDebounceIntervalElapsed="OnAfterChangeValue"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container-button">
|
||||||
|
<MudButton Class="button-settings blue-icon"
|
||||||
|
FullWidth="true"
|
||||||
|
StartIcon="@Icons.Material.Rounded.Description"
|
||||||
|
Size="Size.Medium"
|
||||||
|
OnClick="@SuggestActivityDescription"
|
||||||
|
Variant="Variant.Outlined">
|
||||||
|
Suggerisci descrizione
|
||||||
|
</MudButton>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="input-card">
|
<div class="input-card">
|
||||||
<div class="form-container">
|
<div class="form-container">
|
||||||
<MudAutocomplete ReadOnly="IsView" T="string?" Placeholder="Cliente"
|
<MudAutocomplete ReadOnly="IsView" T="string?" Placeholder="Cliente"
|
||||||
SearchFunc="@SearchCliente" @bind-Value="ActivityModel.Cliente" @bind-Value:after="OnClienteChanged"
|
SearchFunc="@SearchCliente" @bind-Value="ActivityModel.Cliente"
|
||||||
|
@bind-Value:after="OnClienteChanged"
|
||||||
CoerceValue="true"/>
|
CoerceValue="true"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -40,18 +54,25 @@
|
|||||||
<div class="form-container">
|
<div class="form-container">
|
||||||
<span class="disable-full-width">Commessa</span>
|
<span class="disable-full-width">Commessa</span>
|
||||||
|
|
||||||
|
@if (ActivityModel.CodJcom != null && SelectedComessa == null)
|
||||||
|
{
|
||||||
|
<MudSkeleton/>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
<MudAutocomplete
|
<MudAutocomplete
|
||||||
Disabled="ActivityModel.Cliente.IsNullOrEmpty()"
|
T="JtbComt?" ReadOnly="IsView"
|
||||||
T="JtbComt?"
|
|
||||||
@bind-Value="SelectedComessa"
|
@bind-Value="SelectedComessa"
|
||||||
@bind-Value:after="OnCommessaSelectedAfter"
|
@bind-Value:after="OnCommessaSelectedAfter"
|
||||||
SearchFunc="SearchCommesseAsync"
|
SearchFunc="SearchCommesseAsync"
|
||||||
ToStringFunc="@(c => c == null ? string.Empty : $"{c.CodJcom} - {c.Descrizione}")"
|
ToStringFunc="@(c => c == null ? string.Empty : $"{c.CodJcom} - {c.Descrizione}")"
|
||||||
Clearable="true"
|
Clearable="true"
|
||||||
|
OnClearButtonClick="OnCommessaClear"
|
||||||
ShowProgressIndicator="true"
|
ShowProgressIndicator="true"
|
||||||
DebounceInterval="300"
|
DebounceInterval="300"
|
||||||
MaxItems="50"
|
MaxItems="50"
|
||||||
Class="customIcon-select" AdornmentIcon="@Icons.Material.Filled.Code"/>
|
Class="customIcon-select" AdornmentIcon="@Icons.Material.Filled.Code"/>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -59,7 +80,10 @@
|
|||||||
<div class="form-container">
|
<div class="form-container">
|
||||||
<span>Inizio</span>
|
<span>Inizio</span>
|
||||||
|
|
||||||
<MudTextField ReadOnly="IsView" T="DateTime?" Format="s" Culture="CultureInfo.CurrentUICulture" InputType="InputType.DateTimeLocal" @bind-Value="ActivityModel.EstimatedTime" @bind-Value:after="OnAfterChangeValue" DebounceInterval="500" OnDebounceIntervalElapsed="OnAfterChangeValue"/>
|
<MudTextField ReadOnly="IsView" T="DateTime?" Format="s" Culture="CultureInfo.CurrentUICulture"
|
||||||
|
InputType="InputType.DateTimeLocal" @bind-Value="ActivityModel.EstimatedTime"
|
||||||
|
@bind-Value:after="OnAfterChangeValue" DebounceInterval="500"
|
||||||
|
OnDebounceIntervalElapsed="OnAfterChangeValue"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="divider"></div>
|
<div class="divider"></div>
|
||||||
@@ -67,7 +91,10 @@
|
|||||||
<div class="form-container">
|
<div class="form-container">
|
||||||
<span>Fine</span>
|
<span>Fine</span>
|
||||||
|
|
||||||
<MudTextField ReadOnly="IsView" T="DateTime?" Format="s" Culture="CultureInfo.CurrentUICulture" InputType="InputType.DateTimeLocal" @bind-Value="ActivityModel.EstimatedEndtime" @bind-Value:after="OnAfterChangeValue" DebounceInterval="500" OnDebounceIntervalElapsed="OnAfterChangeValue"/>
|
<MudTextField ReadOnly="IsView" T="DateTime?" Format="s" Culture="CultureInfo.CurrentUICulture"
|
||||||
|
InputType="InputType.DateTimeLocal" @bind-Value="ActivityModel.EstimatedEndtime"
|
||||||
|
@bind-Value:after="OnAfterChangeValue" DebounceInterval="500"
|
||||||
|
OnDebounceIntervalElapsed="OnAfterChangeValue"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="divider"></div>
|
<div class="divider"></div>
|
||||||
@@ -75,14 +102,31 @@
|
|||||||
<div class="form-container">
|
<div class="form-container">
|
||||||
<span class="disable-full-width">Avviso</span>
|
<span class="disable-full-width">Avviso</span>
|
||||||
|
|
||||||
<MudSelectExtended FullWidth="true" ReadOnly="@(IsView || ActivityModel.EstimatedTime == null)" T="int" Variant="Variant.Text" @bind-Value="ActivityModel.MinuteBefore" @bind-Value:after="OnAfterChangeTimeBefore" Class="customIcon-select" AdornmentIcon="@Icons.Material.Filled.Code">
|
<MudSelectExtended FullWidth="true" ReadOnly="@(IsView || ActivityModel.EstimatedTime == null)"
|
||||||
<MudSelectItemExtended Class="custom-item-select" Text="Nessuno" Value="-1">Nessuno</MudSelectItemExtended>
|
T="int" Variant="Variant.Text" @bind-Value="ActivityModel.MinuteBefore"
|
||||||
<MudSelectItemExtended Class="custom-item-select" Text="All'ora pianificata" Value="0">All'ora pianificata</MudSelectItemExtended>
|
@bind-Value:after="OnAfterChangeTimeBefore" Class="customIcon-select"
|
||||||
<MudSelectItemExtended Class="custom-item-select" Text="30 minuti prima" Value="30">30 minuti prima</MudSelectItemExtended>
|
AdornmentIcon="@Icons.Material.Filled.Code">
|
||||||
<MudSelectItemExtended Class="custom-item-select" Text="1 ora prima" Value="60">1 ora prima</MudSelectItemExtended>
|
<MudSelectItemExtended Class="custom-item-select" Text="Nessuno" Value="-1">
|
||||||
<MudSelectItemExtended Class="custom-item-select" Text="2 ore prima" Value="120">2 ore prima</MudSelectItemExtended>
|
Nessuno
|
||||||
<MudSelectItemExtended Class="custom-item-select" Text="1 giorno prima" Value="1440">1 giorno prima</MudSelectItemExtended>
|
</MudSelectItemExtended>
|
||||||
<MudSelectItemExtended Class="custom-item-select" Text="1 settimana prima" Value="10080">1 settimana prima</MudSelectItemExtended>
|
<MudSelectItemExtended Class="custom-item-select" Text="All'ora pianificata" Value="0">All'ora
|
||||||
|
pianificata
|
||||||
|
</MudSelectItemExtended>
|
||||||
|
<MudSelectItemExtended Class="custom-item-select" Text="30 minuti prima" Value="30">
|
||||||
|
30 minuti prima
|
||||||
|
</MudSelectItemExtended>
|
||||||
|
<MudSelectItemExtended Class="custom-item-select" Text="1 ora prima" Value="60">
|
||||||
|
1 ora prima
|
||||||
|
</MudSelectItemExtended>
|
||||||
|
<MudSelectItemExtended Class="custom-item-select" Text="2 ore prima" Value="120">
|
||||||
|
2 ore prima
|
||||||
|
</MudSelectItemExtended>
|
||||||
|
<MudSelectItemExtended Class="custom-item-select" Text="1 giorno prima" Value="1440">
|
||||||
|
1 giorno prima
|
||||||
|
</MudSelectItemExtended>
|
||||||
|
<MudSelectItemExtended Class="custom-item-select" Text="1 settimana prima" Value="10080">
|
||||||
|
1 settimana prima
|
||||||
|
</MudSelectItemExtended>
|
||||||
</MudSelectExtended>
|
</MudSelectExtended>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -90,19 +134,28 @@
|
|||||||
<div class="input-card">
|
<div class="input-card">
|
||||||
<div class="form-container">
|
<div class="form-container">
|
||||||
<span class="disable-full-width">Assegnata a</span>
|
<span class="disable-full-width">Assegnata a</span>
|
||||||
|
|
||||||
|
@if (ActivityModel.UserName != null && SelectedUser == null)
|
||||||
|
{
|
||||||
|
<MudSkeleton/>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
<MudAutocomplete
|
<MudAutocomplete
|
||||||
Disabled="Users.IsNullOrEmpty()"
|
Disabled="Users.IsNullOrEmpty()" ReadOnly="IsView"
|
||||||
T="StbUser"
|
T="StbUser"
|
||||||
@bind-Value="SelectedUser"
|
@bind-Value="SelectedUser"
|
||||||
@bind-Value:after="OnUserSelectedAfter"
|
@bind-Value:after="OnUserSelectedAfter"
|
||||||
SearchFunc="SearchUtentiAsync"
|
SearchFunc="SearchUtentiAsync"
|
||||||
ToStringFunc="@(u => u == null ? string.Empty : u.FullName)"
|
ToStringFunc="@(u => u == null ? string.Empty : u.FullName)"
|
||||||
Clearable="true"
|
Clearable="true"
|
||||||
|
OnClearButtonClick="OnUserClear"
|
||||||
ShowProgressIndicator="true"
|
ShowProgressIndicator="true"
|
||||||
DebounceInterval="300"
|
DebounceInterval="300"
|
||||||
MaxItems="50"
|
MaxItems="50"
|
||||||
Class="customIcon-select"
|
Class="customIcon-select"
|
||||||
AdornmentIcon="@Icons.Material.Filled.Code"/>
|
AdornmentIcon="@Icons.Material.Filled.Code"/>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="divider"></div>
|
<div class="divider"></div>
|
||||||
@@ -110,12 +163,23 @@
|
|||||||
<div class="form-container">
|
<div class="form-container">
|
||||||
<span class="disable-full-width">Tipo</span>
|
<span class="disable-full-width">Tipo</span>
|
||||||
|
|
||||||
<MudSelectExtended ReadOnly="IsView" FullWidth="true" T="string?" Variant="Variant.Text" @bind-Value="ActivityModel.ActivityTypeId" @bind-Value:after="OnAfterChangeValue" Class="customIcon-select" AdornmentIcon="@Icons.Material.Filled.Code">
|
@if (ActivityType.IsNullOrEmpty())
|
||||||
|
{
|
||||||
|
<MudSkeleton/>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<MudSelectExtended ReadOnly="IsView" FullWidth="true" T="string?" Variant="Variant.Text"
|
||||||
|
@bind-Value="ActivityModel.ActivityTypeId"
|
||||||
|
@bind-Value:after="OnAfterChangeValue" Class="customIcon-select"
|
||||||
|
AdornmentIcon="@Icons.Material.Filled.Code">
|
||||||
@foreach (var type in ActivityType)
|
@foreach (var type in ActivityType)
|
||||||
{
|
{
|
||||||
<MudSelectItemExtended Class="custom-item-select" Value="@type.ActivityTypeId">@type.ActivityTypeId</MudSelectItemExtended>
|
<MudSelectItemExtended Class="custom-item-select"
|
||||||
|
Value="@type.ActivityTypeId">@type.ActivityTypeId</MudSelectItemExtended>
|
||||||
}
|
}
|
||||||
</MudSelectExtended>
|
</MudSelectExtended>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="divider"></div>
|
<div class="divider"></div>
|
||||||
@@ -123,17 +187,23 @@
|
|||||||
<div class="form-container" @onclick="OpenSelectEsito">
|
<div class="form-container" @onclick="OpenSelectEsito">
|
||||||
<span class="disable-full-width">Esito</span>
|
<span class="disable-full-width">Esito</span>
|
||||||
|
|
||||||
<MudSelectExtended ReadOnly="true" FullWidth="true" T="string?" Variant="Variant.Text" @bind-Value="ActivityModel.ActivityResultId" @bind-Value:after="OnAfterChangeValue" Class="customIcon-select" AdornmentIcon="@Icons.Material.Filled.Code">
|
<MudSelectExtended ReadOnly="true" FullWidth="true" T="string?" Variant="Variant.Text"
|
||||||
|
@bind-Value="ActivityModel.ActivityResultId"
|
||||||
|
@bind-Value:after="OnAfterChangeValue" Class="customIcon-select"
|
||||||
|
AdornmentIcon="@Icons.Material.Filled.Code">
|
||||||
@foreach (var result in ActivityResult)
|
@foreach (var result in ActivityResult)
|
||||||
{
|
{
|
||||||
<MudSelectItemExtended Class="custom-item-select" Value="@result.ActivityResultId">@result.ActivityResultId</MudSelectItemExtended>
|
<MudSelectItemExtended Class="custom-item-select"
|
||||||
|
Value="@result.ActivityResultId">@result.ActivityResultId</MudSelectItemExtended>
|
||||||
}
|
}
|
||||||
</MudSelectExtended>
|
</MudSelectExtended>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="input-card">
|
<div class="input-card">
|
||||||
<MudTextField ReadOnly="IsView" T="string?" Placeholder="Note" Variant="Variant.Text" Lines="4" @bind-Value="ActivityModel.Note" @bind-Value:after="OnAfterChangeValue" DebounceInterval="500" OnDebounceIntervalElapsed="OnAfterChangeValue"/>
|
<MudTextField ReadOnly="IsView" T="string?" Placeholder="Note" Variant="Variant.Text" Lines="4"
|
||||||
|
@bind-Value="ActivityModel.Note" @bind-Value:after="OnAfterChangeValue"
|
||||||
|
DebounceInterval="500" OnDebounceIntervalElapsed="OnAfterChangeValue"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="container-chip-attached">
|
<div class="container-chip-attached">
|
||||||
@@ -143,13 +213,15 @@
|
|||||||
{
|
{
|
||||||
@if (item.p.Type == AttachedDTO.TypeAttached.Position)
|
@if (item.p.Type == AttachedDTO.TypeAttached.Position)
|
||||||
{
|
{
|
||||||
<MudChip T="string" Icon="@Icons.Material.Rounded.LocationOn" Color="Color.Success" OnClick="() => OpenPosition(item.p)" OnClose="() => OnRemoveAttached(item.index)">
|
<MudChip T="string" Icon="@Icons.Material.Rounded.LocationOn" Color="Color.Success"
|
||||||
|
OnClick="() => OpenPosition(item.p)" OnClose="() => OnRemoveAttached(item.index)">
|
||||||
@item.p.Description
|
@item.p.Description
|
||||||
</MudChip>
|
</MudChip>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<MudChip T="string" Color="Color.Default" OnClick="() => OpenAttached(item.p)" OnClose="() => OnRemoveAttached(item.index)">
|
<MudChip T="string" Color="Color.Default" OnClick="() => OpenAttached(item.p)"
|
||||||
|
OnClose="() => OnRemoveAttached(item.index)">
|
||||||
@item.p.Name
|
@item.p.Name
|
||||||
</MudChip>
|
</MudChip>
|
||||||
}
|
}
|
||||||
@@ -167,6 +239,8 @@
|
|||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@if (!IsView)
|
||||||
|
{
|
||||||
<div class="container-button">
|
<div class="container-button">
|
||||||
<MudButton Class="button-settings green-icon"
|
<MudButton Class="button-settings green-icon"
|
||||||
FullWidth="true"
|
FullWidth="true"
|
||||||
@@ -202,6 +276,7 @@
|
|||||||
</MudButton>
|
</MudButton>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<MudMessageBox @ref="ConfirmDelete" Class="c-messageBox" Title="Attenzione!" CancelText="Annulla">
|
<MudMessageBox @ref="ConfirmDelete" Class="c-messageBox" Title="Attenzione!" CancelText="Annulla">
|
||||||
@@ -215,36 +290,13 @@
|
|||||||
</MudButton>
|
</MudButton>
|
||||||
</YesButton>
|
</YesButton>
|
||||||
</MudMessageBox>
|
</MudMessageBox>
|
||||||
|
|
||||||
<MudMessageBox @ref="AddNamePosition" Class="c-messageBox" Title="Nome della posizione" CancelText="Annulla">
|
|
||||||
<MessageContent>
|
|
||||||
<MudTextField @bind-Value="NamePosition" Variant="Variant.Outlined"/>
|
|
||||||
</MessageContent>
|
|
||||||
<YesButton>
|
|
||||||
<MudButton Size="Size.Small" Variant="Variant.Filled" Color="Color.Primary"
|
|
||||||
StartIcon="@Icons.Material.Rounded.Check">
|
|
||||||
Salva
|
|
||||||
</MudButton>
|
|
||||||
</YesButton>
|
|
||||||
</MudMessageBox>
|
|
||||||
|
|
||||||
<MudMessageBox @ref="ConfirmMemo" Class="c-messageBox" Title="Attenzione!" CancelText="Annulla">
|
|
||||||
<MessageContent>
|
|
||||||
Vuoi creare un promemoria?
|
|
||||||
</MessageContent>
|
|
||||||
<YesButton>
|
|
||||||
<MudButton Size="Size.Small" Variant="Variant.Filled" Color="Color.Primary"
|
|
||||||
StartIcon="@Icons.Material.Rounded.Check">
|
|
||||||
Crea
|
|
||||||
</MudButton>
|
|
||||||
</YesButton>
|
|
||||||
</MudMessageBox>
|
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
</MudDialog>
|
</MudDialog>
|
||||||
|
|
||||||
<SaveOverlay VisibleOverlay="VisibleOverlay" SuccessAnimation="SuccessAnimation"/>
|
<SaveOverlay VisibleOverlay="VisibleOverlay" SuccessAnimation="SuccessAnimation"/>
|
||||||
|
|
||||||
<SelectEsito @bind-IsSheetVisible="OpenEsito" @bind-ActivityModel="ActivityModel" @bind-ActivityModel:after="OnAfterChangeEsito"/>
|
<SelectEsito @bind-IsSheetVisible="OpenEsito" @bind-ActivityModel="ActivityModel"
|
||||||
|
@bind-ActivityModel:after="OnAfterChangeEsito"/>
|
||||||
|
|
||||||
<AddMemo @bind-IsSheetVisible="OpenAddMemo"/>
|
<AddMemo @bind-IsSheetVisible="OpenAddMemo"/>
|
||||||
|
|
||||||
@@ -279,12 +331,9 @@
|
|||||||
|
|
||||||
//MessageBox
|
//MessageBox
|
||||||
private MudMessageBox ConfirmDelete { get; set; }
|
private MudMessageBox ConfirmDelete { get; set; }
|
||||||
private MudMessageBox ConfirmMemo { get; set; }
|
|
||||||
private MudMessageBox AddNamePosition { get; set; }
|
|
||||||
|
|
||||||
//Attached
|
//Attached
|
||||||
private List<AttachedDTO>? AttachedList { get; set; }
|
private List<AttachedDTO>? AttachedList { get; set; }
|
||||||
private string? NamePosition { get; set; }
|
|
||||||
private bool CanAddPosition { get; set; } = true;
|
private bool CanAddPosition { get; set; } = true;
|
||||||
|
|
||||||
// cache per commesse
|
// cache per commesse
|
||||||
@@ -394,13 +443,15 @@
|
|||||||
{
|
{
|
||||||
return Task.Run(async () =>
|
return Task.Run(async () =>
|
||||||
{
|
{
|
||||||
if (!IsNew && Id != null)
|
SelectedComessa = ActivityModel.Commessa;
|
||||||
ActivityFileList = await IntegryApiService.GetActivityFile(Id);
|
|
||||||
|
|
||||||
Users = await ManageData.GetTable<StbUser>();
|
Users = await ManageData.GetTable<StbUser>();
|
||||||
if (!ActivityModel.UserName.IsNullOrEmpty())
|
if (!ActivityModel.UserName.IsNullOrEmpty())
|
||||||
SelectedUser = Users.FindLast(x => x.UserName.Equals(ActivityModel.UserName));
|
SelectedUser = Users.FindLast(x => x.UserName.Equals(ActivityModel.UserName));
|
||||||
|
|
||||||
|
if (!IsNew && Id != null)
|
||||||
|
ActivityFileList = await IntegryApiService.GetActivityFile(Id);
|
||||||
|
|
||||||
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" });
|
||||||
Pros = await ManageData.GetProspect();
|
Pros = await ManageData.GetProspect();
|
||||||
@@ -421,18 +472,29 @@
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task LoadCommesse()
|
private async Task LoadCommesse(string searchValue)
|
||||||
{
|
{
|
||||||
if (_lastLoadedCodAnag == ActivityModel.CodAnag) return;
|
if (_lastLoadedCodAnag == ActivityModel.CodAnag && searchValue.IsNullOrEmpty()) return;
|
||||||
|
|
||||||
|
if (ActivityModel.CodAnag == null)
|
||||||
|
{
|
||||||
|
Commesse = await ManageData.GetTable<JtbComt>(x =>
|
||||||
|
x.CodJcom.Contains(searchValue) ||
|
||||||
|
x.Descrizione.Contains(searchValue)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
Commesse = await ManageData.GetTable<JtbComt>(x => x.CodAnag == ActivityModel.CodAnag);
|
Commesse = await ManageData.GetTable<JtbComt>(x => x.CodAnag == ActivityModel.CodAnag);
|
||||||
|
}
|
||||||
|
|
||||||
Commesse = Commesse.OrderByDescending(x => x.CodJcom).ToList();
|
Commesse = Commesse.OrderByDescending(x => x.CodJcom).ToList();
|
||||||
_lastLoadedCodAnag = ActivityModel.CodAnag;
|
_lastLoadedCodAnag = ActivityModel.CodAnag;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task<IEnumerable<JtbComt>> SearchCommesseAsync(string value, CancellationToken token)
|
private async Task<IEnumerable<JtbComt>> SearchCommesseAsync(string value, CancellationToken token)
|
||||||
{
|
{
|
||||||
await LoadCommesse();
|
await LoadCommesse(value);
|
||||||
if (Commesse.IsNullOrEmpty()) return [];
|
if (Commesse.IsNullOrEmpty()) return [];
|
||||||
|
|
||||||
IEnumerable<JtbComt> list;
|
IEnumerable<JtbComt> list;
|
||||||
@@ -508,18 +570,37 @@
|
|||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task OnCommessaSelectedAfter()
|
private void OnCommessaSelectedAfter()
|
||||||
{
|
{
|
||||||
var com = SelectedComessa;
|
var com = SelectedComessa;
|
||||||
if (com != null)
|
if (com != null)
|
||||||
{
|
{
|
||||||
ActivityModel.CodJcom = com.CodJcom;
|
ActivityModel.CodJcom = com.CodJcom;
|
||||||
ActivityModel.Commessa = com.Descrizione;
|
ActivityModel.Commessa = com;
|
||||||
|
|
||||||
|
if (com.CodAnag != null)
|
||||||
|
{
|
||||||
|
ActivityModel.CodAnag = com.CodAnag;
|
||||||
|
ActivityModel.Cliente = Clienti
|
||||||
|
.Where(x => x.CodAnag != null && x.CodAnag.Equals(com.CodAnag))
|
||||||
|
.Select(x => x.RagSoc)
|
||||||
|
.FirstOrDefault() ?? Pros
|
||||||
|
.Where(x => x.CodPpro != null && x.CodPpro.Equals(com.CodAnag))
|
||||||
|
.Select(x => x.RagSoc)
|
||||||
|
.FirstOrDefault();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ActivityModel.CodAnag = null;
|
||||||
|
ActivityModel.Cliente = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ActivityModel.CodJcom = null;
|
ActivityModel.CodJcom = null;
|
||||||
ActivityModel.Commessa = null;
|
ActivityModel.Commessa = null;
|
||||||
|
ActivityModel.CodAnag = null;
|
||||||
|
ActivityModel.Cliente = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
OnAfterChangeValue();
|
OnAfterChangeValue();
|
||||||
@@ -532,6 +613,20 @@
|
|||||||
OnAfterChangeValue();
|
OnAfterChangeValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private async Task OnCommessaClear()
|
||||||
|
{
|
||||||
|
ActivityModel.Commessa = null;
|
||||||
|
ActivityModel.CodJcom = null;
|
||||||
|
StateHasChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task OnUserClear()
|
||||||
|
{
|
||||||
|
ActivityModel.UserName = null;
|
||||||
|
ActivityType = [];
|
||||||
|
StateHasChanged();
|
||||||
|
}
|
||||||
|
|
||||||
private void OnAfterChangeTimeBefore()
|
private void OnAfterChangeTimeBefore()
|
||||||
{
|
{
|
||||||
if (ActivityModel.EstimatedTime is not null)
|
if (ActivityModel.EstimatedTime is not null)
|
||||||
@@ -569,6 +664,8 @@
|
|||||||
|
|
||||||
private void OpenSelectEsito()
|
private void OpenSelectEsito()
|
||||||
{
|
{
|
||||||
|
if (IsView) return;
|
||||||
|
|
||||||
if (!IsNew && (ActivityModel.UserName is null || !ActivityModel.UserName.Equals(UserSession.User.Username)))
|
if (!IsNew && (ActivityModel.UserName is null || !ActivityModel.UserName.Equals(UserSession.User.Username)))
|
||||||
{
|
{
|
||||||
Snackbar.Add("Non puoi inserire un esito per un'attività che non ti è stata assegnata.", Severity.Info);
|
Snackbar.Add("Non puoi inserire un esito per un'attività che non ti è stata assegnata.", Severity.Info);
|
||||||
@@ -627,16 +724,8 @@
|
|||||||
var attached = (AttachedDTO)result.Data;
|
var attached = (AttachedDTO)result.Data;
|
||||||
|
|
||||||
if (attached.Type == AttachedDTO.TypeAttached.Position)
|
if (attached.Type == AttachedDTO.TypeAttached.Position)
|
||||||
{
|
|
||||||
CanAddPosition = false;
|
CanAddPosition = false;
|
||||||
|
|
||||||
var resultNamePosition = await AddNamePosition.ShowAsync();
|
|
||||||
|
|
||||||
if (resultNamePosition is true)
|
|
||||||
attached.Description = NamePosition;
|
|
||||||
attached.Name = NamePosition!;
|
|
||||||
}
|
|
||||||
|
|
||||||
AttachedList ??= [];
|
AttachedList ??= [];
|
||||||
AttachedList.Add(attached);
|
AttachedList.Add(attached);
|
||||||
|
|
||||||
@@ -705,4 +794,29 @@
|
|||||||
private static string AdjustCoordinate(double coordinate) =>
|
private static string AdjustCoordinate(double coordinate) =>
|
||||||
coordinate.ToString(CultureInfo.InvariantCulture).Replace(",", ".");
|
coordinate.ToString(CultureInfo.InvariantCulture).Replace(",", ".");
|
||||||
|
|
||||||
|
private async Task SuggestActivityDescription()
|
||||||
|
{
|
||||||
|
if (ActivityModel.ActivityTypeId == null)
|
||||||
|
{
|
||||||
|
Snackbar.Add("Indicare prima il tipo attività", Severity.Error);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
VisibleOverlay = true;
|
||||||
|
StateHasChanged();
|
||||||
|
|
||||||
|
_ = Task.Run(async () =>
|
||||||
|
{
|
||||||
|
var activityDescriptions = await IntegryApiService.SuggestActivityDescription(ActivityModel.ActivityTypeId);
|
||||||
|
|
||||||
|
var modal = ModalHelpers.OpenSuggestActivityDescription(Dialog, activityDescriptions);
|
||||||
|
|
||||||
|
if (modal is { IsCanceled: false, Result: not null })
|
||||||
|
ActivityModel.ActivityDescription = modal.Result.Data!.ToString();
|
||||||
|
|
||||||
|
VisibleOverlay = false;
|
||||||
|
await InvokeAsync(StateHasChanged);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -4,10 +4,18 @@
|
|||||||
@using salesbook.Shared.Components.Layout.Overlay
|
@using salesbook.Shared.Components.Layout.Overlay
|
||||||
@inject IAttachedService AttachedService
|
@inject IAttachedService AttachedService
|
||||||
|
|
||||||
<MudDialog Class="customDialog-form">
|
<MudDialog Class="customDialog-form disable-safe-area">
|
||||||
<DialogContent>
|
<DialogContent>
|
||||||
<HeaderLayout ShowProfile="false" SmallHeader="true" Cancel="true" OnCancel="() => MudDialog.Cancel()" Title="Aggiungi allegati"/>
|
<HeaderLayout ShowProfile="false" SmallHeader="true" Cancel="true" OnCancel="() => MudDialog.Cancel()" Title="@TitleModal"/>
|
||||||
|
|
||||||
|
@if (RequireNewName)
|
||||||
|
{
|
||||||
|
<MudTextField @bind-Value="NewName" Class="px-3" Variant="Variant.Outlined"/>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
@if (!SelectTypePicture)
|
||||||
|
{
|
||||||
<div style="margin-bottom: 1rem;" class="content attached">
|
<div style="margin-bottom: 1rem;" class="content attached">
|
||||||
<MudFab Size="Size.Small" Color="Color.Primary"
|
<MudFab Size="Size.Small" Color="Color.Primary"
|
||||||
StartIcon="@Icons.Material.Rounded.Image"
|
StartIcon="@Icons.Material.Rounded.Image"
|
||||||
@@ -24,7 +32,30 @@
|
|||||||
Label="Posizione" OnClick="OnPosition"/>
|
Label="Posizione" OnClick="OnPosition"/>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<div style="margin-bottom: 1rem;" class="content attached">
|
||||||
|
<MudFab Size="Size.Small" Color="Color.Primary"
|
||||||
|
StartIcon="@Icons.Material.Rounded.CameraAlt"
|
||||||
|
Label="Camera" OnClick="OnCamera"/>
|
||||||
|
|
||||||
|
<MudFab Size="Size.Small" Color="Color.Primary"
|
||||||
|
StartIcon="@Icons.Material.Rounded.Image"
|
||||||
|
Label="Galleria" OnClick="OnGallery"/>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
}
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
|
<DialogActions>
|
||||||
|
@if (RequireNewName)
|
||||||
|
{
|
||||||
|
<MudButton Disabled="NewName.IsNullOrEmpty()" Class="my-3" Size="Size.Small" Variant="Variant.Filled" Color="Color.Primary"
|
||||||
|
StartIcon="@Icons.Material.Rounded.Check" OnClick="OnNewName">
|
||||||
|
Salva
|
||||||
|
</MudButton>
|
||||||
|
}
|
||||||
|
</DialogActions>
|
||||||
</MudDialog>
|
</MudDialog>
|
||||||
|
|
||||||
<SaveOverlay VisibleOverlay="VisibleOverlay" SuccessAnimation="SuccessAnimation"/>
|
<SaveOverlay VisibleOverlay="VisibleOverlay" SuccessAnimation="SuccessAnimation"/>
|
||||||
@@ -40,34 +71,65 @@
|
|||||||
|
|
||||||
private AttachedDTO? Attached { get; set; }
|
private AttachedDTO? Attached { get; set; }
|
||||||
|
|
||||||
|
private bool _requireNewName;
|
||||||
|
private bool RequireNewName
|
||||||
|
{
|
||||||
|
get => _requireNewName;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_requireNewName = value;
|
||||||
|
TitleModal = _requireNewName ? "Nome allegato" : "Aggiungi allegati";
|
||||||
|
StateHasChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private bool SelectTypePicture { get; set; }
|
||||||
|
|
||||||
|
private string TitleModal { get; set; } = "Aggiungi allegati";
|
||||||
|
|
||||||
|
private string? _newName;
|
||||||
|
private string? NewName
|
||||||
|
{
|
||||||
|
get => _newName;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_newName = value;
|
||||||
|
StateHasChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
|
SelectTypePicture = false;
|
||||||
|
RequireNewName = false;
|
||||||
Snackbar.Configuration.PositionClass = Defaults.Classes.Position.TopCenter;
|
Snackbar.Configuration.PositionClass = Defaults.Classes.Position.TopCenter;
|
||||||
|
|
||||||
_ = LoadData();
|
|
||||||
}
|
|
||||||
|
|
||||||
private async Task LoadData()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
private async Task Save()
|
|
||||||
{
|
|
||||||
VisibleOverlay = true;
|
|
||||||
StateHasChanged();
|
|
||||||
|
|
||||||
SuccessAnimation = true;
|
|
||||||
StateHasChanged();
|
|
||||||
|
|
||||||
await Task.Delay(1250);
|
|
||||||
|
|
||||||
MudDialog.Close();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task OnImage()
|
private async Task OnImage()
|
||||||
{
|
{
|
||||||
Attached = await AttachedService.SelectImage();
|
SelectTypePicture = true;
|
||||||
MudDialog.Close(Attached);
|
StateHasChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task OnCamera()
|
||||||
|
{
|
||||||
|
Attached = await AttachedService.SelectImageFromCamera();
|
||||||
|
|
||||||
|
if (Attached != null)
|
||||||
|
{
|
||||||
|
RequireNewName = true;
|
||||||
|
StateHasChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task OnGallery()
|
||||||
|
{
|
||||||
|
Attached = await AttachedService.SelectImageFromGallery();
|
||||||
|
|
||||||
|
if (Attached != null)
|
||||||
|
{
|
||||||
|
RequireNewName = true;
|
||||||
|
StateHasChanged();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task OnFile()
|
private async Task OnFile()
|
||||||
@@ -79,6 +141,43 @@
|
|||||||
private async Task OnPosition()
|
private async Task OnPosition()
|
||||||
{
|
{
|
||||||
Attached = await AttachedService.SelectPosition();
|
Attached = await AttachedService.SelectPosition();
|
||||||
|
|
||||||
|
if (Attached != null)
|
||||||
|
{
|
||||||
|
RequireNewName = true;
|
||||||
|
StateHasChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnNewName()
|
||||||
|
{
|
||||||
|
if (Attached != null)
|
||||||
|
{
|
||||||
|
switch (Attached.Type)
|
||||||
|
{
|
||||||
|
case AttachedDTO.TypeAttached.Position:
|
||||||
|
{
|
||||||
|
CanAddPosition = false;
|
||||||
|
|
||||||
|
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.Document:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new ArgumentOutOfRangeException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
MudDialog.Close(Attached);
|
MudDialog.Close(Attached);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
.content.attached {
|
.content.attached {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
|
||||||
gap: 2rem;
|
gap: 2rem;
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
height: unset;
|
height: unset;
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,19 +87,18 @@
|
|||||||
<div class="form-container">
|
<div class="form-container">
|
||||||
<span class="disable-full-width">Tipo cliente</span>
|
<span class="disable-full-width">Tipo cliente</span>
|
||||||
|
|
||||||
@if (VtbTipi.IsNullOrEmpty())
|
<MudAutocomplete Disabled="VtbTipi.IsNullOrEmpty()" ReadOnly="IsView"
|
||||||
{
|
T="VtbTipi"
|
||||||
<span class="warning-text">Nessun tipo cliente trovato</span>
|
@bind-Value="SelectedType"
|
||||||
}
|
@bind-Value:after="OnTypeSelectedAfter"
|
||||||
else
|
SearchFunc="SearchTypeAsync"
|
||||||
{
|
ToStringFunc="@(u => u == null ? string.Empty : $"{u.CodVtip} - {u.Descrizione}")"
|
||||||
<MudSelectExtended FullWidth="true" ReadOnly="@(IsView || VtbTipi.IsNullOrEmpty())" T="string?" Variant="Variant.Text" @bind-Value="ContactModel.CodVtip" @bind-Value:after="OnAfterChangeValue" Class="customIcon-select" AdornmentIcon="@Icons.Material.Filled.Code">
|
Clearable="true"
|
||||||
@foreach (var tipo in VtbTipi)
|
ShowProgressIndicator="true"
|
||||||
{
|
DebounceInterval="300"
|
||||||
<MudSelectItemExtended Class="custom-item-select" Value="@tipo.CodVtip">@($"{tipo.CodVtip} - {tipo.Descrizione}")</MudSelectItemExtended>
|
MaxItems="50"
|
||||||
}
|
Class="customIcon-select"
|
||||||
</MudSelectExtended>
|
AdornmentIcon="@Icons.Material.Filled.Code" />
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -242,14 +241,18 @@
|
|||||||
<div class="form-container">
|
<div class="form-container">
|
||||||
<span class="disable-full-width">Agente</span>
|
<span class="disable-full-width">Agente</span>
|
||||||
|
|
||||||
<MudSelectExtended FullWidth="true" T="string?" Variant="Variant.Text" NoWrap="true"
|
<MudAutocomplete Disabled="Users.IsNullOrEmpty()" ReadOnly="IsView"
|
||||||
@bind-Value="ContactModel.CodVage" @bind-Value:after="OnAfterChangeValue"
|
T="StbUser"
|
||||||
Class="customIcon-select" AdornmentIcon="@Icons.Material.Filled.Code">
|
@bind-Value="SelectedUser"
|
||||||
@foreach (var user in Users)
|
@bind-Value:after="OnUserSelectedAfter"
|
||||||
{
|
SearchFunc="SearchUtentiAsync"
|
||||||
<MudSelectItemExtended Class="custom-item-select" Value="@user.UserCode">@($"{user.UserCode} - {user.FullName}")</MudSelectItemExtended>
|
ToStringFunc="@(u => u == null ? string.Empty : u.FullName)"
|
||||||
}
|
Clearable="true"
|
||||||
</MudSelectExtended>
|
ShowProgressIndicator="true"
|
||||||
|
DebounceInterval="300"
|
||||||
|
MaxItems="50"
|
||||||
|
Class="customIcon-select"
|
||||||
|
AdornmentIcon="@Icons.Material.Filled.Code" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -268,9 +271,9 @@
|
|||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
<div class="container-button">
|
|
||||||
@if (IsNew)
|
@if (IsNew)
|
||||||
{
|
{
|
||||||
|
<div class="container-button">
|
||||||
<MudButton Class="button-settings gray-icon"
|
<MudButton Class="button-settings gray-icon"
|
||||||
FullWidth="true"
|
FullWidth="true"
|
||||||
StartIcon="@Icons.Material.Filled.PersonAddAlt1"
|
StartIcon="@Icons.Material.Filled.PersonAddAlt1"
|
||||||
@@ -279,11 +282,13 @@
|
|||||||
Variant="Variant.Outlined">
|
Variant="Variant.Outlined">
|
||||||
Persona di riferimento
|
Persona di riferimento
|
||||||
</MudButton>
|
</MudButton>
|
||||||
|
</div>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@if (NetworkService.ConnectionAvailable && !ContactModel.IsContact)
|
@if (NetworkService.ConnectionAvailable && !ContactModel.IsContact)
|
||||||
{
|
{
|
||||||
|
<div class="container-button">
|
||||||
<MudButton Class="button-settings blue-icon"
|
<MudButton Class="button-settings blue-icon"
|
||||||
FullWidth="true"
|
FullWidth="true"
|
||||||
StartIcon="@Icons.Material.Rounded.Sync"
|
StartIcon="@Icons.Material.Rounded.Sync"
|
||||||
@@ -292,9 +297,9 @@
|
|||||||
Variant="Variant.Outlined">
|
Variant="Variant.Outlined">
|
||||||
Converti in cliente
|
Converti in cliente
|
||||||
</MudButton>
|
</MudButton>
|
||||||
}
|
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
|
}
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<MudMessageBox MarkupMessage="new MarkupString(VatMessage)" @ref="CheckVat" Class="c-messageBox" Title="Verifica partita iva" CancelText="@(VatAlreadyRegistered ? "" : "Annulla")">
|
<MudMessageBox MarkupMessage="new MarkupString(VatMessage)" @ref="CheckVat" Class="c-messageBox" Title="Verifica partita iva" CancelText="@(VatAlreadyRegistered ? "" : "Annulla")">
|
||||||
@@ -351,11 +356,17 @@
|
|||||||
private bool OpenSearchAddress { get; set; }
|
private bool OpenSearchAddress { get; set; }
|
||||||
private IndirizzoDTO Address { get; set; }
|
private IndirizzoDTO Address { get; set; }
|
||||||
|
|
||||||
|
//Agente
|
||||||
|
private StbUser? SelectedUser { get; set; }
|
||||||
|
|
||||||
|
//Type
|
||||||
|
private VtbTipi? SelectedType { get; set; }
|
||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
Snackbar.Configuration.PositionClass = Defaults.Classes.Position.TopCenter;
|
Snackbar.Configuration.PositionClass = Defaults.Classes.Position.TopCenter;
|
||||||
|
|
||||||
await LoadData();
|
_ = LoadData();
|
||||||
|
|
||||||
LabelSave = IsNew ? "Aggiungi" : null;
|
LabelSave = IsNew ? "Aggiungi" : null;
|
||||||
}
|
}
|
||||||
@@ -403,7 +414,9 @@
|
|||||||
MudDialog.Close(response);
|
MudDialog.Close(response);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task LoadData()
|
private Task LoadData()
|
||||||
|
{
|
||||||
|
return Task.Run(async () =>
|
||||||
{
|
{
|
||||||
if (IsNew)
|
if (IsNew)
|
||||||
{
|
{
|
||||||
@@ -421,6 +434,7 @@
|
|||||||
Users = await ManageData.GetTable<StbUser>(x => x.KeyGroup == 5);
|
Users = await ManageData.GetTable<StbUser>(x => x.KeyGroup == 5);
|
||||||
Nazioni = await ManageData.GetTable<Nazioni>();
|
Nazioni = await ManageData.GetTable<Nazioni>();
|
||||||
VtbTipi = await ManageData.GetTable<VtbTipi>();
|
VtbTipi = await ManageData.GetTable<VtbTipi>();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnAfterChangeValue()
|
private void OnAfterChangeValue()
|
||||||
@@ -562,9 +576,83 @@
|
|||||||
|
|
||||||
private async Task ConvertProspectToContact()
|
private async Task ConvertProspectToContact()
|
||||||
{
|
{
|
||||||
await IntegryApiService.TransferProspect(new CRMTransferProspectRequestDTO
|
VisibleOverlay = true;
|
||||||
|
StateHasChanged();
|
||||||
|
|
||||||
|
var response = await IntegryApiService.TransferProspect(new CRMTransferProspectRequestDTO
|
||||||
{
|
{
|
||||||
CodPpro = ContactModel.CodContact
|
CodPpro = ContactModel.CodContact
|
||||||
});
|
});
|
||||||
|
|
||||||
|
await ManageData.DeleteProspect(ContactModel.CodContact);
|
||||||
|
|
||||||
|
if (response.AnagClie != null)
|
||||||
|
await ManageData.InsertOrUpdate(response.AnagClie);
|
||||||
|
|
||||||
|
if (response.VtbCliePersRif != null)
|
||||||
|
await ManageData.InsertOrUpdate(response.VtbCliePersRif);
|
||||||
|
|
||||||
|
if (response.VtbDest != null)
|
||||||
|
await ManageData.InsertOrUpdate(response.VtbDest);
|
||||||
|
|
||||||
|
SuccessAnimation = true;
|
||||||
|
StateHasChanged();
|
||||||
|
|
||||||
|
await Task.Delay(1250);
|
||||||
|
MudDialog.Close(response.AnagClie);
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task OnUserSelectedAfter()
|
||||||
|
{
|
||||||
|
ContactModel.CodVage = SelectedUser?.UserCode;
|
||||||
|
OnAfterChangeValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
private Task<IEnumerable<StbUser>> SearchUtentiAsync(string value, CancellationToken token)
|
||||||
|
{
|
||||||
|
IEnumerable<StbUser> list;
|
||||||
|
|
||||||
|
if (string.IsNullOrWhiteSpace(value))
|
||||||
|
{
|
||||||
|
list = Users.OrderBy(u => u.FullName).Take(50);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
list = Users
|
||||||
|
.Where(x => x.UserName.Contains(value, StringComparison.OrdinalIgnoreCase)
|
||||||
|
|| x.FullName.Contains(value, StringComparison.OrdinalIgnoreCase))
|
||||||
|
.OrderBy(u => u.FullName)
|
||||||
|
.Take(50);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Task.FromResult(token.IsCancellationRequested ? [] : list);
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task OnTypeSelectedAfter()
|
||||||
|
{
|
||||||
|
ContactModel.CodVtip = SelectedType?.CodVtip;
|
||||||
|
OnAfterChangeValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
private Task<IEnumerable<VtbTipi>> SearchTypeAsync(string value, CancellationToken token)
|
||||||
|
{
|
||||||
|
IEnumerable<VtbTipi> list = [];
|
||||||
|
|
||||||
|
if (VtbTipi == null) return Task.FromResult(token.IsCancellationRequested ? [] : list);
|
||||||
|
|
||||||
|
if (string.IsNullOrWhiteSpace(value))
|
||||||
|
{
|
||||||
|
list = VtbTipi.OrderBy(u => u.CodVtip);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
list = VtbTipi
|
||||||
|
.Where(x => x.CodVtip.Contains(value, StringComparison.OrdinalIgnoreCase)
|
||||||
|
|| x.Descrizione.Contains(value, StringComparison.OrdinalIgnoreCase))
|
||||||
|
.OrderBy(u => u.CodVtip)
|
||||||
|
.Take(50);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Task.FromResult(token.IsCancellationRequested ? [] : list);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
@using salesbook.Shared.Core.Entity
|
||||||
|
|
||||||
|
<MudDialog OnBackdropClick="Cancel">
|
||||||
|
<DialogContent>
|
||||||
|
@if (!ActivityTypers.IsNullOrEmpty())
|
||||||
|
{
|
||||||
|
<MudList T="string" SelectedValueChanged="OnClickItem">
|
||||||
|
@foreach (var item in ActivityTypers!)
|
||||||
|
{
|
||||||
|
<MudListItem Text="@item.ActivityTypeDescription" Value="item.ActivityTypeDescription"/>
|
||||||
|
}
|
||||||
|
</MudList>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<div class="spinner-container">
|
||||||
|
<MudIcon Size="Size.Large" Color="Color.Error" Icon="@Icons.Material.Rounded.Close"/>
|
||||||
|
<MudText>Nessuna descrizione consigliata</MudText>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
</DialogContent>
|
||||||
|
</MudDialog>
|
||||||
|
|
||||||
|
@code {
|
||||||
|
[CascadingParameter] private IMudDialogInstance MudDialog { get; set; }
|
||||||
|
[Parameter] public List<StbActivityTyper>? ActivityTypers { get; set; }
|
||||||
|
|
||||||
|
private void Cancel() => MudDialog.Cancel();
|
||||||
|
|
||||||
|
private void OnClickItem(string? selectedValue) =>
|
||||||
|
MudDialog.Close(DialogResult.Ok(selectedValue));
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
@@ -6,7 +6,7 @@ namespace salesbook.Shared.Core.Dto.Activity;
|
|||||||
|
|
||||||
public class ActivityDTO : StbActivity
|
public class ActivityDTO : StbActivity
|
||||||
{
|
{
|
||||||
public string? Commessa { get; set; }
|
public JtbComt? Commessa { get; set; }
|
||||||
public string? Cliente { get; set; }
|
public string? Cliente { get; set; }
|
||||||
public ActivityCategoryEnum Category { get; set; }
|
public ActivityCategoryEnum Category { get; set; }
|
||||||
public bool Complete { get; set; }
|
public bool Complete { get; set; }
|
||||||
@@ -18,6 +18,7 @@ public class ActivityDTO : StbActivity
|
|||||||
|
|
||||||
public bool Deleted { get; set; }
|
public bool Deleted { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("stbPosizioni")]
|
||||||
public PositionDTO? Position { get; set; }
|
public PositionDTO? Position { get; set; }
|
||||||
|
|
||||||
public ActivityDTO Clone()
|
public ActivityDTO Clone()
|
||||||
@@ -33,7 +34,7 @@ public class ActivityDTO : StbActivity
|
|||||||
MinuteBefore == other.MinuteBefore &&
|
MinuteBefore == other.MinuteBefore &&
|
||||||
NotificationDate == other.NotificationDate &&
|
NotificationDate == other.NotificationDate &&
|
||||||
Category == other.Category &&
|
Category == other.Category &&
|
||||||
Complete == other.Complete && ActivityId == other.ActivityId && ActivityResultId == other.ActivityResultId && ActivityTypeId == other.ActivityTypeId && DataInsAct.Equals(other.DataInsAct) && ActivityDescription == other.ActivityDescription && ParentActivityId == other.ParentActivityId && TipoAnag == other.TipoAnag && CodAnag == other.CodAnag && CodJcom == other.CodJcom && CodJfas == other.CodJfas && Nullable.Equals(EstimatedDate, other.EstimatedDate) && Nullable.Equals(EstimatedTime, other.EstimatedTime) && Nullable.Equals(AlarmDate, other.AlarmDate) && Nullable.Equals(AlarmTime, other.AlarmTime) && Nullable.Equals(EffectiveDate, other.EffectiveDate) && Nullable.Equals(EffectiveTime, other.EffectiveTime) && ResultDescription == other.ResultDescription && Nullable.Equals(EstimatedEnddate, other.EstimatedEnddate) && Nullable.Equals(EstimatedEndtime, other.EstimatedEndtime) && Nullable.Equals(EffectiveEnddate, other.EffectiveEnddate) && Nullable.Equals(EffectiveEndtime, other.EffectiveEndtime) && UserCreator == other.UserCreator && UserName == other.UserName && Nullable.Equals(PercComp, other.PercComp) && Nullable.Equals(EstimatedHours, other.EstimatedHours) && CodMart == other.CodMart && PartitaMag == other.PartitaMag && Matricola == other.Matricola && Priorita == other.Priorita && Nullable.Equals(ActivityPlayCounter, other.ActivityPlayCounter) && ActivityEvent == other.ActivityEvent && Guarantee == other.Guarantee && Note == other.Note && Rfid == other.Rfid && IdLotto == other.IdLotto && PersonaRif == other.PersonaRif && HrNum == other.HrNum && Gestione == other.Gestione && Nullable.Equals(DataOrd, other.DataOrd) && NumOrd == other.NumOrd && IdStep == other.IdStep && IdRiga == other.IdRiga && Nullable.Equals(OraInsAct, other.OraInsAct) && IndiceGradimento == other.IndiceGradimento && NoteGradimento == other.NoteGradimento && FlagRisolto == other.FlagRisolto && FlagTipologia == other.FlagTipologia && OreRapportino == other.OreRapportino && UserModifier == other.UserModifier && Nullable.Equals(OraModAct, other.OraModAct) && Nullable.Equals(OraViewAct, other.OraViewAct) && CodVdes == other.CodVdes && CodCmac == other.CodCmac && WrikeId == other.WrikeId && CodMgrp == other.CodMgrp && PlanId == other.PlanId;
|
Complete == other.Complete && ActivityId == other.ActivityId && ActivityResultId == other.ActivityResultId && ActivityTypeId == other.ActivityTypeId && DataInsAct.Equals(other.DataInsAct) && ActivityDescription == other.ActivityDescription && ParentActivityId == other.ParentActivityId && TipoAnag == other.TipoAnag && CodAnag == other.CodAnag && CodJcom == other.CodJcom && CodJfas == other.CodJfas && Nullable.Equals(EstimatedTime, other.EstimatedTime) && Nullable.Equals(AlarmDate, other.AlarmDate) && Nullable.Equals(AlarmTime, other.AlarmTime) && Nullable.Equals(EffectiveTime, other.EffectiveTime) && ResultDescription == other.ResultDescription && Nullable.Equals(EstimatedEndtime, other.EstimatedEndtime) && Nullable.Equals(EffectiveEndtime, other.EffectiveEndtime) && UserCreator == other.UserCreator && UserName == other.UserName && Nullable.Equals(PercComp, other.PercComp) && Nullable.Equals(EstimatedHours, other.EstimatedHours) && CodMart == other.CodMart && PartitaMag == other.PartitaMag && Matricola == other.Matricola && Priorita == other.Priorita && Nullable.Equals(ActivityPlayCounter, other.ActivityPlayCounter) && ActivityEvent == other.ActivityEvent && Guarantee == other.Guarantee && Note == other.Note && Rfid == other.Rfid && IdLotto == other.IdLotto && PersonaRif == other.PersonaRif && HrNum == other.HrNum && Gestione == other.Gestione && Nullable.Equals(DataOrd, other.DataOrd) && NumOrd == other.NumOrd && IdStep == other.IdStep && IdRiga == other.IdRiga && Nullable.Equals(OraInsAct, other.OraInsAct) && IndiceGradimento == other.IndiceGradimento && NoteGradimento == other.NoteGradimento && FlagRisolto == other.FlagRisolto && FlagTipologia == other.FlagTipologia && OreRapportino == other.OreRapportino && UserModifier == other.UserModifier && Nullable.Equals(OraModAct, other.OraModAct) && Nullable.Equals(OraViewAct, other.OraViewAct) && CodVdes == other.CodVdes && CodCmac == other.CodCmac && WrikeId == other.WrikeId && CodMgrp == other.CodMgrp && PlanId == other.PlanId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool Equals(object? obj)
|
public override bool Equals(object? obj)
|
||||||
@@ -56,16 +57,12 @@ public class ActivityDTO : StbActivity
|
|||||||
hashCode.Add(CodAnag);
|
hashCode.Add(CodAnag);
|
||||||
hashCode.Add(CodJcom);
|
hashCode.Add(CodJcom);
|
||||||
hashCode.Add(CodJfas);
|
hashCode.Add(CodJfas);
|
||||||
hashCode.Add(EstimatedDate);
|
|
||||||
hashCode.Add(EstimatedTime);
|
hashCode.Add(EstimatedTime);
|
||||||
hashCode.Add(AlarmDate);
|
hashCode.Add(AlarmDate);
|
||||||
hashCode.Add(AlarmTime);
|
hashCode.Add(AlarmTime);
|
||||||
hashCode.Add(EffectiveDate);
|
|
||||||
hashCode.Add(EffectiveTime);
|
hashCode.Add(EffectiveTime);
|
||||||
hashCode.Add(ResultDescription);
|
hashCode.Add(ResultDescription);
|
||||||
hashCode.Add(EstimatedEnddate);
|
|
||||||
hashCode.Add(EstimatedEndtime);
|
hashCode.Add(EstimatedEndtime);
|
||||||
hashCode.Add(EffectiveEnddate);
|
|
||||||
hashCode.Add(EffectiveEndtime);
|
hashCode.Add(EffectiveEndtime);
|
||||||
hashCode.Add(UserCreator);
|
hashCode.Add(UserCreator);
|
||||||
hashCode.Add(UserName);
|
hashCode.Add(UserName);
|
||||||
|
|||||||
@@ -7,4 +7,10 @@ public class CRMTransferProspectResponseDTO
|
|||||||
{
|
{
|
||||||
[JsonPropertyName("anagClie")]
|
[JsonPropertyName("anagClie")]
|
||||||
public AnagClie? AnagClie { get; set; }
|
public AnagClie? AnagClie { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("vtbDest")]
|
||||||
|
public List<VtbDest>? VtbDest { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("vtbCliePersRif")]
|
||||||
|
public List<VtbCliePersRif>? VtbCliePersRif { get; set; }
|
||||||
}
|
}
|
||||||
@@ -7,6 +7,8 @@ public class UserListState
|
|||||||
public List<UserDisplayItem>? GroupedUserList { get; set; }
|
public List<UserDisplayItem>? GroupedUserList { get; set; }
|
||||||
public List<UserDisplayItem>? FilteredGroupedUserList { get; set; }
|
public List<UserDisplayItem>? FilteredGroupedUserList { get; set; }
|
||||||
|
|
||||||
|
public List<ContactDTO>? AllUsers { get; set; }
|
||||||
|
|
||||||
public bool IsLoaded { get; set; }
|
public bool IsLoaded { get; set; }
|
||||||
public bool IsLoading { get; set; }
|
public bool IsLoading { get; set; }
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ public class PositionDTO
|
|||||||
[JsonPropertyName("id")]
|
[JsonPropertyName("id")]
|
||||||
public long? Id { get; set; }
|
public long? Id { get; set; }
|
||||||
|
|
||||||
[JsonPropertyName("description")]
|
[JsonPropertyName("descrizione")]
|
||||||
public string? Description { get; set; }
|
public string? Description { get; set; }
|
||||||
|
|
||||||
[JsonPropertyName("lat")]
|
[JsonPropertyName("lat")]
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|
||||||
|
|||||||
@@ -36,9 +36,6 @@ public class StbActivity
|
|||||||
[Column("cod_jfas"), JsonPropertyName("codJfas")]
|
[Column("cod_jfas"), JsonPropertyName("codJfas")]
|
||||||
public string? CodJfas { get; set; }
|
public string? CodJfas { get; set; }
|
||||||
|
|
||||||
[Column("estimated_date"), JsonPropertyName("estimatedDate")]
|
|
||||||
public DateTime? EstimatedDate { get; set; }
|
|
||||||
|
|
||||||
[Column("estimated_time"), JsonPropertyName("estimatedTime")]
|
[Column("estimated_time"), JsonPropertyName("estimatedTime")]
|
||||||
public DateTime? EstimatedTime { get; set; }
|
public DateTime? EstimatedTime { get; set; }
|
||||||
|
|
||||||
@@ -48,24 +45,15 @@ public class StbActivity
|
|||||||
[Column("alarm_time"), JsonPropertyName("alarmTime")]
|
[Column("alarm_time"), JsonPropertyName("alarmTime")]
|
||||||
public DateTime? AlarmTime { get; set; }
|
public DateTime? AlarmTime { get; set; }
|
||||||
|
|
||||||
[Column("effective_date"), JsonPropertyName("effectiveDate")]
|
|
||||||
public DateTime? EffectiveDate { get; set; }
|
|
||||||
|
|
||||||
[Column("effective_time"), JsonPropertyName("effectiveTime")]
|
[Column("effective_time"), JsonPropertyName("effectiveTime")]
|
||||||
public DateTime? EffectiveTime { get; set; }
|
public DateTime? EffectiveTime { get; set; }
|
||||||
|
|
||||||
[Column("result_description"), JsonPropertyName("resultDescription")]
|
[Column("result_description"), JsonPropertyName("resultDescription")]
|
||||||
public string? ResultDescription { get; set; }
|
public string? ResultDescription { get; set; }
|
||||||
|
|
||||||
[Column("estimated_enddate"), JsonPropertyName("estimatedEnddate")]
|
|
||||||
public DateTime? EstimatedEnddate { get; set; }
|
|
||||||
|
|
||||||
[Column("estimated_endtime"), JsonPropertyName("estimatedEndtime")]
|
[Column("estimated_endtime"), JsonPropertyName("estimatedEndtime")]
|
||||||
public DateTime? EstimatedEndtime { get; set; }
|
public DateTime? EstimatedEndtime { get; set; }
|
||||||
|
|
||||||
[Column("effective_enddate"), JsonPropertyName("effectiveEnddate")]
|
|
||||||
public DateTime? EffectiveEnddate { get; set; }
|
|
||||||
|
|
||||||
[Column("effective_endtime"), JsonPropertyName("effectiveEndtime")]
|
[Column("effective_endtime"), JsonPropertyName("effectiveEndtime")]
|
||||||
public DateTime? EffectiveEndtime { get; set; }
|
public DateTime? EffectiveEndtime { get; set; }
|
||||||
|
|
||||||
@@ -173,4 +161,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; }
|
||||||
}
|
}
|
||||||
18
salesbook.Shared/Core/Entity/StbActivityTyper.cs
Normal file
18
salesbook.Shared/Core/Entity/StbActivityTyper.cs
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace salesbook.Shared.Core.Entity;
|
||||||
|
|
||||||
|
public class StbActivityTyper
|
||||||
|
{
|
||||||
|
[JsonPropertyName("activityTypeId")]
|
||||||
|
public string? ActivityTypeId { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("activityTypeDescription")]
|
||||||
|
public string? ActivityTypeDescription { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("flagTipologia")]
|
||||||
|
public string? FlagTipologia { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("idRiga")]
|
||||||
|
public int IdRiga { get; set; }
|
||||||
|
}
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
using salesbook.Shared.Components.SingleElements.Modal;
|
using salesbook.Shared.Components.SingleElements.Modal;
|
||||||
using salesbook.Shared.Core.Dto;
|
using salesbook.Shared.Core.Dto;
|
||||||
using salesbook.Shared.Core.Dto.Activity;
|
using salesbook.Shared.Core.Dto.Activity;
|
||||||
|
using salesbook.Shared.Core.Entity;
|
||||||
|
|
||||||
namespace salesbook.Shared.Core.Helpers;
|
namespace salesbook.Shared.Core.Helpers;
|
||||||
|
|
||||||
@@ -80,7 +81,29 @@ public class ModalHelpers
|
|||||||
{
|
{
|
||||||
FullScreen = false,
|
FullScreen = false,
|
||||||
CloseButton = false,
|
CloseButton = false,
|
||||||
NoHeader = true
|
NoHeader = true,
|
||||||
|
BackdropClick = false
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
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
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,8 @@ namespace salesbook.Shared.Core.Interface;
|
|||||||
|
|
||||||
public interface IAttachedService
|
public interface IAttachedService
|
||||||
{
|
{
|
||||||
Task<AttachedDTO?> SelectImage();
|
Task<AttachedDTO?> SelectImageFromCamera();
|
||||||
|
Task<AttachedDTO?> SelectImageFromGallery();
|
||||||
Task<AttachedDTO?> SelectFile();
|
Task<AttachedDTO?> SelectFile();
|
||||||
Task<AttachedDTO?> SelectPosition();
|
Task<AttachedDTO?> SelectPosition();
|
||||||
Task OpenFile(Stream file, string fileName);
|
Task OpenFile(Stream file, string fileName);
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ public interface IManageDataService
|
|||||||
|
|
||||||
Task<List<AnagClie>> GetClienti(WhereCondContact? whereCond = null);
|
Task<List<AnagClie>> GetClienti(WhereCondContact? whereCond = null);
|
||||||
Task<List<PtbPros>> GetProspect(WhereCondContact? whereCond = null);
|
Task<List<PtbPros>> GetProspect(WhereCondContact? whereCond = null);
|
||||||
Task<List<ContactDTO>> GetContact(WhereCondContact whereCond);
|
Task<List<ContactDTO>> GetContact(WhereCondContact whereCond, DateTime? lastSync = null);
|
||||||
Task<ContactDTO?> GetSpecificContact(string codAnag, bool IsContact);
|
Task<ContactDTO?> GetSpecificContact(string codAnag, bool IsContact);
|
||||||
|
|
||||||
Task<List<ActivityDTO>> GetActivityTryLocalDb(WhereCondActivity whereCond);
|
Task<List<ActivityDTO>> GetActivityTryLocalDb(WhereCondActivity whereCond);
|
||||||
@@ -21,8 +21,11 @@ public interface IManageDataService
|
|||||||
Task InsertOrUpdate<T>(T objectToSave);
|
Task InsertOrUpdate<T>(T objectToSave);
|
||||||
Task InsertOrUpdate<T>(List<T> listToSave);
|
Task InsertOrUpdate<T>(List<T> listToSave);
|
||||||
|
|
||||||
|
Task DeleteProspect(string codPpro);
|
||||||
Task Delete<T>(T objectToDelete);
|
Task Delete<T>(T objectToDelete);
|
||||||
Task DeleteActivity(ActivityDTO activity);
|
Task DeleteActivity(ActivityDTO activity);
|
||||||
|
|
||||||
|
Task<List<ActivityDTO>> MapActivity(List<StbActivity>? activities);
|
||||||
|
|
||||||
Task ClearDb();
|
Task ClearDb();
|
||||||
}
|
}
|
||||||
@@ -25,15 +25,18 @@ public interface IIntegryApiService
|
|||||||
Task<CRMTransferProspectResponseDTO> TransferProspect(CRMTransferProspectRequestDTO request);
|
Task<CRMTransferProspectResponseDTO> TransferProspect(CRMTransferProspectRequestDTO request);
|
||||||
|
|
||||||
Task UploadFile(string id, byte[] file, string fileName);
|
Task UploadFile(string id, byte[] file, string fileName);
|
||||||
|
Task DeleteFile(string activityId, string fileName);
|
||||||
Task<List<ActivityFileDto>> GetActivityFile(string activityId);
|
Task<List<ActivityFileDto>> GetActivityFile(string activityId);
|
||||||
Task<Stream> DownloadFile(string activityId, string fileName);
|
Task<Stream> DownloadFile(string activityId, string fileName);
|
||||||
Task<Stream> DownloadFileFromRefUuid(string refUuid, string fileName);
|
Task<Stream> DownloadFileFromRefUuid(string refUuid, string fileName);
|
||||||
|
|
||||||
Task<CRMJobProgressResponseDTO> RetrieveJobProgress(string codJcom);
|
Task<CRMJobProgressResponseDTO> RetrieveJobProgress(string codJcom);
|
||||||
|
|
||||||
|
Task<List<StbActivityTyper>?> SuggestActivityDescription(string activityType);
|
||||||
|
|
||||||
//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);
|
||||||
|
|||||||
@@ -72,8 +72,16 @@ public class IntegryApiService(IIntegryApiRestClient integryApiRestClient, IUser
|
|||||||
return integryApiRestClient.AuthorizedGet<object>($"activity/delete", queryParams);
|
return integryApiRestClient.AuthorizedGet<object>($"activity/delete", queryParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Task<List<StbActivity>?> SaveActivity(ActivityDTO activity) =>
|
public Task<List<StbActivity>?> SaveActivity(ActivityDTO activity)
|
||||||
integryApiRestClient.AuthorizedPost<List<StbActivity>?>("crm/saveActivity", activity);
|
{
|
||||||
|
if (activity.CodJcom is null && userSession.ProfileDb != null &&
|
||||||
|
userSession.ProfileDb.Equals("smetar", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
activity.CodJcom = "0000";
|
||||||
|
}
|
||||||
|
|
||||||
|
return integryApiRestClient.AuthorizedPost<List<StbActivity>?>("crm/saveActivity", activity);
|
||||||
|
}
|
||||||
|
|
||||||
public Task<CRMCreateContactResponseDTO?> SaveContact(CRMCreateContactRequestDTO request) =>
|
public Task<CRMCreateContactResponseDTO?> SaveContact(CRMCreateContactRequestDTO request) =>
|
||||||
integryApiRestClient.AuthorizedPost<CRMCreateContactResponseDTO>("crm/createContact", request);
|
integryApiRestClient.AuthorizedPost<CRMCreateContactResponseDTO>("crm/createContact", request);
|
||||||
@@ -127,7 +135,18 @@ public class IntegryApiService(IIntegryApiRestClient integryApiRestClient, IUser
|
|||||||
fileContent.Headers.ContentType = MediaTypeHeaderValue.Parse("multipart/form-data");
|
fileContent.Headers.ContentType = MediaTypeHeaderValue.Parse("multipart/form-data");
|
||||||
content.Add(fileContent, "files", fileName);
|
content.Add(fileContent, "files", fileName);
|
||||||
|
|
||||||
return integryApiRestClient.Post<object>($"uploadStbActivityFileAttachment", content, queryParams);
|
return integryApiRestClient.Post<object>("uploadStbActivityFileAttachment", content, queryParams);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Task DeleteFile(string activityId, string fileName)
|
||||||
|
{
|
||||||
|
var queryParams = new Dictionary<string, object>
|
||||||
|
{
|
||||||
|
{ "activityId", activityId },
|
||||||
|
{ "fileName", fileName }
|
||||||
|
};
|
||||||
|
|
||||||
|
return integryApiRestClient.Get<object>("activity/removeAttachment", queryParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Task<List<ActivityFileDto>> GetActivityFile(string activityId)
|
public Task<List<ActivityFileDto>> GetActivityFile(string activityId)
|
||||||
@@ -157,7 +176,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 } };
|
||||||
|
|
||||||
@@ -170,4 +189,10 @@ public class IntegryApiService(IIntegryApiRestClient integryApiRestClient, IUser
|
|||||||
|
|
||||||
return integryApiRestClient.Get<CRMJobProgressResponseDTO>("crm/retrieveJobProgress", queryParams)!;
|
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 } }
|
||||||
|
);
|
||||||
}
|
}
|
||||||
@@ -25,6 +25,7 @@ public class PreloadService(IManageDataService manageData, UserListState userSta
|
|||||||
|
|
||||||
userState.GroupedUserList = BuildGroupedList(sorted);
|
userState.GroupedUserList = BuildGroupedList(sorted);
|
||||||
userState.FilteredGroupedUserList = userState.GroupedUserList;
|
userState.FilteredGroupedUserList = userState.GroupedUserList;
|
||||||
|
userState.AllUsers = users;
|
||||||
|
|
||||||
userState.NotifyUsersLoaded();
|
userState.NotifyUsersLoaded();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,8 +4,10 @@ namespace salesbook.Shared.Core.Utility;
|
|||||||
|
|
||||||
public static class UtilityString
|
public static class UtilityString
|
||||||
{
|
{
|
||||||
public static string ExtractInitials(string fullname)
|
public static string ExtractInitials(string? fullname)
|
||||||
{
|
{
|
||||||
|
if (fullname == null) return "";
|
||||||
|
|
||||||
return string.Concat(fullname
|
return string.Concat(fullname
|
||||||
.Split(' ', StringSplitOptions.RemoveEmptyEntries)
|
.Split(' ', StringSplitOptions.RemoveEmptyEntries)
|
||||||
.Take(3)
|
.Take(3)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.Razor">
|
<Project Sdk="Microsoft.NET.Sdk.Razor">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net9.0</TargetFramework>
|
<TargetFramework>net9.0</TargetFramework>
|
||||||
@@ -22,15 +22,16 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="AutoMapper" Version="14.0.0" />
|
<PackageReference Include="AutoMapper" Version="14.0.0" />
|
||||||
<PackageReference Include="CodeBeam.MudBlazor.Extensions" Version="8.2.2" />
|
<PackageReference Include="CodeBeam.MudBlazor.Extensions" Version="8.2.4" />
|
||||||
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.0" />
|
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.0" />
|
||||||
<PackageReference Include="IntegryApiClient.Core" Version="1.2.1" />
|
<PackageReference Include="IntegryApiClient.Core" Version="1.2.2" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="9.0.6" />
|
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="9.0.10" />
|
||||||
<PackageReference Include="Microsoft.Maui.Essentials" Version="9.0.81" />
|
<PackageReference Include="Microsoft.Maui.Essentials" Version="9.0.120" />
|
||||||
<PackageReference Include="sqlite-net-pcl" Version="1.9.172" />
|
<PackageReference Include="SourceGear.sqlite3" Version="3.50.4.2" />
|
||||||
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.12.1" />
|
<PackageReference Include="sqlite-net-e" Version="1.10.0-beta2" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="9.0.6" />
|
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.14.0" />
|
||||||
<PackageReference Include="MudBlazor" Version="8.6.0" />
|
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="9.0.10" />
|
||||||
|
<PackageReference Include="MudBlazor" Version="8.13.0" />
|
||||||
<PackageReference Include="MudBlazor.ThemeManager" Version="3.0.0" />
|
<PackageReference Include="MudBlazor.ThemeManager" Version="3.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
html { overflow: hidden; }
|
html { overflow: hidden; }
|
||||||
|
|
||||||
.page, article, main { height: 100% !important; }
|
.page, article, main { height: 100% !important; overflow: hidden; }
|
||||||
|
|
||||||
#app { height: 100vh; }
|
#app { height: 100vh; }
|
||||||
|
|
||||||
@@ -58,7 +58,7 @@ article {
|
|||||||
transform: translateY(0);
|
transform: translateY(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
.page > .Connection.Hide ~ main {
|
.Connection.Hide ~ .page {
|
||||||
transition: all 0.5s ease;
|
transition: all 0.5s ease;
|
||||||
transform: translateY(-35px);
|
transform: translateY(-35px);
|
||||||
}
|
}
|
||||||
@@ -268,8 +268,7 @@ h1:focus { outline: none; }
|
|||||||
|
|
||||||
#app {
|
#app {
|
||||||
margin-top: env(safe-area-inset-top);
|
margin-top: env(safe-area-inset-top);
|
||||||
margin-bottom: env(safe-area-inset-bottom);
|
height: calc(100vh - env(safe-area-inset-top));
|
||||||
height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.flex-column, .navbar-brand { padding-left: env(safe-area-inset-left); }
|
.flex-column, .navbar-brand { padding-left: env(safe-area-inset-left); }
|
||||||
|
|||||||
@@ -8,4 +8,6 @@
|
|||||||
--mud-default-borderradius: 20px !important;
|
--mud-default-borderradius: 20px !important;
|
||||||
--m-page-x: 1rem;
|
--m-page-x: 1rem;
|
||||||
--mh-header: 4rem;
|
--mh-header: 4rem;
|
||||||
|
|
||||||
|
--light-card-background: hsl(from var(--mud-palette-background-gray) h s 97%);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,10 @@
|
|||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.customDialog-form.disable-safe-area .mud-dialog-content { margin-top: unset !important; }
|
||||||
|
|
||||||
|
.customDialog-form.disable-safe-area .content { height: 100% !important; }
|
||||||
|
|
||||||
.customDialog-form .content {
|
.customDialog-form .content {
|
||||||
height: calc(100vh - (.6rem + 40px));
|
height: calc(100vh - (.6rem + 40px));
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
@@ -12,6 +16,14 @@
|
|||||||
scrollbar-width: none;
|
scrollbar-width: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@supports (-webkit-touch-callout: none) {
|
||||||
|
.customDialog-form .content { height: calc(100vh - (.6rem + 40px) - env(safe-area-inset-top)) !important; }
|
||||||
|
|
||||||
|
.customDialog-form.disable-safe-area .content { height: 100% !important; }
|
||||||
|
|
||||||
|
.customDialog-form.disable-safe-area .mud-dialog-content { margin-top: unset !important; }
|
||||||
|
}
|
||||||
|
|
||||||
.customDialog-form .header { padding: 0 !important; }
|
.customDialog-form .header { padding: 0 !important; }
|
||||||
|
|
||||||
.customDialog-form .content::-webkit-scrollbar { display: none; }
|
.customDialog-form .content::-webkit-scrollbar { display: none; }
|
||||||
@@ -31,6 +43,8 @@
|
|||||||
padding: .4rem 1rem !important;
|
padding: .4rem 1rem !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.input-card.clearButton.custom-border-bottom { border-bottom: .1rem solid var(--card-border-color); }
|
||||||
|
|
||||||
.input-card > .divider { margin: 0 !important; }
|
.input-card > .divider { margin: 0 !important; }
|
||||||
|
|
||||||
.form-container {
|
.form-container {
|
||||||
@@ -92,7 +106,7 @@
|
|||||||
|
|
||||||
.container-button {
|
.container-button {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
box-shadow: var(--custom-box-shadow);
|
background: var(--light-card-background);
|
||||||
padding: .5rem 0;
|
padding: .5rem 0;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
margin-bottom: 2rem;
|
margin-bottom: 2rem;
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ public class ManageDataService : IManageDataService
|
|||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Task<List<ContactDTO>> GetContact(WhereCondContact whereCond)
|
public Task<List<ContactDTO>> GetContact(WhereCondContact whereCond, DateTime? lastSync = null)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
@@ -54,6 +54,11 @@ public class ManageDataService : IManageDataService
|
|||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Task DeleteProspect(string codPpro)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
public Task Delete<T>(T objectToDelete)
|
public Task Delete<T>(T objectToDelete)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
@@ -64,6 +69,11 @@ public class ManageDataService : IManageDataService
|
|||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Task<List<ActivityDTO>> MapActivity(List<StbActivity>? activities)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
public Task ClearDb()
|
public Task ClearDb()
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
|
|||||||
@@ -16,10 +16,10 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="IntegryApiClient.Blazor" Version="1.2.1" />
|
<PackageReference Include="IntegryApiClient.Blazor" Version="1.2.2" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="9.0.6" />
|
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="9.0.10" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="9.0.6" />
|
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="9.0.10" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="9.0.6" />
|
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="9.0.10" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
Reference in New Issue
Block a user