Sha256: b1ae512f98ba457ebc2500f007f272dc9ba4f1a34aa6371b7d4fa123d382eac2

Contents?: true

Size: 960 Bytes

Versions: 34

Compression:

Stored size: 960 Bytes

Contents

import React from 'react';
import { ListView } from 'patternfly-react';
import PropTypes from 'prop-types';
import ListItemStatus from '../ListItemStatus';
import Dashboard from '../../../Dashboard';

const ListItem = ({ accountID, account }) => (
  <ListView.Item
    leftContent={<ListView.Icon name="user" />}
    heading={account.label}
    additionalInfo={[
      <ListItemStatus key={`${accountID}_status`} account={account} />,
    ]}
    stacked
    hideCloseIcon
  >
    <Dashboard accountID={accountID} account={account} />
  </ListView.Item>
);

ListItem.propTypes = {
  accountID: PropTypes.string.isRequired,
  account: PropTypes.shape({
    generate_report_status: PropTypes.string,
    upload_report_status: PropTypes.string,
    label: PropTypes.string,
  }),
};

ListItem.defaultProps = {
  account: {
    generate_report_status: 'unknown',
    upload_report_status: 'unknown',
    label: 'default_org_name',
  },
};

export default ListItem;

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
foreman_rh_cloud-1.0.17 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.js
foreman_rh_cloud-2.0.17 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.js
foreman_rh_cloud-2.0.16 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.js
foreman_rh_cloud-1.0.16 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.js
foreman_rh_cloud-1.0.15 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.js
foreman_rh_cloud-2.0.15 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.js
foreman_rh_cloud-3.0.14 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.js
foreman_rh_cloud-2.0.14 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.js
foreman_rh_cloud-1.0.14 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.js
foreman_rh_cloud-0.9.14 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.js
foreman_rh_cloud-0.9.13.1 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.js
foreman_rh_cloud-1.0.13.1 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.js
foreman_rh_cloud-2.0.13.1 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.js
foreman_rh_cloud-0.9.13 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.js
foreman_rh_cloud-1.0.13 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.js
foreman_rh_cloud-2.0.13 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.js
foreman_rh_cloud-0.9.12 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.js
foreman_rh_cloud-1.0.12 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.js
foreman_rh_cloud-2.0.12 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.js
foreman_rh_cloud-0.9.11 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.js