- nuke visible from the face of the earth with fire.
Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
@@ -23,23 +23,23 @@ export function JobCostingModalContainer({
|
||||
}) {
|
||||
const { t } = useTranslation();
|
||||
const [costingData, setCostingData] = useState(null);
|
||||
const { visible, context } = jobCostingModal;
|
||||
const { open, context } = jobCostingModal;
|
||||
const { jobId } = context;
|
||||
|
||||
useEffect(() => {
|
||||
async function getData() {
|
||||
if (jobId && visible) {
|
||||
if (jobId && open) {
|
||||
const { data } = await axios.post("/job/costing", { jobid: jobId });
|
||||
|
||||
setCostingData(data);
|
||||
}
|
||||
}
|
||||
getData();
|
||||
}, [jobId, visible]);
|
||||
}, [jobId, open]);
|
||||
|
||||
return (
|
||||
<Modal
|
||||
open={visible}
|
||||
open={open}
|
||||
title={t("jobs.labels.jobcosting")}
|
||||
onOk={() => {
|
||||
toggleModalVisible();
|
||||
|
||||
Reference in New Issue
Block a user