This commit is contained in:
parent
625deb2bd3
commit
20e8f994a1
2 changed files with 57 additions and 44 deletions
|
|
@ -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);
|
||||||
|
|
|
||||||
|
|
@ -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'),
|
|
||||||
items: [
|
|
||||||
{
|
{
|
||||||
label: 'Walkthrough Config',
|
label: 'Walkthrough Config',
|
||||||
description: 'Manage questions and checkpoints',
|
description: 'Configure daily walkthrough questions',
|
||||||
icon: Shield,
|
icon: ClipboardList,
|
||||||
action: () => navigate('/settings/walkthrough')
|
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,21 +204,20 @@ 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>
|
||||||
{section.items.map((item, itemIdx) => {
|
{adminSections.map((item, idx) => {
|
||||||
const Icon = item.icon;
|
const Icon = item.icon;
|
||||||
return (
|
return (
|
||||||
<button
|
<button
|
||||||
key={itemIdx}
|
key={idx}
|
||||||
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
|
||||||
${itemIdx !== section.items.length - 1 ? 'border-b border-subtle' : ''}
|
${idx !== adminSections.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">
|
||||||
|
|
@ -219,7 +232,6 @@ export default function SettingsPage() {
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</section>
|
</section>
|
||||||
))}
|
|
||||||
|
|
||||||
{/* Reset Button */}
|
{/* Reset Button */}
|
||||||
<button
|
<button
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue