added notification message

main
alex 2023-05-12 18:55:12 +02:00
parent 0fe948d9aa
commit c9144d519b
1 changed files with 13 additions and 3 deletions

View File

@ -115,7 +115,7 @@ export default function GroupTasksViewModal({ isOpen }) {
); );
}; };
const alertActionHandler = (status, taskStepId, index) => { const alertActionHandler = (status, taskStepId, index, notificationApi) => {
switch (status) { switch (status) {
case Constants.GROUP_TASKS_STATUS.FAILED: case Constants.GROUP_TASKS_STATUS.FAILED:
return ( return (
@ -130,7 +130,16 @@ export default function GroupTasksViewModal({ isOpen }) {
</Button> </Button>
); );
case Constants.GROUP_TASKS_STATUS.INPUT_REQUIRED: case Constants.GROUP_TASKS_STATUS.INPUT_REQUIRED:
return <Button size="small">Continue</Button>; return (
<Button
size="small"
onClick={() => {
console.log("clicked continue");
}}
>
Continue
</Button>
);
default: default:
notificationApi["error"]({ notificationApi["error"]({
message: `Alert action ${status} not implemented`, message: `Alert action ${status} not implemented`,
@ -210,7 +219,8 @@ export default function GroupTasksViewModal({ isOpen }) {
action={alertActionHandler( action={alertActionHandler(
groupTaskSteps[index].Status, groupTaskSteps[index].Status,
groupTaskSteps[index].Id, groupTaskSteps[index].Id,
index index,
notificationApi
)} )}
/> />
</> </>