chuksjoe/AutoMart_UI

View on GitHub

Showing 10 of 10 total issues

Identical blocks of code found in 5 locations. Consider refactoring.
Open

closeNotifation.onclick = (e) => {
e.preventDefault();
notificationModal.style.display = 'none';
if (hasUpdatedInfo) autoRefresh(0);
toggleScroll();
Severity: Major
Found in UI/js/purchase-history.js and 4 other locations - About 1 hr to fix
UI/js/admin.js on lines 351..356
UI/js/my-profile.js on lines 276..281
UI/js/sales-history.js on lines 148..153
UI/js/users-list.js on lines 197..202

Identical blocks of code found in 5 locations. Consider refactoring.
Open

closeNotifation.onclick = (e) => {
e.preventDefault();
notificationModal.style.display = 'none';
if (hasUpdatedInfo) autoRefresh(0);
toggleScroll();
Severity: Major
Found in UI/js/users-list.js and 4 other locations - About 1 hr to fix
UI/js/admin.js on lines 351..356
UI/js/my-profile.js on lines 276..281
UI/js/purchase-history.js on lines 221..226
UI/js/sales-history.js on lines 148..153

Identical blocks of code found in 5 locations. Consider refactoring.
Open

closeNotifation.onclick = (e) => {
e.preventDefault();
notificationModal.style.display = 'none';
if (hasUpdatedInfo) autoRefresh(0);
toggleScroll();
Severity: Major
Found in UI/js/my-profile.js and 4 other locations - About 1 hr to fix
UI/js/admin.js on lines 351..356
UI/js/purchase-history.js on lines 221..226
UI/js/sales-history.js on lines 148..153
UI/js/users-list.js on lines 197..202

Identical blocks of code found in 5 locations. Consider refactoring.
Open

closeNotifation.onclick = (e) => {
e.preventDefault();
notificationModal.style.display = 'none';
if (hasUpdatedInfo) autoRefresh(0);
toggleScroll();
Severity: Major
Found in UI/js/admin.js and 4 other locations - About 1 hr to fix
UI/js/my-profile.js on lines 276..281
UI/js/purchase-history.js on lines 221..226
UI/js/sales-history.js on lines 148..153
UI/js/users-list.js on lines 197..202

Identical blocks of code found in 5 locations. Consider refactoring.
Open

closeNotifation.onclick = (e) => {
e.preventDefault();
notificationModal.style.display = 'none';
if (hasUpdatedInfo) autoRefresh(0);
toggleScroll();
Severity: Major
Found in UI/js/sales-history.js and 4 other locations - About 1 hr to fix
UI/js/admin.js on lines 351..356
UI/js/my-profile.js on lines 276..281
UI/js/purchase-history.js on lines 221..226
UI/js/users-list.js on lines 197..202

Identical blocks of code found in 2 locations. Consider refactoring.
Open

const options = {
method: 'PATCH',
body: JSON.stringify({ price: new_price }),
headers: { 'Content-Type': 'application/json', authorization: `Bearer ${token}` },
};
Severity: Major
Found in UI/js/purchase-history.js and 1 other location - About 1 hr to fix
UI/js/my-posted-ads.js on lines 82..86

Identical blocks of code found in 2 locations. Consider refactoring.
Open

const options = {
method: 'PATCH',
body: JSON.stringify({ price: new_price }),
headers: { 'Content-Type': 'application/json', authorization: `Bearer ${token}` },
};
Severity: Major
Found in UI/js/my-posted-ads.js and 1 other location - About 1 hr to fix
UI/js/purchase-history.js on lines 88..92

Identical blocks of code found in 2 locations. Consider refactoring.
Open

const options = {
method: 'POST',
body: JSON.stringify(data),
headers: { 'Content-Type': 'application/json', authorization: `Bearer ${token}` },
};
Severity: Minor
Found in UI/js/marketplace.js and 1 other location - About 50 mins to fix
UI/js/marketplace.js on lines 57..61

Identical blocks of code found in 2 locations. Consider refactoring.
Open

const options = {
method: 'POST',
body: JSON.stringify(data),
headers: { 'Content-Type': 'application/json', authorization: `Bearer ${token}` },
};
Severity: Minor
Found in UI/js/marketplace.js and 1 other location - About 50 mins to fix
UI/js/marketplace.js on lines 104..108

Avoid deeply nested control flow statements.
Open

if (sel.checked) {
variables.status = sel.value === 'on' ? null : sel.value;
}
Severity: Major
Found in UI/js/filter-response.js - About 45 mins to fix
    Severity
    Category
    Status
    Source
    Language