/* ============================================================================
MOWDEW LIVE DEMO — "Approve before work" (the 5th synchronized flow)
Homeowner snaps a photo + request → owner turns it into a PRICED quote →
homeowner APPROVES the exact price → it lands on the pro's route. The
photo and price carry across all three phones via the shared `world.req`.
null → requested → quoted → scheduled (+ declined)
World/actions/tracker/hints live in Mowdew Live Demo.html; the per-phone
UI lives here and is mounted from the demo phone shells.
========================================================================= */
/* the canned quote the owner sends (keeps the demo one-tap) */
const DEMO_QUOTE = {
lines: [{ label: 'Waterline tile descale', cents: 14000 }, { label: 'Acid spot-treat', cents: 4000 }],
total: 18000,
note: 'I can knock this out on your next visit — about 90 min, all-in.',
};
const DEMO_REQ = { photo: 'pool-before', desc: 'The waterline tile looks scaled — white crust along the edge.' };
/* ─── HOMEOWNER · the request lifecycle card (sits on the visit feed) ── */
function HomeRequestCard({ world, act, openReq }) {
const s = world.req;
// idle — the invitation to request work
if (!s || s === 'declined') {
return (
Something need fixing?
{s === 'declined' ? 'Declined — nothing was scheduled or billed.' : 'Snap it · Diego quotes · you approve the price'}
);
}
/* ─── PRO · the approved add-on, shown on the Crestline stop ─────────── */
function ProAddedWork({ world }) {
if (world.req !== 'scheduled') return null;
return (