Add roll-call Start/Stop UX to business and customer dashboards.

Owners/admins can run timed work days, manage tasks in a modal, and stop from the FAB or row control.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Alireza Hassani
2026-10-07 13:21:07 +03:30
co-authored by Cursor
parent ac287e02cc
commit c4e846564e
30 changed files with 4063 additions and 83 deletions
+8 -2
View File
@@ -1,14 +1,15 @@
import { useEffect, useState } from 'react'
import { NavLink, useNavigate } from 'react-router-dom'
import { Home, User, MapPin, ShoppingBag, Heart, Package, HelpCircle, LogOut, Globe } from 'lucide-react'
import { Home, User, MapPin, ShoppingBag, Heart, Package, ClipboardList, HelpCircle, LogOut, Globe } from 'lucide-react'
import { useLocale } from '@meshkee/dashboard-ui'
import { useAuth } from '../context/AuthContext'
import { useTenantBranding } from '../context/TenantBrandingContext'
import { useT } from '../i18n/useT'
import { getActiveBusinessDomain } from '../lib/businessContext'
import { getActiveBusinessDomain, getActiveBusinessId } from '../lib/businessContext'
import { isAbortError } from '../lib/api'
import { getWebsiteBusinessInfo, getWebsiteUrl } from '../services/websiteService'
import { hasBusinessModule } from '../utils/businessModules'
import { canAccessRollCall } from '../utils/rollCallAccess'
import meshkeeLogo from '../assets/meshkee-logo.png'
import styles from './Sidebar.module.css'
@@ -30,6 +31,8 @@ export function Sidebar({ open = false }: SidebarProps) {
const fallbackBusinessName = user?.customerBusinesses[0]?.name ?? t('app.storeFallback')
const displayName = brandName || fallbackBusinessName
const showMyProducts = hasBusinessModule(enabledModules, 'customer_products')
const activeBusinessId = getActiveBusinessId()
const showRollCall = canAccessRollCall(user, activeBusinessId)
const navItems = [
{ icon: Home, label: t('nav.home'), to: '/' },
@@ -40,6 +43,9 @@ export function Sidebar({ open = false }: SidebarProps) {
...(showMyProducts
? [{ icon: Package, label: t('nav.myProducts'), to: '/my-products' }]
: []),
...(showRollCall
? [{ icon: ClipboardList, label: t('nav.rollCall'), to: '/roll-call' }]
: []),
]
useEffect(() => {