IO-1213 Recalc after line delete.

This commit is contained in:
Patrick Fic
2021-06-23 13:22:03 -07:00
parent 35273c64bd
commit a7e972b3ce

View File

@@ -16,6 +16,7 @@ import {
Table,
Tag,
} from "antd";
import axios from "axios";
import React, { useState } from "react";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
@@ -291,8 +292,8 @@ export function JobLinesComponent({
</Button>
<Button
disabled={jobRO}
onClick={() =>
deleteJobLine({
onClick={async () => {
await deleteJobLine({
variables: { joblineId: record.id },
update(cache) {
cache.modify({
@@ -306,8 +307,12 @@ export function JobLinesComponent({
},
});
},
})
}
});
await axios.post("/job/totalsssu", {
id: job.id,
});
refetch && refetch();
}}
>
<DeleteFilled />
</Button>