Skip to content

Commit

Permalink
fix: Customize status
Browse files Browse the repository at this point in the history
  • Loading branch information
rijilprakashan committed Nov 9, 2023
1 parent 21e62f0 commit 4c3a8e1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
16 changes: 16 additions & 0 deletions aumms/aumms/doctype/design_analysis/design_analysis_list.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
frappe.listview_settings['Design Analysis'] = {
add_fields: ["id", "status", "mobile_no", "delivery_date"],
has_indicator_for_draft:1,
get_indicator: function(doc) {
const status_colors = {
"Request For Verification": "grey",
"Request For Approval": "orange",
"Approved": "green",
"Rejected": "red",
"Hold": "yellow",
"BOM Created": "green",
"Workorder Created": "green"
};
return [__(doc.status), status_colors[doc.status], "status,=,"+doc.status];
},
};
6 changes: 3 additions & 3 deletions aumms/aumms/doctype/design_request/design_request_list.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ frappe.listview_settings['Design Request'] = {
const status_colors = {
"Request For Verification": "grey",
"Request For Approval": "orange",
"Approved": "purple",
"Approved": "green",
"Rejected": "red",
"Hold": "red",
"Hold": "yellow",
"BOM Created": "green",
"Workorder Created": "blue"
"Workorder Created": "green"
};
return [__(doc.status), status_colors[doc.status], "status,=,"+doc.status];
},
Expand Down

0 comments on commit 4c3a8e1

Please sign in to comment.