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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Card, Col, Row, Space, Tag } from "antd";
|
||||
import { WarningFilled } from "@ant-design/icons";
|
||||
import { WarningFilled, ExclamationCircleFilled } from "@ant-design/icons";
|
||||
import React, { useMemo } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
@@ -59,14 +59,17 @@ export function JobsDetailHeader({ job, bodyshop, disabled }) {
|
||||
<Card title={"Job Status"} style={{ height: "100%" }}>
|
||||
<div>
|
||||
<DataLabel label={t("jobs.fields.status")}>
|
||||
{job.status}
|
||||
{job.inproduction && (
|
||||
<span style={{ marginLeft: ".5rem" }}>
|
||||
<Space wrap>
|
||||
{job.status}
|
||||
{job.inproduction && (
|
||||
<Tag color="#f50" key="production">
|
||||
{t("jobs.labels.inproduction")}
|
||||
</Tag>
|
||||
</span>
|
||||
)}
|
||||
)}
|
||||
{job.production_vars && job.production_vars.alert ? (
|
||||
<ExclamationCircleFilled className="production-alert" />
|
||||
) : null}
|
||||
</Space>
|
||||
</DataLabel>
|
||||
<DataLabel label={t("jobs.fields.ins_co_nm_short")}>
|
||||
{job.ins_co_nm}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { SyncOutlined } from "@ant-design/icons";
|
||||
import { SyncOutlined, ExclamationCircleFilled } from "@ant-design/icons";
|
||||
import { useQuery } from "@apollo/client";
|
||||
import { Button, Card, Input, Space, Table } from "antd";
|
||||
import queryString from "query-string";
|
||||
@@ -102,7 +102,12 @@ export function JobsList({ bodyshop }) {
|
||||
to={"/manage/jobs/" + record.id}
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
>
|
||||
{record.ro_number || t("general.labels.na")}
|
||||
<Space>
|
||||
{record.ro_number || t("general.labels.na")}
|
||||
{record.production_vars && record.production_vars.alert ? (
|
||||
<ExclamationCircleFilled className="production-alert" />
|
||||
) : null}
|
||||
</Space>
|
||||
</Link>
|
||||
),
|
||||
},
|
||||
|
||||
@@ -164,6 +164,7 @@ export function TimeTicketModalContainer({
|
||||
width={"90%"}
|
||||
visible={timeTicketModal.visible}
|
||||
forceRender
|
||||
onCancel={handleCancel}
|
||||
afterClose={() => form.resetFields()}
|
||||
footer={
|
||||
<span>
|
||||
|
||||
@@ -8,6 +8,7 @@ export const QUERY_ALL_ACTIVE_JOBS = gql`
|
||||
) {
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
ownr_co_nm
|
||||
ownr_ph1
|
||||
ownr_ea
|
||||
owner {
|
||||
@@ -26,18 +27,9 @@ export const QUERY_ALL_ACTIVE_JOBS = gql`
|
||||
actual_completion
|
||||
actual_delivery
|
||||
actual_in
|
||||
|
||||
production_vars
|
||||
id
|
||||
ins_co_nm
|
||||
ins_ct_fn
|
||||
ins_ct_ln
|
||||
ins_ph1
|
||||
ins_ea
|
||||
est_co_nm
|
||||
est_ph1
|
||||
est_ea
|
||||
est_ct_fn
|
||||
est_ct_ln
|
||||
clm_no
|
||||
clm_total
|
||||
owner_owing
|
||||
@@ -286,6 +278,7 @@ export const QUERY_JOB_COSTING_DETAILS = gql`
|
||||
status
|
||||
ca_bc_pvrt
|
||||
ca_customer_gst
|
||||
|
||||
joblines(where: { removed: { _eq: false } }) {
|
||||
id
|
||||
unq_seq
|
||||
@@ -666,9 +659,13 @@ export const QUERY_JOB_CARD_DETAILS = gql`
|
||||
employee_body
|
||||
employee_refinish
|
||||
alt_transport
|
||||
inproduction
|
||||
production_vars
|
||||
ownr_ln
|
||||
ownr_ph1
|
||||
ownr_ea
|
||||
ca_gst_registrant
|
||||
special_coverage_policy
|
||||
joblines_status {
|
||||
part_type
|
||||
count
|
||||
|
||||
Reference in New Issue
Block a user