Skip to content

Commit

Permalink
Production profiles tab fixes, add cost and summary tab (#790)
Browse files Browse the repository at this point in the history
* Remove facilities availability from drainage strategy and topside

* Remove facilities availability from tests

* Add year range input to production profiles table

* Set limits for table years

* Add case cost tab

* Remove setting created and modify date from frontend

* Add case summary tab

* Make tabs and case name position fixed

* Hide bottom scrollbar
Vertical scrollbar shows main view position

* Set tab menu and case title fixed position

* Use loading icon for create case when waiting for server

* Add table minwidth

* Fix production profiles order

* Align cost tab grids

* Add save functionality to cost tab

* Remove number in name when copying case

* Remove comented out code

* Add migration files

* Add cost profiles to start and end year calculation
  • Loading branch information
taustad authored Oct 25, 2022
1 parent 3f106ab commit 2c255f1
Show file tree
Hide file tree
Showing 41 changed files with 3,329 additions and 311 deletions.
15 changes: 11 additions & 4 deletions backend/api/Adapters/CaseAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ public static Case Convert(CaseDto caseDto)
DG2Date = caseDto.DG2Date,
DG3Date = caseDto.DG3Date,
DG4Date = caseDto.DG4Date,
CreateTime = caseDto.CreateTime,
ModifyTime = caseDto.ModifyTime,
CreateTime = DateTimeOffset.Now,
ModifyTime = DateTimeOffset.Now,
DrainageStrategyLink = caseDto.DrainageStrategyLink,
ExplorationLink = caseDto.ExplorationLink,
WellProjectLink = caseDto.WellProjectLink,
Expand All @@ -39,6 +39,10 @@ public static Case Convert(CaseDto caseDto)
GasInjectorCount = caseDto.GasInjectorCount,
WaterInjectorCount = caseDto.WaterInjectorCount,
FacilitiesAvailability = caseDto.FacilitiesAvailability,
CapexFactorFeasibilityStudies = caseDto.CapexFactorFeasibilityStudies,
CapexFactorFEEDStudies = caseDto.CapexFactorFEEDStudies,
NPV = caseDto.NPV,
BreakEven = caseDto.BreakEven,
SharepointFileId = caseDto.SharepointFileId,
SharepointFileName = caseDto.SharepointFileName,
SharepointFileUrl = caseDto.SharepointFileUrl,
Expand All @@ -62,8 +66,7 @@ public static void ConvertExisting(Case existing, CaseDto caseDto)
existing.DG2Date = caseDto.DG2Date;
existing.DG3Date = caseDto.DG3Date;
existing.DG4Date = caseDto.DG4Date;
existing.CreateTime = caseDto.CreateTime;
existing.ModifyTime = caseDto.ModifyTime;
existing.ModifyTime = DateTimeOffset.Now;
existing.DrainageStrategyLink = caseDto.DrainageStrategyLink;
existing.ExplorationLink = caseDto.ExplorationLink;
existing.WellProjectLink = caseDto.WellProjectLink;
Expand All @@ -77,6 +80,10 @@ public static void ConvertExisting(Case existing, CaseDto caseDto)
existing.GasInjectorCount = caseDto.GasInjectorCount;
existing.WaterInjectorCount = caseDto.WaterInjectorCount;
existing.FacilitiesAvailability = caseDto.FacilitiesAvailability;
existing.CapexFactorFeasibilityStudies = caseDto.CapexFactorFeasibilityStudies;
existing.CapexFactorFEEDStudies = caseDto.CapexFactorFEEDStudies;
existing.NPV = caseDto.NPV;
existing.BreakEven = caseDto.BreakEven;
existing.SharepointFileId = caseDto.SharepointFileId;
existing.SharepointFileName = caseDto.SharepointFileName;
}
Expand Down
4 changes: 4 additions & 0 deletions backend/api/Adapters/CaseDtoAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ public static CaseDto Convert(Case case_)
GasInjectorCount = case_.GasInjectorCount,
WaterInjectorCount = case_.WaterInjectorCount,
FacilitiesAvailability = case_.FacilitiesAvailability,
CapexFactorFeasibilityStudies = case_.CapexFactorFeasibilityStudies,
CapexFactorFEEDStudies = case_.CapexFactorFEEDStudies,
NPV = case_.NPV,
BreakEven = case_.BreakEven,
SharepointFileId = case_.SharepointFileId,
SharepointFileName = case_.SharepointFileName,
SharepointFileUrl = case_.SharepointFileUrl,
Expand Down
4 changes: 2 additions & 2 deletions backend/api/Adapters/DrainageStrategyAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ private static DrainageStrategy DrainagestrategyDtoToDrainagestrategy(DrainageSt
ProjectId = drainageStrategyDto.ProjectId,
NGLYield = drainageStrategyDto.NGLYield,
ArtificialLift = drainageStrategyDto.ArtificialLift,
GasSolution = drainageStrategyDto.GasSolution,
ProducerCount = drainageStrategyDto.ProducerCount,
GasInjectorCount = drainageStrategyDto.GasInjectorCount,
WaterInjectorCount = drainageStrategyDto.WaterInjectorCount,
FacilitiesAvailability = drainageStrategyDto.FacilitiesAvailability
};
}
existing.Id = drainageStrategyDto.Id;
Expand All @@ -115,10 +115,10 @@ private static DrainageStrategy DrainagestrategyDtoToDrainagestrategy(DrainageSt
existing.ProjectId = drainageStrategyDto.ProjectId;
existing.NGLYield = drainageStrategyDto.NGLYield;
existing.ArtificialLift = drainageStrategyDto.ArtificialLift;
existing.GasSolution = drainageStrategyDto.GasSolution;
existing.ProducerCount = drainageStrategyDto.ProducerCount;
existing.GasInjectorCount = drainageStrategyDto.GasInjectorCount;
existing.WaterInjectorCount = drainageStrategyDto.WaterInjectorCount;
existing.FacilitiesAvailability = drainageStrategyDto.FacilitiesAvailability;

return existing;
}
Expand Down
2 changes: 1 addition & 1 deletion backend/api/Adapters/DrainageStrategyDtoAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ public static DrainageStrategyDto Convert(DrainageStrategy drainageStrategy, Phy
ProjectId = drainageStrategy.ProjectId,
NGLYield = drainageStrategy.NGLYield,
ArtificialLift = drainageStrategy.ArtificialLift,
GasSolution = drainageStrategy.GasSolution,
ProducerCount = drainageStrategy.ProducerCount,
GasInjectorCount = drainageStrategy.GasInjectorCount,
WaterInjectorCount = drainageStrategy.WaterInjectorCount,
FacilitiesAvailability = drainageStrategy.FacilitiesAvailability,
ProductionProfileOil = Convert(drainageStrategy.ProductionProfileOil, unit),
ProductionProfileGas = Convert(drainageStrategy.ProductionProfileGas, unit),
ProductionProfileWater = Convert(drainageStrategy.ProductionProfileWater, unit),
Expand Down
2 changes: 0 additions & 2 deletions backend/api/Adapters/TopsideAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ public static Topside Convert(TopsideDto topsideDto)
DryWeight = topsideDto.DryWeight,
OilCapacity = topsideDto.OilCapacity,
GasCapacity = topsideDto.GasCapacity,
FacilitiesAvailability = topsideDto.FacilitiesAvailability,
ArtificialLift = topsideDto.ArtificialLift,
Maturity = topsideDto.Maturity,
Currency = topsideDto.Currency,
Expand Down Expand Up @@ -61,7 +60,6 @@ public static void ConvertExisting(Topside existing, TopsideDto topsideDto)
existing.DryWeight = topsideDto.DryWeight;
existing.OilCapacity = topsideDto.OilCapacity;
existing.GasCapacity = topsideDto.GasCapacity;
existing.FacilitiesAvailability = topsideDto.FacilitiesAvailability;
existing.ArtificialLift = topsideDto.ArtificialLift;
existing.Maturity = topsideDto.Maturity;
existing.Currency = topsideDto.Currency;
Expand Down
1 change: 0 additions & 1 deletion backend/api/Adapters/TopsideDtoAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ public static TopsideDto Convert(Topside topside)
DryWeight = topside.DryWeight,
OilCapacity = topside.OilCapacity,
GasCapacity = topside.GasCapacity,
FacilitiesAvailability = topside.FacilitiesAvailability,
ArtificialLift = topside.ArtificialLift,
Maturity = topside.Maturity,
Currency = topside.Currency,
Expand Down
6 changes: 6 additions & 0 deletions backend/api/Controllers/ExplorationsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,10 @@ public ProjectDto UpdateExploration([FromBody] ExplorationDto eplorationDto)
{
return _explorationService.UpdateExploration(eplorationDto);
}

[HttpPut("new", Name = "NewUpdateExploration")]
public ExplorationDto NewUpdateExploration([FromBody] ExplorationDto eplorationDto)
{
return _explorationService.NewUpdateExploration(eplorationDto);
}
}
6 changes: 6 additions & 0 deletions backend/api/Controllers/WellProjectsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,10 @@ public ProjectDto UpdateWellProject([FromBody] WellProjectDto wellProjectDto)
{
return _wellProjectService.UpdateWellProject(wellProjectDto);
}

[HttpPut("new", Name = "NewUpdateWellProject")]
public WellProjectDto NewUpdateWellProject([FromBody] WellProjectDto wellProjectDto)
{
return _wellProjectService.NewUpdateWellProject(wellProjectDto);
}
}
4 changes: 4 additions & 0 deletions backend/api/Dtos/CaseDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ public class CaseDto
public int GasInjectorCount { get; set; }
public int WaterInjectorCount { get; set; }
public double FacilitiesAvailability { get; set; }
public double CapexFactorFeasibilityStudies { get; set; }
public double CapexFactorFEEDStudies { get; set; }
public double NPV { get; set; }
public double BreakEven { get; set; }
public DateTimeOffset DGADate { get; set; }
public DateTimeOffset DGBDate { get; set; }
public DateTimeOffset DGCDate { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion backend/api/Dtos/DrainageStrategyDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public class DrainageStrategyDto
public int GasInjectorCount { get; set; }
public int WaterInjectorCount { get; set; }
public ArtificialLift ArtificialLift { get; set; }
public GasSolution GasSolution { get; set; }
public ProductionProfileOilDto? ProductionProfileOil { get; set; }
public ProductionProfileGasDto? ProductionProfileGas { get; set; }
public ProductionProfileWaterDto? ProductionProfileWater { get; set; }
Expand All @@ -21,7 +22,6 @@ public class DrainageStrategyDto
public NetSalesGasDto? NetSalesGas { get; set; }
public Co2EmissionsDto? Co2Emissions { get; set; }
public ProductionProfileNGLDto? ProductionProfileNGL { get; set; }
public double FacilitiesAvailability { get; set; }
}
public class ProductionProfileOilDto : TimeSeriesVolumeDto
{
Expand Down
1 change: 0 additions & 1 deletion backend/api/Dtos/TopsideDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public class TopsideDto
public double DryWeight { get; set; }
public double OilCapacity { get; set; }
public double GasCapacity { get; set; }
public double FacilitiesAvailability { get; set; }
public ArtificialLift ArtificialLift { get; set; }
public Maturity Maturity { get; set; }
public Currency Currency { get; set; }
Expand Down
Loading

0 comments on commit 2c255f1

Please sign in to comment.