Skip to content

Commit

Permalink
Merge pull request #193 from Nexters/feat/canceled-at
Browse files Browse the repository at this point in the history
feat: 환불일시 대응
  • Loading branch information
alstn2468 authored Sep 24, 2024
2 parents 0f36f39 + b9ee314 commit 5fdef0c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
19 changes: 12 additions & 7 deletions apps/admin/src/components/ReservationTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,18 @@ const columns = [
}
},
}),
columnHelper.accessor('ticketIssuedAt', {
header: (props) =>
(props.table.options.meta as { ticketStatus: TicketStatus }).ticketStatus === 'CANCEL'
? '환불일시'
: '발권일시',
cell: (props) => (props.getValue() ? format(props.getValue(), 'yyyy/MM/dd HH:mm') : '-'),
}),
columnHelper.accessor(
(props) =>
props.ticketStatus === 'CANCEL' && props.canceledAt ? props.canceledAt : props.ticketIssuedAt,
{
id: 'at',
header: (props) =>
(props.table.options.meta as { ticketStatus: TicketStatus }).ticketStatus === 'CANCEL'
? '환불일시'
: '발권일시',
cell: (props) => (props.getValue() ? format(props.getValue(), 'yyyy/MM/dd HH:mm') : '-'),
},
),
];

interface Props {
Expand Down
6 changes: 6 additions & 0 deletions packages/api/src/types/show.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ export interface ReservationResponse {
ticketIssuedAt: string;
/** 티켓 생성일시.아마 예매일과 동일 */
ticketCreatedAt: string;
/** 티켓 취소일시 */
canceledAt?: string;
/** 티켓 취소 사유 */
cancelReason?: string;
/** 선물 여부 */
giftReceived: true;
/** CS용(유저용) 예매 ID */
csReservationId: string;
/** CS용(유저용) 티켓 ID */
Expand Down

0 comments on commit 5fdef0c

Please sign in to comment.