Add 'Modified' tracking for Prospect entity

Introduce a 'Modified' field to track the last modification date of prospects. Automatically update this field on changes and integrate it in UI display for better transparency.
This commit is contained in:
Andre Beging
2025-03-31 08:21:23 +02:00
parent c2de397a0f
commit 5eb8b4b377
8 changed files with 280 additions and 6 deletions

View File

@@ -45,7 +45,7 @@
</Alert>
}
<table style="width: 100%;">
<table class="flex-column" style="width: 100%;">
<InteractionRow
Prospect="Prospect"
@@ -148,6 +148,8 @@
}
</table>
<div class="flex-grow-1"></div>
<small class="text-center" style="margin-top: .5rem;">Zuletzt geändert: @Prospect?.Modified?.ToLocalTime()</small>
</div>

View File

@@ -72,7 +72,7 @@ namespace FoodsharingSiegen.Server.Controls
private async Task EditProspectAsync()
{
await EditProspectDialog.ShowAsync(ModalService, () => InvokeAsync(StateHasChanged), Prospect);
await EditProspectDialog.ShowAsync(ModalService, OnDataChanged ?? (async () => await Task.CompletedTask), Prospect);
}
#endregion

View File

@@ -14,13 +14,15 @@
}
.pc-main {
display: flex;
flex-direction: column;
flex-basis: 0;
flex-grow: 1;
max-width: 480px;
border: 1px solid #533a20;
border-radius: 3px;
margin: 5px;
padding: 16px;
padding: .5rem .5rem 0 .5rem;
}
.pc-main.warning {