diff --git a/src/pages/WellOperations/DrillProcessFlow.jsx b/src/pages/WellOperations/DrillProcessFlow.jsx index a046117..3b38a4c 100644 --- a/src/pages/WellOperations/DrillProcessFlow.jsx +++ b/src/pages/WellOperations/DrillProcessFlow.jsx @@ -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() }