fix: use tooltip from data
This commit is contained in:
parent
4a783fcba8
commit
0f06715d0c
@ -85,6 +85,7 @@ def get_total_leads(from_date, to_date, user=""):
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
"title": _("Total leads"),
|
"title": _("Total leads"),
|
||||||
|
"tooltip": _("Total number of leads"),
|
||||||
"value": current_month_leads,
|
"value": current_month_leads,
|
||||||
"delta": delta_in_percentage,
|
"delta": delta_in_percentage,
|
||||||
"deltaSuffix": "%",
|
"deltaSuffix": "%",
|
||||||
@ -124,7 +125,7 @@ def get_ongoing_deals(from_date, to_date, user=""):
|
|||||||
END) as prev_month_deals
|
END) as prev_month_deals
|
||||||
FROM `tabCRM Deal` d
|
FROM `tabCRM Deal` d
|
||||||
JOIN `tabCRM Deal Status` s ON d.status = s.name
|
JOIN `tabCRM Deal Status` s ON d.status = s.name
|
||||||
""",
|
""",
|
||||||
{
|
{
|
||||||
"from_date": from_date,
|
"from_date": from_date,
|
||||||
"to_date": to_date,
|
"to_date": to_date,
|
||||||
@ -142,6 +143,7 @@ def get_ongoing_deals(from_date, to_date, user=""):
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
"title": _("Ongoing deals"),
|
"title": _("Ongoing deals"),
|
||||||
|
"tooltip": _("Total number of non won/lost deals"),
|
||||||
"value": current_month_deals,
|
"value": current_month_deals,
|
||||||
"delta": delta_in_percentage,
|
"delta": delta_in_percentage,
|
||||||
"deltaSuffix": "%",
|
"deltaSuffix": "%",
|
||||||
@ -197,10 +199,10 @@ def get_average_ongoing_deal_value(from_date, to_date, user=""):
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
"title": _("Avg ongoing deal value"),
|
"title": _("Avg ongoing deal value"),
|
||||||
|
"tooltip": _("Average deal value of non won/lost deals"),
|
||||||
"value": current_month_avg_value,
|
"value": current_month_avg_value,
|
||||||
"delta": avg_value_delta,
|
"delta": avg_value_delta,
|
||||||
"prefix": get_base_currency_symbol(),
|
"prefix": get_base_currency_symbol(),
|
||||||
"tooltip": _("Average deal value of ongoing deals"),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -256,10 +258,10 @@ def get_won_deals(from_date, to_date, user=""):
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
"title": _("Won deals"),
|
"title": _("Won deals"),
|
||||||
|
"tooltip": _("Total number of won deals based on its closure date"),
|
||||||
"value": current_month_deals,
|
"value": current_month_deals,
|
||||||
"delta": delta_in_percentage,
|
"delta": delta_in_percentage,
|
||||||
"deltaSuffix": "%",
|
"deltaSuffix": "%",
|
||||||
"tooltip": _("Total number of won deals based on its closure date"),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -313,10 +315,10 @@ def get_average_won_deal_value(from_date, to_date, user=""):
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
"title": _("Avg won deal value"),
|
"title": _("Avg won deal value"),
|
||||||
|
"tooltip": _("Average deal value of won deals"),
|
||||||
"value": current_month_avg_value,
|
"value": current_month_avg_value,
|
||||||
"delta": avg_value_delta,
|
"delta": avg_value_delta,
|
||||||
"prefix": get_base_currency_symbol(),
|
"prefix": get_base_currency_symbol(),
|
||||||
"tooltip": _("Average deal value of won deals"),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -370,10 +372,9 @@ def get_average_deal_value(from_date, to_date, user=""):
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
"title": _("Avg deal value"),
|
"title": _("Avg deal value"),
|
||||||
"value": current_month_avg,
|
|
||||||
"tooltip": _("Average deal value of ongoing & won deals"),
|
"tooltip": _("Average deal value of ongoing & won deals"),
|
||||||
|
"value": current_month_avg,
|
||||||
"prefix": get_base_currency_symbol(),
|
"prefix": get_base_currency_symbol(),
|
||||||
# "suffix": "K",
|
|
||||||
"delta": delta,
|
"delta": delta,
|
||||||
"deltaSuffix": "%",
|
"deltaSuffix": "%",
|
||||||
}
|
}
|
||||||
@ -424,8 +425,8 @@ def get_average_time_to_close_a_lead(from_date, to_date, user=""):
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
"title": _("Avg time to close a lead"),
|
"title": _("Avg time to close a lead"),
|
||||||
"value": current_avg_lead,
|
|
||||||
"tooltip": _("Average time taken from lead creation to deal closure"),
|
"tooltip": _("Average time taken from lead creation to deal closure"),
|
||||||
|
"value": current_avg_lead,
|
||||||
"suffix": " days",
|
"suffix": " days",
|
||||||
"delta": delta_lead,
|
"delta": delta_lead,
|
||||||
"deltaSuffix": " days",
|
"deltaSuffix": " days",
|
||||||
@ -478,8 +479,8 @@ def get_average_time_to_close_a_deal(from_date, to_date, user=""):
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
"title": _("Avg time to close a deal"),
|
"title": _("Avg time to close a deal"),
|
||||||
"value": current_avg_deal,
|
|
||||||
"tooltip": _("Average time taken from deal creation to deal closure"),
|
"tooltip": _("Average time taken from deal creation to deal closure"),
|
||||||
|
"value": current_avg_deal,
|
||||||
"suffix": " days",
|
"suffix": " days",
|
||||||
"delta": delta_deal,
|
"delta": delta_deal,
|
||||||
"deltaSuffix": " days",
|
"deltaSuffix": " days",
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
v-if="item.type == 'number_card'"
|
v-if="item.type == 'number_card'"
|
||||||
class="rounded shadow overflow-hidden cursor-pointer"
|
class="rounded shadow overflow-hidden cursor-pointer"
|
||||||
>
|
>
|
||||||
<Tooltip :text="item.tooltip">
|
<Tooltip :text="item.data.tooltip">
|
||||||
<NumberChart v-if="item.data" :key="index" :config="item.data" />
|
<NumberChart v-if="item.data" :key="index" :config="item.data" />
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user