-
+
-
{{ t("admin.eyebrow") }}
-
{{ t("admin.title") }}
-
+
{{ t("admin.title") }}
+
{{ isSuperadmin ? t("admin.subtitleAll") : t("admin.subtitleOrg") }}
- {{ t("admin.subtitleOrgsNote") }}
-
+
+
+
+
+
{{ t("admin.organizationHint") }}
+
{{ t("common.cancel") }}
diff --git a/Web App/web/src/i18n/da.json b/Web App/web/src/i18n/da.json
index 6524c8d..c03b1b0 100644
--- a/Web App/web/src/i18n/da.json
+++ b/Web App/web/src/i18n/da.json
@@ -26,7 +26,6 @@
"garage": "Garage",
"charging": "Opladning",
"settings": "Indstillinger",
- "users": "Brugere",
"lightMode": "Lys tilstand",
"darkMode": "Mørk tilstand",
"signedIn": "Logget ind",
@@ -104,15 +103,15 @@
},
"admin": {
- "eyebrow": "Administration",
"title": "Brugere",
"subtitleAll": "Konti på tværs af alle organisationer.",
"subtitleOrg": "Konti i din organisation.",
- "subtitleOrgsNote": "Organisationer administreres under Indstillinger.",
"addUser": "Tilføj bruger",
"colEmail": "E-mail",
"colName": "Navn",
"colOrganization": "Organisation",
+ "noOrganization": "— Ingen organisation —",
+ "organizationHint": "Lad feltet stå tomt for at oprette en konto uden organisation.",
"colRole": "Rolle",
"colCreated": "Oprettet",
"you": "(dig)",
@@ -144,7 +143,9 @@
"subtitle": "Administrer din konto, udseende og dine data.",
"tabs": {
"personal": "Personlige indstillinger",
- "integrations": "Integrationer"
+ "integrations": "Integrationer",
+ "users": "Brugere",
+ "organization": "Organisation"
},
"account": {
diff --git a/Web App/web/src/i18n/en.json b/Web App/web/src/i18n/en.json
index 75d7fbf..a657b78 100644
--- a/Web App/web/src/i18n/en.json
+++ b/Web App/web/src/i18n/en.json
@@ -26,7 +26,6 @@
"garage": "Garage",
"charging": "Charging",
"settings": "Settings",
- "users": "Users",
"lightMode": "Light mode",
"darkMode": "Dark mode",
"signedIn": "Signed in",
@@ -122,15 +121,15 @@
},
"admin": {
- "eyebrow": "Admin",
"title": "Users",
"subtitleAll": "Accounts across every organization.",
"subtitleOrg": "Accounts in your organization.",
- "subtitleOrgsNote": "Organizations are managed in Settings.",
"addUser": "Add user",
"colEmail": "Email",
"colName": "Name",
"colOrganization": "Organization",
+ "noOrganization": "— No organization —",
+ "organizationHint": "Leave unset to create an account that belongs to no organization.",
"colRole": "Role",
"colCreated": "Created",
"you": "(you)",
@@ -162,7 +161,9 @@
"subtitle": "Manage your account, appearance, and data.",
"tabs": {
"personal": "Personal settings",
- "integrations": "Integrations"
+ "integrations": "Integrations",
+ "users": "Users",
+ "organization": "Organization"
},
"account": {
diff --git a/Web App/web/src/i18n/pl.json b/Web App/web/src/i18n/pl.json
index d5eb4e1..5605032 100644
--- a/Web App/web/src/i18n/pl.json
+++ b/Web App/web/src/i18n/pl.json
@@ -26,7 +26,6 @@
"garage": "Garaż",
"charging": "Ładowanie",
"settings": "Ustawienia",
- "users": "Użytkownicy",
"lightMode": "Tryb jasny",
"darkMode": "Tryb ciemny",
"signedIn": "Zalogowano",
@@ -108,15 +107,15 @@
},
"admin": {
- "eyebrow": "Administracja",
"title": "Użytkownicy",
"subtitleAll": "Konta ze wszystkich organizacji.",
"subtitleOrg": "Konta w Twojej organizacji.",
- "subtitleOrgsNote": "Organizacjami zarządza się w Ustawieniach.",
"addUser": "Dodaj użytkownika",
"colEmail": "E-mail",
"colName": "Imię i nazwisko",
"colOrganization": "Organizacja",
+ "noOrganization": "— Bez organizacji —",
+ "organizationHint": "Zostaw puste, aby utworzyć konto bez organizacji.",
"colRole": "Rola",
"colCreated": "Utworzono",
"you": "(Ty)",
@@ -148,7 +147,9 @@
"subtitle": "Zarządzaj kontem, wyglądem i danymi.",
"tabs": {
"personal": "Ustawienia osobiste",
- "integrations": "Integracje"
+ "integrations": "Integracje",
+ "users": "Użytkownicy",
+ "organization": "Organizacja"
},
"account": {
diff --git a/Web App/web/src/router.js b/Web App/web/src/router.js
index b0e7c54..c603047 100644
--- a/Web App/web/src/router.js
+++ b/Web App/web/src/router.js
@@ -4,8 +4,7 @@ import CarDetail from "./views/CarDetail.vue";
import Charging from "./views/Charging.vue";
import Login from "./views/Login.vue";
import Settings from "./views/Settings.vue";
-import AdminUsers from "./views/AdminUsers.vue";
-import { isAuthenticated, isAdmin } from "./auth";
+import { isAuthenticated } from "./auth";
const routes = [
{ path: "/login", name: "login", component: Login, meta: { public: true } },
@@ -13,7 +12,8 @@ const routes = [
{ path: "/charging", name: "charging", component: Charging },
{ path: "/cars/:id", name: "car", component: CarDetail, props: true },
{ path: "/settings", name: "settings", component: Settings },
- { path: "/admin", name: "admin", component: AdminUsers, meta: { admin: true } },
+ // User management moved into Settings; keep old links working.
+ { path: "/admin", redirect: { name: "settings", query: { tab: "users" } } },
];
const router = createRouter({
@@ -29,11 +29,6 @@ router.beforeEach((to) => {
if (to.name === "login" && isAuthenticated.value) {
return { name: "dashboard" };
}
- // Admin-only routes: bounce non-admins to the dashboard. (Server enforces the
- // real gate; this just avoids showing a page that would 403 on every call.)
- if (to.meta.admin && !isAdmin.value) {
- return { name: "dashboard" };
- }
});
export default router;
diff --git a/Web App/web/src/views/Settings.vue b/Web App/web/src/views/Settings.vue
index ab99d35..d1afd21 100644
--- a/Web App/web/src/views/Settings.vue
+++ b/Web App/web/src/views/Settings.vue
@@ -1,23 +1,36 @@