diff --git a/admin/src/components/Action/Action.js b/admin/src/components/Action/Action.js index 612e6bf..8d3a02b 100644 --- a/admin/src/components/Action/Action.js +++ b/admin/src/components/Action/Action.js @@ -87,12 +87,16 @@ const Action = ({ mode, entityId, entitySlug }) => { } if (!actionId) { - await createAction({ + const { data: response } = await createAction({ mode, entityId, entitySlug, executeAt, }); + + if (response.data && response.data.id) { + setActionId(response.data.id); + } } else { await updateAction({ id: actionId, body: { executeAt } }); }