Remove admin FS panel, merge with item panel
This commit is contained in:
@@ -83,7 +83,7 @@ public class StatisticsServiceImpl implements StatisticsService {
|
||||
int percent = (int) Math.floor(((1.0d * article.getStock() / article.getStockExpected()) * 100) / 10) * 10;
|
||||
log.info("Stock percent: {} {}", article.getUuid(), percent);
|
||||
for (ArticleCategory value : ArticleCategory.values()) {
|
||||
if (article.getCategory().equalsIgnoreCase(value.loc)) {
|
||||
if (!article.getCategory().equals(value.loc) && article.getCategory().equalsIgnoreCase(value.loc)) {
|
||||
log.info("Fixing Article Category {} to {}", article.getCategory(), value.loc);
|
||||
article.setCategory(value.loc);
|
||||
articleService.update(article);
|
||||
|
||||
@@ -140,5 +140,6 @@
|
||||
"IN_PROGRESS": "In Versand",
|
||||
"ISSUES": "Probleme",
|
||||
"DELIVERED": "Zugesendet",
|
||||
"CANCELLED": "Storniert"
|
||||
"CANCELLED": "Storniert",
|
||||
"fsImage": "FS-Bild"
|
||||
}
|
||||
@@ -140,5 +140,6 @@
|
||||
"IN_PROGRESS": "In Progress",
|
||||
"ISSUES": "Issues",
|
||||
"DELIVERED": "Delivered",
|
||||
"CANCELLED": "Cancelled"
|
||||
"CANCELLED": "Cancelled",
|
||||
"fsImage": "FS-Image"
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
import { Typography } from "@mui/material";
|
||||
|
||||
export default function FSModelInfo() {
|
||||
return (
|
||||
<Typography>Under Construction</Typography>
|
||||
);
|
||||
}
|
||||
@@ -19,6 +19,11 @@ export default function ItemsInfo() {
|
||||
//TODO: implement
|
||||
console.log("IconEdit", item);
|
||||
}
|
||||
function handleFarmStationEdit(item: Item) {
|
||||
//TODO: implement
|
||||
console.log("FsEdit", item);
|
||||
}
|
||||
|
||||
|
||||
const [rows, setRows] = useState<Item[]>([]);
|
||||
const [selectedRows, setSelectedRows] = useState<Set<GridRowId>>(new Set());
|
||||
@@ -131,6 +136,13 @@ export default function ItemsInfo() {
|
||||
width: 90,
|
||||
editable: false,
|
||||
renderCell: params => <IconButton onClick={() => handleIconEdit(params.row)}> <EditIcon/> </IconButton>,
|
||||
},
|
||||
{
|
||||
field: 'farmImage',
|
||||
headerName: t('fsImage'),
|
||||
width: 90,
|
||||
editable: false,
|
||||
renderCell: params => <IconButton onClick={() => handleFarmStationEdit(params.row)}> <EditIcon/> </IconButton>,
|
||||
}
|
||||
];
|
||||
|
||||
@@ -163,6 +175,18 @@ export default function ItemsInfo() {
|
||||
>
|
||||
{t('deleteProduct')}
|
||||
</Button>
|
||||
<Button
|
||||
variant="contained"
|
||||
color="primary"
|
||||
startIcon={<DeleteIcon/>}
|
||||
onClick={handleDeleteSelected}
|
||||
disabled={selectedRows.size === 0}
|
||||
sx={{
|
||||
marginRight: 1
|
||||
}}
|
||||
>
|
||||
{t('addProduct')}
|
||||
</Button>
|
||||
</Toolbar>
|
||||
)}}
|
||||
showToolbar
|
||||
|
||||
@@ -16,7 +16,6 @@ import {
|
||||
import { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import AccountsInfo from "../helper/adminpanel/AccountsInfo";
|
||||
import FSModelInfo from "../helper/adminpanel/FSModelInfo";
|
||||
import ItemInfo from "../helper/adminpanel/ItemsInfo";
|
||||
import OrdersInfo from "../helper/adminpanel/OrdersInfo";
|
||||
import StatisticsInfo from "../helper/adminpanel/StatisticsInfo";
|
||||
@@ -40,8 +39,6 @@ export default function AdminPanel() {
|
||||
return <AccountsInfo />;
|
||||
case "items":
|
||||
return <ItemInfo />;
|
||||
case "fsmodel":
|
||||
return <FSModelInfo />;
|
||||
default:
|
||||
return <StatisticsInfo />;
|
||||
}
|
||||
@@ -52,7 +49,6 @@ export default function AdminPanel() {
|
||||
{ key: "orders", icon: <ReceiptLong />, label: t("orders") },
|
||||
{ key: "accounts", icon: <AccountCircle />, label: t("accounts") },
|
||||
{ key: "items", icon: <Category />, label: t("items") },
|
||||
{ key: "fsmodel", icon: <Category />, label: t("fsmodel") },
|
||||
];
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user