refactor: distribute types from crm-types.ts to owning composables
Each composable now owns its types and exports them. Other composables import types from the owning composable. Deleted centralized crm-types.ts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -33,29 +33,15 @@ import { useChangeReview } from "~~/app/composables/useChangeReview";
|
||||
import { useCrmRealtime } from "~~/app/composables/useCrmRealtime";
|
||||
import { useWorkspaceRouting } from "~~/app/composables/useWorkspaceRouting";
|
||||
|
||||
// Types
|
||||
// Types from composables
|
||||
import type { Contact, CommItem } from "~~/app/composables/useContacts";
|
||||
import type { ContactInbox } from "~~/app/composables/useContactInboxes";
|
||||
import type {
|
||||
TabId,
|
||||
CalendarView,
|
||||
PeopleLeftMode,
|
||||
PeopleSortMode,
|
||||
PeopleVisibilityMode,
|
||||
FeedCard,
|
||||
Contact,
|
||||
CalendarEvent,
|
||||
EventLifecyclePhase,
|
||||
CommItem,
|
||||
ContactInbox,
|
||||
Deal,
|
||||
DealStep,
|
||||
WorkspaceDocument,
|
||||
PilotMessage,
|
||||
PilotChangeItem,
|
||||
ContextScope,
|
||||
} from "~~/app/composables/crm-types";
|
||||
|
||||
} from "~~/app/composables/useCalendar";
|
||||
import {
|
||||
safeTrim,
|
||||
dayKey,
|
||||
formatDay,
|
||||
formatTime,
|
||||
@@ -65,7 +51,22 @@ import {
|
||||
isEventFinalStatus,
|
||||
eventRelativeLabel,
|
||||
eventPhaseToneClass,
|
||||
} from "~~/app/composables/crm-types";
|
||||
} from "~~/app/composables/useCalendar";
|
||||
import type { Deal, DealStep } from "~~/app/composables/useDeals";
|
||||
import type { WorkspaceDocument } from "~~/app/composables/useDocuments";
|
||||
import type { FeedCard } from "~~/app/composables/useFeed";
|
||||
import type {
|
||||
PilotMessage,
|
||||
PilotChangeItem,
|
||||
ContextScope,
|
||||
} from "~~/app/composables/usePilotChat";
|
||||
import type { TabId, PeopleLeftMode } from "~~/app/composables/useWorkspaceRouting";
|
||||
|
||||
function safeTrim(value: unknown) { return String(value ?? "").trim(); }
|
||||
|
||||
type PeopleSortMode = "name" | "lastContact";
|
||||
type PeopleVisibilityMode = "all" | "hidden";
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// 1. Auth
|
||||
|
||||
Reference in New Issue
Block a user