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
|
BabelEdit project file
|
||||||
@@ -23945,6 +23945,48 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</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>
|
<concept_node>
|
||||||
<name>paintpriority-clear</name>
|
<name>paintpriority-clear</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -24228,6 +24270,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</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>
|
<concept_node>
|
||||||
<name>employeesearch</name>
|
<name>employeesearch</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
|
|||||||
@@ -119,3 +119,7 @@
|
|||||||
cursor: col-resize;
|
cursor: col-resize;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.production-list-min-height {
|
||||||
|
min-height: 19px;
|
||||||
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ export default function ProductionListColumnBodyPriority({ record }) {
|
|||||||
|
|
||||||
const handleSetBodyPriority = (e) => {
|
const handleSetBodyPriority = (e) => {
|
||||||
logImEXEvent("production_set_body_priority");
|
logImEXEvent("production_set_body_priority");
|
||||||
e.stopPropagation();
|
// e.stopPropagation();
|
||||||
const { key } = e;
|
const { key } = e;
|
||||||
updateAlert({
|
updateAlert({
|
||||||
variables: {
|
variables: {
|
||||||
@@ -46,7 +46,7 @@ export default function ProductionListColumnBodyPriority({ record }) {
|
|||||||
</Menu.SubMenu>
|
</Menu.SubMenu>
|
||||||
</Menu>
|
</Menu>
|
||||||
}
|
}
|
||||||
trigger={["contextMenu"]}
|
trigger={["click"]}
|
||||||
>
|
>
|
||||||
<div style={{ width: "100%", height: "19px" }}>
|
<div style={{ width: "100%", height: "19px" }}>
|
||||||
{record.production_vars && record.production_vars.bodypriority}
|
{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 ProductionListColumnNote from "./production-list-columns.productionnote.component";
|
||||||
import ProductionListColumnStatus from "./production-list-columns.status.component";
|
import ProductionListColumnStatus from "./production-list-columns.status.component";
|
||||||
import ProductionlistColumnTouchTime from "./prodution-list-columns.touchtime.component";
|
import ProductionlistColumnTouchTime from "./prodution-list-columns.touchtime.component";
|
||||||
|
import ProductionListColumnDetailPriority from "./production-list-columns.detailpriority.component";
|
||||||
const r = [
|
const r = [
|
||||||
{
|
{
|
||||||
title: i18n.t("jobs.actions.viewdetail"),
|
title: i18n.t("jobs.actions.viewdetail"),
|
||||||
@@ -222,6 +222,18 @@ const r = [
|
|||||||
<ProductionListColumnPaintPriority record={record} />
|
<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"),
|
title: i18n.t("production.labels.sublets"),
|
||||||
dataIndex: "sublets",
|
dataIndex: "sublets",
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ export default function ProductionListDate({ record, field }) {
|
|||||||
|
|
||||||
const handleChange = (date) => {
|
const handleChange = (date) => {
|
||||||
logImEXEvent("production_toggle_alert");
|
logImEXEvent("production_toggle_alert");
|
||||||
|
console.log("change");
|
||||||
//e.stopPropagation();
|
//e.stopPropagation();
|
||||||
updateAlert({
|
updateAlert({
|
||||||
variables: {
|
variables: {
|
||||||
@@ -32,17 +33,24 @@ export default function ProductionListDate({ record, field }) {
|
|||||||
<div>
|
<div>
|
||||||
<Dropdown
|
<Dropdown
|
||||||
trigger={["click"]}
|
trigger={["click"]}
|
||||||
|
style={{
|
||||||
|
height: "19px",
|
||||||
|
}}
|
||||||
overlay={
|
overlay={
|
||||||
<div onClick={(e) => e.stopPropagation()}>
|
<div onClick={(e) => e.stopPropagation()}>
|
||||||
<DatePicker
|
<DatePicker
|
||||||
onClick={(e) => e.stopPropagation()}
|
onClick={(e) => e.stopPropagation()}
|
||||||
value={moment(record[field]) || null}
|
value={(record[field] && moment(record[field])) || null}
|
||||||
onChange={handleChange}
|
onChange={handleChange}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<div>
|
<div
|
||||||
|
style={{
|
||||||
|
height: "19px",
|
||||||
|
}}
|
||||||
|
>
|
||||||
<DateFormatter
|
<DateFormatter
|
||||||
bordered={false}
|
bordered={false}
|
||||||
className={
|
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) => {
|
const handleSetPaintPriority = (e) => {
|
||||||
logImEXEvent("production_set_paint_priority");
|
logImEXEvent("production_set_paint_priority");
|
||||||
e.stopPropagation();
|
// e.stopPropagation();
|
||||||
const { key } = e;
|
const { key } = e;
|
||||||
updateAlert({
|
updateAlert({
|
||||||
variables: {
|
variables: {
|
||||||
@@ -33,19 +33,21 @@ export default function ProductionListColumnPaintPriority({ record }) {
|
|||||||
<Dropdown
|
<Dropdown
|
||||||
overlay={
|
overlay={
|
||||||
<Menu onClick={handleSetPaintPriority}>
|
<Menu onClick={handleSetPaintPriority}>
|
||||||
<Menu.Item key='clearPaintPriority'>
|
<Menu.Item key="clearPaintPriority">
|
||||||
{t("production.actions.paintpriority-clear")}
|
{t("production.actions.paintpriority-clear")}
|
||||||
</Menu.Item>
|
</Menu.Item>
|
||||||
<Menu.SubMenu
|
<Menu.SubMenu
|
||||||
key='set'
|
key="set"
|
||||||
title={t("production.actions.paintpriority-set")}>
|
title={t("production.actions.paintpriority-set")}
|
||||||
|
>
|
||||||
{new Array(9).fill().map((value, index) => (
|
{new Array(9).fill().map((value, index) => (
|
||||||
<Menu.Item key={index + 1}>{index + 1}</Menu.Item>
|
<Menu.Item key={index + 1}>{index + 1}</Menu.Item>
|
||||||
))}
|
))}
|
||||||
</Menu.SubMenu>
|
</Menu.SubMenu>
|
||||||
</Menu>
|
</Menu>
|
||||||
}
|
}
|
||||||
trigger={["contextMenu"]}>
|
trigger={["click"]}
|
||||||
|
>
|
||||||
<div style={{ width: "100%", height: "19px" }}>
|
<div style={{ width: "100%", height: "19px" }}>
|
||||||
{record.production_vars && record.production_vars.paintpriority}
|
{record.production_vars && record.production_vars.paintpriority}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1460,6 +1460,8 @@
|
|||||||
"addcolumns": "Add Columns",
|
"addcolumns": "Add Columns",
|
||||||
"bodypriority-clear": "Clear Body Priority",
|
"bodypriority-clear": "Clear Body Priority",
|
||||||
"bodypriority-set": "Set Body Priority",
|
"bodypriority-set": "Set Body Priority",
|
||||||
|
"detailpriority-clear": "Clear Detail Priority",
|
||||||
|
"detailpriority-set": "Set Detail Priority",
|
||||||
"paintpriority-clear": "Clear Paint Priority",
|
"paintpriority-clear": "Clear Paint Priority",
|
||||||
"paintpriority-set": "Set Paint Priority",
|
"paintpriority-set": "Set Paint Priority",
|
||||||
"remove": "Remove from Production",
|
"remove": "Remove from Production",
|
||||||
@@ -1477,6 +1479,7 @@
|
|||||||
"bodyhours": "B",
|
"bodyhours": "B",
|
||||||
"bodypriority": "B/P",
|
"bodypriority": "B/P",
|
||||||
"cycletime": "C/T",
|
"cycletime": "C/T",
|
||||||
|
"detailpriority": "D/P",
|
||||||
"employeesearch": "Employee Search",
|
"employeesearch": "Employee Search",
|
||||||
"jobdetail": "Job Details",
|
"jobdetail": "Job Details",
|
||||||
"note": "Production Note",
|
"note": "Production Note",
|
||||||
|
|||||||
@@ -1460,6 +1460,8 @@
|
|||||||
"addcolumns": "",
|
"addcolumns": "",
|
||||||
"bodypriority-clear": "",
|
"bodypriority-clear": "",
|
||||||
"bodypriority-set": "",
|
"bodypriority-set": "",
|
||||||
|
"detailpriority-clear": "",
|
||||||
|
"detailpriority-set": "",
|
||||||
"paintpriority-clear": "",
|
"paintpriority-clear": "",
|
||||||
"paintpriority-set": "",
|
"paintpriority-set": "",
|
||||||
"remove": "",
|
"remove": "",
|
||||||
@@ -1477,6 +1479,7 @@
|
|||||||
"bodyhours": "",
|
"bodyhours": "",
|
||||||
"bodypriority": "",
|
"bodypriority": "",
|
||||||
"cycletime": "",
|
"cycletime": "",
|
||||||
|
"detailpriority": "",
|
||||||
"employeesearch": "",
|
"employeesearch": "",
|
||||||
"jobdetail": "",
|
"jobdetail": "",
|
||||||
"note": "",
|
"note": "",
|
||||||
|
|||||||
@@ -1460,6 +1460,8 @@
|
|||||||
"addcolumns": "",
|
"addcolumns": "",
|
||||||
"bodypriority-clear": "",
|
"bodypriority-clear": "",
|
||||||
"bodypriority-set": "",
|
"bodypriority-set": "",
|
||||||
|
"detailpriority-clear": "",
|
||||||
|
"detailpriority-set": "",
|
||||||
"paintpriority-clear": "",
|
"paintpriority-clear": "",
|
||||||
"paintpriority-set": "",
|
"paintpriority-set": "",
|
||||||
"remove": "",
|
"remove": "",
|
||||||
@@ -1477,6 +1479,7 @@
|
|||||||
"bodyhours": "",
|
"bodyhours": "",
|
||||||
"bodypriority": "",
|
"bodypriority": "",
|
||||||
"cycletime": "",
|
"cycletime": "",
|
||||||
|
"detailpriority": "",
|
||||||
"employeesearch": "",
|
"employeesearch": "",
|
||||||
"jobdetail": "",
|
"jobdetail": "",
|
||||||
"note": "",
|
"note": "",
|
||||||
|
|||||||
Reference in New Issue
Block a user