-
Notifications
You must be signed in to change notification settings - Fork 1
[FEAT] 강사 새 외주 작성 및 마이페이지 API 연동 #50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
74ce7a3
#47 [FEAT] 강사 마이페이지 통계 조회 API 연동
waldls c7e9346
#47 [FEAT] 강사 마이페이지 데이터 없을 때 텍스트 처리
waldls 61f3283
#47 [FEAT] 강사 외주 내역 조회 API 연동
waldls fd43345
#47 [DEL] 불필요한 목데이터 제거
waldls babd6c5
#47 [MOD] 라이팅 폼 다음 버튼 활성화 조건 보완
waldls 73edc6c
#47 [FEAT] 파일 업로드 URL 발급 API 연동
waldls 03251ae
#47 [FEAT] 새 외주 생성 API 연동
waldls eac1515
#47 [FEAT] 입금 통보 API 연동
waldls d02ce41
#47 [MOD] 1차 시안 수령일 최소 선택 가능일 오늘로부터 12일 이후로 변경
waldls 3e653d6
#47 [CHORE] 텍스트 및 placeholder 변경
waldls b66a82a
#47 [FIX] 외주 내역 뱃지 타입 에러 수정 및 미결제 금액 플랜별 표시
waldls c19a0c1
#47 [MOD] 결제 모달 컨셉 표시 시 Chip 있으면 추가 텍스트 숨김처리
waldls 6d1c631
#47 [FIX] 마이페이지 정적 프리렌더링으로 인한 빌드 에러 수정
waldls File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,10 @@ | ||
| import type { MyInfo } from "@/features/instructor/my/api/myTypes"; | ||
| import type { ApiResponse } from "@/shared/api/commonType"; | ||
| import { serverApi } from "@/shared/api/server"; | ||
|
|
||
| // 강사 마이페이지 통계 조회 | ||
| export const getMyInfo = async (): Promise<MyInfo | null> => { | ||
| const response = await serverApi.get("/api/v1/instructors/me").json<ApiResponse<MyInfo>>(); | ||
|
|
||
| return response.result; | ||
| }; |
This file contains hidden or 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,38 @@ | ||
| import type { BadgeVariant } from "@/shared/ui/Badge"; | ||
|
|
||
| export type MyInfoStats = { | ||
| totalCommissionCount: number; | ||
| ongoingCommissionCount: number; | ||
| }; | ||
|
|
||
| export type MyInfo = { | ||
| name: string; | ||
| profileImageUrl: string; | ||
| stats: MyInfoStats; | ||
| }; | ||
|
|
||
| export type CommissionHistoryItem = { | ||
| commissionId: number; | ||
| category: string; | ||
| title: string; | ||
| createdAt: string; | ||
| plan: "BASIC" | "PLUS" | "MAX"; | ||
| paidAmount: number | null; | ||
| status: string; | ||
| }; | ||
|
|
||
| export const PLAN_DISPLAY_MAP: Record<CommissionHistoryItem["plan"], string> = { | ||
| BASIC: "기본", | ||
| PLUS: "플러스", | ||
| MAX: "맥스", | ||
| }; | ||
|
|
||
| export const CATEGORY_BADGE_MAP: Record<string, BadgeVariant> = { | ||
| FLYER_TEXTBOOK_COVER_INNER: "교재", | ||
| }; | ||
|
|
||
| export const PLAN_PAID_AMOUNT_MAP: Record<CommissionHistoryItem["plan"], number> = { | ||
| BASIC: 400000, | ||
| PLUS: 450000, | ||
| MAX: 480000, | ||
| }; |
This file contains hidden or 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 |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| export type { CommissionHistoryItem } from "./model/myMock"; | ||
| export { CATEGORY_BADGE_MAP, commissionHistoryData, PLAN_DISPLAY_MAP } from "./model/myMock"; | ||
| export type { CommissionHistoryItem, MyInfo } from "./api/myTypes"; | ||
| export { CATEGORY_BADGE_MAP, PLAN_DISPLAY_MAP, PLAN_PAID_AMOUNT_MAP } from "./api/myTypes"; | ||
| export { default as CommissionsHeader } from "./ui/CommissionsHeader"; | ||
| export { default as CommissionsHistoryRow } from "./ui/CommissionsHistoryRow"; |
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
MIME 타입 fallback을 이미지로 고정하지 마세요.
File.type이 비어 있는 PDF/문서도image/png으로 presigned URL을 발급·업로드하게 되어 서버 메타데이터나 검증이 실제 파일과 달라질 수 있습니다. 알 수 없는 타입은 일반 바이너리로 처리하는 편이 안전합니다.🐛 제안 수정
export const uploadCommissionFile = async (file: File, target: CommissionFileTarget) => { - const contentType = file.type || "image/png"; + const contentType = file.type || "application/octet-stream"; const { key, presignedUrl } = await postFilePresignedUrl({ target, contentType });📝 Committable suggestion
🤖 Prompt for AI Agents