File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed
packages/client/src/v2-events/features/events/actions/quick-actions Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ import {
2626 EventIndex ,
2727 FieldConfig ,
2828 FieldUpdateValue ,
29+ getActionConfig ,
2930 runFieldValidations
3031} from '@opencrvs/commons/client'
3132import { buttonMessages } from '@client/i18n/messages'
@@ -169,13 +170,6 @@ function QuickActionModal({
169170 )
170171}
171172
172- function getActionConfig (
173- actionType : keyof typeof quickActions ,
174- eventConfiguration : EventConfig
175- ) {
176- return eventConfiguration . actions . find ( ( a ) => a . type === actionType )
177- }
178-
179173export function useQuickActionModal ( event : EventIndex ) {
180174 const [ quickActionModal , openModal ] = useModal ( )
181175 const navigate = useNavigate ( )
@@ -189,7 +183,7 @@ export function useQuickActionModal(event: EventIndex) {
189183 ) => {
190184 const config = quickActions [ actionType ]
191185 const label = actionLabels [ actionType ]
192- const actionConfig = getActionConfig ( actionType , eventConfiguration )
186+ const actionConfig = getActionConfig ( { actionType, eventConfiguration } )
193187 const { result } = await openModal < ModalResult > ( ( close ) => (
194188 < QuickActionModal
195189 close = { close }
You can’t perform that action at this time.
0 commit comments