Some checks are pending
Deploy to Production / deploy (push) Waiting to run
Test / backend-test (push) Waiting to run
Test / frontend-test (push) Waiting to run

This commit is contained in:
fullsizemalt 2025-12-12 18:38:41 -08:00
parent 625deb2bd3
commit 20e8f994a1
2 changed files with 57 additions and 44 deletions

View file

@ -42,8 +42,8 @@ function StageProgressMini({ currentStage }: { currentStage: string }) {
<div <div
key={stage} key={stage}
className={`h-1 w-3 rounded-full ${i < currentIndex ? 'bg-success' : className={`h-1 w-3 rounded-full ${i < currentIndex ? 'bg-success' :
i === currentIndex ? 'bg-accent' : i === currentIndex ? 'bg-accent' :
'bg-subtle' 'bg-subtle'
}`} }`}
/> />
))} ))}
@ -221,7 +221,8 @@ export default function BatchesPage() {
)} )}
{createTaskBatch && ( {createTaskBatch && (
<CreateTaskModal <CreateTaskModal
batchContext={createTaskBatch} isOpen={true}
initialBatchId={createTaskBatch.id}
onClose={() => setCreateTaskBatch(null)} onClose={() => setCreateTaskBatch(null)}
onSuccess={() => { onSuccess={() => {
setCreateTaskBatch(null); setCreateTaskBatch(null);

View file

@ -2,7 +2,8 @@ import { useNavigate } from 'react-router-dom';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { import {
Settings, Shield, ChevronRight, Sun, Moon, Globe, Type, Settings, Shield, ChevronRight, Sun, Moon, Globe, Type,
Eye, Volume2, Bell, Minimize2, RotateCcw, Monitor Eye, Volume2, Bell, Minimize2, RotateCcw, Monitor, Users,
ClipboardList, Layers, FileText
} from 'lucide-react'; } from 'lucide-react';
import { usePreferences } from '../context/PreferencesContext'; import { usePreferences } from '../context/PreferencesContext';
import { PageHeader } from '../components/ui/LinearPrimitives'; import { PageHeader } from '../components/ui/LinearPrimitives';
@ -12,17 +13,30 @@ export default function SettingsPage() {
const { t } = useTranslation(); const { t } = useTranslation();
const { preferences, setPreference, resetPreferences } = usePreferences(); const { preferences, setPreference, resetPreferences } = usePreferences();
const sections = [ const adminSections = [
{ {
title: t('settings.title'), label: 'Walkthrough Config',
items: [ description: 'Configure daily walkthrough questions',
{ icon: ClipboardList,
label: 'Walkthrough Config', action: () => navigate('/settings/walkthrough')
description: 'Manage questions and checkpoints', },
icon: Shield, {
action: () => navigate('/settings/walkthrough') label: 'Roles & Permissions',
} description: 'Manage staff access levels',
] icon: Shield,
action: () => navigate('/roles')
},
{
label: 'Task Templates',
description: 'Create reusable task templates',
icon: FileText,
action: () => navigate('/tasks/templates')
},
{
label: 'Layout Designer',
description: 'Design facility floor layouts',
icon: Layers,
action: () => navigate('/layout-designer')
} }
]; ];
@ -190,36 +204,34 @@ export default function SettingsPage() {
</div> </div>
</section> </section>
{/* Admin Sections */} {/* Admin Section */}
{sections.map((section, idx) => ( <section className="card overflow-hidden">
<section key={idx} className="card overflow-hidden"> <h2 className="text-xs font-medium text-tertiary uppercase tracking-wider p-4 border-b border-subtle">
<h2 className="text-xs font-medium text-tertiary uppercase tracking-wider p-4 border-b border-subtle"> Admin
Admin </h2>
</h2> {adminSections.map((item, idx) => {
{section.items.map((item, itemIdx) => { const Icon = item.icon;
const Icon = item.icon; return (
return ( <button
<button key={idx}
key={itemIdx} onClick={item.action}
onClick={item.action} className={`
className={` w-full flex items-center gap-4 p-4 hover:bg-tertiary transition-colors duration-fast text-left
w-full flex items-center gap-4 p-4 hover:bg-tertiary transition-colors duration-fast text-left ${idx !== adminSections.length - 1 ? 'border-b border-subtle' : ''}
${itemIdx !== section.items.length - 1 ? 'border-b border-subtle' : ''} `}
`} >
> <div className="w-9 h-9 rounded-md bg-accent-muted flex items-center justify-center text-accent">
<div className="w-9 h-9 rounded-md bg-accent-muted flex items-center justify-center text-accent"> <Icon size={18} />
<Icon size={18} /> </div>
</div> <div className="flex-1">
<div className="flex-1"> <div className="text-sm font-medium text-primary">{item.label}</div>
<div className="text-sm font-medium text-primary">{item.label}</div> <div className="text-xs text-tertiary">{item.description}</div>
<div className="text-xs text-tertiary">{item.description}</div> </div>
</div> <ChevronRight size={16} className="text-tertiary" />
<ChevronRight size={16} className="text-tertiary" /> </button>
</button> );
); })}
})} </section>
</section>
))}
{/* Reset Button */} {/* Reset Button */}
<button <button