feat(forms): per-member 'Forms submitted' view on the members page

listMemberSubmissions (forms.manage, RLS-honoring, metadata only) + a
FORMS column/button -> MemberFormsDialog listing the member's
submissions (title, kind, version, date) with a link to the audited
forms results surface. Gated by forms.manage (matches existing
submission-read RLS; no new exposure).
This commit is contained in:
Moheeb Zara
2026-05-16 23:50:52 -07:00
parent 832a0aeba2
commit ed8d629472
5 changed files with 162 additions and 2 deletions
+6
View File
@@ -100,6 +100,11 @@ export default async function MembersPage() {
sid: self.space_id,
perm: 'door.manage',
})
const { data: canViewForms } = await supabase.rpc('user_has_permission', {
uid: user.id,
sid: self.space_id,
perm: 'forms.manage',
})
return (
<MembersClient
@@ -107,6 +112,7 @@ export default async function MembersPage() {
currentRole={self.role}
canGrantCerts={!!canGrantCerts}
canManageCards={!!canManageCards}
canViewForms={!!canViewForms}
areaLeadRoles={(areaLeadRoles ?? []) as Array<{ id: string; area_name: string; lead_id: string | null }>}
inviteSlot={
canInvite ? (