Merge branch 'feature/IO-3357-Reynolds-and-Reynolds-DMS-API-Integration' of bitbucket.org:snaptsoft/bodyshop into feature/IO-3357-Reynolds-and-Reynolds-DMS-API-Integration
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Button } from "antd";
|
||||
import { Button, Space } from "antd";
|
||||
import axios from "axios";
|
||||
import { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
@@ -42,9 +42,29 @@ export function DmsCdkMakesRefetch({ currentUser, bodyshop }) {
|
||||
|
||||
setLoading(false);
|
||||
};
|
||||
|
||||
const handleGetCOA = async () => {
|
||||
try {
|
||||
setLoading(true);
|
||||
await axios.post(`cdk/fortellis/getCOA`, {
|
||||
cdk_dealerid: bodyshop.cdk_dealerid,
|
||||
bodyshopid: bodyshop.id
|
||||
});
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
|
||||
setLoading(false);
|
||||
};
|
||||
|
||||
return (
|
||||
<Button loading={loading} onClick={handleRefetch}>
|
||||
{t("jobs.actions.dms.refetchmakesmodels")}
|
||||
</Button>
|
||||
<Space>
|
||||
<Button loading={loading} onClick={handleRefetch}>
|
||||
{t("jobs.actions.dms.refetchmakesmodels")}
|
||||
</Button>
|
||||
<Button loading={loading} onClick={handleGetCOA}>
|
||||
Get COA
|
||||
</Button>
|
||||
</Space>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user