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

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]) useEffect(updateFlows, [idWell])
const onAdd = async (param) => { const onAdd = async (flow) => {
param.idWell = idWell flow.idWell = idWell
await DrillFlowChartService.insert(idWell, param) await DrillFlowChartService.insert(idWell, flow)
updateFlows() updateFlows()
} }
const onEdit = async (param) => { const onEdit = async (flow) => {
if (!param.id) return if (!flow.id) return
param.idWell = idWell flow.idWell = idWell
await DrillFlowChartService.update(idWell, param.id, param) await DrillFlowChartService.edit(idWell, flow)
updateFlows() updateFlows()
} }
const onDelete = async (param) => { const onDelete = async (flow) => {
if (!param.id) return if (!flow.id) return
await DrillFlowChartService.delete(idWell, param.id) await DrillFlowChartService.delete(idWell, flow.id)
updateFlows() updateFlows()
} }