diff --git a/salesbook.Maui/MauiProgram.cs b/salesbook.Maui/MauiProgram.cs index 32b4cc2..0c5db24 100644 --- a/salesbook.Maui/MauiProgram.cs +++ b/salesbook.Maui/MauiProgram.cs @@ -27,9 +27,17 @@ namespace salesbook.Maui var builder = MauiApp.CreateBuilder(); builder .UseMauiApp() + .UseIntegry(appToken: AppToken, useLoginAzienda: true) .UseMauiCommunityToolkit() - .ConfigureFonts(fonts => { fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"); }) - .UseLoginAzienda(AppToken); + .UseSentry(options => + { + options.Dsn = "https://453b6b38f94fd67e40e0d5306d6caff8@o4508499810254848.ingest.de.sentry.io/4509605099667536"; +#if DEBUG + options.Debug = true; +#endif + options.TracesSampleRate = 1.0; + }) + .ConfigureFonts(fonts => { fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"); }); builder.Services.AddMauiBlazorWebView(); builder.Services.AddMudServices(); diff --git a/salesbook.Maui/salesbook.Maui.csproj b/salesbook.Maui/salesbook.Maui.csproj index 28e90f1..ba13872 100644 --- a/salesbook.Maui/salesbook.Maui.csproj +++ b/salesbook.Maui/salesbook.Maui.csproj @@ -29,8 +29,8 @@ it.integry.salesbook - 1.0.0 - 2 + 1.0.1 + 4 14.2 - + true true true - + 14.2 $(DefineConstants);APPLE;PLATFORM @@ -85,8 +82,7 @@ VS: WildCard Development - + - + @@ -122,14 +118,15 @@ - + - - - - - - + + + + + + + diff --git a/salesbook.Shared/Components/Layout/NavMenu.razor b/salesbook.Shared/Components/Layout/NavMenu.razor index 94e37c9..1d7ecef 100644 --- a/salesbook.Shared/Components/Layout/NavMenu.razor +++ b/salesbook.Shared/Components/Layout/NavMenu.razor @@ -46,7 +46,7 @@ Nuovo contatto - Nuova attività + Nuova attività } diff --git a/salesbook.Shared/Components/Pages/Calendar.razor b/salesbook.Shared/Components/Pages/Calendar.razor index 1f8eca0..25046b8 100644 --- a/salesbook.Shared/Components/Pages/Calendar.razor +++ b/salesbook.Shared/Components/Pages/Calendar.razor @@ -372,7 +372,9 @@ filteredActivity = filteredActivity .Where(x => Filter.Category == null || x.Category.Equals(Filter.Category)); - return filteredActivity.ToList(); + return filteredActivity + .OrderBy(x => x.EffectiveTime ?? x.EstimatedTime) + .ToList(); } [JSInvokable] diff --git a/salesbook.Shared/Components/Pages/User.razor b/salesbook.Shared/Components/Pages/User.razor index 5b72eac..a89e00d 100644 --- a/salesbook.Shared/Components/Pages/User.razor +++ b/salesbook.Shared/Components/Pages/User.razor @@ -68,31 +68,40 @@ else - @if (PersRif is { Count: > 0 }) - { -
- - @{ - var index = PersRif.IndexOf(person); - var isLast = index == PersRif.Count - 1; - } - - @if (!isLast) - { -
- } -
-
- } + + + @if (PersRif is { Count: > 0 }) + { +
+ + @{ + var index = PersRif.IndexOf(person); + var isLast = index == PersRif.Count - 1; + } + + @if (!isLast) + { +
+ } +
+
+ } -
- - Aggiungi contatto - -
+
+ + Aggiungi contatto + +
+
+ + + + + +
} @@ -101,6 +110,7 @@ else private AnagClie Anag { get; set; } = new(); private List? PersRif { get; set; } + private List Commesse { get; set; } private bool IsLoading { get; set; } = true; @@ -113,6 +123,7 @@ else { Anag = (await ManageData.GetTable(x => x.CodAnag.Equals(CodAnag))).Last(); PersRif = await ManageData.GetTable(x => x.CodAnag.Equals(Anag.CodAnag)); + Commesse = await ManageData.GetTable(x => x.CodAnag != null && x.CodAnag.Equals(CodAnag)); IsLoading = false; StateHasChanged(); diff --git a/salesbook.Shared/Components/Pages/Users.razor b/salesbook.Shared/Components/Pages/Users.razor index e551522..fe47f91 100644 --- a/salesbook.Shared/Components/Pages/Users.razor +++ b/salesbook.Shared/Components/Pages/Users.razor @@ -1,15 +1,17 @@ @page "/Users" @attribute [Authorize] @using salesbook.Shared.Components.Layout +@using salesbook.Shared.Core.Dto @using salesbook.Shared.Core.Entity @using salesbook.Shared.Core.Interface +@using salesbook.Shared.Components.SingleElements.BottomSheet @inject IManageDataService ManageData - + -
- - - -
-
Assegnata a @@ -35,7 +29,7 @@ FullWidth="true" T="string" Variant="Variant.Text" Virtualize="true" - @bind-SelectedValues="Filter.User" + @bind-SelectedValues="FilterActivity.User" Class="customIcon-select" AdornmentIcon="@Icons.Material.Filled.Code"/> @@ -49,7 +43,7 @@ @foreach (var type in ActivityType) @@ -67,7 +61,7 @@ @foreach (var result in ActivityResult) @@ -85,7 +79,7 @@ @foreach (var category in CategoryList) @@ -97,7 +91,7 @@
- Pulisci + Pulisci Filtra
@@ -107,8 +101,10 @@ [Parameter] public bool IsSheetVisible { get; set; } [Parameter] public EventCallback IsSheetVisibleChanged { get; set; } - [Parameter] public FilterActivityDTO Filter { get; set; } - [Parameter] public EventCallback FilterChanged { get; set; } + [Parameter] public FilterUserDTO Filter { get; set; } + [Parameter] public EventCallback FilterChanged { get; set; } + + private FilterActivityDTO FilterActivity { get; set; } = new(); private List ActivityResult { get; set; } = []; private List ActivityType { get; set; } = []; diff --git a/salesbook.Shared/Components/SingleElements/BottomSheet/SelectEsito.razor b/salesbook.Shared/Components/SingleElements/BottomSheet/SelectEsito.razor index 670159d..ff98a7c 100644 --- a/salesbook.Shared/Components/SingleElements/BottomSheet/SelectEsito.razor +++ b/salesbook.Shared/Components/SingleElements/BottomSheet/SelectEsito.razor @@ -1,5 +1,4 @@ -@using System.Threading.Channels -@using salesbook.Shared.Core.Dto +@using salesbook.Shared.Core.Dto @using salesbook.Shared.Core.Entity @using salesbook.Shared.Core.Interface @inject IManageDataService ManageData @@ -12,7 +11,7 @@ Esito - +
diff --git a/salesbook.Shared/Components/SingleElements/Card/CommessaCard.razor b/salesbook.Shared/Components/SingleElements/Card/CommessaCard.razor new file mode 100644 index 0000000..5cb7e23 --- /dev/null +++ b/salesbook.Shared/Components/SingleElements/Card/CommessaCard.razor @@ -0,0 +1,24 @@ +@using salesbook.Shared.Core.Entity + +
+
+
+
+ @Commessa.Descrizione +
+ + @Commessa.CodJcom + +
+
+
+
+ +
+ Stato +
+
+ +@code { + [Parameter] public JtbComt Commessa { get; set; } = new(); +} \ No newline at end of file diff --git a/salesbook.Shared/Components/SingleElements/Card/CommessaCard.razor.css b/salesbook.Shared/Components/SingleElements/Card/CommessaCard.razor.css new file mode 100644 index 0000000..947044b --- /dev/null +++ b/salesbook.Shared/Components/SingleElements/Card/CommessaCard.razor.css @@ -0,0 +1,59 @@ +.activity-card { + width: 100%; + display: flex; + flex-direction: column; + padding: .5rem .5rem; + border-radius: 12px; + line-height: normal; + box-shadow: var(--custom-box-shadow); +} + +.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 { + display: flex; + align-items: center; + margin-left: 4px; +} + +.title-section { + display: flex; + flex-direction: row; + justify-content: space-between; + width: 100%; +} + +.activity-hours { + font-weight: 700; + color: var(--mud-palette-text-primary); +} + +.activity-hours-section ::deep .mud-chip { margin: 5px 0 0 !important; } + +.activity-body-section { + width: 100%; + display: flex; + flex-direction: column; +} + +.title-section ::deep > .activity-title { + font-weight: 800 !important; + margin: 0 !important; + line-height: normal !important; + color: var(--mud-palette-text-primary); +} + +.activity-body-section ::deep > .activity-subtitle { + color: var(--mud-palette-gray-darker); + margin: .2rem 0 !important; + line-height: normal !important; +} + +.activity-info-section { + display: flex; + flex-wrap: wrap; +} \ No newline at end of file diff --git a/salesbook.Shared/Components/SingleElements/Modal/ActivityForm.razor b/salesbook.Shared/Components/SingleElements/Modal/ActivityForm.razor index dab39d0..91c53a0 100644 --- a/salesbook.Shared/Components/SingleElements/Modal/ActivityForm.razor +++ b/salesbook.Shared/Components/SingleElements/Modal/ActivityForm.razor @@ -149,17 +149,31 @@ + StartIcon="@Icons.Material.Filled.Check"> Cancella + + + + Vuoi creare un promemoria? + + + + Crea + + + - + + + @code { [CascadingParameter] private IMudDialogInstance MudDialog { get; set; } @@ -186,12 +200,17 @@ private bool VisibleOverlay { get; set; } private bool SuccessAnimation { get; set; } - private bool OpenEsito { get; set; } = false; + private bool OpenEsito { get; set; } + private bool OpenAddMemo { get; set; } + //MessageBox private MudMessageBox ConfirmDelete { get; set; } + private MudMessageBox ConfirmMemo { get; set; } protected override async Task OnInitializedAsync() { + Snackbar.Configuration.PositionClass = Defaults.Classes.Position.TopCenter; + _ = LoadData(); LabelSave = IsNew ? "Aggiungi" : null; @@ -243,7 +262,6 @@ private bool CheckPreSave() { Snackbar.Clear(); - Snackbar.Configuration.PositionClass = Defaults.Classes.Position.TopCenter; if (!ActivityModel.ActivityTypeId.IsNullOrEmpty()) return true; Snackbar.Add("Tipo attività obbligatorio!", Severity.Error); @@ -317,9 +335,23 @@ } } + private async Task OnAfterChangeEsito() + { + OnAfterChangeValue(); + + // var result = await ConfirmMemo.ShowAsync(); + + // if (result is true) + // OpenAddMemo = !OpenAddMemo; + } + private void OpenSelectEsito() { - if (!IsNew && (ActivityModel.UserName is null || !ActivityModel.UserName.Equals(UserSession.User.Username))) return; + 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); + return; + } OpenEsito = !OpenEsito; StateHasChanged(); diff --git a/salesbook.Shared/Components/SingleElements/ExceptionModal.razor b/salesbook.Shared/Components/SingleElements/Modal/ExceptionModal/ExceptionModal.razor similarity index 93% rename from salesbook.Shared/Components/SingleElements/ExceptionModal.razor rename to salesbook.Shared/Components/SingleElements/Modal/ExceptionModal/ExceptionModal.razor index 98df329..ab1a6e1 100644 --- a/salesbook.Shared/Components/SingleElements/ExceptionModal.razor +++ b/salesbook.Shared/Components/SingleElements/Modal/ExceptionModal/ExceptionModal.razor @@ -1,6 +1,3 @@ -@using salesbook.Shared.Core.Services -@inject AppAuthenticationStateProvider AuthenticationStateProvider -
diff --git a/salesbook.Shared/Components/SingleElements/ExceptionModal.razor.css b/salesbook.Shared/Components/SingleElements/Modal/ExceptionModal/ExceptionModal.razor.css similarity index 100% rename from salesbook.Shared/Components/SingleElements/ExceptionModal.razor.css rename to salesbook.Shared/Components/SingleElements/Modal/ExceptionModal/ExceptionModal.razor.css diff --git a/salesbook.Shared/Core/Dto/FilterUserDTO.cs b/salesbook.Shared/Core/Dto/FilterUserDTO.cs new file mode 100644 index 0000000..1567c59 --- /dev/null +++ b/salesbook.Shared/Core/Dto/FilterUserDTO.cs @@ -0,0 +1,5 @@ +namespace salesbook.Shared.Core.Dto; + +public class FilterUserDTO +{ +} diff --git a/salesbook.Shared/salesbook.Shared.csproj b/salesbook.Shared/salesbook.Shared.csproj index def8127..7cf8a8b 100644 --- a/salesbook.Shared/salesbook.Shared.csproj +++ b/salesbook.Shared/salesbook.Shared.csproj @@ -14,11 +14,11 @@ - - + + - - + + diff --git a/salesbook.Web/Program.cs b/salesbook.Web/Program.cs index 5d36bc4..cbb65dc 100644 --- a/salesbook.Web/Program.cs +++ b/salesbook.Web/Program.cs @@ -22,7 +22,8 @@ builder.Services.AddScoped(); builder.Services.AddScoped(); builder.Services.AddScoped(provider => provider.GetRequiredService()); -builder.Services.UseLoginAzienda("f0484398-1f8b-42f5-ab79-5282c164e1d8"); +const string appToken = "f0484398-1f8b-42f5-ab79-5282c164e1d8"; +builder.Services.UseIntegry(appToken: appToken, useLoginAzienda: true); builder.RootComponents.Add("#app"); builder.RootComponents.Add("head::after"); diff --git a/salesbook.Web/salesbook.Web.csproj b/salesbook.Web/salesbook.Web.csproj index 7fe4343..45301e1 100644 --- a/salesbook.Web/salesbook.Web.csproj +++ b/salesbook.Web/salesbook.Web.csproj @@ -16,10 +16,10 @@ - - - - + + + +