Skip to main content

Cards

All cards live in src/lib/ui/cards/. They split into two groups: data display cards and the Monaco-based template editor panels.

Display cards

ComponentFilePurpose
ActivityCaptionActivityCaption.tsxActivity summary card showing name, OU, role icon (Controller / Joint Controller / Processor), active status chip, and key attributes. Navigates to the activity detail page on click. Max height 400 px, scrollable.
ContactCardContactCard.tsxContact detail card for an organisation showing name, role, emails, phones, and notes in a table layout. Supports drag-and-drop reordering, inline edit, staged deletion with watermark, and status indicators for new or modified contacts.
ContractCardContractCard.tsxContract card displaying name (optionally linked), description, expiration date via DateChip, and partner chips. Supports drag-and-drop, inline edit, staged deletion, and a confirmation dialog when multiple partners are affected.
ContractCaptionContractCaption.tsxRead-only contract summary showing partner avatars, description, expiration date, and activity chips grouped under a divider. Clicking triggers the edit callback.
PartnerCaptionPartnerCaption.tsxOrganisation summary card with avatar, name, website, address, primary contact, and activity chips by role (controller / joint controller / processor). Optional clickable variant links to the organisation detail page. Accepts usageData to populate the role chips.
OrgSettingsCaptionOrgSettingsCaption.tsxReusable settings tile used inside OrganizationSettingsGrid. Renders a title, description, icon avatar, and an action button that can be a standard button, a hold-to-confirm button, or a navigation link. Optionally includes a radio group before the button.
TemplateCardTemplateCard.tsxTemplate picker card showing title, type label, and a type-specific icon (Activity Declaration, Processing Activity, ROPA Front Page, ROPA TOC). Clickable variant triggers a selection callback; non-clickable variant is used for display only.

Template editor panels

These three components compose the template editor UI and are always used together.

ComponentFilePurpose
MonacoHandlebarsEditorMonacoHandlebarsEditor.tsxMonaco editor configured for Handlebars syntax with dark theme, word wrap, and automatic layout. Exposes onEditorMount to give the parent direct access to the editor and monaco instances.
MonacoHandlebarsJsonCodeMonacoHandlebarsJsonCode.tsxCollapsible panel showing the current activity's data as formatted JSON — the Handlebars template context. Collapsed by default; max height 400 px when expanded.
MonacoHandlebarsPreviewMonacoHandlebarsPreview.tsxSandboxed <iframe> that renders the compiled Handlebars HTML preview. Displays a formatted error alert if compilation fails.