fix WellOperationEditor make wellDepth numeric before send.

This commit is contained in:
Фролов 2021-09-17 15:11:12 +05:00
parent a437972fc5
commit 8d46df8294

View File

@ -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()
}