From cf4c1d4b7a7ebbb89e5929f38378bbe8d03f8b85 Mon Sep 17 00:00:00 2001 From: Riku Rouvila Date: Sat, 14 Dec 2024 20:29:27 +0200 Subject: [PATCH] do not show register action after a record already has a register action --- src/form/tennis-club-membership.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/form/tennis-club-membership.ts b/src/form/tennis-club-membership.ts index 75d99f7f6..5bc0ae13c 100644 --- a/src/form/tennis-club-membership.ts +++ b/src/form/tennis-club-membership.ts @@ -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]