Add UserActionLog and enhance registry features
Build and Push Docker Image / build-and-push (push) Successful in 1m59s

- Introduced `UserActionLog` entity to track user actions.
- Replaced `CanBeSecondHand` with `PreferSecondHand` property.
- Added `ShowBankAccountName` to `RegistrySettings`.
- Updated models and migrations for new properties.
- Enhanced `RegistryService` with user action logging and item details.
- Redesigned `Home.razor` with a grid layout and modal for registries.
- Added `RegistryActionLog.razor` for admin action logs.
- Improved `RegistryPublic.razor` with purchaser/contributor details.
- Replaced sidebar with `TopBar.razor` for responsive navigation.
- Updated CSS for new components and improved responsiveness.
This commit is contained in:
Arne Moerman
2026-05-17 20:57:54 +02:00
parent 6b593828d7
commit 2bf0295508
32 changed files with 3811 additions and 435 deletions
@@ -13,6 +13,7 @@ public class RegistryDbContext(DbContextOptions<RegistryDbContext> options) : Db
public DbSet<ItemPurchase> ItemPurchases => Set<ItemPurchase>();
public DbSet<ItemContribution> ItemContributions => Set<ItemContribution>();
public DbSet<RegistryVisit> RegistryVisits => Set<RegistryVisit>();
public DbSet<UserActionLog> UserActionLogs => Set<UserActionLog>();
public DbSet<PlatformOwner> PlatformOwners => Set<PlatformOwner>();
protected override void OnModelCreating(ModelBuilder modelBuilder)
@@ -111,6 +112,18 @@ public class RegistryDbContext(DbContextOptions<RegistryDbContext> options) : Db
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity<UserActionLog>(entity =>
{
entity.HasKey(x => x.Id);
entity.Property(x => x.UserId).HasMaxLength(450);
entity.Property(x => x.Amount).HasPrecision(18, 2);
entity.Property(x => x.Details).HasMaxLength(500);
entity.HasOne(x => x.Registry)
.WithMany(x => x.ActionLogs)
.HasForeignKey(x => x.RegistryId)
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity<PlatformOwner>(entity =>
{
entity.HasKey(x => x.Id);