Repository navigation
[Feature/#385] 캠페인 상세 플랫폼 예산 수정 및 ads 훅 패턴 정리 #392
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
Merged
Merged
Changes from 8 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
f43c663
feat: 플랫폼별 캠페인 예산 수정 타입 및 API 추가
YermIm f97413c
feat: 캠페인 예산 수정 검증 및 mutation 가드 유틸 추가
YermIm e97bab5
feat: 캠페인 상세 플랫폼별 예산 단일 표시 및 수정 버튼 레이아웃
YermIm acb316c
style: 게이지 카드 UI 수정 및 버튼 크기 조정
YermIm ee0e329
feat: 플랫폼별 캠페인 예산 수정 mutation 훅 추가
YermIm e7af2a9
feat: 플랫폼 예산 수정 모달 및 폼 유틸 추가
YermIm 968b232
feat: 캠페인 상세 예산 수정 연동 및 금액 입력 UX 개선
YermIm c9addb0
refactor: ads 훅useCoreQuery·useCoreMutation 패턴 적용
YermIm d074ab8
fix: Naver 예산 일일 기준으로 표시/수정 통일
YermIm 24efe1c
fix: 예산 수정 disabled 사유를 버튼 아래 안내 문구로 표시
YermIm 687cd55
fix: 예산 수정 모달 제목 스크린리더 중복 낭독 제거
YermIm 7a54fd5
fix: 일괄 status 변경 부분 성공 시에도 목록 캐시 갱신
YermIm 53d7c79
fix: 예산 수정 모달 닫힘 시 포커스 복원 및 exit 애니메이션 유지
YermIm e5f8021
refactor: Meta/Google 예산 수정 요청 타입을 상호 배타 union으로 정리
YermIm 3c1d9dc
fix: Meta/Google 예산 수정 시 금액 undefined 요청 방지
YermIm 162ea47
fix: 활성 예산 판정 로직을 게이지·모달·payload에서 공통화
YermIm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| import type { | ||
| IMetaGoogleBudgetUpdateData, | ||
| IMetaGoogleBudgetUpdateRequest, | ||
| INaverBudgetUpdateData, | ||
| INaverBudgetUpdateRequest, | ||
| } from "@/types/ads/budget"; | ||
| import type { ICommonResponse } from "@/types/common/common"; | ||
|
|
||
| import { axiosInstance } from "@/lib/axiosInstance"; | ||
|
|
||
| /** | ||
| * Meta 캠페인 예산 수정 | ||
| * PATCH /api/meta/campaigns/{adCampaignId}/budget | ||
| * — daily / lifetime 중 하나만 수정 가능, 기존 유형과 동일해야 함 | ||
| */ | ||
| export async function updateMetaCampaignBudget( | ||
| adCampaignId: number, | ||
| body: IMetaGoogleBudgetUpdateRequest, | ||
| ): Promise<IMetaGoogleBudgetUpdateData> { | ||
| const { data } = await axiosInstance.patch< | ||
| ICommonResponse<IMetaGoogleBudgetUpdateData> | ||
| >(`/api/meta/campaigns/${adCampaignId}/budget`, body); | ||
| return data.data; | ||
| } | ||
|
|
||
| /** | ||
| * Naver 캠페인 예산 수정 | ||
| * PUT /api/naver/{connectionId}/campaigns/{campaignId}/budget | ||
| */ | ||
| export async function updateNaverCampaignBudget( | ||
| connectionId: number, | ||
| campaignId: string, | ||
| body: INaverBudgetUpdateRequest, | ||
| ): Promise<INaverBudgetUpdateData> { | ||
| const { data } = await axiosInstance.put< | ||
| ICommonResponse<INaverBudgetUpdateData> | ||
| >(`/api/naver/${connectionId}/campaigns/${campaignId}/budget`, body); | ||
| return data.data; | ||
| } | ||
|
|
||
| /** | ||
| * Google 캠페인 예산 수정 | ||
| * PATCH /api/google/campaigns/{adCampaignId}/budget | ||
| */ | ||
| export async function updateGoogleCampaignBudget( | ||
| adCampaignId: number, | ||
| body: IMetaGoogleBudgetUpdateRequest, | ||
| ): Promise<IMetaGoogleBudgetUpdateData> { | ||
| const { data } = await axiosInstance.patch< | ||
| ICommonResponse<IMetaGoogleBudgetUpdateData> | ||
| >(`/api/google/campaigns/${adCampaignId}/budget`, body); | ||
| return data.data; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.