Add FS user page images, fix small shit

This commit is contained in:
Tim
2025-06-18 14:48:49 +02:00
parent 8522aab583
commit fb0ea31d01
14 changed files with 11 additions and 9 deletions

View File

@@ -106,7 +106,7 @@ public class AccountController {
if(!accountService.deleteIfExists(accountId)) {
return ResponseEntity.badRequest().build();
}
return ResponseEntity.ok();
return ResponseEntity.ok(true);
}
@RequestMapping(path = ACCOUNT_BASE, method = RequestMethod.GET, produces = "application/json")

View File

@@ -97,7 +97,7 @@ public class FarmImageController {
return ResponseEntity.ok().build();
}
@RequestMapping(path = FARM_IMAGE_ARTICLES, method = RequestMethod.DELETE, produces = "application/json")
@RequestMapping(path = FARM_IMAGE_ARTICLES, method = RequestMethod.GET, produces = "application/json")
public ResponseEntity<List<ArticleWithFarmImageModel>> getFSArticles(HttpServletRequest request) {
logRequest(request);
return ResponseEntity.ok(farmImageService.getArticles());

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

View File

@@ -3,6 +3,7 @@
import AccountType, { AdminAccountOperation, CustomerType, SubmitLogin, User } from "../../components/Account";
import OrderType, { OrderPatch } from "../../components/Order";
import RatingSubmitType from "../../components/RatingSubmit";
import { ItemWithFSImage } from "../../components/Item";
export const fetchItemList = async () => {
const response = await fetch('http://localhost:8085/article/all');
@@ -265,3 +266,10 @@ export const updateCustomer = async (customer: CustomerType) => {
}
return await response.json();
}
export const fetchFarmingStationItemList = async (): Promise<ItemWithFSImage[]> => {
const response = await fetch('http://localhost:8085/farm/articles');
if (!response.ok)
throw new Error('Failed to fetch items');
return response.json();
}

View File

@@ -8,13 +8,7 @@ import AddShoppingCartIcon from '@mui/icons-material/AddShoppingCart';
import farmingStation from '../assets/fscomponents/fs_components_0.png';
import { ItemWithFSImage } from "../components/Item"; "../components/Item";
// API-Funktion, Items laden (URL anpassen!)
async function fetchFarmingStationItemList(): Promise<ItemWithFSImage[]> {
const response = await fetch('/farm/articles');
if (!response.ok) throw new Error('Failed to fetch items');
return response.json();
}
import { fetchFarmingStationItemList } from "../helper/query/Queries";
export default function FSComponents() {
const { t } = useTranslation();