Add user-specific persistent grid/band layouts support
Implemented user-customizable, persistent grid and band layouts for CatalogsGrid and MassDataGrid. Added backend API, database entity, and repository for storing layouts per user. Refactored grids to support dynamic band/column rendering, layout management UI, and per-user storage via localStorage and the new API. Registered all necessary services and updated data context. Enables flexible, user-specific grid experiences with saved layouts.
This commit is contained in:
@@ -15,6 +15,7 @@ public partial class ApplicationDbContext : DbContext
|
||||
}
|
||||
|
||||
public virtual DbSet<VwmyCatalog> VwmyCatalogs { get; set; }
|
||||
public virtual DbSet<SmfLayout> SmfLayouts { get; set; }
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
@@ -51,6 +52,37 @@ public partial class ApplicationDbContext : DbContext
|
||||
.HasColumnName(catCfg.ChangedWhoColumnName);
|
||||
});
|
||||
|
||||
modelBuilder.Entity<SmfLayout>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.Guid);
|
||||
entity.ToTable("TBDD_SMF_LAYOUT", tb => tb.HasTrigger("TBDD_SMF_LAYOUT_AFT_UPD"));
|
||||
|
||||
entity.Property(e => e.Guid).HasColumnName("GUID");
|
||||
entity.Property(e => e.Active).HasColumnName("ACTIVE");
|
||||
entity.Property(e => e.LayoutType)
|
||||
.HasMaxLength(50)
|
||||
.HasColumnName("LAYOUT_TYPE");
|
||||
entity.Property(e => e.LayoutKey)
|
||||
.HasMaxLength(150)
|
||||
.HasColumnName("LAYOUT_KEY");
|
||||
entity.Property(e => e.UserName)
|
||||
.HasMaxLength(50)
|
||||
.HasColumnName("USER_NAME");
|
||||
entity.Property(e => e.LayoutData).HasColumnName("LAYOUT_DATA");
|
||||
entity.Property(e => e.AddedWho)
|
||||
.HasMaxLength(50)
|
||||
.HasColumnName("ADDED_WHO");
|
||||
entity.Property(e => e.AddedWhen)
|
||||
.HasColumnType("datetime")
|
||||
.HasColumnName("ADDED_WHEN");
|
||||
entity.Property(e => e.ChangedWho)
|
||||
.HasMaxLength(50)
|
||||
.HasColumnName("CHANGED_WHO");
|
||||
entity.Property(e => e.ChangedWhen)
|
||||
.HasColumnType("datetime")
|
||||
.HasColumnName("CHANGED_WHEN");
|
||||
});
|
||||
|
||||
OnModelCreatingPartial(modelBuilder);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user