Skip to content

Commit

Permalink
JNG-5433 fix missing confirmations (#310)
Browse files Browse the repository at this point in the history
  • Loading branch information
noherczeg authored Jan 29, 2024
1 parent 2a4aa9f commit bb9cf73
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@
loadingPosition="start"
{{/ if }}
onClick={ async () => {
{{# if child.confirmation }}
const result = await openConfirmDialog(
'{{ getXMIID child }}',
t('{{ getTranslationKeyForVisualElement child }}.confirmation', { defaultValue: '{{ child.confirmation.confirmationMessage }}' }) as string,
t('judo.modal.confirm.confirm-title', { defaultValue: 'Confirm action' }) as string,
);

if (!result) {
return;
}
{{/ if }}
if (actions.{{ simpleActionDefinitionName child.actionDefinition }}) {
await actions.{{ simpleActionDefinitionName child.actionDefinition }}!();
}
Expand Down

0 comments on commit bb9cf73

Please sign in to comment.