[Refactor] core entity structure and admin query flow#10
Merged
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the entity and widget layers to centralize mapping logic, simplify component props, and improve code organization through barrel exports. Key updates include the introduction of shared utility functions for date formatting and status mapping, alongside a reorganization of API hooks and query keys. A regression was noted in the MachineStatusPanel where the real-time countdown timer for machine usage was removed, resulting in static time displays that only update upon refetching.
LeeSangHyeok0731
approved these changes
Apr 25, 2026
LeeSangHyeok0731
left a comment
Contributor
There was a problem hiding this comment.
문제 없는것같습니다. 수고하셨습니다!
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
개요 💡
admin 영역 전반의 core 구조를 리팩토링했습니다.
machine / reservation / user / dashboard entity의 export 구조를 정리하고, query key / invalidate 흐름을 통일했으며, machine 관리 UI와 reservation 관련 로직의 중복을 줄이는 방향으로 구조를 개선했습니다.
작업내용 ⌨️
index.ts,api/index.ts) 구조 적용했음MachineStatusBadge단순화하고 상태 해석 책임을 mapper로 이동했음MachineStatusModal내부 UI 하위 컴포넌트로 분리했음getMachineReservationInfo반환값 정리하고 불필요한 값 제거했음queryKeys에allprefix 추가하고 invalidate 전략 통일했음추가 참고 사항 📌
이번 리팩토링에서 API / 데이터 처리 기준을 다음과 같이 정리했습니다.
queryKeys를 중앙에서 관리하고allprefix를 추가해서invalidate 전략을 일관되게 맞췄음