only free up job if robot is working
parent
a3cb04efe7
commit
3d90bb1a85
|
@ -214,6 +214,10 @@
|
||||||
"popconfirm": {
|
"popconfirm": {
|
||||||
"title": "Sind Sie sicher, dass Sie den Job von dem Roboter entfernen wollen?",
|
"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"
|
"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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -214,6 +214,10 @@
|
||||||
"popconfirm": {
|
"popconfirm": {
|
||||||
"title": "Are you sure you want to free up the job of the robot?",
|
"title": "Are you sure you want to free up the job of the robot?",
|
||||||
"description": "The job of the robot will be removed"
|
"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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -250,7 +250,18 @@ export default function Robots() {
|
||||||
{},
|
{},
|
||||||
myFetchContentType.JSON,
|
myFetchContentType.JSON,
|
||||||
Constants.ROBOTICS_API_ADDRESS
|
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" }} />}
|
icon={<ExclamationCircleOutlined style={{ color: "red" }} />}
|
||||||
>
|
>
|
||||||
|
|
Loading…
Reference in New Issue