-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* header color 구분 * sideBar Active 상태 useState 적용 및 색상 변경 * [FEAT] 관리자 웹 수정 (#13) * [FEAT] 관리자 사업계획서 리스트 띄우기 * [FIX] 로그인 페이지 UI 수정 * [FEAT] 사업계획서 상세 보기 API 연결 * [FEAT] 사업계획서 상세 보기 버튼 UI * [FEAT] 사업체 detail 버튼 디테일 수정 * [FEAT] alert 달기 * [FEAT] 사용자 목록 제목 수정, 페이지네이션 달기 * [CHORE] 유저 목록 추가 * [CHORE] 사용자 요소 값 수정 * [CHORE] 필요없는 파일 삭제 * [CHORE] 오류 수정 * 대시보드 기초 구조 생성 및 현황 view생성 * [FEAT] 로그인 기능 추가 (#14) * [FEAT] 관리자 사업계획서 리스트 띄우기 * [FIX] 로그인 페이지 UI 수정 * [FEAT] 사업계획서 상세 보기 API 연결 * [FEAT] 사업계획서 상세 보기 버튼 UI * [FEAT] 사업체 detail 버튼 디테일 수정 * [FEAT] alert 달기 * [FEAT] 사용자 목록 제목 수정, 페이지네이션 달기 * [CHORE] 유저 목록 추가 * [CHORE] 사용자 요소 값 수정 * [CHORE] 필요없는 파일 삭제 * [CHORE] 오류 수정 * [FEAT] 로그인 api 연결 * [FEAT] 팝업스토어 순위 적용 및 게시글 목록 기초 생성 * 내 팝업스토어 게시글 목록 생성 * [FEAT] Statistics Chart 적용 * [FEAT]axios baseApi 세팅 * [FEAT] user, admin Base Api 분리 * authApi 실제서버 기반 URL로 변경 * [FEAT] 디테일 변경 (#17) * [FEAT] 로그아웃 추가 * [FEAT] 사업계획서에 따른 팝업 게시글 정보 보기 api 연결 * [FEAT] 마크다운 형식으로 값 저장 (수정필요) * [FEAT] 관리자, 사업체 채팅 목록 보기 * [CHORE] 채팅 url 변경 * [CHORE] dev 머지 * [FEAT]BaseApi class명 수정 및 통계 수정 및 데이터 적용 * [FEAT] 대시보드 통신 구현 * [FEAT] 토스페이 결제 기능 구현 (#19) * [REFACTOR] develop 충돌 해결 * [REFACTOR] 중첩 try-catch 문 제거 * [REFACTOR] 토스페이 위젯 모달창으로 띄우기 * [FEAT] 구매자 정보 조회 API 연동 * [REFACTOR] 광고 분류 선택 시 결제 금액 변경 * [REFACTOR] develop 충돌 해결 * [REFACTOR] 광고 분류에 따라 게시글 리스트 전환 * [REFACTOR] 광고 게시글 체크박스 처리 * [FEAT] 팝업스토어 게시글 이미지 업로드 추가 * [REFACTOR] 사업계획서 제안 및 광고 신청 시 이미지 업로드 기능 구현 (#20) * [REFACTOR] 광고 결제 시 메인 이미지 업로드 기능 구현 * [REFACTOR] 광고 결제 시 게시글 아이디 추출 기능 구현 * [REFACTOR] API 호출 방식 변경 * [REFACTOR] 달력 컴포넌트 type date 로 변경 * [FEAT] 사업계획서 제안 API 연동 * [REFACTOR] 내비바 페이지 연결 및 디자인 일부 수정 (#21) * [REFACTOR] 사용자에 따라 홈 위치 변경 * [REFACTOR] 내비바 페이지 연결 * [REFACTOR] 관리자용 토큰 접근으로 수정 * [REFACTOR] 로그인 시 엔터 이벤트 추가 * [REFACTOR] 내비바 텍스트 및 배경색 변경 * [REFACTOR] 대시보드 텍스트 색상 변경 * [REFACTOR] 팝업스토어 게시글 상세정보 조회 * [FIX] 드롭다운 문제 해결 * [REFACTOR] 드롭다운 항목 선택 시 검색 조건 설정 * [REFACTOR] 조건 검색 버튼 변경 * [FEATURE] 채팅 기능 (#22) * [FEAT] 로그아웃 추가 * [FEAT] 사업계획서에 따른 팝업 게시글 정보 보기 api 연결 * [FEAT] 마크다운 형식으로 값 저장 (수정필요) * [FEAT] 관리자, 사업체 채팅 목록 보기 * [CHORE] 채팅 url 변경 * [CHORE] dev 머지 * [FEAT] 팝업 게시글 글+사진 서버에 저장 * [FEAT] 채팅 구현 * [CHORE] 머지해결 --------- Co-authored-by: LSMJJAng <127660101+LSMJJAng@users.noreply.github.com> Co-authored-by: kyukong <92148749+kyukong@users.noreply.github.com>
- Loading branch information
1 parent
de2625a
commit 40a7b83
Showing
99 changed files
with
5,793 additions
and
783 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import userInstance from "../userBaseApi"; | ||
|
||
/** | ||
* @since 2024.03.01 | ||
* @author 이상민 | ||
*/ | ||
const AuthApi = { | ||
/** | ||
* 로그인 | ||
* | ||
* @since 2024.02.29 | ||
* @author 이상민 | ||
*/ | ||
login: async (email, password) => { | ||
try { | ||
return await userInstance.post('/login', { | ||
email: email, | ||
password: password, | ||
}); | ||
} catch (error) { | ||
console.error('로그인 오류:', error); | ||
throw error; | ||
} | ||
}, | ||
} | ||
|
||
export default AuthApi; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/** | ||
* 토큰 관리 | ||
* | ||
* @since 2024.03.01 | ||
* @author 이상민 | ||
*/ | ||
const GetTokenFromLocalStorage = (role) => { | ||
console.log(role) | ||
|
||
try { | ||
const tokenKey = role === 'admin' ? 'adminToken' : 'userToken'; | ||
const token = localStorage.getItem(tokenKey); | ||
console.log(tokenKey) | ||
|
||
if (token) { | ||
return token; | ||
} else { | ||
console.error('토큰이 없습니다.'); | ||
return null; | ||
} | ||
} catch (error) { | ||
console.error('로컬 스토리지에서 토큰을 가져오는 중 오류 발생:', error); | ||
return null; | ||
} | ||
}; | ||
|
||
export default GetTokenFromLocalStorage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import axios from "axios"; | ||
import GetTokenFromLocalStorage from "./Common/token"; | ||
|
||
/** | ||
* adminBaseApi 생성 | ||
* | ||
* @since 2024.03.02 | ||
* @author 이승민 | ||
*/ | ||
|
||
const adminInstance = axios.create({ | ||
baseURL: "http://15.164.236.13:8080/api/v1", | ||
}); | ||
|
||
adminInstance.interceptors.request.use( | ||
(config) => { | ||
const token = GetTokenFromLocalStorage('admin'); | ||
if (token) { | ||
config.headers["Authorization"] = `Bearer ${token}`; | ||
} | ||
return config; | ||
}, | ||
(error) => { | ||
return Promise.reject(error); | ||
} | ||
); | ||
|
||
export default adminInstance; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import axios from "axios"; | ||
|
||
import GetTokenFromLocalStorage from "../Common/token"; | ||
|
||
const Token = GetTokenFromLocalStorage('admin') | ||
if (Token) { | ||
axios.defaults.headers.common['Authorization'] = `Bearer ${Token}` | ||
} | ||
|
||
/** | ||
* @since 2024.03.52 | ||
* @author 이상민 | ||
*/ | ||
const ChatApi = { | ||
/** | ||
* 관리자 채팅방 리스트 조회 | ||
* | ||
* @since 2024.03.02 | ||
* @author 이상민 | ||
*/ | ||
getChatRooms: async (pageNo = 0, amount = 10) => { | ||
return await axios.get(`/api/v1/chat/rooms/admin?pageNo=${pageNo}&amount=${amount}`); | ||
}, | ||
} | ||
|
||
export default ChatApi; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import adminInstance from "../../adminBaseApi"; | ||
|
||
/** | ||
* @since 2024.03.01 | ||
* @author 이상민 | ||
*/ | ||
const AdminPlanApi = { | ||
/** | ||
* 나의 사업계획서 조회 | ||
* | ||
* @since 2024.02.29 | ||
* @author 이상민 | ||
*/ | ||
getPlan: async (planId = 0) => { | ||
return await adminInstance.get(`/plans/${planId}`) | ||
}, | ||
|
||
/** | ||
* 사업계획서 대기 기능 구현 | ||
* | ||
* @since 2024.02.29 | ||
* @param {number} planId - 대기 기능을 적용할 사업계획서의 ID | ||
* @returns {Promise} Axios Promise | ||
* @throws {Error} AxiosError | ||
* @author 이상민 | ||
*/ | ||
postWait: async (planId = 0) => { | ||
try { | ||
return await adminInstance.post(`/plans/${planId}/wait`, null, { | ||
params: {planId} // 이 부분을 확인하여 서버에서 요구하는 형식에 맞춰 수정 | ||
}); | ||
} catch (error) { | ||
throw error; | ||
} | ||
}, | ||
|
||
/** | ||
* 사업계획서 승인 기능 구현 | ||
* | ||
* @since 2024.02.29 | ||
* @author 이상민 | ||
*/ | ||
postApprove: async (planId = 0) => { | ||
return await adminInstance.post(`/plans/${planId}/approve`) | ||
}, | ||
|
||
/** | ||
* 사업계획서 거절 기능 구현 | ||
* | ||
* @since 2024.02.29 | ||
* @author 이상민 | ||
*/ | ||
postDeny: async (planId = 0) => { | ||
return await adminInstance.post(`/plans/${planId}/deny`) | ||
}, | ||
} | ||
|
||
export default AdminPlanApi; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import axios from "axios"; | ||
import GetTokenFromLocalStorage from "../../Common/token"; | ||
import adminInstance from "../../adminBaseApi"; | ||
|
||
const Token = GetTokenFromLocalStorage('admin') | ||
if (Token) { | ||
axios.defaults.headers.common['Authorization'] = `Bearer ${Token}` | ||
} | ||
|
||
/** | ||
* @since 2024.03.01 | ||
* @author 이상민 | ||
*/ | ||
const AdminCategoryApi = { | ||
/** | ||
* 관리자사업계획서 리스트 조회 | ||
* | ||
* @since 2024.02.28 | ||
* @author 이상민 | ||
*/ | ||
getAllPlan: async (category = "", entranceStatus = "", pageNo = 0, amount = 10) => { | ||
return await adminInstance.get(`/plans?category=${category}&entranceStatus=${entranceStatus}&pageNo=${pageNo}&amount=${amount}`); | ||
}, | ||
}; | ||
|
||
export default AdminCategoryApi; |
Oops, something went wrong.