diff --git a/crm/fcrm/doctype/crm_dashboard/crm_dashboard.py b/crm/fcrm/doctype/crm_dashboard/crm_dashboard.py index 9007db67..8416d219 100644 --- a/crm/fcrm/doctype/crm_dashboard/crm_dashboard.py +++ b/crm/fcrm/doctype/crm_dashboard/crm_dashboard.py @@ -14,7 +14,7 @@ def default_manager_dashboard_layout(): """ Returns the default layout for the CRM Manager Dashboard. """ - return '[{"name":"total_leads","type":"number_chart","tooltip":"Total number of leads","layout":{"x":0,"y":0,"w":4,"h":2,"i":"total_leads"}},{"name":"ongoing_deals","type":"number_chart","tooltip":"Total number of ongoing deals","layout":{"x":8,"y":0,"w":4,"h":2,"i":"ongoing_deals"}},{"name":"won_deals","type":"number_chart","tooltip":"Total number of won deals","layout":{"x":12,"y":0,"w":4,"h":2,"i":"won_deals"}},{"name":"average_won_deal_value","type":"number_chart","tooltip":"Average value of won deals","layout":{"x":16,"y":0,"w":4,"h":2,"i":"average_won_deal_value"}},{"name":"average_deal_value","type":"number_chart","tooltip":"Average deal value of ongoing and won deals","layout":{"x":0,"y":2,"w":4,"h":2,"i":"average_deal_value"}},{"name":"average_time_to_close_a_lead","type":"number_chart","tooltip":"Average time taken to close a lead","layout":{"x":4,"y":0,"w":4,"h":2,"i":"average_time_to_close_a_lead"}},{"name":"average_time_to_close_a_deal","type":"number_chart","layout":{"x":4,"y":2,"w":4,"h":2,"i":"average_time_to_close_a_deal"}},{"name":"blank_card","type":"blank_card","layout":{"x":8,"y":2,"w":12,"h":2,"i":"blank_card"}},{"name":"sales_trend","type":"axis_chart","layout":{"x":0,"y":4,"w":10,"h":7,"i":"sales_trend"}},{"name":"forecasted_revenue","type":"axis_chart","layout":{"x":10,"y":4,"w":10,"h":7,"i":"forecasted_revenue"}},{"name":"funnel_conversion","type":"axis_chart","layout":{"x":0,"y":11,"w":10,"h":7,"i":"funnel_conversion"}},{"name":"deals_by_stage_donut","type":"donut_chart","layout":{"x":10,"y":11,"w":10,"h":7,"i":"deals_by_stage_donut"}},{"name":"lost_deal_reasons","type":"axis_chart","layout":{"x":0,"y":32,"w":20,"h":7,"i":"lost_deal_reasons"}},{"name":"leads_by_source","type":"donut_chart","layout":{"x":0,"y":18,"w":10,"h":7,"i":"leads_by_source"}},{"name":"deals_by_source","type":"donut_chart","layout":{"x":10,"y":18,"w":10,"h":7,"i":"deals_by_source"}},{"name":"deals_by_territory","type":"axis_chart","layout":{"x":0,"y":25,"w":10,"h":7,"i":"deals_by_territory"}},{"name":"deals_by_salesperson","type":"axis_chart","layout":{"x":10,"y":25,"w":10,"h":7,"i":"deals_by_salesperson"}}]' + return '[{"name":"total_leads","type":"number_chart","tooltip":"Total number of leads","layout":{"x":0,"y":0,"w":4,"h":2,"i":"total_leads"}},{"name":"ongoing_deals","type":"number_chart","tooltip":"Total number of ongoing deals","layout":{"x":8,"y":0,"w":4,"h":2,"i":"ongoing_deals"}},{"name":"won_deals","type":"number_chart","tooltip":"Total number of won deals","layout":{"x":12,"y":0,"w":4,"h":2,"i":"won_deals"}},{"name":"average_won_deal_value","type":"number_chart","tooltip":"Average value of won deals","layout":{"x":16,"y":0,"w":4,"h":2,"i":"average_won_deal_value"}},{"name":"average_deal_value","type":"number_chart","tooltip":"Average deal value of ongoing and won deals","layout":{"x":0,"y":2,"w":4,"h":2,"i":"average_deal_value"}},{"name":"average_time_to_close_a_lead","type":"number_chart","tooltip":"Average time taken to close a lead","layout":{"x":4,"y":0,"w":4,"h":2,"i":"average_time_to_close_a_lead"}},{"name":"average_time_to_close_a_deal","type":"number_chart","layout":{"x":4,"y":2,"w":4,"h":2,"i":"average_time_to_close_a_deal"}},{"name":"spacer","type":"spacer","layout":{"x":8,"y":2,"w":12,"h":2,"i":"spacer"}},{"name":"sales_trend","type":"axis_chart","layout":{"x":0,"y":4,"w":10,"h":7,"i":"sales_trend"}},{"name":"forecasted_revenue","type":"axis_chart","layout":{"x":10,"y":4,"w":10,"h":7,"i":"forecasted_revenue"}},{"name":"funnel_conversion","type":"axis_chart","layout":{"x":0,"y":11,"w":10,"h":7,"i":"funnel_conversion"}},{"name":"deals_by_stage_donut","type":"donut_chart","layout":{"x":10,"y":11,"w":10,"h":7,"i":"deals_by_stage_donut"}},{"name":"lost_deal_reasons","type":"axis_chart","layout":{"x":0,"y":32,"w":20,"h":7,"i":"lost_deal_reasons"}},{"name":"leads_by_source","type":"donut_chart","layout":{"x":0,"y":18,"w":10,"h":7,"i":"leads_by_source"}},{"name":"deals_by_source","type":"donut_chart","layout":{"x":10,"y":18,"w":10,"h":7,"i":"deals_by_source"}},{"name":"deals_by_territory","type":"axis_chart","layout":{"x":0,"y":25,"w":10,"h":7,"i":"deals_by_territory"}},{"name":"deals_by_salesperson","type":"axis_chart","layout":{"x":10,"y":25,"w":10,"h":7,"i":"deals_by_salesperson"}}]' def create_default_manager_dashboard(force=False): diff --git a/frontend/src/components/Dashboard/AddChartModal.vue b/frontend/src/components/Dashboard/AddChartModal.vue index 72fe60dd..31c2931c 100644 --- a/frontend/src/components/Dashboard/AddChartModal.vue +++ b/frontend/src/components/Dashboard/AddChartModal.vue @@ -63,9 +63,9 @@ const fromDate = inject('fromDate', ref('')) const toDate = inject('toDate', ref('')) const filters = inject('filters', reactive({ period: '', user: '' })) -const chartType = ref('blank_card') +const chartType = ref('spacer') const chartTypes = [ - { label: __('Blank card'), value: 'blank_card' }, + { label: __('Spacer'), value: 'spacer' }, { label: __('Number chart'), value: 'number_chart' }, { label: __('Axis chart'), value: 'axis_chart' }, { label: __('Donut chart'), value: 'donut_chart' }, @@ -109,11 +109,11 @@ const donutCharts = [ async function addChart() { show.value = false - if (chartType.value == 'blank_card') { + if (chartType.value == 'spacer') { items.value.push({ - name: 'blank_card', - type: 'blank_card', - layout: { x: 0, y: 0, w: 4, h: 2, i: 'blank_card_' + getRandom(4) }, + name: 'spacer', + type: 'spacer', + layout: { x: 0, y: 0, w: 4, h: 2, i: 'spacer_' + getRandom(4) }, }) } else { await getChart(chartType.value) diff --git a/frontend/src/components/Dashboard/DashboardItem.vue b/frontend/src/components/Dashboard/DashboardItem.vue index 9784dc56..eefb5fc7 100644 --- a/frontend/src/components/Dashboard/DashboardItem.vue +++ b/frontend/src/components/Dashboard/DashboardItem.vue @@ -9,11 +9,11 @@
- {{ editing ? __('Blank card') : '' }} + {{ editing ? __('Spacer') : '' }}