{"size": 1609, "ext": "js", "max_stars_repo_path": "shei/shei/report/graphic_project_analysis/graphic_project_analysis.js", "max_stars_repo_name": "CloudGround/shei", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "shei/shei/report/graphic_project_analysis/graphic_project_analysis.js", "max_issues_repo_name": "CloudGround/shei", "max_issues_repo_issues_event_min_datetime": "2018-07-27T18:52:01.000Z", "max_issues_repo_issues_event_max_datetime": "2018-12-18T16:37:59.000Z", "max_forks_repo_path": "shei/shei/report/graphic_project_analysis/graphic_project_analysis.js", "max_forks_repo_name": "CloudGround/shei", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 2, "max_forks_count": null, "avg_line_length": 33.5208333333, "max_line_length": 115, "alphanum_fraction": 0.5574891237}
// Copyright (c) 2016, Aptitude technologie and contributors
// For license information, please see license.txt
/* eslint-disable */

frappe.query_reports["Graphic Project Analysis"] = {
	"filters": [
		{
			"fieldname": "from_expected_start_date",
			"label": __("From Date"),
			"fieldtype": "Date",
			"default": frappe.defaults.get_user_default("year_start_date"),
		},
		{
			"fieldname": "to_expected_start_date",
			"label": __("To Date"),
			"fieldtype": "Date",
			"default": frappe.defaults.get_user_default("year_end_date"),
		},
		{
                        "fieldname": "status",
                        "label": __("Status"),
                        "fieldtype": "Select",
			"options" : "\nOpen\nCompleted\nTemplate\nStock purchase\nMarketing Projects",
			"default": "Completed",
                },
	],
	"formatter":
		function (value, row, column, data, default_formatter){
	        if (column['content'] == "Fabrication Time"){
		        if (data['Fabrication Time'] > 20){
		             value = "<span style='color:red!important;font-weight:bold;'>" + value + "</span>";
			}
		}
		if (column['content'] == "Printing Time"){
                        if (data['Printing Time'] > 20){
                             value = "<span style='color:orange!important;font-weight:bold;'>" + value + "</span>";
                        }
                }
		if (column.fieldtype == "Link"){
 			value = `<a href='#Form/${column.options}/${value}' target='blank'>${value}</a>`;
		}
		if (value == null){ //without this condition, it will print 'null' on the report
			value = ""
		}
		return value;
	}
};
