Browse Source

Model hit and model download nothing to show message udpate

master
administrator 9 months ago
parent
commit
f17c1c75fc
  1. 23
      smart_service/add_ons/report/model_download_report/model_download_report.js
  2. 21
      smart_service/add_ons/report/model_hit_report/model_hit_report.js

23
smart_service/add_ons/report/model_download_report/model_download_report.js

@ -24,8 +24,27 @@ frappe.query_reports["Model Download Report"] = {
"label": __("Model"), "label": __("Model"),
"fieldtype": "Link", "fieldtype": "Link",
"options" : "Vehicle", "options" : "Vehicle",
"reqd": 0 "reqd": 0,
"on_change":function() {
model = frappe.query_report.get_filter_value('model');
if (!model) {
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)
}
frappe.query_report.refresh();
}
} }
] ],
"onload":function(){
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>')
},400)
}
}; };

21
smart_service/add_ons/report/model_hit_report/model_hit_report.js

@ -24,7 +24,18 @@ frappe.query_reports["Model Hit Report"] = {
"label": __("Model"), "label": __("Model"),
"fieldtype": "Link", "fieldtype": "Link",
"options" : "Vehicle", "options" : "Vehicle",
"reqd": 0 "reqd": 0,
"on_change":function() {
model = frappe.query_report.get_filter_value('model');
if (!model) {
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)
}
frappe.query_report.refresh();
}
}, },
{ {
"fieldname":"variant", "fieldname":"variant",
@ -44,6 +55,14 @@ frappe.query_reports["Model Hit Report"] = {
} }
], ],
"onload":function(){
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>')
},400)
},
"formatter": function (value, row, column, data, default_formatter) { "formatter": function (value, row, column, data, default_formatter) {

Loading…
Cancel
Save