diff --git a/front/constants/RouteConstants.js b/front/constants/RouteConstants.js index 20de61e..abe45a4 100644 --- a/front/constants/RouteConstants.js +++ b/front/constants/RouteConstants.js @@ -16,7 +16,21 @@ export default { ROUTE_SETTINGS_NEW_TRANSACTION_DEFAULTS: '/settings/user-preferences-new-transaction-defaults', ROUTE_SETTINGS_USER_PREFERENCES_UI: '/settings/user-preferences-ui', ROUTE_SETTINGS_USER_PREFERENCES_DASHBOARD: '/settings/user-preferences-dashboard', + + + ROUTE_SETTINGS_SETUP: '/settings/setup', + ROUTE_SETTINGS_UI: '/settings/ui', + ROUTE_SETTINGS_FORMATTING: '/settings/formatting', + ROUTE_SETTINGS_DASHBOARD: '/settings/dashboard', + ROUTE_SETTINGS_TRANSACTION: '/settings/transactions', + ROUTE_SETTINGS_TRANSACTION_FIELDS_ORDER: '/settings/transactions/fields', + ROUTE_SETTINGS_TRANSACTION_DEFAULT_VALUES: '/settings/transactions/defaults', + ROUTE_SETTINGS_TRANSACTION_QUICK_AMOUNTS: '/settings/transactions/quick-amounts', ROUTE_SETTINGS_ABOUT: '/settings/about', + + + + ROUTE_EXCHANGE_RATES: '/exchange-rates', ROUTE_TRANSACTION_TEMPLATE_LIST: '/transaction-templates/list', diff --git a/front/pages/settings/user-preferences-dashboard.vue b/front/pages/settings/dashboard.vue similarity index 96% rename from front/pages/settings/user-preferences-dashboard.vue rename to front/pages/settings/dashboard.vue index 7884ea6..43bb114 100644 --- a/front/pages/settings/user-preferences-dashboard.vue +++ b/front/pages/settings/dashboard.vue @@ -3,9 +3,13 @@ + -
Config:
+
+ + +
Config:
@@ -57,7 +61,7 @@ const onSave = async () => { const toolbar = useToolbar() toolbar.init({ - title: 'Dashboard preferences', + title: 'Dashboard settings', backRoute: RouteConstants.ROUTE_SETTINGS, }) diff --git a/front/pages/settings/user-preferences-ui.vue b/front/pages/settings/formatting.vue similarity index 70% rename from front/pages/settings/user-preferences-ui.vue rename to front/pages/settings/formatting.vue index ef74736..c85422b 100644 --- a/front/pages/settings/user-preferences-ui.vue +++ b/front/pages/settings/formatting.vue @@ -4,11 +4,7 @@ - - - +
General:
+ + + +
- +
Casing:
-
@@ -57,7 +72,15 @@ const dataStore = useDataStore() const numberFormatList = [NUMBER_FORMAT.eu, NUMBER_FORMAT.international] const isDropdownNumberFormatVisible = ref(false) -const darkTheme = ref(false) +const dateFormat = ref(null) +const dateFormatList = [DateUtils.FORMAT_ROMANIAN_DATE, DateUtils.FORMAT_ENGLISH_DATE] +const isDropdownDateFormatVisible = ref(false) + +const firstDayOfMonth = ref(null) +const firstDayOfMonthList = [...Array(27).keys()].map((item) => item + 1) +const isDropdownFirstDayVisible = ref(false) + + const numberFormat = ref(null) const stripAccents = ref(false) const lowerCaseTransactionDescription = ref(false) @@ -65,8 +88,11 @@ const lowerCaseAccountName = ref(false) const lowerCaseCategoryName = ref(false) const lowerCaseTagName = ref(false) + + const syncedSettings = [ - { store: profileStore, path: 'darkTheme', ref: darkTheme }, + { store: profileStore, path: 'dateFormat', ref: dateFormat }, + { store: profileStore, path: 'dashboard.firstDayOfMonth', ref: firstDayOfMonth }, { store: profileStore, path: 'numberFormat', ref: numberFormat }, { store: profileStore, path: 'stripAccents', ref: stripAccents }, { store: profileStore, path: 'lowerCaseTransactionDescription', ref: lowerCaseTransactionDescription }, @@ -77,17 +103,15 @@ const syncedSettings = [ watchSettingsStore(syncedSettings) - - const onSave = async () => { saveSettingsToStore(syncedSettings) await profileStore.writeProfile() - UIUtils.showToastSuccess('User preferences saved') + UIUtils.showToastSuccess('Formatting') } const toolbar = useToolbar() toolbar.init({ - title: 'UI preferences', + title: 'Formatting settings', backRoute: RouteConstants.ROUTE_SETTINGS, }) diff --git a/front/pages/settings/index.vue b/front/pages/settings/index.vue index bb6c6bb..a311684 100644 --- a/front/pages/settings/index.vue +++ b/front/pages/settings/index.vue @@ -3,18 +3,11 @@ - - - - - - - - - - - - + + + + + diff --git a/front/pages/settings/app-config.vue b/front/pages/settings/setup.vue similarity index 99% rename from front/pages/settings/app-config.vue rename to front/pages/settings/setup.vue index 1c2a525..3c60b7a 100644 --- a/front/pages/settings/app-config.vue +++ b/front/pages/settings/setup.vue @@ -91,7 +91,7 @@ const onSave = async () => { const toolbar = useToolbar() toolbar.init({ - title: 'App settings', + title: 'Setup', backRoute: RouteConstants.ROUTE_SETTINGS, }) diff --git a/front/pages/settings/user-preferences-new-transaction-defaults.vue b/front/pages/settings/transactions/defaults.vue similarity index 97% rename from front/pages/settings/user-preferences-new-transaction-defaults.vue rename to front/pages/settings/transactions/defaults.vue index 7710b75..78834ab 100644 --- a/front/pages/settings/user-preferences-new-transaction-defaults.vue +++ b/front/pages/settings/transactions/defaults.vue @@ -57,7 +57,7 @@ const onSave = async () => { const toolbar = useToolbar() toolbar.init({ title: 'New transaction defaults', - backRoute: RouteConstants.ROUTE_SETTINGS, + backRoute: RouteConstants.ROUTE_SETTINGS_TRANSACTION, }) onMounted(() => { diff --git a/front/pages/settings/user-preferences-transaction-fields-order.vue b/front/pages/settings/transactions/fields.vue similarity index 97% rename from front/pages/settings/user-preferences-transaction-fields-order.vue rename to front/pages/settings/transactions/fields.vue index d7ab4c8..26c5265 100644 --- a/front/pages/settings/user-preferences-transaction-fields-order.vue +++ b/front/pages/settings/transactions/fields.vue @@ -68,7 +68,7 @@ const init = () => { const toolbar = useToolbar() toolbar.init({ title: 'Transaction fields order', - backRoute: RouteConstants.ROUTE_SETTINGS_USER_PREFERENCES_TRANSACTIONS, + backRoute: RouteConstants.ROUTE_SETTINGS_TRANSACTION, }) onMounted(() => { diff --git a/front/pages/settings/user-preferences-transactions.vue b/front/pages/settings/transactions/index.vue similarity index 62% rename from front/pages/settings/user-preferences-transactions.vue rename to front/pages/settings/transactions/index.vue index f3373c9..c02cf2c 100644 --- a/front/pages/settings/user-preferences-transactions.vue +++ b/front/pages/settings/transactions/index.vue @@ -4,9 +4,10 @@ -
Config:
- - + + + +
@@ -17,27 +18,6 @@ - -
List view:
- - - - -
-
@@ -55,16 +35,11 @@ import { saveSettingsToStore, watchSettingsStore } from '~/utils/SettingUtils.js const profileStore = useProfileStore() -const heroIconsList = HERO_ICONS_LIST -const isHeroIconsDropdownVisible = ref(false) - -const heroIcons = ref([]) const copyCategoryToDescription = ref(false) const copyTagToDescription = ref(false) const copyTagToCategory = ref(false) const syncedSettings = [ - { store: profileStore, path: 'heroIcons', ref: heroIcons }, { store: profileStore, path: 'copyCategoryToDescription', ref: copyCategoryToDescription }, { store: profileStore, path: 'copyTagToDescription', ref: copyTagToDescription }, { store: profileStore, path: 'copyTagToCategory', ref: copyTagToCategory }, @@ -78,12 +53,10 @@ const onSave = async () => { UIUtils.showToastSuccess('User preferences saved') } -const onGoToQuickTransactionAmounts = async () => await navigateTo(RouteConstants.ROUTE_SETTINGS_USER_PREFERENCES_QUICK_AMOUNTS) -const onGoToTransactionFieldsOrder = async () => await navigateTo(RouteConstants.ROUTE_SETTINGS_USER_PREFERENCES_TRANSACTION_FIELDS_ORDER) const toolbar = useToolbar() toolbar.init({ - title: 'Transaction config', + title: 'Transaction settings', backRoute: RouteConstants.ROUTE_SETTINGS, }) diff --git a/front/pages/settings/user-preferences-quick-transaction-amounts.vue b/front/pages/settings/transactions/quick-amounts.vue similarity index 95% rename from front/pages/settings/user-preferences-quick-transaction-amounts.vue rename to front/pages/settings/transactions/quick-amounts.vue index 361c83a..50bd3c1 100644 --- a/front/pages/settings/user-preferences-quick-transaction-amounts.vue +++ b/front/pages/settings/transactions/quick-amounts.vue @@ -57,7 +57,7 @@ const init = () => { const toolbar = useToolbar() toolbar.init({ title: 'Quick transaction amounts', - backRoute: RouteConstants.ROUTE_SETTINGS_USER_PREFERENCES_TRANSACTIONS, + backRoute: RouteConstants.ROUTE_SETTINGS_TRANSACTION, }) onMounted(() => { diff --git a/front/pages/settings/ui.vue b/front/pages/settings/ui.vue new file mode 100644 index 0000000..408fb76 --- /dev/null +++ b/front/pages/settings/ui.vue @@ -0,0 +1,85 @@ + + + diff --git a/front/pages/settings/user-preferences-dashboard-cards-order.vue b/front/pages/settings/user-preferences-dashboard-cards-order.vue deleted file mode 100644 index 78e47f8..0000000 --- a/front/pages/settings/user-preferences-dashboard-cards-order.vue +++ /dev/null @@ -1,75 +0,0 @@ - - - diff --git a/front/pages/settings/user-preferences-date.vue b/front/pages/settings/user-preferences-date.vue deleted file mode 100644 index 942758e..0000000 --- a/front/pages/settings/user-preferences-date.vue +++ /dev/null @@ -1,82 +0,0 @@ - - -