From 60109b05fddcbae0117c8440e36c735cfea92d77 Mon Sep 17 00:00:00 2001 From: Emanuele Paolini Date: Fri, 19 Jan 2024 22:51:24 +0100 Subject: [PATCH] pulsanti users to give and remove admin --- frontend/src/pages/UsersPage.tsx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/frontend/src/pages/UsersPage.tsx b/frontend/src/pages/UsersPage.tsx index 98828535..4b270cbf 100644 --- a/frontend/src/pages/UsersPage.tsx +++ b/frontend/src/pages/UsersPage.tsx @@ -28,6 +28,18 @@ export default function UsersPage({engine}) { Aggiungi utente + + []}/> @@ -50,6 +62,12 @@ export default function UsersPage({engine}) { {item.admin ? "•" : ""} } + + async function set_admin(admin) { + for (const id of selectedIds) { + await patcher.mutate({_id: id, admin: admin}) + } + } } function Headers() {