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:
@@ -52,7 +52,7 @@ export const COMPANY_COLUMN_OPTIONS = [
|
||||
{ id: 'actions', label: 'Actions', alwaysVisible: true },
|
||||
];
|
||||
|
||||
/** Hidden by default — keep the table dense; opt-in to longer columns. */
|
||||
/** Hidden by default - keep the table dense; opt-in to longer columns. */
|
||||
export const COMPANY_DEFAULT_HIDDEN: string[] = ['legalName', 'taxId'];
|
||||
|
||||
interface GetCompanyColumnsOptions {
|
||||
|
||||
@@ -77,7 +77,7 @@ interface CompanyFormProps {
|
||||
notes: string | null;
|
||||
};
|
||||
/**
|
||||
* Optional initial values for the create flow — used by the global
|
||||
* Optional initial values for the create flow - used by the global
|
||||
* command-search quick-create ("New company 'matthew'" → lands on
|
||||
* `/companies?create=1&prefill_name=matthew`). Ignored in edit mode.
|
||||
*/
|
||||
@@ -91,7 +91,7 @@ export function CompanyForm({ open, onOpenChange, company, prefill }: CompanyFor
|
||||
const router = useRouter();
|
||||
const isEdit = !!company;
|
||||
const [formError, setFormError] = useState<string | null>(null);
|
||||
// Connection state — only used in create mode. Editing companies is done
|
||||
// Connection state - only used in create mode. Editing companies is done
|
||||
// from the detail page where members + yachts have their own tabs that
|
||||
// know how to handle removal / reassignment cleanly.
|
||||
const [attachedClientIds, setAttachedClientIds] = useState<string[]>([]);
|
||||
@@ -107,7 +107,7 @@ export function CompanyForm({ open, onOpenChange, company, prefill }: CompanyFor
|
||||
{ yachtId: string; yachtName: string }[] | null
|
||||
>(null);
|
||||
// Reserved for the inverse pull-in (attached yacht → owner client). Wired
|
||||
// through but the inferring query is deferred — owner history isn't yet
|
||||
// through but the inferring query is deferred - owner history isn't yet
|
||||
// surfaced cheaply via the yacht endpoint.
|
||||
// const [pendingOwnerPullIn, setPendingOwnerPullIn] = useState<...>(null);
|
||||
const [createInterestFor, setCreateInterestFor] = useState<string | null>(null);
|
||||
@@ -174,7 +174,7 @@ export function CompanyForm({ open, onOpenChange, company, prefill }: CompanyFor
|
||||
});
|
||||
const newCompanyId = res.data.id;
|
||||
// Connect each attached client as a company member. Failures collected
|
||||
// here surface as a toast but don't roll back the company create — the
|
||||
// here surface as a toast but don't roll back the company create - the
|
||||
// rep can fix individual mismatches from the company detail page.
|
||||
for (const clientId of attachedClientIds) {
|
||||
try {
|
||||
@@ -232,10 +232,10 @@ export function CompanyForm({ open, onOpenChange, company, prefill }: CompanyFor
|
||||
return;
|
||||
}
|
||||
} catch {
|
||||
// Yacht lookup failure is non-fatal — fall through to interest prompt.
|
||||
// Yacht lookup failure is non-fatal - fall through to interest prompt.
|
||||
}
|
||||
|
||||
// (Step 2b — yacht-owner pull-in — deferred. Adding it cleanly needs
|
||||
// (Step 2b - yacht-owner pull-in - deferred. Adding it cleanly needs
|
||||
// the yachts API to surface prior owners post-transfer, which currently
|
||||
// only lives in the activity log. Tracked for follow-up.)
|
||||
|
||||
@@ -396,7 +396,7 @@ export function CompanyForm({ open, onOpenChange, company, prefill }: CompanyFor
|
||||
|
||||
<Separator />
|
||||
|
||||
{/* Connections — only on create. Editing membership / yacht ownership
|
||||
{/* Connections - only on create. Editing membership / yacht ownership
|
||||
from this form would race with the same actions on the detail
|
||||
tabs (and the audit trail of a "create + attach 5 clients in one
|
||||
flow" is much more readable than 6 separate create rows). */}
|
||||
@@ -498,7 +498,7 @@ export function CompanyForm({ open, onOpenChange, company, prefill }: CompanyFor
|
||||
</SheetContent>
|
||||
|
||||
{/* Stacked "+ New client" / "+ New yacht" forms. On successful create
|
||||
the picker we open them from doesn't know the new id yet — the
|
||||
the picker we open them from doesn't know the new id yet - the
|
||||
ClientList / YachtList query refetches via react-query invalidation
|
||||
and the rep can pick the new entity from the dropdown immediately. */}
|
||||
<ClientForm open={clientFormOpen} onOpenChange={setClientFormOpen} />
|
||||
@@ -506,7 +506,7 @@ export function CompanyForm({ open, onOpenChange, company, prefill }: CompanyFor
|
||||
<YachtForm
|
||||
open={yachtFormOpen}
|
||||
onOpenChange={setYachtFormOpen}
|
||||
// No initialOwner — the new yacht starts unowned-by-rules-engine; the
|
||||
// No initialOwner - the new yacht starts unowned-by-rules-engine; the
|
||||
// company-form will optionally transfer it on save.
|
||||
/>
|
||||
)}
|
||||
|
||||
@@ -125,7 +125,7 @@ export function CompanyList() {
|
||||
onArchive: (company) => setArchiveCompany(company),
|
||||
});
|
||||
|
||||
// Persisted column visibility — same pattern as ClientList / BerthList.
|
||||
// Persisted column visibility - same pattern as ClientList / BerthList.
|
||||
const { hidden, setHidden } = useTablePreferences('companies', COMPANY_DEFAULT_HIDDEN);
|
||||
const columnVisibility = Object.fromEntries(hidden.map((id) => [id, false]));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user