@@ -23,6 +23,7 @@ export function DocumentsLocalUploadComponent({
|
|||||||
vendorid,
|
vendorid,
|
||||||
invoice_number,
|
invoice_number,
|
||||||
callbackAfterUpload,
|
callbackAfterUpload,
|
||||||
|
allowAllTypes,
|
||||||
}) {
|
}) {
|
||||||
const [fileList, setFileList] = useState([]);
|
const [fileList, setFileList] = useState([]);
|
||||||
|
|
||||||
@@ -52,7 +53,9 @@ export function DocumentsLocalUploadComponent({
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
accept="audio/*, video/*, image/*, .pdf, .doc, .docx, .xls, .xlsx"
|
{...(!allowAllTypes && {
|
||||||
|
accept: "audio/*, video/*, image/*, .pdf, .doc, .docx, .xls, .xlsx",
|
||||||
|
})}
|
||||||
>
|
>
|
||||||
{children || (
|
{children || (
|
||||||
<>
|
<>
|
||||||
|
|||||||
@@ -69,7 +69,10 @@ export function JobsDocumentsLocalGallery({
|
|||||||
) {
|
) {
|
||||||
acc.images.push(val);
|
acc.images.push(val);
|
||||||
} else {
|
} else {
|
||||||
acc.other.push(val);
|
acc.other.push({
|
||||||
|
...val,
|
||||||
|
tags: [{ value: val.filename, title: val.filename }],
|
||||||
|
});
|
||||||
}
|
}
|
||||||
return acc;
|
return acc;
|
||||||
},
|
},
|
||||||
@@ -104,6 +107,7 @@ export function JobsDocumentsLocalGallery({
|
|||||||
job={job}
|
job={job}
|
||||||
invoice_number={invoice_number}
|
invoice_number={invoice_number}
|
||||||
vendorid={vendorid}
|
vendorid={vendorid}
|
||||||
|
allowAllTypes
|
||||||
/>
|
/>
|
||||||
</Card>
|
</Card>
|
||||||
<Card title={t("jobs.labels.documents-images")}>
|
<Card title={t("jobs.labels.documents-images")}>
|
||||||
|
|||||||
@@ -238,6 +238,12 @@ exports.QueryInsuranceCo = QueryInsuranceCo;
|
|||||||
async function InsertInsuranceCo(oauthClient, qbo_realmId, req, job, bodyshop) {
|
async function InsertInsuranceCo(oauthClient, qbo_realmId, req, job, bodyshop) {
|
||||||
const insCo = bodyshop.md_ins_cos.find((i) => i.name === job.ins_co_nm);
|
const insCo = bodyshop.md_ins_cos.find((i) => i.name === job.ins_co_nm);
|
||||||
|
|
||||||
|
if (!insCo) {
|
||||||
|
throw new Error(
|
||||||
|
`Insurance Company '${job.ins_co_nm}' not found in shop configuration. Please make sure it exists or change the insurance company name on the job to one that exists.`
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
const Customer = {
|
const Customer = {
|
||||||
DisplayName: job.ins_co_nm.trim(),
|
DisplayName: job.ins_co_nm.trim(),
|
||||||
BillWithParent: true,
|
BillWithParent: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user