-
Notifications
You must be signed in to change notification settings - Fork 0
[Feature] 홈 및 일정 페이지 일정 목록 조회 #113
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
11 commits
Select commit
Hold shift + click to select a range
22f4585
💄 [style] 일정 리스트 아이템 태그 타입 수정 및 스타일 조정
yummjin 7f64263
♻️ [refactor] 필터 버튼 키 값 수정
yummjin 61f40e8
✨ [feat] 멤버 일정 조회 API 추가
yummjin af79242
✨ [feat] 일정 추가 버튼 및 홈 페이지 일정 리스트 기능 추가
yummjin 778c2bc
✨ [feat] 일정 로딩 시 스켈레톤 UI 추가
yummjin 0835e12
✨ [feat] 캘린더에 일정 표시 기능 구현
yummjin 9c322d3
🐛 [fix] 캘린더에서 이웃 달 날짜 숨김 처리 개선 및 일정 데이터 선택적 사용
yummjin 5ce4d45
✨ [feat] 일정 리스트 필터링 기능 추가 (선택된 날짜 이전의 스케줄은 보이지 않도록)
yummjin f10a784
🐛 [fix] 일정 페이지 캘린더 컴포넌트 props 변경에 따라 사용 정리
yummjin a4acaab
♻️ [refactor] 일정 API 엔드포인트 상수 이름 변경
yummjin 1b92bd0
♻️ [refactor] 날짜 포맷팅 함수 추가 및 일정 페이지에서 사용
yummjin 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
11 changes: 11 additions & 0 deletions
11
apps/web/src/entities/schedule/api/getMemberScheduleList.ts
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,11 @@ | ||
| import { auth } from '@/shared/api/apiClient'; | ||
| import type { ApiResponse } from '@/shared/api/baseTypes'; | ||
| import { END_POINT } from '@/shared/constants/endpoint'; | ||
|
|
||
| import type { CrewScheduleListResponse } from '../model/schedule.model'; | ||
|
|
||
| export const getMemberScheduleList = () => { | ||
| return auth.get<ApiResponse<CrewScheduleListResponse[]>>( | ||
| END_POINT.SCHEDULE.JOINED_LIST | ||
| ); | ||
| }; |
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 |
|---|---|---|
| @@ -1,5 +1,11 @@ | ||
| import type { CrewScheduleListResponse } from './schedule.model'; | ||
| import type { | ||
| CrewScheduleCalendarResponse, | ||
| CrewScheduleListResponse, | ||
| } from './schedule.model'; | ||
|
|
||
| export type ScheduleListItem = CrewScheduleListResponse; | ||
| export type ScheduleList = ScheduleListItem[]; | ||
| export type RunType = ScheduleListItem['runType']; | ||
|
|
||
| export type ScheduleCalendarItem = CrewScheduleCalendarResponse; | ||
| export type ScheduleCalendarList = ScheduleCalendarItem[]; |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,23 +1,47 @@ | ||
| import { queryOptions } from '@tanstack/react-query'; | ||
|
|
||
| import { getMemberScheduleList } from '@/entities/schedule/api/getMemberScheduleList'; | ||
| import { getScheduleCalendar } from '@/entities/schedule/api/getScheduleCalendar'; | ||
| import { getScheduleList } from '@/entities/schedule/api/getScheduleList'; | ||
| import type { CrewScheduleListRequest } from '@/entities/schedule/model/schedule.model'; | ||
| import type { | ||
| CrewScheduleCalendarRequest, | ||
| CrewScheduleListRequest, | ||
| } from '@/entities/schedule/model/schedule.model'; | ||
|
|
||
| export const scheduleQueries = { | ||
| all: ['schedule'] as const, | ||
| listKey: (crewId: number, request?: CrewScheduleListRequest) => | ||
| [...scheduleQueries.all, 'getScheduleList', crewId, request] as const, | ||
| memberListKey: () => | ||
| [...scheduleQueries.all, 'getMemberScheduleList'] as const, | ||
| getScheduleListQuery: (crewId: number, request?: CrewScheduleListRequest) => | ||
| queryOptions({ | ||
| queryKey: [...scheduleQueries.all, 'getScheduleList', crewId, request], | ||
| queryKey: scheduleQueries.listKey(crewId, request), | ||
| queryFn: async () => { | ||
| const res = await getScheduleList(crewId, request); | ||
| if (!res.ok) return []; | ||
| return res.data.result ?? []; | ||
| }, | ||
| }), | ||
| getScheduleCalendarQuery: (crewId: number) => | ||
| getMemberScheduleListQuery: () => | ||
| queryOptions({ | ||
| queryKey: scheduleQueries.memberListKey(), | ||
| queryFn: async () => { | ||
| const res = await getMemberScheduleList(); | ||
| if (!res.ok) return []; | ||
| return res.data.result ?? []; | ||
| }, | ||
| }), | ||
| getScheduleCalendarQuery: ( | ||
| crewId: number, | ||
| request?: CrewScheduleCalendarRequest | ||
| ) => | ||
| queryOptions({ | ||
| queryKey: [...scheduleQueries.all, 'getScheduleCalendar', crewId], | ||
yummjin marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| queryFn: () => getScheduleCalendar(crewId), | ||
| queryFn: async () => { | ||
| const res = await getScheduleCalendar(crewId, request); | ||
| if (!res.ok) return []; | ||
| return res.data.result ?? []; | ||
| }, | ||
| }), | ||
| }; | ||
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.
Uh oh!
There was an error while loading. Please reload this page.