1 Commits

Author SHA1 Message Date
ca6be0c0a8 Iniziata implementazione filtri utenti 2025-07-03 11:36:44 +02:00
25 changed files with 180 additions and 174 deletions

View File

@@ -4,12 +4,17 @@ namespace salesbook.Maui
{ {
public partial class App : Application public partial class App : Application
{ {
private readonly IMessenger _messenger;
public App(IMessenger messenger) public App(IMessenger messenger)
{ {
InitializeComponent(); InitializeComponent();
_messenger = messenger;
}
MainPage = new NavigationPage(new MainPage(messenger)); protected override Window CreateWindow(IActivationState? activationState)
{
return new Window(new MainPage(_messenger));
} }
} }
} }

View File

@@ -1,15 +0,0 @@
using salesbook.Shared.Core.Interface;
namespace salesbook.Maui.Core.Services;
public class NavigationService(IServiceProvider serviceProvider) : INavigationService
{
public async Task NavigateToDetailsAsync()
{
var detailsPage = serviceProvider.GetService<PersonalInfo>();
if (Application.Current.MainPage is NavigationPage nav && detailsPage != null)
{
await nav.Navigation.PushAsync(detailsPage);
}
}
}

View File

@@ -1,18 +0,0 @@
using salesbook.Shared.Core.Interface;
namespace salesbook.Maui.Core.Services;
public class PageTitleService(IDispatcher dispatcher) : IPageTitleService
{
public void SetTitle(string title)
{
dispatcher.Dispatch(() =>
{
if (Application.Current?.MainPage is NavigationPage nav &&
nav.CurrentPage is ContentPage cp)
{
cp.Title = title;
}
});
}
}

View File

@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:salesbook.Maui"
xmlns:shared="clr-namespace:salesbook.Shared;assembly=salesbook.Shared" xmlns:shared="clr-namespace:salesbook.Shared;assembly=salesbook.Shared"
x:Class="salesbook.Maui.MainPage" x:Class="salesbook.Maui.MainPage"
BackgroundColor="{DynamicResource PageBackgroundColor}"> BackgroundColor="{DynamicResource PageBackgroundColor}">
<BlazorWebView HostPage="wwwroot/index.html"> <BlazorWebView x:Name="blazorWebView" HostPage="wwwroot/index.html">
<BlazorWebView.RootComponents> <BlazorWebView.RootComponents>
<RootComponent Selector="#app" ComponentType="{x:Type shared:Components.Routes}" /> <RootComponent Selector="#app" ComponentType="{x:Type shared:Components.Routes}" />
</BlazorWebView.RootComponents> </BlazorWebView.RootComponents>

View File

@@ -11,8 +11,6 @@ namespace salesbook.Maui
{ {
InitializeComponent(); InitializeComponent();
_messenger = messenger; _messenger = messenger;
Title = "Home";
} }
protected override bool OnBackButtonPressed() protected override bool OnBackButtonPressed()

View File

@@ -13,7 +13,6 @@ 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.Back; using salesbook.Shared.Core.Messages.Back;
using salesbook.Shared.Core.Services; using salesbook.Shared.Core.Services;
using System.Globalization;
namespace salesbook.Maui namespace salesbook.Maui
{ {
@@ -25,9 +24,6 @@ namespace salesbook.Maui
{ {
InteractiveRenderSettings.ConfigureBlazorHybridRenderModes(); InteractiveRenderSettings.ConfigureBlazorHybridRenderModes();
CultureInfo.DefaultThreadCurrentCulture = new CultureInfo("it-IT");
CultureInfo.DefaultThreadCurrentUICulture = new CultureInfo("it-IT");
var builder = MauiApp.CreateBuilder(); var builder = MauiApp.CreateBuilder();
builder builder
.UseMauiApp<App>() .UseMauiApp<App>()
@@ -65,10 +61,6 @@ namespace salesbook.Maui
builder.Services.AddSingleton<IFormFactor, FormFactor>(); builder.Services.AddSingleton<IFormFactor, FormFactor>();
builder.Services.AddSingleton<LocalDbService>(); builder.Services.AddSingleton<LocalDbService>();
builder.Services.AddSingleton<INavigationService, NavigationService>();
builder.Services.AddSingleton<IPageTitleService, PageTitleService>();
builder.Services.AddTransient<PersonalInfo>();
return builder.Build(); return builder.Build();
} }
} }

View File

@@ -1,14 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:components="clr-namespace:salesbook.Shared.Components;assembly=salesbook.Shared"
x:Class="salesbook.Maui.PersonalInfo"
BackgroundColor="{DynamicResource PageBackgroundColor}">
<BlazorWebView HostPage="wwwroot/index.html" StartPath="/PersonalInfo">
<BlazorWebView.RootComponents>
<RootComponent Selector="#app" ComponentType="{x:Type components:Routes}" />
</BlazorWebView.RootComponents>
</BlazorWebView>
</ContentPage>

View File

@@ -1,11 +0,0 @@
namespace salesbook.Maui;
public partial class PersonalInfo : ContentPage
{
public PersonalInfo()
{
InitializeComponent();
Title = "Profilo";
}
}

View File

@@ -1,6 +1,5 @@
using Android.App; using Android.App;
using Android.Content.PM; using Android.Content.PM;
using AndroidX.AppCompat.App;
namespace salesbook.Maui namespace salesbook.Maui
{ {
@@ -10,9 +9,5 @@ namespace salesbook.Maui
ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)] ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]
public class MainActivity : MauiAppCompatActivity public class MainActivity : MauiAppCompatActivity
{ {
public MainActivity()
{
AppCompatDelegate.DefaultNightMode = AppCompatDelegate.ModeNightNo;
}
} }
} }

View File

@@ -35,8 +35,5 @@
<key>NSAllowsArbitraryLoads</key> <key>NSAllowsArbitraryLoads</key>
<true/> <true/>
</dict> </dict>
<key>UIUserInterfaceStyle</key>
<string>Light</string>
</dict> </dict>
</plist> </plist>

View File

@@ -55,7 +55,8 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android' AND '$(Configuration)' == 'Debug'"> <PropertyGroup
Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android' AND '$(Configuration)' == 'Debug'">
<!--these help speed up android builds--> <!--these help speed up android builds-->
<!-- <!--
@@ -65,14 +66,16 @@
--> -->
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios' AND '$(Configuration)' == 'Debug'"> <PropertyGroup
Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios' AND '$(Configuration)' == 'Debug'">
<!--forces the simulator to pickup entitlements--> <!--forces the simulator to pickup entitlements-->
<EnableCodeSigning>true</EnableCodeSigning> <EnableCodeSigning>true</EnableCodeSigning>
<CodesignRequireProvisioningProfile>true</CodesignRequireProvisioningProfile> <CodesignRequireProvisioningProfile>true</CodesignRequireProvisioningProfile>
<DisableCodesignVerification>true</DisableCodesignVerification> <DisableCodesignVerification>true</DisableCodesignVerification>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios' OR $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'"> <PropertyGroup
Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios' OR $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">
<SupportedOSPlatformVersion>14.2</SupportedOSPlatformVersion> <SupportedOSPlatformVersion>14.2</SupportedOSPlatformVersion>
<DefineConstants>$(DefineConstants);APPLE;PLATFORM</DefineConstants> <DefineConstants>$(DefineConstants);APPLE;PLATFORM</DefineConstants>
</PropertyGroup> </PropertyGroup>
@@ -82,7 +85,8 @@
<CodesignProvision>VS: WildCard Development</CodesignProvision> <CodesignProvision>VS: WildCard Development</CodesignProvision>
</PropertyGroup> </PropertyGroup>
<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios' OR $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'"> <ItemGroup
Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios' OR $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">
<!-- <!--
<BundleResource Include="Platforms\iOS\PrivacyInfo.xcprivacy" LogicalName="PrivacyInfo.xcprivacy" /> <BundleResource Include="Platforms\iOS\PrivacyInfo.xcprivacy" LogicalName="PrivacyInfo.xcprivacy" />
@@ -94,7 +98,7 @@
<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"/>
</ItemGroup> </ItemGroup>
<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'"> <ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">
@@ -133,16 +137,4 @@
<ProjectReference Include="..\salesbook.Shared\salesbook.Shared.csproj" /> <ProjectReference Include="..\salesbook.Shared\salesbook.Shared.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Compile Update="PersonalInfo.xaml.cs">
<DependentUpon>PersonalInfo.xaml</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<MauiXaml Update="PersonalInfo.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
</ItemGroup>
</Project> </Project>

View File

@@ -1,7 +1,4 @@
@using Microsoft.Maui.Controls
@using salesbook.Shared.Core.Interface
@inject IJSRuntime JS @inject IJSRuntime JS
@inject INavigationService NavigationService
<div class="@(Back ? "" : "container") header"> <div class="@(Back ? "" : "container") header">
<div class="header-content @(Back ? "with-back" : "no-back")"> <div class="header-content @(Back ? "with-back" : "no-back")">
@@ -86,9 +83,7 @@
await JS.InvokeVoidAsync("goBack"); await JS.InvokeVoidAsync("goBack");
} }
private async Task OpenPersonalInfo() private void OpenPersonalInfo() =>
{ NavigationManager.NavigateTo("/PersonalInfo");
await NavigationService.NavigateToDetailsAsync();
}
} }

View File

@@ -1,10 +1,10 @@
@using System.Globalization @using System.Globalization
@using salesbook.Shared.Core.Interface @using CommunityToolkit.Mvvm.Messaging
@using salesbook.Shared.Core.Messages.Back @using salesbook.Shared.Core.Messages.Back
@inherits LayoutComponentBase @inherits LayoutComponentBase
@inject IJSRuntime JS @inject IJSRuntime JS
@inject IMessenger Messenger
@inject BackNavigationService BackService @inject BackNavigationService BackService
@inject INavigationService NavigationService
<MudThemeProvider Theme="_currentTheme" @ref="@_mudThemeProvider" @bind-IsDarkMode="@IsDarkMode" /> <MudThemeProvider Theme="_currentTheme" @ref="@_mudThemeProvider" @bind-IsDarkMode="@IsDarkMode" />
<MudPopoverProvider/> <MudPopoverProvider/>

View File

@@ -1,20 +1,21 @@
@page "/Calendar" @page "/Calendar"
@using salesbook.Shared.Core.Dto @using salesbook.Shared.Core.Dto
@using salesbook.Shared.Core.Interface @using salesbook.Shared.Core.Interface
@using salesbook.Shared.Components.Layout
@using salesbook.Shared.Components.SingleElements @using salesbook.Shared.Components.SingleElements
@using salesbook.Shared.Components.Layout.Spinner @using salesbook.Shared.Components.Layout.Spinner
@using salesbook.Shared.Components.SingleElements.BottomSheet @using salesbook.Shared.Components.SingleElements.BottomSheet
@using salesbook.Shared.Core.Entity
@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 IPageTitleService PageTitleService
@* <HeaderLayout Title="@_headerTitle" <HeaderLayout Title="@_headerTitle"
ShowFilter="true" ShowFilter="true"
ShowCalendarToggle="true" ShowCalendarToggle="true"
OnFilterToggle="ToggleFilter" OnFilterToggle="ToggleFilter"
OnCalendarToggle="ToggleExpanded"/> *@ OnCalendarToggle="ToggleExpanded"/>
<div @ref="_weekSliderRef" class="container week-slider @(Expanded ? "expanded" : "") @(SliderAnimation)"> <div @ref="_weekSliderRef" class="container week-slider @(Expanded ? "expanded" : "") @(SliderAnimation)">
@if (Expanded) @if (Expanded)
@@ -259,8 +260,6 @@
private void PrepareHeaderTitle() private void PrepareHeaderTitle()
{ {
_headerTitle = CurrentMonth.ToString("MMMM yyyy", new System.Globalization.CultureInfo("it-IT")).FirstCharToUpper(); _headerTitle = CurrentMonth.ToString("MMMM yyyy", new System.Globalization.CultureInfo("it-IT")).FirstCharToUpper();
PageTitleService?.SetTitle(_headerTitle);
} }
private void PrepareEventsCache() private void PrepareEventsCache()

View File

@@ -1,19 +1,14 @@
@page "/Notifications" @page "/Notifications"
@attribute [Authorize] @attribute [Authorize]
@using salesbook.Shared.Components.Layout
@using salesbook.Shared.Components.SingleElements @using salesbook.Shared.Components.SingleElements
@using salesbook.Shared.Core.Interface
@inject IPageTitleService PageTitleService
@* <HeaderLayout Title="Notifiche" /> *@ <HeaderLayout Title="Notifiche" />
<div class="container"> <div class="container">
<NoDataAvailable Text="Nessuna notifica meno recente" /> <NoDataAvailable Text="Nessuna notifica meno recente" />
</div> </div>
@code { @code {
protected override void OnInitialized()
{
PageTitleService?.SetTitle("Notifiche");
}
} }

View File

@@ -1,5 +1,6 @@
@page "/PersonalInfo" @page "/PersonalInfo"
@attribute [Authorize] @attribute [Authorize]
@using salesbook.Shared.Components.Layout
@using salesbook.Shared.Core.Authorization.Enum @using salesbook.Shared.Core.Authorization.Enum
@using salesbook.Shared.Core.Interface @using salesbook.Shared.Core.Interface
@using salesbook.Shared.Core.Services @using salesbook.Shared.Core.Services
@@ -7,7 +8,7 @@
@inject INetworkService NetworkService @inject INetworkService NetworkService
@inject IFormFactor FormFactor @inject IFormFactor FormFactor
@* <HeaderLayout BackTo="Indietro" Back="true" BackOnTop="true" Title="Profilo" ShowProfile="false"/> *@ <HeaderLayout BackTo="Indietro" Back="true" BackOnTop="true" Title="Profilo" ShowProfile="false"/>
@if (IsLoggedIn) @if (IsLoggedIn)
{ {

View File

@@ -68,6 +68,8 @@ else
</div> </div>
</div> </div>
<MudTabs Elevation="2" Rounded="true" PanelClass="pt-6" Style="width: 100%" Centered="true">
<MudTabPanel Text="Contatti">
@if (PersRif is { Count: > 0 }) @if (PersRif is { Count: > 0 })
{ {
<div class="container-pers-rif"> <div class="container-pers-rif">
@@ -93,6 +95,13 @@ else
Aggiungi contatto Aggiungi contatto
</MudButton> </MudButton>
</div> </div>
</MudTabPanel>
<MudTabPanel Text="Commesse">
<Virtualize Items="Commesse" Context="commessa">
<CommessaCard Commessa="commessa" />
</Virtualize>
</MudTabPanel>
</MudTabs>
</div> </div>
} }
@@ -101,6 +110,7 @@ else
private AnagClie Anag { get; set; } = new(); private AnagClie Anag { get; set; } = new();
private List<VtbCliePersRif>? PersRif { get; set; } private List<VtbCliePersRif>? PersRif { get; set; }
private List<JtbComt> Commesse { get; set; }
private bool IsLoading { get; set; } = true; private bool IsLoading { get; set; } = true;
@@ -113,6 +123,7 @@ else
{ {
Anag = (await ManageData.GetTable<AnagClie>(x => x.CodAnag.Equals(CodAnag))).Last(); Anag = (await ManageData.GetTable<AnagClie>(x => x.CodAnag.Equals(CodAnag))).Last();
PersRif = await ManageData.GetTable<VtbCliePersRif>(x => x.CodAnag.Equals(Anag.CodAnag)); PersRif = await ManageData.GetTable<VtbCliePersRif>(x => x.CodAnag.Equals(Anag.CodAnag));
Commesse = await ManageData.GetTable<JtbComt>(x => x.CodAnag != null && x.CodAnag.Equals(CodAnag));
IsLoading = false; IsLoading = false;
StateHasChanged(); StateHasChanged();

View File

@@ -1,11 +1,13 @@
@page "/Users" @page "/Users"
@attribute [Authorize] @attribute [Authorize]
@using salesbook.Shared.Components.Layout
@using salesbook.Shared.Core.Dto
@using salesbook.Shared.Core.Entity @using salesbook.Shared.Core.Entity
@using salesbook.Shared.Core.Interface @using salesbook.Shared.Core.Interface
@using salesbook.Shared.Components.SingleElements.BottomSheet
@inject IManageDataService ManageData @inject IManageDataService ManageData
@inject IPageTitleService PageTitleService
@* <HeaderLayout Title="Contatti"/> *@ <HeaderLayout Title="Contatti" ShowFilter="true" OnFilterToggle="ToggleFilter" />
<div class="container search-box"> <div class="container search-box">
<div class="input-card clearButton"> <div class="input-card clearButton">
@@ -31,15 +33,16 @@
} }
</div> </div>
<FilterUsers @bind-IsSheetVisible="OpenFilter" @bind-Filter="Filter" @bind-Filter:after="ApplyFilter"/>
@code { @code {
private List<UserDisplayItem> GroupedUserList { get; set; } = []; private List<UserDisplayItem> GroupedUserList { get; set; } = [];
private List<UserDisplayItem> FilteredGroupedUserList { get; set; } = []; private List<UserDisplayItem> FilteredGroupedUserList { get; set; } = [];
private string? TextToFilter { get; set; } private string? TextToFilter { get; set; }
protected override void OnInitialized() //Filtri
{ private bool OpenFilter { get; set; }
PageTitleService?.SetTitle("Contatti"); private FilterUserDTO Filter { get; set; } = new();
}
protected override async Task OnAfterRenderAsync(bool firstRender) protected override async Task OnAfterRenderAsync(bool firstRender)
{ {
@@ -126,4 +129,15 @@
FilteredGroupedUserList = result; FilteredGroupedUserList = result;
} }
private void ToggleFilter()
{
OpenFilter = !OpenFilter;
StateHasChanged();
}
private void ApplyFilter()
{
}
} }

View File

@@ -15,12 +15,6 @@
<MudIconButton Icon="@Icons.Material.Filled.Close" OnClick="CloseBottomSheet"/> <MudIconButton Icon="@Icons.Material.Filled.Close" OnClick="CloseBottomSheet"/>
</div> </div>
<div class="input-card clearButton">
<MudTextField T="string?" Placeholder="Cerca..." Variant="Variant.Text" @bind-Value="Filter.Text" DebounceInterval="500"/>
<MudIconButton Class="closeIcon" Icon="@Icons.Material.Filled.Close" OnClick="() => Filter.Text = null"/>
</div>
<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>
@@ -35,7 +29,7 @@
FullWidth="true" T="string" FullWidth="true" T="string"
Variant="Variant.Text" Variant="Variant.Text"
Virtualize="true" Virtualize="true"
@bind-SelectedValues="Filter.User" @* @bind-SelectedValues="Filter.User" *@
Class="customIcon-select" Class="customIcon-select"
AdornmentIcon="@Icons.Material.Filled.Code"/> AdornmentIcon="@Icons.Material.Filled.Code"/>
@@ -49,7 +43,7 @@
<MudSelectExtended FullWidth="true" <MudSelectExtended FullWidth="true"
T="string?" T="string?"
Variant="Variant.Text" Variant="Variant.Text"
@bind-Value="Filter.Type" @* @bind-Value="Filter.Type" *@
Class="customIcon-select" Class="customIcon-select"
AdornmentIcon="@Icons.Material.Filled.Code"> AdornmentIcon="@Icons.Material.Filled.Code">
@foreach (var type in ActivityType) @foreach (var type in ActivityType)
@@ -67,7 +61,7 @@
<MudSelectExtended FullWidth="true" <MudSelectExtended FullWidth="true"
T="string?" T="string?"
Variant="Variant.Text" Variant="Variant.Text"
@bind-Value="Filter.Result" @* @bind-Value="Filter.Result" *@
Class="customIcon-select" Class="customIcon-select"
AdornmentIcon="@Icons.Material.Filled.Code"> AdornmentIcon="@Icons.Material.Filled.Code">
@foreach (var result in ActivityResult) @foreach (var result in ActivityResult)
@@ -85,7 +79,7 @@
<MudSelectExtended FullWidth="true" <MudSelectExtended FullWidth="true"
T="ActivityCategoryEnum?" T="ActivityCategoryEnum?"
Variant="Variant.Text" Variant="Variant.Text"
@bind-Value="Filter.Category" @* @bind-Value="Filter.Category" *@
Class="customIcon-select" Class="customIcon-select"
AdornmentIcon="@Icons.Material.Filled.Code"> AdornmentIcon="@Icons.Material.Filled.Code">
@foreach (var category in CategoryList) @foreach (var category in CategoryList)
@@ -97,7 +91,7 @@
</div> </div>
<div class="button-section"> <div class="button-section">
<MudButton OnClick="() => Filter = new FilterActivityDTO()" Variant="Variant.Outlined" Color="Color.Error">Pulisci</MudButton> <MudButton OnClick="() => Filter = new FilterUserDTO()" Variant="Variant.Outlined" Color="Color.Error">Pulisci</MudButton>
<MudButton Variant="Variant.Filled" Color="Color.Primary" OnClick="OnFilterButton">Filtra</MudButton> <MudButton Variant="Variant.Filled" Color="Color.Primary" OnClick="OnFilterButton">Filtra</MudButton>
</div> </div>
</div> </div>
@@ -107,8 +101,8 @@
[Parameter] public bool IsSheetVisible { get; set; } [Parameter] public bool IsSheetVisible { get; set; }
[Parameter] public EventCallback<bool> IsSheetVisibleChanged { get; set; } [Parameter] public EventCallback<bool> IsSheetVisibleChanged { get; set; }
[Parameter] public FilterActivityDTO Filter { get; set; } [Parameter] public FilterUserDTO Filter { get; set; }
[Parameter] public EventCallback<FilterActivityDTO> FilterChanged { get; set; } [Parameter] public EventCallback<FilterUserDTO> FilterChanged { get; set; }
private List<StbActivityResult> ActivityResult { get; set; } = []; private List<StbActivityResult> ActivityResult { get; set; } = [];
private List<StbActivityType> ActivityType { get; set; } = []; private List<StbActivityType> ActivityType { get; set; } = [];

View File

@@ -0,0 +1,24 @@
@using salesbook.Shared.Core.Entity
<div class="activity-card">
<div class="activity-left-section">
<div class="activity-body-section">
<div class="title-section">
<MudText Class="activity-title" Typo="Typo.body1" HtmlTag="h3">@Commessa.Descrizione</MudText>
<div class="activity-hours-section">
<span class="activity-hours">
@Commessa.CodJcom
</span>
</div>
</div>
</div>
</div>
<div class="activity-info-section">
<MudChip T="string" Icon="@IconConstants.Chip.User" Size="Size.Small">Stato</MudChip>
</div>
</div>
@code {
[Parameter] public JtbComt Commessa { get; set; } = new();
}

View File

@@ -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;
}

View File

@@ -0,0 +1,5 @@
namespace salesbook.Shared.Core.Dto;
public class FilterUserDTO
{
}

View File

@@ -1,6 +0,0 @@
namespace salesbook.Shared.Core.Interface;
public interface INavigationService
{
Task NavigateToDetailsAsync();
}

View File

@@ -1,6 +0,0 @@
namespace salesbook.Shared.Core.Interface;
public interface IPageTitleService
{
void SetTitle(string title);
}

View File

@@ -16,7 +16,6 @@
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.0" /> <PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.0" />
<PackageReference Include="IntegryApiClient.Core" Version="1.1.4" /> <PackageReference Include="IntegryApiClient.Core" Version="1.1.4" />
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="9.0.5" /> <PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="9.0.5" />
<PackageReference Include="Microsoft.Maui.Controls.Core" Version="9.0.70" />
<PackageReference Include="sqlite-net-pcl" Version="1.9.172" /> <PackageReference Include="sqlite-net-pcl" Version="1.9.172" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.11.0" /> <PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.11.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="9.0.5" /> <PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="9.0.5" />