하석형 하석형 2023-02-23
230223 하석형 fetch get 오류 해결 중
@f4aa34f03923064abebbfe7cc7b69a481686a6f0
client/views/pages/equipment/EquipmentManagementSelect.jsx
--- client/views/pages/equipment/EquipmentManagementSelect.jsx
+++ client/views/pages/equipment/EquipmentManagementSelect.jsx
@@ -36,6 +36,56 @@
 
 	const navigate = useNavigate();
 
+	// 시스템 코드 - 장비 대여 상태 조회
+	const equipmentRentalStatesSelect = () => {
+		// console.log('equipmentRentalStatesSelect Function Run');
+		// axios.get('/common/systemCode/equipmentRentalStatesSelect.json')
+		// .then(function (response) {
+		// 	console.log('equipmentRentalStatesSelect : ', response.data);
+		// }).catch(function (error) {
+		// 	console.log("equipmentRentalStatesSelect - error : ", error);
+		// });
+
+		// fetch('/common/systemCode/equipmentRentalStatesSelect.json', {
+		// 	method: "GET",
+		// })
+		// .then((response) => response.json())
+		// .then((data) => {
+		// 	console.log('equipmentRentalStatesSelect response : ', data);
+		// }).catch((error) => {
+		// 	console.log('equipmentRentalStatesSelect error : ', error);
+		// });
+
+		// fetch('/common/systemCode/equipmentRentalStatesSelect.json', {
+		// 	// headers: {
+		// 	//   Accept: "application / json",
+		// 	// },
+		// 	method: "GET",
+		//   })
+		// .then((response) => response.json())
+		// .then((data) => console.log(data));
+
+		// fetch('https://dummyjson.com/products/1')
+		// .then(res => res.json())
+		// .then(json => console.log(json))
+	}
+
+	// fetch("https://jsonplaceholder.typicode.com/posts/1")
+	// .then((response) => response.json())
+	// .then((data) => console.log(data))
+
+	// fetch("https://jsonplaceholder.typicode.com/posts/1", {
+	// 	method : "POST",
+	// 	headers : {"Content-Type": "application/json",},
+	// 	body: JSON.stringify({
+	// 		title: "Test",
+	// 		body: "I am testing!",
+	// 		userId: 1,
+	// 	}),
+	// })
+	// .then((response) => response.json())
+	// .then((json) => console.log(json))
+
 	// 대상자 목록 조회
 	const seniorSelectList = () => {
 		console.log('seniorSelectList Function Run');
@@ -542,6 +592,7 @@
 
 	// 마운트 시 실행 함수
 	React.useEffect(() => {
+		equipmentRentalStatesSelect();
 		seniorSelectList();
 		workerSelectList();
 
Add a comment
List