1414 :options =" currencies"
1515 @update:model-value =" changeCurrency($event as AvailableCurrency)"
1616 />
17+
18+ <Select
19+ :model-value =" settings.general.monthOffset"
20+ :label =" t('navigation.settings.firstMonthOfYear')"
21+ :options =" months"
22+ @update:model-value =" setMonthOffset($event as number)"
23+ />
1724 </div >
1825 </Dialog >
1926</template >
@@ -28,6 +35,8 @@ import { useDataStore } from '@store/state';
2835import { ContextMenuOption } from ' @components/base/context-menu/ContextMenu.types.ts' ;
2936import Select from ' @components/base/select/Select.vue' ;
3037import { availableCurrencies , AvailableCurrency } from ' @store/state/types.ts' ;
38+ import { useSettingsStore } from ' @store/settings' ;
39+ import { useMonthNames } from ' @composables' ;
3140
3241const emit = defineEmits <{
3342 (e : ' close' ): void ;
@@ -38,7 +47,9 @@ defineProps<{
3847}>();
3948
4049const { t, locale } = useI18n ();
50+ const { setMonthOffset, state : settings } = useSettingsStore ();
4151const { changeCurrency, changeLocale, state } = useDataStore ();
52+ const monthNames = useMonthNames ();
4253
4354const locales = computed <ContextMenuOption []>(() => {
4455 const displayNames = new Intl .DisplayNames (initialLocale , { type: ' language' });
@@ -58,6 +69,14 @@ const currencies = computed<ContextMenuOption[]>(() =>
5869 }))
5970);
6071
72+ const months = computed <ContextMenuOption []>(() =>
73+ monthNames .value .map ((value , index ) => ({
74+ id: index ,
75+ label: value ,
76+ icon: settings .general .monthOffset === index ? RiCheckLine : undefined
77+ }))
78+ );
79+
6180const formatNumber = (locale : string , currency : string , currencyDisplay ? : Intl .NumberFormatOptionsCurrencyDisplay ) => {
6281 const symbol = new Intl .NumberFormat (locale , {
6382 style: ' currency' ,
0 commit comments