Skip to content

Conversation

@yuda110
Copy link
Member

@yuda110 yuda110 commented May 8, 2025

Skip Review (optional)

  • Minor changes that don't affect the functionality (e.g. style, chore, ci, test, docs)
  • Previously reviewed in feature branch, further review is not mandatory
  • Self-merge allowed for solo developers or urgent changes

Description (optional)

스크린샷 2025-05-08 오후 5 46 06

Things to Talk About (optional)

yuda110 added 2 commits May 8, 2025 17:44
Signed-off-by: yuda <yuda@megazone.com>
Signed-off-by: yuda <yuda@megazone.com>
@vercel
Copy link

vercel bot commented May 8, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

4 Skipped Deployments
Name Status Preview Comments Updated (UTC)
console ⬜️ Ignored (Inspect) Visit Preview May 8, 2025 9:26am
dashboard ⬜️ Ignored (Inspect) Visit Preview May 8, 2025 9:26am
feature-integration-project-detail ⬜️ Ignored (Inspect) Visit Preview May 8, 2025 9:26am
web-storybook ⬜️ Ignored (Inspect) Visit Preview May 8, 2025 9:26am

@vercel
Copy link

vercel bot commented May 8, 2025

@yuda110 is attempting to deploy a commit to the cloudforet Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link
Contributor

github-actions bot commented May 8, 2025

🎉 @seungyeoneeee and @WANZARGEN have been randomly selected as the reviewers! Please review. 🙏

Comment on lines 11 to 16
const { data, isLoading, error } = useScopedQuery({
queryKey: costReportConfigQueryKey,
queryFn: async () => {
const res = await costReportConfigAPI.list(params.value);
return res.results?.[0] ?? null;
},
Copy link
Member

@piggggggggy piggggggggy May 8, 2025

Choose a reason for hiding this comment

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

nitpick:
It is recommended that Query data be maintained in the original data format received from the server, which is the rule for consistency of cached data when the same data is requested from somewhere else with the same key of the same structure.

If data processing is required, please use useQuery's select option or calculate it outside.


Query 데이터는 서버로부터 받은 원본 데이터 형식을 유지하는 것을 권장합니다. 같은 데이터를 같은 구조의 키로 다른 곳에서 요청했을 때, 캐시된 데이터의 정합성을 위한 룰입니다.

데이터 가공이 필요하다면, useQueryselect옵션을 이용하거나 외부에서 계산해주세요.

Comment on lines +101 to +108
const { mutate: updateCostReportConfig } = useCostReportUpdateMutation({
onSuccess: () => {
showSuccessMessage(i18n.t('BILLING.COST_MANAGEMENT.COST_REPORT.ALT_S_UPDATE_SETTINGS'), '');
} catch (e) {
ErrorHandler.handleRequestError(e, i18n.t('BILLING.COST_MANAGEMENT.COST_REPORT.ALT_E_UPDATE_SETTINGS'));
}
};
},
onError: (error) => {
ErrorHandler.handleRequestError(error, i18n.t('BILLING.COST_MANAGEMENT.COST_REPORT.ALT_E_UPDATE_SETTINGS'));
},
});
Copy link
Member

Choose a reason for hiding this comment

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

Suggestion: If you don't need to sync or disable the cache, I don't think you need to use mutation!


쿼리 캐시의 동기화 혹은 무효화가 필요하지 않다면, 굳이 mutation을 이용할 필요는 없을 것 같습니다!

Signed-off-by: yuda <yuda@megazone.com>
@yuda110 yuda110 merged commit 7e33118 into cloudforet-io:feature-cost-report May 9, 2025
7 of 9 checks passed
@yuda110 yuda110 deleted the feature/refactor branch May 9, 2025 01:51
yuda110 added a commit that referenced this pull request May 9, 2025
* feat: add vue query and mutation of `CostReport`

Signed-off-by: yuda <yuda@megazone.com>

* refactor: use VueQuery rather than SpaceConnector

Signed-off-by: yuda <yuda@megazone.com>

* fix: use `select` in `useCostReportConfigQuery`

Signed-off-by: yuda <yuda@megazone.com>

---------

Signed-off-by: yuda <yuda@megazone.com>
yuda110 added a commit that referenced this pull request May 9, 2025
* feat: add vue query and mutation of `CostReport`

Signed-off-by: yuda <yuda@megazone.com>

* refactor: use VueQuery rather than SpaceConnector

Signed-off-by: yuda <yuda@megazone.com>

* fix: use `select` in `useCostReportConfigQuery`

Signed-off-by: yuda <yuda@megazone.com>

---------

Signed-off-by: yuda <yuda@megazone.com>
yuda110 added a commit that referenced this pull request May 12, 2025
* feat: add vue query and mutation of `CostReport`

Signed-off-by: yuda <yuda@megazone.com>

* refactor: use VueQuery rather than SpaceConnector

Signed-off-by: yuda <yuda@megazone.com>

* fix: use `select` in `useCostReportConfigQuery`

Signed-off-by: yuda <yuda@megazone.com>

---------

Signed-off-by: yuda <yuda@megazone.com>
yuda110 added a commit that referenced this pull request May 15, 2025
* feat: add vue query and mutation of `CostReport`

Signed-off-by: yuda <yuda@megazone.com>

* refactor: use VueQuery rather than SpaceConnector

Signed-off-by: yuda <yuda@megazone.com>

* fix: use `select` in `useCostReportConfigQuery`

Signed-off-by: yuda <yuda@megazone.com>

---------

Signed-off-by: yuda <yuda@megazone.com>
yuda110 added a commit that referenced this pull request May 16, 2025
* feat: add vue query and mutation of `CostReport`

Signed-off-by: yuda <yuda@megazone.com>

* refactor: use VueQuery rather than SpaceConnector

Signed-off-by: yuda <yuda@megazone.com>

* fix: use `select` in `useCostReportConfigQuery`

Signed-off-by: yuda <yuda@megazone.com>

---------

Signed-off-by: yuda <yuda@megazone.com>
yuda110 added a commit that referenced this pull request May 19, 2025
* feat: add vue query and mutation of `CostReport`

Signed-off-by: yuda <yuda@megazone.com>

* refactor: use VueQuery rather than SpaceConnector

Signed-off-by: yuda <yuda@megazone.com>

* fix: use `select` in `useCostReportConfigQuery`

Signed-off-by: yuda <yuda@megazone.com>

---------

Signed-off-by: yuda <yuda@megazone.com>
yuda110 added a commit that referenced this pull request May 21, 2025
* feat: add vue query and mutation of `CostReport`

Signed-off-by: yuda <yuda@megazone.com>

* refactor: use VueQuery rather than SpaceConnector

Signed-off-by: yuda <yuda@megazone.com>

* fix: use `select` in `useCostReportConfigQuery`

Signed-off-by: yuda <yuda@megazone.com>

---------

Signed-off-by: yuda <yuda@megazone.com>
yuda110 added a commit that referenced this pull request May 23, 2025
* feat: add vue query and mutation of `CostReport`

Signed-off-by: yuda <yuda@megazone.com>

* refactor: use VueQuery rather than SpaceConnector

Signed-off-by: yuda <yuda@megazone.com>

* fix: use `select` in `useCostReportConfigQuery`

Signed-off-by: yuda <yuda@megazone.com>

---------

Signed-off-by: yuda <yuda@megazone.com>
yuda110 added a commit that referenced this pull request May 26, 2025
* feat: add vue query and mutation of `CostReport`

Signed-off-by: yuda <yuda@megazone.com>

* refactor: use VueQuery rather than SpaceConnector

Signed-off-by: yuda <yuda@megazone.com>

* fix: use `select` in `useCostReportConfigQuery`

Signed-off-by: yuda <yuda@megazone.com>

---------

Signed-off-by: yuda <yuda@megazone.com>
yuda110 added a commit that referenced this pull request May 29, 2025
* feat: add vue query and mutation of `CostReport`

Signed-off-by: yuda <yuda@megazone.com>

* refactor: use VueQuery rather than SpaceConnector

Signed-off-by: yuda <yuda@megazone.com>

* fix: use `select` in `useCostReportConfigQuery`

Signed-off-by: yuda <yuda@megazone.com>

---------

Signed-off-by: yuda <yuda@megazone.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants