Commit 49773479 authored by Ian De La Cruz's avatar Ian De La Cruz

Now uses objectId

parent d8c1dfd4
...@@ -85,7 +85,7 @@ var app = { ...@@ -85,7 +85,7 @@ var app = {
searchTrip : function(busCompany) { searchTrip : function(busCompany) {
var tripQuery = new Parse.Query("Trip"); var tripQuery = new Parse.Query("Trip");
var busQuery = new Parse.Query("Bus_Company"); var busQuery = new Parse.Query("Bus_Company");
busQuery.equalTo('companyName', busCompany); busQuery.equalTo('objectId', busCompany);
tripQuery.include('origin'); tripQuery.include('origin');
tripQuery.include('destination'); tripQuery.include('destination');
tripQuery.include('assignedBus'); tripQuery.include('assignedBus');
...@@ -204,7 +204,7 @@ var app = { ...@@ -204,7 +204,7 @@ var app = {
// Append to DOM // Append to DOM
var skedQuery = new Parse.Query("Schedule"); var skedQuery = new Parse.Query("Schedule");
var busQuery = new Parse.Query("Bus_Company"); var busQuery = new Parse.Query("Bus_Company");
busQuery.equalTo('companyName', busCompany); busQuery.equalTo('objectId', busCompany);
skedQuery.include("busCompany"); skedQuery.include("busCompany");
skedQuery.matchesQuery("busCompany", busQuery); skedQuery.matchesQuery("busCompany", busQuery);
skedQuery.descending("scheduleCode").find({ skedQuery.descending("scheduleCode").find({
...@@ -236,7 +236,7 @@ var app = { ...@@ -236,7 +236,7 @@ var app = {
var plateQuery = new Parse.Query("Bus"); var plateQuery = new Parse.Query("Bus");
var busQuery = new Parse.Query("Bus_Company"); var busQuery = new Parse.Query("Bus_Company");
busQuery.equalTo("companyName", busCompany); busQuery.equalTo("objectId", busCompany);
plateQuery.matchesQuery("operator", busQuery); plateQuery.matchesQuery("operator", busQuery);
plateQuery.include("operator"); plateQuery.include("operator");
plateQuery.find({ plateQuery.find({
...@@ -258,7 +258,7 @@ window.onload = function(){ ...@@ -258,7 +258,7 @@ window.onload = function(){
// if(!loggedIn and trying to access index) → go to login // if(!loggedIn and trying to access index) → go to login
// If(loggedIn) → append logout // If(loggedIn) → append logout
var currUserAffiliation = currentUser.get("affiliation").id; var currUserAffiliation = currentUser.get("affiliation").id;
// console.log(currUserAffiliation); console.log(currUserAffiliation);
//set affiliation variable //set affiliation variable
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment