Skip to content

Commit

Permalink
chore: list view improvements store product
Browse files Browse the repository at this point in the history
  • Loading branch information
NagariaHussain committed Oct 25, 2023
1 parent e551a0f commit 5ab76f8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
{
"fieldname": "retail_price",
"fieldtype": "Currency",
"in_list_view": 1,
"label": "Retail Price"
},
{
Expand Down Expand Up @@ -89,6 +90,7 @@
{
"fieldname": "printrove_category",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Printrove Category",
"read_only": 1
},
Expand All @@ -113,7 +115,7 @@
"index_web_pages_for_search": 1,
"is_published_field": "is_published",
"links": [],
"modified": "2023-10-24 15:22:50.044694",
"modified": "2023-10-25 14:34:24.815275",
"modified_by": "Administrator",
"module": "Printrov Merch Store",
"name": "Store Product",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
frappe.listview_settings["Store Product"] = {
get_indicator: (doc) => {
let status = "Not Published";
let color = "gray";

if (doc.is_published) {
status = "Published";
color = "green";
}
return [status, color, "is_published,=," + doc.is_published];
},
};

0 comments on commit 5ab76f8

Please sign in to comment.