FC-softwares/baseball-scoreboard

View on GitHub
app/js/admin.js

Summary

Maintainability
A
0 mins
Test Coverage

Showing 0 of 6 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Invalid

if (active){
document.getElementById(part+"View").classList.remove("btn-outline-primary");
document.getElementById(part+"View").classList.add("btn-primary");
}else {
Severity: Major
Found in app/js/admin.js and 1 other location - About 1 hr to fix
app/js/admin.js on lines 64..67

Similar blocks of code found in 2 locations. Consider refactoring.
Invalid

}else {
document.getElementById(part+"View").classList.remove("btn-primary");
document.getElementById(part+"View").classList.add("btn-outline-primary");
}
Severity: Major
Found in app/js/admin.js and 1 other location - About 1 hr to fix
app/js/admin.js on lines 61..64

Similar blocks of code found in 2 locations. Consider refactoring.
Invalid

if(document.getElementById('LogoHome')?.files[0] !== undefined)
obj["Teams.Home.Logo"] = await fileToBase64(document.getElementById('LogoHome').files[0]);
Severity: Major
Found in app/js/admin.js and 1 other location - About 1 hr to fix
app/js/admin.js on lines 128..129

Similar blocks of code found in 2 locations. Consider refactoring.
Invalid

if(document.getElementById('LogoAway')?.files[0] !== undefined)
obj["Teams.Away.Logo"] = await fileToBase64(document.getElementById('LogoAway').files[0]);
Severity: Major
Found in app/js/admin.js and 1 other location - About 1 hr to fix
app/js/admin.js on lines 130..131

Similar blocks of code found in 2 locations. Consider refactoring.
Invalid

if (base == true) {
document.getElementById(id).classList.remove("btn-outline-primary");
document.getElementById(id).classList.add("btn-primary");
} else {
Severity: Minor
Found in app/js/admin.js and 1 other location - About 40 mins to fix
app/js/admin.js on lines 84..87

Similar blocks of code found in 2 locations. Consider refactoring.
Invalid

} else {
document.getElementById(id).classList.remove("btn-primary");
document.getElementById(id).classList.add("btn-outline-primary");
}
Severity: Minor
Found in app/js/admin.js and 1 other location - About 40 mins to fix
app/js/admin.js on lines 81..84

There are no issues that match your filters.

Category
Status