zurich_kotak/src/screens/Lead.jsx
Yashas 9210681488 Wire the console to the platform and make it deployable
The scaffold had the brand right and nothing behind it: the login was a
600ms setTimeout with a TODO, and three pieces of the frontgen deploy
contract were missing.

- Sign in against POST /usr/login (org_id as a STRING — a number is
  rejected by the gateway) with the session in a provider; surface the
  gateway's own message rather than a generic "invalid credentials",
  because a wrong password and a user without access to this app look
  identical from here and are not.
- Runtime config: the API URL is read from the config.js the server
  writes at placement, never compiled in, and requireConfigValue throws
  so a build with no config.js fails loudly instead of calling whichever
  backend built it.
- base: './' plus a router basename taken from <base href>, so one build
  serves any mount path.
- Move the fonts and logo from public/ into src/assets/ — Vite rewrites
  bundled asset URLs to be relative, while a public/ file referenced as
  "/fonts/..." stays absolute and 404s under the /zurich-kotak/ mount.
- API client for recordview / detailview / form-screens / start /
  activity, and the pipeline shell whose sidebar is the state machine in
  the order a lead moves.

Queue and lead-file data wait on the record and detail views.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-24 15:20:13 +05:30

24 lines
787 B
JavaScript

import { useParams, Link } from 'react-router-dom'
import './screens.css'
/** The lead file. Built once the detail view is seeded. */
export default function Lead() {
const { instanceId } = useParams()
return (
<section>
<header className="page__head">
<div>
<h1 className="page__title">Lead {instanceId}</h1>
<p className="page__sub">Evidence, attribution and the referral file.</p>
</div>
<Link className="grid__link" to="/">Back to the queue</Link>
</header>
<div className="notice">
<strong>Not built yet.</strong>
<p>The lead file reads the <code>zk-dv-lead</code> detail view and the live
activity forms. Both arrive with the next app-config pass.</p>
</div>
</section>
)
}