Skip to content

LC-2842 USER 가이드북 결제 결제 플로우 UI 및 API 연동#2157

Merged
yeji424 merged 8 commits intoLC-2838-Sprint-17from
LC-2842-USER-가이드북-결제-결제-플로우-UI-및-API-연동
Mar 4, 2026

Hidden character warning

The head ref may contain hidden characters: "LC-2842-USER-\uac00\uc774\ub4dc\ubd81-\uacb0\uc81c-\uacb0\uc81c-\ud50c\ub85c\uc6b0-UI-\ubc0f-API-\uc5f0\ub3d9"
Merged

LC-2842 USER 가이드북 결제 결제 플로우 UI 및 API 연동#2157
yeji424 merged 8 commits intoLC-2838-Sprint-17from
LC-2842-USER-가이드북-결제-결제-플로우-UI-및-API-연동

Conversation

@yeji424
Copy link
Collaborator

@yeji424 yeji424 commented Mar 4, 2026

연관 작업

yeji424 added 7 commits March 3, 2026 19:28
- 가이드북 신청폼에 price 스키마 추가
- 프로그램 쿼리, 스토어, 프로그램 카드, 결제 정보 계산 로직에 추가
- deadline(종료일) 없을 시 마감 날짜, Duration 표시 안 함
- 가이드북 카드: 진행 일정 대신 열람 방식으로 노출
- deadline 없으면 "마감까지~남았어요" 비노출
- 쿠폰 입력란 비노출에 가이드북 타입 추가
- 쿠폰 입력란 비노출 시 결제정보 쿠폰할인란도 비노출
- 레거시 전용 useLegacyProgramQuery 훅 추가 (live/challenge 한정)
- - ProgramDetailLegacyPage, ApplySection, MobileApplySection에서 레거시 훅 사용으로 수정
@yeji424 yeji424 self-assigned this Mar 4, 2026
@github-actions github-actions bot changed the title Lc 2842 user 가이드북 결제 결제 플로우 UI 및 api 연동 LC-2842 USER 가이드북 결제 결제 플로우 UI 및 API 연동 Mar 4, 2026
@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 PR은 가이드북 프로그램에 대한 결제 흐름을 통합하고 UI를 업데이트합니다. 기존 프로그램 신청 및 결제 시스템에 가이드북 유형을 추가하여, 사용자가 가이드북을 구매하고 결제 결과를 확인할 수 있도록 합니다. 이 변경사항은 가이드북 관련 데이터 모델, API 호출, UI 컴포넌트 전반에 걸쳐 이루어졌습니다.

Highlights

  • 가이드북 프로그램 유형 지원 확장: 가이드북을 새로운 프로그램 유형으로 시스템 전반에 걸쳐 통합하여, API 호출, 데이터 스키마, UI 컴포넌트에서 가이드북 관련 데이터를 처리할 수 있도록 확장했습니다.
  • 결제 흐름 및 UI 업데이트: 가이드북에 대한 결제 실패 및 결과 페이지의 데이터 처리 로직을 개선하고, 결제 입력 페이지에서 가이드북 관련 정보를 올바르게 표시하도록 UI 컴포넌트를 조정했습니다.
  • 쿠폰 정책 및 프로그램 정보 표시 로직 개선: 가이드북에 대한 쿠폰 사용을 기본적으로 제한하고, 프로그램 정보 표시 컴포넌트에서 가이드북의 특성(예: '열람 방식')에 맞는 정보를 조건부로 렌더링하도록 로직을 업데이트했습니다.
  • 레거시 프로그램 쿼리 분리 및 CTA 로직 재구성: 기존 프로그램 조회 훅을 레거시 프로그램 전용 훅으로 분리하고, 가이드북 전용 CTA(Call To Action) 버튼 컴포넌트를 새로 구현하여 로그인 및 결제 정보 생성 흐름을 처리하도록 재구성했습니다.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • src/api/application.ts
    • guidebookApplicationPriceType를 추가하고 ProgramApplicationFormInfo 스키마에서 price 필드가 liveApplicationPriceType 또는 guidebookApplicationPriceType을 허용하도록 업데이트했습니다.
    • statusType 필드를 선택적으로 변경했습니다.
  • src/api/program.ts
    • useProgramQuery 훅에 guidebook 타입을 추가하고, 가이드북 데이터를 가져오는 useGetGuidebookQuery를 통합했습니다.
    • 레거시 프로그램(챌린지/라이브) 전용 useLegacyProgramQuery 훅을 새로 정의했습니다.
  • src/app/(user)/order/fail/page.tsx
    • 결제 실패 페이지에서 useProgramQuery의 반환값을 programData 변수로 명시적으로 캐스팅하여 프로그램 정보 접근 방식을 개선했습니다.
  • src/app/(user)/order/result/page.tsx
    • 결제 결과 페이지에서 useProgramQuery의 반환값을 programData 변수로 명시적으로 캐스팅하고, ProgramCard 컴포넌트에 progressType을 전달하는 로직을 업데이트했습니다.
  • src/app/(user)/payment-input/page.tsx
    • 쿠폰 사용이 불가능한 프로그램 유형에 guidebook을 추가하고, challengeBasicPriceInfo 접근 로직을 개선했습니다.
    • OrderProgramInfo 컴포넌트에 programType, endDate, startDate, accessMethod prop을 추가하고, PriceSection 컴포넌트에 showCouponDiscount prop을 전달하도록 업데이트했습니다.
  • src/app/(user)/program/guidebook/[id]/[title]/page.tsx
    • GuidebookCTAButtons 컴포넌트의 import 경로를 변경하고, guidebookId prop을 추가하여 가이드북 ID를 전달하도록 수정했습니다.
  • src/app/(user)/program/old/ProgramDetailLegacyPage.tsx
    • 레거시 프로그램 상세 페이지에서 useProgramQuery 대신 새로 정의된 useLegacyProgramQuery를 사용하도록 변경하고, 프로그램 데이터 접근 방식을 programData 변수를 통해 일관되게 처리하도록 업데이트했습니다.
  • src/common/button/ApplyCTA.tsx
    • MobileApplyCTA 및 DesktopApplyCTA 컴포넌트에서 deadline 유무에 따라 마감 기한 정보를 조건부로 렌더링하고, 신청 버튼 표시 로직을 개선했습니다.
  • src/domain/program/OrderProgramInfo.tsx
    • OrderProgramInfo 컴포넌트에 accessMethod prop을 추가하고, programType이 guidebook일 경우 '열람 방식'을 표시하도록 로직을 추가했습니다.
  • src/domain/program/ProgramCard.tsx
    • ProgramCard 컴포넌트의 type prop에 guidebook을 추가하여 가이드북 유형을 지원하도록 확장했습니다.
  • src/domain/program/guidebook/GuidebookCTAButtons.tsx
    • 이 파일은 삭제되었습니다.
  • src/domain/program/guidebook/ui/GuidebookCTAButtons.tsx
    • 가이드북 전용 CTA 버튼 로직을 구현한 새 파일이 추가되었습니다. 로그인 여부에 따른 리다이렉션, 결제 정보 생성, 프로그램 신청 폼 설정 등 가이드북 결제 흐름을 처리합니다.
  • src/domain/program/program-detail/apply/constants.ts
    • 쿠폰 사용이 불가능한 프로그램 유형을 정의하는 COUPON_DISABLED_PROGRAM_TYPES 상수를 추가하고 guidebook을 포함시켰습니다.
  • src/domain/program/program-detail/apply/section/PriceSection.tsx
    • showCouponDiscount prop을 추가하여 쿠폰 할인 섹션의 표시 여부를 제어할 수 있도록 했습니다.
  • src/domain/program/program-detail/section/ApplySection.tsx
    • 프로그램 신청 섹션에서 새로운 레거시 프로그램 쿼리 훅을 사용하도록 변경했습니다.
  • src/domain/program/program-detail/section/MobileApplySection.tsx
    • 모바일 신청 섹션에서 새로운 레거시 프로그램 쿼리 훅을 사용하도록 변경했습니다.
  • src/lib/order.ts
    • getPayInfo 함수가 가이드북 프로그램의 결제 정보를 올바르게 추출할 수 있도록 guideBookPriceType을 추가하고 로직을 확장했습니다.
  • src/schema.ts
    • 가이드북 결제 정보를 정의하는 guidebookApplicationPriceType 스키마를 추가했습니다.
  • src/store/useProgramStore.ts
    • 프로그램 스토어의 programType에 guidebook을 추가하여 가이드북 유형을 저장할 수 있도록 했습니다.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

이 PR은 가이드북 상품의 결제 플로우를 추가하는 변경 사항을 담고 있습니다. 전반적으로 새로운 guidebook 프로그램 유형을 지원하기 위해 API, 스키마, UI 컴포넌트들이 잘 수정되었습니다. 특히 payment-input 페이지에서 in 연산자를 사용하여 타입 분기를 처리한 부분은 타입 안정성을 높이는 좋은 예시입니다.

다만, 몇몇 파일에서 as를 사용한 타입 단언이 발견되었습니다. 이는 타입 안정성을 저해하고 잠재적인 버그를 유발할 수 있습니다. useProgramQuery와 같은 훅이 반환하는 Discriminated Union 타입을 활용하여 타입 단언 없이도 안전하게 데이터를 처리하는 방법을 제안드렸습니다. 이는 코드의 예측 가능성과 유지보수성을 높이는 데 도움이 될 것입니다. 자세한 내용은 각 파일에 남긴 리뷰 코멘트를 참고해주세요.

- 프로그램 타입별 실제 존재 필드만 읽어서 ProgramCard props 채우도록 변경
@yeji424 yeji424 merged commit 4fc9286 into LC-2838-Sprint-17 Mar 4, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant