Skip to content

Conversation

@yuda110
Copy link
Member

@yuda110 yuda110 commented Jun 3, 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)

Things to Talk About (optional)

admin-cloudforet and others added 6 commits June 2, 2025 07:05
Signed-off-by: yuda <yuda@megazone.com>
Signed-off-by: yuda <yuda@megazone.com>
Signed-off-by: yuda <yuda@megazone.com>
Signed-off-by: yuda <yuda@megazone.com>
feat: feat: load ADJUSTING and DONE items in admin mode & etc
@vercel
Copy link

vercel bot commented Jun 3, 2025

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

Name Status Preview Comments Updated (UTC)
cost-report ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 3, 2025 2:03am
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
console ⬜️ Ignored (Inspect) Jun 3, 2025 2:03am
web-storybook ⬜️ Ignored (Inspect) Jun 3, 2025 2:03am

@github-actions
Copy link
Contributor

github-actions bot commented Jun 3, 2025

⚠️ @yuda110 the signed-off-by was not found in the following 2 commits:

✅ Why it is required

The Developer Certificate of Origin (DCO) is a lightweight way for contributors to certify that they wrote or otherwise have the right to submit the code they are contributing to the project. Here is the full text of the DCO.

Contributors sign-off that they adhere to these requirements by adding a Signed-off-by line to commit messages.

This is my commit message

Signed-off-by: Random Developer <randomdeveloper@example.com>

Git even has a -s command line option to append this automatically to your commit message:

$ git commit -s -m 'This is my commit message'

@github-actions
Copy link
Contributor

github-actions bot commented Jun 3, 2025

🎉 @skdud4659 has been randomly selected as the reviewer! Please review. 🙏

@github-actions github-actions bot requested a review from skdud4659 June 3, 2025 02:03
@github-actions
Copy link
Contributor

github-actions bot commented Jun 3, 2025

✅ There are no commits in this PR that require review.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This hotfix tightens validation rules, adds status-based filtering and conditional UI for cost reports, and improves form input feedback and popup styling.

  • Require positive amounts in advanced settings validation
  • Filter cost reports by status based on admin mode and conditionally render action links
  • Mark adjustment form inputs invalid when empty or non-positive; wrap popup content for consistent padding

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
apps/web/src/services/cost-explorer/stores/advanced-settings-page-store.ts Added Number(adjustment.amount) > 0 check to ensure positive adjustment amounts.
apps/web/src/services/cost-explorer/components/CostReportReportsTab.vue Imported admin context, applied status filters in API query, and hid links except for DONE.
apps/web/src/services/cost-explorer/components/AdvancedSettingsAdjustmentsForm.vue Added :invalid flags on inputs to reflect required and positive value validation.
apps/web/src/common/modules/popup/notice/modules/NoticePopupItem.vue Wrapped popup body in a padded <div> for layout consistency.
Comments suppressed due to low confidence (1)

apps/web/src/common/modules/popup/notice/modules/NoticePopupItem.vue:61

  • [nitpick] The indentation of this <div> is inconsistent with surrounding template markup. Align it with the other template elements for readability.
<div class="pr-2">

.setSort('issue_date', true);
.setSort('issue_date', true)
.setFilters([
{ k: 'status', v: isAdminMode.value ? ['DONE', 'ADJUSTING'] : ['DONE'], o: '' },
Copy link

Copilot AI Jun 3, 2025

Choose a reason for hiding this comment

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

The filter object uses an empty operator (o: ''), which may not apply the intended filter. Consider using a valid operator like 'in' for array values.

Suggested change
{ k: 'status', v: isAdminMode.value ? ['DONE', 'ADJUSTING'] : ['DONE'], o: '' },
{ k: 'status', v: isAdminMode.value ? ['DONE', 'ADJUSTING'] : ['DONE'], o: 'in' },

Copilot uses AI. Check for mistakes.
Comment on lines +89 to +92
.setSort('issue_date', true)
.setFilters([
{ k: 'status', v: isAdminMode.value ? ['DONE', 'ADJUSTING'] : ['DONE'], o: '' },
]);
Copy link

Copilot AI Jun 3, 2025

Choose a reason for hiding this comment

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

The filters are applied once at initialization, so changes in isAdminMode won’t update the query at runtime. Consider watching isAdminMode and updating the query helper dynamically.

Suggested change
.setSort('issue_date', true)
.setFilters([
{ k: 'status', v: isAdminMode.value ? ['DONE', 'ADJUSTING'] : ['DONE'], o: '' },
]);
.setSort('issue_date', true);
const updateFilters = () => {
costReportListApiQueryHelper.setFilters([
{ k: 'status', v: isAdminMode.value ? ['DONE', 'ADJUSTING'] : ['DONE'], o: '' },
]);
};
updateFilters();
watch(isAdminMode, () => {
updateFilters();
});

Copilot uses AI. Check for mistakes.
<p-text-input v-model="item.amount"
type="number"
:placeholder="$t('COST_EXPLORER.ADVANCED_SETTINGS.AMOUNT')"
:invalid="!item.amount"
Copy link

Copilot AI Jun 3, 2025

Choose a reason for hiding this comment

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

This flags 0 as invalid but doesn’t account for negative or non-numeric values. Update to :invalid="Number(item.amount) <= 0" to match the positive-only requirement.

Suggested change
:invalid="!item.amount"
:invalid="Number(item.amount) <= 0"

Copilot uses AI. Check for mistakes.
@yuda110 yuda110 merged commit 46457db into master Jun 3, 2025
13 of 14 checks passed
@yuda110 yuda110 deleted the hotfix-cost-report branch June 3, 2025 02:13
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.

3 participants