Tim Mathias Wall Fehlerbehebung.

This commit is contained in:
FlorianSpeicher
2025-06-16 11:37:19 +02:00
parent 838498227c
commit d6e7498c1d
5 changed files with 4 additions and 11 deletions

View File

@@ -104,6 +104,7 @@
"actualPrice": "Endpreis in €", "actualPrice": "Endpreis in €",
"stock": "Bestand", "stock": "Bestand",
"price100": "Preis in ct", "price100": "Preis in ct",
"price100€": "Preis in €",
"discount100": "Rabatt in %", "discount100": "Rabatt in %",
"deleteProduct": "Produkt löschen", "deleteProduct": "Produkt löschen",
"description": "Beschreibung", "description": "Beschreibung",

View File

@@ -104,6 +104,7 @@
"actualPrice": "Price in €", "actualPrice": "Price in €",
"stock": "Stock", "stock": "Stock",
"price100": "Price in ct", "price100": "Price in ct",
"price100€": "Price in €",
"discount100": "Discount in %", "discount100": "Discount in %",
"deleteProduct": "Delete Product", "deleteProduct": "Delete Product",
"description": "Description", "description": "Description",

View File

@@ -18,14 +18,6 @@ export default function AccountsInfo() {
console.log("CustomerEdit", account); console.log("CustomerEdit", account);
} }
/*
for testing purposes
for (let i = 0; i < 100; i++) {
_rows.push(_rows[5]);
}
* */
//TODO: get per REST
const [rows, setRows] = useState<AccountType[]>([]); const [rows, setRows] = useState<AccountType[]>([]);
const [selectedRows, setSelectedRows] = useState<Set<GridRowId>>(new Set()); const [selectedRows, setSelectedRows] = useState<Set<GridRowId>>(new Set());
@@ -33,7 +25,7 @@ export default function AccountsInfo() {
const { data } = useQuery({ const { data } = useQuery({
queryKey: ["fetchAccounts", loginData], queryKey: ["fetchAccounts", loginData],
queryFn: () => fetchAccounts(loginData? loginData : {email: "", password: "", session: "", customerId: -1}), queryFn: () => fetchAccounts(loginData? loginData : {email: "", password: "", session: "", customerId: -1, isAdmin: false}),
retry: 3, retry: 3,
retryDelay: 1000, retryDelay: 1000,
}); });
@@ -123,7 +115,6 @@ export default function AccountsInfo() {
showToolbar showToolbar
processRowUpdate={(updatedRow) => { processRowUpdate={(updatedRow) => {
setRows(rows.map(row => row.id === updatedRow.id ? updatedRow : row)); setRows(rows.map(row => row.id === updatedRow.id ? updatedRow : row));
//TODO: make REST callback
return updatedRow; return updatedRow;
}} }}
/> />

View File

@@ -119,7 +119,7 @@ export default function ItemsInfo() {
}, },
{ {
field: 'price100', field: 'price100',
headerName: t('price100'), headerName: t('price100'),
width: 100, width: 100,
editable: true, editable: true,
type: 'number', type: 'number',