Added messaging presets BOD-107
This commit is contained in:
@@ -13,25 +13,24 @@ export default function ShopInfoContainer() {
|
||||
const { t } = useTranslation();
|
||||
const [updateBodyshop] = useMutation(UPDATE_SHOP);
|
||||
const { loading, error, data, refetch } = useQuery(QUERY_BODYSHOP, {
|
||||
fetchPolicy: "network-only"
|
||||
fetchPolicy: "network-only",
|
||||
});
|
||||
|
||||
const handleFinish = values => {
|
||||
const handleFinish = (values) => {
|
||||
console.log("values", values);
|
||||
logImEXEvent("shop_update");
|
||||
|
||||
updateBodyshop({
|
||||
variables: { id: data.bodyshops[0].id, shop: values }
|
||||
variables: { id: data.bodyshops[0].id, shop: values },
|
||||
})
|
||||
.then(r => {
|
||||
.then((r) => {
|
||||
notification["success"]({ message: t("bodyshop.successes.save") });
|
||||
refetch().then(_ => form.resetFields());
|
||||
refetch().then((_) => form.resetFields());
|
||||
})
|
||||
.catch(error => {
|
||||
notification["error"](
|
||||
{ message: t("bodyshop.errors.saving") },
|
||||
{ message: error }
|
||||
);
|
||||
.catch((error) => {
|
||||
notification["error"]({
|
||||
message: t("bodyshop.errors.saving", { message: error }),
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user