This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
context 'When loading the page for the first time' do | |
setup do | |
contact = FactoryGirl.create(:contact) | |
@fortune_company= FactoryGirl.create(:fortune_company, account_name: 'the Company') | |
FactoryGirl.create(:contact_history, contact: contact, company_name: @fortune_company.account_name) | |
FactoryGirl.create(:contact_history, contact: contact, company_name: @fortune_company.account_name) | |
FactoryGirl.create(:contact_history, contact: contact, company_name: @fortune_company.account_name) | |
FactoryGirl.create(:contact_history, contact: contact, company_name: @fortune_company.account_name) | |
@account2 = FactoryGirl.create(:account, id: 1234) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
context 'When loading the page for the first time' do | |
setup do | |
@account = FactoryGirl.create(:account, id: 1234) | |
@user = FactoryGirl.create(:confirmed_user, account: @account) | |
sign_in @user | |
contact = FactoryGirl.create(:contact, account: @account) | |
@fortune_company= FactoryGirl.create(:fortune_company, account_name: 'the Company') | |
FactoryGirl.create(:contact_history, contact: contact, company_name: @fortune_company.account_name) | |
FactoryGirl.create(:contact_history, contact: contact, company_name: @fortune_company.account_name) | |
FactoryGirl.create(:contact_history, contact: contact, company_name: @fortune_company.account_name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var app = angular.module('myApp', []); | |
function CartController($scope, Items) { | |
$scope.bill = {}; | |
$scope.items = Items; | |
console.log(Items); | |
$scope.$watch(function(){ //monitors any change | |
console.log('here'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.service("googlePlusService", function($http, $rootScope) { | |
return { | |
start: function() { | |
console.log('start'); | |
this.renderGooglePlusButton(); | |
}, | |
renderGooglePlusButton: function() { | |
console.log('render sign in button'); | |
gapi.signin.render('signInButton', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'submitResult': function () { | |
var playDetails = req.params.all().play; | |
var userDetails = req.params.all().user; | |
var user, play; | |
Play.find({id: playDetails.id}) | |
.then(function (playResult) { | |
play = playResult; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
myApp.service('DealRetrievalService', ['$http', function($http) { | |
return { | |
getAllDeals: function() { | |
return $http.get('/dealRecord') | |
.success(function(deals) { | |
var temp = DealRetrievalService.removeExpiredDeals(deals.data); | |
console.log('deals were:', temp); | |
return DealRetrievalService.removeExpiredDeals(deals.data); | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
myApp.service('DealRetrievalService', ['$http', function($http) { | |
var _this = this; | |
return { | |
removeInactiveDeals: function (deals) { | |
var newDeals = []; | |
_.forEach(deals, function (deal) { | |
if(deal.status === 'Active'){ | |
newDeals.push(deal); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'44', 'Sweaters! Yo', 'Is this not the best sweater ever...', 'Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum', '05 April 2014', '01 January 2015', 'While quantities last', 'https://res.cloudinary.com/orangesprocket/image/upload/v1411045215/pfwrzmslvqssg4moxvin.jpg', 'https://res.cloudinary.com/orangesprocket/image/upload/w_206,h_206,c_fill/x_0,y_0,w_204,h_219,c_crop/pfwrzmslvqssg4moxvin.jpg', 'Inactive', 'CanadianTire', 'Electronics', NULL, NULL, NULL, NULL, '6', '2014-09-18 10:00:39', '2014-09-26 14:50:22' | |
'0', 'Light Bulb', 'aoeu', 'aoeu', '01 January 2014', '01 January 2014', 'aoeu', 'https://res.cloudinary.com/orangesprocket/image/upload/v1411045430/wyzrvj45feyjzjy5dbhl.jpg', 'https://res.cloudinary.com/orangesprocket/image/upload/w_165,h_220,c_fill/x_0,y_0,w_204,h_219,c_crop/wyzrvj45feyjzjy5dbhl.jpg', 'Inactive', 'CanadianTire', 'Appliances', NULL, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$scope.saveResume = function () { | |
console.log('saved resume hit'); | |
if($scope.file_uploads.length !==0){ | |
$scope.profile.resume_url = $scope.file_uploads[0].url; | |
$http.post('/researcherUser/' + $scope.profile.id, $scope.profile).success(function (results) { | |
console.log('resume saved'); | |
}); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
myApp.controller('listUserController', function ($scope, $http, me, userList, UtilService) { | |
console.log('Users we got from server:'); | |
console.log(JSON.stringify(userList, null, 2)); | |
$scope.userList = userList; | |
$scope.em = me; | |
}); | |
myApp.controller("editUserController", function ($scope, $modal, $http, me, userService, UtilService, organizations) { | |
$scope.nums = []; |
OlderNewer