Skip to content

Commit

Permalink
remove messy code
Browse files Browse the repository at this point in the history
  • Loading branch information
tannerwuster committed Dec 13, 2024
1 parent a50d734 commit 1171786
Showing 1 changed file with 11 additions and 27 deletions.
38 changes: 11 additions & 27 deletions modules/ui/maproulette_menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ export function uiMapRouletteMenu(context) {
return;
}
_mapRouletteApiKey = apiKey;
d.action(d3_event, d, _qaItem);
d.action(d3_event, d);
});
} else {
d.action(d3_event, d, _qaItem);
d.action(d3_event, d);
}
mapRouletteMenu.close();
})
Expand Down Expand Up @@ -177,46 +177,30 @@ export function uiMapRouletteMenu(context) {
}


function fixedIt(d3_event, d, _qaItem) {
if (!_qaItem) {
console.error('No task selected');
return;
}
function fixedIt(d3_event, d) {
console.log('Current d in fixedIt:', d);
_qaItem._status = 1;
d._status = 1;
_actionTaken = 'FIXED';
submitTask(d3_event, _qaItem);
submitTask(d3_event, d);
}


function cantComplete(d3_event, d) {
if (_qaItem) {
_qaItem._status = 6;
d._status = 6;
_actionTaken = `CAN'T COMPLETE`;
submitTask(d3_event, _qaItem);
} else {
console.error('No task selected');
}
submitTask(d3_event, d);
}

function alreadyFixed(d3_event, d) {
if (_qaItem) {
_qaItem._status = 5;
d._status = 5;
_actionTaken = 'ALREADY FIXED';
submitTask(d3_event, _qaItem);
} else {
console.error('No task selected');
}
submitTask(d3_event, d);
}

function notAnIssue(d3_event, d) {
if (_qaItem) {
_qaItem._status = 2;
d._status = 2;
_actionTaken = 'NOT AN ISSUE';
submitTask(d3_event, _qaItem);
} else {
console.error('No task selected');
}
submitTask(d3_event, d);
}


Expand Down

0 comments on commit 1171786

Please sign in to comment.