Browse Source

Display select model in Model Hit and model download

version2
venkata akhil 11 months ago
parent
commit
2b5ee828d4
  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"),
"fieldtype": "Link",
"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"),
"fieldtype": "Link",
"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",
@ -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) {

Loading…
Cancel
Save