// VMAX Store Manager — the daily close (trust ceremony), variance reports, and the day banner.
(function () {
const DS = window.VMAX365DesignSystem_0f78b2;
const { Button, SegmentedControl, Badge } = DS;
const { Icon, Overline } = window.VMAXUI;
const { NumberInput, Select } = window.VMAXW;
const { K, reasonCodes, mobileChannels } = window.VMAXP;
const { useVMAX } = window.VMAXStore;
const { Panel } = window.VMAXMGRUI;
// ---- The day banner (open / closing / closed; next-morning overlap) ----
function TheDay({ mobile }) {
const [s] = useVMAX();
const d = s.day;
const closed = d.status === 'closed';
return (
{closed ? 'Day closed' : 'Day open · trading'}
{closed ? `Signed off by ${d.closedBy} at ${d.closedAt} · balances carried to tomorrow` : `${s.day.date} · opened by ${d.openedBy || '—'} · close at end of shift or tomorrow morning`}
setC({ cold: v })} width={56} /> setR('cold', r)} />
setC({ hot: v })} width={56} /> setR('hot', r)} />
setC({ choc: v })} width={56} /> setR('choc', r)} note="over tolerance" />
{!allEntered ? 'Count still in progress' : variances.length === 0 ? 'Everything balanced' : `${variances.length} variance${variances.length > 1 ? 's' : ''} to confirm`}
{!allEntered ? 'Enter each counted figure above to finish.' : openV.length ? `${openV.length} still need a reason — a variance without one stays open.` : 'Every variance has a reason. Ready to sign off.'}
);
}
function CloseSection({ n, title, subtitle, children, mobile }) {
return (
{n}
{title}
{subtitle &&
{subtitle}
}
{children}
);
}
function CountRow({ label, expected, children }) {
return (