Skip to content

Commit

Permalink
table full width, add disabled flag to insurer dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeyManoguerra committed Dec 22, 2020
1 parent 291f8c4 commit 61abab9
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/ParticipantForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ const ParticipantForm = ({
</Grid>
{participantInfo.is_insured && (
<Grid item xs={12} md={6}>
<FormControl>
<FormControl disabled={isDisabled}>
<InputLabel id="insurance-select">Select Insurance</InputLabel>
<Select
name="insurer"
Expand Down
12 changes: 11 additions & 1 deletion frontend/src/components/VisitRouter/VisitTable.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from "react"
import Grid from "@material-ui/core/Grid"
import { makeStyles } from "@material-ui/core"
import Paper from "@material-ui/core/Paper"
import Fab from "@material-ui/core/Fab"
import Container from "@material-ui/core/Container"
Expand All @@ -16,6 +17,15 @@ const VisitTable = ({
participantVisits,
getProtectedVisitData,
}) => {
const useStyles = makeStyles({
visitTable: {
marginTop: 50,
width: "100%",
},
})

const classes = useStyles()

useEffect(() => {
getParticipantVisits()
//eslint-disable-next-line react-hooks/exhaustive-deps
Expand All @@ -39,7 +49,7 @@ const VisitTable = ({
</PrevPointHeading>
</div>
<Paper>
<Table class="visits-table" aria-label="visits table">
<Table class={classes.visitTable} aria-label="visits table">
<PrevPointTableHead
headerTitles={mockHeaderTitles}
forParticipantTable={false}
Expand Down
5 changes: 5 additions & 0 deletions frontend/src/stores/ParticipantStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ export class ParticipantStore {
}
// ParticipantList Component Actions
@action setParticipantsList = data => {
if (!Array.isArray(data)) {
// dev server bug workaround
this.participants = []
return
}
this.participants = data
}

Expand Down

0 comments on commit 61abab9

Please sign in to comment.