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