fixed bug with isConflict
This commit is contained in:
@@ -257,7 +257,7 @@ function checkConflicts(sendResponse) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
sendResponse({
|
sendResponse({
|
||||||
isConflict: conflicts.length === 0,
|
isConflict: conflicts.length !== 0,
|
||||||
between: conflicts.length ? conflicts : undefined,
|
between: conflicts.length ? conflicts : undefined,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -35,8 +35,8 @@ $.get("https://api.github.com/repos/sghsri/UT-Registration-Plus/stats/contributo
|
|||||||
for (var contributorData of data) {
|
for (var contributorData of data) {
|
||||||
$.get(`https://api.github.com/users/${contributorData.author.login}`, userData => {
|
$.get(`https://api.github.com/users/${contributorData.author.login}`, userData => {
|
||||||
let fullData = { ...contributorData, ...userData };
|
let fullData = { ...contributorData, ...userData };
|
||||||
let { login, avatar_url, html_url, name } = fullData;
|
let { login, avatar_url, html_url } = fullData;
|
||||||
$("#contributor-list").append(Template.Options.contributor_card(login, name, avatar_url, html_url));
|
$("#contributor-list").append(Template.Options.contributor_card(login, "name", avatar_url, html_url));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ function updateConflicts() {
|
|||||||
command: "checkConflicts",
|
command: "checkConflicts",
|
||||||
},
|
},
|
||||||
function (response) {
|
function (response) {
|
||||||
|
console.log("updateConflicts -> response", response);
|
||||||
if (response.isConflict) {
|
if (response.isConflict) {
|
||||||
var between = response.between;
|
var between = response.between;
|
||||||
let conflict_message = "";
|
let conflict_message = "";
|
||||||
@@ -317,8 +318,6 @@ function subtractHours(curr_course) {
|
|||||||
} else {
|
} else {
|
||||||
$("#meta-metric").text(curr_total_hours - class_length);
|
$("#meta-metric").text(curr_total_hours - class_length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleMoreInfo(clicked_item, curr_course) {
|
function handleMoreInfo(clicked_item, curr_course) {
|
||||||
|
|||||||
Reference in New Issue
Block a user