Commit 74ebda12d1b0e01d97588d57064c2d09cb4622f1
1 parent
2b4e6d8ee9
Exists in
master
Cambios para buscar remitos.
Showing
5 changed files
with
15 additions
and
24 deletions
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
| ... | ... | @@ -26,14 +26,7 @@ angular.module('focaModalRemito') |
| 26 | 26 | $scope.busquedaPress = function(key) { |
| 27 | 27 | if (key === 13) { |
| 28 | 28 | $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 | - } | |
| 29 | + focaModalRemitoService.getRemitos().then(llenarDatos); | |
| 37 | 30 | } |
| 38 | 31 | }; |
| 39 | 32 | function llenarDatos(res) { |
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" |