ImEX and App Improvements.

This commit is contained in:
Patrick Fic
2024-03-15 09:29:49 -07:00
parent 7e01f667b3
commit f279fc1e81
16 changed files with 141 additions and 88 deletions

View File

@@ -1,13 +1,13 @@
import {useMutation} from "@apollo/client";
import {Button, Form, notification, Popover, Tooltip} from "antd";
import {t} from "i18next";
import React, {useState} from "react";
import {UPDATE_LINE_PPC} from "../../graphql/jobs-lines.queries";
import { useMutation } from "@apollo/client";
import { Button, Form, notification, Popover, Tooltip } from "antd";
import axios from "axios";
import { t } from "i18next";
import React, { useState } from "react";
import { UPDATE_LINE_PPC } from "../../graphql/jobs-lines.queries";
import CurrencyFormatter from "../../utils/CurrencyFormatter";
import InstanceRenderManager from "../../utils/instanceRenderMgr";
import CurrencyFormItemComponent from "../form-items-formatted/currency-form-item.component";
import JobLineConvertToLabor from "../job-line-convert-to-labor/job-line-convert-to-labor.component";
import axios from "axios";
import InstanceRenderManager from "../../utils/instanceRenderMgr";
export default function JobLinesPartPriceChange({job, line, refetch}) {
const [loading, setLoading] = useState(false);
@@ -54,7 +54,9 @@ export default function JobLinesPartPriceChange({job, line, refetch}) {
}
};
const popcontent = (
const popcontent = InstanceRenderManager({
imex: null,
rome: (
<Form layout="vertical" onFinish={handleFinish} initialValues={{act_price: line.act_price}}>
<Form.Item
name="act_price"
@@ -63,15 +65,18 @@ export default function JobLinesPartPriceChange({job, line, refetch}) {
>
<CurrencyFormItemComponent/>
</Form.Item>
<Button loading={loading} htmlType="primary">
<Button disabled={InstanceRenderManager({imex:true, rome: false, promanager: true})} loading={loading} htmlType="primary">
{t("general.actions.save")}
</Button>
</Form>
);
),
promanager: null
}) ;
return (
<JobLineConvertToLabor jobline={line} job={job}>
<Popover trigger="click" disabled={line.manual_line || InstanceRenderManager({imex:false, rome:true})} content={popcontent}>
<Popover trigger="click"
disabled={true || line.manual_line} content={popcontent}>
<CurrencyFormatter>
{line.db_ref === "900510" || line.db_ref === "900511"
? line.prt_dsmk_m