Merge branch 'develop' into fix-translatable-strings

This commit is contained in:
Suraj Shetty 2020-04-09 16:08:34 +05:30 committed by GitHub
commit 8d5fc2e968
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 25 additions and 6 deletions

View file

@ -3,15 +3,16 @@
# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence,
* @surajshetty3416, @netchampfaris
* @frappe/frappe-review-team
website/ @scmmishra
web_form/ @scmmishra
templates/ @scmmishra
www/ @scmmishra
integrations/ @Mangesh-Khairnar
patches/ @surajshetty3416 @sahil28297
patches/ @sahil28297
dashboard/ @prssanna
email/ @Thunderbottom
event_streaming/ @ruchamahabal
data_import* @netchampfaris
core/ @surajshetty3416
requirements.txt @gavindsouza
requirements.txt @gavindsouza

View file

@ -49,7 +49,8 @@
"fieldname": "chart_type",
"fieldtype": "Select",
"label": "Chart Type",
"options": "Count\nSum\nAverage\nGroup By\nCustom\nReport"
"options": "Count\nSum\nAverage\nGroup By\nCustom\nReport",
"set_only_once": 1
},
{
"depends_on": "eval:doc.chart_type === 'Custom'",
@ -215,7 +216,7 @@
}
],
"links": [],
"modified": "2020-03-31 16:00:01.987059",
"modified": "2020-04-08 18:54:36.739183",
"modified_by": "Administrator",
"module": "Desk",
"name": "Dashboard Chart",

View file

@ -8,5 +8,14 @@ frappe.ui.form.on('Notification Settings', {
route: '#modules/Settings',
type: 'Custom'
});
},
refresh: (frm) => {
if (frappe.user.has_role('System Manager')) {
frm.add_custom_button('Go to Notification Settings List', () => {
frappe.set_route('List', 'Notification Settings');
});
}
}
});

View file

@ -62,7 +62,14 @@ def get_subscribed_documents():
def get_permission_query_conditions(user):
if not user: user = frappe.session.user
return '''(`tabNotification Settings`.user = '{user}')'''.format(user=user)
if user == 'Administrator':
return
roles = frappe.get_roles(user)
if "System Manager" in roles:
return '''(`tabNotification Settings`.name != 'Administrator')'''
return '''(`tabNotification Settings`.name = '{user}')'''.format(user=user)
@frappe.whitelist()
def set_seen_value(value, user):

View file

@ -37,6 +37,7 @@
padding-bottom: 5px;
max-width: 330px;
min-width: 200px;
overflow-wrap: break-word;
.preview-field {
padding-bottom: 10px;