schedule conflicts backend relatively done

This commit is contained in:
Sriram Hariharan
2018-07-10 17:26:03 -05:00
parent f89318feba
commit 34cd9fc3c5
4 changed files with 60 additions and 32 deletions

View File

@@ -1,4 +1,17 @@
chrome.storage.sync.get('savedCourses', function(data) {
chrome.runtime.sendMessage({command: "checkConflicts"}, function(response) {
if(response.isConflict){
var between = response.between;
var text = "";
for(var i = 0; i<between.length;i++){
text+="Conflict between: "+between[i][0].coursename + " and "+between[i][1].coursename+"\n";
if(i != between.length-1){
text+= "<br></br>";
}
}
$("#headertext").append("<p style='font-size:small;color:red;'>"+text+"</>");
}
});
var courses = data.savedCourses;
console.log(courses);
for(var i = 0; i<courses.length;i++){