feat(frontend): confirmation dialogs and undo for destructive-feeling actions
Volk aufloesen, Bienenstand deaktivieren, Benutzer deaktivieren und Webhook loeschen liefen bisher ohne jede Rueckfrage direkt auf Klick. Neue wiederverwendbare ConfirmDialog-Komponente erzwingt jetzt eine bewusste Bestaetigung. Zusaetzlich zeigen Volk/Bienenstand/Benutzer nach dem Aufloesen/Deaktivieren einen Reaktivieren-Button (nutzt die neuen Backend-Endpunkte), da diese Aktionen nie ein echtes Loeschen sind und ein versehentlicher Klick bisher nicht rueckgaengig zu machen war.
This commit is contained in:
1 parent
57979f0371
commit
6ab028d1be
9 files changed
+231
-36
No files matched your search
@@ -35,3 +35,7 @@ export function updateApiary(id: string, input: Partial<ApiaryInput>): Promise<A
|
||||
export function deactivateApiary(id: string): Promise<Apiary> {
|
||||
return apiFetch<Apiary>(`/apiaries/${id}/deactivate`, { method: "POST" });
|
||||
}
|
||||
|
||||
export function reactivateApiary(id: string): Promise<Apiary> {
|
||||
return apiFetch<Apiary>(`/apiaries/${id}/reactivate`, { method: "POST" });
|
||||
}
|
||||
@@ -69,3 +69,7 @@ export function mergeColony(id: string, input: MergeColonyInput): Promise<Colony
|
||||
export function dissolveColony(id: string): Promise<Colony> {
|
||||
return apiFetch<Colony>(`/colonies/${id}/dissolve`, { method: "POST" });
|
||||
}
|
||||
|
||||
export function reactivateColony(id: string): Promise<Colony> {
|
||||
return apiFetch<Colony>(`/colonies/${id}/reactivate`, { method: "POST" });
|
||||
}
|
||||
@@ -15,3 +15,7 @@ export function createUser(input: CreateUserInput): Promise<User> {
|
||||
export function deactivateUser(id: string): Promise<User> {
|
||||
return apiFetch<User>(`/users/${id}/deactivate`, { method: "POST" });
|
||||
}
|
||||
|
||||
export function activateUser(id: string): Promise<User> {
|
||||
return apiFetch<User>(`/users/${id}/activate`, { method: "POST" });
|
||||
}
|
||||
Reference in new issue
Block a user