Skip to content

Commit

Permalink
do not show register action after a record already has a register action
Browse files Browse the repository at this point in the history
  • Loading branch information
rikukissa committed Dec 16, 2024
1 parent a4396eb commit 0e1995e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/form/tennis-club-membership.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,12 @@ export const tennisClubMembershipEvent = defineConfig({
id: 'event.tennis-club-membership.action.register.label'
},
allowedWhen: defineConditional(
or(
eventHasAction('VALIDATE'),
and(eventHasAction('DECLARE'), userHasScope('register'))
and(
or(
eventHasAction('VALIDATE'),
and(eventHasAction('DECLARE'), userHasScope('register'))
),
not(eventHasAction('REGISTER'))
)
),
forms: [TENNIS_CLUB_FORM]
Expand Down

0 comments on commit 0e1995e

Please sign in to comment.