Skip to content
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

Feat/35 tickets #56

Merged
merged 40 commits into from
Dec 7, 2024
Merged
Show file tree
Hide file tree
Changes from 39 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
a97bba0
data: add mock data / api 작동 안할 시 띄워줄 데이터
Turtle-Hwan Dec 2, 2024
ac5ebd6
style: info button style
Turtle-Hwan Dec 2, 2024
2af1d1d
fix: 시간 차이 계산 bug 수정
Turtle-Hwan Dec 2, 2024
4e6f60d
style: add selected star icon
Turtle-Hwan Dec 3, 2024
f4055bd
fix: forward store 매개변수 오타 수정
Turtle-Hwan Dec 3, 2024
363aa41
feat: API로 받아온 BusTickets BusList로 바꿔서 넣어주기
Turtle-Hwan Dec 3, 2024
8feeaf9
chore: add kumoneygo 배포 주소 QR 이미지
Turtle-Hwan Dec 3, 2024
5c27ebe
Merge branch 'main' of https://github.com/uxplorerss/uxplorers-fronte…
Turtle-Hwan Dec 3, 2024
fd70211
style: add <a> tag reset css, button width
Turtle-Hwan Dec 3, 2024
6b2aa23
style: change <a> tag color to original
Turtle-Hwan Dec 3, 2024
cc69d3e
feat: convertDate 입력으로 Date도 받을 수 있게 수정
Turtle-Hwan Dec 4, 2024
cb23186
fix: 전역 busList 스토어 side effect 발생으로 로직 수정
Turtle-Hwan Dec 4, 2024
91f5fd5
feat: searchTerminal id에는 NAEK 붙이지 않는 걸로 통일
Turtle-Hwan Dec 5, 2024
ebecbbe
chore: 함수 이동
Turtle-Hwan Dec 5, 2024
3d405da
fix: backward bus list side effect 방지
Turtle-Hwan Dec 5, 2024
2f5fa0c
feat: add 즐겨찾기 경로 store
Turtle-Hwan Dec 6, 2024
4edc27c
Merge branch 'main' of https://github.com/uxplorerss/uxplorers-fronte…
Turtle-Hwan Dec 6, 2024
7256346
feat: add persist middleware to zustand
Turtle-Hwan Dec 6, 2024
3ba37ca
feat: useSearchQuery도 localStorage 추가
Turtle-Hwan Dec 6, 2024
c04f1ea
fix: useSearchQuery persist 추가에 따른 오류 해결
Turtle-Hwan Dec 6, 2024
58845ed
refactor: remove unused imports
Turtle-Hwan Dec 6, 2024
2714bc3
feat: convert Header to sticky
Turtle-Hwan Dec 6, 2024
972dcef
feat: 즐겨찾기 route 기능 완료
Turtle-Hwan Dec 6, 2024
675efb1
feat: booking 화면에 즐겨찾기 기능 추가
Turtle-Hwan Dec 6, 2024
0a9358a
fix: 도착지 선택 안해도 출발지 선택만 하면 도착지 선택 div가 공백되는 문제 해결
Turtle-Hwan Dec 6, 2024
67de085
fix: type error 수정 / Ticket class에 string type 추가
Turtle-Hwan Dec 6, 2024
e4b66d3
chore: add bus company dummy data
Turtle-Hwan Dec 6, 2024
64e2e4b
style: pointer로 교체
Turtle-Hwan Dec 6, 2024
74c6379
refactor: ticket 페이지 컴포넌트 분리
Turtle-Hwan Dec 6, 2024
802e32a
feat: inbound / outbound에 따른 store 저장 처리
Turtle-Hwan Dec 6, 2024
00faeb8
feat: add react-select
Turtle-Hwan Dec 7, 2024
54a2724
fix: 처음 날짜 선택 시 출발 날짜는 항상 현재 시간으로
Turtle-Hwan Dec 7, 2024
353f73d
style: 시간선택 chip 제작
Turtle-Hwan Dec 7, 2024
8bcdb29
feat: 시간 선택, 각 조건 선택으로 버스 list 골라내는 기능 추가
Turtle-Hwan Dec 7, 2024
75c979d
feat: inbound 오는 날 버스 페이지 제작 완료
Turtle-Hwan Dec 7, 2024
d04a27c
feat: Error 메세지 보여줄 componnet 제작
Turtle-Hwan Dec 7, 2024
b3e6bcd
fix: 버튼 cursor
Turtle-Hwan Dec 7, 2024
8a5a718
feat: error 처리
Turtle-Hwan Dec 7, 2024
a290efa
feat: booking 페이지 왕복 선택 삭제 버튼 추가
Turtle-Hwan Dec 7, 2024
43108ba
refactor: new Date(Date.now())와 new Date() 결과가 동일하여 더 짧게 바꾸기
Turtle-Hwan Dec 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"react": "^18.3.1",
"react-datepicker": "^7.5.0",
"react-dom": "^18.3.1",
"react-select": "^5.8.3",
"react-tooltip": "^5.28.0",
"zustand": "^5.0.1"
},
Expand Down
Binary file added public/kumoneygo_QR.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 3 additions & 13 deletions src/apis/getBusTickets.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { parseBusTerminalId } from '../utils/searchTerminalInfo';

export const getBusNowTimeAPI = async (fromTmnId: string, toTmnId: string) => {
const queryStringParams: Record<string, string> = {
serviceKey: import.meta.env.VITE_OPEN_API_KEY,
Expand Down Expand Up @@ -32,7 +34,7 @@ export interface BusTicket {
depPlaceNm: string;
depPlandTime: number;
gradeNm: string;
routeId: number;
routeId: number | string;
}

interface ResponseBusTickets {
Expand All @@ -49,18 +51,6 @@ interface ResponseBusTickets {
};
}

/**
*
* @param busTmnId
* @returns
*/
const parseBusTerminalId = (busTmnId: string) => {
if (busTmnId.length === 3) {
return `NAEK${busTmnId}`;
}
return busTmnId;
};

export const getBusTicketsAPI = async (
fromTmnId: string,
toTmnId: string,
Expand Down
3 changes: 3 additions & 0 deletions src/assets/FavoriteStarIcon-selected.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/common/components/Seats/RemainSeat/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const ReaminSeat = ({ num }: remainSeatPropsType) => {
<div>
잔여 <b>{num}</b> / 28석
</div>
<RefreshIcon />
<RefreshIcon style={{ cursor: 'pointer' }} />
Copy link
Contributor

@algoORgoal algoORgoal Dec 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

나중에 refresh 직접 기능 돌아가게 만들면 좋을 듯

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

맞아요 이건 제 부분이 아니라 일단 보여지는 커서만 바꿨습니당

</>
);
};
Expand Down
242 changes: 242 additions & 0 deletions src/constants/mock/bus_ticket_seoul_daejeon.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,242 @@
{
"response": {
"header": {
"resultCode": "00",
"resultMsg": "NORMAL SERVICE."
},
"body": {
"items": {
"item": [
{
"arrPlaceNm": "대전복합",
"arrPlandTime": 202412020800,
"charge": 18100,
"depPlaceNm": "동서울",
"depPlandTime": 202412020600,
"gradeNm": "우등",
"routeId": "NAEK032300"
},
{
"arrPlaceNm": "대전복합",
"arrPlandTime": 202412020850,
"charge": 18100,
"depPlaceNm": "동서울",
"depPlandTime": 202412020650,
"gradeNm": "우등",
"routeId": "NAEK032300"
},
{
"arrPlaceNm": "대전복합",
"arrPlandTime": 202412020940,
"charge": 12400,
"depPlaceNm": "동서울",
"depPlandTime": 202412020740,
"gradeNm": "고속",
"routeId": "NAEK032300"
},
{
"arrPlaceNm": "대전복합",
"arrPlandTime": 202412021020,
"charge": 18100,
"depPlaceNm": "동서울",
"depPlandTime": 202412020820,
"gradeNm": "우등",
"routeId": "NAEK032300"
},
{
"arrPlaceNm": "대전복합",
"arrPlandTime": 202412021100,
"charge": 18100,
"depPlaceNm": "동서울",
"depPlandTime": 202412020900,
"gradeNm": "우등",
"routeId": "NAEK032300"
},
{
"arrPlaceNm": "대전복합",
"arrPlandTime": 202412021130,
"charge": 12400,
"depPlaceNm": "동서울",
"depPlandTime": 202412020930,
"gradeNm": "고속",
"routeId": "NAEK032300"
},
{
"arrPlaceNm": "대전복합",
"arrPlandTime": 202412021200,
"charge": 18100,
"depPlaceNm": "동서울",
"depPlandTime": 202412021000,
"gradeNm": "우등",
"routeId": "NAEK032300"
},
{
"arrPlaceNm": "대전복합",
"arrPlandTime": 202412021240,
"charge": 18100,
"depPlaceNm": "동서울",
"depPlandTime": 202412021040,
"gradeNm": "우등",
"routeId": "NAEK032300"
},
{
"arrPlaceNm": "대전복합",
"arrPlandTime": 202412021320,
"charge": 18100,
"depPlaceNm": "동서울",
"depPlandTime": 202412021120,
"gradeNm": "우등",
"routeId": "NAEK032300"
},
{
"arrPlaceNm": "대전복합",
"arrPlandTime": 202412021400,
"charge": 18100,
"depPlaceNm": "동서울",
"depPlandTime": 202412021200,
"gradeNm": "우등",
"routeId": "NAEK032300"
},
{
"arrPlaceNm": "대전복합",
"arrPlandTime": 202412021440,
"charge": 18100,
"depPlaceNm": "동서울",
"depPlandTime": 202412021240,
"gradeNm": "우등",
"routeId": "NAEK032300"
},
{
"arrPlaceNm": "대전복합",
"arrPlandTime": 202412021510,
"charge": 12400,
"depPlaceNm": "동서울",
"depPlandTime": 202412021310,
"gradeNm": "고속",
"routeId": "NAEK032300"
},
{
"arrPlaceNm": "대전복합",
"arrPlandTime": 202412021550,
"charge": 18100,
"depPlaceNm": "동서울",
"depPlandTime": 202412021350,
"gradeNm": "우등",
"routeId": "NAEK032300"
},
{
"arrPlaceNm": "대전복합",
"arrPlandTime": 202412021630,
"charge": 18100,
"depPlaceNm": "동서울",
"depPlandTime": 202412021430,
"gradeNm": "우등",
"routeId": "NAEK032300"
},
{
"arrPlaceNm": "대전복합",
"arrPlandTime": 202412021710,
"charge": 12400,
"depPlaceNm": "동서울",
"depPlandTime": 202412021510,
"gradeNm": "고속",
"routeId": "NAEK032300"
},
{
"arrPlaceNm": "대전복합",
"arrPlandTime": 202412021750,
"charge": 18100,
"depPlaceNm": "동서울",
"depPlandTime": 202412021550,
"gradeNm": "우등",
"routeId": "NAEK032300"
},
{
"arrPlaceNm": "대전복합",
"arrPlandTime": 202412021830,
"charge": 18100,
"depPlaceNm": "동서울",
"depPlandTime": 202412021630,
"gradeNm": "우등",
"routeId": "NAEK032300"
},
{
"arrPlaceNm": "대전복합",
"arrPlandTime": 202412021910,
"charge": 12400,
"depPlaceNm": "동서울",
"depPlandTime": 202412021710,
"gradeNm": "고속",
"routeId": "NAEK032300"
},
{
"arrPlaceNm": "대전복합",
"arrPlandTime": 202412021940,
"charge": 18100,
"depPlaceNm": "동서울",
"depPlandTime": 202412021740,
"gradeNm": "우등",
"routeId": "NAEK032300"
},
{
"arrPlaceNm": "대전복합",
"arrPlandTime": 202412022020,
"charge": 18100,
"depPlaceNm": "동서울",
"depPlandTime": 202412021820,
"gradeNm": "우등",
"routeId": "NAEK032300"
},
{
"arrPlaceNm": "대전복합",
"arrPlandTime": 202412022100,
"charge": 18100,
"depPlaceNm": "동서울",
"depPlandTime": 202412021900,
"gradeNm": "우등",
"routeId": "NAEK032300"
},
{
"arrPlaceNm": "대전복합",
"arrPlandTime": 202412022140,
"charge": 18100,
"depPlaceNm": "동서울",
"depPlandTime": 202412021940,
"gradeNm": "우등",
"routeId": "NAEK032300"
},
{
"arrPlaceNm": "대전복합",
"arrPlandTime": 202412022220,
"charge": 18100,
"depPlaceNm": "동서울",
"depPlandTime": 202412022020,
"gradeNm": "우등",
"routeId": "NAEK032300"
},
{
"arrPlaceNm": "대전복합",
"arrPlandTime": 202412022300,
"charge": 12400,
"depPlaceNm": "동서울",
"depPlandTime": 202412022100,
"gradeNm": "고속",
"routeId": "NAEK032300"
},
{
"arrPlaceNm": "대전복합",
"arrPlandTime": 202412030010,
"charge": 19900,
"depPlaceNm": "동서울",
"depPlandTime": 202412022210,
"gradeNm": "심야우등",
"routeId": "NAEK032300"
}
]
},
"numOfRows": 100,
"pageNo": 1,
"totalCount": 25
}
}
}
9 changes: 9 additions & 0 deletions src/index.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,13 @@ export const globalStyle = css`
* {
box-sizing: border-box;
}

a {
text-decoration: none;
outline: none;
}
a:hover,
a:active {
text-decoration: none;
}
`;
3 changes: 3 additions & 0 deletions src/pages/booking/index.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export const container = css({
display: 'flex',
flexDirection: 'column',
minHeight: '100vh',
userSelect: 'none',
});

export const topBarWrapper = css({
Expand Down Expand Up @@ -57,13 +58,15 @@ export const transferButtonWrapper = css({
top: '50%',
transform: 'translate(-50%, -50%)',
zIndex: 2,
cursor: 'pointer',
});

export const dateSelector = css({
display: 'flex',
flexDirection: 'row',
gap: '12px',
marginTop: '8px',
position: 'relative',
});

export const dateBox = css({
Expand Down
Loading
Loading