IO-1047 IO-1046 IO-1045 Add production alert everywhere
This commit is contained in:
@@ -70,6 +70,25 @@ export function JobsDetailHeaderActions({
|
||||
);
|
||||
}, [job.status, bodyshop.md_ro_statuses.post_production_statuses]);
|
||||
|
||||
const handleAlertToggle = (e) => {
|
||||
logImEXEvent("production_toggle_alert");
|
||||
//e.stopPropagation();
|
||||
updateJob({
|
||||
variables: {
|
||||
jobId: job.id,
|
||||
job: {
|
||||
production_vars: {
|
||||
...job.production_vars,
|
||||
alert:
|
||||
!!job.production_vars && !!job.production_vars.alert
|
||||
? !job.production_vars.alert
|
||||
: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
const statusmenu = (
|
||||
<Menu key="popovermenu">
|
||||
<Menu.Item
|
||||
@@ -176,6 +195,12 @@ export function JobsDetailHeaderActions({
|
||||
{t("jobs.actions.addtoproduction")}
|
||||
</Menu.Item>
|
||||
)}
|
||||
|
||||
<Menu.Item key="toggleAlert" onClick={handleAlertToggle}>
|
||||
{job.production_vars && job.production_vars.alert
|
||||
? t("production.labels.alertoff")
|
||||
: t("production.labels.alerton")}
|
||||
</Menu.Item>
|
||||
<Menu.SubMenu title={t("menus.jobsactions.duplicate")}>
|
||||
<Menu.Item>
|
||||
<Popconfirm
|
||||
|
||||
Reference in New Issue
Block a user