Skip to content

Commit

Permalink
Port TargetSummaryTable
Browse files Browse the repository at this point in the history
  • Loading branch information
cquiroz committed Aug 16, 2024
1 parent eb867a6 commit d08d6e8
Show file tree
Hide file tree
Showing 2 changed files with 208 additions and 159 deletions.
22 changes: 17 additions & 5 deletions explore/src/main/scala/explore/tabs/TargetTabContents.scala
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ import explore.observationtree.AsterismGroupObsList
import explore.shortcuts.*
import explore.shortcuts.given
import explore.targets.ObservationPasteAction
import explore.targets.DeletingTargets
import explore.targets.TargetPasteAction
import explore.targets.TargetSummaryTable
import explore.targets.TargetSummaryBody
import explore.targets.TargetSummaryTitle
import explore.targets.TargetSummaryTileState
import explore.undo.*
import explore.utils.*
Expand Down Expand Up @@ -60,6 +62,7 @@ import queries.schemas.odb.ObsQueries
import java.time.Instant
import scala.collection.immutable.SortedSet
import scala.scalajs.LinkingInfo
import explore.components.ColumnSelectorState

case class TargetTabContents(
userId: Option[User.Id],
Expand Down Expand Up @@ -136,11 +139,11 @@ object TargetTabContents extends TwoPanels:
*/
val renderSummary: Tile[TargetSummaryTileState] = Tile(
ObsTabTilesIds.TargetSummaryId.id,
TargetSummaryTileState(),
TargetSummaryTileState(Nil, ColumnSelectorState(), DeletingTargets(false)),
"Target Summary",
backButton.some
)(renderInTitle =>
TargetSummaryTable(
)(
TargetSummaryBody(
props.userId,
props.programId,
props.targets.model,
Expand All @@ -151,7 +154,16 @@ object TargetTabContents extends TwoPanels:
selectedTargetIds,
props.programSummaries,
props.readonly
)
),
(s, _) =>
TargetSummaryTitle(
props.programId,
props.targets.model,
selectTargetOrSummary,
selectedTargetIds,
props.programSummaries,
props.readonly
)(s)
)

/**
Expand Down
Loading

0 comments on commit d08d6e8

Please sign in to comment.