fix: Lab Test Completed status not visible in list view

This commit is contained in:
Rucha Mahabal 2020-07-30 13:49:13 +05:30
parent ff0b9bffcf
commit b00f870c77

View File

@ -3,13 +3,16 @@
*/
frappe.listview_settings['Lab Test'] = {
add_fields: ['name', 'status', 'invoiced'],
filters: [['docstatus', '=', '0']],
filters: [['docstatus', '=', '1']],
get_indicator: function (doc) {
if (doc.status == 'Approved') {
return [__('Approved'), 'green', 'status, = ,Approved'];
}
if (doc.status == 'Rejected') {
if (doc.status === 'Approved') {
return [__('Approved'), 'green', 'status, =, Approved'];
} else if (doc.status === 'Rejected') {
return [__('Rejected'), 'orange', 'status, =, Rejected'];
} else if (doc.status === 'Completed') {
return [__('Completed'), 'green', 'status, =, Completed'];
} else if (doc.status === 'Cancelled') {
return [__('Cancelled'), 'red', 'status, =, Cancelled'];
}
},
onload: function (listview) {