-
Notifications
You must be signed in to change notification settings - Fork 4
[FE] [FEAT] 여행 상세 페이지 구현 #397
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
+264
−56
Merged
Changes from 8 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
16e7198
chore: 빈 데이터 fallback text 구현
minngyuseong 949d03f
chore: BottomSheet y축 스크롤기능 추가
minngyuseong 849aef1
feat: 여행 디데일 페이지 구현 추가
minngyuseong 691999d
chore: SelectionActionProvider -> Bar로 이름 변경
minngyuseong 545b61b
chore: ImportToFolderBar 파일 생성
minngyuseong ec95bcd
feat: 여행 상세 페이지에서 불러올 가계부 BottomSheet에 테이블 넣기
minngyuseong da1b66e
chore: 여행 상세 페이지 route 추가
minngyuseong ad8fe8b
chore: ImportToFolderBar 디자인 반영
minngyuseong b9f772d
chore: travel/$id -> travel/$travelId로 변경
minngyuseong d57e548
chore: svg파일 너비 높이 제거
minngyuseong cabb76f
chore: 여행 상세 페이지 이동 경로 파라미터 수정
minngyuseong f99208e
chore: 여행 상세 페이지 뒤로가기 아이콘 추가 및 코드 리팩토링
minngyuseong f02b9c0
fix: table 관련 컴포넌트 레이아웃 수정
minngyuseong 6fa737a
chore: 컴포넌트명과 파일명 통일
minngyuseong dc583e3
chore: BottomSheet는 스크롤되지 않도록 설정
minngyuseong 30f70dd
chore: 사용되지 않는 prop 제거
minngyuseong b73acdd
chore: 정렬 버튼 추가
minngyuseong 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
minngyuseong marked this conversation as resolved.
Show resolved
Hide resolved
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 이거 z값 문제라서 다른 issue에서 전체적으로 z값 통일 작업중입니다. 이번 pr에서는 넘어갈게요! |
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,32 @@ | ||
| import { useDataTable } from '@/components/data-table/context'; | ||
|
|
||
| import { Icons } from '@/assets'; | ||
|
|
||
| const Divider = () => <div className="bg-line-solid-normal/30 h-6 w-px" />; | ||
|
|
||
| const SelectionActionProvider = () => { | ||
| const { table, tableState } = useDataTable(); | ||
| const selectedRows = table.getFilteredSelectedRowModel().rows; | ||
|
|
||
| if (!tableState.selectionMode) return null; | ||
|
|
||
| const handleImportToFolder = () => {}; | ||
|
|
||
| return ( | ||
| <div className="bg-background-normal body2-normal-bold rounded-modal-12 shadow-semantic-strong fixed bottom-30 left-1/2 w-125 -translate-x-1/2 truncate px-4 py-2.75"> | ||
| <div className="flex items-center gap-4"> | ||
| <span className="mr-auto">{selectedRows.length}개 선택됨</span> | ||
| <button | ||
| onClick={handleImportToFolder} | ||
| className="label1-normal-medium text-primary-normal" | ||
| > | ||
| 현재 폴더에 추가하기 | ||
| </button> | ||
| <Divider /> | ||
| <Icons.Close height={20} width={20} /> | ||
| </div> | ||
| </div> | ||
| ); | ||
| }; | ||
|
|
||
| export default SelectionActionProvider; |
minngyuseong marked this conversation as resolved.
Show resolved
Hide resolved
|
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 |
|---|---|---|
| @@ -0,0 +1,114 @@ | ||
| import { useState } from 'react'; | ||
|
|
||
| import Button from '@/components/common/Button'; | ||
| import Divider from '@/components/common/Divider'; | ||
| import { DataTable } from '@/components/data-table/DataTable'; | ||
| import { DataTableFilterProvider } from '@/components/data-table/DataTableFilter'; | ||
| import DataTableProvider from '@/components/data-table/DataTableProvider'; | ||
| import CategoryFilter from '@/components/data-table/filters/CategoryFilter'; | ||
| import DateFilter from '@/components/data-table/filters/DateFilter'; | ||
| import MerchantFilter from '@/components/data-table/filters/MerchantFilter'; | ||
| import MethodFilter from '@/components/data-table/filters/MethodFilter'; | ||
| import ImportToFolderBar from '@/components/data-table/ImportToFolderBar'; | ||
| import SelectionActionBar from '@/components/data-table/SelectionActionBar'; | ||
| import { columns } from '@/components/home-page/columns'; | ||
| import ExpenseCard from '@/components/home-page/ExpenseCard'; | ||
| import { type Expense, getData } from '@/components/landing-page/dummy'; | ||
| import BottomSheet from '@/components/layout/BottomSheet'; | ||
|
|
||
| const TravelDetailPage = () => { | ||
| const [isBottomSheetOpen, setBottomSheetOpen] = useState(false); | ||
|
|
||
| const data = getData(); | ||
| return ( | ||
| <div className="flex flex-col px-30 pt-8"> | ||
| <div className="mb-10 flex items-end gap-4"> | ||
| <div className="flex flex-col gap-4"> | ||
| <h2 className="heading2-bold text-label-normal">뉴욕 보스턴</h2> | ||
minngyuseong marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| <div className="flex gap-1.5"> | ||
| <span className="body1-normal-medium text-label-normal"> | ||
| 2026.01.21 - 2026.01.26 | ||
| </span> | ||
| <span className="body1-normal-medium text-label-alternative"> | ||
| 5박 6일 | ||
| </span> | ||
| </div> | ||
| </div> | ||
| <Divider style="vertical" className="h-15" /> | ||
| <ExpenseCard | ||
| label="총 지출" | ||
| baseCountryCode="KR" | ||
| baseCountryAmount={1402432} | ||
| localCountryCode="US" | ||
| localCountryAmount={12232} | ||
| /> | ||
| <div className="flex-1" /> | ||
| <Button variant="outlined" size="md"> | ||
| 위젯 편집하기 | ||
| </Button> | ||
| </div> | ||
| {/* <div className="border-label-alternative mb-5 flex h-70 items-center justify-center rounded-lg border border-dashed"> | ||
| Widget area | ||
| <br /> | ||
| {title && `가계부 명: ${title}가계부`} | ||
minngyuseong marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| </div> */} | ||
| <div className="bg-background-normal relative rounded-2xl px-2 py-4 shadow"> | ||
| {/* <Icons.ChevronBack className="text-label-alternative absolute left-1/2 z-50 size-12 -translate-x-1/2 rotate-90" /> */} | ||
| <DataTableProvider columns={columns} data={[]}> | ||
| <DataTableFilterProvider> | ||
| <DateFilter /> | ||
| <MerchantFilter /> | ||
| <CategoryFilter /> | ||
| <MethodFilter /> | ||
| <div className="flex-1" /> | ||
| <Button | ||
| variant="solid" | ||
| size="md" | ||
| onClick={() => setBottomSheetOpen(true)} | ||
| > | ||
| 지출 내역 추가하기 | ||
| </Button> | ||
| </DataTableFilterProvider> | ||
| <DataTable | ||
| groupBy={(row: Expense) => | ||
| new Date(row.date).toLocaleDateString('ko-KR', { | ||
| year: 'numeric', | ||
| month: '2-digit', | ||
| day: '2-digit', | ||
| }) | ||
| } | ||
| blankFallbackText={'여행 지출 내역을 추가해주세요'} | ||
| /> | ||
| <SelectionActionBar /> | ||
| </DataTableProvider> | ||
| </div> | ||
| <BottomSheet | ||
| isOpen={isBottomSheetOpen} | ||
| onClose={() => setBottomSheetOpen(false)} | ||
| > | ||
| <DataTableProvider columns={columns} data={data}> | ||
| <DataTableFilterProvider> | ||
| <DateFilter /> | ||
| <MerchantFilter /> | ||
| <CategoryFilter /> | ||
| <MethodFilter /> | ||
| <div className="flex-1" /> | ||
| </DataTableFilterProvider> | ||
| <DataTable | ||
| groupBy={(row: Expense) => | ||
| new Date(row.date).toLocaleDateString('ko-KR', { | ||
| year: 'numeric', | ||
| month: '2-digit', | ||
| day: '2-digit', | ||
| }) | ||
| } | ||
| blankFallbackText={'여행 지출 내역을 추가해주세요'} | ||
| /> | ||
| <ImportToFolderBar /> | ||
| </DataTableProvider> | ||
| </BottomSheet> | ||
| </div> | ||
| ); | ||
| }; | ||
|
|
||
| export default TravelDetailPage; | ||
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.