Skip to main content

Function: saveDashboardWidgets()

saveDashboardWidgets(_prev, formData): Promise<SaveWidgetsState>

Defined in: src/server/actions/dashboard.ts:29

Owner-only: save the per-role dashboard widget overrides (settings dashboard_widgets). Accepts a JSON map of { [roleKey]: { hidden: id[], extra: id[] } }hidden removes in-domain widgets, extra grants widgets beyond the role's domains. Unknown role keys and unknown widget ids are dropped, owner-only widgets are stripped from extra (they can't be granted to staff), and roles with nothing to store are omitted. 'owner' is a valid role key alongside the configured access-roles. Granting widens which SIGNALS a role sees, not access to the underlying pages (those stay domain-gated by requireAccess).

Parameters

_prev

SaveWidgetsState

formData

FormData

Returns

Promise<SaveWidgetsState>