sud life frontgen changes

This commit is contained in:
Yashas 2026-07-03 18:50:58 +05:30
parent 2c12699c20
commit 42c4a1e2a3
3 changed files with 12 additions and 6 deletions

View File

@ -90,7 +90,7 @@ export class ZinoClient {
const res = await this.request<LoginResponse>('POST', '/usr/login', {
email,
password,
...(orgId ? { org_id: Number(orgId) } : {}),
...(orgId ? { org_id: String(orgId) } : {}),
});
this.setToken(res.token);
return res;

View File

@ -1,9 +1,11 @@
// Aria Lead-to-Policy — dev app 386, org 53 (cloned from sandbox app 385).
// Workflow `e29c3c33` (v1) — identical source_uuid on dev. ids verified against postgres-dev.
// SUD Life — Lead-to-Policy — dev app 387, org 54 (cloned from sandbox app 385).
// Workflow `e29c3c33` (v1): the clone preserved the sandbox source_uuid, so the
// workflow/activity/state/record-view/detail-view UIDs are reused 1:1. All ids
// below verified against sm_dev_stable (postgres-dev, read-only) for app 387.
export const ORG_ID = '54';
export const APP_ID = '387';
export const WORKFLOW_UUID = '6594f9db-6da9-45a9-b66e-53f78bea2069';
export const WORKFLOW_UUID = 'e29c3c33-e294-4051-8325-a20de9ed99fc';
// Record views (POST /app/387/view/recordview, body.rv_template_uid).
export const RECORD_VIEW_IDS = {
@ -167,7 +169,7 @@ export function aiEmployeeForState(stateName?: string): { name: string; role: st
}
}
// --- Screen RBAC (mirrors tbl_appconfig_screens.permissions for app 385) ---
// --- Screen RBAC (mirrors tbl_appconfig_screens.permissions for app 387) ---
// Roles that bypass screen gating entirely (platform admins see every screen).
export const SUPER_ROLES = ['Super Admin', 'Admin'];

View File

@ -5,6 +5,7 @@ import { ArrowRight, CalendarClock, Eye, EyeOff, Lock, Mail, ShieldCheck, Sparkl
import { Button } from '../components';
import { ZinoLogo } from '../components/ZinoLogo';
import { useZino } from '../api/provider';
import { ORG_ID } from '../api/config';
const HIGHLIGHTS = [
{ Icon: Sparkles, title: 'AI employees do the legwork', body: 'Aria qualifies, engages and schedules leads autonomously.' },
@ -54,7 +55,10 @@ export function Login() {
setBusy(true);
setError(null);
try {
await login(email, password);
// Scope the token to THIS app's org (SUD Life = org 54). sales@zino.com
// exists in multiple orgs, so without org_id the gateway defaults to the
// wrong tenant (org 53) and app-387 activities silently mis-route.
await login(email, password, ORG_ID);
navigate(from, { replace: true });
} catch (err) {
setError(err instanceof Error ? err.message : ((err as { message?: string })?.message ?? 'Login failed'));