diff --git a/app/controllers/tags.js b/app/controllers/tags.js index ea9176e..8074aec 100644 --- a/app/controllers/tags.js +++ b/app/controllers/tags.js @@ -4,8 +4,7 @@ var mongoose = require('mongoose'), module.exports = function(piler) { return { index: function(req, res, next) { - - host = String(req.headers.host); + host = String(req.headers['x-forwarded-host']); host = host.split(':')[0]; if (host != 'n.atlb.co') { @@ -47,4 +46,4 @@ module.exports = function(piler) { }); } } -} \ No newline at end of file +} diff --git a/app/views/index.jade b/app/views/index.jade index b4abef7..d23d7e2 100644 --- a/app/views/index.jade +++ b/app/views/index.jade @@ -10,6 +10,10 @@ html(lang="en", ng-app="biomed", ng-controller="biomed.PageCtrl") a.brand(href='/', target='_self') Atlantic Biomedical progress-panel ul.nav.pull-right(ng-controller='biomed.AccountCtrl') + li + a(href='https://docs.google.com/a/atlanticbiomedical.com/forms/d/1i7CyNR2lcrz7bOL7u9ssKiMB2iBmXqOdvVKC0GRzRtY/viewform', target='_blank') + i.icon-shopping-cart + | Sales li a(href='https://docs.google.com/a/atlanticbiomedical.com/forms/d/16tPHoTkEQB7fqXxBDZk_7s-WLz6a3eXVBWiUyA0fntM/viewform', target='_blank') i.icon-thumbs-down diff --git a/app/views/tag.jade b/app/views/tag.jade index f55c27f..ed04e84 100644 --- a/app/views/tag.jade +++ b/app/views/tag.jade @@ -41,6 +41,8 @@ html(lang="en", ng-app="tags", ng-controller="tags.PageCtrl") dl.dl-horizontal(ng-show='tag') dt Client dd {{payload.tag.client.name}} ({{payload.tag.client.identifier}}) + dt Client Device ID + dd {{tag.clientDeviceId}} dt Device dd {{tag.device}} dt Make @@ -51,10 +53,14 @@ html(lang="en", ng-app="tags", ng-controller="tags.PageCtrl") dd {{tag.serialNumber}} dt Purchase Date dd {{tag.purchaseDate}} + dt Warranty Expiration + dd {{tag.deviceWarrantyExpiration}} dt Test dd {{tag.test}} dt Room # dd {{tag.roomNumber}} + dt PO Number + dd {{tag.poNumber}} a.btn.btn-primary(href='/auth', ng-show='tag') | Edit Tag @@ -70,8 +76,10 @@ html(lang="en", ng-app="tags", ng-controller="tags.PageCtrl") select(ng-model='client', required='required', ng-options='client._id as client.name + " (" + client.identifier + ")" for client in clients') - - + .control-group + label.control-label Client Device ID + .controls + input.text(ng-model='tag.clientDeviceId') .control-group label.control-label Device @@ -93,6 +101,11 @@ html(lang="en", ng-app="tags", ng-controller="tags.PageCtrl") label.control-label Purchase Date .controls input.text(type='date', ng-model='tag.purchaseDate') + .control-group + label.control-label Device Warranty Expiration + .controls + input.text(type='date', ng-model='deviceWarrantyExpiration') + .control-group label.control-label Test .controls @@ -101,5 +114,11 @@ html(lang="en", ng-app="tags", ng-controller="tags.PageCtrl") label.control-label Room # .controls input.text(ng-model='tag.roomNumber') + + .control-group + label.control-label PO Number + .controls + input.text(ng-model='tag.poNumber') + .control-group button.btn.btn-primary(ng-click='save()') Save diff --git a/config/auth.js b/config/auth.js index 089d58b..97f6dbc 100644 --- a/config/auth.js +++ b/config/auth.js @@ -8,7 +8,11 @@ module.exports = function(app, passport) { ]})); app.get('/auth/callback', function(req, res, next) { - passport.authenticate('google', function(err, user, info) { + var options = { + callbackURL: 'http://' + req.headers['x-forwarded-host'] + '/auth/callback' + }; + console.log(options); + passport.authenticate('google', options, function(err, user, info) { var redirectUrl = '/'; if (err) { return next(err); } @@ -42,4 +46,4 @@ module.exports = function(app, passport) { next(); } }; -}; \ No newline at end of file +}; diff --git a/config/config.js b/config/config.js index b8af1ad..75b95d8 100644 --- a/config/config.js +++ b/config/config.js @@ -2,7 +2,7 @@ module.exports = { development: { root: require('path').normalize(__dirname + '/..'), debug: true, - database: 'mongodb://biomed.akira.gs/biomed_devel2', + database: 'mongodb://wootbox.wootroot.me/biomed_devel2', auth: { clientId: '223145213165.apps.googleusercontent.com', clientSecret: '8MRNar9E_pRTOGTQonPzYOW_', diff --git a/config/passport.js b/config/passport.js index c925735..02021e5 100644 --- a/config/passport.js +++ b/config/passport.js @@ -16,7 +16,7 @@ module.exports = function(passport, config) { passport.use(new GoogleStrategy({ clientID: config.auth.clientId, clientSecret: config.auth.clientSecret, - callbackURL: config.auth.callback +// callbackURL: config.auth.callback }, function(accessToken, refreshToken, profile, done) { console.log(profile); @@ -52,4 +52,4 @@ module.exports = function(passport, config) { }); }); })); -} \ No newline at end of file +} diff --git a/logs/crash.log b/logs/crash.log index e69de29..fc4f549 100755 --- a/logs/crash.log +++ b/logs/crash.log @@ -0,0 +1,29 @@ +Server was reset on 06.07.2013 at 00:32:52 +Server was reset on 06.07.2013 at 00:32:52 +Server was reset on 06.07.2013 at 00:32:52 +Server was reset on 06.24.2013 at 10:40:55 +Server was reset on 06.24.2013 at 10:40:55 +Server was reset on 06.24.2013 at 10:40:55 +Server was reset on 06.24.2013 at 10:40:55 +Server was reset on 06.24.2013 at 10:40:55 +Server was reset on 06.24.2013 at 10:40:55 +Server was reset on 06.24.2013 at 10:40:55 +Server was reset on 06.24.2013 at 10:40:55 +Server was reset on 06.24.2013 at 10:40:55 +Server was reset on 06.24.2013 at 10:40:55 +Server was reset on 06.24.2013 at 10:40:55 +Server was reset on 06.24.2013 at 10:40:55 +Server was reset on 06.24.2013 at 10:40:55 +Server was reset on 06.24.2013 at 10:40:55 +Server was reset on 06.24.2013 at 10:40:55 +Server was reset on 06.24.2013 at 10:40:55 +Server was reset on 06.24.2013 at 10:40:55 +Server was reset on 06.24.2013 at 10:40:55 +Server was reset on 06.24.2013 at 10:40:55 +Server was reset on 06.24.2013 at 10:40:55 +Server was reset on 06.26.2013 at 07:24:10 +Server was reset on 06.26.2013 at 07:24:10 +Server was reset on 06.26.2013 at 07:24:10 +Server was reset on 06.26.2013 at 07:24:10 +Server was reset on 06.26.2013 at 07:24:10 +Server was reset on 07.01.2013 at 02:38:49 diff --git a/public/partials/workorders/add.html b/public/partials/workorders/add.html index c1a1dbf..46f3ee6 100644 --- a/public/partials/workorders/add.html +++ b/public/partials/workorders/add.html @@ -37,6 +37,7 @@ + @@ -159,7 +160,7 @@