Commit 1460dc1e50ba69cb619938bf5ba6d362a016b72e
1 parent
c59633afeb
Exists in
master
and in
1 other branch
buscador en header, paginado en footer, cambio icons
Showing
2 changed files
with
71 additions
and
66 deletions
Show diff stats
package.json
1 | { | 1 | { |
2 | "name": "foca-modal-remito", | 2 | "name": "foca-modal-remito", |
3 | "version": "0.0.1", | 3 | "version": "0.0.1", |
4 | "description": "Modal para seleccion de remitos", | 4 | "description": "Modal para seleccion de remitos", |
5 | "scripts": { | 5 | "scripts": { |
6 | "test": "echo \"Error: no test specified\" && exit 1", | 6 | "test": "echo \"Error: no test specified\" && exit 1", |
7 | "gulp-pre-commit": "gulp pre-commit", | 7 | "gulp-pre-commit": "gulp pre-commit", |
8 | "compile": "gulp uglify", | 8 | "compile": "gulp uglify", |
9 | "postinstall": "npm run compile && gulp clean-post-install", | 9 | "postinstall": "npm run compile && gulp clean-post-install", |
10 | "install-dev": "npm install -D angular angular-ladda ladda@1.0.6 bootstrap font-awesome gulp gulp-angular-templatecache gulp-concat gulp-connect gulp-htmlmin gulp-jshint gulp-rename gulp-replace gulp-uglify gulp-clean jasmine-core jquery jshint pre-commit pump ui-bootstrap4 && npm i -D git+https://debo.suite.repo/modulos-npm/foca-directivas" | 10 | "install-dev": "npm install -D angular angular-ladda ladda@1.0.6 bootstrap font-awesome gulp gulp-angular-templatecache gulp-concat gulp-connect gulp-htmlmin gulp-jshint gulp-rename gulp-replace gulp-uglify gulp-clean jasmine-core jquery jshint pre-commit pump ui-bootstrap4 && npm i -D git+ssh://git@git.focasoftware.com:npm/foca-directivas" |
11 | }, | 11 | }, |
12 | "pre-commit": [ | 12 | "pre-commit": [ |
13 | "gulp-pre-commit" | 13 | "gulp-pre-commit" |
14 | ], | 14 | ], |
15 | "repository": { | 15 | "repository": { |
16 | "type": "git", | 16 | "type": "git", |
17 | "url": "https://debo.suite.repo/modulos-npm/foca-modal-remito" | 17 | "url": "https://debo.suite.repo/modulos-npm/foca-modal-remito" |
18 | }, | 18 | }, |
19 | "author": "Nicolás Guarnieri", | 19 | "author": "Nicolás Guarnieri", |
20 | "license": "ISC", | 20 | "license": "ISC", |
21 | "peerDependencies": { | 21 | "peerDependencies": { |
22 | "angular": "^1.7.4", | 22 | "angular": "^1.7.4", |
23 | "bootstrap": "^4.1.3", | 23 | "bootstrap": "^4.1.3", |
24 | "font-awesome": "^4.7.0", | 24 | "font-awesome": "^4.7.0", |
25 | "ui-bootstrap4": "^3.0.4", | 25 | "ui-bootstrap4": "^3.0.4", |
26 | "gulp": "^3.9.1", | 26 | "gulp": "^3.9.1", |
27 | "gulp-angular-templatecache": "^2.2.1", | 27 | "gulp-angular-templatecache": "^2.2.1", |
28 | "gulp-concat": "^2.6.1", | 28 | "gulp-concat": "^2.6.1", |
29 | "gulp-connect": "^5.6.1", | 29 | "gulp-connect": "^5.6.1", |
30 | "gulp-htmlmin": "^5.0.1", | 30 | "gulp-htmlmin": "^5.0.1", |
31 | "gulp-rename": "^1.4.0", | 31 | "gulp-rename": "^1.4.0", |
32 | "gulp-replace": "^1.0.0", | 32 | "gulp-replace": "^1.0.0", |
33 | "gulp-uglify": "^3.0.1", | 33 | "gulp-uglify": "^3.0.1", |
34 | "jquery": "^3.3.1", | 34 | "jquery": "^3.3.1", |
35 | "pump": "^3.0.0", | 35 | "pump": "^3.0.0", |
36 | "foca-directivas": "git+https://debo.suite.repo/modulos-npm/foca-directivas" | 36 | "foca-directivas": "git+ssh://git@git.focasoftware.com:npm/foca-directivas" |
37 | }, | 37 | }, |
38 | "devDependencies": { | 38 | "devDependencies": { |
39 | "angular": "^1.7.5", | 39 | "angular": "^1.7.5", |
40 | "angular-ladda": "^0.4.3", | 40 | "angular-ladda": "^0.4.3", |
41 | "bootstrap": "^4.1.3", | 41 | "bootstrap": "^4.1.3", |
42 | "foca-directivas": "git+https://debo.suite.repo/modulos-npm/foca-directivas", | 42 | "foca-directivas": "git+ssh://git@git.focasoftware.com:npm/foca-directivas", |
43 | "font-awesome": "^4.7.0", | 43 | "font-awesome": "^4.7.0", |
44 | "gulp": "^3.9.1", | 44 | "gulp": "^3.9.1", |
45 | "gulp-angular-templatecache": "^2.2.5", | 45 | "gulp-angular-templatecache": "^2.2.5", |
46 | "gulp-clean": "^0.4.0", | 46 | "gulp-clean": "^0.4.0", |
47 | "gulp-concat": "^2.6.1", | 47 | "gulp-concat": "^2.6.1", |
48 | "gulp-connect": "^5.6.1", | 48 | "gulp-connect": "^5.6.1", |
49 | "gulp-htmlmin": "^5.0.1", | 49 | "gulp-htmlmin": "^5.0.1", |
50 | "gulp-jshint": "^2.1.0", | 50 | "gulp-jshint": "^2.1.0", |
51 | "gulp-rename": "^1.4.0", | 51 | "gulp-rename": "^1.4.0", |
52 | "gulp-replace": "^1.0.0", | 52 | "gulp-replace": "^1.0.0", |
53 | "gulp-uglify": "^3.0.1", | 53 | "gulp-uglify": "^3.0.1", |
54 | "jasmine-core": "^3.3.0", | 54 | "jasmine-core": "^3.3.0", |
55 | "jquery": "^3.3.1", | 55 | "jquery": "^3.3.1", |
56 | "jshint": "^2.9.6", | 56 | "jshint": "^2.9.6", |
57 | "ladda": "1.0.6", | 57 | "ladda": "1.0.6", |
58 | "pre-commit": "^1.2.2", | 58 | "pre-commit": "^1.2.2", |
59 | "pump": "^3.0.0", | 59 | "pump": "^3.0.0", |
60 | "ui-bootstrap4": "^3.0.5" | 60 | "ui-bootstrap4": "^3.0.5" |
61 | } | 61 | } |
62 | } | 62 | } |
63 | 63 |
src/views/foca-modal-remito.html
1 | <div class="modal-header py-1"> | 1 | <div class="modal-header py-1"> |
2 | <h5 class="modal-title">Busqueda de Remito</h5> | 2 | <div class="row w-100"> |
3 | <div class="col-lg-6"> | ||
4 | <h5 class="modal-title my-1">Busqueda de Remito</h5> | ||
5 | </div> | ||
6 | <div class="input-group col-lg-6 pr-0 my-2"> | ||
7 | <input | ||
8 | ladda="searchLoading" | ||
9 | type="text" | ||
10 | class="form-control form-control-sm" | ||
11 | placeholder="Razón social" | ||
12 | ng-model="filters" | ||
13 | ng-change="search()" | ||
14 | ng-keydown="busquedaDown($event.keyCode)" | ||
15 | ng-keypress="busquedaPress($event.keyCode)" | ||
16 | foca-focus="selectedRemito == -1" | ||
17 | ng-focus="selectedRemito = -1" | ||
18 | teclado-virtual | ||
19 | > | ||
20 | <div class="input-group-append"> | ||
21 | <button | ||
22 | ladda="searchLoading" | ||
23 | class="btn btn-outline-secondary" | ||
24 | type="button" | ||
25 | ng-click="busquedaPress(13)" | ||
26 | > | ||
27 | <i class="fa fa-search" aria-hidden="true"></i> | ||
28 | </button> | ||
29 | </div> | ||
30 | </div> | ||
31 | </div> | ||
32 | |||
3 | </div> | 33 | </div> |
4 | <div class="modal-body" id="modal-body"> | 34 | <div class="modal-body" id="modal-body"> |
5 | <div class="input-group row"> | 35 | <div class="input-group row"> |
6 | <small class="col-md-2 col-4 text-left my-1">Fecha Desde</small> | 36 | <small class="col-md-2 col-4 text-left my-1">Fecha Desde</small> |
7 | <div class="col-md-4 col-8 input-group mb-2"> | 37 | <div class="col-md-4 col-8 input-group mb-2"> |
8 | <div class="input-group-prepend"> | 38 | <div class="input-group-prepend"> |
9 | <div class="input-group-text form-control-sm"> | 39 | <div class="input-group-text form-control-sm"> |
10 | <i class="fa fa-calendar"></i> | 40 | <i class="fa fa-calendar"></i> |
11 | </div> | 41 | </div> |
12 | </div> | 42 | </div> |
13 | <input | 43 | <input |
14 | class="form-control form-control-sm" | 44 | class="form-control form-control-sm" |
15 | id="inlineFormInputGroup" | 45 | id="inlineFormInputGroup" |
16 | ladda="searchLoading" | 46 | ladda="searchLoading" |
17 | type="date" | 47 | type="date" |
18 | ng-model="fechaDesde" | 48 | ng-model="fechaDesde" |
19 | hasta-hoy | 49 | hasta-hoy |
20 | ng-required="true" | 50 | ng-required="true" |
21 | /> | 51 | /> |
22 | </div> | 52 | </div> |
23 | <small class="col-md-2 col-4 text-left my-1">Fecha Hasta</small> | 53 | <small class="col-md-2 col-4 text-left my-1">Fecha Hasta</small> |
24 | <div class="col-md-4 col-8 input-group mb-2"> | 54 | <div class="col-md-4 col-8 input-group mb-2"> |
25 | <div class="input-group-prepend"> | 55 | <div class="input-group-prepend"> |
26 | <div class="input-group-text form-control-sm"> | 56 | <div class="input-group-text form-control-sm"> |
27 | <i class="fa fa-calendar"></i> | 57 | <i class="fa fa-calendar"></i> |
28 | </div> | 58 | </div> |
29 | </div> | 59 | </div> |
30 | <input | 60 | <input |
31 | class="form-control form-control-sm" | 61 | class="form-control form-control-sm" |
32 | id="inlineFormInputGroup" | 62 | id="inlineFormInputGroup" |
33 | ladda="searchLoading" | 63 | ladda="searchLoading" |
34 | type="date" | 64 | type="date" |
35 | ng-model="fechaHasta" | 65 | ng-model="fechaHasta" |
36 | ng-required="true" | 66 | ng-required="true" |
37 | hasta-hoy | 67 | hasta-hoy |
38 | /> | 68 | /> |
39 | </div> | 69 | </div> |
40 | </div> | 70 | </div> |
41 | <div class="input-group"> | ||
42 | <input | ||
43 | ladda="searchLoading" | ||
44 | type="text" | ||
45 | class="form-control form-control-sm" | ||
46 | placeholder="Razón social" | ||
47 | ng-model="filters" | ||
48 | ng-change="search()" | ||
49 | ng-keydown="busquedaDown($event.keyCode)" | ||
50 | ng-keypress="busquedaPress($event.keyCode)" | ||
51 | foca-focus="selectedRemito == -1" | ||
52 | ng-focus="selectedRemito = -1" | ||
53 | teclado-virtual | ||
54 | > | ||
55 | <div class="input-group-append"> | ||
56 | <button | ||
57 | ladda="searchLoading" | ||
58 | class="btn btn-outline-secondary" | ||
59 | type="button" | ||
60 | ng-click="busquedaPress(13)" | ||
61 | > | ||
62 | <i class="fa fa-search" aria-hidden="true"></i> | ||
63 | </button> | ||
64 | </div> | ||
65 | </div> | ||
66 | <table ng-show="primerBusqueda" class="table table-striped table-sm"> | 71 | <table ng-show="primerBusqueda" class="table table-striped table-sm"> |
67 | <thead> | 72 | <thead> |
68 | <tr> | 73 | <tr> |
69 | <th>Fecha</th> | 74 | <th>Fecha</th> |
70 | <th>Cliente</th> | 75 | <th>Cliente</th> |
71 | <th>Comprobante</th> | 76 | <th>Comprobante</th> |
72 | <th></th> | 77 | <th></th> |
73 | </tr> | 78 | </tr> |
74 | </thead> | 79 | </thead> |
75 | <tbody> | 80 | <tbody> |
76 | <tr ng-show="currentPageRemitos.length == 0 && primerBusqueda"> | 81 | <tr ng-show="currentPageRemitos.length == 0 && primerBusqueda"> |
77 | <td colspan="5"> | 82 | <td colspan="5"> |
78 | No se encontraron resultados. | 83 | No se encontraron resultados. |
79 | </td> | 84 | </td> |
80 | </tr> | 85 | </tr> |
81 | <tr class="selectable" | 86 | <tr class="selectable" |
82 | ng-repeat="(key, remito) in currentPageRemitos" | 87 | ng-repeat="(key, remito) in currentPageRemitos" |
83 | ng-click="select(remito)"> | 88 | ng-click="select(remito)"> |
84 | <td ng-bind="remito.fechaRemito | date : 'dd/MM/yyyy'"></td> | 89 | <td ng-bind="remito.fechaRemito | date : 'dd/MM/yyyy'"></td> |
85 | <td ng-bind="remito.nombreCliente"></td> | 90 | <td ng-bind="remito.nombreCliente"></td> |
86 | <td ng-bind="[remito.sucursal, remito.numeroRemito] | comprobante"></td> | 91 | <td ng-bind="[remito.sucursal, remito.numeroRemito] | comprobante"></td> |
87 | <td> | 92 | <td> |
88 | <button | 93 | <button |
89 | type="button" | 94 | type="button" |
90 | class="btn btn-xs p-1 float-right" | 95 | class="btn btn-xs p-1 float-right" |
91 | ng-class="{ | 96 | ng-class="{ |
92 | 'btn-secondary': selectedRemito != key, | 97 | 'btn-secondary': selectedRemito != key, |
93 | 'btn-primary': selectedRemito == key | 98 | 'btn-primary': selectedRemito == key |
94 | }" | 99 | }" |
95 | foca-focus="selectedRemito == {{key}}" | 100 | foca-focus="selectedRemito == {{key}}" |
96 | ng-keydown="itemRemito($event.keyCode)" | 101 | ng-keydown="itemRemito($event.keyCode)" |
97 | > | 102 | > |
98 | <i class="fa fa-arrow-right" aria-hidden="true"></i> | 103 | <i class="fa fa-circle-thin" aria-hidden="true"></i> |
99 | </button> | 104 | </button> |
100 | </td> | 105 | </td> |
101 | </tr> | 106 | </tr> |
102 | </tbody> | 107 | </tbody> |
103 | </table> | 108 | </table> |
104 | <nav ng-show="currentPageRemitos.length > 0 && primerBusqueda"> | ||
105 | <ul class="pagination pagination-sm justify-content mb-0"> | ||
106 | <li class="page-item" ng-class="{'disabled': currentPage == 1}"> | ||
107 | <a | ||
108 | class="page-link" | ||
109 | href="javascript:void();" | ||
110 | ng-click="selectPage(currentPage - 1)" | ||
111 | > | ||
112 | <span aria-hidden="true">«</span> | ||
113 | <span class="sr-only">Anterior</span> | ||
114 | </a> | ||
115 | </li> | ||
116 | <li | ||
117 | class="page-item" | ||
118 | ng-repeat="pagina in paginas" | ||
119 | ng-class="{'active': pagina == currentPage}" |