M11

Legal Policy Management

Versioned agreements with per-user acceptance and audit trails.

Agreement authoring and version lifecycle management combined with user-side pending-agreement retrieval and acceptance recording for compliance-ready governance.

AgreementsAcceptanceModal.jsxtsx
import { useState } from 'react';
import { Modal, Checkbox, CheckboxGroup, Button } from '@cleen/cleen-components';
import { useAgreement, useAcceptAgreement } from '@/hooks/useAgreements';

export function AgreementsAcceptanceModal({ code, onAccepted }) {
  const { agreement, loading } = useAgreement(code);
  const accept = useAcceptAgreement();
  const [accepted, setAccepted] = useState([]);

  if (!agreement) return null;

  return (
    <Modal isOpen size="lg" title={agreement.title}>
      <div className="agreement-body" dangerouslySetInnerHTML={{ __html: agreement.html }} />
      <CheckboxGroup
        value={accepted}
        onChange={setAccepted}
        options={agreement.consents.map((c) => ({ value: c.id, label: c.label }))}
      />
      <Button
        variant="primary"
        disabled={accepted.length < agreement.consents.length}
        loading={loading}
        onClick={() => accept(agreement.versionId).then(onAccepted)}
      >Accept and continue</Button>
    </Modal>
  );
}

Capabilities

  • Agreement filter/list/detail/save/by-code
  • Agreement version history and restore
  • Public agreement list and lookup
  • User pending agreement retrieval
  • User agreement acceptance recording

Benefits

  • Compliance-ready acceptance trail
  • Safe policy evolution with rollback
  • Lower legal operations overhead

Flow of work

  1. 01Draft legal agreement
  2. 02Publish new version
  3. 03Surface pending agreement to user
  4. 04Capture user acceptance
  5. 05Retain history and restore when required

Subfeatures

  • Agreement save
  • Agreement filter/list/detail
  • Agreement by code
  • Agreement versions filter
  • Agreement version restore
  • User latest agreement
  • User agreement accept
  • Public agreement list/by-code
Source surfaces (technical reference)

Internal code areas in the licensed Full-Stack codebase that back this module.

  • ApiAdmin agreement endpoints
  • ApiUser agreement accept/latest endpoints
  • ApiPublic agreement endpoints
In the stack

Where it lives. What it exposes.

A quick visual of how Legal Policy Management participates across the CleenUI stack, alongside the named operations it adds to the API surface.

M11 · architecture
Frontend
React · TailwindCSS · 60+ components
Agreement editorVersion historyAcceptance flowPublic viewer
API
C# Web API · production-ready · role-aware
Agreement CRUDVersion historyPublic lookupUser acceptance
Database
AzureSQL · 300+ tables · 700+ procedures
AgreementsAgreementVersionsUserAcceptances
Async Services and Batch Jobs
WebJobs & Functions · queue-backed
Agreement notifierVersion archiver
All four layers ship together as the Full-Stack license. M11 blocks are highlighted.
API operations

Named operations on this surface

8
Try these in Postman
  • POSTAgreement save/admin/agreement/save
  • POSTAgreement filter/list/detail/admin/agreement/filter-list-detail
  • POSTAgreement by code/admin/agreement/by-code
  • POSTAgreement versions filter/admin/agreement/versions-filter
  • POSTAgreement version restore/admin/agreement/version-restore
  • POSTUser latest agreement/admin/agreement/user-latest-agreement
  • POSTUser agreement accept/admin/agreement/user-agreement-accept
  • POSTPublic agreement list/by-code/admin/agreement/public-agreement-list-by-code

Each operation maps to an endpoint in the licensed C# Web API surface.