refactor: Remove energy_points field from user doctype

- to decouple energy point feature.
This commit is contained in:
Suraj Shetty 2019-03-22 08:08:55 +05:30
parent 4c8c44f541
commit d77fad8fbe
4 changed files with 4 additions and 37 deletions

View file

@ -64,7 +64,7 @@ frappe.ui.form.on('User', {
frm.points = frm.sidebar.image_section.append(`
<ul class="list-unstyled sidebar-menu">
<li align="center" class="bold text-muted">
<span class="text-large">${frm.doc.energy_points}</span> points
<span class="text-large">${frappe.boot.energy_points}</span> points
</li>
</ul>
`);

View file

@ -981,39 +981,6 @@
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "energy_points",
"fieldtype": "Int",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Energy Points",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
@ -2545,7 +2512,7 @@
"istable": 0,
"max_attachments": 5,
"menu_index": 0,
"modified": "2019-03-19 10:52:33.592908",
"modified": "2019-03-21 16:55:34.747934",
"modified_by": "Administrator",
"module": "Core",
"name": "User",

View file

@ -563,7 +563,7 @@ frappe.Application = Class.extend({
if (frappe.boot.energy_points_enabled) {
$(".toolbar-user-fullname").append(`
<span class="ellipsis hidden-xs energy-points hidden-sm primary">
(${frappe.user_info().energy_points} pts)
(${frappe.boot.energy_points} pts)
</span>
`);
}

View file

@ -19,7 +19,7 @@
{{ frappe.ellipsis(user.bio, 100) || 'No Bio'}}
</div>
</div>
<span class="text-muted text-nowrap">{{user.energy_points}} pts</span>
<span class="text-muted text-nowrap">{{frappe.boot.energy_points}} pts</span>
</li>
<li class="text-muted" v-if="!filtered_users.length">{{__('No user found')}}</li>
</ul>