Showing 48 of 58 total issues
Similar blocks of code found in 2 locations. Consider refactoring. Open
if (emailTextField) { emailTextField[0].value = email; if (emailTextField[1]) { emailTextField[1].value = email; }
- Read upRead up
Similar blocks of code found in 4 locations. Consider refactoring. Open
fetch(`${baseUrl}/accounts`, { headers: { 'Content-Type': 'application/json', 'x-access-token': `Bearer ${token}`, },
- Read upRead up
Similar blocks of code found in 4 locations. Consider refactoring. Open
fetch(`${baseUrl}/auth/signup`, { headers: { 'Content-Type': 'application/json', }, mode: 'cors',
- Read upRead up
Similar blocks of code found in 4 locations. Consider refactoring. Open
fetch(transactUrl, { headers: { "Content-Type": "application/json", "x-access-token": `Bearer ${token}` },
- Read upRead up
Similar blocks of code found in 4 locations. Consider refactoring. Open
fetch(`${baseUrl}/auth/create/staff`, { headers: { 'Content-Type': 'application/json', 'x-access-token': `Bearer ${token}`, },
- Read upRead up
Function search
has a Cognitive Complexity of 7 (exceeds 6 allowed). Consider refactoring. Open
const search = () => { var input, filter, tr, td, i, txtValue; input = document.getElementById("searchInput"); filter = input.value.toUpperCase(); tr = accountTable.getElementsByTagName("tr");
- Read upRead up
Function onclick
has a Cognitive Complexity of 7 (exceeds 6 allowed). Consider refactoring. Open
signupButton.onclick = () => { if (!signupEmailInput.value.match(/\S+@\S+\.\S+/)) { errorsTag[0].innerHTML = 'Enter a valid email address'; }else if(signupFirstNameInput.value === '' || signupFirstNameInput.value === null){ errorsTag[0].innerHTML = 'First Name is required';
- Read upRead up
Function onclick
has a Cognitive Complexity of 7 (exceeds 6 allowed). Consider refactoring. Open
trasactButton.onclick = () => { if (amountTextField.value === "" || amountTextField.value === null) { errorTag[0].innerHTML = "Enter an amount"; } else if (!amountTextField.value.match(/^\d+(\.\d{1,2})?$/)) { errorTag[0].innerHTML = "Enter a valid amount";
- Read upRead up