fix: remove unused imports
This commit is contained in:
parent
b2549a275c
commit
730d9d91cf
7 changed files with 10 additions and 15 deletions
|
|
@ -9,8 +9,7 @@ import json
|
|||
from frappe.model.document import Document
|
||||
from frappe.core.doctype.user.user import extract_mentions
|
||||
from frappe.core.doctype.notification_log.notification_log import create_notification_log
|
||||
from frappe.core.doctype.notification_settings.notification_settings import (is_notifications_enabled,
|
||||
is_email_notifications_enabled)
|
||||
from frappe.core.doctype.notification_settings.notification_settings import is_email_notifications_enabled
|
||||
from frappe.utils import get_fullname, get_link_to_form
|
||||
from frappe.website.render import clear_cache
|
||||
from frappe.database.schema import add_column
|
||||
|
|
|
|||
|
|
@ -9,8 +9,6 @@ from frappe.utils import validate_email_address, get_fullname, strip_html, cstr
|
|||
from frappe.core.doctype.communication.email import (validate_email,
|
||||
notify, _notify, update_parent_mins_to_first_response)
|
||||
from frappe.core.doctype.notification_log.notification_log import create_notification_log
|
||||
from frappe.core.doctype.notification_settings.notification_settings import (is_notifications_enabled,
|
||||
is_email_notifications_enabled, is_energy_point_notifications_enabled)
|
||||
from frappe.core.utils import get_parent_doc
|
||||
from frappe.utils.bot import BotReply
|
||||
from frappe.utils import parse_addr
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ from __future__ import unicode_literals
|
|||
import frappe
|
||||
from frappe.model.document import Document
|
||||
from frappe.core.doctype.notification_settings.notification_settings import (is_notifications_enabled,
|
||||
is_email_notifications_enabled, is_energy_point_notifications_enabled)
|
||||
is_energy_point_notifications_enabled)
|
||||
|
||||
class NotificationLog(Document):
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ def get_subscribed_documents():
|
|||
name = settings[0].name
|
||||
doc = frappe.get_doc('Notification Settings', name)
|
||||
subscribed_documents = [item.document for item in doc.subscribed_documents]
|
||||
|
||||
|
||||
return subscribed_documents
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -4,9 +4,8 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
from frappe.utils import time_diff_in_seconds, now, now_datetime, DATETIME_FORMAT
|
||||
from frappe.utils import time_diff_in_seconds, now
|
||||
from frappe.core.doctype.notification_settings.notification_settings import get_subscribed_documents
|
||||
from dateutil.relativedelta import relativedelta
|
||||
from six import string_types
|
||||
import json
|
||||
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ frappe.ui.Notifications = class Notifications {
|
|||
this.$open_docs.html('');
|
||||
let defaults = ['ToDo'];
|
||||
this.get_counts(this.open_document_list['open_count_doctype'], 1, defaults);
|
||||
let targets = { doctypes : {} }, map = this.open_document_list['targets'];
|
||||
let targets = { doctypes: {} }, map = this.open_document_list['targets'];
|
||||
|
||||
Object.keys(map).map(doctype => {
|
||||
Object.keys(map[doctype]).map(doc => {
|
||||
|
|
@ -286,7 +286,7 @@ frappe.ui.Notifications = class Notifications {
|
|||
if (category_id !== 'notifications') {
|
||||
html += `<div class="text-center text-muted notifications-loading">
|
||||
${__("Loading...")}
|
||||
</div>`
|
||||
</div>`;
|
||||
}
|
||||
html += `</div></li>`;
|
||||
return html;
|
||||
|
|
@ -325,15 +325,15 @@ frappe.ui.Notifications = class Notifications {
|
|||
}
|
||||
});
|
||||
|
||||
this.$dropdown_list.on('click', '.recent-item', (e) => {
|
||||
this.$dropdown_list.on('click', '.recent-item', () => {
|
||||
this.$dropdown.removeClass('open');
|
||||
});
|
||||
|
||||
this.$dropdown.find('.header').on('click', function(e) {
|
||||
this.$dropdown.find('.header').on('click', function() {
|
||||
let hide = $(this).next().hasClass("in");
|
||||
$(this).find('.collapse-indicator').toggleClass("octicon-chevron-down", hide);
|
||||
$(this).find('.collapse-indicator').toggleClass("octicon-chevron-up", !hide);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -8,8 +8,7 @@ from frappe import _
|
|||
import json
|
||||
from frappe.model.document import Document
|
||||
from frappe.core.doctype.notification_log.notification_log import create_notification_log
|
||||
from frappe.core.doctype.notification_settings.notification_settings import (is_notifications_enabled,
|
||||
is_email_notifications_enabled, is_energy_point_notifications_enabled)
|
||||
from frappe.core.doctype.notification_settings.notification_settings import is_email_notifications_enabled
|
||||
from frappe.utils import cint, get_fullname, getdate, get_link_to_form
|
||||
|
||||
class EnergyPointLog(Document):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue