Commit 4732347a authored by Matija Obreza's avatar Matija Obreza
Browse files

Display crop chips in Dashboard


Signed-off-by: Matija Obreza's avatarMatija Obreza <matija.obreza@croptrust.org>
parent 09945c8c
Pipeline #7007 passed with stages
in 5 minutes and 16 seconds
......@@ -51,11 +51,11 @@ class DashboardTableHeader extends React.Component<IDashboardTableHeaderProps> {
/>
</TableCell>
<TableCell>Title</TableCell>
<TableCell style={ {maxWidth: '30px'} }>Owner</TableCell>
<TableCell>Created</TableCell>
<TableCell>Modified</TableCell>
<TableCell style={ {maxWidth: '60px'} }>Status</TableCell>
<TableCell style={ {maxWidth: '210px'} }/>
<TableCell style={ { maxWidth: '30px' } }>Crop</TableCell>
<TableCell style={ { maxWidth: '30px' } }>Owner</TableCell>
<TableCell style={ { maxWidth: '80px' } }>Modified</TableCell>
<TableCell style={ { maxWidth: '60px' } }>Status</TableCell>
<TableCell style={ { minWidth: '160px', maxWidth: '160px' } }/>
</TableRow>
);
}
......
......@@ -12,6 +12,7 @@ import FormControlLabel from '@material-ui/core/FormControlLabel';
// model
import {PublishState} from 'model/common.model';
import CropChips from 'crops/ui/c/CropChips';
const StatusCell = ({publishState}: { publishState: PublishState}) => {
switch (publishState) {
......@@ -68,8 +69,8 @@ export class DashboardTableRow extends React.Component<any> {
<TableCell className="font-bold" style={ {fontSize: '1rem'} }>
<DataLink tab={ tab } row={ row }>{ <Markdown basic source={ row.title }/> || (<i>Untitled</i>) }</DataLink>
</TableCell>
<TableCell><CropChips crops={ row.crops || [ row.crop ] } /></TableCell>
<TableCell style={ {fontSize: '1rem'} }>{ row.owner.shortName }</TableCell>
<TableCell style={ {fontSize: '1rem'} }>{ row.createdDate && <PrettyDate value={ row.createdDate }/> }</TableCell>
<TableCell style={ {fontSize: '1rem'} }>{ row.lastModifiedDate && <PrettyDate value={ row.lastModifiedDate }/> }</TableCell>
<StatusCell publishState={ row.state }/>
<TableCell style={ {fontSize: '1rem'} }>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment