diff --git a/apps/web/src/api-clients/_common/constants/api-doc-constant.ts b/apps/web/src/api-clients/_common/constants/api-doc-constant.ts index 4f1340d26f..163634c799 100644 --- a/apps/web/src/api-clients/_common/constants/api-doc-constant.ts +++ b/apps/web/src/api-clients/_common/constants/api-doc-constant.ts @@ -95,6 +95,22 @@ export const API_DOC = { 'analyze', 'list', ], + 'report-adjustment-policy': [ + 'create', + 'delete', + 'get', + 'list', + 'update', + 'change-order', + ], + 'report-adjustment': [ + 'create', + 'delete', + 'get', + 'list', + 'update', + 'change-order', + ], 'data-source': [ 'get', 'list', diff --git a/apps/web/src/api-clients/cost-analysis/cost-report-config/composables/use-cost-report-config-api.ts b/apps/web/src/api-clients/cost-analysis/cost-report-config/composables/use-cost-report-config-api.ts index 49dc08c0c4..5ea33b9898 100644 --- a/apps/web/src/api-clients/cost-analysis/cost-report-config/composables/use-cost-report-config-api.ts +++ b/apps/web/src/api-clients/cost-analysis/cost-report-config/composables/use-cost-report-config-api.ts @@ -2,14 +2,15 @@ import { SpaceConnector } from '@cloudforet/core-lib/space-connector'; import type { ListResponse } from '@/api-clients/_common/schema/api-verbs/list'; import type { CostReportConfigListParameters } from '@/api-clients/cost-analysis/cost-report-config/schema/api-verbs/list'; +import type { CostReportConfigRunParameters } from '@/api-clients/cost-analysis/cost-report-config/schema/api-verbs/run'; import type { CostReportConfigUpdateParameters } from '@/api-clients/cost-analysis/cost-report-config/schema/api-verbs/update'; import type { CostReportConfigModel } from '@/api-clients/cost-analysis/cost-report-config/schema/model'; - interface UseCostReportConfigApiReturn { costReportConfigAPI: { update: (params: CostReportConfigUpdateParameters) => Promise; list: (params: CostReportConfigListParameters) => Promise>; + run: (params: CostReportConfigRunParameters) => Promise; } } @@ -17,6 +18,7 @@ export const useCostReportConfigApi = (): UseCostReportConfigApiReturn => { const actions = { update: SpaceConnector.clientV2.costAnalysis.costReportConfig.update, list: SpaceConnector.clientV2.costAnalysis.costReportConfig.list>, + run: SpaceConnector.clientV2.costAnalysis.costReportConfig.run, }; return { diff --git a/apps/web/src/api-clients/cost-analysis/cost-report-config/schema/api-verbs/list.ts b/apps/web/src/api-clients/cost-analysis/cost-report-config/schema/api-verbs/list.ts index 38b163aca8..f070ca1e9d 100644 --- a/apps/web/src/api-clients/cost-analysis/cost-report-config/schema/api-verbs/list.ts +++ b/apps/web/src/api-clients/cost-analysis/cost-report-config/schema/api-verbs/list.ts @@ -1,7 +1,10 @@ import type { Query } from '@cloudforet/core-lib/space-connector/type'; +import type { CostReportConfigStatus } from '@/api-clients/cost-analysis/cost-report-config/schema/type'; export interface CostReportConfigListParameters { query?: Query; cost_report_config_id?: string; + state?: CostReportConfigStatus; + scope?: 'WORKSPACE'|'PROJECT'; } diff --git a/apps/web/src/api-clients/cost-analysis/cost-report-config/schema/api-verbs/run.ts b/apps/web/src/api-clients/cost-analysis/cost-report-config/schema/api-verbs/run.ts new file mode 100644 index 0000000000..6d97a5138a --- /dev/null +++ b/apps/web/src/api-clients/cost-analysis/cost-report-config/schema/api-verbs/run.ts @@ -0,0 +1,3 @@ +export interface CostReportConfigRunParameters { + cost_report_config_id: string; +} diff --git a/apps/web/src/api-clients/cost-analysis/cost-report-config/schema/api-verbs/update.ts b/apps/web/src/api-clients/cost-analysis/cost-report-config/schema/api-verbs/update.ts index b7ed82087b..3013d98264 100644 --- a/apps/web/src/api-clients/cost-analysis/cost-report-config/schema/api-verbs/update.ts +++ b/apps/web/src/api-clients/cost-analysis/cost-report-config/schema/api-verbs/update.ts @@ -12,4 +12,8 @@ export interface CostReportConfigUpdateParameters { state: string; data_sources: string[]; }; + adjustment_options?: { + enabled: boolean; + period?: number; + }; } diff --git a/apps/web/src/api-clients/cost-analysis/cost-report-config/schema/model.ts b/apps/web/src/api-clients/cost-analysis/cost-report-config/schema/model.ts index ea49d24879..2ba5eeba57 100644 --- a/apps/web/src/api-clients/cost-analysis/cost-report-config/schema/model.ts +++ b/apps/web/src/api-clients/cost-analysis/cost-report-config/schema/model.ts @@ -20,6 +20,11 @@ export interface CostReportConfigModel { data_sources: string[]; }; language?: LanguageCode; + scope: 'WORKSPACE'|'PROJECT'; + adjustment_options?: { + enabled: boolean; + period: number; + }; domain_id: string; created_at: string; updated_at: string; diff --git a/apps/web/src/api-clients/cost-analysis/cost-report-data/schema/model.ts b/apps/web/src/api-clients/cost-analysis/cost-report-data/schema/model.ts index ab37f5dd01..554d00cefc 100644 --- a/apps/web/src/api-clients/cost-analysis/cost-report-data/schema/model.ts +++ b/apps/web/src/api-clients/cost-analysis/cost-report-data/schema/model.ts @@ -19,4 +19,8 @@ export interface CostReportDataModel { workspace_id: string; domain_id: string; created_at: string; + is_adjusted: boolean; + region_code: string; + region_key: string; + report_adjustment_policy_id: string; } diff --git a/apps/web/src/api-clients/cost-analysis/cost-report/schema/api-verbs/list.ts b/apps/web/src/api-clients/cost-analysis/cost-report/schema/api-verbs/list.ts index f8f3c6c36e..ea9ad0ff9a 100644 --- a/apps/web/src/api-clients/cost-analysis/cost-report/schema/api-verbs/list.ts +++ b/apps/web/src/api-clients/cost-analysis/cost-report/schema/api-verbs/list.ts @@ -5,8 +5,9 @@ import type { CostReportStatus } from '@/api-clients/cost-analysis/cost-report/s export interface CostReportListParameters { query?: Query; + cost_report_config_id?: string; cost_report_id?: string; status?: CostReportStatus; issue_date?: string; - workspace_name?: string; + name?: string; } diff --git a/apps/web/src/api-clients/cost-analysis/cost-report/schema/model.ts b/apps/web/src/api-clients/cost-analysis/cost-report/schema/model.ts index 42725077a8..9412f4494d 100644 --- a/apps/web/src/api-clients/cost-analysis/cost-report/schema/model.ts +++ b/apps/web/src/api-clients/cost-analysis/cost-report/schema/model.ts @@ -12,9 +12,12 @@ export interface CostReportModel { issue_date: string; report_year: string; report_month: string; - workspace_name: string; + name: string; cost_report_config_id: string; workspace_id: string; + project_id: string; + service_account_id: string; + is_adjusted: boolean; domain_id: string; bank_name: string; currency_date: string; diff --git a/apps/web/src/api-clients/cost-analysis/cost-report/schema/type.ts b/apps/web/src/api-clients/cost-analysis/cost-report/schema/type.ts index 2b8bff3058..b9fccf8e27 100644 --- a/apps/web/src/api-clients/cost-analysis/cost-report/schema/type.ts +++ b/apps/web/src/api-clients/cost-analysis/cost-report/schema/type.ts @@ -1 +1 @@ -export type CostReportStatus = 'IN_PROGRESS' | 'SUCCESS'; +export type CostReportStatus = 'IN_PROGRESS' | 'ADJUSTING' | 'DONE'; diff --git a/apps/web/src/api-clients/cost-analysis/report-adjustment-policy/composables/use-report-adjustment-policy-api.ts b/apps/web/src/api-clients/cost-analysis/report-adjustment-policy/composables/use-report-adjustment-policy-api.ts new file mode 100644 index 0000000000..16e842aa1c --- /dev/null +++ b/apps/web/src/api-clients/cost-analysis/report-adjustment-policy/composables/use-report-adjustment-policy-api.ts @@ -0,0 +1,41 @@ +import { SpaceConnector } from '@cloudforet/core-lib/space-connector'; + +import type { ListResponse } from '@/api-clients/_common/schema/api-verbs/list'; +import type { ReportAdjustmentPolicyChangeOrderParameters } from '@/api-clients/cost-analysis/report-adjustment-policy/schema/api-verbs/change-order'; +import type { ReportAdjustmentPolicyCreateParameters } from '@/api-clients/cost-analysis/report-adjustment-policy/schema/api-verbs/create'; +import type { ReportAdjustmentPolicyDeleteParameters } from '@/api-clients/cost-analysis/report-adjustment-policy/schema/api-verbs/delete'; +import type { ReportAdjustmentPolicyGetParameters } from '@/api-clients/cost-analysis/report-adjustment-policy/schema/api-verbs/get'; +import type { ReportAdjustmentPolicyListParameters } from '@/api-clients/cost-analysis/report-adjustment-policy/schema/api-verbs/list'; +import type { ReportAdjustmentPolicySyncCurrencyParameters } from '@/api-clients/cost-analysis/report-adjustment-policy/schema/api-verbs/sync-currency'; +import type { ReportAdjustmentPolicyUpdateParameters } from '@/api-clients/cost-analysis/report-adjustment-policy/schema/api-verbs/update'; +import type { ReportAdjustmentPolicyModel } from '@/api-clients/cost-analysis/report-adjustment-policy/schema/model'; + + + +interface UseReportAdjustmentPolicyApiReturn { + reportAdjustmentPolicyAPI: { + update: (params: ReportAdjustmentPolicyUpdateParameters) => Promise; + list: (params: ReportAdjustmentPolicyListParameters) => Promise>; + create: (params: ReportAdjustmentPolicyCreateParameters) => Promise; + delete: (params: ReportAdjustmentPolicyDeleteParameters) => Promise; + changeOrder: (params: ReportAdjustmentPolicyChangeOrderParameters) => Promise; + get: (params: ReportAdjustmentPolicyGetParameters) => Promise; + syncCurrency: (params: ReportAdjustmentPolicySyncCurrencyParameters) => Promise; + } +} + +export const useReportAdjustmentPolicyApi = (): UseReportAdjustmentPolicyApiReturn => { + const actions = { + update: SpaceConnector.clientV2.costAnalysis.reportAdjustmentPolicy.update, + list: SpaceConnector.clientV2.costAnalysis.reportAdjustmentPolicy.list>, + create: SpaceConnector.clientV2.costAnalysis.reportAdjustmentPolicy.create, + delete: SpaceConnector.clientV2.costAnalysis.reportAdjustmentPolicy.delete, + changeOrder: SpaceConnector.clientV2.costAnalysis.reportAdjustmentPolicy.changeOrder, + get: SpaceConnector.clientV2.costAnalysis.reportAdjustmentPolicy.get, + syncCurrency: SpaceConnector.clientV2.costAnalysis.reportAdjustmentPolicy.syncCurrency, + }; + + return { + reportAdjustmentPolicyAPI: actions, + }; +}; diff --git a/apps/web/src/api-clients/cost-analysis/report-adjustment-policy/schema/api-verbs/change-order.ts b/apps/web/src/api-clients/cost-analysis/report-adjustment-policy/schema/api-verbs/change-order.ts new file mode 100644 index 0000000000..ca31ae0d29 --- /dev/null +++ b/apps/web/src/api-clients/cost-analysis/report-adjustment-policy/schema/api-verbs/change-order.ts @@ -0,0 +1,4 @@ +export interface ReportAdjustmentPolicyChangeOrderParameters { + report_adjustment_policy_id: string; + order: number; +} diff --git a/apps/web/src/api-clients/cost-analysis/report-adjustment-policy/schema/api-verbs/create.ts b/apps/web/src/api-clients/cost-analysis/report-adjustment-policy/schema/api-verbs/create.ts new file mode 100644 index 0000000000..e9729a1c71 --- /dev/null +++ b/apps/web/src/api-clients/cost-analysis/report-adjustment-policy/schema/api-verbs/create.ts @@ -0,0 +1,11 @@ +import type { Tags } from '@/api-clients/_common/schema/model'; +import type { ReportAdjustmentPolicyFilter } from '@/api-clients/cost-analysis/report-adjustment-policy/schema/type'; + + +export interface ReportAdjustmentPolicyCreateParameters { + cost_report_config_id: string; + order?: number; + description?: string; + tags?: Tags; + policy_filter: ReportAdjustmentPolicyFilter; +} diff --git a/apps/web/src/api-clients/cost-analysis/report-adjustment-policy/schema/api-verbs/delete.ts b/apps/web/src/api-clients/cost-analysis/report-adjustment-policy/schema/api-verbs/delete.ts new file mode 100644 index 0000000000..d200b28df2 --- /dev/null +++ b/apps/web/src/api-clients/cost-analysis/report-adjustment-policy/schema/api-verbs/delete.ts @@ -0,0 +1,3 @@ +export interface ReportAdjustmentPolicyDeleteParameters { + report_adjustment_policy_id: string; +} diff --git a/apps/web/src/api-clients/cost-analysis/report-adjustment-policy/schema/api-verbs/get.ts b/apps/web/src/api-clients/cost-analysis/report-adjustment-policy/schema/api-verbs/get.ts new file mode 100644 index 0000000000..06a3729173 --- /dev/null +++ b/apps/web/src/api-clients/cost-analysis/report-adjustment-policy/schema/api-verbs/get.ts @@ -0,0 +1,3 @@ +export interface ReportAdjustmentPolicyGetParameters { + report_adjustment_policy_id: string; +} diff --git a/apps/web/src/api-clients/cost-analysis/report-adjustment-policy/schema/api-verbs/list.ts b/apps/web/src/api-clients/cost-analysis/report-adjustment-policy/schema/api-verbs/list.ts new file mode 100644 index 0000000000..45d2e77941 --- /dev/null +++ b/apps/web/src/api-clients/cost-analysis/report-adjustment-policy/schema/api-verbs/list.ts @@ -0,0 +1,6 @@ +import type { Query } from '@cloudforet/core-lib/space-connector/type'; + + +export interface ReportAdjustmentPolicyListParameters { + query?: Query; +} diff --git a/apps/web/src/api-clients/cost-analysis/report-adjustment-policy/schema/api-verbs/sync-currency.ts b/apps/web/src/api-clients/cost-analysis/report-adjustment-policy/schema/api-verbs/sync-currency.ts new file mode 100644 index 0000000000..5b932e4afe --- /dev/null +++ b/apps/web/src/api-clients/cost-analysis/report-adjustment-policy/schema/api-verbs/sync-currency.ts @@ -0,0 +1,3 @@ +export interface ReportAdjustmentPolicySyncCurrencyParameters { + report_adjustment_policy_id: string; +} diff --git a/apps/web/src/api-clients/cost-analysis/report-adjustment-policy/schema/api-verbs/update.ts b/apps/web/src/api-clients/cost-analysis/report-adjustment-policy/schema/api-verbs/update.ts new file mode 100644 index 0000000000..b6f5ff61e1 --- /dev/null +++ b/apps/web/src/api-clients/cost-analysis/report-adjustment-policy/schema/api-verbs/update.ts @@ -0,0 +1,9 @@ +import type { Tags } from '@/api-clients/_common/schema/model'; +import type { ReportAdjustmentPolicyFilter } from '@/api-clients/cost-analysis/report-adjustment-policy/schema/type'; + +export interface ReportAdjustmentPolicyUpdateParameters { + report_adjustment_policy_id: string; + description?: string; + policy_filter?: ReportAdjustmentPolicyFilter; + tags?: Tags; +} diff --git a/apps/web/src/api-clients/cost-analysis/report-adjustment-policy/schema/model.ts b/apps/web/src/api-clients/cost-analysis/report-adjustment-policy/schema/model.ts new file mode 100644 index 0000000000..98454240e3 --- /dev/null +++ b/apps/web/src/api-clients/cost-analysis/report-adjustment-policy/schema/model.ts @@ -0,0 +1,18 @@ +import type { Tags } from '@/api-clients/_common/schema/model'; +import type { ReportAdjustmentPolicyFilter, ReportAdjustmentPolicyScope } from '@/api-clients/cost-analysis/report-adjustment-policy/schema/type'; + +export interface ReportAdjustmentPolicyModel { + report_adjustment_policy_id: string; + description: string; + scope: ReportAdjustmentPolicyScope; + order: number; + adjustments: string[]; + tags: Tags; + policy_filter: ReportAdjustmentPolicyFilter; + cost_report_config_id: string; + domain_id: string; + workspace_id: string; + project_id: string; + created_at: string; + updated_at: string; +} diff --git a/apps/web/src/api-clients/cost-analysis/report-adjustment-policy/schema/type.ts b/apps/web/src/api-clients/cost-analysis/report-adjustment-policy/schema/type.ts new file mode 100644 index 0000000000..0fd1175bde --- /dev/null +++ b/apps/web/src/api-clients/cost-analysis/report-adjustment-policy/schema/type.ts @@ -0,0 +1,6 @@ +export type ReportAdjustmentPolicyScope = 'WORKSPACE'|'PROJECT'|'SERVICE_ACCOUNT'; + +export type ReportAdjustmentPolicyFilter = { + workspace_ids?: string[]; + project_ids?: string[]; +}; diff --git a/apps/web/src/api-clients/cost-analysis/report-adjustment/composables/use-report-adjustment-api.ts b/apps/web/src/api-clients/cost-analysis/report-adjustment/composables/use-report-adjustment-api.ts new file mode 100644 index 0000000000..79ed4e464c --- /dev/null +++ b/apps/web/src/api-clients/cost-analysis/report-adjustment/composables/use-report-adjustment-api.ts @@ -0,0 +1,36 @@ +import { SpaceConnector } from '@cloudforet/core-lib/space-connector'; + +import type { ListResponse } from '@/api-clients/_common/schema/api-verbs/list'; +import type { ReportAdjustmentChangeOrderParameters } from '@/api-clients/cost-analysis/report-adjustment/schema/api-verbs/change-order'; +import type { ReportAdjustmentCreateParameters } from '@/api-clients/cost-analysis/report-adjustment/schema/api-verbs/create'; +import type { ReportAdjustmentDeleteParameters } from '@/api-clients/cost-analysis/report-adjustment/schema/api-verbs/delete'; +import type { ReportAdjustmentGetParameters } from '@/api-clients/cost-analysis/report-adjustment/schema/api-verbs/get'; +import type { ReportAdjustmentListParameters } from '@/api-clients/cost-analysis/report-adjustment/schema/api-verbs/list'; +import type { ReportAdjustmentUpdateParameters } from '@/api-clients/cost-analysis/report-adjustment/schema/api-verbs/update'; +import type { ReportAdjustmentModel } from '@/api-clients/cost-analysis/report-adjustment/schema/model'; + +interface UseReportAdjustmentApiReturn { + reportAdjustmentAPI: { + update: (params: ReportAdjustmentUpdateParameters) => Promise; + list: (params: ReportAdjustmentListParameters) => Promise>; + create: (params: ReportAdjustmentCreateParameters) => Promise; + delete: (params: ReportAdjustmentDeleteParameters) => Promise; + changeOrder: (params: ReportAdjustmentChangeOrderParameters) => Promise; + get: (params: ReportAdjustmentGetParameters) => Promise; + } +} + +export const useReportAdjustmentApi = (): UseReportAdjustmentApiReturn => { + const actions = { + update: SpaceConnector.clientV2.costAnalysis.reportAdjustment.update, + list: SpaceConnector.clientV2.costAnalysis.reportAdjustment.list>, + create: SpaceConnector.clientV2.costAnalysis.reportAdjustment.create, + delete: SpaceConnector.clientV2.costAnalysis.reportAdjustment.delete, + changeOrder: SpaceConnector.clientV2.costAnalysis.reportAdjustment.changeOrder, + get: SpaceConnector.clientV2.costAnalysis.reportAdjustment.get, + }; + + return { + reportAdjustmentAPI: actions, + }; +}; diff --git a/apps/web/src/api-clients/cost-analysis/report-adjustment/schema/api-verbs/change-order.ts b/apps/web/src/api-clients/cost-analysis/report-adjustment/schema/api-verbs/change-order.ts new file mode 100644 index 0000000000..63d2c870ed --- /dev/null +++ b/apps/web/src/api-clients/cost-analysis/report-adjustment/schema/api-verbs/change-order.ts @@ -0,0 +1,4 @@ +export interface ReportAdjustmentChangeOrderParameters { + report_adjustment_id: string; + order: number; +} diff --git a/apps/web/src/api-clients/cost-analysis/report-adjustment/schema/api-verbs/create.ts b/apps/web/src/api-clients/cost-analysis/report-adjustment/schema/api-verbs/create.ts new file mode 100644 index 0000000000..363e081826 --- /dev/null +++ b/apps/web/src/api-clients/cost-analysis/report-adjustment/schema/api-verbs/create.ts @@ -0,0 +1,14 @@ +import type { ReportAdjustmentUnit } from '@/api-clients/cost-analysis/report-adjustment/schema/type'; + + +export interface ReportAdjustmentCreateParameters { + name: string; + unit: ReportAdjustmentUnit; + value: number; + report_adjustment_policy_id: string; + provider: string; + description?: string; + currency?: string; + order?: number; + adjustment_filter?: Record; +} diff --git a/apps/web/src/api-clients/cost-analysis/report-adjustment/schema/api-verbs/delete.ts b/apps/web/src/api-clients/cost-analysis/report-adjustment/schema/api-verbs/delete.ts new file mode 100644 index 0000000000..6899fdc7aa --- /dev/null +++ b/apps/web/src/api-clients/cost-analysis/report-adjustment/schema/api-verbs/delete.ts @@ -0,0 +1,3 @@ +export interface ReportAdjustmentDeleteParameters { + report_adjustment_id: string; +} diff --git a/apps/web/src/api-clients/cost-analysis/report-adjustment/schema/api-verbs/get.ts b/apps/web/src/api-clients/cost-analysis/report-adjustment/schema/api-verbs/get.ts new file mode 100644 index 0000000000..4e54dce984 --- /dev/null +++ b/apps/web/src/api-clients/cost-analysis/report-adjustment/schema/api-verbs/get.ts @@ -0,0 +1,3 @@ +export interface ReportAdjustmentGetParameters { + report_adjustment_id: string; +} diff --git a/apps/web/src/api-clients/cost-analysis/report-adjustment/schema/api-verbs/list.ts b/apps/web/src/api-clients/cost-analysis/report-adjustment/schema/api-verbs/list.ts new file mode 100644 index 0000000000..5bed4bbc30 --- /dev/null +++ b/apps/web/src/api-clients/cost-analysis/report-adjustment/schema/api-verbs/list.ts @@ -0,0 +1,10 @@ +import type { Query } from '@cloudforet/core-lib/space-connector/type'; + + +export interface ReportAdjustmentListParameters { + query?: Query; + provider?: string; + report_adjustment_id?: string; + report_adjustment_policy_id?: string; + cost_report_config_id?: string; +} diff --git a/apps/web/src/api-clients/cost-analysis/report-adjustment/schema/api-verbs/update.ts b/apps/web/src/api-clients/cost-analysis/report-adjustment/schema/api-verbs/update.ts new file mode 100644 index 0000000000..9569574ae6 --- /dev/null +++ b/apps/web/src/api-clients/cost-analysis/report-adjustment/schema/api-verbs/update.ts @@ -0,0 +1,12 @@ +import type { ReportAdjustmentUnit } from '@/api-clients/cost-analysis/report-adjustment/schema/type'; + + +export interface ReportAdjustmentUpdateParameters { + report_adjustment_id: string; + name?: string; + unit?: ReportAdjustmentUnit; + value?: number; + description?: string; + provider?: string; + adjustment_filter?: Record; +} diff --git a/apps/web/src/api-clients/cost-analysis/report-adjustment/schema/model.ts b/apps/web/src/api-clients/cost-analysis/report-adjustment/schema/model.ts new file mode 100644 index 0000000000..76b32be47f --- /dev/null +++ b/apps/web/src/api-clients/cost-analysis/report-adjustment/schema/model.ts @@ -0,0 +1,20 @@ +import type { ReportAdjustmentUnit } from '@/api-clients/cost-analysis/report-adjustment/schema/type'; + +export interface ReportAdjustmentModel { + report_adjustment_id: string; + name: string; + unit: ReportAdjustmentUnit; + value: number; + description: string; + provider: string; + currency: string; + order: number; + adjustment_filter: Record; + cost_report_config_id: string; + report_adjustment_policy_id: string; + domain_id: string; + workspace_id: string; + project_id: string; + created_at: string; + updated_at: string; +} diff --git a/apps/web/src/api-clients/cost-analysis/report-adjustment/schema/type.ts b/apps/web/src/api-clients/cost-analysis/report-adjustment/schema/type.ts new file mode 100644 index 0000000000..600777242d --- /dev/null +++ b/apps/web/src/api-clients/cost-analysis/report-adjustment/schema/type.ts @@ -0,0 +1 @@ +export type ReportAdjustmentUnit = 'FIXED' | 'PERCENT'; diff --git a/apps/web/src/common/pages/CostReportDetailPage.vue b/apps/web/src/common/pages/CostReportDetailPage.vue index c22d418eb1..fc8d542813 100644 --- a/apps/web/src/common/pages/CostReportDetailPage.vue +++ b/apps/web/src/common/pages/CostReportDetailPage.vue @@ -4,14 +4,17 @@ import { useRouter } from 'vue-router/composables'; import dayjs from 'dayjs'; import type { PieSeriesOption } from 'echarts/charts'; +import type { EChartsType, ComposeOption } from 'echarts/core'; import { init } from 'echarts/core'; import { - sortBy, sum, + groupBy, sum, } from 'lodash'; import { SpaceConnector } from '@cloudforet/core-lib/space-connector'; -import { PLink, PDataTable, PIconButton } from '@cloudforet/mirinae'; -import type { DataTableFieldType } from '@cloudforet/mirinae/types/data-display/tables/data-table/type'; +import { + PLink, PDataTable, PIconButton, PI, PButton, +} from '@cloudforet/mirinae'; +import type { DataTableFieldType, DataTableField } from '@cloudforet/mirinae/types/data-display/tables/data-table/type'; import { numberFormatter } from '@cloudforet/utils'; import type { AnalyzeResponse } from '@/api-clients/_common/schema/api-verbs/analyze'; @@ -34,13 +37,11 @@ import { currencyMoneyFormatter } from '@/lib/helper/currency-helper'; import TableHeader from '@/common/components/cost-report-page/table-header.vue'; import ErrorHandler from '@/common/composables/error/errorHandler'; -import { gray } from '@/styles/colors'; import { MASSIVE_CHART_COLORS } from '@/styles/colorsets'; import ConsoleLogo from '@/services/auth/components/ConsoleLogo.vue'; - const router = useRouter(); type CostReportDataAnalyzeResult = { @@ -51,6 +52,21 @@ type CostReportDataAnalyzeResult = { }>|number; _total_value_sum?: number; }; + +type AdjustmentProductData = Array<{ + product: string; + value: number; +}>; +type CostReportDataAnalyzeResultByProduct = { + [provider: string]: { + [serviceAccount: string]: Array<{ + [product: string]: CostReportDataAnalyzeResult; + }>; + }; +}; +type CostReportAdjustedDataAnalyzeResultByProvider = { + [provider: string]: CostReportDataAnalyzeResult[]; +}; interface Props { accessToken?: string; costReportId?: string; @@ -79,93 +95,103 @@ const storeState = reactive({ const state = reactive({ loading: true, baseInfo: undefined as CostReportModel|undefined, - currency: computed(() => state.baseInfo?.currency ?? 'USD'), isExpired: false, - reportDateRage: computed(() => { - const baseDate = dayjs(state.baseInfo?.issue_date); - if (!baseDate) return ''; - const lastMonth = baseDate.subtract(1, 'month'); - const startDate = lastMonth.startOf('month').format('YYYY-MM-DD'); - const endDate = lastMonth.endOf('month').format('YYYY-MM-DD'); - return `${startDate} ~ ${endDate}`; - }), - totalCost: computed(() => sum(tableState.costByProduct.map((d) => d._total_value_sum))), - chartOptions: computed(() => ({ - color: MASSIVE_CHART_COLORS, - grid: { - containLabel: true, - }, - tooltip: { - trigger: 'item', - position: 'inside', - formatter: (params) => { - const _name = storeState.providers[params.name]?.label ?? params.name; - const _value = numberFormatter(params.value) || ''; - return `${params.marker} ${_name}: ${_value}`; - }, - }, - legend: { - show: false, - }, - series: [ - { - type: 'pie', - radius: ['30%', '70%'], - center: ['30%', '50%'], - data: state.chartData, - emphasis: { - itemStyle: { - shadowBlur: 10, - shadowOffsetX: 0, - shadowColor: 'rgba(0, 0, 0, 0.5)', - }, - }, - avoidLabelOverlap: false, - label: { - show: false, - }, - }, - ], - })), - chartData: [], - numberFormatterOption: computed(() => ({ currency: state.currency, style: 'decimal', notation: 'standard' })), + chartData: [] as Array<{ name: string; value: number | undefined; itemStyle: { color: string } }>, + chart: null as EChartsType | null, printMode: false, + providerRawData: [] as CostReportDataAnalyzeResult[], + productRawData: [] as CostReportDataAnalyzeResult[], + projectRawData: [] as CostReportDataAnalyzeResult[], + collapsedState: {} as Record, }); const ETC = config.get('COST_REPORT.ETC_CUSTOM_LABEL') ?? 'ETC'; - -const tableState = reactive({ - costByProduct: [] as CostReportDataAnalyzeResult[], - costByProject: [] as CostReportDataAnalyzeResult[], - costByServiceAccount: [] as CostReportDataAnalyzeResult[], - costByProductFields: computed(() => makeTableFields({ - name: 'product', - label: 'Product', - }, state.baseInfo?.currency)), - costByServiceAccountFields: computed(() => makeTableFields({ - name: 'service_account_name', - label: 'Service Account Name', - }, state.baseInfo?.currency)), - costByProjectFields: computed(() => makeTableFields({ - name: 'project_name', - label: 'Project', - }, state.baseInfo?.currency, 'value_sum')), - costByProviderFields: computed(() => ([ - { - name: 'provider', - label: 'Provider', +const currency = computed(() => state.baseInfo?.currency ?? 'USD'); +const numberFormatterOption = computed(() => ({ currency: currency.value, style: 'decimal', notation: 'standard' })); +const totalCost = computed(() => sum(costByProviderTableData.value.map((d) => d.value_sum))); +const reportDateRange = computed(() => { + const baseDate = dayjs(state.baseInfo?.issue_date); + if (!baseDate) return ''; + const lastMonth = baseDate.subtract(1, 'month'); + const startDate = lastMonth.startOf('month').format('YYYY-MM-DD'); + const endDate = lastMonth.endOf('month').format('YYYY-MM-DD'); + return `${startDate} ~ ${endDate}`; +}); +const chartOptions = computed>(() => ({ + color: MASSIVE_CHART_COLORS, + grid: { + containLabel: true, + }, + tooltip: { + trigger: 'item', + position: 'inside', + formatter: (params) => { + const _name = storeState.providers[params.name]?.label ?? params.name; + const _value = numberFormatter(params.value) || ''; + return `${params.marker} ${_name}: ${_value}`; }, + }, + legend: { + show: false, + }, + series: [ { - name: '_total_value_sum', - label: `Amount (${CURRENCY_SYMBOL[state.baseInfo?.currency]})`, - textAlign: 'right', - sortable: false, + type: 'pie', + radius: ['30%', '70%'], + center: ['50%', '50%'], + data: state.chartData, + emphasis: { + itemStyle: { + shadowBlur: 10, + shadowOffsetX: 0, + shadowColor: 'rgba(0, 0, 0, 0.5)', + }, + }, + avoidLabelOverlap: false, + label: { + show: false, + }, }, - ])), + ], +})); +const costByProductFields = computed(() => makeTableFields({ + name: 'product', + label: 'Product', +})); +const costByProjectFields = computed(() => makeTableFields({ + name: 'project_name', + label: 'Project', +}, '_total_value_sum')); +const costByProviderFields = computed(() => ([ + { + name: 'provider', + label: 'Provider', + }, + { + name: 'value_sum', + label: `Amount (${CURRENCY_SYMBOL[currency.value]})`, + textAlign: 'right', + sortable: false, + }, +])); +const costByProductTableData = computed(() => getConvertedProductTableData(state.productRawData)); +const costByProviderTableData = computed(() => state.providerRawData); +const costByProjectTableData = computed(() => state.projectRawData.filter((d) => !d.is_adjusted)); +const adjustedProviderData = computed(() => { + const results: CostReportAdjustedDataAnalyzeResultByProvider = {}; + const adjustedData = state.productRawData.filter((d) => d.is_adjusted); + adjustedData.forEach((d) => { + results[d.provider] = d.value_sum; + }); + return results; +}); +const adjustedProjectData = computed(() => { + const adjustedData = state.projectRawData.filter((d) => d.is_adjusted); + if (adjustedData.length === 0) return []; + return adjustedData[0].value_sum; }); - /* Util */ -const makeTableFields = (customField:DataTableFieldType, currency:string, valueFieldName = 'value') => ([ +const makeTableFields = (customField:DataTableFieldType, valueFieldName = 'value'): DataTableField[] => ([ { name: 'index', label: 'no', @@ -178,32 +204,37 @@ const makeTableFields = (customField:DataTableFieldType, currency:string, valueF }, { name: valueFieldName, - label: `Amount (${CURRENCY_SYMBOL[currency]})`, + label: `Amount (${CURRENCY_SYMBOL[currency.value]})`, textAlign: 'right', sortable: false, }, ]); -const getSortedTableData = (rawData: CostReportDataAnalyzeResult[]):CostReportDataAnalyzeResult[] => { - const results: CostReportDataAnalyzeResult[] = []; - rawData.forEach((data) => { - results.push({ - ...data, - value_sum: sortBy(data.value_sum, 'value').reverse(), +const getConvertedProductTableData = (rawData: CostReportDataAnalyzeResult[]): CostReportDataAnalyzeResultByProduct => { + const results: CostReportDataAnalyzeResultByProduct = {}; + const originalData = rawData.filter((d) => !d.is_adjusted); + const providerGroupBy = groupBy(originalData, 'provider'); + Object.entries(providerGroupBy).forEach(([provider, providerData]) => { + const accountGroupBy = groupBy(providerData, 'service_account_name'); + Object.entries(accountGroupBy).forEach(([account, accountData]) => { + results[provider] = { + ...(results[provider] ?? {}), + [account]: accountData[0].value_sum?.sort((a, b) => b.value - a.value), + }; }); }); return results; }; const drawChart = () => { - state.chartData = tableState.costByProduct.map((d) => ({ + state.chartData = costByProviderTableData.value.map((d) => ({ name: d.provider, - value: d._total_value_sum, + value: typeof d.value_sum === 'number' ? d.value_sum : 0, itemStyle: { color: storeState.providers[d.provider]?.color, }, })); state.chart = init(chartContext.value); - state.chart.setOption(state.chartOptions, true); + state.chart.setOption(chartOptions.value, true); }; /* Api */ @@ -220,19 +251,19 @@ const fetchReportData = async () => { } }; -const fetchAnalyzeData = async (groupBy: string[], fieldGroup?: string[]):Promise|undefined> => { +const fetchAnalyzeData = async (_groupBy: string[], fieldGroup?: string[]):Promise|undefined> => { try { return await SpaceConnector.clientV2.costAnalysis.costReportData.analyze>({ is_confirmed: true, query: { - group_by: groupBy, + group_by: _groupBy, fields: { value_sum: { key: `cost.${state.baseInfo?.currency}`, operator: 'sum', }, }, - field_group: fieldGroup, + field_group: fieldGroup ?? [], filter: [ { k: 'cost_report_config_id', @@ -245,7 +276,7 @@ const fetchAnalyzeData = async (groupBy: string[], fieldGroup?: string[]):Promis o: 'eq', }, ], - sort: [{ key: '_total_value_sum', desc: true }, { key: 'value_sum', desc: true }, { key: 'value', desc: true }], + sort: [{ key: 'value_sum', desc: true }, { key: 'value', desc: true }], }, }); } catch (e: any) { @@ -267,15 +298,17 @@ const initStatesByUrlSSOToken = async ():Promise => { }; const fetchTableData = async () => { - const results = await Promise.allSettled|undefined>([ - fetchAnalyzeData(['provider', 'product'], ['product']), - fetchAnalyzeData(['project_name']), - fetchAnalyzeData(['provider', 'service_account_name'], ['service_account_name']), + const results = await Promise.allSettled([ + fetchAnalyzeData(['provider']), + fetchAnalyzeData(['provider', 'service_account_name', 'product', 'is_adjusted'], ['product']), + fetchAnalyzeData(['project_name', 'product', 'is_adjusted'], ['product']), ]); - const [costByProduct, costByProject, costByServiceAccount] = results; - tableState.costByProduct = getSortedTableData(costByProduct?.value?.results ?? []); - tableState.costByProject = costByProject?.value?.results ?? []; - tableState.costByServiceAccount = getSortedTableData(costByServiceAccount?.value?.results ?? []); + const [costByProvider, costByProduct, costByProject] = results + .filter((r) => r.status === 'fulfilled') + .map((r) => r.value); + state.providerRawData = costByProvider?.results ?? []; + state.productRawData = costByProduct?.results ?? []; + state.projectRawData = costByProject?.results ?? []; }; const setMetaTag = () => { @@ -297,6 +330,22 @@ const handlePrint = () => { window.print(); }; +const handleToggleServiceAccountCollapsed = (provider: string, serviceAccount: string) => { + state.collapsedState = { + ...state.collapsedState, + [`${provider}-${serviceAccount}`]: !state.collapsedState[`${provider}-${serviceAccount}`], + }; +}; + +const handleCollapseAll = () => { + state.collapsedState = Object.keys(costByProductTableData.value).reduce((acc, key) => { + Object.keys(costByProductTableData.value[key]).forEach((serviceAccount) => { + acc[`${key}-${serviceAccount}`] = true; + }); + return acc; + }, {} as Record); +}; + (async () => { setMetaTag(); state.loading = true; @@ -314,8 +363,8 @@ const handlePrint = () => { - diff --git a/apps/web/src/services/cost-explorer/routes/admin/route-constant.ts b/apps/web/src/services/cost-explorer/routes/admin/route-constant.ts index 2592012411..c17cd1e0e3 100644 --- a/apps/web/src/services/cost-explorer/routes/admin/route-constant.ts +++ b/apps/web/src/services/cost-explorer/routes/admin/route-constant.ts @@ -23,7 +23,5 @@ export const ADMIN_COST_EXPLORER_ROUTE = { }, COST_ADVANCED_SETTINGS: { _NAME: `admin.${MENU_ID.COST_EXPLORER}.${MENU_ID.COST_ADVANCED_SETTINGS}`, - ANOMALY_DETECTION_DOMAIN_CONFIGURATION: { _NAME: `admin.${MENU_ID.COST_EXPLORER}.${MENU_ID.COST_ADVANCED_SETTINGS}.${MENU_ID.ANOMALY_DETECTION_DOMAIN_CONFIGURATION}` }, - CURRENCY_CONVERTER: { _NAME: `admin.${MENU_ID.COST_EXPLORER}.${MENU_ID.COST_ADVANCED_SETTINGS}.${MENU_ID.CURRENCY_CONVERTER}` }, }, } as const; diff --git a/apps/web/src/services/cost-explorer/routes/admin/routes.ts b/apps/web/src/services/cost-explorer/routes/admin/routes.ts index 4138b03a99..55d0a149ba 100644 --- a/apps/web/src/services/cost-explorer/routes/admin/routes.ts +++ b/apps/web/src/services/cost-explorer/routes/admin/routes.ts @@ -16,15 +16,11 @@ import { DYNAMIC_COST_QUERY_SET_PARAMS, MANAGED_COST_QUERY_SET_IDS } from '@/ser import CostExplorerHome from '@/services/cost-explorer/pages/CostExplorerHome.vue'; import { ADMIN_COST_EXPLORER_ROUTE } from '@/services/cost-explorer/routes/admin/route-constant'; -const CostAdvancedSettingsContainer = () => import('@/services/cost-explorer/components/CostAdvancedSettingsContainer.vue'); - const CostExplorerContainer = () => import('@/services/cost-explorer/CostExplorerContainer.vue'); +const AdminAdvancedSettingsPage = () => import('@/services/cost-explorer/pages/admin/AdminAdvancedSettingsPage.vue'); const AdminBudgetMainPage = () => import('@/services/cost-explorer/pages/admin/AdminBudgetMainPage.vue'); -// const AdminBudgetCreatePage = () => import('@/services/cost-explorer/pages/admin/AdminBudgetCreatePage.vue'); const AdminBudgetDetailPage = () => import('@/services/cost-explorer/pages/admin/AdminBudgetDetailPage.vue'); -const AdminDomainSettingsAnomalyDetectionConfigurationPage = () => import('@/services/cost-explorer/pages/admin/AdminAdvancedSettingsAnomalyDetectionConfigurationPage.vue'); -const AdminDomainSettingsCurrencyConverterPage = () => import('@/services/cost-explorer/pages/admin/AdminAdvancedSettingsCurrencyConverterPage.vue'); const AdminCostAnalysisPage = () => import('@/services/cost-explorer/pages/admin/AdminCostAnalysisPage.vue'); const CostReportPage = () => import('@/services/cost-explorer/pages/CostReportPage.vue'); @@ -213,24 +209,7 @@ const adminCostExplorerRoutes: RouteConfig = { menuId: MENU_ID.COST_ADVANCED_SETTINGS, translationId: MENU_INFO_MAP[MENU_ID.COST_ADVANCED_SETTINGS].translationId, }, - redirect: () => ({ - name: ADMIN_COST_EXPLORER_ROUTE.COST_ADVANCED_SETTINGS.ANOMALY_DETECTION_DOMAIN_CONFIGURATION._NAME, - }), - component: CostAdvancedSettingsContainer, - children: [ - { - path: 'anomaly-detection-configuration', - name: ADMIN_COST_EXPLORER_ROUTE.COST_ADVANCED_SETTINGS.ANOMALY_DETECTION_DOMAIN_CONFIGURATION._NAME, - meta: { lsbVisible: true, translationId: MENU_INFO_MAP[MENU_ID.ANOMALY_DETECTION_DOMAIN_CONFIGURATION].translationId, menuId: MENU_ID.ANOMALY_DETECTION_DOMAIN_CONFIGURATION }, - component: AdminDomainSettingsAnomalyDetectionConfigurationPage, - }, - { - path: 'currency-converter', - name: ADMIN_COST_EXPLORER_ROUTE.COST_ADVANCED_SETTINGS.CURRENCY_CONVERTER._NAME, - meta: { lsbVisible: true, translationId: MENU_INFO_MAP[MENU_ID.CURRENCY_CONVERTER].translationId, menuId: MENU_ID.CURRENCY_CONVERTER }, - component: AdminDomainSettingsCurrencyConverterPage, - }, - ], + component: AdminAdvancedSettingsPage as any, }, ], }; diff --git a/apps/web/src/services/cost-explorer/stores/advanced-settings-page-store.ts b/apps/web/src/services/cost-explorer/stores/advanced-settings-page-store.ts new file mode 100644 index 0000000000..0ea5a09b9e --- /dev/null +++ b/apps/web/src/services/cost-explorer/stores/advanced-settings-page-store.ts @@ -0,0 +1,74 @@ +import { cloneDeep } from 'lodash'; +import { defineStore } from 'pinia'; + +import getRandomId from '@/lib/random-id-generator'; + +import type { AdjustmentData, AdjustmentPolicyData } from '@/services/cost-explorer/types/report-adjustment-type'; + +interface AdvancedSettingsPageStore { + loading: boolean; + showAdjustmentsOverlay: boolean; + adjustmentPolicyList: AdjustmentPolicyData[]; + adjustmentListMap: Record; +} +export const useAdvancedSettingsPageStore = defineStore('page-advanced-settings', { + state: (): AdvancedSettingsPageStore => ({ + loading: true, + showAdjustmentsOverlay: false, + adjustmentPolicyList: [], // [{ id, workspace_ids, ... }] + adjustmentListMap: {}, // { policy_id: [{ id, ... }] } + }), + getters: { + isAdjustmentPolicyValid: (state) => state.adjustmentPolicyList + .every((item) => (item.isAllWorkspaceSelected || !!item.workspaceMenuItems?.length) && !!state.adjustmentListMap[item.id]?.length), + isAdjustmentValid: (state) => Object.values(state.adjustmentListMap) + .every((item) => item.every((adjustment) => adjustment.name && adjustment.provider && adjustment.adjustment && !!adjustment.amount)), + }, + actions: { + setLoading(state: AdvancedSettingsPageStore['loading']) { + this.loading = state; + }, + setShowAdjustmentsOverlay(state: AdvancedSettingsPageStore['showAdjustmentsOverlay']) { + this.showAdjustmentsOverlay = state; + }, + setAdjustmentPolicyList(state: AdvancedSettingsPageStore['adjustmentPolicyList']) { + this.adjustmentPolicyList = state; + }, + setAdjustmentListMap(state: AdvancedSettingsPageStore['adjustmentListMap']) { + this.adjustmentListMap = state; + }, + addAdjustmentPolicy(policyId: string) { + this.adjustmentPolicyList.push({ + id: policyId, + workspaceMenuItems: undefined, + isAllWorkspaceSelected: true, + }); + this.adjustmentListMap[policyId] = []; + }, + addAdjustment(policyId: string) { + this.adjustmentListMap[policyId].push({ + id: getRandomId(), + name: '', + provider: '', + adjustment: 'FIXED_ADDITION', + amount: 0, + description: '', + policyId, + }); + this.adjustmentListMap = cloneDeep(this.adjustmentListMap); + }, + deleteAdjustmentPolicy(policyId: string) { + this.adjustmentPolicyList = this.adjustmentPolicyList.filter((item) => item.id !== policyId); + delete this.adjustmentListMap[policyId]; + }, + deleteAdjustment(policyId: string, adjustmentId: string) { + this.adjustmentListMap[policyId] = this.adjustmentListMap[policyId].filter((item) => item.id !== adjustmentId); + }, + updateAdjustmentPolicy(policyId: string, policy: AdjustmentPolicyData) { + this.adjustmentPolicyList = this.adjustmentPolicyList.map((item) => (item.id === policyId ? policy : item)); + }, + updateAdjustment(policyId: string, adjustmentId: string, adjustment: AdjustmentData) { + this.adjustmentListMap[policyId] = this.adjustmentListMap[policyId].map((item) => (item.id === adjustmentId ? adjustment : item)); + }, + }, +}); diff --git a/apps/web/src/services/cost-explorer/stores/cost-report-page-store.ts b/apps/web/src/services/cost-explorer/stores/cost-report-page-store.ts index d83f65c12f..2cdab4693d 100644 --- a/apps/web/src/services/cost-explorer/stores/cost-report-page-store.ts +++ b/apps/web/src/services/cost-explorer/stores/cost-report-page-store.ts @@ -63,7 +63,10 @@ export const useCostReportPageStore = defineStore('page-cost-report', () => { try { state.reportConfigLoading = true; const { results } = await SpaceConnector.clientV2.costAnalysis.costReportConfig.list>({ - query: fetchApiHelper.data, + query: { + ...fetchApiHelper.data, + sort: [{ key: 'created_at', desc: false }], + }, }); state.costReportConfig = results?.[0]; } catch (e) { @@ -121,7 +124,7 @@ export const useCostReportPageStore = defineStore('page-cost-report', () => { try { state.recentReportDataLoading = true; const { results, total_count } = await SpaceConnector.clientV2.costAnalysis.costReport.list>({ - status: 'SUCCESS', + status: 'DONE', query: { only: ['report_month', 'issue_date'], filter: [ diff --git a/apps/web/src/services/cost-explorer/types/report-adjustment-type.ts b/apps/web/src/services/cost-explorer/types/report-adjustment-type.ts new file mode 100644 index 0000000000..87f9be254f --- /dev/null +++ b/apps/web/src/services/cost-explorer/types/report-adjustment-type.ts @@ -0,0 +1,19 @@ +import type { SelectDropdownMenuItem } from '@cloudforet/mirinae/types/controls/dropdown/select-dropdown/type'; + +export interface AdjustmentPolicyData { + id: string; + workspaceMenuItems?: SelectDropdownMenuItem[]; + isAllWorkspaceSelected?: boolean; +} + +export interface AdjustmentData { + id: string; + policyId: string; + name: string; + provider: string; + adjustment: AdjustmentType; + amount: number; + description?: string; +} + +export type AdjustmentType = 'PERCENT_DEDUCTION' | 'FIXED_DEDUCTION' | 'PERCENT_ADDITION' | 'FIXED_ADDITION'; diff --git a/apps/web/src/services/service-account/components/ServiceAccountAttachedGeneralAccounts.vue b/apps/web/src/services/service-account/components/ServiceAccountAttachedGeneralAccounts.vue index b63a64a854..e00ab12e80 100644 --- a/apps/web/src/services/service-account/components/ServiceAccountAttachedGeneralAccounts.vue +++ b/apps/web/src/services/service-account/components/ServiceAccountAttachedGeneralAccounts.vue @@ -78,7 +78,7 @@ const state = reactive({ loading: true, syncReqLoading: false, items: [] as any, - sortBy: 'name', + sortBy: 'created_at', sortDesc: true, totalCount: 0, pageLimit: 15, @@ -112,6 +112,7 @@ const state = reactive({ { name: 'state', label: 'State', sortable: false }, { name: 'workspace_id', label: 'Workspace', sortable: false }, { name: 'project_id', label: 'Project', sortable: false }, + { name: 'last_synced_at', label: 'Last Synced', sortable: false }, { name: 'created_at', label: 'Created', sortable: false }, ]; }), @@ -376,8 +377,11 @@ watch(() => state.trustedAccountId, async (ta) => { + diff --git a/apps/web/src/services/service-account/stores/service-account-page-store.ts b/apps/web/src/services/service-account/stores/service-account-page-store.ts index c23adccbcc..771d6d740b 100644 --- a/apps/web/src/services/service-account/stores/service-account-page-store.ts +++ b/apps/web/src/services/service-account/stores/service-account-page-store.ts @@ -165,7 +165,11 @@ export const useServiceAccountPageStore = defineStore('page-service-account', () fetchCostReportConfig: async () => { if (state.costReportConfig !== null) return; try { - const { results } = await SpaceConnector.clientV2.costAnalysis.costReportConfig.list>(); + const { results } = await SpaceConnector.clientV2.costAnalysis.costReportConfig.list>({ + query: { + sort: [{ key: 'created_at', desc: false }], + }, + }); state.costReportConfig = results?.[0]; } catch (e) { ErrorHandler.handleError(e); diff --git a/apps/web/src/services/workspace-home/shared/composables/use-cost-report-config-query.ts b/apps/web/src/services/workspace-home/shared/composables/use-cost-report-config-query.ts index 417f9a4464..99a0974d38 100644 --- a/apps/web/src/services/workspace-home/shared/composables/use-cost-report-config-query.ts +++ b/apps/web/src/services/workspace-home/shared/composables/use-cost-report-config-query.ts @@ -16,7 +16,10 @@ export const useCostReportConfigQuery = ({ const { costReportConfigAPI } = useCostReportConfigApi(); const { key, params } = useServiceQueryKey('cost-analysis', 'cost-report-config', 'list', { params: { - query: costReportConfigApiHelper.data, + query: { + ...costReportConfigApiHelper.data, + sort: [{ key: 'created_at', desc: false }], + }, }, }); const { data } = useScopedQuery({ diff --git a/packages/language-pack/console-translation-2.8.babel b/packages/language-pack/console-translation-2.8.babel index b6846f01b5..9839335927 100644 --- a/packages/language-pack/console-translation-2.8.babel +++ b/packages/language-pack/console-translation-2.8.babel @@ -17564,6 +17564,27 @@ + + CONFIRMATION_DATE + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + COPY false @@ -18068,6 +18089,27 @@ + + REISSUE_REPORT + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + REPORTS false @@ -18446,6 +18488,27 @@ + + UPCOMING_REPORT_CONFIRMATION_DATE_TOOLTIP + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + WORKSPACE false @@ -23624,6 +23687,27 @@ COST_REPORT + + COLLAPSE_ALL + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + COST_REPORT false @@ -38527,183 +38611,1070 @@ COST_EXPLORER - ANOMALY_DETECTION + ADVANCED_SETTINGS - - NOTIFICATION_RULES - - - AMOUNT - false - - - - - - en-US - false - - - ja-JP - false - - - ko-KR - false - - - - - NOTIFY_LEVEL - false - - - - - - en-US - false - - - ja-JP - false - - - ko-KR - false - - - - - SELECT_LEVEL - false - - - - - - en-US - false - - - ja-JP - false - - - ko-KR - false - - - - - SELECT_UNIT - false - - - - - - en-US - false - - - ja-JP - false - - - ko-KR - false - - - - - THRESHOLD - false - - - - - - en-US - false - - - ja-JP - false - - - ko-KR - false - - - - - UNIT - false - - - - - - en-US - false - - - ja-JP - false - - - ko-KR - false - - - - - VARIATION - false - - - - - - en-US - false - - - ja-JP - false - - - ko-KR - false - - - - - - - - - ANOMALY_DETECTION_CONFIGURATION - false - - - - - - en-US - false - - - ja-JP - false - - - ko-KR - false - - - + + ADD_ADJUSTMENT + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + + + ADD_ADJUSTMENT_GROUP + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + + + ADJUSTMENT + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + + + ALT_E_REISSUE_REPORT + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + + + ALT_E_SAVE_COST_REPORT_ADJUSTMENTS + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + + + ALT_E_SYNC_EXCHANGE_RATE + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + + + ALT_E_UPDATE_COST_REPORT_CONFIGURATION + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + + + ALT_S_REISSUE_REPORT + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + + + ALT_S_SAVE_COST_REPORT_ADJUSTMENTS + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + + + ALT_S_SYNC_EXCHANGE_RATE + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + + + ALT_S_UPDATE_COST_REPORT_CONFIGURATION + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + + + AMOUNT + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + + + AUTO_APPLY_ADJUSTMENTS + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + + + CANCEL + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + + + CONFIRM_DATE_EXCEEDS_MONTH_END + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + + + COST_REPORT_ADJUSTMENTS + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + + + COST_REPORT_CONFIGURATION + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + + + CURRENCY_CONVERTER + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + + + DAYS_AFTER_REPORT + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + + + DESCRIPTION + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + + + FIXED_ADDITION + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + + + FIXED_DEDUCTION + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + + + GREATER_THAN_OR_EQUAL_TO_1 + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + + + ISSUE_DATE + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + + + LANGUAGE + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + + + LAST_DAY_OF_MONTH + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + + + LESS_THAN_OR_EQUAL_TO_31 + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + + + MANUAL_ADJUSTABLE_PERIOD + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + + + MANUAL_ADJUSTABLE_PERIOD_HELP_TEXT + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + + + PERCENTAGE_ADDITION + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + + + PERCENTAGE_DEDUCTION + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + + + PROVIDER + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + + + REPORT_CONFIGURATION_DATE + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + + + REQUIRED_FIELD + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + + + SAVE_CHANGES + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + + + SELECT_WORKSPACE + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + + + SET_ADJUSTMENTS + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + + + SYNC_EXCHANGE_RATE + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + + + SYNC_EXCHANGE_RATE_MODAL_DESC + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + + + TITLE + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + + + UPCOMING_REPORT_DATE + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + + + WORKSPACE + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + + + + + ANOMALY_DETECTION + + + NOTIFICATION_RULES + + + AMOUNT + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + + + NOTIFY_LEVEL + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + + + SELECT_LEVEL + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + + + SELECT_UNIT + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + + + THRESHOLD + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + + + UNIT + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + + + VARIATION + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + + + + + + + ANOMALY_DETECTION_CONFIGURATION + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + COST_ADVANCED_SETTINGS false @@ -38817,6 +39788,27 @@ + + CURRENCY_CONVERTER + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + EXCHANGE_RATE_SOURCE false diff --git a/packages/language-pack/en.json b/packages/language-pack/en.json index 6b4d2c1de3..4de5b5b1d3 100644 --- a/packages/language-pack/en.json +++ b/packages/language-pack/en.json @@ -920,6 +920,7 @@ "ALT_S_UPDATE_RECIPIENTS": "Report Recipients successfully updated", "ALT_S_UPDATE_SETTINGS": "Report Settings successfully updated", "APPLY_CUSTOM_RANGE": "Apply Custom Range", + "CONFIRMATION_DATE": "Confirmation Date", "COPY": "Copy", "COST": "Cost", "COST_REPORT": "Cost Report", @@ -944,6 +945,7 @@ "PROVIDER": "Provider", "RECIPIENTS": "Recipients", "RECIPIENTS_TOOLTIP": "New reports are automatically sent to the notification emails of users with the appropriate role on the scheduled monthly report issue date.", + "REISSUE_REPORT": "Reissue", "REPORTS": "Reports", "REPORT_NUMBER": "Report Number", "REPORT_RECIPIENTS": "Report Recipients", @@ -962,6 +964,7 @@ "TOTAL_COST_FOR_PREVIOUS_MONTH": "Total costs for {previous_month}", "UPCOMING_ISSUE_DATE": "Upcoming Report Date", "UPCOMING_REPORT": "Upcoming Report", + "UPCOMING_REPORT_CONFIRMATION_DATE_TOOLTIP": "The confirmation date is the final date after the adjustable period from the issue date.", "WORKSPACE": "Workspace", "WORKSPACE_OWNER": "Workspace Owner", "WORKSPACE_OWNER_ROLE": "Workspace Owner Role" @@ -1250,6 +1253,7 @@ "TITLE": "Leave Process" }, "COST_REPORT": { + "COLLAPSE_ALL": "Collapse All", "COST_REPORT": "Cost Report", "CURRENCY_REFERENCE": "Currency reference", "DETAILS_BY_PRODUCT": "Details by Product", @@ -2105,6 +2109,50 @@ } }, "COST_EXPLORER": { + "ADVANCED_SETTINGS": { + "ADD_ADJUSTMENT": "Add Adjustment", + "ADD_ADJUSTMENT_GROUP": "Add Adjustment Group", + "ADJUSTMENT": "Adjustment", + "ALT_E_REISSUE_REPORT": "Failed to reissue report", + "ALT_E_SAVE_COST_REPORT_ADJUSTMENTS": "Failed to save report adjustments", + "ALT_E_SYNC_EXCHANGE_RATE": "Failed to sync exchange rate", + "ALT_E_UPDATE_COST_REPORT_CONFIGURATION": "Failed to update Cost Report Configuration", + "ALT_S_REISSUE_REPORT": "Report successfully reissued", + "ALT_S_SAVE_COST_REPORT_ADJUSTMENTS": "Report adjustments successfully saved", + "ALT_S_SYNC_EXCHANGE_RATE": "Exchange rate successfully synced", + "ALT_S_UPDATE_COST_REPORT_CONFIGURATION": "Cost Report Configuration successfully updated", + "AMOUNT": "Amount", + "AUTO_APPLY_ADJUSTMENTS": "Auto-Apply Adjustments", + "CANCEL": "Cancel", + "CONFIRM_DATE_EXCEEDS_MONTH_END": "The confirmation date cannot exceed the last day of the month.", + "COST_REPORT_ADJUSTMENTS": "Cost Report Adjustments", + "COST_REPORT_CONFIGURATION": "Cost Report Configuration", + "CURRENCY_CONVERTER": "Currency Converter", + "DAYS_AFTER_REPORT": "Days After Report Issuance", + "DESCRIPTION": "Description", + "FIXED_ADDITION": "Fixed Addition", + "FIXED_DEDUCTION": "Fixed Deduction", + "GREATER_THAN_OR_EQUAL_TO_1": "Must be greater than or equal to 1", + "ISSUE_DATE": "Issue Date", + "LANGUAGE": "Language", + "LAST_DAY_OF_MONTH": "Last day of the month", + "LESS_THAN_OR_EQUAL_TO_31": "Must be less than or equal to 31", + "MANUAL_ADJUSTABLE_PERIOD": "Manual Adjustable Period", + "MANUAL_ADJUSTABLE_PERIOD_HELP_TEXT": "Enter the number of days after the report date during which manual adjustments are permitted.", + "PERCENTAGE_ADDITION": "Percentage Addition", + "PERCENTAGE_DEDUCTION": "Percentage Deduction", + "PROVIDER": "Provider", + "REPORT_CONFIGURATION_DATE": "Report Confirmation Date", + "REQUIRED_FIELD": "Required field", + "SAVE_CHANGES": "Save Changes", + "SELECT_WORKSPACE": "Select Workspace", + "SET_ADJUSTMENTS": "Set Adjustments", + "SYNC_EXCHANGE_RATE": "Sync Exchange Rate", + "SYNC_EXCHANGE_RATE_MODAL_DESC": "Some adjustments have a different currency from the cost report’s currency.\nDo you want to synchronize all adjustments to use the same currency?", + "TITLE": "Title", + "UPCOMING_REPORT_DATE": "Upcoming Report Date", + "WORKSPACE": "Workspace" + }, "ANOMALY_DETECTION": { "NOTIFICATION_RULES": { "AMOUNT": "Amount", @@ -2125,6 +2173,7 @@ "CURRENCY_CONVERTER": "Currency Converter", "CURRENCY_CONVERTER_PAGE": { "AGGREGATION_DATE": "Aggregation Date", + "CURRENCY_CONVERTER": "Currency Converter", "EXCHANGE_RATE_SOURCE": "Exchange Rate Source", "LAST_DAY_OF_THE_MONTH": "Last day of the month", "NOTIFICATION": "The currency for Unified Cost can be set on the Cost Analysis page. Once aggregated, date changes will take effect starting next month.", diff --git a/packages/language-pack/ja.json b/packages/language-pack/ja.json index c9d6b2acf6..7fd17ceb8c 100644 --- a/packages/language-pack/ja.json +++ b/packages/language-pack/ja.json @@ -920,6 +920,7 @@ "ALT_S_UPDATE_RECIPIENTS": "レポート受信者が正常に更新されました", "ALT_S_UPDATE_SETTINGS": "レポート設定が正常に更新されました", "APPLY_CUSTOM_RANGE": "適用するカスタム範囲", + "CONFIRMATION_DATE": "確定日", "COPY": "コピー", "COST": "費用", "COST_REPORT": "コストレポート", @@ -944,6 +945,7 @@ "PROVIDER": "プロバイダー", "RECIPIENTS": "受信者", "RECIPIENTS_TOOLTIP": "新しいレポートは、毎月予定されているレポート発行日に、特定のワークスペース内で該当するロールを持つユーザーの通知用メールアドレスに自動的に送信されます。", + "REISSUE_REPORT": "再発行", "REPORTS": "レポート", "REPORT_NUMBER": "レポート番号", "REPORT_RECIPIENTS": "レポート受信者", @@ -962,6 +964,7 @@ "TOTAL_COST_FOR_PREVIOUS_MONTH": "{previous_month}期間内の総費用", "UPCOMING_ISSUE_DATE": "今後のレポート発行日", "UPCOMING_REPORT": "今後のレポート", + "UPCOMING_REPORT_CONFIRMATION_DATE_TOOLTIP": "確認日は、発行日から調整期間が経過した後の最終日です。", "WORKSPACE": "ワークスペース", "WORKSPACE_OWNER": "Workspace Owner", "WORKSPACE_OWNER_ROLE": "Workspace Ownerの役" @@ -1250,6 +1253,7 @@ "TITLE": "プロセス終了" }, "COST_REPORT": { + "COLLAPSE_ALL": "すべて折りたたむ", "COST_REPORT": "コストレポート", "CURRENCY_REFERENCE": "通貨リファレンス", "DETAILS_BY_PRODUCT": "製品別詳細", @@ -2105,6 +2109,50 @@ } }, "COST_EXPLORER": { + "ADVANCED_SETTINGS": { + "ADD_ADJUSTMENT": "調整を追加", + "ADD_ADJUSTMENT_GROUP": "調整グループを追加", + "ADJUSTMENT": "調整", + "ALT_E_REISSUE_REPORT": "レポート再発行失敗", + "ALT_E_SAVE_COST_REPORT_ADJUSTMENTS": "レポート調整保存失敗", + "ALT_E_SYNC_EXCHANGE_RATE": "為替レート同期失敗", + "ALT_E_UPDATE_COST_REPORT_CONFIGURATION": "コストレポート設定の修正に失敗しました", + "ALT_S_REISSUE_REPORT": "レポート再発行完了", + "ALT_S_SAVE_COST_REPORT_ADJUSTMENTS": "レポート調整保存完了", + "ALT_S_SYNC_EXCHANGE_RATE": "為替レート同期完了", + "ALT_S_UPDATE_COST_REPORT_CONFIGURATION": "コストレポート設定の更新が完了しました", + "AMOUNT": "アカウント", + "AUTO_APPLY_ADJUSTMENTS": "調整自動反映", + "CANCEL": "取消", + "CONFIRM_DATE_EXCEEDS_MONTH_END": "確定日はその月の最終日を超えることはできません。", + "COST_REPORT_ADJUSTMENTS": "コストレポート調整", + "COST_REPORT_CONFIGURATION": "コストレポート設定", + "CURRENCY_CONVERTER": "為替レート設定", + "DAYS_AFTER_REPORT": "日 (レポート発行日後)", + "DESCRIPTION": "説明", + "FIXED_ADDITION": "固定加算", + "FIXED_DEDUCTION": "固定減額", + "GREATER_THAN_OR_EQUAL_TO_1": "1以上で設定してください", + "ISSUE_DATE": "発行日", + "LANGUAGE": "言語", + "LAST_DAY_OF_MONTH": "月末", + "LESS_THAN_OR_EQUAL_TO_31": "31以内で設定してください", + "MANUAL_ADJUSTABLE_PERIOD": "手動調整期間", + "MANUAL_ADJUSTABLE_PERIOD_HELP_TEXT": "レポート発行日から手動調整が許可される日数を入力してください。", + "PERCENTAGE_ADDITION": "割合ベース加算", + "PERCENTAGE_DEDUCTION": "割合ベース減額", + "PROVIDER": "プロバイダー", + "REPORT_CONFIGURATION_DATE": "レポート確定日", + "REQUIRED_FIELD": "必須入力項目です。", + "SAVE_CHANGES": "変更事項保存", + "SELECT_WORKSPACE": "ワークスペースの選択", + "SET_ADJUSTMENTS": "調整を設定", + "SYNC_EXCHANGE_RATE": "為替レート同期", + "SYNC_EXCHANGE_RATE_MODAL_DESC": "一部の調整の通貨がコストレポートの通貨と異なります。\nすべての調整の通貨をコストレポートと同じ通貨に同期しますか?", + "TITLE": "タイトル", + "UPCOMING_REPORT_DATE": "今後のレポート発行日", + "WORKSPACE": "ワークスペース" + }, "ANOMALY_DETECTION": { "NOTIFICATION_RULES": { "AMOUNT": "アカウント", @@ -2125,6 +2173,7 @@ "CURRENCY_CONVERTER": "為替レート設定", "CURRENCY_CONVERTER_PAGE": { "AGGREGATION_DATE": "集計日", + "CURRENCY_CONVERTER": "為替レート設定", "EXCHANGE_RATE_SOURCE": "為替基準", "LAST_DAY_OF_THE_MONTH": "月末", "NOTIFICATION": "データソースページで、Unified Costの為替レートを設定できます。費用集計が完了すると、日付の変更は翌月から適用されます。", diff --git a/packages/language-pack/ko.json b/packages/language-pack/ko.json index 94ec331706..223f3740b1 100644 --- a/packages/language-pack/ko.json +++ b/packages/language-pack/ko.json @@ -920,6 +920,7 @@ "ALT_S_UPDATE_RECIPIENTS": "리포트 수신처 업데이트 완료", "ALT_S_UPDATE_SETTINGS": "리포트 설정 업데이트 완료", "APPLY_CUSTOM_RANGE": "커스텀 기간 선택", + "CONFIRMATION_DATE": "확정일", "COPY": "복사", "COST": "비용", "COST_REPORT": "비용 리포트", @@ -944,6 +945,7 @@ "PROVIDER": "프로바이더", "RECIPIENTS": "수신처", "RECIPIENTS_TOOLTIP": "매월 리포트 발행일에 특정 워크스페이스 내에 해당 Role을 가진 사용자의 알림 전용 이메일로 자동 발송됩니다. ", + "REISSUE_REPORT": "재발행", "REPORTS": "리포트", "REPORT_NUMBER": "리포트 번호", "REPORT_RECIPIENTS": "리포트 수신처", @@ -962,6 +964,7 @@ "TOTAL_COST_FOR_PREVIOUS_MONTH": "{previous_month} 기간 내 총비용 ", "UPCOMING_ISSUE_DATE": "다음 리포트 발행일", "UPCOMING_REPORT": "다음 리포트", + "UPCOMING_REPORT_CONFIRMATION_DATE_TOOLTIP": "확정일은 발행일로부터 조정 기간이 지난 후의 최종 날짜입니다.", "WORKSPACE": "워크스페이스", "WORKSPACE_OWNER": "Workspace Owner", "WORKSPACE_OWNER_ROLE": "Workspace Owner 역할(Role)" @@ -1250,6 +1253,7 @@ "TITLE": "진행 중인 작업 종료" }, "COST_REPORT": { + "COLLAPSE_ALL": "모두 접기", "COST_REPORT": "비용 리포트", "CURRENCY_REFERENCE": "통화 기준 ", "DETAILS_BY_PRODUCT": "프로덕트별 상세 보기 ", @@ -2105,6 +2109,50 @@ } }, "COST_EXPLORER": { + "ADVANCED_SETTINGS": { + "ADD_ADJUSTMENT": "조정 추가", + "ADD_ADJUSTMENT_GROUP": "조정 그룹 추가", + "ADJUSTMENT": "조정", + "ALT_E_REISSUE_REPORT": "리포트 재발행 실패", + "ALT_E_SAVE_COST_REPORT_ADJUSTMENTS": "리포트 조정 저장 실패", + "ALT_E_SYNC_EXCHANGE_RATE": "환율 동기화 실패", + "ALT_E_UPDATE_COST_REPORT_CONFIGURATION": "비용 리포트 설정 수정 실패", + "ALT_S_REISSUE_REPORT": "리포트 재발행 완료", + "ALT_S_SAVE_COST_REPORT_ADJUSTMENTS": "리포트 조정 저장 완료", + "ALT_S_SYNC_EXCHANGE_RATE": "환율 동기화 완료", + "ALT_S_UPDATE_COST_REPORT_CONFIGURATION": "비용 리포트 설정 수정 완료", + "AMOUNT": "금액", + "AUTO_APPLY_ADJUSTMENTS": "조정 자동 반영", + "CANCEL": "취소", + "CONFIRM_DATE_EXCEEDS_MONTH_END": "확정일은 해당 월의 마지막 일을 초과할 수 없습니다.", + "COST_REPORT_ADJUSTMENTS": "비용 리포트 조정", + "COST_REPORT_CONFIGURATION": "비용 리포트 설정", + "CURRENCY_CONVERTER": "환율 설정", + "DAYS_AFTER_REPORT": "일 (리포트 발행일 이후)", + "DESCRIPTION": "설명", + "FIXED_ADDITION": "고정 가산", + "FIXED_DEDUCTION": "고정 감액", + "GREATER_THAN_OR_EQUAL_TO_1": "1 이상으로 설정해주세요", + "ISSUE_DATE": "발행일자", + "LANGUAGE": "언어", + "LAST_DAY_OF_MONTH": "매월 마지막일", + "LESS_THAN_OR_EQUAL_TO_31": "31 이하로 설정해주세요", + "MANUAL_ADJUSTABLE_PERIOD": "수동 조정 기간", + "MANUAL_ADJUSTABLE_PERIOD_HELP_TEXT": "리포트 발행일 이후 수동 조정이 허용되는 기간(일수)을 입력하세요.", + "PERCENTAGE_ADDITION": "비율 기반 가산", + "PERCENTAGE_DEDUCTION": "비율 기반 감액", + "PROVIDER": "프로바이더", + "REPORT_CONFIGURATION_DATE": "리포트 확정일", + "REQUIRED_FIELD": "필수 입력 항목입니다.", + "SAVE_CHANGES": "변경사항 저장", + "SELECT_WORKSPACE": "워크스페이스 선택", + "SET_ADJUSTMENTS": "조정값 설정", + "SYNC_EXCHANGE_RATE": "환율 동기화", + "SYNC_EXCHANGE_RATE_MODAL_DESC": "일부 조정 항목의 통화가 비용 리포트의 통화와 다릅니다.\n모든 조정 항목의 통화를 비용 리포트와 동일하게 동기화하시겠습니까?", + "TITLE": "제목", + "UPCOMING_REPORT_DATE": "다음 리포트 발행일", + "WORKSPACE": "워크스페이스" + }, "ANOMALY_DETECTION": { "NOTIFICATION_RULES": { "AMOUNT": "계정", @@ -2125,6 +2173,7 @@ "CURRENCY_CONVERTER": "환율 설정", "CURRENCY_CONVERTER_PAGE": { "AGGREGATION_DATE": "집계 날짜", + "CURRENCY_CONVERTER": "환율 설정", "EXCHANGE_RATE_SOURCE": "환율 기준", "LAST_DAY_OF_THE_MONTH": "매월 마지막일 ", "NOTIFICATION": "비용 분석 페이지에서 Unified Cost에 대한 환율을 설정할 수 있습니다. 비용 집계가 완료되면, 날짜 변경은 다음 달부터 적용됩니다.", diff --git a/packages/mirinae/src/controls/dropdown/select-dropdown/PSelectDropdown.vue b/packages/mirinae/src/controls/dropdown/select-dropdown/PSelectDropdown.vue index 2f592bfe73..db08cd799e 100644 --- a/packages/mirinae/src/controls/dropdown/select-dropdown/PSelectDropdown.vue +++ b/packages/mirinae/src/controls/dropdown/select-dropdown/PSelectDropdown.vue @@ -5,6 +5,7 @@ import { import { onClickOutside, useFocus } from '@vueuse/core'; import { debounce, reduce } from 'lodash'; +import type { TranslateResult } from 'vue-i18n'; import PContextMenu from '@/controls/context-menu/PContextMenu.vue'; import type { ContextMenuType } from '@/controls/context-menu/type'; @@ -33,7 +34,7 @@ interface SelectDropdownProps { size?: SelectDropdownSize; disabled?: boolean; invalid?: boolean; - placeholder?: string; + placeholder?: string | TranslateResult; selectionLabel?: string; selectionHighlight?: boolean; showAlertDot?: boolean; diff --git a/packages/mirinae/src/controls/dropdown/select-dropdown/components/dropdown-button.vue b/packages/mirinae/src/controls/dropdown/select-dropdown/components/dropdown-button.vue index fc4b5978f0..736cdf5e1a 100644 --- a/packages/mirinae/src/controls/dropdown/select-dropdown/components/dropdown-button.vue +++ b/packages/mirinae/src/controls/dropdown/select-dropdown/components/dropdown-button.vue @@ -1,6 +1,8 @@