diff --git a/frontend/components.d.ts b/frontend/components.d.ts index 146b98cc..0e89df20 100644 --- a/frontend/components.d.ts +++ b/frontend/components.d.ts @@ -145,11 +145,10 @@ declare module 'vue' { FileVideoIcon: typeof import('./src/components/Icons/FileVideoIcon.vue')['default'] Filter: typeof import('./src/components/Filter.vue')['default'] FilterIcon: typeof import('./src/components/Icons/FilterIcon.vue')['default'] + ForecastingSettings: typeof import('./src/components/Settings/ForecastingSettings.vue')['default'] FormattedInput: typeof import('./src/components/Controls/FormattedInput.vue')['default'] FrappeCloudIcon: typeof import('./src/components/Icons/FrappeCloudIcon.vue')['default'] GenderIcon: typeof import('./src/components/Icons/GenderIcon.vue')['default'] - GeneralSettings: typeof import('./src/components/Settings/General/GeneralSettings.vue')['default'] - GeneralSettingsPage: typeof import('./src/components/Settings/General/GeneralSettingsPage.vue')['default'] GlobalModals: typeof import('./src/components/Modals/GlobalModals.vue')['default'] GoogleIcon: typeof import('./src/components/Icons/GoogleIcon.vue')['default'] Grid: typeof import('./src/components/Controls/Grid.vue')['default'] diff --git a/frontend/src/components/Settings/General/GeneralSettings.vue b/frontend/src/components/Settings/ForecastingSettings.vue similarity index 56% rename from frontend/src/components/Settings/General/GeneralSettings.vue rename to frontend/src/components/Settings/ForecastingSettings.vue index 551b05bd..8b681926 100644 --- a/frontend/src/components/Settings/General/GeneralSettings.vue +++ b/frontend/src/components/Settings/ForecastingSettings.vue @@ -2,10 +2,10 @@

- {{ __('General') }} + {{ __('Forecasting') }}

- {{ __('Configure general settings for your CRM') }} + {{ __('Configure forecasting settings for your CRM') }}

@@ -35,28 +35,30 @@
- +
+
+ +
+ @@ -65,29 +67,8 @@ import { getSettings } from '@/stores/settings' import { Switch, toast } from 'frappe-ui' -const emit = defineEmits(['updateStep']) - const { _settings: settings } = getSettings() -const settingsList = [ - { - name: 'currency-settings', - label: 'Currency & Exchange rate provider', - description: - 'Configure the currency and exchange rate provider for your CRM', - }, - { - name: 'brand-settings', - label: 'Brand settings', - description: 'Configure your brand name, logo and favicon', - }, - { - name: 'home-actions', - label: 'Home actions', - description: 'Configure actions that appear on the home dropdown', - }, -] - function toggleForecasting(value) { settings.doc.enable_forecasting = value !== undefined ? value : !settings.doc.enable_forecasting @@ -102,4 +83,19 @@ function toggleForecasting(value) { }, }) } + +function autoUpdateExpectedDealValue() { + settings.doc.auto_update_expected_deal_value = + !settings.doc.auto_update_expected_deal_value + + settings.save.submit(null, { + onSuccess: () => { + toast.success( + settings.doc.auto_update_expected_deal_value + ? __('Auto update of expected deal value enabled') + : __('Auto update of expected deal value disabled'), + ) + }, + }) +} diff --git a/frontend/src/components/Settings/General/GeneralSettingsPage.vue b/frontend/src/components/Settings/General/GeneralSettingsPage.vue deleted file mode 100644 index 3b71f1f7..00000000 --- a/frontend/src/components/Settings/General/GeneralSettingsPage.vue +++ /dev/null @@ -1,34 +0,0 @@ - - -