Commit 930dcb5b001c938a65d531d7f10a7d19dd43e5df
1 parent
6f90691572
Exists in
master
get login data of vendedor playa
Showing
1 changed file
with
4 additions
and
0 deletions
Show diff stats
src/js/service.js
1 | angular.module('focaLogin') | 1 | angular.module('focaLogin') |
2 | .factory('focaLoginService', [ | 2 | .factory('focaLoginService', [ |
3 | '$http', 'API_ENDPOINT', 'APP', '$cookies', | 3 | '$http', 'API_ENDPOINT', 'APP', '$cookies', |
4 | function($http, API_ENDPOINT, APP, $cookies) { | 4 | function($http, API_ENDPOINT, APP, $cookies) { |
5 | return { | 5 | return { |
6 | login: function(usuario) { | 6 | login: function(usuario) { |
7 | var param = ''; | 7 | var param = ''; |
8 | 8 | ||
9 | if (APP) { | 9 | if (APP) { |
10 | param = '/' + APP; | 10 | param = '/' + APP; |
11 | } | 11 | } |
12 | 12 | ||
13 | return $http.post(API_ENDPOINT.URL + '/usuario/login' + param , usuario); | 13 | return $http.post(API_ENDPOINT.URL + '/usuario/login' + param , usuario); |
14 | }, | 14 | }, |
15 | getLoginData: function() { | 15 | getLoginData: function() { |
16 | if ($cookies.get('chofer')) { | 16 | if ($cookies.get('chofer')) { |
17 | return {chofer: $cookies.get('chofer')}; | 17 | return {chofer: $cookies.get('chofer')}; |
18 | } | 18 | } |
19 | 19 | ||
20 | if ($cookies.get('vendedorCobrador')) { | 20 | if ($cookies.get('vendedorCobrador')) { |
21 | return {vendedorCobrador: $cookies.get('vendedorCobrador')}; | 21 | return {vendedorCobrador: $cookies.get('vendedorCobrador')}; |
22 | } | 22 | } |
23 | |||
24 | if ($cookies.get('vendedorPlaya')) { | ||
25 | return {vendedorPlaya: $cookies.get('vendedorPlaya')}; | ||
26 | } | ||
23 | } | 27 | } |
24 | }; | 28 | }; |
25 | } | 29 | } |
26 | ]); | 30 | ]); |
27 | 31 |