|
|
@@ -20,8 +20,12 @@ use Slim\Views\Twig;
|
|
|
* pairs; we resolve those into the api's `thresholds: {slug: number}`
|
|
|
* shape. Empty values mean "remove from policy".
|
|
|
*
|
|
|
- * Live preview is driven by an htmx fetch from the edit page directly
|
|
|
- * to `/api/v1/admin/policies/{id}/preview` via the same session token.
|
|
|
+ * Live preview is driven by an Alpine component on the edit page
|
|
|
+ * that fetches `/app/policies/{id}/preview-proxy`, which forwards
|
|
|
+ * to the api with the user's session impersonation. The component
|
|
|
+ * runs on `x-init` so the preview auto-refreshes after a save
|
|
|
+ * (post-save redirect reloads the page); a Refresh button stays
|
|
|
+ * available for ad-hoc refetches.
|
|
|
*
|
|
|
* RBAC: list/show/preview ⇒ Viewer; write ⇒ Admin.
|
|
|
*/
|