only free up job if robot is working

main
alex 2023-11-02 17:15:34 +01:00
parent a3cb04efe7
commit 3d90bb1a85
3 changed files with 20 additions and 1 deletions

View File

@ -214,6 +214,10 @@
"popconfirm": {
"title": "Sind Sie sicher, dass Sie den Job von dem Roboter entfernen wollen?",
"description": "Der Roboter wird danach wieder für Aufträge zur Verfügung stehen"
},
"popconfirmErrorNotification": {
"message": "Job konnte nicht entfernt werden",
"description": "Der Roboter ist am arbeiten"
}
}
},

View File

@ -214,6 +214,10 @@
"popconfirm": {
"title": "Are you sure you want to free up the job of the robot?",
"description": "The job of the robot will be removed"
},
"popconfirmErrorNotification": {
"message": "Job could not be freed up",
"description": "The robot is not processing a job"
}
}
},

View File

@ -250,7 +250,18 @@ export default function Robots() {
{},
myFetchContentType.JSON,
Constants.ROBOTICS_API_ADDRESS
)
).catch((err) => {
if (err === 422) {
notificationApi["error"]({
message: t(
"robotics.robots.freeUpJob.popconfirmErrorNotification.message"
),
description: t(
"robotics.robots.freeUpJob.popconfirmErrorNotification.description"
),
});
}
})
}
icon={<ExclamationCircleOutlined style={{ color: "red" }} />}
>