Small design fixes

This commit is contained in:
2026-07-29 15:58:57 +02:00
parent 78f4d813f9
commit d1ef092bc3
3 changed files with 48 additions and 8 deletions
@@ -68,15 +68,13 @@ async function save() {
<thead>
<tr>
<th>Name</th>
<th>Slug</th>
<th>Status</th>
<th></th>
<th class="empty"></th>
</tr>
</thead>
<tbody>
<tr v-for="paymentMethod in paymentMethods" :key="paymentMethod.id">
<td>{{ paymentMethod.name }}</td>
<td>{{ paymentMethod.slug }}</td>
<td>
<span :class="paymentMethod.active ? 'badge-active' : 'badge-inactive'">
{{ paymentMethod.active ? 'Aktiv' : 'Inaktiv' }}
@@ -93,15 +91,14 @@ async function save() {
<template v-if="editing">
<h2>Zahlungsweg bearbeiten</h2>
<table class="data-table">
<tr><th>Name:</th><td><input type="text" v-model="form.name" class="form-input" /></td></tr>
<tr><th>Slug:</th><td>{{ editing.slug }}</td></tr>
<tr><th>Beschreibung:</th><td><textarea v-model="form.description" class="form-input"></textarea></td></tr>
<tr><th>Name</th><td><input type="text" v-model="form.name" class="form-input" /></td></tr>
<tr><th>Beschreibung</th><td><textarea v-model="form.description" class="form-input"></textarea></td></tr>
<tr v-for="option in editing.optionsSchema ?? []" :key="option.name">
<th>{{ option.label }}<span v-if="option.required" class="required-marker">*</span>:</th>
<th>{{ option.label }}<span v-if="option.required" class="required-marker">*</span></th>
<td><input type="text" v-model="form.configuration[option.name]" class="form-input" /></td>
</tr>
<tr>
<th>Aktiv:</th>
<th>Aktiv</th>
<td>
<input type="checkbox" v-model="form.active" :disabled="!requiredComplete && !form.active" />
<span v-if="!requiredComplete" class="hint">Bitte zuerst alle Pflichtfelder (*) ausfüllen, um zu aktivieren.</span>
@@ -0,0 +1,39 @@
-- ---------------------------------------------------------------------------
-- Dev-Hack: event_payment_methods von available_payment_method_id auf slug.
--
-- Nur für das lokale Dev-System, das noch die alte Drift-Struktur trägt.
-- Bringt die Tabelle in den committeten Stand (2026_07_28_140020_create_event_payment_methods
-- + 2026_07_29_140030_fix_event_payment_methods_slug), ohne migrate:fresh / Datenverlust.
--
-- Ausführen z.B.:
-- docker exec -i mareike-mareike-app-1 sh -c 'mysql -h"$DB_HOST" -u"$DB_USERNAME" -p"$DB_PASSWORD" "$DB_DATABASE"' < database/dev-hacks/fix_event_payment_methods_slug.sql
-- ---------------------------------------------------------------------------
-- 1. slug nullable anlegen.
ALTER TABLE `event_payment_methods`
ADD COLUMN `slug` VARCHAR(255) NULL AFTER `event_id`;
-- 2. slug aus der verknüpften available_payment_methods-Zeile befüllen.
UPDATE `event_payment_methods` epm
JOIN `available_payment_methods` apm ON apm.`id` = epm.`available_payment_method_id`
SET epm.`slug` = apm.`slug`;
-- 3. Alte Spalte samt FK entfernen.
ALTER TABLE `event_payment_methods`
DROP FOREIGN KEY `event_payment_methods_available_payment_method_id_foreign`;
ALTER TABLE `event_payment_methods`
DROP COLUMN `available_payment_method_id`;
-- 4. slug final absichern: NOT NULL, Unique (event_id, slug), FK auf payment_methods.slug.
ALTER TABLE `event_payment_methods`
MODIFY `slug` VARCHAR(255) NOT NULL;
ALTER TABLE `event_payment_methods`
ADD UNIQUE `event_payment_methods_event_id_slug_unique` (`event_id`, `slug`);
ALTER TABLE `event_payment_methods`
ADD CONSTRAINT `event_payment_methods_slug_foreign`
FOREIGN KEY (`slug`) REFERENCES `payment_methods` (`slug`)
ON UPDATE CASCADE ON DELETE RESTRICT;
-- Hinweis: Die Reparatur-Migration 2026_07_29_140030 bleibt danach "pending", ist aber ein
-- sicherer No-Op (ihr Guard prüft available_payment_method_id) -- ein späteres
-- `php artisan migrate` verbucht sie, ohne etwas zu verändern.
+4
View File
@@ -144,6 +144,10 @@ th:after {
content: ":";
}
.empty:after {
content: "";
}
#show_username {
position: relative;
top: -30px;