- Cash Floats: ledger card (opening balance, top-ups, slips), manual entries, slip photos - Office access level; clock app Slips tab (photograph a slip, popup for supplier/cost code/comments/amount); only Office sees it; per-role route table in lib/clock-access - Job cards: Machine Service PDF (with Oil block), JC numbers, manual Close job, Delete - Hide Expenses > Vehicle Costs and Finance (Bastion) from the menu Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
16 lines
1.1 KiB
TypeScript
16 lines
1.1 KiB
TypeScript
import type {Metadata} from 'next';
|
|
import {ClockAppHeader} from '@/components/ClockAppHeader';
|
|
import {getSession} from '@/lib/auth';
|
|
import {ClockBottomNav} from '@/components/ClockBottomNav';
|
|
import {ClockInstallPrompt} from '@/components/ClockInstallPrompt';
|
|
export const metadata:Metadata={
|
|
title:'Plant Clock · Mega Plant',description:'Scan employee badges to clock in or out at the Plant.',
|
|
manifest:'/clock.webmanifest',
|
|
appleWebApp:{capable:true,title:'Plant Clock',statusBarStyle:'default'},
|
|
icons:{icon:[{url:'/icons/plant-clock-192.png',sizes:'192x192',type:'image/png'}],apple:[{url:'/icons/plant-clock-192.png',sizes:'192x192'}]},
|
|
};
|
|
export default async function ClockLayout({children}:{children:React.ReactNode}) {
|
|
let access:'full'|'clock'|'mechanic'|'office'='full';
|
|
try{access=(await getSession())?.access??'full';}catch{/* sign-in stays available during an outage */}
|
|
return <div className="min-h-svh bg-bg pt-[env(safe-area-inset-top)] pb-[calc(env(safe-area-inset-bottom)+72px)]"><ClockAppHeader/><ClockInstallPrompt/>{children}<ClockBottomNav access={access}/></div>;
|
|
}
|