refactor(terminology): "deal" → "interest" sweep + route rename
Step 7 per PRE-DEPLOY-PLAN § 1.7. The canonical noun for an in-flight sales record is "interest" everywhere in the codebase — entity name, schema, kanban label, URL, etc. Customer-visible "deal" remnants are either a holdover from pre-refactor copy or hand-written admin descriptions that drifted. Sweeps applied: - /admin/qualification-criteria description: "before a deal moves out of the Enquiry stage" → "before an interest moves out…" - /admin/documenso descriptions (×3): "per-deal upload-and-place…" → "per-interest upload-and-place…"; "upload per deal" → "upload per interest"; "drafted per deal" → "drafted per interest". - bulk-archive-wizard.tsx placeholder: "late-stage deal" → "late-stage interest". - smart-archive-dialog.tsx title: "Late-stage deal" → "Late-stage interest". - /api/v1/berths/[id]/deal-documents → /api/v1/berths/[id]/interest-documents (route directory renamed; the single in-tree caller in berth-deal-documents-tab.tsx updated to match; React Query key also switched to "berth-interest-documents" for cache hygiene). The `BerthDealDocumentsTab` component name + `berth-deal-documents-tab.tsx` file path are intentionally left as-is — pure aliases, internal to the codebase, churn cost > readability win. Rename when next touched. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -152,7 +152,7 @@ const CONTRACT_RESERVATION_FIELDS: SettingFieldDef[] = [
|
||||
key: 'documenso_contract_template_id',
|
||||
label: 'Contract Documenso template ID (optional)',
|
||||
description:
|
||||
'Numeric template ID for sales contract generation. Leave blank to use the per-deal upload-and-place-fields flow instead (the typical path for contracts, since they are usually drafted custom per client).',
|
||||
'Numeric template ID for sales contract generation. Leave blank to use the per-interest upload-and-place-fields flow instead (the typical path for contracts, since they are usually drafted custom per client).',
|
||||
type: 'string',
|
||||
placeholder: '',
|
||||
defaultValue: '',
|
||||
@@ -161,7 +161,7 @@ const CONTRACT_RESERVATION_FIELDS: SettingFieldDef[] = [
|
||||
key: 'documenso_reservation_template_id',
|
||||
label: 'Reservation agreement Documenso template ID (optional)',
|
||||
description:
|
||||
'Numeric template ID for reservation agreements. Same logic — leave blank to upload per deal.',
|
||||
'Numeric template ID for reservation agreements. Same logic — leave blank to upload per interest.',
|
||||
type: 'string',
|
||||
placeholder: '',
|
||||
defaultValue: '',
|
||||
@@ -396,7 +396,7 @@ export default function DocumensoSettingsPage() {
|
||||
|
||||
<SettingsFormCard
|
||||
title="Contract & reservation templates (optional)"
|
||||
description="Most ports leave these blank because contracts/reservations are drafted per deal and uploaded for signing. Set a template ID only if you have a standardised contract/reservation Documenso template."
|
||||
description="Most ports leave these blank because contracts/reservations are drafted per interest and uploaded for signing. Set a template ID only if you have a standardised contract/reservation Documenso template."
|
||||
fields={CONTRACT_RESERVATION_FIELDS}
|
||||
/>
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ export default function QualificationCriteriaPage() {
|
||||
<PageHeader
|
||||
title="Qualification criteria"
|
||||
eyebrow="ADMIN"
|
||||
description="Configure the checklist reps complete before a deal moves out of the Enquiry stage. Reorder, enable/disable, or add port-specific criteria. The 'fully qualified' hint on the interest detail surfaces when every enabled criterion is confirmed."
|
||||
description="Configure the checklist reps complete before an interest moves out of the Enquiry stage. Reorder, enable/disable, or add port-specific criteria. The 'fully qualified' hint on the interest detail surfaces when every enabled criterion is confirmed."
|
||||
/>
|
||||
<QualificationCriteriaAdmin />
|
||||
</div>
|
||||
|
||||
@@ -5,7 +5,9 @@ import { errorResponse, NotFoundError } from '@/lib/errors';
|
||||
import { listDealDocumentsForBerth } from '@/lib/services/documents.service';
|
||||
|
||||
/**
|
||||
* GET /api/v1/berths/[id]/deal-documents
|
||||
* GET /api/v1/berths/[id]/interest-documents (renamed from
|
||||
* `/deal-documents` in the 2026-05-14 terminology sweep — canonical
|
||||
* noun is "interest").
|
||||
*
|
||||
* Lists documents attached to interests currently linked to this berth.
|
||||
* Same permission gate as the berth page itself (berths.view).
|
||||
@@ -32,9 +32,9 @@ export function BerthDealDocumentsTab({ berthId }: { berthId: string }) {
|
||||
const portSlug = params?.portSlug ?? '';
|
||||
|
||||
const { data: docs = [], isLoading } = useQuery<BerthDealDoc[]>({
|
||||
queryKey: ['berth-deal-documents', berthId],
|
||||
queryKey: ['berth-interest-documents', berthId],
|
||||
queryFn: () =>
|
||||
apiFetch<{ data: BerthDealDoc[] }>(`/api/v1/berths/${berthId}/deal-documents`).then(
|
||||
apiFetch<{ data: BerthDealDoc[] }>(`/api/v1/berths/${berthId}/interest-documents`).then(
|
||||
(r) => r.data,
|
||||
),
|
||||
});
|
||||
|
||||
@@ -228,7 +228,7 @@ function BulkArchiveWizardBody({ open, onOpenChange, clientIds, onSuccess }: Pro
|
||||
[currentHighStakes.clientId]: e.target.value,
|
||||
}))
|
||||
}
|
||||
placeholder="Why are you archiving this late-stage deal? (≥ 5 chars)"
|
||||
placeholder="Why are you archiving this late-stage interest? (≥ 5 chars)"
|
||||
rows={3}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -313,7 +313,7 @@ function SmartArchiveDialogBody({
|
||||
<CardHeader className="pb-2">
|
||||
<CardTitle className="text-sm font-medium text-amber-900 flex items-center gap-2">
|
||||
<AlertTriangle className="h-4 w-4" aria-hidden />
|
||||
Late-stage deal — confirmation required
|
||||
Late-stage interest — confirmation required
|
||||
</CardTitle>
|
||||
</CardHeader>
|
||||
<CardContent className="text-xs text-amber-900">
|
||||
|
||||
Reference in New Issue
Block a user