From 19f0116b89955afac6b95ebd21d519e8a7d89296 Mon Sep 17 00:00:00 2001 From: Stefan Dej Date: Sat, 21 Sep 2024 23:31:38 +0200 Subject: [PATCH] refactor: rename option amount to jobs Signed-off-by: Stefan Dej --- src/components/charts/HistoryAllPrintStatusChart.vue | 2 +- src/components/panels/HistoryStatisticsPanel.vue | 4 ++-- src/locales/en.json | 1 - src/store/server/history/types.ts | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/components/charts/HistoryAllPrintStatusChart.vue b/src/components/charts/HistoryAllPrintStatusChart.vue index 8bb9774ae..98df21772 100644 --- a/src/components/charts/HistoryAllPrintStatusChart.vue +++ b/src/components/charts/HistoryAllPrintStatusChart.vue @@ -24,7 +24,7 @@ import { HistoryStatsValueNames } from '@/store/server/history/types' components: {}, }) export default class HistoryAllPrintStatusChart extends Mixins(BaseMixin, ThemeMixin, HistoryStatsMixin) { - @Prop({ type: String, default: 'amount' }) valueName!: HistoryStatsValueNames + @Prop({ type: String, default: 'jobs' }) valueName!: HistoryStatsValueNames @Ref('historyAllPrintStatus') historyAllPrintStatus!: typeof VueECharts get chartOptions(): ECBasicOption { diff --git a/src/components/panels/HistoryStatisticsPanel.vue b/src/components/panels/HistoryStatisticsPanel.vue index e8f96d8ff..2f6fa9bfe 100644 --- a/src/components/panels/HistoryStatisticsPanel.vue +++ b/src/components/panels/HistoryStatisticsPanel.vue @@ -89,11 +89,11 @@ export default class HistoryStatisticsPanel extends Mixins(BaseMixin, HistoryMix mdiDatabaseArrowDownOutline = mdiDatabaseArrowDownOutline formatPrintTime = formatPrintTime - toggleValue = 'amount' + toggleValue = 'jobs' get toggleValueOptions(): { text: TranslateResult; value: HistoryStatsValueNames }[] { return [ - { text: this.$t('History.Amount'), value: 'amount' }, + { text: this.$t('History.Jobs'), value: 'jobs' }, { text: this.$t('History.Filament'), value: 'filament' }, { text: this.$t('History.Time'), value: 'time' }, ] diff --git a/src/locales/en.json b/src/locales/en.json index 03d7000b9..fe27e0b2c 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -364,7 +364,6 @@ "AddNote": "Add note", "AddToQueueSuccessful": "File {filename} added to Queue.", "AllJobs": "All", - "Amount": "Amount", "AvgPrinttime": "Print Time - Ø", "Cancel": "Cancel", "Chart": "Chart", diff --git a/src/store/server/history/types.ts b/src/store/server/history/types.ts index b5478c946..9cc07f8cd 100644 --- a/src/store/server/history/types.ts +++ b/src/store/server/history/types.ts @@ -90,4 +90,4 @@ export interface ServerHistoryStateAllPrintStatusEntry { } } -export type HistoryStatsValueNames = 'amount' | 'filament' | 'time' +export type HistoryStatsValueNames = 'jobs' | 'filament' | 'time'