From 03e4d36e64cc2035da2ff123cde8f444b8933b00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Piaggio?= Date: Wed, 18 Sep 2024 09:05:40 -0300 Subject: [PATCH] scalafix, remove comments --- .../main/scala/explore/programs/ProgramDetailsTile.scala | 2 +- explore/src/main/scala/explore/programs/SupportUsers.scala | 2 +- explore/src/main/scala/explore/proposal/ProgramUsers.scala | 4 ++-- .../src/main/scala/explore/users/ProgramUsersTable.scala | 2 +- .../src/main/scala/explore/model/ProgramUserWithRole.scala | 7 +------ 5 files changed, 6 insertions(+), 11 deletions(-) diff --git a/explore/src/main/scala/explore/programs/ProgramDetailsTile.scala b/explore/src/main/scala/explore/programs/ProgramDetailsTile.scala index c285aa79b4..65df687d79 100644 --- a/explore/src/main/scala/explore/programs/ProgramDetailsTile.scala +++ b/explore/src/main/scala/explore/programs/ProgramDetailsTile.scala @@ -10,9 +10,9 @@ import explore.model.Constants import explore.model.ProgramDetails import explore.model.ProgramTimes import explore.model.ProgramUserWithRole -import lucuma.core.enums.ProgramUserRole import japgolly.scalajs.react.* import japgolly.scalajs.react.vdom.html_<^.* +import lucuma.core.enums.ProgramUserRole import lucuma.core.model.Semester import lucuma.core.syntax.display.* import lucuma.react.common.ReactFnProps diff --git a/explore/src/main/scala/explore/programs/SupportUsers.scala b/explore/src/main/scala/explore/programs/SupportUsers.scala index 312015e625..24a57fb885 100644 --- a/explore/src/main/scala/explore/programs/SupportUsers.scala +++ b/explore/src/main/scala/explore/programs/SupportUsers.scala @@ -9,9 +9,9 @@ import explore.model.ProgramUserWithRole import explore.users.ProgramUsersTable import japgolly.scalajs.react.* import japgolly.scalajs.react.vdom.html_<^.* +import lucuma.core.enums.ProgramUserRole import lucuma.core.model.Program import lucuma.react.common.ReactFnProps -import lucuma.core.enums.ProgramUserRole case class SupportUsers( programId: Program.Id, diff --git a/explore/src/main/scala/explore/proposal/ProgramUsers.scala b/explore/src/main/scala/explore/proposal/ProgramUsers.scala index 4e0ec0d62e..0ec0cc57c1 100644 --- a/explore/src/main/scala/explore/proposal/ProgramUsers.scala +++ b/explore/src/main/scala/explore/proposal/ProgramUsers.scala @@ -3,8 +3,8 @@ package explore.proposal -import cats.data.NonEmptySet import cats.data.NonEmptyList +import cats.data.NonEmptySet import cats.syntax.all.* import crystal.react.* import explore.Icons @@ -17,6 +17,7 @@ import explore.users.ProgramUsersTable import japgolly.scalajs.react.* import japgolly.scalajs.react.vdom.html_<^.* import lucuma.core.enums.InvitationStatus +import lucuma.core.enums.ProgramUserRole import lucuma.core.model.Program import lucuma.core.util.Enumerated import lucuma.core.util.NewType @@ -25,7 +26,6 @@ import lucuma.react.primereact.Button import lucuma.react.primereact.OverlayPanelRef import lucuma.ui.primereact.* import lucuma.ui.syntax.all.given -import lucuma.core.enums.ProgramUserRole enum CreateInviteProcess(private val tag: String) derives Enumerated: case Idle extends CreateInviteProcess("idle") diff --git a/explore/src/main/scala/explore/users/ProgramUsersTable.scala b/explore/src/main/scala/explore/users/ProgramUsersTable.scala index 6c0001dbd0..6bb21dec45 100644 --- a/explore/src/main/scala/explore/users/ProgramUsersTable.scala +++ b/explore/src/main/scala/explore/users/ProgramUsersTable.scala @@ -23,6 +23,7 @@ import japgolly.scalajs.react.vdom.html_<^.* import lucuma.core.enums.EducationalStatus import lucuma.core.enums.Gender import lucuma.core.enums.Partner +import lucuma.core.enums.ProgramUserRole import lucuma.core.model.PartnerLink import lucuma.core.model.Program import lucuma.core.model.User @@ -43,7 +44,6 @@ import lucuma.ui.table.* import lucuma.ui.utils.* import monocle.function.Each.* import queries.common.ProposalQueriesGQL.UnlinkUser -import lucuma.core.enums.ProgramUserRole case class ProgramUsersTable( programId: Program.Id, diff --git a/model/shared/src/main/scala/explore/model/ProgramUserWithRole.scala b/model/shared/src/main/scala/explore/model/ProgramUserWithRole.scala index 5721f233b3..68da90884f 100644 --- a/model/shared/src/main/scala/explore/model/ProgramUserWithRole.scala +++ b/model/shared/src/main/scala/explore/model/ProgramUserWithRole.scala @@ -6,20 +6,18 @@ package explore.model import cats.Eq import cats.derived.* import cats.syntax.all.* -import lucuma.core.enums.ProgramUserRole import io.circe.Decoder import lucuma.core.enums.EducationalStatus import lucuma.core.enums.Gender +import lucuma.core.enums.ProgramUserRole import lucuma.core.model.PartnerLink import lucuma.odb.json.partnerlink.given import monocle.Focus import monocle.Lens -// an empty role implies PI case class ProgramUserWithRole( user: ProgramUser, partnerLink: Option[PartnerLink], - // role: Option[ProgramUserRole], role: ProgramUserRole, educationalStatus: Option[EducationalStatus], thesis: Option[Boolean], @@ -28,9 +26,6 @@ case class ProgramUserWithRole( export user.{name, nameWithEmail} lazy val roleName: String = role.tag - // role match - // case None => "Pi" - // case Some(role) => role.tag object ProgramUserWithRole: val user: Lens[ProgramUserWithRole, ProgramUser] = Focus[ProgramUserWithRole](_.user)