allow vorgangPIN to be changed on Vorgang page

includes:
- UI and backend logic
- adjustment to `NameItemEditor` to disallow deletion
This commit is contained in:
2025-11-20 12:54:53 +01:00
parent c81196343f
commit 365fb0f2c7
4 changed files with 66 additions and 16 deletions

View File

@@ -15,7 +15,7 @@
export let currentName: string;
export let vorgangToken: string | null;
export let onSave: (n: string, o: string, t?: string) => unknown = () => {};
export let onDelete: (n: string) => unknown = () => {};
export let onDelete: (n: string) => unknown | null = () => {};
let localName = currentName;
let isEditing = false;
@@ -98,13 +98,15 @@
>
<Edit class="w-4 h-4" />
</button>
<button
data-testid="delete-button"
onclick={handleDeleteClick}
class="text-gray-500 hover:text-red-600 transition"
>
<Trash class="w-4 h-4" />
</button>
{#if onDelete}
<button
data-testid="delete-button"
onclick={handleDeleteClick}
class="text-gray-500 hover:text-red-600 transition"
>
<Trash class="w-4 h-4" />
</button>
{/if}
</div>
{/if}