Skip to content

LC-2848 ADMIN 프로그램 관리 가이드북 등록 버튼 추가 및 목록 UI 구현#2139

Open
yeji424 wants to merge 1 commit intoLC-2838-Sprint-17from
LC-2848-ADMIN-프로그램-관리-가이드북-등록-버튼-추가-및-목록-UI-구현

Hidden character warning

The head ref may contain hidden characters: "LC-2848-ADMIN-\ud504\ub85c\uadf8\ub7a8-\uad00\ub9ac-\uac00\uc774\ub4dc\ubd81-\ub4f1\ub85d-\ubc84\ud2bc-\ucd94\uac00-\ubc0f-\ubaa9\ub85d-UI-\uad6c\ud604"
Open

LC-2848 ADMIN 프로그램 관리 가이드북 등록 버튼 추가 및 목록 UI 구현#2139
yeji424 wants to merge 1 commit intoLC-2838-Sprint-17from
LC-2848-ADMIN-프로그램-관리-가이드북-등록-버튼-추가-및-목록-UI-구현

Conversation

@yeji424
Copy link
Collaborator

@yeji424 yeji424 commented Feb 24, 2026

연관 작업

@gemini-code-assist
Copy link

Summary of Changes

Hello @yeji424, 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은 가이드북 관리와 관련된 프론트엔드 로직을 업데이트된 백엔드 API 스키마 및 어드민 로직 스펙에 맞춰 동기화합니다. 이를 통해 데이터 일관성을 확보하고, 가이드북 생성, 수정, 조회 기능이 올바르게 작동하도록 보장하며, 사용자 인터페이스가 최신 데이터 구조를 정확하게 반영하도록 합니다.

Highlights

  • 가이드북 API 스키마 업데이트: 가이드북 상세 조회 (getGuidebookIdSchema), 생성 (CreateGuidebookReq), 수정 (UpdateGuidebookReq)을 위한 API 스키마가 백엔드 스펙에 맞춰 대폭 업데이트되었습니다. desc 필드가 shortDescdescription으로 분리되고, contentStructurecontentComposition으로 변경되었으며, priceInfo 구조가 평면화되고 id, job, contentUrl, contentFileUrl, isVisible 등 새로운 필드가 추가되었습니다.
  • API 엔드포인트 변경: 가이드북 생성, 수정, 삭제를 위한 API 엔드포인트가 /admin/guidebook에서 /guidebook으로 변경되어 어드민 접두사가 제거되었습니다.
  • 프론트엔드 로직 동기화: 업데이트된 스키마에 맞춰 가이드북 목(mock) 데이터, 메타데이터 표시, 기본 정보 섹션 UI, 그리고 가이드북 복제 로직 등 프론트엔드 코드베이스가 수정되었습니다.

🧠 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/program.ts
    • getGuidebookMockData의 목 데이터를 새 스키마에 맞춰 업데이트했습니다.
    • 가이드북 POST, PATCH, DELETE 작업의 API 엔드포인트를 /admin/guidebook에서 /guidebook으로 변경했습니다.
  • src/app/(user)/program/guidebook/[id]/[title]/page.tsx
    • 메타데이터 설명을 program.desc에서 program.shortDesc로 변경했습니다.
  • src/domain/program/guidebook/ui/GuidebookBasicInfoSection.tsx
    • 가격 및 할인 정보 접근 방식을 guidebook.priceInfo에서 guidebook.priceguidebook.discount로 직접 변경했습니다.
    • 자료 구성 표시를 guidebook.contentStructure에서 guidebook.contentComposition으로 변경했습니다.
  • src/hooks/useDuplicateProgram.ts
    • guidebookToCreateInput 함수에서 기존 스키마 필드를 새 CreateGuidebookReq 필드에 매핑하도록 수정했습니다 (예: desc -> description, contentStructure -> contentComposition, classificationInfo -> programTypeInfo, priceInfo에서 직접 price/discount 참조).
  • src/schema.ts
    • getGuidebookIdSchemaid, shortDesc, description, job, contentUrl, contentFileUrl, price, discount, guidebookPriceType, programTypeInfo와 같은 새 필드를 반영하고, desc, contentStructure, materialUrl, priceInfo, classificationInfo 필드를 제거하거나 이름을 변경했습니다.
    • CreateGuidebookReqUpdateGuidebookReq 타입을 새 API 스펙에 맞춰 수정했습니다. CreateGuidebookReq의 여러 필드를 필수로 만들고 UpdateGuidebookReq에서는 선택 사항으로 변경했으며, 중첩된 priceInfoprogramTypeInfo 구조를 업데이트했습니다.
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.

@yeji424 yeji424 self-assigned this Feb 24, 2026
@github-actions github-actions bot changed the title fix: 가이드북 API 스키마 및 어드민 로직 스펙 맞춤 LC-2848 ADMIN 프로그램 관리 가이드북 등록 버튼 추가 및 목록 UI 구현 Feb 24, 2026
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

가이드북 API 스키마 변경 및 어드민 로직 수정 사항을 확인했습니다. 전체적으로 필드명 변경(contentStructure -> contentComposition)과 가격 정보의 평탄화(flattening)가 잘 반영되었습니다. 다만, 매직 넘버 사용 지양 및 스키마의 일관성(필수 여부 등)에 대해 몇 가지 개선 제안을 드립니다.

Comment on lines +390 to +404
id: 0,
title: '가이드북 제목',
desc: '가이드북 설명',
shortDesc: '가이드북 짧은 설명',
thumbnail: null,
desktopThumbnail: null,
contentStructure: '자료 구성 내용',
contentComposition: '자료 구성 내용',
accessMethod: '가이드북 열람 방식',
recommendedFor: '가이드북 추천 대상',
priceInfo: {
priceId: 1,
price: 10000,
discount: 1000,
guidebookPriceType: 'CHARGE',
},
description: '가이드북 설명',
isVisible: true,
job: null,
contentUrl: null,
contentFileUrl: null,
price: 10000,
discount: 1000,

Choose a reason for hiding this comment

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

medium

Mock 데이터에서 사용된 ID(0), 가격(10000) 및 할인 금액(1000)과 같은 숫자는 의미를 명확히 하고 유지보수성을 높이기 위해 명명된 상수로 대체하는 것이 좋습니다.

References
  1. 의미가 불분명한 매직 넘버를 명명된 상수로 대체하여 가독성을 높여야 합니다. (link)

title: z.string(),
desc: z.string().nullable().optional(),
id: z.number(),
title: z.string().nullable().optional(),

Choose a reason for hiding this comment

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

medium

가이드북 상세 조회 스키마에서 titlenullable().optional()로 변경되었습니다. CreateGuidebookReq에서 title이 필수 값인 점을 고려할 때, 상세 조회 결과에서도 항상 존재할 것으로 기대되므로 z.string()과 같이 필수 값으로 유지하여 타입 안정성을 강화하는 것을 권장합니다.

Suggested change
title: z.string().nullable().optional(),
title: z.string(),

accountType?: AccountType;
};
guidebookPriceType: GuidebookPriceType;
guidebookPriceType?: GuidebookPriceType;

Choose a reason for hiding this comment

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

medium

CreateGuidebookReq에서는 guidebookPriceType이 선택 사항(?)으로 정의되어 있으나, UpdateGuidebookReq(692행)에서는 필수 값으로 정의되어 있어 일관성이 떨어집니다. 가이드북 생성 시에도 가격 타입을 명확히 지정해야 하므로 필수 값으로 변경하는 것이 적절해 보입니다.

Suggested change
guidebookPriceType?: GuidebookPriceType;
guidebookPriceType: GuidebookPriceType;

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