Browse Source

Remove nothing to show message to select model and remove user id and user name

master
administrator 11 months ago
parent
commit
28251044e4
  1. 20
      smart_service/add_ons/report/model_download_report/model_download_report.js
  2. 24
      smart_service/add_ons/report/model_hit_report/model_hit_report.js
  3. 4
      smart_service/add_ons/report/model_hit_report/model_hit_report.py

20
smart_service/add_ons/report/model_download_report/model_download_report.js

@ -28,23 +28,23 @@ frappe.query_reports["Model Download Report"] = {
"on_change":function() { "on_change":function() {
model = frappe.query_report.get_filter_value('model'); model = frappe.query_report.get_filter_value('model');
if (!model) { if (!model) {
setTimeout(function mysam(){ // setTimeout(function mysam(){
$('.msg-box').empty() // $('.msg-box').empty()
$('.msg-box').append('<div><img src="/assets/frappe/images/ui-states/list-empty-state.svg" alt="Generic Empty State" class="null-state"></div><p>Please Enter the Model</p>') // $('.msg-box').append('<div><img src="/assets/frappe/images/ui-states/list-empty-state.svg" alt="Generic Empty State" class="null-state"></div><p>Please Enter the Model</p>')
},200) // },100)
} }
frappe.query_report.refresh(); frappe.query_report.refresh();
} }
} }
], ],
"onload":function(){ // "onload":function(){
setTimeout(function mysam(){ // setTimeout(function mysam(){
$('.msg-box').empty() // $('.msg-box').empty()
$('.msg-box').append('<div><img src="/assets/frappe/images/ui-states/list-empty-state.svg" alt="Generic Empty State" class="null-state"></div><p>Please Enter the Model</p>') // $('.msg-box').append('<div><img src="/assets/frappe/images/ui-states/list-empty-state.svg" alt="Generic Empty State" class="null-state"></div><p>Please Enter the Model</p>')
},400) // },400)
} // }
}; };

24
smart_service/add_ons/report/model_hit_report/model_hit_report.js

@ -28,11 +28,15 @@ frappe.query_reports["Model Hit Report"] = {
"on_change":function() { "on_change":function() {
model = frappe.query_report.get_filter_value('model'); model = frappe.query_report.get_filter_value('model');
if (!model) { if (!model) {
setTimeout(function mysam(){ variant = frappe.query_report.get_filter_value('variant');
$('.msg-box').empty() if(variant){
$('.msg-box').append('<div><img src="/assets/frappe/images/ui-states/list-empty-state.svg" alt="Generic Empty State" class="null-state"></div><p>Please Enter the Model</p>') frappe.query_report.set_filter_value("variant", '');
}
// setTimeout(function mysam(){
// $('.msg-box').empty()
// $('.msg-box').append('<div><img src="/assets/frappe/images/ui-states/list-empty-state.svg" alt="Generic Empty State" class="null-state"></div><p>Please Enter the Model</p>')
},200) // },200)
} }
frappe.query_report.refresh(); frappe.query_report.refresh();
} }
@ -55,14 +59,14 @@ frappe.query_reports["Model Hit Report"] = {
} }
], ],
"onload":function(){ // "onload":function(){
setTimeout(function mysam(){ // setTimeout(function mysam(){
$('.msg-box').empty() // $('.msg-box').empty()
$('.msg-box').append('<div><img src="/assets/frappe/images/ui-states/list-empty-state.svg" alt="Generic Empty State" class="null-state"></div><p>Please Enter the Model</p>') // $('.msg-box').append('<div><img src="/assets/frappe/images/ui-states/list-empty-state.svg" alt="Generic Empty State" class="null-state"></div><p>Please Enter the Model</p>')
},400) // },400)
}, // },
"formatter": function (value, row, column, data, default_formatter) { "formatter": function (value, row, column, data, default_formatter) {

4
smart_service/add_ons/report/model_hit_report/model_hit_report.py

@ -123,8 +123,8 @@ def get_data(filters):
def get_columns(): def get_columns():
columns = [ columns = [
{"label": _("<b>Date</b>"), "fieldname": "date", "fieldtype": "Date", "width": 150}, {"label": _("<b>Date</b>"), "fieldname": "date", "fieldtype": "Date", "width": 150},
{"label": _("<b>User ID</b>"), "fieldname": "login_name", "fieldtype": "Data", "width": 125}, # {"label": _("<b>User ID</b>"), "fieldname": "login_name", "fieldtype": "Data", "width": 125},
{"label": _("<b>User Name</b>"), "fieldname": "user_name", "fieldtype": "Data", "width": 125}, # {"label": _("<b>User Name</b>"), "fieldname": "user_name", "fieldtype": "Data", "width": 125},
{"label": _("<b>Model</b>"), "fieldname": "vehicle_id", "fieldtype": "Data", "width": 150}, {"label": _("<b>Model</b>"), "fieldname": "vehicle_id", "fieldtype": "Data", "width": 150},
{"label": _("<b>Variant Mapping</b>"), "fieldname": "variant_mapping_id", "fieldtype": "Data", "width": 150}, {"label": _("<b>Variant Mapping</b>"), "fieldname": "variant_mapping_id", "fieldtype": "Data", "width": 150},
{"label": _("<b>Variant</b>"), "fieldname": "variant_id", "fieldtype": "Data", "width": 80}, {"label": _("<b>Variant</b>"), "fieldname": "variant_id", "fieldtype": "Data", "width": 80},

Loading…
Cancel
Save