Update Active Status and Fix Mode 3

This commit is contained in:
2022-07-25 12:24:55 +07:00
parent d7de76798e
commit 2493e7fd2a
14 changed files with 118 additions and 14 deletions

View File

@@ -76,7 +76,9 @@ export default function PlanList() {
<TableCell align="left">{row.code}</TableCell>
<TableCell align="left">{row.name}</TableCell>
<TableCell align="left">{ makeExcerpt(row.description) }</TableCell>
<TableCell align="right"><Button variant="outlined" color="success" size="small">Active</Button></TableCell>
{( row.active ? (<TableCell align="right"><Button variant="outlined" color="success" size="small">Active</Button></TableCell>)
: (<TableCell align="right"><Button variant="outlined" color="error" size="small">Inactive</Button></TableCell>)
)}
<TableCell align="right"><Link to={`/corporates/${row.corporate_id}/corporate-plans/${row.id}/edit`}><Button variant="outlined" color="success" size="small">Edit</Button></Link></TableCell>
</TableRow>
{/* COLLAPSIBLE ROW */}

View File

@@ -263,7 +263,9 @@ export default function CorporatePlanList() {
<TableCell align="left">{row.plan_id}</TableCell>
<TableCell align="left">{row.current_policy.start}</TableCell>
<TableCell align="left">{row.current_policy.end}</TableCell>
<TableCell align="right"><Button variant="outlined" color="success" size="small">Active</Button></TableCell>
{( row.active ? (<TableCell align="right"><Button variant="outlined" color="success" size="small">Active</Button></TableCell>)
: (<TableCell align="right"><Button variant="outlined" color="error" size="small">Inactive</Button></TableCell>)
)}
{/* <TableCell align="right"><Button variant="outlined" color="success" size="small">Edit</Button></TableCell> */}
</TableRow>
{/* COLLAPSIBLE ROW */}