IO-1213 Recalc after line delete.
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user