Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DRTII-1695 Increase max egate bank size to 15 from 10 #1968

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import scala.scalajs.js


object EgatesScheduleEditor {
val maxGatesPerBank = 15

case class Props(initialUpdates: EgateBanksUpdates) extends UseValueEq

case class Editing(update: EgateBanksUpdate, originalDate: MillisSinceEpoch) {
Expand All @@ -46,7 +48,7 @@ object EgatesScheduleEditor {
e.persist()
scope.modState { currentState =>
val maybeUpdatedEditing = currentState.editing.map { editing =>
editing.copy(update = editing.update.copy(banks = editing.update.banks :+ EgateBank(IndexedSeq.fill(10)(true))))
editing.copy(update = editing.update.copy(banks = editing.update.banks :+ EgateBank(IndexedSeq.fill(maxGatesPerBank)(true))))
}
currentState.copy(editing = maybeUpdatedEditing)
}
Expand Down Expand Up @@ -125,7 +127,7 @@ object EgatesScheduleEditor {
s.editing match {
case Some(editing) =>
MuiDialog(open = s.editing.isDefined, maxWidth = "sm")(
MuiDialogTitle()(s"${if (editing.originalDate == today) "Add" else "Edit"} SLA change"),
MuiDialogTitle()(s"${if (editing.originalDate == today) "Add" else "Edit"} EGates change"),
MuiDialogContent()(
<.div(^.style := js.Dictionary("display" -> "flex", "flexDirection" -> "column", "gap" -> "16px", "padding" -> "8px"),
MuiTextField(
Expand Down
Loading