From 0c1419bed8037fa38bde7012e563ce1ee33f2c02 Mon Sep 17 00:00:00 2001 From: Daniel Camargo Date: Tue, 20 May 2014 20:14:27 -0300 Subject: [PATCH] partial #2969 - some fixed --- db/migrate/000189_driver_onboarding.sql | 6 +++--- www/assets/cockpit/js/service.location.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/db/migrate/000189_driver_onboarding.sql b/db/migrate/000189_driver_onboarding.sql index bd05223b3..6e32bc738 100644 --- a/db/migrate/000189_driver_onboarding.sql +++ b/db/migrate/000189_driver_onboarding.sql @@ -4,13 +4,13 @@ CREATE TABLE `driver_document` ( `name` varchar(40) DEFAULT NULL, `order` int(4) unsigned DEFAULT NULL, `url` text DEFAULT NULL, - PRIMARY KEY (`id_drivers_document`) + PRIMARY KEY (`id_driver_document`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; -INSERT INTO `driver_document` (`id_driver_document`, `name`, `url` `order`) +INSERT INTO `driver_document` (`id_driver_document`, `name`, `url`, `order`) VALUES - (1, 'Independant Contractor Agreement', 'https://s3.amazonaws.com/uploads.hipchat.com/41812/283752/6ngjeViT77TalSm/INDEPENDENT%20CONTRACTOR%20AGREEMENT_FINAL_2.4.14.doc' 1), + (1, 'Independant Contractor Agreement', 'https://s3.amazonaws.com/uploads.hipchat.com/41812/283752/6ngjeViT77TalSm/INDEPENDENT%20CONTRACTOR%20AGREEMENT_FINAL_2.4.14.doc', 1), (2, 'W9', 'https://s3.amazonaws.com/uploads.hipchat.com/41812/283752/R816dLDLvXfD5cM/W9.pdf', 2), (3, 'Direct Deposit', 'https://s3.amazonaws.com/uploads.hipchat.com/41812/283752/CYoVFxyk8OtNydv/Direct%20Deposit%207.10.pdf', 3), (4, 'Drivers License', '', 4), diff --git a/www/assets/cockpit/js/service.location.js b/www/assets/cockpit/js/service.location.js index b15635f55..0ee95e825 100644 --- a/www/assets/cockpit/js/service.location.js +++ b/www/assets/cockpit/js/service.location.js @@ -81,7 +81,7 @@ NGApp.factory('LocationService', function($http, $resource, $rootScope) { var track = function() { // I added this line - it was asking the user to login when he was filling the onboarding/setup form @pererinha - if( !$rootScope.account.user.id_admin ){ + if( !$rootScope || !$rootScope.account || !$rootScope.account.user || !$rootScope.account.user.id_admin ){ return; }