-
Notifications
You must be signed in to change notification settings - Fork 40
Hotfix cost report #5915
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
Hotfix cost report #5915
Changes from all commits
f409cf3
d200f61
bc9a194
9ac01d1
4e20b67
a6596e8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -17,6 +17,7 @@ import type { KeyItemSet } from '@cloudforet/mirinae/types/controls/search/query | |||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| import { i18n } from '@/translations'; | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| import { useAppContextStore } from '@/store/app-context/app-context-store'; | ||||||||||||||||||||||||||||||||||||
| import { CURRENCY_SYMBOL } from '@/store/display/constant'; | ||||||||||||||||||||||||||||||||||||
| import type { Currency } from '@/store/display/type'; | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
|
|
@@ -34,6 +35,7 @@ import { useCostReportPageStore } from '@/services/cost-explorer/stores/cost-rep | |||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| const costReportPageStore = useCostReportPageStore(); | ||||||||||||||||||||||||||||||||||||
| const costReportPageState = costReportPageStore.state; | ||||||||||||||||||||||||||||||||||||
| const appContextStore = useAppContextStore(); | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| const state = reactive({ | ||||||||||||||||||||||||||||||||||||
| currency: computed(() => costReportPageState.costReportConfig?.currency || 'KRW' as Currency), | ||||||||||||||||||||||||||||||||||||
|
|
@@ -80,10 +82,14 @@ const tableState = reactive({ | |||||||||||||||||||||||||||||||||||
| workspace_name: makeDistinctValueHandler('cost_analysis.CostReport', 'workspace_name', 'string', [{ k: 'status', v: 'SUCCESS', o: 'eq' }]), | ||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||||||||||||||
| const isAdminMode = computed<boolean>(() => appContextStore.getters.isAdminMode); | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| const costReportListApiQueryHelper = new ApiQueryHelper() | ||||||||||||||||||||||||||||||||||||
| .setSort('issue_date', true); | ||||||||||||||||||||||||||||||||||||
| .setSort('issue_date', true) | ||||||||||||||||||||||||||||||||||||
| .setFilters([ | ||||||||||||||||||||||||||||||||||||
| { k: 'status', v: isAdminMode.value ? ['DONE', 'ADJUSTING'] : ['DONE'], o: '' }, | ||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
| { k: 'status', v: isAdminMode.value ? ['DONE', 'ADJUSTING'] : ['DONE'], o: '' }, | |
| { k: 'status', v: isAdminMode.value ? ['DONE', 'ADJUSTING'] : ['DONE'], o: 'in' }, |
Copilot
AI
Jun 3, 2025
There was a problem hiding this comment.
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.
| .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(); | |
| }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This flags
0as invalid but doesn’t account for negative or non-numeric values. Update to:invalid="Number(item.amount) <= 0"to match the positive-only requirement.