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:
Suraj Shetty 2021-09-01 13:09:06 +05:30 committed by GitHub
commit a194a05c06
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View file

@ -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>`;
}

View file

@ -175,4 +175,4 @@
@keyframes blink {
50% { opacity: 0.5; }
}
}