IO-3515 Minimally functional form fill out.
This commit is contained in:
@@ -434,7 +434,7 @@ function BillEnterModalContainer({ billEnterModal, toggleModalVisible, bodyshop,
|
||||
formdata.append("jobid", billEnterModal.context.job.id);
|
||||
formdata.append("bodyshopid", bodyshop.id);
|
||||
formdata.append("partsorderid", "3dd26419-a139-4399-af4e-43eeb6f0dbad");
|
||||
// formdata.append("skipTextract", "true"); // For testing purposes
|
||||
//formdata.append("skipTextract", "true"); // For testing purposes
|
||||
axios
|
||||
.post("/ai/bill-ocr", formdata)
|
||||
.then(({ data }) => {
|
||||
@@ -451,6 +451,17 @@ function BillEnterModalContainer({ billEnterModal, toggleModalVisible, bodyshop,
|
||||
e.target.value = "";
|
||||
}}
|
||||
/>
|
||||
<Button
|
||||
onClick={() => {
|
||||
form.setFieldsValue({ vendorid: "72634cde-8dfa-457c-8c04-08621e712d67" });
|
||||
form.setFieldsValue({ vendorid: "72634cde-8dfa-457c-8c04-08621e712d67" });
|
||||
setTimeout(() => {
|
||||
console.log("Form Values", form.getFieldsValue());
|
||||
}, 1000);
|
||||
}}
|
||||
>
|
||||
Test form
|
||||
</Button>
|
||||
<Button
|
||||
onClick={() => {
|
||||
console.log("Fields Object", form.getFieldsValue());
|
||||
|
||||
@@ -11,8 +11,13 @@ const VendorSearchSelect = ({ value, onChange, options, onSelect, disabled, pref
|
||||
const [option, setOption] = useState(value);
|
||||
|
||||
useEffect(() => {
|
||||
console.log("*** ~ VendorSearchSelect ~ USEEFFECT:", value, option);
|
||||
if (value !== option && onChange) {
|
||||
onChange(option);
|
||||
if (value && !option) {
|
||||
onChange(value);
|
||||
} else {
|
||||
onChange(option);
|
||||
}
|
||||
}
|
||||
}, [value, option, onChange]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user