Commit 97d48a46a6140da14c7824725d14c1362b20c341
Exists in
master
and in
2 other branches
Merge branch 'master' into 'master'
Master (pmarco) See merge request modulos-npm/foca-modal-remito!1
Showing
5 changed files
Show diff stats
gulpfile.js
... | ... | @@ -82,10 +82,14 @@ gulp.task('clean-post-install', function(){ |
82 | 82 | gulp.task('default', ['webserver']); |
83 | 83 | |
84 | 84 | gulp.task('watch', function() { |
85 | - gulp.watch([paths.srcJS, paths.srcViews], ['copy']) | |
85 | + gulp.watch([paths.srcJS, paths.srcViews], ['uglify']) | |
86 | 86 | }); |
87 | 87 | |
88 | 88 | gulp.task('copy', ['uglify'], function(){ |
89 | 89 | gulp.src('dist/*.js') |
90 | 90 | .pipe(gulp.dest('../../wrapper-demo/node_modules/foca-modal-remito/dist')); |
91 | 91 | }); |
92 | + | |
93 | +gulp.task('watchAndCopy', function() { | |
94 | + gulp.watch([paths.srcJS, paths.srcViews], ['copy']) | |
95 | +}); |
package.json
... | ... | @@ -42,7 +42,7 @@ |
42 | 42 | "foca-directivas": "git+https://debo.suite.repo/modulos-npm/foca-directivas", |
43 | 43 | "font-awesome": "^4.7.0", |
44 | 44 | "gulp": "^3.9.1", |
45 | - "gulp-angular-templatecache": "^2.2.3", | |
45 | + "gulp-angular-templatecache": "^2.2.5", | |
46 | 46 | "gulp-clean": "^0.4.0", |
47 | 47 | "gulp-concat": "^2.6.1", |
48 | 48 | "gulp-connect": "^5.6.1", |
src/js/controller.js
... | ... | @@ -4,13 +4,11 @@ angular.module('focaModalRemito') |
4 | 4 | '$filter', |
5 | 5 | '$scope', |
6 | 6 | '$uibModalInstance', |
7 | - 'parametroRemito', | |
8 | 7 | 'focaModalRemitoService', |
9 | - function($filter, $scope, $uibModalInstance, parametroRemito, | |
8 | + function($filter, $scope, $uibModalInstance, | |
10 | 9 | focaModalRemitoService |
11 | 10 | ) { |
12 | 11 | |
13 | - $scope.simbolo = parametroRemito.simbolo; | |
14 | 12 | $scope.filters = ''; |
15 | 13 | $scope.remitos = []; |
16 | 14 | $scope.primerBusqueda = false; |
... | ... | @@ -26,20 +24,10 @@ angular.module('focaModalRemito') |
26 | 24 | $scope.busquedaPress = function(key) { |
27 | 25 | if (key === 13) { |
28 | 26 | $scope.searchLoading = true; |
29 | - if(parametroRemito.idLista > 0) { | |
30 | - focaModalRemitoService | |
31 | - .getRemitosByIdLista(parametroRemito.idLista, $scope.filters) | |
32 | - .then(llenarDatos); | |
33 | - } else if(parametroRemito.idLista === -1) { | |
34 | - focaModalRemitoService.getRemitos() | |
35 | - .then(llenarDatos); | |
36 | - } | |
27 | + focaModalRemitoService.getRemitos().then(llenarDatos); | |
37 | 28 | } |
38 | 29 | }; |
39 | 30 | function llenarDatos(res) { |
40 | - for(var i = 0; i < res.data.length; i++) { | |
41 | - res.data[i].precio = res.data[i].precio / parametroRemito.cotizacion; | |
42 | - } | |
43 | 31 | $scope.searchLoading = false; |
44 | 32 | $scope.primerBusqueda = true; |
45 | 33 | $scope.remitos = res.data; |
src/js/service.js
... | ... | @@ -5,11 +5,7 @@ angular.module('focaModalRemito') |
5 | 5 | function($http, API_ENDPOINT) { |
6 | 6 | return { |
7 | 7 | getRemitos: function() { |
8 | - return $http.get(API_ENDPOINT.URL + '/articulos'); | |
9 | - }, | |
10 | - getRemitosByIdLista: function(id, filters) { | |
11 | - return $http.post(API_ENDPOINT.URL + '/articulos/lista', | |
12 | - {filters: filters, id: id}); | |
8 | + return $http.get(API_ENDPOINT.URL + '/remito'); | |
13 | 9 | } |
14 | 10 | }; |
15 | 11 | } |
src/views/foca-modal-remito.html
... | ... | @@ -29,10 +29,9 @@ |
29 | 29 | <table ng-show="primerBusqueda" class="table table-striped table-sm"> |
30 | 30 | <thead> |
31 | 31 | <tr> |
32 | - <th>Sec.</th> | |
33 | - <th>Cod.</th> | |
34 | - <th>Descripción</th> | |
35 | - <th>P. Base</th> | |
32 | + <th>Fecha</th> | |
33 | + <th>Cliente</th> | |
34 | + <th>Comprobante</th> | |
36 | 35 | <th></th> |
37 | 36 | </tr> |
38 | 37 | </thead> |
... | ... | @@ -43,12 +42,11 @@ |
43 | 42 | </td> |
44 | 43 | </tr> |
45 | 44 | <tr class="selectable" |
46 | - ng-repeat="(key,remito) in currentPageRemitos" | |
45 | + ng-repeat="(key, remito) in currentPageRemitos" | |
47 | 46 | ng-click="select(remito)"> |
48 | - <td ng-bind="remito.sector"></td> | |
49 | - <td ng-bind="remito.codigo"></td> | |
50 | - <td ng-bind="remito.descripcion"></td> | |
51 | - <td ng-bind="remito.precio | currency: simbolo : 4"></td> | |
47 | + <td ng-bind="remito.fechaRemito | date : 'dd/MM/yyyy'"></td> | |
48 | + <td ng-bind="remito.nombreCliente"></td> | |
49 | + <td ng-bind="[remito.sucursal, remito.numeroRemito] | comprobante"></td> | |
52 | 50 | <td> |
53 | 51 | <button |
54 | 52 | type="button" |