1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# 03: Organisation-bound PIM imprints, image attributes, mandatory title
**What to build:** A `pim_admin` maintains organisations in the PIM editor,
each with text attributes (`gstin`, `bank_account`, …) and image attributes
(`seal`, `logo`, … — a picture on the DAM). A drafter picks the organisation a
document is about, places imprints that reference a bare key, and the proof
shows that organisation's values and seal. The same template serves every
organisation. A document cannot be submitted without a title or an
organisation, or when the organisation lacks a key the layout uses.
See `docs/REBUILD.md` §2 (`org_code`, `attr_type`, Redis hashes), §4 (imprint
types), §5 (`/save`, `/submit`, `/pim`), §6 (`stamp` resolution), §7, §8.
**Blocked by:** 02 (rename and render gate).
**Status:** ready-for-agent
- [ ] PIM editor: organisation list with "new", per-attribute type toggle, image picker fed by the DAM listing; writes need `pim_admin`, reads are open (D24)
- [ ] `GET /api/pim` returns organisations and, per organisation, text and image attributes; the Redis mirror carries both plus the organisation set
- [ ] Side panel: title input (submit disabled while empty), organisation selector; `pim_text`/`pim_image` props offer that organisation's keys; edit mode shows the resolved value, or the key in brackets when no organisation is chosen
- [ ] `dam_image` and `poly` are rejected by save; `pim_image` supports `rect` and `circle`
- [ ] Submit fails with a clear message for: empty title, no organisation, a text key or image key the organisation lacks, an image whose DAM file is missing
- [ ] Worker resolves text and image keys against the document's organisation; proof text contains the organisation's GSTIN and the seal image
- [ ] e2e covers two organisations (one lacking a key), all rejection cases, and a successful proof; ends with "all passed"