Recommended Cables
+ // }
+ // icons={getTableIcons()}
+ // editable={{
+ // onRowUpdate: (newCable, oldCable) =>
+ // new Promise((resolve, reject) => {
+ // const dataUpdate = [...cableData];
+ // if (oldCable) {
+ // //make sure the cables lengths are in feet
+ // if (getDistanceUnit() === pond.DistanceUnit.DISTANCE_UNIT_METERS) {
+ // newCable.Length = newCable.Length * 3.281;
+ // oldCable.Length = oldCable.Length * 3.281;
+ // }
+ // //if the length was eddited
+ // if (oldCable.Length !== newCable.Length) {
+ // //recalc the number of nodes
+ // newCable.Nodes = Math.ceil(newCable.Length / nodeSpacing);
+ // }
+ // const index = dataUpdate.indexOf(oldCable);
+ // //this line seems ridiculous, however the browser seems to see newCable.Count as a string if it was the one that was edited in the table
+ // newCable.Count = parseInt(newCable.Count.toString());
+ // dataUpdate[index] = newCable;
+ // }
+ // resolve(cablesChanged(dataUpdate));
+ // })
+ // }}
+ // columns={[
+ // {
+ // title: Orbit,
+ // render: (row: Cable) => {row.Orbit === 0 ? "Center" : row.Orbit.toString()}
+ // },
+ // {
+ // title: Type,
+ // render: (row: Cable) => {row.Type === 2 ? "Moisture" : "Temperature"}
+ // },
+ // {
+ // title: (
+ // Number of Cables
+ // ),
+ // field: "Count",
+ // initialEditValue: 0,
+ // type: "numeric"
+ // },
+ // {
+ // title: (
+ //
+ // Length{getDistanceUnit() === pond.DistanceUnit.DISTANCE_UNIT_FEET ? "(ft)" : "(m)"}
+ //
+ // ),
+ // field: "Length",
+ // initialEditValue: 0,
+ // type: "numeric"
+ // },
+ // {
+ // title: (
+ // Nodes Per Cable
+ // ),
+ // editable: "never",
+ // type: "numeric",
+ // field: "Nodes"
+ // }
+ // ]}
+ // options={{
+ // search: false,
+ // paging: false
+ // }}
+ // />
+ // );
+ // };
+
+ const columns: Column[] = [
+ {
+ title: "Orbit",
+ render: (row: Cable) => {row.Orbit === 0 ? "Center" : row.Orbit.toString()}
+ },
+ {
+ title: "Type",
+ render: (row: Cable) => {row.Type === 2 ? "Moisture" : "Temperature"}
+ },
+ {
+ title: "Number of Cables",
+ render: (row) => {row.Count}
+ },
+ {
+ title: "Length" + (getDistanceUnit() === pond.DistanceUnit.DISTANCE_UNIT_FEET ? "(ft)" : "(m)"),
+ render: (row) => {row.Length}
+ },
+ {
+ title: "Nodes Per Cable",
+ render: (row) => {row.Nodes}
+ }
+ ]
+
+ //TODO: in order to add back in the editable functionality will need to add that to the responsive table
+ return (
+ Recommended Cables}
+ columns={columns}
+ rows={cableData}
+ page={0}
+ pageSize={0}
+ total={0}
+ setPage={()=>{}}
+ handleRowsPerPageChange={()=>{}}
+ hidePagination
+ />
+ );
+}
diff --git a/src/cableEstimator/pdfComponents/cableTable/cableTableHeader.tsx b/src/cableEstimator/pdfComponents/cableTable/cableTableHeader.tsx
new file mode 100644
index 0000000..79f95ad
--- /dev/null
+++ b/src/cableEstimator/pdfComponents/cableTable/cableTableHeader.tsx
@@ -0,0 +1,43 @@
+import { StyleSheet, Text, View } from "@react-pdf/renderer";
+import { pond } from "protobuf-ts/pond";
+import { getDistanceUnit } from "utils";
+
+interface Props {
+ borderColour: string;
+}
+
+export default function CableTableHeader(props: Props) {
+ const borderColor = props.borderColour;
+ const styles = StyleSheet.create({
+ view: {
+ flexDirection: "row",
+ borderBottomColor: borderColor,
+ borderBottomWidth: 1,
+ alignItems: "center",
+ height: 24,
+ textAlign: "center",
+ fontFamily: "Helvetica-Bold",
+ flexGrow: 1
+ },
+ cell: {
+ width: "20%",
+ borderRightColor: borderColor,
+ borderRightWidth: 1
+ },
+ endCell: {
+ width: "20%"
+ }
+ });
+
+ return (
+
+ Orbit
+ Type
+ Qty
+
+ Length {getDistanceUnit() === pond.DistanceUnit.DISTANCE_UNIT_FEET ? "(ft)" : "(m)"}
+
+ Nodes
+
+ );
+}
\ No newline at end of file
diff --git a/src/cableEstimator/pdfComponents/cableTable/cableTableRow.tsx b/src/cableEstimator/pdfComponents/cableTable/cableTableRow.tsx
new file mode 100644
index 0000000..8e80d6a
--- /dev/null
+++ b/src/cableEstimator/pdfComponents/cableTable/cableTableRow.tsx
@@ -0,0 +1,60 @@
+import { StyleSheet, Text, View } from "@react-pdf/renderer";
+import { jsonBin } from "common/DataImports/BinCables/BinCableImporter";
+import React from "react";
+import { distanceConversion } from "utils";
+
+interface Props {
+ bin: jsonBin;
+ borderColour: string;
+}
+
+export default function CableTableRow(props: Props) {
+ const styles = StyleSheet.create({
+ view: {
+ flexDirection: "row",
+ borderBottomColor: props.borderColour,
+ borderBottomWidth: 1,
+ alignItems: "center",
+ height: 24,
+ fontStyle: "normal",
+ fontWeight: 650
+ },
+ cell: {
+ width: "20%",
+ textAlign: "left",
+ borderRightColor: props.borderColour,
+ borderRightWidth: 1,
+ paddingLeft: 8
+ },
+ endCell: {
+ width: "20%",
+ paddingLeft: 8
+ }
+ });
+
+ const rows = () => {
+ let r: JSX.Element[] = [];
+ props.bin.Cables.forEach((cable, i) => {
+ r.push(
+
+ {cable.Orbit === 0 ? "Center" : cable.Orbit}
+ {cable.Type === 2 ? "Moisture" : "Temperature"}
+ {cable.Count}
+ {distanceConversion(cable.Length).toFixed(2)}
+ {cable.Nodes}
+
+ );
+ });
+ return r;
+ };
+
+ return {rows()};
+}
\ No newline at end of file
diff --git a/src/cableEstimator/pdfComponents/mountingTable/mountingTableHeader.tsx b/src/cableEstimator/pdfComponents/mountingTable/mountingTableHeader.tsx
new file mode 100644
index 0000000..a7708dd
--- /dev/null
+++ b/src/cableEstimator/pdfComponents/mountingTable/mountingTableHeader.tsx
@@ -0,0 +1,54 @@
+import { StyleSheet, Text, View } from "@react-pdf/renderer";
+import { pond } from "protobuf-ts/pond";
+import { getDistanceUnit } from "utils";
+
+interface Props {
+ borderColour: string;
+}
+
+export default function MountingTableHeader(props: Props) {
+ const borderColor = props.borderColour;
+ const styles = StyleSheet.create({
+ view: {
+ flexDirection: "row",
+ borderBottomColor: borderColor,
+ borderBottomWidth: 1,
+ alignItems: "center",
+ height: 24,
+ textAlign: "center",
+ fontFamily: "Helvetica-Bold",
+ flexGrow: 1
+ },
+ orbit: {
+ width: "14%",
+ borderRightColor: borderColor,
+ borderRightWidth: 1
+ },
+ centerDist: {
+ width: "25%",
+ borderRightColor: borderColor,
+ borderRightWidth: 1
+ },
+ roofDist: {
+ width: "33%",
+ borderRightColor: borderColor,
+ borderRightWidth: 1
+ },
+ bracket: {
+ width: "28%"
+ }
+ });
+
+ return (
+
+ Orbit
+
+ Radius {getDistanceUnit() === pond.DistanceUnit.DISTANCE_UNIT_FEET ? "(ft)" : "(m)"}
+
+
+ Along Roof {getDistanceUnit() === pond.DistanceUnit.DISTANCE_UNIT_FEET ? "(ft)" : "(m)"}
+
+ Bracket
+
+ );
+}
diff --git a/src/cableEstimator/pdfComponents/mountingTable/mountingTableRows.tsx b/src/cableEstimator/pdfComponents/mountingTable/mountingTableRows.tsx
new file mode 100644
index 0000000..b86f1d1
--- /dev/null
+++ b/src/cableEstimator/pdfComponents/mountingTable/mountingTableRows.tsx
@@ -0,0 +1,83 @@
+import { StyleSheet, Text, View } from "@react-pdf/renderer";
+import { getBracket, jsonBin } from "common/DataImports/BinCables/BinCableImporter";
+import React from "react";
+import { distanceConversion } from "utils";
+
+interface Props {
+ bin: jsonBin;
+ borderColour: string;
+}
+
+export default function MountingTableRow(props: Props) {
+ const styles = StyleSheet.create({
+ orbit: {
+ width: "14%",
+ textAlign: "left",
+ borderRightColor: props.borderColour,
+ borderRightWidth: 1,
+ paddingLeft: 8
+ },
+ centerDist: {
+ width: "25%",
+ textAlign: "left",
+ borderRightColor: props.borderColour,
+ borderRightWidth: 1,
+ paddingLeft: 8
+ },
+ roofDist: {
+ width: "33%",
+ textAlign: "left",
+ paddingLeft: 8,
+ borderRightColor: props.borderColour,
+ borderRightWidth: 1
+ },
+ bracket: {
+ width: "28%",
+ textAlign: "center",
+ fontSize: 8
+ }
+ });
+
+ const roofDist = (distance: number) => {
+ return distance / Math.cos(props.bin.RoofAngle * (Math.PI / 180));
+ };
+
+ const rows = () => {
+ let r: JSX.Element[] = [];
+ props.bin.CableSums.forEach((orbit, i) => {
+ let bracketType = "None"
+ let bracket = getBracket(orbit.Bracket)
+ if(orbit.Orbit !== 0 && bracket !== undefined) {
+ bracketType = bracket.Name + " (" + orbit.NumberOfCables + ")"
+ }else {
+ bracketType = "Unk"
+ }
+
+ r.push(
+
+ {orbit.Orbit === 0 ? "C" : orbit.Orbit}
+
+ {distanceConversion(orbit.DistanceFromCenter).toFixed(2)}
+
+
+ {distanceConversion(roofDist(orbit.DistanceFromCenter)).toFixed(2)}
+
+
+ {bracketType}
+
+
+ );
+ });
+ return r;
+ };
+
+ return {rows()};
+}
\ No newline at end of file
diff --git a/src/cableEstimator/pdfComponents/pdfContent.tsx b/src/cableEstimator/pdfComponents/pdfContent.tsx
new file mode 100644
index 0000000..bce1f15
--- /dev/null
+++ b/src/cableEstimator/pdfComponents/pdfContent.tsx
@@ -0,0 +1,81 @@
+import { StyleSheet, Text, View } from "@react-pdf/renderer";
+import { colors } from "@mui/material";
+import { jsonBin } from "common/DataImports/BinCables/BinCableImporter";
+import CableTableHeader from "./cableTable/cableTableHeader";
+import CableTableRow from "./cableTable/cableTableRow";
+import PDFSideView from "./pdfSVG/pdfSideView";
+import PDFTopView from "./pdfSVG/pdfTopView";
+import MountingTableHeader from "./mountingTable/mountingTableHeader";
+import MountingTableRow from "./mountingTable/mountingTableRows";
+
+interface Props {
+ bin: jsonBin;
+}
+
+export default function PdfContent(props: Props) {
+ const tableBorderColour = colors.grey[800];
+
+ const styles = StyleSheet.create({
+ general: {
+ marginTop: 2,
+ flexDirection: "row",
+ borderTop: "1px solid black",
+ borderBottom: "1px solid black",
+ paddingTop: 12,
+ paddingBottom: 12,
+ fontFamily: "Helvetica-Bold",
+ fontSize: 20,
+ textAlign: "center"
+ },
+ svgLabels: {
+ marginTop: 2,
+ flexDirection: "row",
+ borderTop: "1px solid black",
+ paddingTop: 12,
+ textAlign: "left",
+ fontFamily: "Helvetica-Bold"
+ },
+ cableTable: {
+ borderColor: tableBorderColour,
+ borderWidth: 1
+ }
+ });
+ return (
+
+
+ {props.bin.Manufacturer}
+ {props.bin.Model}
+ {props.bin.Bottom}
+
+
+ Side View
+ Top View
+
+
+
+
+
+
+
+
+
+
+ Install Guide
+
+
+
+
+
+
+
+
+ Recommended Cables
+
+
+
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/src/cableEstimator/pdfComponents/pdfSVG/pdfSideView.tsx b/src/cableEstimator/pdfComponents/pdfSVG/pdfSideView.tsx
new file mode 100644
index 0000000..cad1209
--- /dev/null
+++ b/src/cableEstimator/pdfComponents/pdfSVG/pdfSideView.tsx
@@ -0,0 +1,387 @@
+import { colors } from "@mui/material";
+import { Circle, Line, Path, Svg, Text } from "@react-pdf/renderer";
+import { jsonBin } from "common/DataImports/BinCables/BinCableImporter";
+import { useEffect, useState } from "react";
+import { distanceConversion } from "utils";
+
+interface Props {
+ bin: jsonBin;
+}
+
+interface svgPoint {
+ x: number;
+ y: number;
+}
+
+export default function PDFSideView(props: Props) {
+ const svgViewBoxSize = 500;
+ //percentage to of the svg to be the bin drawing from 0 to 1,
+ //NOTE: this is the percentage based on the longest side
+ //ie. if the bin is taller than it is wide the bin will be x percent of the height of the viewbox and the width will be scaled to the height and vice versa
+ const scaleMultiplier = 0.8;
+ const nodeSpacing = 4; //space in feet between the nodes
+ const dimensionFontSize = 18;
+ const gapSize = svgViewBoxSize * 0.05;
+ const { bin } = props;
+ const [scale, setScale] = useState(0); //the scale to multiply the bin dimension by in order to determine how long to draw the line
+ const [hopperHeight, setHopperHeight] = useState(0);
+ const [roofHeight, setRoofHeight] = useState(0);
+
+ useEffect(() => {
+ //get the peak height of the hopper
+ let h = (bin.Diameter / 2) * Math.tan(bin.HopperAngle * (Math.PI / 180));
+ setHopperHeight(h);
+ setRoofHeight(bin.Peak - bin.Sidewall);
+
+ let heightscale = svgViewBoxSize / (bin.Peak + h);
+ let widthscale = svgViewBoxSize / bin.Diameter;
+
+ //need to use the scale of the longer of the two dimensions
+ setScale((heightscale < widthscale ? heightscale : widthscale) * scaleMultiplier);
+ }, [bin, svgViewBoxSize]);
+
+ const binOutline = () => {
+ let startX = svgViewBoxSize / 2;
+ let startY = 0;
+ //let paddingVal = (padding * svgViewBoxSize)
+
+ return (
+
+ );
+ };
+
+ const cableLines = () => {
+ let cables: JSX.Element[] = [];
+ //let paddingVal = (padding * svgViewBoxSize)
+
+ // line for the roof at the top of the sidewall
+ // cables.push(
+ //
+ // )
+
+ bin.CableSums.forEach(sum => {
+ let cableLength = 0;
+ bin.Cables.forEach(c => {
+ if (sum.Orbit === c.Orbit) {
+ //numNodes = c.Nodes
+ cableLength = c.Length;
+ }
+ });
+ let numNodes = Math.ceil(cableLength / nodeSpacing);
+
+ let xVal = svgViewBoxSize / 2 + sum.DistanceFromCenter * scale;
+ let cableStart = sum.DistanceFromCenter * Math.tan(bin.RoofAngle * (Math.PI / 180)) * scale;
+ //need to offset the padding to the top since we are now below the half mark as well as pad the bottom
+ let cableEnd = cableStart + cableLength * scale;
+
+ cables.push(
+
+ );
+
+ let svgSpacing = (cableEnd - cableStart) / numNodes;
+
+ for (let i = 0; i < numNodes; i++) {
+ let nodeY = cableEnd - svgSpacing * i;
+ cables.push(
+
+ );
+ }
+ });
+ return cables;
+ };
+
+ const dimensionText = (key: string, x: number, y: number, text: string) => {
+ return (
+
+ {text}
+
+ );
+ };
+
+ const dimensionPath = (key: string, start: svgPoint, corner: svgPoint, end: svgPoint) => {
+ return (
+
+ );
+ };
+
+ const bottomDiameter = () => {
+ let d: JSX.Element[] = [];
+
+ let x1 = svgViewBoxSize / 2 - (bin.Diameter / 2) * scale;
+ let x2 = svgViewBoxSize / 2 + (bin.Diameter / 2) * scale;
+
+ let y1 =
+ (roofHeight + bin.Sidewall + hopperHeight) * scale +
+ svgViewBoxSize * (1 - scaleMultiplier) * 0.1;
+ let y2 =
+ (roofHeight + bin.Sidewall + hopperHeight) * scale +
+ svgViewBoxSize * (1 - scaleMultiplier) * 0.25;
+
+ d.push(
+ dimensionText(
+ "bottomText",
+ svgViewBoxSize / 2,
+ y2,
+ distanceConversion(bin.Diameter).toFixed(1)
+ )
+ );
+
+ d.push(
+ dimensionPath(
+ "bottomDiameterLine1",
+ { x: x1, y: y1 },
+ { x: x1, y: y2 },
+ { x: svgViewBoxSize / 2 - gapSize, y: y2 }
+ )
+ );
+ d.push(
+ dimensionPath(
+ "bottomDiameterLine2",
+ { x: svgViewBoxSize / 2 + gapSize, y: y2 },
+ { x: x2, y: y2 },
+ { x: x2, y: y1 }
+ )
+ );
+
+ return d;
+ };
+
+ //height of the sidewall, on the left side - always used
+ const sidwallDimension = () => {
+ let d: JSX.Element[] = [];
+ let centerX = svgViewBoxSize / 2;
+ let x1 = centerX - (bin.Diameter / 2) * scale - svgViewBoxSize * (1 - scaleMultiplier) * 0.1;
+
+ let x2 = x1 - svgViewBoxSize * (1 - scaleMultiplier) * 0.15;
+ let midpoint = (roofHeight + bin.Sidewall / 2) * scale;
+
+ let y1 = roofHeight * scale;
+ let y2 = (roofHeight + bin.Sidewall) * scale;
+
+ d.push(
+ dimensionText("sidewallText", x2, midpoint, distanceConversion(bin.Sidewall).toFixed(1))
+ );
+ d.push(
+ dimensionPath(
+ "sidwallTopLine",
+ { x: x1, y: y1 },
+ { x: x2, y: y1 },
+ { x: x2, y: midpoint - gapSize }
+ )
+ );
+ d.push(
+ dimensionPath(
+ "sidewallbottomLine",
+ { x: x2, y: midpoint + gapSize },
+ { x: x2, y: y2 },
+ { x: x1, y: y2 }
+ )
+ );
+ return d;
+ };
+
+ //height of the bottom of the sidewall to the peak of the bin, on the left side - only used for hopper bins
+ const peakDimension = () => {
+ let d: JSX.Element[] = [];
+ let centerX = svgViewBoxSize / 2;
+ let xWall = centerX - (bin.Diameter / 2) * scale - svgViewBoxSize * (1 - scaleMultiplier) * 0.1;
+ let xPeak = svgViewBoxSize / 2 - svgViewBoxSize * (1 - scaleMultiplier) * 0.1;
+
+ let xText = xWall - svgViewBoxSize * (1 - scaleMultiplier) * 0.5;
+ let midpoint = ((roofHeight + bin.Sidewall) / 2) * scale;
+
+ let yTop = 0;
+ let yBottom = (roofHeight + bin.Sidewall) * scale;
+
+ d.push(
+ dimensionText(
+ "peakText",
+ xText,
+ midpoint,
+ distanceConversion(bin.Sidewall + roofHeight).toFixed(1)
+ )
+ );
+ d.push(
+ dimensionPath(
+ "peakTopLine",
+ { x: xPeak, y: yTop },
+ { x: xText, y: yTop },
+ { x: xText, y: midpoint - gapSize }
+ )
+ );
+ d.push(
+ dimensionPath(
+ "peakbottomLine",
+ { x: xText, y: midpoint + gapSize },
+ { x: xText, y: yBottom },
+ { x: xWall, y: yBottom }
+ )
+ );
+
+ return d;
+ };
+
+ //total height of the bin, on the right side - always used
+ const totalDimension = () => {
+ let d: JSX.Element[] = [];
+ let centerX = svgViewBoxSize / 2;
+ //let paddingVal = (padding* svgViewBoxSize)
+ let binRightX = centerX + (bin.Diameter / 2) * scale;
+
+ let xBinCenter = centerX + svgViewBoxSize * (1 - scaleMultiplier) * 0.1;
+ let xBinWall = binRightX + svgViewBoxSize * (1 - scaleMultiplier) * 0.1;
+ let x2 = binRightX + svgViewBoxSize * (1 - scaleMultiplier) * 0.2;
+ let midpoint = ((roofHeight + bin.Sidewall + hopperHeight) / 2) * scale;
+
+ let y1 = 0;
+ let y2 = (roofHeight + bin.Sidewall + hopperHeight) * scale;
+
+ d.push(
+ dimensionText(
+ "totalText",
+ x2,
+ midpoint,
+ distanceConversion(roofHeight + bin.Sidewall + hopperHeight).toFixed(1)
+ )
+ );
+ d.push(
+ dimensionPath(
+ "peakTopLine",
+ { x: xBinCenter, y: y1 },
+ { x: x2, y: y1 },
+ { x: x2, y: midpoint - gapSize }
+ )
+ );
+ d.push(
+ dimensionPath(
+ "peakbottomLine",
+ { x: x2, y: midpoint + gapSize },
+ { x: x2, y: y2 },
+ { x: hopperHeight > 0 ? xBinCenter : xBinWall, y: y2 }
+ )
+ );
+
+ return d;
+ };
+
+ const binDimensions = () => {
+ let dimensions: JSX.Element[] = [];
+
+ dimensions.push(...bottomDiameter());
+ // sidwall Height
+ dimensions.push(...sidwallDimension());
+ //total bin height
+ dimensions.push(...totalDimension());
+ if (hopperHeight > 0) {
+ //show the height of the peak + sidwall without the hopper
+ dimensions.push(...peakDimension());
+ }
+
+ return dimensions;
+ };
+
+ const grainEstimate = () => {
+ let x = svgViewBoxSize / 2 - (bin.Diameter / 2) * scale;
+ let y =
+ (roofHeight + bin.Sidewall + hopperHeight) * scale +
+ svgViewBoxSize * (1 - scaleMultiplier) * 0.65;
+ return (
+
+ {/* textAnchor="middle"
+ dominantBaseline={"middle"}> */}
+ {"Estimated Capacity: " + bin.Capacity + " Bushels"}
+
+ );
+ };
+
+ return (
+
+ );
+}
\ No newline at end of file
diff --git a/src/cableEstimator/pdfComponents/pdfSVG/pdfTopView.tsx b/src/cableEstimator/pdfComponents/pdfSVG/pdfTopView.tsx
new file mode 100644
index 0000000..213b81b
--- /dev/null
+++ b/src/cableEstimator/pdfComponents/pdfSVG/pdfTopView.tsx
@@ -0,0 +1,74 @@
+import { jsonBin } from "common/DataImports/BinCables/BinCableImporter";
+import { Circle, Svg } from "@react-pdf/renderer";
+import { colors } from "@mui/material";
+
+interface Props {
+ bin: jsonBin;
+}
+
+export default function PDFTopView(props: Props) {
+ const { bin } = props;
+ const totalRadius = 240;
+
+ const outerEdge = () => {
+ return (
+
+ );
+ };
+
+ const orbits = () => {
+ let o: JSX.Element[] = [];
+ bin.CableSums.forEach((sum, i) => {
+ //get the radius of the bin
+ let binRadius = bin.Diameter / 2;
+ //determine the percentage the orbit is from the center
+ let perc = sum.DistanceFromCenter / binRadius;
+ //use the percentage to find the radius for the svg
+ let svgRadius = perc * totalRadius;
+ o.push(
+
+ );
+ //then determine the points the cables will be
+ let angleDist = 360 / sum.NumberOfCables;
+ let currentAngle = 90;
+ for (let k = 0; k < sum.NumberOfCables; k++) {
+ let x = svgRadius * Math.sin(currentAngle * (Math.PI / 180));
+ let y = svgRadius * Math.cos(currentAngle * (Math.PI / 180));
+ o.push(
+
+ );
+ currentAngle += angleDist;
+ }
+ });
+ return o;
+ };
+
+ return (
+
+ );
+}
\ No newline at end of file
diff --git a/src/common/ResponsiveTable.tsx b/src/common/ResponsiveTable.tsx
index 0e2d7fa..7280a4d 100644
--- a/src/common/ResponsiveTable.tsx
+++ b/src/common/ResponsiveTable.tsx
@@ -93,6 +93,7 @@ interface Props {
selectedRows?: number[]; //which rows are selected will need to be controlled by the parent in order to keep track between page changes
customElement?: JSX.Element //element that will be placed in the table head between the table actions and the column header rows
mobileView?: boolean //can be used to force the table to use its mobile view for narrow containing elements ie, drawer
+ hidePagination?: boolean //when passed in will hide the pagination at the bottom of the table
}
export default function ResponsiveTable(props: Props) {
@@ -120,7 +121,8 @@ export default function ResponsiveTable(props: Props) {
rowSelect,
selectedRows,
customElement,
- mobileView
+ mobileView,
+ hidePagination
} = props
const classes = useStyles();
const columns = typeof(props.columns) === "function" ? props.columns() : props.columns
@@ -463,7 +465,7 @@ export default function ResponsiveTable(props: Props) {
{event.stopPropagation()}}
- onChange={(e, checked) => {
+ onChange={(_, checked) => {
rowSelect(row, index, checked)
}}/>
@@ -529,15 +531,17 @@ export default function ResponsiveTable(props: Props) {
}
- handlePageChange(page)}
- onRowsPerPageChange={handleRowsPerPageChange}
- />
+ {!hidePagination &&
+ handlePageChange(page)}
+ onRowsPerPageChange={handleRowsPerPageChange}
+ />
+ }