Skip to content

Commit

Permalink
fixing the height for shift and staffing page (#2013)
Browse files Browse the repository at this point in the history
Signed-off-by: Nilesh Gupta <[email protected]>
  • Loading branch information
ngu04 authored Feb 6, 2025
1 parent e356dae commit 0e00069
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 19 deletions.
18 changes: 9 additions & 9 deletions client/src/main/scala/drt/client/components/MonthlyShifts.scala
Original file line number Diff line number Diff line change
Expand Up @@ -246,15 +246,15 @@ object MonthlyShifts {
^.onClick ==> handleShiftEditForm),
MuiButton(color = Color.primary, variant = "contained")
(<.span(^.style := js.Dictionary("paddingLeft" -> "5px"), "Save staff updates"),
^.onClick ==> confirmAndSave(state.shiftsData, state.changedAssignments))
^.onClick ==> confirmAndSave(state.shiftsData, state.changedAssignments)),
<.div(^.className := "staffing-controls-toggle",
MuiButton(color = Color.secondary, variant = "outlined")
(<.span(^.style := js.Dictionary("paddingLeft" -> "5px"), "Toggle Shift view"),
^.onClick --> props.router.set(props.terminalPageTab.withUrlParameters(ShiftViewEnabled(true)))
)
)
),
),
<.div(^.className := "staffing-controls-toggle",
MuiButton(color = Color.secondary, variant = "outlined")
(<.span(^.style := js.Dictionary("paddingLeft" -> "5px"), "Toggle Shift view"),
^.onClick --> props.router.set(props.terminalPageTab.withUrlParameters(ShiftViewEnabled(true)))
)
)
),
MuiSwipeableDrawer(open = state.showEditStaffForm,
anchor = "right",
Expand All @@ -281,8 +281,8 @@ object MonthlyShifts {
cancelHandler = () => {
scope.modState(state => state.copy(showEditStaffForm = false)).runNow()
})))),
<.div(^.className := "staffing-table",
<.div(^.className := "staffing-table-content",
<.div(^.className := "shifts-table",
<.div(^.className := "shifts-table-content",
ShiftHotTableViewComponent(ShiftHotTableViewProps(
ViewDate(year = viewingDate.getFullYear, month = viewingDate.getMonth, day = viewingDate.getDate),
dayRange = props.terminalPageTab.dayRangeType.getOrElse("monthly"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,16 +330,15 @@ object MonthlyStaffing {
^.onClick ==> handleShiftEditForm),
MuiButton(color = Color.primary, variant = "contained")
(<.span(^.style := js.Dictionary("paddingLeft" -> "5px"), "Save staff updates"),
^.onClick ==> confirmAndSave(viewingDate, timeSlots))
,
^.onClick ==> confirmAndSave(viewingDate, timeSlots)),
if (props.isStaffShiftPage) {
<.div(^.className := "staffing-controls-toggle",
MuiButton(color = Color.secondary, variant = "outlined")
(<.span(^.style := js.Dictionary("paddingRight" -> "5px"), "Toggle Shift view"),
^.onClick --> props.router.set(props.terminalPageTab.withUrlParameters(ShiftViewEnabled(false)))
))
} else EmptyVdom
)),
if (props.isStaffShiftPage) {
<.div(^.className := "staffing-controls-toggle",
MuiButton(color = Color.secondary, variant = "outlined")
(<.span(^.style := js.Dictionary("paddingRight" -> "5px"), "Toggle Shift view"),
^.onClick --> props.router.set(props.terminalPageTab.withUrlParameters(ShiftViewEnabled(false)))
))
} else EmptyVdom
),
MuiSwipeableDrawer(open = state.showEditStaffForm,
anchor = "right",
Expand Down
2 changes: 1 addition & 1 deletion project/Settings.scala
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ object Settings {
"react-markdown" -> "9.0.1",
"@types/react-dom" -> react,
"css-loader" -> "6.7.2",
"@drt/drt-react"-> "https://github.com/UKHomeOffice/drt-react.git#1.6.5",
"@drt/drt-react"-> "https://github.com/UKHomeOffice/drt-react.git#f616e1ac70f92f916c3df1301160b7318997f753",
)

/** Dependencies only used by the JS project (note the use of %%% instead of %%) */
Expand Down
11 changes: 11 additions & 0 deletions server/src/main/assets/stylesheets/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -1425,6 +1425,17 @@ p {
overflow: auto;
}

.staffing-table-content {
height: 600px;
overflow-y: scroll;
}

.shifts-table-content {
height: 500px;
overflow-y: scroll;
}


.staffing-controls {
background-color: white;
padding-top: 10px;
Expand Down

0 comments on commit 0e00069

Please sign in to comment.