Fix Tim Mathias Wall coding
This commit is contained in:
@@ -213,7 +213,7 @@ export default function AccountsInfo() {
|
||||
</Toolbar>
|
||||
)}}
|
||||
showToolbar
|
||||
processRowUpdate={(updatedRow, originalRow) => {
|
||||
processRowUpdate={(updatedRow) => {
|
||||
setRows(rows.map(row => row.id === updatedRow.id ? updatedRow : row));
|
||||
//TODO: make REST callback
|
||||
return updatedRow;
|
||||
|
||||
@@ -188,7 +188,7 @@ export default function ItemsInfo() {
|
||||
</Toolbar>
|
||||
)}}
|
||||
showToolbar
|
||||
processRowUpdate={(updatedRow, originalRow) => {
|
||||
processRowUpdate={(updatedRow) => {
|
||||
setRows(rows.map(row => row.id === updatedRow.id ? updatedRow : row));
|
||||
//TODO: make REST callback
|
||||
return updatedRow;
|
||||
|
||||
@@ -61,7 +61,7 @@ const mockOrders: OrderType[] = [
|
||||
}
|
||||
];
|
||||
|
||||
const statusOrder = ["active", "running", "inactive", "cancelled"];
|
||||
const statusOrder = ["CANCELLED", "ISSUES", "DELIVERED", "ORDERED", "IN_PROGRESS"];
|
||||
|
||||
export default function OrdersInfo() {
|
||||
const { t } = useTranslation();
|
||||
|
||||
@@ -1,20 +1,18 @@
|
||||
import { Box, Typography, useTheme } from "@mui/material";
|
||||
import { BarChart } from '@mui/x-charts/BarChart';
|
||||
import { PieChart } from '@mui/x-charts/PieChart';
|
||||
import {
|
||||
Chart as ChartJS,
|
||||
CategoryScale,
|
||||
LinearScale,
|
||||
BarElement,
|
||||
Title,
|
||||
Tooltip,
|
||||
Legend,
|
||||
ArcElement,
|
||||
BarElement,
|
||||
CategoryScale,
|
||||
Chart as ChartJS,
|
||||
Legend,
|
||||
LinearScale,
|
||||
LineElement,
|
||||
PointElement,
|
||||
Title,
|
||||
Tooltip,
|
||||
} from "chart.js";
|
||||
import { Bar, Pie, Line } from "react-chartjs-2";
|
||||
import { BarChart } from '@mui/x-charts/BarChart';
|
||||
import { RadarChart } from '@mui/x-charts/RadarChart';
|
||||
import { PieChart } from '@mui/x-charts/PieChart';
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
// Chart.js registrieren
|
||||
@@ -34,88 +32,6 @@ export default function StatisticsInfo() {
|
||||
const theme = useTheme();
|
||||
const {t} = useTranslation();
|
||||
|
||||
const weeklySalesData = {
|
||||
labels: ["Week 1", "Week 2", "Week 3", "Week 4"],
|
||||
datasets: [
|
||||
{
|
||||
label: "Weekly Sales (€)",
|
||||
data: [1200, 2100, 800, 1600],
|
||||
backgroundColor: theme.palette.mode === "dark"
|
||||
? "rgba(0, 230, 255, 0.5)"
|
||||
: "rgba(75, 192, 192, 0.5)",
|
||||
borderColor: theme.palette.mode === "dark"
|
||||
? "rgba(0, 230, 255, 1)"
|
||||
: "rgba(75, 192, 192, 1)",
|
||||
borderWidth: 1,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
const itemSalesData = {
|
||||
labels: ["Tomatensamen", "Blumenerde", "Gießkanne", "Pflanzendünger"],
|
||||
datasets: [
|
||||
{
|
||||
label: "Item Sales",
|
||||
data: [400, 300, 200, 100],
|
||||
backgroundColor: [
|
||||
theme.palette.warning.main,
|
||||
theme.palette.info.main,
|
||||
theme.palette.success.main,
|
||||
theme.palette.secondary.main,
|
||||
],
|
||||
hoverBackgroundColor: [
|
||||
theme.palette.warning.light,
|
||||
theme.palette.info.light,
|
||||
theme.palette.success.light,
|
||||
theme.palette.secondary.light,
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
const userSalesData = {
|
||||
labels: ["John Doe", "Jane Smith", "Alice Johnson", "Bob Brown"],
|
||||
datasets: [
|
||||
{
|
||||
label: "Sales by User",
|
||||
data: [5, 8, 3, 6],
|
||||
fill: false,
|
||||
borderColor: theme.palette.primary.main,
|
||||
backgroundColor: theme.palette.primary.light,
|
||||
tension: 0.1,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
const baseOptions = {
|
||||
responsive: true,
|
||||
plugins: {
|
||||
legend: {
|
||||
position: "top" as const,
|
||||
labels: {
|
||||
color: theme.palette.text.primary,
|
||||
},
|
||||
},
|
||||
title: {
|
||||
display: false,
|
||||
},
|
||||
},
|
||||
scales: {
|
||||
x: {
|
||||
ticks: { color: theme.palette.text.primary },
|
||||
grid: {
|
||||
color: theme.palette.divider,
|
||||
},
|
||||
},
|
||||
y: {
|
||||
ticks: { color: theme.palette.text.primary },
|
||||
grid: {
|
||||
color: theme.palette.divider,
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
return (
|
||||
<Box sx={{ color: theme.palette.text.primary }}>
|
||||
<Typography variant="h4" align="center" gutterBottom>
|
||||
|
||||
Reference in New Issue
Block a user