Skip to content

Commit

Permalink
Fix setting technical input values on first load (#1227)
Browse files Browse the repository at this point in the history
* Fix setting technical input values on first load
  • Loading branch information
taustad authored Jul 12, 2024
1 parent 3c59362 commit a113c3e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ const EditTechnicalInputModal = () => {
}
}, [technicalModalIsOpen, setTechnicalModalIsOpen])

if (!explorationOperationalWellCosts || !developmentOperationalWellCosts) { return null }

return (
<Dialog
open={technicalModalIsOpen}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ const FullwidthTable = styled(Table)`

interface Props {
title: string
developmentOperationalWellCosts?: Components.Schemas.DevelopmentOperationalWellCostsDto | undefined
developmentOperationalWellCosts?: Components.Schemas.DevelopmentOperationalWellCostsDto
setDevelopmentOperationalWellCosts?: Dispatch<SetStateAction<Components.Schemas.DevelopmentOperationalWellCostsDto | undefined>>

explorationOperationalWellCosts?: Components.Schemas.ExplorationOperationalWellCostsDto | undefined
explorationOperationalWellCosts?: Components.Schemas.ExplorationOperationalWellCostsDto
setExplorationOperationalWellCosts?: Dispatch<SetStateAction<Components.Schemas.ExplorationOperationalWellCostsDto | undefined>>
}

Expand Down
4 changes: 2 additions & 2 deletions frontend/src/Components/EditTechnicalInput/WellCostsTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ const SectionHeader = styled.div`
justify-content: space-between;
`
interface Props {
developmentOperationalWellCosts: Components.Schemas.DevelopmentOperationalWellCostsDto | undefined
developmentOperationalWellCosts: Components.Schemas.DevelopmentOperationalWellCostsDto
setDevelopmentOperationalWellCosts: Dispatch<SetStateAction<Components.Schemas.DevelopmentOperationalWellCostsDto | undefined>>

explorationOperationalWellCosts: Components.Schemas.ExplorationOperationalWellCostsDto | undefined
explorationOperationalWellCosts: Components.Schemas.ExplorationOperationalWellCostsDto
setExplorationOperationalWellCosts: Dispatch<SetStateAction<Components.Schemas.ExplorationOperationalWellCostsDto | undefined>>

wellProjectWells: Components.Schemas.WellDto[]
Expand Down

0 comments on commit a113c3e

Please sign in to comment.