improvement: some files replaced, lots of them i shall say. AGENT.MD file created. some rules and skills added for cursor agent.

This commit is contained in:
2026-07-12 21:08:29 +03:30
parent 1cdf853d32
commit 0d3fb0a51d
86 changed files with 4758 additions and 4260 deletions

View File

@@ -0,0 +1,39 @@
import type { CSSProperties } from 'react';
import type { TreatmentCatalogEntry } from '@/types/treatment-catalog';
import {
treatmentTypeBannerStyle,
treatmentTypeLabelFromCatalog,
treatmentTypeSwatchStyle,
} from '@/components/shared/treatmentTypeDisplay';
/**
* Appointment purposes are treatment-type codes. Labels and colors now come from
* the shared treatment catalog + palette so the appointment and treatment
* features stay in sync. These helpers adapt the shared palette to the appointment
* components' call sites.
*/
export function purposeLabel(
purpose: string,
catalog: TreatmentCatalogEntry[],
): string {
return treatmentTypeLabelFromCatalog(purpose, catalog);
}
/** Inline style for a colored appointment banner/block. */
export function purposeBannerStyle(
purpose: string,
catalog: TreatmentCatalogEntry[],
): CSSProperties {
const index = catalog.findIndex((e) => e.code === purpose);
return treatmentTypeBannerStyle(purpose, index);
}
/** Inline style for a small legend swatch. */
export function purposeSwatchStyle(
purpose: string,
catalog: TreatmentCatalogEntry[],
): CSSProperties {
const index = catalog.findIndex((e) => e.code === purpose);
return treatmentTypeSwatchStyle(purpose, index);
}