Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ export default tseslint.config(
{ allowConstantExport: true },
],
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'no-unused-vars': 'off',
'react/prop-types': 'off',
},
}
Expand Down
56 changes: 56 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-react-refresh": "^0.4.16",
"globals": "^15.14.0",
"terser": "^5.40.0",
"typescript": "~5.6.2",
"typescript-eslint": "^8.18.2",
"vite": "^6.0.5"
Expand Down
16 changes: 16 additions & 0 deletions src/apis/slopeManage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,20 @@ export const slopeManageAPI = {
console.log(' 경사지 이상값 조회', response.data);
return response.data;
},
updateAllImg: async ({ formData, historyNumber }: UpdateAllImg) => {
const response = await api.put(
`/slopes/${historyNumber}/images`,
formData,
{
headers: {
'Content-Type': 'multipart/form-data',
},
}
);
return response.data;
},
};
export interface UpdateAllImg {
formData: FormData;
historyNumber: string;
}
19 changes: 11 additions & 8 deletions src/apis/slopeMap.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import { api } from './api';

interface SlopeImg {
// 이미지
url: string; // url
createdAt: Date; // 이미지 생성날짜
}
export interface Slope {
managementNo: string;
name: string;
Expand Down Expand Up @@ -74,13 +78,12 @@ export interface Slope {
maxVerticalHeight: string; // 최고수직고 (단위: m)
longitudinalLength: string; // 종단길이 (단위: m)
averageSlope: string; // 평균경사 (단위: 도)
images: [
{
// 이미지
url: string; // url
createdAt: Date; // 이미지 생성날짜
}
];
images: {
position?: SlopeImg;
start?: SlopeImg;
overview?: SlopeImg;
end?: SlopeImg;
};
Score: string; //점수
grade: string; // 등급
};
Expand Down
12 changes: 6 additions & 6 deletions src/pages/ManagePage/StepSlope/components/AddSlopeContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,12 @@ const createDefaultSlope = (): Slope => {
maxVerticalHeight: '',
longitudinalLength: '',
averageSlope: '',
images: [
{
url: '',
createdAt: today,
},
],
images: {
position: { url: '', createdAt: today },
start: { url: '', createdAt: today },
overview: { url: '', createdAt: today },
end: { url: '', createdAt: today },
},
Score: '',
grade: '',
},
Expand Down
Loading
Loading