Skip to content

Commit

Permalink
feat: improved layout of emergency list
Browse files Browse the repository at this point in the history
  • Loading branch information
Casper Bollen authored and Casper Bollen committed May 23, 2024
1 parent 582b73c commit 57c3cbe
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 17 deletions.
33 changes: 18 additions & 15 deletions src/Client/Components/ResponsiveTable.fs
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ module ResponsiveTable =
else
let b, s =
match cell.value with
| _ when cell.value.Contains("**") -> "h6", cell.value.Replace("**", "")
| _ when cell.value.Contains("*") -> "h5", cell.value.Replace("*", "")
| _ -> "subtitle2", cell.value
| _ when cell.value.Contains("**") -> "", cell.value.Replace("**", "")
| _ when cell.value.Contains("*") -> "", cell.value.Replace("*", "")
| _ -> Mui.Colors.Grey.``700``, cell.value

let h =
props.columns
Expand All @@ -54,38 +54,41 @@ module ResponsiveTable =
import Divider from '@mui/material/Divider';
import Typography from '@mui/material/Typography';
<React.Fragment>
<Stack direction="column" spacing={1} >
<Stack direction="row" spacing={3} alignItems="flex-end" >
<Typography minHeight={40} minWidth={80} variant="body2" align="left" >
<React.Fragment>
<Stack direction="row" spacing={3} >
<Typography minHeight={40} minWidth={80} variant="body2" color={Mui.Colors.Blue.``900``} >
{h}
</Typography>
<Typography minHeight={40} variant={b} align="left" >
<Typography minHeight={40} color={b} variant="body2" >
{s}
</Typography>
</Stack>
<Divider variant="middle" />
</Stack>
</React.Fragment>
"""
)

JSX.jsx
$"""
import Card from '@mui/material/Card';
import CardHeader from '@mui/material/CardHeader';
import CardActions from '@mui/material/CardActions';
import CardContent from '@mui/material/CardContent';
<Grid item width={500} sx={ {| mb = 1 |} } >
<Card raised={true} >
<CardHeader>
Header
</CardHeader>
<CardContent>
{React.fragment (content |> unbox)}
</CardContent>
{
match row.actions with
| None -> JSX.jsx "<></>" |> toReact
| Some acts -> acts
}
<CardActions>
{
match row.actions with
| None -> JSX.jsx "<></>" |> toReact
| Some acts -> acts
}
</CardActions>
</Card>
</Grid>
"""
Expand Down
4 changes: 2 additions & 2 deletions src/Client/Views/Patient.fs
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ module Patient =
|> Array.map (fun el ->
JSX.jsx
$"""
<Grid item xs={12} md={3} lg={2}>{el}</Grid>
<Grid item xs={6} md={3} lg={2}>{el}</Grid>
"""
)

Expand Down Expand Up @@ -428,7 +428,7 @@ module Patient =
</AccordionSummary>
<AccordionDetails>
<Grid container spacing={2}>
{React.fragment (items |> unbox)}
{React.fragment (items |> unbox)}
</Grid>
<Box sx={ {| mt=2 |} }>
<Button variant="text" onClick={fun _ -> Clear |> dispatch} fullWidth startIcon={Mui.Icons.Delete} >
Expand Down
4 changes: 4 additions & 0 deletions src/Informedica.GenOrder.Lib/Order.fs
Original file line number Diff line number Diff line change
Expand Up @@ -2575,10 +2575,12 @@ module Order =
)
ord // original order
| Ok ord ->
(*
ConsoleWriter.writeInfoMessage
$"""=== solved order with increased increment === {ord |> toString |> String.concat "\n"}"""
true
false
*)

ord // increased increment order
|> solveOrder false logger
Expand All @@ -2594,11 +2596,13 @@ module Order =
)
ord // increased increment order
| Ok ord ->
(*
let s = ord |> toString |> String.concat "\n"
ConsoleWriter.writeInfoMessage
$"solved order with increased increment and values:\n {s}"
true
false
*)

ord // calculated order
|> Ok
Expand Down

0 comments on commit 57c3cbe

Please sign in to comment.