diff --git a/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.component.jsx b/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.component.jsx index fd2b2ab25..16bcc94ff 100644 --- a/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.component.jsx +++ b/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.component.jsx @@ -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 = ( )} + + + {job.production_vars && job.production_vars.alert + ? t("production.labels.alertoff") + : t("production.labels.alerton")} +
- {job.status} - {job.inproduction && ( - + + {job.status} + {job.inproduction && ( {t("jobs.labels.inproduction")} - - )} + )} + {job.production_vars && job.production_vars.alert ? ( + + ) : null} + {job.ins_co_nm} diff --git a/client/src/components/jobs-list/jobs-list.component.jsx b/client/src/components/jobs-list/jobs-list.component.jsx index dc8c81a3a..04fb749f2 100644 --- a/client/src/components/jobs-list/jobs-list.component.jsx +++ b/client/src/components/jobs-list/jobs-list.component.jsx @@ -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")} + + {record.ro_number || t("general.labels.na")} + {record.production_vars && record.production_vars.alert ? ( + + ) : null} + ), }, diff --git a/client/src/components/time-ticket-modal/time-ticket-modal.container.jsx b/client/src/components/time-ticket-modal/time-ticket-modal.container.jsx index 3942247c4..21e0d08eb 100644 --- a/client/src/components/time-ticket-modal/time-ticket-modal.container.jsx +++ b/client/src/components/time-ticket-modal/time-ticket-modal.container.jsx @@ -164,6 +164,7 @@ export function TimeTicketModalContainer({ width={"90%"} visible={timeTicketModal.visible} forceRender + onCancel={handleCancel} afterClose={() => form.resetFields()} footer={ diff --git a/client/src/graphql/jobs.queries.js b/client/src/graphql/jobs.queries.js index ac8bc0d57..a3349f978 100644 --- a/client/src/graphql/jobs.queries.js +++ b/client/src/graphql/jobs.queries.js @@ -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