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