From 8efac3a8447c85f2da00811bbe0c210029ce30ad Mon Sep 17 00:00:00 2001 From: VPN SaaS Dev Date: Sat, 16 May 2026 19:35:04 +0900 Subject: [PATCH] frontend-roles-ux --- bot/main.py | 2 +- web/static/app.js | 2 +- web/static/sto.js | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/bot/main.py b/bot/main.py index 3fd7774..571b713 100644 --- a/bot/main.py +++ b/bot/main.py @@ -25,7 +25,7 @@ dp = Dispatcher() api = ApiClient() APPROVED_SERVICE_STATUSES = {"approved", "verified"} -STO_WORKPLACE_ROLES = {"owner", "mechanic"} +STO_WORKPLACE_ROLES = {"owner", "manager", "receptionist", "mechanic"} def webapp_url(path: str = "") -> str: diff --git a/web/static/app.js b/web/static/app.js index c9b2197..0893dfd 100644 --- a/web/static/app.js +++ b/web/static/app.js @@ -602,7 +602,7 @@ function hideAuthOverlay() { } const APPROVED_SERVICE_STATUSES = new Set(["approved", "verified"]); -const STO_WORKPLACE_ROLES = new Set(["owner", "mechanic"]); +const STO_WORKPLACE_ROLES = new Set(["owner", "manager", "receptionist", "mechanic"]); const STO_CALENDAR_ROLES = new Set(["owner", "manager", "receptionist"]); function isPlatformAdmin() { diff --git a/web/static/sto.js b/web/static/sto.js index e5bae6b..6a4fce1 100644 --- a/web/static/sto.js +++ b/web/static/sto.js @@ -3,7 +3,7 @@ tg?.ready(); tg?.expand(); const APPROVED_SERVICE_STATUSES = new Set(["approved", "verified"]); -const STO_WORKPLACE_ROLES = new Set(["owner", "mechanic"]); +const STO_WORKPLACE_ROLES = new Set(["owner", "manager", "receptionist", "mechanic"]); const state = { user: null, @@ -250,7 +250,8 @@ function renderDashboard(dashboard) { } function renderAppointments() { - const canManage = (activeCenter()?.employee_role || "owner") === "owner"; + const role = activeCenter()?.employee_role || "owner"; + const canManage = ["owner", "manager", "receptionist"].includes(role); document.querySelector("#appointmentsList").innerHTML = state.appointments.length ? state.appointments.map((item) => `