Skip to content

Commit 2a88f48

Browse files
committed
feat: 티켓의 입장 QR 코드 링크 추가
1 parent d228b9c commit 2a88f48

File tree

2 files changed

+17
-8
lines changed

2 files changed

+17
-8
lines changed

packages/shop/src/components/features/order.tsx

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ const OrderProductRelationItem: React.FC<OrderProductRelationItemProps> = ({
9090
? "옵션 수정 중 문제가 발생했습니다,\n잠시 후 다시 시도해주세요."
9191
: "An error occurred while modifying the options,\nplease try again later.";
9292

93+
const scanCodeBtnText = language === "ko" ? "등록 QR 코드" : "Registeration QR Code";
9394
const refundBtnDisabled = isPending || !R.isNullish(prodRel.not_refundable_reason);
9495
const refundBtnText = R.isNullish(prodRel.not_refundable_reason)
9596
? refundOneProductStr
@@ -134,14 +135,21 @@ const OrderProductRelationItem: React.FC<OrderProductRelationItemProps> = ({
134135
};
135136

136137
const actionButtons = (
137-
<>
138-
<Button variant="contained" fullWidth onClick={patchOneItemOptions} disabled={patchOptionBtnDisabled}>
139-
{modifyOptionStr}
140-
</Button>
141-
<Button variant="contained" fullWidth onClick={refundOneItem} disabled={refundBtnDisabled}>
142-
{refundBtnText}
143-
</Button>
144-
</>
138+
<Stack direction="column" flexGrow={1} spacing={2}>
139+
{prodRel.scancode_url && (
140+
<a href={prodRel.scancode_url} target="_blank" rel="noopener noreferrer">
141+
<Button variant="contained" fullWidth children={scanCodeBtnText} />
142+
</a>
143+
)}
144+
<Stack direction="row" flexGrow={1} spacing={2}>
145+
<Button variant="contained" fullWidth onClick={patchOneItemOptions} disabled={patchOptionBtnDisabled}>
146+
{modifyOptionStr}
147+
</Button>
148+
<Button variant="contained" fullWidth onClick={refundOneItem} disabled={refundBtnDisabled}>
149+
{refundBtnText}
150+
</Button>
151+
</Stack>
152+
</Stack>
145153
);
146154

147155
return (

packages/shop/src/schemas/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ namespace ShopSchemas {
148148
price: number;
149149
donation_price: number;
150150
not_refundable_reason: string | null;
151+
scancode_url: string | null;
151152
product: {
152153
id: string;
153154
name: string;

0 commit comments

Comments
 (0)