From 8d46df8294311b358936e64725d834f807200e52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A4=D1=80=D0=BE=D0=BB=D0=BE=D0=B2?= Date: Fri, 17 Sep 2021 15:11:12 +0500 Subject: [PATCH] fix WellOperationEditor make wellDepth numeric before send. --- src/pages/WellOperations/WellOperationsEditor.jsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pages/WellOperations/WellOperationsEditor.jsx b/src/pages/WellOperations/WellOperationsEditor.jsx index d6f93cd..8bacc16 100644 --- a/src/pages/WellOperations/WellOperationsEditor.jsx +++ b/src/pages/WellOperations/WellOperationsEditor.jsx @@ -99,6 +99,8 @@ export const WellOperationsEditor = ({idWell, idType}) => { const onAdd = async (operation) => { operation.idType = idType + operation.wellDepth = +operation.wellDepth + operation.durationHours = +operation.durationHours await WellOperationService.insertRange(idWell, [operation]) updateOperations() } @@ -107,6 +109,8 @@ export const WellOperationsEditor = ({idWell, idType}) => { if(!operation.id) return operation.idType = idType + operation.wellDepth = +operation.wellDepth + operation.durationHours = +operation.durationHours await WellOperationService.update(idWell, operation.id, operation) updateOperations() }