chore(autonomous-session): consolidate uncommitted work from prior session
Bundles the prior autonomous-session output that was sitting unstaged: - Em-dash sweep across src/ + tests/ (en-dash/em-dash to hyphen, ~2280 instances) - country-flag-icons rollout (CountryFlag component, replaces emoji glyphs that never rendered on Windows; lazy-loads the 3x2 SVG index as a single chunk after the per-subpath dynamic-import approach silently failed in webpack) - Admin IA Phase 1+2: 7-domain regroup, 41 to 38 pages, /admin/berths index, redirects (ocr to ai, reports to dashboard, invitations to users), docs/admin-ia-proposal.md - Per-template email tester (registry + endpoint + UI on Email admin page) - Cancel-document mode picker (delete-from-Documenso vs keep-for-audit) - Dashboard PDF report: 25 widgets, SVG charts, date-range picker, 11 resolvers - Customize-widgets per-region sortables at xl+ (charts/rails/feed); single flat sortable below xl when the layout stacks; per-viewport saved orders - Audit doc updates capturing each shipped item - Lint fixes: react-compiler immutability in DonutChart (reduce instead of let-reassign), set-state-in-effect disables in CountryFlag and UploadForSigning preview-bytes effect, unused 'confirm' destructures in interest contract + reservation tabs, unescaped apostrophe in test-template card copy
This commit is contained in:
@@ -16,7 +16,7 @@ interface Props {
|
||||
fullName: string;
|
||||
status: string;
|
||||
placeOfResidence: string | null;
|
||||
/** Optional primary email — surfaces the same Email button the main
|
||||
/** Optional primary email - surfaces the same Email button the main
|
||||
* ClientDetailHeader renders. Null when the residential client
|
||||
* hasn't shared an email. */
|
||||
email?: string | null;
|
||||
@@ -82,7 +82,7 @@ export function ResidentialClientDetailHeader({ client, onSaveName }: Props) {
|
||||
) : null}
|
||||
</div>
|
||||
|
||||
{/* Action row — mirrors the buttons on the main ClientDetailHeader so
|
||||
{/* Action row - mirrors the buttons on the main ClientDetailHeader so
|
||||
residential reps have one-tap email / call / WhatsApp from the
|
||||
header without scrolling to the contact section. */}
|
||||
{client.email || callHref || whatsappNumber ? (
|
||||
|
||||
@@ -86,7 +86,7 @@ export function ResidentialClientDetail({
|
||||
return () => setChrome({ title: null, showBackButton: false });
|
||||
}, [titleForChrome, setChrome]);
|
||||
|
||||
// Topbar breadcrumb hint — Residential › Clients › <name>
|
||||
// Topbar breadcrumb hint - Residential › Clients › <name>
|
||||
useBreadcrumbHint(data ? { parents: [], current: data.data.fullName } : null);
|
||||
|
||||
const stageLabels = useMemo(() => {
|
||||
|
||||
@@ -7,7 +7,7 @@ import { RESIDENTIAL_STAGE_LABELS } from './residential-interest-filters';
|
||||
|
||||
/**
|
||||
* Mobile / grid card for the residential interests list. Mirrors the
|
||||
* footprint of <InterestCard> on the main list — same touch target
|
||||
* footprint of <InterestCard> on the main list - same touch target
|
||||
* conventions (entire card is clickable, generous padding, truncated
|
||||
* meta below the title).
|
||||
*/
|
||||
@@ -26,7 +26,7 @@ export function ResidentialInterestCard({
|
||||
>
|
||||
<div className="flex items-start justify-between gap-2">
|
||||
<div className="min-w-0">
|
||||
<p className="truncate text-sm font-medium">{interest.clientName ?? '—'}</p>
|
||||
<p className="truncate text-sm font-medium">{interest.clientName ?? '-'}</p>
|
||||
<div className="mt-1 flex flex-wrap items-center gap-1.5">
|
||||
<Badge variant="secondary" className="text-[10px]">
|
||||
{RESIDENTIAL_STAGE_LABELS[interest.pipelineStage] ?? interest.pipelineStage}
|
||||
|
||||
@@ -24,7 +24,7 @@ export interface ResidentialInterestRow {
|
||||
assignedTo: string | null;
|
||||
archivedAt: string | null;
|
||||
updatedAt: string;
|
||||
/** Optional client snapshot — server may join the residential client row
|
||||
/** Optional client snapshot - server may join the residential client row
|
||||
* so the table can show the client name in column 1 without a second
|
||||
* fetch per row. */
|
||||
clientName?: string | null;
|
||||
@@ -58,7 +58,7 @@ export function getResidentialInterestColumns({
|
||||
header: 'Client',
|
||||
cell: ({ row }) => {
|
||||
const r = row.original;
|
||||
const name = r.clientName ?? '—';
|
||||
const name = r.clientName ?? '-';
|
||||
return (
|
||||
<Link
|
||||
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
||||
@@ -89,7 +89,7 @@ export function getResidentialInterestColumns({
|
||||
accessorKey: 'source',
|
||||
header: 'Source',
|
||||
cell: ({ row }) => (
|
||||
<span className="capitalize text-muted-foreground">{row.original.source ?? '—'}</span>
|
||||
<span className="capitalize text-muted-foreground">{row.original.source ?? '-'}</span>
|
||||
),
|
||||
},
|
||||
{
|
||||
@@ -99,7 +99,7 @@ export function getResidentialInterestColumns({
|
||||
enableSorting: false,
|
||||
cell: ({ row }) => (
|
||||
<span className="line-clamp-1 max-w-xs text-muted-foreground">
|
||||
{row.original.preferences ?? '—'}
|
||||
{row.original.preferences ?? '-'}
|
||||
</span>
|
||||
),
|
||||
},
|
||||
@@ -110,7 +110,7 @@ export function getResidentialInterestColumns({
|
||||
enableSorting: false,
|
||||
cell: ({ row }) => (
|
||||
<span className="line-clamp-1 max-w-xs text-muted-foreground">
|
||||
{row.original.notes ?? '—'}
|
||||
{row.original.notes ?? '-'}
|
||||
</span>
|
||||
),
|
||||
},
|
||||
|
||||
@@ -2,7 +2,7 @@ import type { FilterDefinition } from '@/components/shared/filter-bar';
|
||||
import { DEFAULT_RESIDENTIAL_PIPELINE_STAGES, PIPELINE_STAGES } from '@/lib/validators/residential';
|
||||
|
||||
/**
|
||||
* Filter definitions for the residential interests list — mirrors the
|
||||
* Filter definitions for the residential interests list - mirrors the
|
||||
* shape used by the main interests list (`interestFilterDefinitions`)
|
||||
* so the FilterBar + saved-views infra works identically. Residential
|
||||
* has its own pipeline (new / contacted / viewing_scheduled / …) and
|
||||
@@ -15,8 +15,8 @@ const RESIDENTIAL_STAGE_LABELS: Record<string, string> = {
|
||||
viewing_scheduled: 'Viewing scheduled',
|
||||
offer_made: 'Offer made',
|
||||
offer_accepted: 'Offer accepted',
|
||||
closed_won: 'Closed — won',
|
||||
closed_lost: 'Closed — lost',
|
||||
closed_won: 'Closed - won',
|
||||
closed_lost: 'Closed - lost',
|
||||
};
|
||||
|
||||
export const residentialInterestFilterDefinitions: FilterDefinition[] = [
|
||||
|
||||
@@ -50,11 +50,11 @@ import {
|
||||
} from './residential-interest-filters';
|
||||
|
||||
/**
|
||||
* Residential interests list — parity with the main InterestList. Wires
|
||||
* Residential interests list - parity with the main InterestList. Wires
|
||||
* the same DataTable + FilterBar + ColumnPicker + SavedViews + bulkActions
|
||||
* stack onto the /api/v1/residential/interests endpoint. Kanban view is
|
||||
* intentionally omitted (the residential pipeline stages differ and the
|
||||
* board layout isn't yet wired through for them — opens as a follow-up).
|
||||
* board layout isn't yet wired through for them - opens as a follow-up).
|
||||
*/
|
||||
export function ResidentialInterestsList() {
|
||||
const params = useParams<{ portSlug: string }>();
|
||||
@@ -65,7 +65,7 @@ export function ResidentialInterestsList() {
|
||||
const { can } = usePermissions();
|
||||
const [saveViewOpen, setSaveViewOpen] = useState(false);
|
||||
|
||||
// Bulk-action dialog state — same shape as the main InterestList so
|
||||
// Bulk-action dialog state - same shape as the main InterestList so
|
||||
// the inner controls feel identical.
|
||||
const [stageDialog, setStageDialog] = useState<{ ids: string[] } | null>(null);
|
||||
const [stageChoice, setStageChoice] = useState<string>(
|
||||
@@ -97,7 +97,7 @@ export function ResidentialInterestsList() {
|
||||
'residential_interest:archived': [['residential-interests']],
|
||||
});
|
||||
|
||||
// Mirror the main list's two-mutation idiom — per-row archive when the
|
||||
// Mirror the main list's two-mutation idiom - per-row archive when the
|
||||
// rep uses the kebab on a single row, bulk endpoint when they tick the
|
||||
// checkbox in the header.
|
||||
const archiveMutation = useMutation({
|
||||
@@ -122,7 +122,7 @@ export function ResidentialInterestsList() {
|
||||
const s = res.data.summary;
|
||||
if (s.failed > 0) {
|
||||
toast.warning(
|
||||
`${s.succeeded} of ${s.total} succeeded. ${s.failed} failed — check the activity log.`,
|
||||
`${s.succeeded} of ${s.total} succeeded. ${s.failed} failed - check the activity log.`,
|
||||
);
|
||||
} else {
|
||||
toast.success(`Updated ${s.succeeded} interest${s.succeeded === 1 ? '' : 's'}`);
|
||||
@@ -150,7 +150,7 @@ export function ResidentialInterestsList() {
|
||||
);
|
||||
const columnVisibility = Object.fromEntries(hidden.map((id) => [id, false]));
|
||||
|
||||
// Stages enum is set at module load — no runtime invariant to enforce.
|
||||
// Stages enum is set at module load - no runtime invariant to enforce.
|
||||
// (Earlier draft had a useEffect resetting `stageChoice` if it fell
|
||||
// out of the enum; React Compiler flags setState-in-effect, so we
|
||||
// rely on the dropdown's controlled value to enforce validity.)
|
||||
|
||||
Reference in New Issue
Block a user