Commit d0f2b9d9f6f4b0941c256a16068a9b4938cfc45f

Authored by Eric Fernandez
Exists in master

Merge branch 'master' into 'master'

# Conflicts:
#   gulpfile.js
#   index.html
#   package.json
1   -const templateCache = require('gulp-angular-templatecache');
2   -const concat = require('gulp-concat');
3 1 const clean = require('gulp-clean');
4   -const htmlmin = require('gulp-htmlmin');
5   -const rename = require('gulp-rename');
6   -const uglify = require('gulp-uglify-es').default;
  2 +const concat = require('gulp-concat');
  3 +const connect = require('gulp-connect');
7 4 const gulp = require('gulp');
8   -const pump = require('pump');
  5 +const htmlmin = require('gulp-htmlmin');
9 6 const jshint = require('gulp-jshint');
  7 +const pump = require('pump');
  8 +const rename = require('gulp-rename');
10 9 const replace = require('gulp-replace');
  10 +const templateCache = require('gulp-angular-templatecache');
  11 +const uglify = require('gulp-uglify-es').default;
11 12  
12 13 var paths = {
  14 + dist: 'dist/',
13 15 srcJS: 'src/js/*.js',
14 16 srcViews: 'src/views/*.html',
15   - tmp: 'tmp',
16   - dist: 'dist/'
  17 + tmp: 'tmp'
17 18 };
18 19  
19   -gulp.task('templates', function() {
  20 +gulp.task('templates', ['clean'], function() {
20 21 return pump(
21 22 [
22 23 gulp.src(paths.srcViews),
... ... @@ -38,8 +39,8 @@ gulp.task('uglify', ['templates'], function() {
38 39 'tmp/views.js'
39 40 ]),
40 41 concat('foca-abm-plazo-pago.js'),
41   - replace("['ngRoute', 'ui.bootstrap']", '[]'),
42 42 replace('src/views/', ''),
  43 + replace("['ngRoute', 'ui.bootstrap']", '[]'),
43 44 gulp.dest(paths.tmp),
44 45 rename('foca-abm-plazo-pago.min.js'),
45 46 uglify(),
... ... @@ -65,8 +66,9 @@ gulp.task('pre-commit', function() {
65 66 });
66 67  
67 68 gulp.task('clean-post-install', function() {
68   - return gulp.src(['src', 'tmp', '.jshintrc','readme.md', '.gitignore', 'gulpfile.js',
69   - 'index.html'], {read: false})
  69 + return gulp.src([
  70 + 'src', 'tmp', '.jshintrc', 'readme.md', '.gitignore', 'gulpfile.js', 'index.html'
  71 + ], {read: false})
70 72 .pipe(clean());
71 73 });
72 74  
1 1 <html ng-app="focaAbmPlazoPago">
2 2 <head>
3   - <meta charset="UTF-8"/>
  3 + <meta charset="UTF-8" />
4 4 <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
5   -
  5 +
6 6 <!--CSS-->
7   - <link href="node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet"/>
8   - <link href="node_modules/font-awesome/css/font-awesome.min.css" rel="stylesheet"/>
  7 + <link href="node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet" />
  8 + <link href="node_modules/font-awesome/css/font-awesome.min.css" rel="stylesheet" />
9 9  
10 10 <!--VENDOR JS-->
11 11 <script src="node_modules/jquery/dist/jquery.min.js"></script>
12 12 <script src="node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
13 13 <script src="node_modules/angular/angular.min.js"></script>
14 14 <script src="node_modules/angular-route/angular-route.min.js"></script>
15   - <script src="node_modules/ui-bootstrap4/dist/ui-bootstrap-tpls.js"></script>
  15 + <script src="node_modules/ui-bootstrap4/dist/ui-bootstrap-tpls.js"></script>
16 16  
  17 + <!-- BUILD -->
17 18 <script src="src/js/app.js"></script>
18 19 <script src="src/js/route.js"></script>
19 20 <script src="src/js/controller.js"></script>
20 21 <script src="src/js/service.js"></script>
21 22 <script src="src/etc/develop.js"></script>
  23 + <!-- /BUILD -->
22 24 </head>
23   - <body ng-view>
24   -
  25 + <body>
  26 + <div ng-view></div>
25 27 </body>
26 28 </html>
... ... @@ -8,7 +8,7 @@
8 8 "compile": "gulp uglify",
9 9 "gulp-pre-commit": "gulp pre-commit",
10 10 "postinstall": "npm run compile && gulp clean-post-install",
11   - "install-dev": "npm install -D gulp gulp-connect jasmine-core pre-commit angular angular-route bootstrap ui-bootstrap4 font-awesome gulp-angular-templatecache gulp-clean gulp-htmlmin gulp-jshint gulp-rename gulp-replace gulp-sequence gulp-uglify-es jquery jshint pump"
  11 + "install-dev": "npm install -D jasmine-core pre-commit angular angular-route bootstrap ui-bootstrap4 font-awesome gulp gulp-angular-templatecache gulp-connect gulp-clean gulp-htmlmin gulp-jshint gulp-rename gulp-replace gulp-sequence gulp-uglify-es jquery jshint pump"
12 12 },
13 13 "pre-commit": [
14 14 "gulp-pre-commit"
... ... @@ -34,12 +34,12 @@
34 34 "pump": "^3.0.x"
35 35 },
36 36 "devDependencies": {
37   - "angular": "^1.7.4",
  37 + "angular": "^1.7.5",
38 38 "angular-route": "^1.7.5",
39 39 "bootstrap": "^4.1.3",
40 40 "font-awesome": "^4.7.0",
41 41 "gulp": "^3.9.1",
42   - "gulp-angular-templatecache": "^2.2.1",
  42 + "gulp-angular-templatecache": "^2.2.2",
43 43 "gulp-clean": "^0.4.0",
44 44 "gulp-connect": "^5.6.1",
45 45 "gulp-htmlmin": "^5.0.1",
src/etc/develop.ejemplo.js
... ... @@ -0,0 +1,4 @@
  1 +angular.module('focaAbmPlazoPago')
  2 + .constant("API_ENDPOINT", {
  3 + 'URL': '//127.0.0.1:9000'
  4 + });
src/js/controller.js
... ... @@ -5,8 +5,8 @@ angular.module(&#39;focaAbmPlazoPago&#39;)
5 5 focaAbmPlazoPagoService.obtenerPlazosPago().then(function(datos) {
6 6 $scope.plazosPago = datos.data;
7 7 });
8   - $scope.editar = function(id) {
9   - $location.path('/plazo-pago/' + id);
  8 + $scope.editar = function(idPreciosCondiciones, id) {
  9 + $location.path('/precio-condicion/' + idPreciosCondiciones + '/plazo-pago/' + id);
10 10 };
11 11 $scope.solicitarConfirmacion = function(plazoPago) {
12 12 $uibModal.open({
src/views/foca-abm-plazos-pago-listado.html
... ... @@ -3,7 +3,7 @@
3 3 <th>Item</th>
4 4 <th>Dias</th>
5 5 <th colspan="2" class="text-center">
6   - <button class="btn btn-default" ng-click="editar(0)">
  6 + <button class="btn btn-default" ng-click="editar(0, 0)">
7 7 <i class="fa fa-plus"></i>
8 8 </button>
9 9 </th>
... ... @@ -12,7 +12,10 @@
12 12 <td ng-bind="plazoPago.item"></td>
13 13 <td ng-bind="plazoPago.dias"></td>
14 14 <td>
15   - <button class="btn btn-default" ng-click="editar(plazoPago.id)">
  15 + <button
  16 + class="btn btn-default"
  17 + ng-click="editar(plazoPago.idPreciosCondiciones, plazoPago.id)"
  18 + >
16 19 <i class="fa fa-pencil"></i>
17 20 </button>
18 21 <button class="btn btn-default" ng-click="solicitarConfirmacion(plazoPago)">