ci: add prettier to pre-commit (backport #40206) (#40362)

* ci: add prettier to pre-commit

(cherry picked from commit 2c16036ef3)

* style: format js files

---------

Co-authored-by: barredterra <14891507+barredterra@users.noreply.github.com>
Co-authored-by: Ankush Menat <ankush@frappe.io>
This commit is contained in:
mergify[bot]
2024-03-11 10:47:18 +05:30
committed by GitHub
parent 5f789d9abe
commit 7d3d2eb928
572 changed files with 24271 additions and 21331 deletions

View File

@@ -1,8 +1,7 @@
// Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on('Non Conformance', {
frappe.ui.form.on("Non Conformance", {
// refresh: function(frm) {
// }
});

View File

@@ -1,6 +1,4 @@
// Copyright (c) 2018, Frappe and contributors
// For license information, please see license.txt
frappe.ui.form.on('Quality Action', {
});
frappe.ui.form.on("Quality Action", {});

View File

@@ -1,10 +1,10 @@
// Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on('Quality Feedback', {
template: function(frm) {
frappe.ui.form.on("Quality Feedback", {
template: function (frm) {
if (frm.doc.template) {
frm.call('set_parameters');
frm.call("set_parameters");
}
}
},
});

View File

@@ -1,8 +1,7 @@
// Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on('Quality Feedback Template', {
frappe.ui.form.on("Quality Feedback Template", {
// refresh: function(frm) {
// }
});

View File

@@ -1,7 +1,7 @@
// Copyright (c) 2018, Frappe and contributors
// For license information, please see license.txt
frappe.ui.form.on('Quality Goal', {
frappe.ui.form.on("Quality Goal", {
// refresh: function(frm) {
// }
});

View File

@@ -1,6 +1,4 @@
// Copyright (c) 2018, Frappe and contributors
// For license information, please see license.txt
frappe.ui.form.on('Quality Meeting', {
});
frappe.ui.form.on("Quality Meeting", {});

View File

@@ -1,11 +1,10 @@
frappe.listview_settings['Quality Meeting'] = {
frappe.listview_settings["Quality Meeting"] = {
add_fields: ["status"],
get_indicator: function(doc) {
if(doc.status == "Open") {
get_indicator: function (doc) {
if (doc.status == "Open") {
return [__("Open"), "red", "status=,Open"];
}
else if(doc.status == "Close") {
} else if (doc.status == "Close") {
return [__("Close"), "green", ",status=,Close"];
}
}
},
};

View File

@@ -1,8 +1,7 @@
// Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on('Quality Meeting Agenda', {
frappe.ui.form.on("Quality Meeting Agenda", {
// refresh: function(frm) {
// }
});

View File

@@ -1,23 +1,23 @@
// Copyright (c) 2018, Frappe and contributors
// For license information, please see license.txt
frappe.ui.form.on('Quality Procedure', {
refresh: function(frm) {
frm.set_query('procedure', 'processes', (frm) =>{
frappe.ui.form.on("Quality Procedure", {
refresh: function (frm) {
frm.set_query("procedure", "processes", (frm) => {
return {
filters: {
name: ['not in', [frm.parent_quality_procedure, frm.name]]
}
name: ["not in", [frm.parent_quality_procedure, frm.name]],
},
};
});
frm.set_query('parent_quality_procedure', function(){
frm.set_query("parent_quality_procedure", function () {
return {
filters: {
is_group: 1,
name: ['!=', frm.doc.name]
}
name: ["!=", frm.doc.name],
},
};
});
}
},
});

View File

@@ -1,18 +1,18 @@
frappe.treeview_settings["Quality Procedure"] = {
ignore_fields:["parent_quality_procedure"],
get_tree_nodes: 'erpnext.quality_management.doctype.quality_procedure.quality_procedure.get_children',
add_tree_node: 'erpnext.quality_management.doctype.quality_procedure.quality_procedure.add_node',
ignore_fields: ["parent_quality_procedure"],
get_tree_nodes: "erpnext.quality_management.doctype.quality_procedure.quality_procedure.get_children",
add_tree_node: "erpnext.quality_management.doctype.quality_procedure.quality_procedure.add_node",
filters: [
{
fieldname: "parent_quality_procedure",
fieldtype: "Link",
options: "Quality Procedure",
label: __("Quality Procedure"),
get_query: function() {
get_query: function () {
return {
filters: [["Quality Procedure", 'is_group', '=', 1]]
filters: [["Quality Procedure", "is_group", "=", 1]],
};
}
},
},
],
breadcrumb: "Quality Management",
@@ -22,13 +22,13 @@ frappe.treeview_settings["Quality Procedure"] = {
menu_items: [
{
label: __("New Quality Procedure"),
action: function() {
action: function () {
frappe.new_doc("Quality Procedure", true);
},
condition: 'frappe.boot.user.can_create.indexOf("Quality Procedure") !== -1'
}
condition: 'frappe.boot.user.can_create.indexOf("Quality Procedure") !== -1',
},
],
onload: function(treeview) {
onload: function (treeview) {
treeview.make_tree();
},
};

View File

@@ -1,15 +1,15 @@
// Copyright (c) 2018, Frappe and contributors
// For license information, please see license.txt
frappe.ui.form.on('Quality Review', {
goal: function(frm) {
frappe.ui.form.on("Quality Review", {
goal: function (frm) {
frappe.call({
"method": "frappe.client.get",
method: "frappe.client.get",
args: {
doctype: "Quality Goal",
name: frm.doc.goal
name: frm.doc.goal,
},
callback: function(data){
callback: function (data) {
frm.fields_dict.reviews.grid.remove_all();
let objectives = data.message.objectives;
for (var i in objectives) {
@@ -19,7 +19,7 @@ frappe.ui.form.on('Quality Review', {
frm.fields_dict.reviews.get_value()[i].uom = objectives[i].uom;
}
frm.refresh();
}
},
});
},
});

View File

@@ -1,12 +1,10 @@
frappe.listview_settings['Quality Review'] = {
frappe.listview_settings["Quality Review"] = {
add_fields: ["action"],
get_indicator: function(doc)
{
if(doc.action == "No Action") {
get_indicator: function (doc) {
if (doc.action == "No Action") {
return [__("No Action"), "green", "action,=,No Action"];
}
else if(doc.action == "Action Initialised") {
} else if (doc.action == "Action Initialised") {
return [__("Action Initialised"), "red", "action,=,Action Initialised"];
}
}
},
};