Added IMS token changes.
This commit is contained in:
@@ -7,8 +7,12 @@ export const handleUpload = async ({ ev, context }) => {
|
||||
const { onError, onSuccess, onProgress, file } = ev;
|
||||
const { jobid, invoice_number, vendorid, callbackAfterUpload } = context;
|
||||
|
||||
const bodyshop = store.getState().user.bodyshop;
|
||||
var options = {
|
||||
headers: { "X-Requested-With": "XMLHttpRequest" },
|
||||
headers: {
|
||||
"X-Requested-With": "XMLHttpRequest",
|
||||
ims_token: bodyshop.localmediatoken,
|
||||
},
|
||||
onUploadProgress: (e) => {
|
||||
if (!!onProgress) onProgress({ percent: (e.loaded / e.total) * 100 });
|
||||
},
|
||||
@@ -22,7 +26,6 @@ export const handleUpload = async ({ ev, context }) => {
|
||||
formData.append("vendorid", vendorid);
|
||||
}
|
||||
formData.append("file", file);
|
||||
const bodyshop = store.getState().user.bodyshop;
|
||||
|
||||
const imexMediaServerResponse = await cleanAxios.post(
|
||||
normalizeUrl(
|
||||
|
||||
@@ -39,11 +39,15 @@ export function JobsDocumentsLocalGalleryReassign({
|
||||
setLoading(true);
|
||||
const selectedDocuments = allMedia[jobid].filter((m) => m.isSelected);
|
||||
|
||||
await cleanAxios.post(`${bodyshop.localmediaserverhttp}/jobs/move`, {
|
||||
from_jobid: jobid,
|
||||
jobid: newJobid,
|
||||
files: selectedDocuments.map((f) => f.filename),
|
||||
});
|
||||
await cleanAxios.post(
|
||||
`${bodyshop.localmediaserverhttp}/jobs/move`,
|
||||
{
|
||||
from_jobid: jobid,
|
||||
jobid: newJobid,
|
||||
files: selectedDocuments.map((f) => f.filename),
|
||||
},
|
||||
{ headers: { ims_token: bodyshop.localmediatoken } }
|
||||
);
|
||||
|
||||
getJobMedia(jobid);
|
||||
setVisible(false);
|
||||
|
||||
@@ -603,6 +603,12 @@ export default function ShopInfoGeneral({ form }) {
|
||||
>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
name={["localmediatoken"]}
|
||||
label={t("bodyshop.fields.localmediatoken")}
|
||||
>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
</LayoutFormRow>
|
||||
<LayoutFormRow grow header={t("bodyshop.labels.messagingpresets")}>
|
||||
<Form.List name={["md_messaging_presets"]}>
|
||||
|
||||
Reference in New Issue
Block a user