Production list add d/p and fix display issues IO-473
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<babeledit_project be_version="2.7.1" version="1.2">
|
||||
<babeledit_project version="1.2" be_version="2.7.1">
|
||||
<!--
|
||||
|
||||
BabelEdit project file
|
||||
@@ -23945,6 +23945,48 @@
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>detailpriority-clear</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
<description></description>
|
||||
<comment></comment>
|
||||
<default_text></default_text>
|
||||
<translations>
|
||||
<translation>
|
||||
<language>en-US</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>es-MX</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>fr-CA</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>detailpriority-set</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
<description></description>
|
||||
<comment></comment>
|
||||
<default_text></default_text>
|
||||
<translations>
|
||||
<translation>
|
||||
<language>en-US</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>es-MX</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>fr-CA</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>paintpriority-clear</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
@@ -24228,6 +24270,27 @@
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>detailpriority</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
<description></description>
|
||||
<comment></comment>
|
||||
<default_text></default_text>
|
||||
<translations>
|
||||
<translation>
|
||||
<language>en-US</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>es-MX</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>fr-CA</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>employeesearch</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
|
||||
@@ -119,3 +119,7 @@
|
||||
cursor: col-resize;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.production-list-min-height {
|
||||
min-height: 19px;
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ export default function ProductionListColumnBodyPriority({ record }) {
|
||||
|
||||
const handleSetBodyPriority = (e) => {
|
||||
logImEXEvent("production_set_body_priority");
|
||||
e.stopPropagation();
|
||||
// e.stopPropagation();
|
||||
const { key } = e;
|
||||
updateAlert({
|
||||
variables: {
|
||||
@@ -46,7 +46,7 @@ export default function ProductionListColumnBodyPriority({ record }) {
|
||||
</Menu.SubMenu>
|
||||
</Menu>
|
||||
}
|
||||
trigger={["contextMenu"]}
|
||||
trigger={["click"]}
|
||||
>
|
||||
<div style={{ width: "100%", height: "19px" }}>
|
||||
{record.production_vars && record.production_vars.bodypriority}
|
||||
|
||||
@@ -13,7 +13,7 @@ import ProductionListColumnPaintPriority from "./production-list-columns.paintpr
|
||||
import ProductionListColumnNote from "./production-list-columns.productionnote.component";
|
||||
import ProductionListColumnStatus from "./production-list-columns.status.component";
|
||||
import ProductionlistColumnTouchTime from "./prodution-list-columns.touchtime.component";
|
||||
|
||||
import ProductionListColumnDetailPriority from "./production-list-columns.detailpriority.component";
|
||||
const r = [
|
||||
{
|
||||
title: i18n.t("jobs.actions.viewdetail"),
|
||||
@@ -222,6 +222,18 @@ const r = [
|
||||
<ProductionListColumnPaintPriority record={record} />
|
||||
),
|
||||
},
|
||||
{
|
||||
title: i18n.t("production.labels.detailpriority"),
|
||||
dataIndex: "detailpriority",
|
||||
key: "detailpriority",
|
||||
|
||||
sorter: (a, b) =>
|
||||
((a.production_vars && a.production_vars.detailpriority) || 11) -
|
||||
((b.production_vars && b.production_vars.detailpriority) || 11),
|
||||
render: (text, record) => (
|
||||
<ProductionListColumnDetailPriority record={record} />
|
||||
),
|
||||
},
|
||||
{
|
||||
title: i18n.t("production.labels.sublets"),
|
||||
dataIndex: "sublets",
|
||||
|
||||
@@ -14,6 +14,7 @@ export default function ProductionListDate({ record, field }) {
|
||||
|
||||
const handleChange = (date) => {
|
||||
logImEXEvent("production_toggle_alert");
|
||||
console.log("change");
|
||||
//e.stopPropagation();
|
||||
updateAlert({
|
||||
variables: {
|
||||
@@ -32,17 +33,24 @@ export default function ProductionListDate({ record, field }) {
|
||||
<div>
|
||||
<Dropdown
|
||||
trigger={["click"]}
|
||||
style={{
|
||||
height: "19px",
|
||||
}}
|
||||
overlay={
|
||||
<div onClick={(e) => e.stopPropagation()}>
|
||||
<DatePicker
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
value={moment(record[field]) || null}
|
||||
value={(record[field] && moment(record[field])) || null}
|
||||
onChange={handleChange}
|
||||
/>
|
||||
</div>
|
||||
}
|
||||
>
|
||||
<div>
|
||||
<div
|
||||
style={{
|
||||
height: "19px",
|
||||
}}
|
||||
>
|
||||
<DateFormatter
|
||||
bordered={false}
|
||||
className={
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
import { useMutation } from "@apollo/react-hooks";
|
||||
import { Dropdown, Menu } from "antd";
|
||||
import React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { UPDATE_JOB } from "../../graphql/jobs.queries";
|
||||
import { logImEXEvent } from "../../firebase/firebase.utils";
|
||||
|
||||
export default function ProductionListColumnDetailPriority({ record }) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
const [updateAlert] = useMutation(UPDATE_JOB);
|
||||
|
||||
const handleSetDetailPriority = (e) => {
|
||||
logImEXEvent("production_set_detail_priority");
|
||||
// e.stopPropagation();
|
||||
const { key } = e;
|
||||
updateAlert({
|
||||
variables: {
|
||||
jobId: record.id,
|
||||
job: {
|
||||
production_vars: {
|
||||
...record.production_vars,
|
||||
detailpriority: key === "clearDetailPriority" ? null : key,
|
||||
},
|
||||
},
|
||||
},
|
||||
}).then(() => {
|
||||
if (record.refetch) record.refetch();
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<Dropdown
|
||||
overlay={
|
||||
<Menu onClick={handleSetDetailPriority}>
|
||||
<Menu.Item key="clearDetailPriority">
|
||||
{t("production.actions.detailpriority-clear")}
|
||||
</Menu.Item>
|
||||
<Menu.SubMenu
|
||||
key="set"
|
||||
title={t("production.actions.detailpriority-set")}
|
||||
>
|
||||
{new Array(9).fill().map((value, index) => (
|
||||
<Menu.Item key={index + 1}>{index + 1}</Menu.Item>
|
||||
))}
|
||||
</Menu.SubMenu>
|
||||
</Menu>
|
||||
}
|
||||
trigger={["click"]}
|
||||
>
|
||||
<div style={{ width: "100%", height: "19px" }}>
|
||||
{record.production_vars && record.production_vars.detailpriority}
|
||||
</div>
|
||||
</Dropdown>
|
||||
);
|
||||
}
|
||||
@@ -12,7 +12,7 @@ export default function ProductionListColumnPaintPriority({ record }) {
|
||||
|
||||
const handleSetPaintPriority = (e) => {
|
||||
logImEXEvent("production_set_paint_priority");
|
||||
e.stopPropagation();
|
||||
// e.stopPropagation();
|
||||
const { key } = e;
|
||||
updateAlert({
|
||||
variables: {
|
||||
@@ -33,19 +33,21 @@ export default function ProductionListColumnPaintPriority({ record }) {
|
||||
<Dropdown
|
||||
overlay={
|
||||
<Menu onClick={handleSetPaintPriority}>
|
||||
<Menu.Item key='clearPaintPriority'>
|
||||
<Menu.Item key="clearPaintPriority">
|
||||
{t("production.actions.paintpriority-clear")}
|
||||
</Menu.Item>
|
||||
<Menu.SubMenu
|
||||
key='set'
|
||||
title={t("production.actions.paintpriority-set")}>
|
||||
key="set"
|
||||
title={t("production.actions.paintpriority-set")}
|
||||
>
|
||||
{new Array(9).fill().map((value, index) => (
|
||||
<Menu.Item key={index + 1}>{index + 1}</Menu.Item>
|
||||
))}
|
||||
</Menu.SubMenu>
|
||||
</Menu>
|
||||
}
|
||||
trigger={["contextMenu"]}>
|
||||
trigger={["click"]}
|
||||
>
|
||||
<div style={{ width: "100%", height: "19px" }}>
|
||||
{record.production_vars && record.production_vars.paintpriority}
|
||||
</div>
|
||||
|
||||
@@ -1460,6 +1460,8 @@
|
||||
"addcolumns": "Add Columns",
|
||||
"bodypriority-clear": "Clear Body Priority",
|
||||
"bodypriority-set": "Set Body Priority",
|
||||
"detailpriority-clear": "Clear Detail Priority",
|
||||
"detailpriority-set": "Set Detail Priority",
|
||||
"paintpriority-clear": "Clear Paint Priority",
|
||||
"paintpriority-set": "Set Paint Priority",
|
||||
"remove": "Remove from Production",
|
||||
@@ -1477,6 +1479,7 @@
|
||||
"bodyhours": "B",
|
||||
"bodypriority": "B/P",
|
||||
"cycletime": "C/T",
|
||||
"detailpriority": "D/P",
|
||||
"employeesearch": "Employee Search",
|
||||
"jobdetail": "Job Details",
|
||||
"note": "Production Note",
|
||||
|
||||
@@ -1460,6 +1460,8 @@
|
||||
"addcolumns": "",
|
||||
"bodypriority-clear": "",
|
||||
"bodypriority-set": "",
|
||||
"detailpriority-clear": "",
|
||||
"detailpriority-set": "",
|
||||
"paintpriority-clear": "",
|
||||
"paintpriority-set": "",
|
||||
"remove": "",
|
||||
@@ -1477,6 +1479,7 @@
|
||||
"bodyhours": "",
|
||||
"bodypriority": "",
|
||||
"cycletime": "",
|
||||
"detailpriority": "",
|
||||
"employeesearch": "",
|
||||
"jobdetail": "",
|
||||
"note": "",
|
||||
|
||||
@@ -1460,6 +1460,8 @@
|
||||
"addcolumns": "",
|
||||
"bodypriority-clear": "",
|
||||
"bodypriority-set": "",
|
||||
"detailpriority-clear": "",
|
||||
"detailpriority-set": "",
|
||||
"paintpriority-clear": "",
|
||||
"paintpriority-set": "",
|
||||
"remove": "",
|
||||
@@ -1477,6 +1479,7 @@
|
||||
"bodyhours": "",
|
||||
"bodypriority": "",
|
||||
"cycletime": "",
|
||||
"detailpriority": "",
|
||||
"employeesearch": "",
|
||||
"jobdetail": "",
|
||||
"note": "",
|
||||
|
||||
Reference in New Issue
Block a user