All files / pages AdminDashboardPage.jsx

100% Statements 72/72
100% Branches 1/1
100% Functions 1/1
100% Lines 72/72

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 1231x 1x 1x 1x   1x 4x   4x 4x 4x   4x 4x     4x 4x 4x 4x 4x 4x 4x         4x 4x 4x 4x 4x         4x 4x 4x 4x 4x         4x 4x 4x 4x 4x           4x 4x 4x 4x 4x   4x 4x   4x 4x         4x 4x 4x 4x 4x   4x 4x   4x 4x         4x 4x 4x 4x       4x 4x 4x 4x 4x 4x 4x         4x 4x 4x 4x 4x           4x 4x 4x 4x         4x  
import React from "react";
import { useParams } from "react-router";
import { Container, Row, Col, Card } from "react-bootstrap";
import BasicLayout from "main/layouts/BasicLayout/BasicLayout";
 
export default function AdminDashboardPage() {
  const { id } = useParams();
 
  return (
    <BasicLayout>
      <h1 className="mb-4">Dashboard</h1>
 
      <p>
        <strong>Commons ID:</strong> {id}
      </p>
 
      <h3 className="mt-4">Overview</h3>
      <Row>
        <Col md={3}>
          <Card className="mb-3">
            <Card.Body>
              <Card.Title>Total Farmers</Card.Title>
              <Card.Text>--</Card.Text>
            </Card.Body>
          </Card>
        </Col>
 
        <Col md={3}>
          <Card className="mb-3">
            <Card.Body>
              <Card.Title>Total Cows</Card.Title>
              <Card.Text>--</Card.Text>
            </Card.Body>
          </Card>
        </Col>
 
        <Col md={3}>
          <Card className="mb-3">
            <Card.Body>
              <Card.Title>Commons Balance</Card.Title>
              <Card.Text>--</Card.Text>
            </Card.Body>
          </Card>
        </Col>
 
        <Col md={3}>
          <Card className="mb-3">
            <Card.Body>
              <Card.Title>Days Active</Card.Title>
              <Card.Text>--</Card.Text>
            </Card.Body>
          </Card>
        </Col>
      </Row>
 
      <h3 className="mt-4">Commons Details</h3>
      <Card className="mb-3">
        <Card.Body>
          <p>
            <strong>Name:</strong> --
          </p>
          <p>
            <strong>Status:</strong> --
          </p>
          <p>
            <strong>Start Date:</strong> --
          </p>
        </Card.Body>
      </Card>
 
      <h3 className="mt-4">Participation Metrics</h3>
      <Card className="mb-3">
        <Card.Body>
          <p>
            <strong>Active Farmers:</strong> --
          </p>
          <p>
            <strong>Inactive Farmers:</strong> --
          </p>
          <p>
            <strong>Avg Cows per Farmer:</strong> --
          </p>
        </Card.Body>
      </Card>
 
      <h3 className="mt-4">Farmer Cow Distribution</h3>
      <Card className="mb-3">
        <Card.Body>
          <p>Histogram / distribution of cows per farmer will go here</p>
        </Card.Body>
      </Card>
 
      <h3 className="mt-4">Trends Over Time</h3>
      <Row>
        <Col md={6}>
          <Card className="mb-3">
            <Card.Body>
              <Card.Title>Cows Over Time</Card.Title>
              <p>Chart placeholder (x-axis: days since commons start)</p>
            </Card.Body>
          </Card>
        </Col>
 
        <Col md={6}>
          <Card className="mb-3">
            <Card.Body>
              <Card.Title>Farmers Over Time</Card.Title>
              <p>Chart placeholder (x-axis: days since commons start)</p>
            </Card.Body>
          </Card>
        </Col>
      </Row>
 
      <h3 className="mt-4">Additional Insights</h3>
      <Card className="mb-3">
        <Card.Body>
          <p>Future analytics and breakdowns will be added here.</p>
        </Card.Body>
      </Card>
    </BasicLayout>
  );
}