{"size": 1203, "ext": "js", "max_stars_repo_path": "monitoring_hub/apps/market_spread_reports_ui/web/static/js/market-spread-reports/components/reports/RejectedOrderRow.js", "max_stars_repo_name": "awesome-archive/wallaroo", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "monitoring_hub/apps/market_spread_reports_ui/web/static/js/market-spread-reports/components/reports/RejectedOrderRow.js", "max_issues_repo_name": "awesome-archive/wallaroo", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "monitoring_hub/apps/market_spread_reports_ui/web/static/js/market-spread-reports/components/reports/RejectedOrderRow.js", "max_forks_repo_name": "awesome-archive/wallaroo", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 30.075, "max_line_length": 67, "alphanum_fraction": 0.6500415628}
import React from "react"
import { is } from "immutable"
import { numberWithCommas, formatTime } from "../../../util/Format"
import { symbolDescriptions } from "../../../util/Symbols"
import { formatMoney, formatNumber } from "accounting"
import Moment from "moment"

window.Moment1 = Moment;

export default class RejectedOrderRow extends React.Component {
	shouldComponentUpdate(nextProps) {
		const { order } = this.props; 
		return !is(order, nextProps.order);
	}
	render() {
		const { order } = this.props;
		const symbol = order.get("symbol");
		const symbolDescription = symbolDescriptions(symbol);
		const stockPrice = formatMoney(order.get("price"));
		const stockQty = formatNumber(order.get("order_qty"));
		const side = order.get("side");
		const bid = formatMoney(order.get("bid"));
		const offer = formatMoney(order.get("offer"));
		return(
			<tr>
				<td>{order.get("order_id")}</td>
				<td>{order.get("UCID")}</td>
				<td>{formatTime(order.get("timestamp"))}</td>
				<td>{order.get("client_id")}</td>
				<td>{symbol}</td>
				<td>{symbolDescription}</td>
				<td>{stockPrice}</td>
				<td>{stockQty}</td>
				<td>{side}</td>
				<td>{bid}</td>
				<td>{offer}</td>
			</tr>
		)
	}
}