Implemented BOD-22 removing from production board. No automation surrounding it at this time.
This commit is contained in:
@@ -11221,6 +11221,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>remove</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>removecolumn</name>
|
<name>removecolumn</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -11265,6 +11286,32 @@
|
|||||||
</concept_node>
|
</concept_node>
|
||||||
</children>
|
</children>
|
||||||
</folder_node>
|
</folder_node>
|
||||||
|
<folder_node>
|
||||||
|
<name>errors</name>
|
||||||
|
<children>
|
||||||
|
<concept_node>
|
||||||
|
<name>removing</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>
|
||||||
|
</children>
|
||||||
|
</folder_node>
|
||||||
<folder_node>
|
<folder_node>
|
||||||
<name>labels</name>
|
<name>labels</name>
|
||||||
<children>
|
<children>
|
||||||
|
|||||||
@@ -1,16 +1,7 @@
|
|||||||
import React, { useState } from "react";
|
|
||||||
import { connect } from "react-redux";
|
|
||||||
import { createStructuredSelector } from "reselect";
|
|
||||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
|
||||||
import { Pie } from "@nivo/pie";
|
import { Pie } from "@nivo/pie";
|
||||||
import { useTranslation } from "react-i18next";
|
import React from "react";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
export default function PartsStatusPie({ partsList }) {
|
||||||
bodyshop: selectBodyshop,
|
|
||||||
});
|
|
||||||
|
|
||||||
export function PartsStatusPie({ partsList }) {
|
|
||||||
const { t } = useTranslation();
|
|
||||||
//const [pieData, setPieData] = useState([]);
|
//const [pieData, setPieData] = useState([]);
|
||||||
|
|
||||||
const result = partsList
|
const result = partsList
|
||||||
@@ -40,4 +31,3 @@ export function PartsStatusPie({ partsList }) {
|
|||||||
|
|
||||||
return <Pie {...commonProperties} data={pieData} innerRadius={0.5} />;
|
return <Pie {...commonProperties} data={pieData} innerRadius={0.5} />;
|
||||||
}
|
}
|
||||||
export default connect(mapStateToProps, null)(PartsStatusPie);
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import CurrencyFormatter from "../../utils/CurrencyFormatter";
|
|||||||
import { DateFormatter } from "../../utils/DateFormatter";
|
import { DateFormatter } from "../../utils/DateFormatter";
|
||||||
import PartsPieGraph from "../parts-status-pie/parts-status-pie.component";
|
import PartsPieGraph from "../parts-status-pie/parts-status-pie.component";
|
||||||
import Barcode from "react-barcode";
|
import Barcode from "react-barcode";
|
||||||
|
import ProductionRemoveButton from "../production-remove-button/production-remove-button.component";
|
||||||
|
|
||||||
export default function ProductionListDetail({ selected, setSelected, jobs }) {
|
export default function ProductionListDetail({ selected, setSelected, jobs }) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
@@ -14,7 +15,7 @@ export default function ProductionListDetail({ selected, setSelected, jobs }) {
|
|||||||
<Drawer
|
<Drawer
|
||||||
title={t("production.labels.jobdetail")}
|
title={t("production.labels.jobdetail")}
|
||||||
placement='right'
|
placement='right'
|
||||||
width={"25%"}
|
width={"33%"}
|
||||||
onClose={() => setSelected(null)}
|
onClose={() => setSelected(null)}
|
||||||
visible={!!selected}>
|
visible={!!selected}>
|
||||||
<div>
|
<div>
|
||||||
@@ -52,6 +53,7 @@ export default function ProductionListDetail({ selected, setSelected, jobs }) {
|
|||||||
<PartsPieGraph partsList={theJob.partcount} />
|
<PartsPieGraph partsList={theJob.partcount} />
|
||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
</Descriptions>
|
</Descriptions>
|
||||||
|
<ProductionRemoveButton jobId={theJob.id} />
|
||||||
</div>
|
</div>
|
||||||
</Drawer>
|
</Drawer>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
import React from "react";
|
||||||
|
import { useMutation } from "@apollo/react-hooks";
|
||||||
|
import { UPDATE_JOB } from "../../graphql/jobs.queries";
|
||||||
|
import { Button, notification } from "antd";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
|
export default function ProductionRemoveButton({ jobId }) {
|
||||||
|
const [removeJobFromProduction] = useMutation(UPDATE_JOB);
|
||||||
|
const { t } = useTranslation();
|
||||||
|
const handleRemoveFromProd = () => {
|
||||||
|
removeJobFromProduction({
|
||||||
|
variables: { jobId: jobId, job: { inproduction: false } },
|
||||||
|
}).catch((error) => {
|
||||||
|
notification["error"]({
|
||||||
|
message: t("production.errors.removing", {
|
||||||
|
error: JSON.stringify(error),
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
return (
|
||||||
|
<Button onClick={handleRemoveFromProd} type={"danger"}>
|
||||||
|
{t("production.actions.remove")}
|
||||||
|
</Button>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -61,7 +61,7 @@
|
|||||||
"created": "Time",
|
"created": "Time",
|
||||||
"operation": "Operation",
|
"operation": "Operation",
|
||||||
"useremail": "User",
|
"useremail": "User",
|
||||||
"values": ""
|
"values": "Values"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bodyshop": {
|
"bodyshop": {
|
||||||
@@ -729,9 +729,13 @@
|
|||||||
"bodypriority-set": "Set Body Priority",
|
"bodypriority-set": "Set Body 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",
|
||||||
"removecolumn": "Remove Column",
|
"removecolumn": "Remove Column",
|
||||||
"saveconfig": "Save Configuration"
|
"saveconfig": "Save Configuration"
|
||||||
},
|
},
|
||||||
|
"errors": {
|
||||||
|
"removing": "Error removing from production board. {{error}}"
|
||||||
|
},
|
||||||
"labels": {
|
"labels": {
|
||||||
"alert": "Alert",
|
"alert": "Alert",
|
||||||
"alertoff": "Remove alert from job",
|
"alertoff": "Remove alert from job",
|
||||||
|
|||||||
@@ -729,9 +729,13 @@
|
|||||||
"bodypriority-set": "",
|
"bodypriority-set": "",
|
||||||
"paintpriority-clear": "",
|
"paintpriority-clear": "",
|
||||||
"paintpriority-set": "",
|
"paintpriority-set": "",
|
||||||
|
"remove": "",
|
||||||
"removecolumn": "",
|
"removecolumn": "",
|
||||||
"saveconfig": ""
|
"saveconfig": ""
|
||||||
},
|
},
|
||||||
|
"errors": {
|
||||||
|
"removing": ""
|
||||||
|
},
|
||||||
"labels": {
|
"labels": {
|
||||||
"alert": "",
|
"alert": "",
|
||||||
"alertoff": "",
|
"alertoff": "",
|
||||||
|
|||||||
@@ -729,9 +729,13 @@
|
|||||||
"bodypriority-set": "",
|
"bodypriority-set": "",
|
||||||
"paintpriority-clear": "",
|
"paintpriority-clear": "",
|
||||||
"paintpriority-set": "",
|
"paintpriority-set": "",
|
||||||
|
"remove": "",
|
||||||
"removecolumn": "",
|
"removecolumn": "",
|
||||||
"saveconfig": ""
|
"saveconfig": ""
|
||||||
},
|
},
|
||||||
|
"errors": {
|
||||||
|
"removing": ""
|
||||||
|
},
|
||||||
"labels": {
|
"labels": {
|
||||||
"alert": "",
|
"alert": "",
|
||||||
"alertoff": "",
|
"alertoff": "",
|
||||||
|
|||||||
Reference in New Issue
Block a user