diff --git a/src/pages/Dashboard/Cashflow.vue b/src/pages/Dashboard/Cashflow.vue
index 63106243..44e420cb 100644
--- a/src/pages/Dashboard/Cashflow.vue
+++ b/src/pages/Dashboard/Cashflow.vue
@@ -13,7 +13,11 @@
{{ t('Outflow') }}
- (period = value)" />
+ (period = value)"
+ :options="['This Year', 'This Quarter']"
+ />
frappe.format(value ?? 0, 'Currency');
const yMax = getYMax(points);
- return { points, xLabels, colors, format, yMax, formatX:formatXLabels };
+ return { points, xLabels, colors, format, yMax, formatX: formatXLabels };
},
},
methods: {
diff --git a/src/pages/Dashboard/PeriodSelector.vue b/src/pages/Dashboard/PeriodSelector.vue
index 49c9f9d7..4d92319f 100644
--- a/src/pages/Dashboard/PeriodSelector.vue
+++ b/src/pages/Dashboard/PeriodSelector.vue
@@ -39,14 +39,20 @@
import Dropdown from '@/components/Dropdown';
export default {
name: 'PeriodSelector',
- props: ['value'],
+ props: {
+ value: String,
+ options: {
+ type: Array,
+ default: () => ['This Year', 'This Quarter', 'This Month'],
+ },
+ },
+
components: {
Dropdown,
},
data() {
- let options = ['This Year', 'This Quarter', 'This Month'];
return {
- periodOptions: options.map((option) => {
+ periodOptions: this.options.map((option) => {
return {
label: option,
action: () => this.selectOption(option),
diff --git a/src/pages/Dashboard/ProfitAndLoss.vue b/src/pages/Dashboard/ProfitAndLoss.vue
index 8fc43def..5b9c4a3b 100644
--- a/src/pages/Dashboard/ProfitAndLoss.vue
+++ b/src/pages/Dashboard/ProfitAndLoss.vue
@@ -5,6 +5,7 @@
(period = value)"
/>