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 b5a3d8f..fe47f91 100644 --- a/salesbook.Shared/Components/Pages/Users.razor +++ b/salesbook.Shared/Components/Pages/Users.razor @@ -1,11 +1,13 @@ @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="Filter.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,8 @@ [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 List ActivityResult { get; set; } = []; private List ActivityType { get; set; } = []; 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/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 +{ +}