UNPKG

cluedin-widget

Version:

This project contains all the pages needed for browsing entities and searching them. The aim is to replace the CluedIn.Webapp project with this one when all the pages ( including the Admin page ) will be ported to REACT.

48 lines (43 loc) 1.65 kB
import React, { Component } from 'react'; import EntityAuthors from '../entityRelated/EntityAuthors.jsx'; import { makeNoValueRow, makePropHtml, findFromKey, makeBadgeHtml } from '../../helpers/properties.jsx'; import EntityValueRow from '../entityRelated/EntityValueRow.jsx'; import EntityDefaultHeader from '../entityRelated/EntityDefaultHeader.jsx'; let noEnd = makeNoValueRow('Last Modified'); let noStart = makeNoValueRow('Created'); export default class Issue extends Component { render() { const { entity, openInNewTab, q } = this.props; let startProp = findFromKey(entity.properties, 'Modified'); let endProp = findFromKey(entity.properties, 'Created'); let startHtml = startProp ? makeBadgeHtml(startProp) : noStart; let endHtml = endProp ? makePropHtml(endProp) : noEnd; /* * <div className="cluedIn_row cluedIn_row_notCentered cluedIn_entity_table"> <div className="cluedIn_col s6"> <EntityValueRow name="Author(s)"> <EntityAuthors entity={entity}></EntityAuthors> </EntityValueRow> </div> <div className="cluedIn_col s6"> <EntityValueRow name="Creation Date"> {entity.data.createdDateFormatted} </EntityValueRow> </div> </div> <div className="cluedIn_row cluedIn_row_notCentered cluedIn_entity_table"> <div className="cluedIn_col s6"> {startHtml} </div> <div className="cluedIn_col s6"> {endHtml} </div> </div> * */ return ( <div className="cluedIn_entity_row"> <EntityDefaultHeader q={q} openInNewTab={openInNewTab} entity={entity}></EntityDefaultHeader> </div> ); } }