fix(uat): dashboard snapshots current-state, pulse-chip gate, phone display, chip width
- pipeline funnel: count active interests by current stage (drop created_at window) — backfill had collapsed it to early stages (UAT 2026-06-03) - pipeline value tile: render current-state (don't thread the date range) - deal pulse chip: gate on the pulse_enabled master toggle (default ON) — was rendering even when admin turned it off; useFeatureFlag gains a default arg + the feature-flag endpoint a ?default= param (default-ON safe) - contact phone display: show international format + country flag (E164), not the bare national format that hid the country - berths: remove the dead row-density toggle; widen "Under offer to" chip on desktop so client names aren't truncated Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -15,7 +15,13 @@ export const GET = withAuth(async (req, ctx) => {
|
||||
where: and(eq(systemSettings.key, key), eq(systemSettings.portId, ctx.portId)),
|
||||
});
|
||||
|
||||
return NextResponse.json({ enabled: setting?.value === true });
|
||||
// `default` applies ONLY when the setting was never written for this
|
||||
// port (row absent). An explicit stored `false` always disables. Lets
|
||||
// default-ON settings (e.g. pulse_enabled) gate correctly via
|
||||
// ?default=true while default-OFF flags keep the old behaviour.
|
||||
const def = req.nextUrl.searchParams.get('default') === 'true';
|
||||
const enabled = setting ? setting.value === true : def;
|
||||
return NextResponse.json({ enabled });
|
||||
} catch (error) {
|
||||
return errorResponse(error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user