|
|
@@ -359,15 +359,18 @@ def get_desktop_page(page): |
|
|
|
Returns: |
|
|
|
dict: dictionary of cards, charts and shortcuts to be displayed on website |
|
|
|
""" |
|
|
|
wspace = Workspace(page) |
|
|
|
wspace.build_workspace() |
|
|
|
return { |
|
|
|
'charts': wspace.charts, |
|
|
|
'shortcuts': wspace.shortcuts, |
|
|
|
'cards': wspace.cards, |
|
|
|
'onboarding': wspace.onboarding, |
|
|
|
'allow_customization': not wspace.doc.disable_user_customization |
|
|
|
} |
|
|
|
try: |
|
|
|
wspace = Workspace(page) |
|
|
|
wspace.build_workspace() |
|
|
|
return { |
|
|
|
'charts': wspace.charts, |
|
|
|
'shortcuts': wspace.shortcuts, |
|
|
|
'cards': wspace.cards, |
|
|
|
'onboarding': wspace.onboarding, |
|
|
|
'allow_customization': not wspace.doc.disable_user_customization |
|
|
|
} |
|
|
|
except DoesNotExistError: |
|
|
|
return {} |
|
|
|
|
|
|
|
@frappe.whitelist() |
|
|
|
def get_desk_sidebar_items(): |
|
|
@@ -608,3 +611,4 @@ def merge_cards_based_on_label(cards): |
|
|
|
cards_dict[label] = card |
|
|
|
|
|
|
|
return list(cards_dict.values()) |
|
|
|
|