1
0
forked from test/crm

fix: removed doc & telegram link from user dropdown

(cherry picked from commit 807eb4a7d999729693ab79af2fab09efabf1c80e)
This commit is contained in:
Shariq Ansari 2025-05-21 17:51:26 +05:30 committed by Mergify
parent 50c69c173f
commit cc88d66de4
3 changed files with 6 additions and 30 deletions

View File

@ -24,9 +24,15 @@ class FCRMSettings(Document):
standard_old_items = [d.name1 for d in old_items if d.is_standard]
deleted_standard_items = set(standard_old_items) - set(standard_new_items)
if deleted_standard_items:
standard_dropdown_items = get_standard_dropdown_items()
if not deleted_standard_items.intersection(standard_dropdown_items):
return
frappe.throw(_("Cannot delete standard items {0}").format(", ".join(deleted_standard_items)))
def get_standard_dropdown_items():
return [item.get("name1") for item in frappe.get_hooks("standard_dropdown_items")]
def after_migrate():
sync_table("dropdown_items", "standard_dropdown_items")

View File

@ -264,22 +264,6 @@ standard_dropdown_items = [
"route": "#",
"is_standard": 1,
},
{
"name1": "support_link",
"label": "Support",
"type": "Route",
"icon": "life-buoy",
"route": "https://t.me/frappecrm",
"is_standard": 1,
},
{
"name1": "docs_link",
"label": "Docs",
"type": "Route",
"icon": "book-open",
"route": "https://docs.frappe.io/crm",
"is_standard": 1,
},
{
"name1": "toggle_theme",
"label": "Toggle theme",

View File

@ -131,20 +131,6 @@ function getStandardItem(item) {
return {
component: markRaw(Apps),
}
case 'support_link':
return {
icon: item.icon,
label: __(item.label),
onClick: () =>
window.open(item.route, item.open_in_new_window ? '_blank' : ''),
}
case 'docs_link':
return {
icon: item.icon,
label: __(item.label),
onClick: () =>
window.open(item.route, item.open_in_new_window ? '_blank' : ''),
}
case 'toggle_theme':
return {
icon: theme.value === 'dark' ? 'sun' : item.icon,