Compare commits
7 Commits
feature/Na
...
v1.0.1(4)
| Author | SHA1 | Date | |
|---|---|---|---|
| 691c132fb6 | |||
| 5d292a12ef | |||
| 60f7d14a72 | |||
| 5fe41f9445 | |||
| e614c83a5b | |||
| c2da42a51b | |||
| ca6be0c0a8 |
@@ -27,9 +27,17 @@ namespace salesbook.Maui
|
|||||||
var builder = MauiApp.CreateBuilder();
|
var builder = MauiApp.CreateBuilder();
|
||||||
builder
|
builder
|
||||||
.UseMauiApp<App>()
|
.UseMauiApp<App>()
|
||||||
|
.UseIntegry(appToken: AppToken, useLoginAzienda: true)
|
||||||
.UseMauiCommunityToolkit()
|
.UseMauiCommunityToolkit()
|
||||||
.ConfigureFonts(fonts => { fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"); })
|
.UseSentry(options =>
|
||||||
.UseLoginAzienda(AppToken);
|
{
|
||||||
|
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.AddMauiBlazorWebView();
|
||||||
builder.Services.AddMudServices();
|
builder.Services.AddMudServices();
|
||||||
|
|||||||
@@ -29,8 +29,8 @@
|
|||||||
<ApplicationId>it.integry.salesbook</ApplicationId>
|
<ApplicationId>it.integry.salesbook</ApplicationId>
|
||||||
|
|
||||||
<!-- Versions -->
|
<!-- Versions -->
|
||||||
<ApplicationDisplayVersion>1.0.0</ApplicationDisplayVersion>
|
<ApplicationDisplayVersion>1.0.1</ApplicationDisplayVersion>
|
||||||
<ApplicationVersion>3</ApplicationVersion>
|
<ApplicationVersion>4</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'">
|
||||||
@@ -55,8 +55,7 @@
|
|||||||
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup
|
<PropertyGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android' AND '$(Configuration)' == 'Debug'">
|
||||||
Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android' AND '$(Configuration)' == 'Debug'">
|
|
||||||
|
|
||||||
<!--these help speed up android builds-->
|
<!--these help speed up android builds-->
|
||||||
<!--
|
<!--
|
||||||
@@ -66,16 +65,14 @@
|
|||||||
-->
|
-->
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup
|
<PropertyGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios' AND '$(Configuration)' == 'Debug'">
|
||||||
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
|
<PropertyGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios' OR $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">
|
||||||
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>
|
||||||
@@ -85,8 +82,7 @@
|
|||||||
<CodesignProvision>VS: WildCard Development</CodesignProvision>
|
<CodesignProvision>VS: WildCard Development</CodesignProvision>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup
|
<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios' OR $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">
|
||||||
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" />
|
||||||
|
|
||||||
@@ -98,7 +94,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'">
|
||||||
@@ -122,14 +118,15 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="CommunityToolkit.Maui" Version="11.2.0" />
|
<PackageReference Include="CommunityToolkit.Maui" Version="12.0.0" />
|
||||||
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.0" />
|
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.0" />
|
||||||
<PackageReference Include="IntegryApiClient.MAUI" Version="1.1.4" />
|
<PackageReference Include="IntegryApiClient.MAUI" Version="1.1.6" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.5" />
|
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.6" />
|
||||||
<PackageReference Include="Microsoft.Maui.Controls" Version="9.0.70" />
|
<PackageReference Include="Microsoft.Maui.Controls" Version="9.0.81" />
|
||||||
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="9.0.70" />
|
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="9.0.81" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="9.0.70" />
|
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="9.0.81" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.5" />
|
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.6" />
|
||||||
|
<PackageReference Include="Sentry.Maui" Version="5.11.2" />
|
||||||
<PackageReference Include="sqlite-net-pcl" Version="1.9.172" />
|
<PackageReference Include="sqlite-net-pcl" Version="1.9.172" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -372,7 +372,9 @@
|
|||||||
filteredActivity = filteredActivity
|
filteredActivity = filteredActivity
|
||||||
.Where(x => Filter.Category == null || x.Category.Equals(Filter.Category));
|
.Where(x => Filter.Category == null || x.Category.Equals(Filter.Category));
|
||||||
|
|
||||||
return filteredActivity.ToList();
|
return filteredActivity
|
||||||
|
.OrderBy(x => x.EffectiveTime ?? x.EstimatedTime)
|
||||||
|
.ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
[JSInvokable]
|
[JSInvokable]
|
||||||
|
|||||||
@@ -68,31 +68,40 @@ else
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@if (PersRif is { Count: > 0 })
|
<MudTabs Elevation="2" Rounded="true" PanelClass="pt-6" Style="width: 100%" Centered="true">
|
||||||
{
|
<MudTabPanel Text="Contatti">
|
||||||
<div class="container-pers-rif">
|
@if (PersRif is { Count: > 0 })
|
||||||
<Virtualize Items="PersRif" Context="person">
|
{
|
||||||
@{
|
<div class="container-pers-rif">
|
||||||
var index = PersRif.IndexOf(person);
|
<Virtualize Items="PersRif" Context="person">
|
||||||
var isLast = index == PersRif.Count - 1;
|
@{
|
||||||
}
|
var index = PersRif.IndexOf(person);
|
||||||
<ContactCard Contact="person" />
|
var isLast = index == PersRif.Count - 1;
|
||||||
@if (!isLast)
|
}
|
||||||
{
|
<ContactCard Contact="person" />
|
||||||
<div class="divider"></div>
|
@if (!isLast)
|
||||||
}
|
{
|
||||||
</Virtualize>
|
<div class="divider"></div>
|
||||||
</div>
|
}
|
||||||
}
|
</Virtualize>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
<div class="container-button">
|
<div class="container-button">
|
||||||
<MudButton Class="button-settings infoText"
|
<MudButton Class="button-settings infoText"
|
||||||
FullWidth="true"
|
FullWidth="true"
|
||||||
Size="Size.Medium"
|
Size="Size.Medium"
|
||||||
Variant="Variant.Outlined">
|
Variant="Variant.Outlined">
|
||||||
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();
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
@page "/Users"
|
@page "/Users"
|
||||||
@attribute [Authorize]
|
@attribute [Authorize]
|
||||||
@using salesbook.Shared.Components.Layout
|
@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
|
||||||
|
|
||||||
<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,11 +33,17 @@
|
|||||||
}
|
}
|
||||||
</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; }
|
||||||
|
|
||||||
|
//Filtri
|
||||||
|
private bool OpenFilter { get; set; }
|
||||||
|
private FilterUserDTO Filter { get; set; } = new();
|
||||||
|
|
||||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||||
{
|
{
|
||||||
if (firstRender)
|
if (firstRender)
|
||||||
@@ -121,4 +129,15 @@
|
|||||||
FilteredGroupedUserList = result;
|
FilteredGroupedUserList = result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void ToggleFilter()
|
||||||
|
{
|
||||||
|
OpenFilter = !OpenFilter;
|
||||||
|
StateHasChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ApplyFilter()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
@using salesbook.Shared.Components.SingleElements
|
@using salesbook.Shared.Components.SingleElements.Modal.ExceptionModal
|
||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
|
|
||||||
<ErrorBoundary @ref="ErrorBoundary">
|
<ErrorBoundary @ref="ErrorBoundary">
|
||||||
|
|||||||
@@ -0,0 +1,45 @@
|
|||||||
|
<div class="bottom-sheet-backdrop @(IsSheetVisible ? "show" : "")" @onclick="CloseBottomSheet"></div>
|
||||||
|
|
||||||
|
<div class="bottom-sheet-container @(IsSheetVisible ? "show" : "")">
|
||||||
|
<div class="bottom-sheet pb-safe-area">
|
||||||
|
<div class="title">
|
||||||
|
<MudText Typo="Typo.h6">
|
||||||
|
<b>Aggiungi un promemoria</b>
|
||||||
|
</MudText>
|
||||||
|
<MudIconButton Icon="@Icons.Material.Filled.Close" OnClick="() => CloseBottomSheet()"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="input-card">
|
||||||
|
<div class="form-container">
|
||||||
|
<span>Data</span>
|
||||||
|
|
||||||
|
<MudTextField T="DateTime?" Format="yyyy-MM-dd" InputType="InputType.Date" @bind-Value="Date" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="input-card">
|
||||||
|
<MudTextField T="string?" Placeholder="Memo" Variant="Variant.Text" Lines="4" @bind-Value="Memo" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="button-section">
|
||||||
|
<MudButton Variant="Variant.Filled" Color="Color.Primary" OnClick="() => CloseBottomSheet(true)">Salva</MudButton>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@code {
|
||||||
|
[Parameter] public bool IsSheetVisible { get; set; }
|
||||||
|
[Parameter] public EventCallback<bool> IsSheetVisibleChanged { get; set; }
|
||||||
|
|
||||||
|
private DateTime? Date { get; set; } = DateTime.Today;
|
||||||
|
private string? Memo { get; set; }
|
||||||
|
|
||||||
|
private void CloseBottomSheet(bool save)
|
||||||
|
{
|
||||||
|
IsSheetVisible = false;
|
||||||
|
IsSheetVisibleChanged.InvokeAsync(IsSheetVisible);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CloseBottomSheet() => CloseBottomSheet(false);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
@@ -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="FilterActivity.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="FilterActivity.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="FilterActivity.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="FilterActivity.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,10 @@
|
|||||||
[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 FilterActivityDTO FilterActivity { get; set; } = new();
|
||||||
|
|
||||||
private List<StbActivityResult> ActivityResult { get; set; } = [];
|
private List<StbActivityResult> ActivityResult { get; set; } = [];
|
||||||
private List<StbActivityType> ActivityType { get; set; } = [];
|
private List<StbActivityType> ActivityType { get; set; } = [];
|
||||||
|
|||||||
@@ -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();
|
||||||
|
}
|
||||||
@@ -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;
|
||||||
|
}
|
||||||
@@ -149,17 +149,31 @@
|
|||||||
</MessageContent>
|
</MessageContent>
|
||||||
<YesButton>
|
<YesButton>
|
||||||
<MudButton Size="Size.Small" Variant="Variant.Filled" Color="Color.Error"
|
<MudButton Size="Size.Small" Variant="Variant.Filled" Color="Color.Error"
|
||||||
StartIcon="@Icons.Material.Filled.DeleteForever">
|
StartIcon="@Icons.Material.Filled.Check">
|
||||||
Cancella
|
Cancella
|
||||||
</MudButton>
|
</MudButton>
|
||||||
</YesButton>
|
</YesButton>
|
||||||
</MudMessageBox>
|
</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.Filled.DeleteForever">
|
||||||
|
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="OnAfterChangeValue"/>
|
<SelectEsito @bind-IsSheetVisible="OpenEsito" @bind-ActivityModel="ActivityModel" @bind-ActivityModel:after="OnAfterChangeEsito"/>
|
||||||
|
|
||||||
|
<AddMemo @bind-IsSheetVisible="OpenAddMemo" />
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
[CascadingParameter] private IMudDialogInstance MudDialog { get; set; }
|
[CascadingParameter] private IMudDialogInstance MudDialog { get; set; }
|
||||||
@@ -186,12 +200,17 @@
|
|||||||
private bool VisibleOverlay { get; set; }
|
private bool VisibleOverlay { get; set; }
|
||||||
private bool SuccessAnimation { 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 ConfirmDelete { get; set; }
|
||||||
|
private MudMessageBox ConfirmMemo { get; set; }
|
||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
|
Snackbar.Configuration.PositionClass = Defaults.Classes.Position.TopCenter;
|
||||||
|
|
||||||
_ = LoadData();
|
_ = LoadData();
|
||||||
|
|
||||||
LabelSave = IsNew ? "Aggiungi" : null;
|
LabelSave = IsNew ? "Aggiungi" : null;
|
||||||
@@ -243,7 +262,6 @@
|
|||||||
private bool CheckPreSave()
|
private bool CheckPreSave()
|
||||||
{
|
{
|
||||||
Snackbar.Clear();
|
Snackbar.Clear();
|
||||||
Snackbar.Configuration.PositionClass = Defaults.Classes.Position.TopCenter;
|
|
||||||
|
|
||||||
if (!ActivityModel.ActivityTypeId.IsNullOrEmpty()) return true;
|
if (!ActivityModel.ActivityTypeId.IsNullOrEmpty()) return true;
|
||||||
Snackbar.Add("Tipo attività obbligatorio!", Severity.Error);
|
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()
|
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;
|
OpenEsito = !OpenEsito;
|
||||||
StateHasChanged();
|
StateHasChanged();
|
||||||
|
|||||||
@@ -1,6 +1,3 @@
|
|||||||
@using salesbook.Shared.Core.Services
|
|
||||||
@inject AppAuthenticationStateProvider AuthenticationStateProvider
|
|
||||||
|
|
||||||
<div class="container container-modal">
|
<div class="container container-modal">
|
||||||
<div class="c-modal">
|
<div class="c-modal">
|
||||||
<div class="exception-header mb-2">
|
<div class="exception-header mb-2">
|
||||||
5
salesbook.Shared/Core/Dto/FilterUserDTO.cs
Normal file
5
salesbook.Shared/Core/Dto/FilterUserDTO.cs
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
namespace salesbook.Shared.Core.Dto;
|
||||||
|
|
||||||
|
public class FilterUserDTO
|
||||||
|
{
|
||||||
|
}
|
||||||
@@ -14,11 +14,11 @@
|
|||||||
<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.2" />
|
||||||
<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.6" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="9.0.5" />
|
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="9.0.6" />
|
||||||
<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.12.1" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="9.0.5" />
|
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="9.0.6" />
|
||||||
<PackageReference Include="MudBlazor" Version="8.6.0" />
|
<PackageReference Include="MudBlazor" Version="8.6.0" />
|
||||||
<PackageReference Include="MudBlazor.ThemeManager" Version="3.0.0" />
|
<PackageReference Include="MudBlazor.ThemeManager" Version="3.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@@ -22,7 +22,8 @@ builder.Services.AddScoped<IManageDataService, ManageDataService>();
|
|||||||
builder.Services.AddScoped<AppAuthenticationStateProvider>();
|
builder.Services.AddScoped<AppAuthenticationStateProvider>();
|
||||||
builder.Services.AddScoped<AuthenticationStateProvider>(provider => provider.GetRequiredService<AppAuthenticationStateProvider>());
|
builder.Services.AddScoped<AuthenticationStateProvider>(provider => provider.GetRequiredService<AppAuthenticationStateProvider>());
|
||||||
|
|
||||||
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<Routes>("#app");
|
builder.RootComponents.Add<Routes>("#app");
|
||||||
builder.RootComponents.Add<HeadOutlet>("head::after");
|
builder.RootComponents.Add<HeadOutlet>("head::after");
|
||||||
|
|||||||
@@ -16,10 +16,10 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="IntegryApiClient.Blazor" Version="1.1.4" />
|
<PackageReference Include="IntegryApiClient.Blazor" Version="1.1.6" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="9.0.5" />
|
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="9.0.6" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="9.0.5" />
|
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="9.0.6" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="9.0.5" />
|
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="9.0.6" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
Reference in New Issue
Block a user