-
Notifications
You must be signed in to change notification settings - Fork 1
[hotfix] 버그 및 미완성, 누락된 기능 #14
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 6 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
342e685
feat: 예약 관리 타입 추가
LeeSangHyeok0731 cdc4ba5
feat: 사용자 패널티 삭제 기능 구현
LeeSangHyeok0731 8320e87
feat: 신고 상태 변경 추가
LeeSangHyeok0731 41fd654
feat: 사용자 관리 페이지 필터 기능 추가
LeeSangHyeok0731 11a1584
feat: 사용자 검색시 없는 사용자 ui 대응
LeeSangHyeok0731 0c0c1a9
feat: 문구 수정
LeeSangHyeok0731 22e28cc
feat: 검색되지 않았을때 ui 개선
LeeSangHyeok0731 4d1eded
feat: 상태 즉시 초기화
LeeSangHyeok0731 7ca09a4
fix: 사용하지 않는 구문 제거
LeeSangHyeok0731 7e1d858
refactor: useEffect 의존성 분리
LeeSangHyeok0731 88f413a
feat: 기기 관리페이지에서 기기마다 정보를 가져오도록 변경
LeeSangHyeok0731 d12bc19
feat: 예약 관리 페이지 각각 정보를 가져오도록 수정
LeeSangHyeok0731 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,3 @@ | ||
| export * from "./getMalfunctionReports"; | ||
| export * from "./useGetMalfunctionReports"; | ||
| export * from "./useUpdateReportStatus"; |
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,25 @@ | ||
| import { useMutation, useQueryClient } from "@tanstack/react-query"; | ||
| import { put, reportUrl, reportQueryKeys } from "@/shared/api"; | ||
| import type { BaseResponseType } from "@/shared/api/types"; | ||
| import type { ReportStatusType } from "../model/types"; | ||
|
|
||
| export function useUpdateReportStatus() { | ||
| const queryClient = useQueryClient(); | ||
|
|
||
| return useMutation({ | ||
| mutationFn: async ({ id, status }: { id: number; status: ReportStatusType }) => { | ||
| await put<BaseResponseType<null>>(reportUrl.updateMalfunctionReportStatus(id), { | ||
| status, | ||
| }); | ||
| }, | ||
| onSuccess: () => { | ||
| queryClient.invalidateQueries({ | ||
| queryKey: reportQueryKeys.all, | ||
| }); | ||
| alert("신고 상태가 변경되었습니다."); | ||
| }, | ||
| onError: () => { | ||
| alert("신고 상태 변경 중 오류가 발생했습니다."); | ||
| }, | ||
| }); | ||
| } |
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,3 +1,4 @@ | ||
| export { getUsers } from "./getUsers"; | ||
| export { useGetMyInfo } from "./useGetMyInfo"; | ||
| export { useGetUsers } from "./useGetUsers"; | ||
| export { useDeleteUserPenalty } from "./useDeleteUserPenalty"; |
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,22 @@ | ||
| import { useMutation, useQueryClient } from "@tanstack/react-query"; | ||
| import { del, userUrl, userQueryKeys } from "@/shared/api"; | ||
| import type { BaseResponseType } from "@/shared/api/types"; | ||
|
|
||
| export function useDeleteUserPenalty() { | ||
| const queryClient = useQueryClient(); | ||
|
|
||
| return useMutation({ | ||
| mutationFn: async (userId: number) => { | ||
| await del<BaseResponseType<null>>(userUrl.deleteUserPenalty(userId)); | ||
| }, | ||
| onSuccess: () => { | ||
| queryClient.invalidateQueries({ | ||
| queryKey: userQueryKeys.all, | ||
| }); | ||
| alert("세탁 정지 해제가 완료되었습니다."); | ||
| }, | ||
| onError: () => { | ||
| alert("세탁 정지 해제 중 오류가 발생했습니다."); | ||
| }, | ||
| }); | ||
| } |
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
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.