Skip to content

Commit 1ab1d62

Browse files
committed
chore: format all JS and SCSS files
1 parent c656b0a commit 1ab1d62

File tree

168 files changed

+3775
-3299
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

168 files changed

+3775
-3299
lines changed

commitlint.config.js

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
module.exports = {
2-
parserPreset: 'conventional-changelog-conventionalcommits',
2+
parserPreset: "conventional-changelog-conventionalcommits",
33
rules: {
4-
'subject-empty': [2, 'never'],
5-
'type-case': [2, 'always', 'lower-case'],
6-
'type-empty': [2, 'never'],
7-
'type-enum': [
4+
"subject-empty": [2, "never"],
5+
"type-case": [2, "always", "lower-case"],
6+
"type-empty": [2, "never"],
7+
"type-enum": [
88
2,
9-
'always',
9+
"always",
1010
[
11-
'build',
12-
'chore',
13-
'ci',
14-
'docs',
15-
'feat',
16-
'fix',
17-
'perf',
18-
'refactor',
19-
'revert',
20-
'style',
21-
'test',
22-
'patch',
11+
"build",
12+
"chore",
13+
"ci",
14+
"docs",
15+
"feat",
16+
"fix",
17+
"perf",
18+
"refactor",
19+
"revert",
20+
"style",
21+
"test",
22+
"patch",
2323
],
2424
],
2525
},

hrms/hr/dashboard_chart_source/employees_by_age/employees_by_age.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ frappe.dashboards.chart_sources["Employees by Age"] = {
88
label: __("Company"),
99
fieldtype: "Link",
1010
options: "Company",
11-
default: frappe.defaults.get_user_default("Company")
11+
default: frappe.defaults.get_user_default("Company"),
1212
},
13-
]
13+
],
1414
};

hrms/hr/dashboard_chart_source/hiring_vs_attrition_count/hiring_vs_attrition_count.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ frappe.dashboards.chart_sources["Hiring vs Attrition Count"] = {
88
label: __("Company"),
99
fieldtype: "Link",
1010
options: "Company",
11-
default: frappe.defaults.get_user_default("Company")
11+
default: frappe.defaults.get_user_default("Company"),
1212
},
1313
{
1414
fieldname: "from_date",
@@ -21,15 +21,15 @@ frappe.dashboards.chart_sources["Hiring vs Attrition Count"] = {
2121
fieldname: "to_date",
2222
label: __("To Date"),
2323
fieldtype: "Date",
24-
default: frappe.defaults.get_user_default("year_end_date"),
24+
default: frappe.defaults.get_user_default("year_end_date"),
2525
},
2626
{
2727
fieldname: "time_interval",
2828
label: __("Time Interval"),
2929
fieldtype: "Select",
3030
options: ["Monthly", "Quarterly", "Yearly"],
31-
default: "Monthly",
32-
reqd: 1
31+
default: "Monthly",
32+
reqd: 1,
3333
},
34-
]
34+
],
3535
};

hrms/hr/doctype/appointment_letter/appointment_letter.js

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,30 @@
11
// Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors
22
// For license information, please see license.txt
33

4-
frappe.ui.form.on('Appointment Letter', {
5-
appointment_letter_template: function(frm){
6-
if (frm.doc.appointment_letter_template){
4+
frappe.ui.form.on("Appointment Letter", {
5+
appointment_letter_template: function (frm) {
6+
if (frm.doc.appointment_letter_template) {
77
frappe.call({
8-
method: 'hrms.hr.doctype.appointment_letter.appointment_letter.get_appointment_letter_details',
9-
args : {
10-
template : frm.doc.appointment_letter_template
8+
method: "hrms.hr.doctype.appointment_letter.appointment_letter.get_appointment_letter_details",
9+
args: {
10+
template: frm.doc.appointment_letter_template,
1111
},
12-
callback: function(r){
13-
if(r.message){
12+
callback: function (r) {
13+
if (r.message) {
1414
let message_body = r.message;
1515
frm.set_value("introduction", message_body[0].introduction);
1616
frm.set_value("closing_notes", message_body[0].closing_notes);
17-
frm.doc.terms = []
18-
for (var i in message_body[1].description){
17+
frm.doc.terms = [];
18+
for (var i in message_body[1].description) {
1919
frm.add_child("terms");
20-
frm.fields_dict.terms.get_value()[i].title = message_body[1].description[i].title;
21-
frm.fields_dict.terms.get_value()[i].description = message_body[1].description[i].description;
20+
frm.fields_dict.terms.get_value()[i].title =
21+
message_body[1].description[i].title;
22+
frm.fields_dict.terms.get_value()[i].description =
23+
message_body[1].description[i].description;
2224
}
2325
frm.refresh();
2426
}
25-
}
26-
27+
},
2728
});
2829
}
2930
},
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors
22
// For license information, please see license.txt
33

4-
frappe.ui.form.on('Appointment Letter Template', {
4+
frappe.ui.form.on("Appointment Letter Template", {
55
// refresh: function(frm) {
6-
76
// }
87
});

hrms/hr/doctype/appraisal/appraisal.js

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -27,25 +27,33 @@ frappe.ui.form.on("Appraisal", {
2727
frappe.run_serially([
2828
() => {
2929
if (frm.doc.__islocal && frm.doc.appraisal_cycle) {
30-
frappe.db.get_value("Appraisal Cycle", frm.doc.appraisal_cycle, "kra_evaluation_method", (r) => {
31-
if (r.kra_evaluation_method) {
32-
frm.set_value("rate_goals_manually", cint(r.kra_evaluation_method === "Manual Rating"));
33-
}
34-
});
30+
frappe.db.get_value(
31+
"Appraisal Cycle",
32+
frm.doc.appraisal_cycle,
33+
"kra_evaluation_method",
34+
(r) => {
35+
if (r.kra_evaluation_method) {
36+
frm.set_value(
37+
"rate_goals_manually",
38+
cint(r.kra_evaluation_method === "Manual Rating"),
39+
);
40+
}
41+
},
42+
);
3543
}
3644
},
3745
() => {
3846
frm.call({
3947
method: "set_appraisal_template",
4048
doc: frm.doc,
4149
});
42-
}
50+
},
4351
]);
4452
}
4553
},
4654

4755
add_custom_buttons(frm) {
48-
frm.add_custom_button(__("View Goals"), function() {
56+
frm.add_custom_button(__("View Goals"), function () {
4957
frappe.route_options = {
5058
company: frm.doc.company,
5159
employee: frm.doc.employee,
@@ -90,16 +98,16 @@ frappe.ui.form.on("Appraisal", {
9098
name: "Score Obtained",
9199
chartType: "bar",
92100
values: scores,
93-
}
94-
]
101+
},
102+
],
95103
},
96104
title: __("Scores"),
97105
height: 250,
98106
type: "bar",
99107
barOptions: {
100-
spaceRatio: 0.7
108+
spaceRatio: 0.7,
101109
},
102-
colors: ["blue", "green"]
110+
colors: ["blue", "green"],
103111
});
104112
}
105113
},
@@ -112,10 +120,9 @@ frappe.ui.form.on("Appraisal", {
112120
});
113121

114122
frm.set_value("total_score", total);
115-
}
123+
},
116124
});
117125

118-
119126
frappe.ui.form.on("Appraisal Goal", {
120127
score(frm, cdt, cdn) {
121128
let d = frappe.get_doc(cdt, cdn);
@@ -140,9 +147,9 @@ frappe.ui.form.on("Appraisal Goal", {
140147
set_score_earned(frm, cdt, cdn) {
141148
let d = frappe.get_doc(cdt, cdn);
142149

143-
let score_earned = flt(d.score) * flt(d.per_weightage) / 100;
150+
let score_earned = (flt(d.score) * flt(d.per_weightage)) / 100;
144151
frappe.model.set_value(cdt, cdn, "score_earned", score_earned);
145152

146153
frm.trigger("calculate_total");
147-
}
148-
});
154+
},
155+
});

hrms/hr/doctype/appraisal_cycle/appraisal_cycle.js

Lines changed: 46 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ frappe.ui.form.on("Appraisal Cycle", {
66
frm.set_query("department", () => {
77
return {
88
filters: {
9-
company: frm.doc.company
10-
}
11-
}
9+
company: frm.doc.company,
10+
},
11+
};
1212
});
1313

1414
frm.trigger("show_custom_buttons");
@@ -30,14 +30,14 @@ frappe.ui.form.on("Appraisal Cycle", {
3030
let appraisals_created = frm.doc.__onload?.appraisals_created;
3131

3232
if (frm.doc.status !== "Completed") {
33-
className = appraisals_created ? "btn-default": "btn-primary";
33+
className = appraisals_created ? "btn-default" : "btn-primary";
3434

3535
frm.add_custom_button(__("Create Appraisals"), () => {
3636
frm.trigger("create_appraisals");
3737
}).addClass(className);
3838
}
3939

40-
className = appraisals_created ? "btn-primary": "btn-default";
40+
className = appraisals_created ? "btn-primary" : "btn-default";
4141

4242
if (frm.doc.status === "Not Started") {
4343
frm.add_custom_button(__("Start"), () => {
@@ -62,10 +62,10 @@ frappe.ui.form.on("Appraisal Cycle", {
6262
doc: frm.doc,
6363
freeze: true,
6464
freeze_message: __("Fetching Employees"),
65-
callback: function() {
65+
callback: function () {
6666
refresh_field("appraisees");
6767
frm.dirty();
68-
}
68+
},
6969
});
7070
},
7171

@@ -82,39 +82,51 @@ frappe.ui.form.on("Appraisal Cycle", {
8282
},
8383

8484
complete_cycle(frm) {
85-
let msg = __("This action will prevent making changes to the linked appraisal feedback/goals.");
85+
let msg = __(
86+
"This action will prevent making changes to the linked appraisal feedback/goals.",
87+
);
8688
msg += "<br>";
8789
msg += __("Are you sure you want to proceed?");
8890

89-
frappe.confirm(
90-
msg,
91-
() => {
92-
frm.call({
93-
method: "complete_cycle",
94-
doc: frm.doc,
95-
freeze: true,
96-
}).then((r) => {
97-
if (!r.exc) {
98-
frm.reload_doc();
99-
}
100-
});
101-
}
102-
);
91+
frappe.confirm(msg, () => {
92+
frm.call({
93+
method: "complete_cycle",
94+
doc: frm.doc,
95+
freeze: true,
96+
}).then((r) => {
97+
if (!r.exc) {
98+
frm.reload_doc();
99+
}
100+
});
101+
});
103102
},
104103

105104
show_appraisal_summary(frm) {
106105
if (frm.doc.__islocal) return;
107106

108-
frappe.call(
109-
"hrms.hr.doctype.appraisal_cycle.appraisal_cycle.get_appraisal_cycle_summary",
110-
{cycle_name: frm.doc.name}
111-
).then(r => {
112-
if (r.message) {
113-
frm.dashboard.add_indicator(__("Appraisees: {0}", [r.message.appraisees]), "blue");
114-
frm.dashboard.add_indicator(__("Self Appraisal Pending: {0}", [r.message.self_appraisal_pending]), "orange");
115-
frm.dashboard.add_indicator(__("Employees without Feedback: {0}", [r.message.feedback_missing]), "orange");
116-
frm.dashboard.add_indicator(__("Employees without Goals: {0}", [r.message.goals_missing]), "orange");
117-
}
118-
});
119-
}
107+
frappe
108+
.call("hrms.hr.doctype.appraisal_cycle.appraisal_cycle.get_appraisal_cycle_summary", {
109+
cycle_name: frm.doc.name,
110+
})
111+
.then((r) => {
112+
if (r.message) {
113+
frm.dashboard.add_indicator(
114+
__("Appraisees: {0}", [r.message.appraisees]),
115+
"blue",
116+
);
117+
frm.dashboard.add_indicator(
118+
__("Self Appraisal Pending: {0}", [r.message.self_appraisal_pending]),
119+
"orange",
120+
);
121+
frm.dashboard.add_indicator(
122+
__("Employees without Feedback: {0}", [r.message.feedback_missing]),
123+
"orange",
124+
);
125+
frm.dashboard.add_indicator(
126+
__("Employees without Goals: {0}", [r.message.goals_missing]),
127+
"orange",
128+
);
129+
}
130+
});
131+
},
120132
});

hrms/hr/doctype/appraisal_template/appraisal_template.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
frappe.ui.form.on("Appraisal Template", {
55
setup(frm) {
66
frm.get_field("rating_criteria").grid.editable_fields = [
7-
{fieldname: "criteria", columns: 6},
8-
{fieldname: "per_weightage", columns: 5},
7+
{ fieldname: "criteria", columns: 6 },
8+
{ fieldname: "per_weightage", columns: 5 },
99
];
1010
},
1111
});

hrms/hr/doctype/attendance/attendance.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ frappe.ui.form.on("Attendance", {
99

1010
frm.set_query("employee", () => {
1111
return {
12-
query: "erpnext.controllers.queries.employee_query"
13-
}
14-
})
12+
query: "erpnext.controllers.queries.employee_query",
13+
};
14+
});
1515
},
16-
})
16+
});

0 commit comments

Comments
 (0)