Add FS user page images, fix small shit
@@ -106,7 +106,7 @@ public class AccountController {
|
|||||||
if(!accountService.deleteIfExists(accountId)) {
|
if(!accountService.deleteIfExists(accountId)) {
|
||||||
return ResponseEntity.badRequest().build();
|
return ResponseEntity.badRequest().build();
|
||||||
}
|
}
|
||||||
return ResponseEntity.ok();
|
return ResponseEntity.ok(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping(path = ACCOUNT_BASE, method = RequestMethod.GET, produces = "application/json")
|
@RequestMapping(path = ACCOUNT_BASE, method = RequestMethod.GET, produces = "application/json")
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ public class FarmImageController {
|
|||||||
return ResponseEntity.ok().build();
|
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) {
|
public ResponseEntity<List<ArticleWithFarmImageModel>> getFSArticles(HttpServletRequest request) {
|
||||||
logRequest(request);
|
logRequest(request);
|
||||||
return ResponseEntity.ok(farmImageService.getArticles());
|
return ResponseEntity.ok(farmImageService.getArticles());
|
||||||
|
|||||||
BIN
01-frontend/src/assets/fscomponents/out_0.webp
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
01-frontend/src/assets/fscomponents/out_1_light.webp
Normal file
|
After Width: | Height: | Size: 39 KiB |
BIN
01-frontend/src/assets/fscomponents/out_2_pipe.webp
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
01-frontend/src/assets/fscomponents/out_3_sensor.webp
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
01-frontend/src/assets/fscomponents/out_4_pump.webp
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
01-frontend/src/assets/fscomponents/out_5_server.webp
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
01-frontend/src/assets/fscomponents/out_6_rack.webp
Normal file
|
After Width: | Height: | Size: 40 KiB |
BIN
01-frontend/src/assets/fscomponents/out_7_connector.webp
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
01-frontend/src/assets/fscomponents/out_8_clips.webp
Normal file
|
After Width: | Height: | Size: 39 KiB |
BIN
01-frontend/src/assets/fscomponents/out_9_arduino.webp
Normal file
|
After Width: | Height: | Size: 38 KiB |
@@ -3,6 +3,7 @@
|
|||||||
import AccountType, { AdminAccountOperation, CustomerType, SubmitLogin, User } from "../../components/Account";
|
import AccountType, { AdminAccountOperation, CustomerType, SubmitLogin, User } from "../../components/Account";
|
||||||
import OrderType, { OrderPatch } from "../../components/Order";
|
import OrderType, { OrderPatch } from "../../components/Order";
|
||||||
import RatingSubmitType from "../../components/RatingSubmit";
|
import RatingSubmitType from "../../components/RatingSubmit";
|
||||||
|
import { ItemWithFSImage } from "../../components/Item";
|
||||||
|
|
||||||
export const fetchItemList = async () => {
|
export const fetchItemList = async () => {
|
||||||
const response = await fetch('http://localhost:8085/article/all');
|
const response = await fetch('http://localhost:8085/article/all');
|
||||||
@@ -265,3 +266,10 @@ export const updateCustomer = async (customer: CustomerType) => {
|
|||||||
}
|
}
|
||||||
return await response.json();
|
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();
|
||||||
|
}
|
||||||
|
|||||||
@@ -8,13 +8,7 @@ import AddShoppingCartIcon from '@mui/icons-material/AddShoppingCart';
|
|||||||
|
|
||||||
import farmingStation from '../assets/fscomponents/fs_components_0.png';
|
import farmingStation from '../assets/fscomponents/fs_components_0.png';
|
||||||
import { ItemWithFSImage } from "../components/Item"; "../components/Item";
|
import { ItemWithFSImage } from "../components/Item"; "../components/Item";
|
||||||
|
import { fetchFarmingStationItemList } from "../helper/query/Queries";
|
||||||
// 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();
|
|
||||||
}
|
|
||||||
|
|
||||||
export default function FSComponents() {
|
export default function FSComponents() {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|||||||