Files
Jyotisha/frontend/src/lib/chart-library-view.ts
T
Jesse_ChenandCursor dc6598d7e4 fix(web): keep the settings dialog one size and move billing into it (BUG-554)
The four account panes now share a fixed frame, chart profiles open as list then detail, and membership lives in the homepage dialog instead of a separate page.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-06 18:29:51 +08:00

19 lines
610 B
TypeScript

export type ChartLibraryView =
| { readonly kind: "list" }
| { readonly kind: "self" }
| { readonly kind: "other"; readonly id: string }
| { readonly kind: "add" };
export const CHART_LIBRARY_LIST_VIEW: ChartLibraryView = { kind: "list" };
export function synastryHistoryForPartner<T extends {
readonly partnerName: string;
readonly partnerChartId?: string;
}>(history: readonly T[], partner: { readonly id: string; readonly name: string }) {
return history.filter((item) => (
item.partnerChartId
? item.partnerChartId === partner.id
: item.partnerName === partner.name
));
}