frontend-roles-ux

This commit is contained in:
VPN SaaS Dev
2026-05-16 19:35:04 +09:00
parent b03b63a5cc
commit 8efac3a844
3 changed files with 5 additions and 4 deletions

View File

@@ -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() {

View File

@@ -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) => `
<div class="stack-item work-order-card">