Merge pull request #14054 from shariquerik/show-docstatus-in-list-view
fix: Show docstatus in list view through status indicator pill
This commit is contained in:
commit
a194a05c06
2 changed files with 9 additions and 2 deletions
|
|
@ -952,9 +952,16 @@ frappe.views.ListView = class ListView extends frappe.views.BaseList {
|
|||
|
||||
get_indicator_html(doc) {
|
||||
const indicator = frappe.get_indicator(doc, this.doctype);
|
||||
// sequence is important
|
||||
const docstatus_description = [
|
||||
__('Document is in draft state'),
|
||||
__('Document has been submitted'),
|
||||
__('Document has been cancelled')
|
||||
];
|
||||
const title = docstatus_description[doc.docstatus || 0];
|
||||
if (indicator) {
|
||||
return `<span class="indicator-pill ${indicator[1]} filterable ellipsis"
|
||||
data-filter='${indicator[2]}'>
|
||||
data-filter='${indicator[2]}' title='${title}'>
|
||||
<span class="ellipsis"> ${__(indicator[0])}</span>
|
||||
<span>`;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -175,4 +175,4 @@
|
|||
|
||||
@keyframes blink {
|
||||
50% { opacity: 0.5; }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue