Skip to content

Commit

Permalink
feat: add cost link in costSummary
Browse files Browse the repository at this point in the history
Signed-off-by: sulmo <[email protected]>
  • Loading branch information
sulmoJ committed Oct 17, 2024
1 parent cfa1206 commit 09acaae
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 11 deletions.
43 changes: 32 additions & 11 deletions apps/web/src/services/workspace-home/components/CostSummary.vue
Original file line number Diff line number Diff line change
Expand Up @@ -235,13 +235,27 @@ watch(() => storeState.costReportConfig, async (costReportConfig) => {
</div>
<div v-if="!state.isWorkspaceMember && state.accessLink">
<p-divider class="divider" />
<p-link highlight
:to="getProperRouteLocation({ name: COST_EXPLORER_ROUTE.COST_REPORT._NAME })"
action-icon="internal-link"
class="link"
>
{{ $t('HOME.COST_SUMMARY_GO_TO_REPORT') }}
</p-link>
<div class="link-footer">
<p-link highlight
:to="getProperRouteLocation({ name: COST_EXPLORER_ROUTE.COST_ANALYSIS._NAME })"
action-icon="internal-link"
class="link"
>
{{ $t('HOME.COST_SUMMARY_GO_TO_COST_ANALYSIS') }}
</p-link>
<div class="vertical-divider">
<p-divider style="height: 14px;"
vertical
/>
</div>
<p-link highlight
:to="getProperRouteLocation({ name: COST_EXPLORER_ROUTE.COST_REPORT._NAME })"
action-icon="internal-link"
class="link"
>
{{ $t('HOME.COST_SUMMARY_GO_TO_REPORT') }}
</p-link>
</div>
</div>
</div>
<empty-summary-data v-else
Expand Down Expand Up @@ -309,10 +323,17 @@ watch(() => storeState.costReportConfig, async (costReportConfig) => {
.divider {
@apply bg-gray-150;
}
.link {
@apply flex items-center justify-center text-label-md;
padding-top: 0.625rem;
padding-bottom: 0.75rem;
.link-footer {
@apply flex justify-center items-center gap-4;
.vertical-divider {
@apply flex items-center h-full;
}
.link {
@apply inline-flex items-center justify-center text-label-md;
padding-top: 0.625rem;
padding-bottom: 0.75rem;
}
}
}
</style>
21 changes: 21 additions & 0 deletions packages/language-pack/console-translation-2.8.babel
Original file line number Diff line number Diff line change
Expand Up @@ -42192,6 +42192,27 @@
</translation>
</translations>
</concept_node>
<concept_node>
<name>COST_SUMMARY_GO_TO_COST_ANALYSIS</name>
<definition_loaded>false</definition_loaded>
<description/>
<comment/>
<default_text/>
<translations>
<translation>
<language>en-US</language>
<approved>false</approved>
</translation>
<translation>
<language>ja-JP</language>
<approved>false</approved>
</translation>
<translation>
<language>ko-KR</language>
<approved>false</approved>
</translation>
</translations>
</concept_node>
<concept_node>
<name>COST_SUMMARY_GO_TO_REPORT</name>
<definition_loaded>false</definition_loaded>
Expand Down
1 change: 1 addition & 0 deletions packages/language-pack/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2380,6 +2380,7 @@
"COST_SUMMARY_BY_PROJECT": "by Project",
"COST_SUMMARY_CURRENT_TOTAL_COST": "Current Month-to-Date Cost",
"COST_SUMMARY_DESC": "The cost above may differ from the costs in the report",
"COST_SUMMARY_GO_TO_COST_ANALYSIS": "Go to Cost Analysis",
"COST_SUMMARY_GO_TO_REPORT": "Go to Cost Report",
"COST_SUMMARY_LAST_MONT_TOTAL_COST": "Last Month Total Cost",
"COST_SUMMARY_RECENT": "Recent Cost Report for {date}",
Expand Down
1 change: 1 addition & 0 deletions packages/language-pack/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -2380,6 +2380,7 @@
"COST_SUMMARY_BY_PROJECT": "プロジェクトごとに",
"COST_SUMMARY_CURRENT_TOTAL_COST": "現在の月初から今までの費用",
"COST_SUMMARY_DESC": "上記の費用は、報告書の費用と異なる場合があります",
"COST_SUMMARY_GO_TO_COST_ANALYSIS": "비용 분석으로 이동",
"COST_SUMMARY_GO_TO_REPORT": "コストレポートに移動",
"COST_SUMMARY_LAST_MONT_TOTAL_COST": "先月の総費用",
"COST_SUMMARY_RECENT": "{date}の最近の費用レポート",
Expand Down
1 change: 1 addition & 0 deletions packages/language-pack/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -2380,6 +2380,7 @@
"COST_SUMMARY_BY_PROJECT": "프로젝트별",
"COST_SUMMARY_CURRENT_TOTAL_COST": "당월 누적값",
"COST_SUMMARY_DESC": "위의 비용은 비용 리포트 발행 시점에 따라 최종 비용에 차이가 있을 수 있습니다.",
"COST_SUMMARY_GO_TO_COST_ANALYSIS": "コスト分析に移動",
"COST_SUMMARY_GO_TO_REPORT": "비용 리포트로 이동",
"COST_SUMMARY_LAST_MONT_TOTAL_COST": "전월 총 비용",
"COST_SUMMARY_RECENT": "최근 비용 리포트({date})",
Expand Down

0 comments on commit 09acaae

Please sign in to comment.