fix Color-Spalte von 7 auf 50 Zeichen erweitert.

This commit is contained in:
beo3000 2026-01-04 13:33:06 +01:00
parent fbfdb74cad
commit 398897d9be
6 changed files with 1632 additions and 5 deletions

View File

@ -33,7 +33,7 @@ public class BookingCategoryConfiguration : IEntityTypeConfiguration<BookingCate
.IsRequired();
builder.Property(x => x.Color)
.HasMaxLength(7); // #RRGGBB
.HasMaxLength(50); // #RRGGBB or #RRGGBBAA or other CSS color formats
builder.Property(x => x.Icon)
.HasMaxLength(2000);

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,42 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Koogle.Infrastructure.Data.Migrations
{
/// <inheritdoc />
public partial class ExtendColorMaxLength : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "Color",
schema: "app",
table: "BookingCategories",
type: "nvarchar(50)",
maxLength: 50,
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(7)",
oldMaxLength: 7,
oldNullable: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "Color",
schema: "app",
table: "BookingCategories",
type: "nvarchar(7)",
maxLength: 7,
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(50)",
oldMaxLength: 50,
oldNullable: true);
}
}
}

View File

@ -36,8 +36,8 @@ namespace Koogle.Infrastructure.Data.Migrations
.HasColumnType("uniqueidentifier");
b.Property<string>("Color")
.HasMaxLength(7)
.HasColumnType("nvarchar(7)");
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime2");

View File

@ -168,7 +168,13 @@
{ "Category", category }
};
var dialog = await DialogService.ShowAsync<CategoryDialog>("Kategorie bearbeiten", parameters);
var dlgOption = new DialogOptions()
{
MaxWidth = MaxWidth.Medium,
FullWidth = true
};
var dialog = await DialogService.ShowAsync<CategoryDialog>("Kategorie bearbeiten", parameters, dlgOption);
var result = await dialog.Result;
if (result != null && !result.Canceled && result.Data is UpdateBookingCategoryDto dto)

View File

@ -59,7 +59,7 @@
Label="Farbe"
DisableAlpha="true"
ColorPickerMode="ColorPickerMode.HEX"
Style="width: 150px;" />
Style="width: 330px;" />
@if (!string.IsNullOrWhiteSpace(_colorValue))
{
<MudIcon Icon="@Icons.Material.Filled.Circle" Style="@($"color: {_colorValue}; align-self: center;")" />