feat(stellungnahme): Modus-Auswahl entfernen, immer Fertigtext
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -101,7 +101,6 @@
|
||||
try {
|
||||
localStorage.setItem(storageKey, JSON.stringify({
|
||||
selectedSlugs: Array.from(selectedSlugs),
|
||||
mode,
|
||||
persoenlicheEingabe,
|
||||
absenderName,
|
||||
absenderAnschrift,
|
||||
@@ -112,13 +111,13 @@
|
||||
|
||||
$effect(() => {
|
||||
// track all persisted fields reactively
|
||||
void [selectedSlugs, mode, persoenlicheEingabe, absenderName, absenderAnschrift, absenderOrt];
|
||||
void [selectedSlugs, persoenlicheEingabe, absenderName, absenderAnschrift, absenderOrt];
|
||||
if (mounted) saveState();
|
||||
});
|
||||
|
||||
// ── Step state ───────────────────────────────────────────────────────────────
|
||||
// 0 Gebietskontext | 1 Ortskonkret | 2 Allgemein | 3 Modus | 4 Betroffenheit | 5 Ausgabe
|
||||
type Step = 0 | 1 | 2 | 3 | 4 | 5;
|
||||
// 0 Gebietskontext | 1 Ortskonkret | 2 Allgemein | 3 Betroffenheit | 4 Ausgabe
|
||||
type Step = 0 | 1 | 2 | 3 | 4;
|
||||
let step = $state<Step>(0);
|
||||
|
||||
let selectedSlugs = $state<Set<string>>(new Set());
|
||||
@@ -132,7 +131,7 @@
|
||||
expandedItems = next;
|
||||
}
|
||||
|
||||
let mode = $state<"fertig" | "leitfaden">("fertig");
|
||||
const mode = "fertig";
|
||||
let persoenlicheEingabe = $state("");
|
||||
let absenderName = $state("");
|
||||
let absenderAnschrift = $state("");
|
||||
@@ -337,8 +336,8 @@ Karl-Liebknecht-Straße 4
|
||||
.replace(/\[(.+?)\]\(.+?\)/g, "$1")
|
||||
.trim();
|
||||
}
|
||||
|
||||
const STEP_LABELS = ["Gebiet", "Ortskonkret", "Allgemein", "Modus", "Betroffenheit", "Ausgabe"] as const;
|
||||
|
||||
const STEP_LABELS = ["Gebiet", "Ortskonkret", "Allgemein", "Betroffenheit", "Ausgabe"] as const;
|
||||
const TOTAL_STEPS = 5;
|
||||
|
||||
// ── Deadline ─────────────────────────────────────────────────────────────────
|
||||
@@ -385,7 +384,6 @@ Karl-Liebknecht-Straße 4
|
||||
const saved = localStorage.getItem(storageKey);
|
||||
if (saved) {
|
||||
const s = JSON.parse(saved);
|
||||
if (Array.isArray(s.selectedSlugs)) selectedSlugs = new Set(s.selectedSlugs);
|
||||
if (Array.isArray(s.selectedSlugs)) selectedSlugs = new Set(s.selectedSlugs);
|
||||
if (typeof s.persoenlicheEingabe === "string") persoenlicheEingabe = s.persoenlicheEingabe;
|
||||
if (typeof s.absenderName === "string") absenderName = s.absenderName;
|
||||
@@ -459,7 +457,7 @@ Karl-Liebknecht-Straße 4
|
||||
<div class="mb-6 flex flex-wrap items-center justify-between gap-3 rounded-lg border border-wald-300 bg-wald-50 px-4 py-3 text-sm">
|
||||
<span class="text-wald-800"><Icon icon="mdi:content-save-outline" class="mr-1 inline size-4" />Letzte Sitzung wiederhergestellt.</span>
|
||||
<div class="flex gap-2">
|
||||
{#if outputHistory.length > 0}
|
||||
{#if outputHistory.length > 0}
|
||||
<button class="rounded-md bg-wald-700 px-3 py-1.5 text-xs font-semibold text-white hover:bg-wald-800" onclick={() => goTo(4)}>Zur Ausgabe →</button>
|
||||
{:else if selectedSlugs.size > 0}
|
||||
<button class="rounded-md bg-wald-700 px-3 py-1.5 text-xs font-semibold text-white hover:bg-wald-800" onclick={() => goTo(3)}>Fortsetzen →</button>
|
||||
@@ -763,43 +761,10 @@ Karl-Liebknecht-Straße 4
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- ── Step 3: Persönliche Betroffenheit ─────────────────────────────────── -->
|
||||
{:else if step === 3}
|
||||
<div>
|
||||
<h3 class="mb-1 text-lg font-semibold text-wald-800">Schritt 4 – Ausgabeform</h3>
|
||||
<p class="mb-5 text-sm text-stein-600">Wie soll Ihre Einwendung aufgebaut sein?</p>
|
||||
|
||||
<div class="mb-6 grid gap-3 sm:grid-cols-2">
|
||||
<label class="flex cursor-pointer flex-col gap-2 rounded-xl border-2 p-4 transition-colors
|
||||
{mode === 'fertig' ? 'border-wald-600 bg-wald-50' : 'border-stein-200 bg-white hover:border-wald-200'}">
|
||||
<input type="radio" class="sr-only" name="mode" value="fertig" bind:group={mode} />
|
||||
<div class="flex items-center justify-between">
|
||||
<span class="font-semibold text-wald-900">Fertigtext</span>
|
||||
{#if mode === "fertig"}<span class="text-wald-600">✓</span>{/if}
|
||||
</div>
|
||||
<p class="text-sm text-stein-600">Ausformulierter Brieftext. Ideal als Grundlage zum Anpassen.</p>
|
||||
</label>
|
||||
<label class="flex cursor-pointer flex-col gap-2 rounded-xl border-2 p-4 transition-colors
|
||||
{mode === 'leitfaden' ? 'border-wald-600 bg-wald-50' : 'border-stein-200 bg-white hover:border-wald-200'}">
|
||||
<input type="radio" class="sr-only" name="mode" value="leitfaden" bind:group={mode} />
|
||||
<div class="flex items-center justify-between">
|
||||
<span class="font-semibold text-wald-900">Leitfaden</span>
|
||||
{#if mode === "leitfaden"}<span class="text-wald-600">✓</span>{/if}
|
||||
</div>
|
||||
<p class="text-sm text-stein-600">Gegliederte Stichpunkte zum selbst Ausformulieren. Für individuelle Einwendungen empfohlen.</p>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center gap-3">
|
||||
<button class="rounded-lg border border-stein-300 px-4 py-2 text-sm text-stein-600 hover:bg-stein-50" onclick={() => goTo(2)}>← Zurück</button>
|
||||
<button class="rounded-lg bg-wald-700 px-6 py-2.5 font-semibold text-white transition hover:bg-wald-800" onclick={() => goTo(4)}>Weiter →</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ── Step 4: Persönliche Betroffenheit ─────────────────────────────────── -->
|
||||
{:else if step === 4}
|
||||
<div>
|
||||
<div>
|
||||
<h3 class="mb-1 text-lg font-semibold text-wald-800">Schritt 4 – Persönliche Betroffenheit</h3>
|
||||
<p class="mb-2 text-sm text-stein-600">
|
||||
Beschreiben Sie kurz, wie Sie persönlich betroffen sind.
|
||||
@@ -816,15 +781,15 @@ Karl-Liebknecht-Straße 4
|
||||
bind:value={persoenlicheEingabe}
|
||||
></textarea>
|
||||
<p class="mt-1 text-xs text-stein-400">Bleibt auf Ihrem Gerät. Wird nicht übertragen.</p>
|
||||
<div class="mt-5 flex items-center gap-3">
|
||||
<button class="rounded-lg border border-stein-300 px-4 py-2 text-sm text-stein-600 hover:bg-stein-50" onclick={() => goTo(3)}>← Zurück</button>
|
||||
<div class="mt-5 flex items-center gap-3">
|
||||
<button class="rounded-lg border border-stein-300 px-4 py-2 text-sm text-stein-600 hover:bg-stein-50" onclick={() => goTo(2)}>← Zurück</button>
|
||||
<button class="rounded-lg bg-wald-700 px-6 py-2.5 font-semibold text-white transition hover:bg-wald-800" onclick={() => goTo(4)}>Weiter →</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ── Step 5: Absender + Ausgabe ────────────────────────────────────────── -->
|
||||
|
||||
<!-- ── Step 4: Absender + Ausgabe ────────────────────────────────────────── -->
|
||||
{:else if step === 4}
|
||||
<div>
|
||||
<div>
|
||||
<h3 class="mb-1 text-lg font-semibold text-wald-800">Schritt 5 – Absender & Ausgabe</h3>
|
||||
<p class="mb-4 text-sm text-stein-600">Ihre Daten werden nur lokal zur Texterstellung genutzt.</p>
|
||||
|
||||
@@ -853,7 +818,7 @@ Karl-Liebknecht-Straße 4
|
||||
class="rounded-lg bg-wald-700 px-6 py-2.5 font-semibold text-white transition hover:bg-wald-800 disabled:opacity-40"
|
||||
disabled={!absenderName.trim()}
|
||||
onclick={generateOutput}
|
||||
>Text erstellen</button>
|
||||
>Text erstellen</button>
|
||||
<button class="rounded-lg border border-stein-300 px-4 py-2 text-sm text-stein-600 hover:bg-stein-50" onclick={() => goTo(3)}>← Zurück</button>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user