chore(style): codebase em-dash sweep + minor layout polish
Replaces every em-dash and en-dash with regular ASCII hyphens across comments, JSX strings, and dev-facing logs. Mostly cosmetic but stops the inconsistent mix that crept in over the last few months (some files used em-dashes in comments, others didn't, some used both). Bundles two small dashboard-layout tweaks that touch a couple of already-modified files: - (dashboard)/layout.tsx main padding goes from p-6 to pt-3 px-6 pb-6 so page content sits closer to the topbar. - Sidebar now receives the ports list it needs for the footer port switcher. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -29,8 +29,8 @@ import type {
|
||||
|
||||
// ─── Port-scope FK validator ─────────────────────────────────────────────────
|
||||
|
||||
// Tenant scope: every FK referenced from an interest body — clientId, berthId,
|
||||
// and yachtId — must belong to the caller's port. Without this, a body-supplied
|
||||
// Tenant scope: every FK referenced from an interest body - clientId, berthId,
|
||||
// and yachtId - must belong to the caller's port. Without this, a body-supplied
|
||||
// foreign-port id would create an interest that joins through these FKs and
|
||||
// surfaces foreign-tenant data on subsequent reads (clientName, berth mooring
|
||||
// number, yacht ownership). assertYachtBelongsToClient still runs separately to
|
||||
@@ -370,7 +370,7 @@ export async function getInterestById(id: string, portId: string) {
|
||||
.where(eq(interestNotes.interestId, id));
|
||||
|
||||
// Active reminder count for the interest's bell badge. Counts reminders
|
||||
// directly linked via interestId — `pending` and `snoozed` only;
|
||||
// directly linked via interestId - `pending` and `snoozed` only;
|
||||
// completed/dismissed don't surface.
|
||||
const [{ count: activeReminderCount } = { count: 0 }] = await db
|
||||
.select({ count: sql<number>`count(*)::int` })
|
||||
@@ -633,7 +633,7 @@ export async function changeInterestStage(
|
||||
// Moves an interest forward to `target` if (and only if) it is currently behind
|
||||
// it in the pipeline order. Used by lifecycle events (EOI sent, EOI signed,
|
||||
// deposit recorded, contract signed) so the user-visible stage tracks reality
|
||||
// without overwriting a more advanced state — e.g. a late-arriving signed-EOI
|
||||
// without overwriting a more advanced state - e.g. a late-arriving signed-EOI
|
||||
// webhook on an interest that has already moved on to `contract_sent` is a
|
||||
// no-op rather than a regression.
|
||||
//
|
||||
@@ -658,7 +658,7 @@ export async function advanceStageIfBehind(
|
||||
|
||||
// yachtId gate: changeInterestStage requires a yacht before leaving `open`.
|
||||
// EOI events imply a yacht is in the picture, but if the data is missing we
|
||||
// bail rather than throw — the EOI itself shouldn't fail because of this.
|
||||
// bail rather than throw - the EOI itself shouldn't fail because of this.
|
||||
if (existing.pipelineStage === 'open' && !existing.yachtId) {
|
||||
return false;
|
||||
}
|
||||
@@ -671,7 +671,7 @@ export async function advanceStageIfBehind(
|
||||
//
|
||||
// Records a terminal outcome for the interest and moves the pipelineStage to
|
||||
// `completed` so the funnel/kanban reflect the final state. The outcome
|
||||
// distinguishes won deals (they made it through) from lost variants — funnel
|
||||
// distinguishes won deals (they made it through) from lost variants - funnel
|
||||
// math and reports key off the `outcome` column to compute true conversion.
|
||||
//
|
||||
// Both the stage advance and the outcome write happen in one transaction so
|
||||
|
||||
Reference in New Issue
Block a user