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:
@@ -40,12 +40,12 @@ export function YachtCard({ yacht, portSlug, onEdit, onArchive }: YachtCardProps
|
||||
// Prefer metric dimensions; fall back to imperial
|
||||
let dimText: string | null = null;
|
||||
if (yacht.lengthM || yacht.widthM) {
|
||||
const l = yacht.lengthM ?? '—';
|
||||
const w = yacht.widthM ?? '—';
|
||||
const l = yacht.lengthM ?? '-';
|
||||
const w = yacht.widthM ?? '-';
|
||||
dimText = `${l}m × ${w}m`;
|
||||
} else if (yacht.lengthFt || yacht.widthFt) {
|
||||
const l = yacht.lengthFt ?? '—';
|
||||
const w = yacht.widthFt ?? '—';
|
||||
const l = yacht.lengthFt ?? '-';
|
||||
const w = yacht.widthFt ?? '-';
|
||||
dimText = `${l}ft × ${w}ft`;
|
||||
}
|
||||
|
||||
|
||||
@@ -45,13 +45,13 @@ const STATUS_LABELS: Record<string, string> = {
|
||||
|
||||
function formatDimensions(yacht: YachtRow): string | null {
|
||||
if (yacht.lengthFt || yacht.widthFt) {
|
||||
const length = yacht.lengthFt ?? '—';
|
||||
const width = yacht.widthFt ?? '—';
|
||||
const length = yacht.lengthFt ?? '-';
|
||||
const width = yacht.widthFt ?? '-';
|
||||
return `${length} × ${width} ft`;
|
||||
}
|
||||
if (yacht.lengthM || yacht.widthM) {
|
||||
const length = yacht.lengthM ?? '—';
|
||||
const width = yacht.widthM ?? '—';
|
||||
const length = yacht.lengthM ?? '-';
|
||||
const width = yacht.widthM ?? '-';
|
||||
return `${length} × ${width} m`;
|
||||
}
|
||||
return null;
|
||||
@@ -103,7 +103,7 @@ export function getYachtColumns({
|
||||
enableSorting: false,
|
||||
cell: ({ row }) => {
|
||||
const dims = formatDimensions(row.original);
|
||||
if (!dims) return <span className="text-muted-foreground">—</span>;
|
||||
if (!dims) return <span className="text-muted-foreground">-</span>;
|
||||
return <span className="text-sm">{dims}</span>;
|
||||
},
|
||||
},
|
||||
@@ -114,7 +114,7 @@ export function getYachtColumns({
|
||||
enableSorting: false,
|
||||
cell: ({ getValue }) => {
|
||||
const value = getValue() as string | null;
|
||||
if (!value) return <span className="text-muted-foreground">—</span>;
|
||||
if (!value) return <span className="text-muted-foreground">-</span>;
|
||||
return <span className="text-sm">{value}</span>;
|
||||
},
|
||||
},
|
||||
|
||||
@@ -68,7 +68,7 @@ export function OwnerLink({
|
||||
* per-row fetch (avoids an N+1 round-trip on lists). */
|
||||
preloadedName?: string | null;
|
||||
}) {
|
||||
// Only fetch when the parent didn't already supply a name — list endpoints
|
||||
// Only fetch when the parent didn't already supply a name - list endpoints
|
||||
// batch-resolve owners server-side via a join.
|
||||
const { data } = useQuery<{ fullName?: string; name?: string }>({
|
||||
queryKey: [type === 'client' ? 'clients' : 'companies', id, 'name-only'],
|
||||
|
||||
@@ -117,7 +117,7 @@ export function YachtForm({ open, onOpenChange, yacht }: YachtFormProps) {
|
||||
const mutation = useMutation({
|
||||
mutationFn: async (data: CreateYachtInput) => {
|
||||
if (isEdit) {
|
||||
// updateYachtSchema omits owner + tagIds — strip them from PATCH body.
|
||||
// updateYachtSchema omits owner + tagIds - strip them from PATCH body.
|
||||
const { owner: _owner, tagIds: _tIds, ...rest } = data;
|
||||
void _owner;
|
||||
void _tIds;
|
||||
|
||||
@@ -43,7 +43,7 @@ const REASON_LABELS: Record<string, string> = {
|
||||
};
|
||||
|
||||
function formatDate(value: string | null): string {
|
||||
if (!value) return '—';
|
||||
if (!value) return '-';
|
||||
const date = new Date(value);
|
||||
if (Number.isNaN(date.getTime())) return value;
|
||||
return date.toLocaleDateString();
|
||||
@@ -109,10 +109,10 @@ export function YachtOwnershipHistory({ yachtId }: YachtOwnershipHistoryProps) {
|
||||
<TableCell className="text-sm text-muted-foreground">
|
||||
{row.transferReason
|
||||
? (REASON_LABELS[row.transferReason] ?? row.transferReason)
|
||||
: '—'}
|
||||
: '-'}
|
||||
</TableCell>
|
||||
<TableCell className="text-sm text-muted-foreground max-w-[320px] truncate">
|
||||
{row.transferNotes ?? '—'}
|
||||
{row.transferNotes ?? '-'}
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
))}
|
||||
|
||||
@@ -190,7 +190,7 @@ function OverviewTab({ yachtId, yacht }: { yachtId: string; yacht: YachtTabsYach
|
||||
variant="textarea"
|
||||
value={yacht.notes}
|
||||
onSave={save('notes')}
|
||||
emptyText="No notes — click to add"
|
||||
emptyText="No notes - click to add"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -238,7 +238,7 @@ function YachtInterestsTab({ yachtId }: { yachtId: string }) {
|
||||
<span className="w-36 shrink-0 text-xs font-medium uppercase text-muted-foreground">
|
||||
{i.pipelineStage.replace(/_/g, ' ')}
|
||||
</span>
|
||||
<span className="flex-1 truncate">{i.clientName ?? '—'}</span>
|
||||
<span className="flex-1 truncate">{i.clientName ?? '-'}</span>
|
||||
{i.berthMooringNumber && (
|
||||
<span className="shrink-0 text-xs text-muted-foreground">
|
||||
Berth {i.berthMooringNumber}
|
||||
|
||||
Reference in New Issue
Block a user