Skip to content

Commit

Permalink
Merge pull request #56 from uxplorerss/feat/35-tickets
Browse files Browse the repository at this point in the history
Feat/35 tickets
  • Loading branch information
Turtle-Hwan authored Dec 7, 2024
2 parents 897479b + 43108ba commit 4d881da
Show file tree
Hide file tree
Showing 26 changed files with 1,216 additions and 282 deletions.
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' }} />
</>
);
};
Expand Down
File renamed without changes.
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

0 comments on commit 4d881da

Please sign in to comment.