fix Color-Spalte von 7 auf 50 Zeichen erweitert.
This commit is contained in:
parent
fbfdb74cad
commit
398897d9be
|
|
@ -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);
|
||||
|
|
|
|||
1579
src/Koogle.Infrastructure/Data/Migrations/20260104121240_ExtendColorMaxLength.Designer.cs
generated
Normal file
1579
src/Koogle.Infrastructure/Data/Migrations/20260104121240_ExtendColorMaxLength.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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;")" />
|
||||
|
|
|
|||
Loading…
Reference in New Issue