import React, { Component } from "react";
import {
Card,
Icon,
Label,
Header,
Grid
} from "semantic-ui-react";
class SystemCard extends Component {
constructor(props) {
super(props);
}
render() {
var freePlanValue = 0;
var proPlanValue = 10;
var location = "";
const system = this.props.system;
var clientCount = "";
var callAvg = "";
var plan = null;
var archive = "";
let label;
var description = system.description;
if (this.props.keepShort && (description.length > 100)) {
description = description.substring(0,96) + "...";
}
if (system.callAvg) {
callAvg = Math.round( system.callAvg * 10) / 10 + " call/min"
}
if (system.clientCount == 1 ) {
clientCount = "1 listener";
} else if (system.clientCount > 1 ) {
clientCount = system.clientCount + " listeners"
}
if (system) {
switch(system.planType) {
case freePlanValue:
plan = "Free";
archive = "7 days";
break;
case proPlanValue:
plan = "Pro";
archive = "30 days";
label = ;
break;
}
switch (system.systemType) {
case "state":
location = system.state;
break;
case "city":
location = system.city + ", " + system.state;
break;
case "county":
location = system.county + ", " + system.state;
break;
case "international":
location = system.country;
break;
default:
location = system.city + ", " + system.state;
}
}
return (
{system.name}
{label}
{system.screenName&&}
{location}
{clientCount&&{clientCount}
}
{/* {archive} */}
{callAvg&&{callAvg}
}
);
}
}
export default SystemCard;