getCurrentUser is wrapped in React cache so pages that call it from
several components validate the session once per request. Cross-request
caching ("use cache", unstable_cache, module-level storage) stays
forbidden for cleo data and sessions: the PHP app writes to the same DB,
and a cached session would keep a logged-out user signed in.
CLAUDE.md and the cleo-code-review skill now state both rules.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Deleting a group or sub group still used by barang (or a group still
used by sub groups) is refused, because PHP queries inner join on these
codes and would silently hide the orphaned barang. Editing a sub group
only changes its name, matching ajaxdlmpdk.php; changing the code pair
would orphan barang the same way.
Group codes are generated automatically, unlike the old PHP form where
they were typed manually.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CRUD page for satuan barang following the pelanggan feature pattern:
page, actions, form sheet, delete dialog, and a data layer with LIKE
search and pagination. Delete rejects units still referenced by barang.
Pull PER_PAGE, parsePage, and halamanHref into lib/pagination, the search
box into components/cari-master, and escapeLike into lib/utils so other
master features can reuse them. Pelanggan switches to these helpers and
its list now calls getCurrentUser() in its render chain.