Sha256: b980cd5bb88468ea1b1f03a70eea7b373b4bb20570ddde477b5800dfcd01febe

Contents?: true

Size: 1.04 KB

Versions: 21

Compression:

Stored size: 1.04 KB

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, initExpanded }) => (
  <ListView.Item
    leftContent={<ListView.Icon name="user" />}
    heading={account.label}
    additionalInfo={[
      <ListItemStatus key={`${accountID}_status`} account={account} />,
    ]}
    stacked
    hideCloseIcon
    initExpanded={initExpanded}
  >
    <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,
  }),
  initExpanded: PropTypes.bool,
};

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

export default ListItem;

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
foreman_rh_cloud-0.9.6 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.js
foreman_rh_cloud-1.0.6 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.js
foreman_rh_cloud-2.0.6 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.js
foreman_rh_cloud-0.9.5 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.js
foreman_rh_cloud-1.0.5 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.js
foreman_rh_cloud-2.0.5 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.js
foreman_rh_cloud-0.9.4.1 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.js
foreman_rh_cloud-1.0.4.1 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.js
foreman_rh_cloud-1.0.4 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.js
foreman_rh_cloud-2.0.4 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.js
foreman_rh_cloud-0.9.4 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.js
foreman_inventory_upload-2.0.4.pre.2 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.js
foreman_inventory_upload-2.0.4.pre.1 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.js
foreman_inventory_upload-2.0.3 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.js
foreman_inventory_upload-1.0.3 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.js
foreman_inventory_upload-0.9.2 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.js
foreman_inventory_upload-1.0.2 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.js
foreman_inventory_upload-0.9.1 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.js
foreman_inventory_upload-1.0.1 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.js
foreman_inventory_upload-0.9.0 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.js