From b798b01da01c6ba4d8633cf09392bd4993d8c0d0 Mon Sep 17 00:00:00 2001 From: MarcoE Date: Fri, 12 Sep 2025 09:32:34 +0200 Subject: [PATCH] Sistemazioni grafiche --- salesbook.Shared/Components/Pages/User.razor | 4 ++++ .../SingleElements/Card/CommessaCard.razor | 12 ++++++++---- .../SingleElements/Card/NotificationCard.razor.css | 7 +++++-- .../SingleElements/Modal/ActivityForm.razor | 1 - salesbook.Shared/Core/Dto/PageState/UserPageState.cs | 2 ++ salesbook.Shared/wwwroot/css/app.css | 2 -- 6 files changed, 19 insertions(+), 9 deletions(-) diff --git a/salesbook.Shared/Components/Pages/User.razor b/salesbook.Shared/Components/Pages/User.razor index aff2c4d..cca91db 100644 --- a/salesbook.Shared/Components/Pages/User.razor +++ b/salesbook.Shared/Components/Pages/User.razor @@ -575,6 +575,9 @@ else Steps = UserState.Steps; ActivityList = UserState.Activitys; + if (ActiveTab != UserState.ActiveTab) + SwitchTab(UserState.ActiveTab); + ApplyFiltersCommesse(); ApplyFiltersActivity(); @@ -680,6 +683,7 @@ else private void SwitchTab(int tabIndex) { ActiveTab = tabIndex; + UserState.ActiveTab = ActiveTab; if (tabIndex == 1 && Commesse == null) { diff --git a/salesbook.Shared/Components/SingleElements/Card/CommessaCard.razor b/salesbook.Shared/Components/SingleElements/Card/CommessaCard.razor index 00ed37a..bcc21b1 100644 --- a/salesbook.Shared/Components/SingleElements/Card/CommessaCard.razor +++ b/salesbook.Shared/Components/SingleElements/Card/CommessaCard.razor @@ -44,21 +44,25 @@ { if (Steps is null) return; + // Ultimo step non skip var lastBeforeSkip = Steps - .TakeWhile(s => s.Status is { Skip: false }) - .LastOrDefault(); + .LastOrDefault(s => s.Status is { Skip: false }); - if (lastBeforeSkip is not null) Stato = lastBeforeSkip.StepName; + if (lastBeforeSkip is not null) + Stato = lastBeforeSkip.StepName; + // Ultima data disponibile LastUpd = Steps .Where(s => s.Date.HasValue) .Select(s => s.Date!.Value) .DefaultIfEmpty() .Max(); - if (LastUpd.Equals(DateTime.MinValue)) LastUpd = null; + if (LastUpd.Equals(DateTime.MinValue)) + LastUpd = null; } + private void OpenPageCommessa() { JobSteps.Steps = Steps; diff --git a/salesbook.Shared/Components/SingleElements/Card/NotificationCard.razor.css b/salesbook.Shared/Components/SingleElements/Card/NotificationCard.razor.css index c199ca6..7c242b0 100644 --- a/salesbook.Shared/Components/SingleElements/Card/NotificationCard.razor.css +++ b/salesbook.Shared/Components/SingleElements/Card/NotificationCard.razor.css @@ -80,12 +80,15 @@ .title { font-weight: 700; margin-bottom: unset !important; + line-height: normal; } .section-time { display: flex; + gap: .65rem; + min-width: max-content; + justify-content: flex-end; align-items: center; - gap: .5rem; } .notification-time { @@ -99,7 +102,7 @@ overflow: hidden; } -.subtitle { +.notification-body ::deep > .subtitle { font-size: 12px; color: var(--mud-palette-drawer-text); } \ 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 e067500..70193ff 100644 --- a/salesbook.Shared/Components/SingleElements/Modal/ActivityForm.razor +++ b/salesbook.Shared/Components/SingleElements/Modal/ActivityForm.razor @@ -79,7 +79,6 @@ Nessuno All'ora pianificata - 15 minuti prima 30 minuti prima 1 ora prima 2 ore prima diff --git a/salesbook.Shared/Core/Dto/PageState/UserPageState.cs b/salesbook.Shared/Core/Dto/PageState/UserPageState.cs index efecc2a..f211abf 100644 --- a/salesbook.Shared/Core/Dto/PageState/UserPageState.cs +++ b/salesbook.Shared/Core/Dto/PageState/UserPageState.cs @@ -14,4 +14,6 @@ public class UserPageState public StbUser? Agente { get; set; } public Dictionary?> Steps { get; set; } public List Activitys { get; set; } + + public int ActiveTab { get; set; } } \ No newline at end of file diff --git a/salesbook.Shared/wwwroot/css/app.css b/salesbook.Shared/wwwroot/css/app.css index a48eeeb..5e0c9bb 100644 --- a/salesbook.Shared/wwwroot/css/app.css +++ b/salesbook.Shared/wwwroot/css/app.css @@ -62,8 +62,6 @@ article { transform: translateY(-35px); } -.page > .Connection.Hide ~ main .bottom-sheet-container.show { bottom: -35px; } - .btn-primary { color: #fff; background-color: var(--primary-color);