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

fix: 결제, 방문자 관리 이슈 수정 모음 (1) #247

Merged
merged 6 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const HeaderItem = styled.span`
margin-right: 12px;
}
&:nth-of-type(1) {
width: 120px;
width: 130px;
}
&:nth-of-type(2) {
width: 100px;
Expand Down Expand Up @@ -74,7 +74,7 @@ const Item = styled.span`
margin-right: 12px;
}
&:nth-of-type(1) {
width: 120px;
width: 130px;
}
&:nth-of-type(2) {
width: 100px;
Expand Down
15 changes: 11 additions & 4 deletions apps/admin/src/components/ReservationTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,32 @@ const getColumns = (ticketStatus: TicketStatus) => [
columnHelper.accessor('csReservationId', {
header: '주문 번호',
}),
columnHelper.accessor('paymentInfo.payerName', {
columnHelper.accessor('paymentInfo', {
header: '결제자명',
id: 'payerName',
cell: (props) => {
const { searchText = '' } = (props.table.options.meta ?? {}) as { searchText: string };
return (
<span
dangerouslySetInnerHTML={{ __html: boldText(props.getValue() ?? '-', searchText) }}
dangerouslySetInnerHTML={{
__html: boldText(props.getValue()?.payerName ?? '-', searchText),
}}
></span>
);
},
}),
columnHelper.accessor('paymentInfo.payerPhoneNumber', {
columnHelper.accessor('paymentInfo', {
header: '연락처',
id: 'payerPhoneNumber',
cell: (props) => {
const { searchText = '' } = (props.table.options.meta ?? {}) as { searchText: string };
return (
<span
dangerouslySetInnerHTML={{
__html: boldText(formatPhoneNumber(props.getValue() ?? '-'), searchText),
__html: boldText(
formatPhoneNumber(props.getValue()?.payerPhoneNumber ?? '-'),
searchText,
),
}}
></span>
);
Expand Down
2 changes: 1 addition & 1 deletion apps/admin/src/components/ShowDetailLayout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,8 @@ const ShowDetailLayout = ({ children }: ShowDetailLayoutProps) => {
<Styled.Tab>
<TabItem type="INFO" />
<TabItem type="TICKET" />
<TabItem type="RESERVATION" />
<TabItem type="ENTRANCE" />
<TabItem type="RESERVATION" />
<TabItem type="SETTLEMENT" />
</Styled.Tab>
</Styled.TabContainer>
Expand Down
6 changes: 1 addition & 5 deletions apps/admin/src/components/TicketNameFilter/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,7 @@ const TicketFilterOptions = ({
size="regular"
disabled={tempSelectedValues.length === 0}
onClick={() => {
if (
tempSelectedValues.length > 0 &&
selectedValues.length === 0 &&
tempSelectedValues.length !== options.length
) {
if (tempSelectedValues.length > 0) {
updateSelectValues(tempSelectedValues);
}
close();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,22 @@ const EmptyTitle = styled.p`

const TicketSummaryContainer = styled.div`
display: grid;
grid-template-columns: 1fr 1fr;
grid-template-columns: 1fr;
grid-gap: 8px;
margin-bottom: 32px;
${mq_lg} {
margin-bottom: 40px;
grid-template-columns: 1fr 1fr;
display: flex;
}
`;

const TicketSummary = styled.div<{ colorTheme: 'grey' | 'red' }>`
display: flex;
justify-content: space-between;
flex-direction: column;
flex-direction: row;
align-items: start;
padding: 16px 20px;
padding: 12px 16px;
border-radius: 8px;
${({ colorTheme, theme }) => {
switch (colorTheme) {
Expand All @@ -71,9 +72,9 @@ const TicketSummary = styled.div<{ colorTheme: 'grey' | 'red' }>`
}
}}
${mq_lg} {
flex-direction: row;
width: 260px;
flex: 1;
align-items: center;
padding: 16px 20px;
&:not(:last-child) {
margin-right: 12px;
}
Expand Down
11 changes: 3 additions & 8 deletions apps/admin/src/pages/ShowReservationPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ const ShowReservationPage = () => {
const {
salesTicketSoldCount,
totalSalesAmount,
invitationTicketSoldCount,
totalSoldCount,
completeCount,
waitCount,
Expand All @@ -100,19 +99,15 @@ const ShowReservationPage = () => {
<Styled.Container>
<Styled.TicketSummaryContainer>
<Styled.TicketSummary colorTheme="grey">
<Styled.TicketSumamryLabel>일반 티켓</Styled.TicketSumamryLabel>
<Styled.TicketSumamryLabel>결제 건수</Styled.TicketSumamryLabel>
<Styled.TicketSumamryValue>{salesTicketSoldCount}매</Styled.TicketSumamryValue>
</Styled.TicketSummary>
<Styled.TicketSummary colorTheme="grey">
<Styled.TicketSumamryLabel>초청 티켓</Styled.TicketSumamryLabel>
<Styled.TicketSumamryValue>{invitationTicketSoldCount}매</Styled.TicketSumamryValue>
</Styled.TicketSummary>
<Styled.TicketSummary colorTheme="grey">
<Styled.TicketSumamryLabel>총 발권된 티켓</Styled.TicketSumamryLabel>
<Styled.TicketSumamryLabel>발권 티켓</Styled.TicketSumamryLabel>
<Styled.TicketSumamryValue>{totalSoldCount}매</Styled.TicketSumamryValue>
</Styled.TicketSummary>
<Styled.TicketSummary colorTheme="red">
<Styled.TicketSumamryLabel>공연 수익</Styled.TicketSumamryLabel>
<Styled.TicketSumamryLabel>결제 금액</Styled.TicketSumamryLabel>
<Styled.TicketSumamryValue>
{totalSalesAmount.toLocaleString()}원
</Styled.TicketSumamryValue>
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/queryKey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ export const adminTicketQueryKeys = createQueryKeys('adminTicket', {
reservationNameOrPhoneNumber,
salesTicketTypeId: salesTicketTypeId.join(','),
};
if (isUsed) {
if (typeof isUsed !== 'undefined') {
searchParams.isUsed = isUsed;
}
return fetcher.get<PageTicketWithReservationResponse>(`web/v1/shows/${showId}/tickets`, {
Expand Down
Loading