использование методов сервиса исправлено

This commit is contained in:
goodmice 2021-10-18 13:24:11 +05:00
parent 5689700c6d
commit 1e102bb128

View File

@ -40,22 +40,22 @@ export const DrillProcessFlow = ({idWell}) => {
useEffect(updateFlows, [idWell])
const onAdd = async (param) => {
param.idWell = idWell
await DrillFlowChartService.insert(idWell, param)
const onAdd = async (flow) => {
flow.idWell = idWell
await DrillFlowChartService.insert(idWell, flow)
updateFlows()
}
const onEdit = async (param) => {
if (!param.id) return
param.idWell = idWell
await DrillFlowChartService.update(idWell, param.id, param)
const onEdit = async (flow) => {
if (!flow.id) return
flow.idWell = idWell
await DrillFlowChartService.edit(idWell, flow)
updateFlows()
}
const onDelete = async (param) => {
if (!param.id) return
await DrillFlowChartService.delete(idWell, param.id)
const onDelete = async (flow) => {
if (!flow.id) return
await DrillFlowChartService.delete(idWell, flow.id)
updateFlows()
}