Commit 494551ebd6f4effe7da5f4a219b139aaac0820bd
1 parent
3600827e0b
Exists in
master
agrego codigo de chofer
Showing
2 changed files
with
25 additions
and
23 deletions
Show diff stats
package.json
1 | { | 1 | { |
2 | "name": "foca-modal-chofer", | 2 | "name": "foca-modal-chofer", |
3 | "version": "0.0.1", | 3 | "version": "0.0.1", |
4 | "description": "Modal de búsqueda de choferes", | 4 | "description": "Modal de búsqueda de choferes", |
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 bootstrap font-awesome gulp gulp-angular-templatecache gulp-clean gulp-concat gulp-connect gulp-htmlmin gulp-jshint gulp-rename gulp-replace gulp-uglify jasmine-core jquery jshint ladda@1.0.6 pre-commit pump ui-bootstrap4 && npm i -D git+https://debo.suite.repo/modulos-npm/foca-directivas.git" | 10 | "install-dev": "npm install -D angular angular-ladda bootstrap font-awesome gulp gulp-angular-templatecache gulp-clean gulp-concat gulp-connect gulp-htmlmin gulp-jshint gulp-rename gulp-replace gulp-uglify jasmine-core jquery jshint ladda@1.0.6 pre-commit pump ui-bootstrap4 && npm i -D git+ssh://git@debonline.dyndns.org:npm/foca-directivas.git" |
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-chofer.git" | 17 | "url": "https://debo.suite.repo/modulos-npm/foca-modal-chofer.git" |
18 | }, | 18 | }, |
19 | "author": "Foca Software", | 19 | "author": "Foca Software", |
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@debonline.dyndns.org: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.git", | 42 | "foca-directivas": "git+ssh://git@debonline.dyndns.org:npm/foca-directivas.git", |
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/modal-chofer.html
1 | <div class="modal-header py-1"> | 1 | <div class="modal-header py-1"> |
2 | <h5 class="modal-title">Busqueda de Chofer</h5> | 2 | <h5 class="modal-title">Busqueda de Chofer</h5> |
3 | </div> | 3 | </div> |
4 | <div class="modal-body" id="modal-body"> | 4 | <div class="modal-body" id="modal-body"> |
5 | <div class="input-group"> | 5 | <div class="input-group"> |
6 | <input | 6 | <input |
7 | ladda="searchLoading" | 7 | ladda="searchLoading" |
8 | type="text" | 8 | type="text" |
9 | class="form-control" | 9 | class="form-control" |
10 | placeholder="Busqueda" | 10 | placeholder="Busqueda" |
11 | ng-model="filters" | 11 | ng-model="filters" |
12 | ng-change="search()" | 12 | ng-change="search()" |
13 | ng-keydown="busquedaDown($event.keyCode)" | 13 | ng-keydown="busquedaDown($event.keyCode)" |
14 | ng-keypress="busquedaPress($event.keyCode)" | 14 | ng-keypress="busquedaPress($event.keyCode)" |
15 | foca-focus="selectedChofer == -1" | 15 | foca-focus="selectedChofer == -1" |
16 | ng-focus="selectedChofer = -1" | 16 | ng-focus="selectedChofer = -1" |
17 | > | 17 | > |
18 | <div class="input-group-append"> | 18 | <div class="input-group-append"> |
19 | <button | 19 | <button |
20 | ladda="searchLoading" | 20 | ladda="searchLoading" |
21 | class="btn btn-outline-secondary" | 21 | class="btn btn-outline-secondary" |
22 | type="button" | 22 | type="button" |
23 | ng-click="busquedaPress(13)" | 23 | ng-click="busquedaPress(13)" |
24 | > | 24 | > |
25 | <i class="fa fa-search" aria-hidden="true"></i> | 25 | <i class="fa fa-search" aria-hidden="true"></i> |
26 | </button> | 26 | </button> |
27 | </div> | 27 | </div> |
28 | </div> | 28 | </div> |
29 | <table ng-show="primerBusqueda" class="table table-striped table-sm"> | 29 | <table ng-show="primerBusqueda" class="table table-striped table-sm"> |
30 | <thead> | 30 | <thead> |
31 | <tr> | 31 | <tr> |
32 | <th>Código</th> | ||
32 | <th>Nombre</th> | 33 | <th>Nombre</th> |
33 | <th>DNI</th> | 34 | <th>DNI</th> |
34 | <th>Teléfono</th> | 35 | <th>Teléfono</th> |
35 | <th></th> | 36 | <th></th> |
36 | </tr> | 37 | </tr> |
37 | </thead> | 38 | </thead> |
38 | <tbody> | 39 | <tbody> |
39 | <tr ng-show="currentPageChoferes.length == 0 && primerBusqueda"> | 40 | <tr ng-show="currentPageChoferes.length == 0 && primerBusqueda"> |
40 | <td colspan="5"> | 41 | <td colspan="5"> |
41 | No se encontraron resultados. | 42 | No se encontraron resultados. |
42 | </td> | 43 | </td> |
43 | </tr> | 44 | </tr> |
44 | <tr class="selectable" | 45 | <tr class="selectable" |
45 | ng-repeat="(key,chofer) in currentPageChoferes" | 46 | ng-repeat="(key,chofer) in currentPageChoferes" |
46 | ng-click="select(chofer)"> | 47 | ng-click="select(chofer)"> |
48 | <td ng-bind="chofer.id"></td> | ||
47 | <td ng-bind="chofer.nombre"></td> | 49 | <td ng-bind="chofer.nombre"></td> |
48 | <td ng-bind="chofer.dni"></td> | 50 | <td ng-bind="chofer.dni"></td> |
49 | <td ng-bind="chofer.telefono"></td> | 51 | <td ng-bind="chofer.telefono"></td> |
50 | <td> | 52 | <td> |
51 | <button | 53 | <button |
52 | type="button" | 54 | type="button" |
53 | class="btn btn-xs p-1 float-right" | 55 | class="btn btn-xs p-1 float-right" |
54 | ng-class="{ | 56 | ng-class="{ |
55 | 'btn-secondary': selectedChofer != key, | 57 | 'btn-secondary': selectedChofer != key, |
56 | 'btn-primary': selectedChofer == key | 58 | 'btn-primary': selectedChofer == key |
57 | }" | 59 | }" |
58 | foca-focus="selectedChofer == {{key}}" | 60 | foca-focus="selectedChofer == {{key}}" |
59 | ng-keydown="itemChofer($event.keyCode)" | 61 | ng-keydown="itemChofer($event.keyCode)" |
60 | > | 62 | > |
61 | <i class="fa fa-arrow-right" aria-hidden="true"></i> | 63 | <i class="fa fa-arrow-right" aria-hidden="true"></i> |
62 | </button> | 64 | </button> |
63 | </td> | 65 | </td> |
64 | </tr> | 66 | </tr> |
65 | </tbody> | 67 | </tbody> |
66 | </table> | 68 | </table> |
67 | <nav ng-show="currentPageChoferes.length > 0 && primerBusqueda"> | 69 | <nav ng-show="currentPageChoferes.length > 0 && primerBusqueda"> |
68 | <ul class="pagination pagination-sm justify-content mb-0"> | 70 | <ul class="pagination pagination-sm justify-content mb-0"> |
69 | <li class="page-item" ng-class="{'disabled': currentPage == 1}"> | 71 | <li class="page-item" ng-class="{'disabled': currentPage == 1}"> |
70 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage - 1)"> | 72 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage - 1)"> |
71 | <span aria-hidden="true">«</span> | 73 | <span aria-hidden="true">«</span> |
72 | <span class="sr-only">Anterior</span> | 74 | <span class="sr-only">Anterior</span> |
73 | </a> | 75 | </a> |
74 | </li> | 76 | </li> |
75 | <li | 77 | <li |
76 | class="page-item" | 78 | class="page-item" |
77 | ng-repeat="pagina in paginas" | 79 | ng-repeat="pagina in paginas" |
78 | ng-class="{'active': pagina == currentPage}" | 80 | ng-class="{'active': pagina == currentPage}" |
79 | > | 81 | > |
80 | <a | 82 | <a |
81 | class="page-link" | 83 | class="page-link" |
82 | href="javascript:void();" | 84 | href="javascript:void();" |
83 | ng-click="selectPage(pagina)" | 85 | ng-click="selectPage(pagina)" |
84 | ng-bind="pagina" | 86 | ng-bind="pagina" |
85 | ></a> | 87 | ></a> |
86 | </li> | 88 | </li> |
87 | <li class="page-item" ng-class="{'disabled': currentPage == lastPage}"> | 89 | <li class="page-item" ng-class="{'disabled': currentPage == lastPage}"> |
88 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage + 1)"> | 90 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage + 1)"> |
89 | <span aria-hidden="true">»</span> | 91 | <span aria-hidden="true">»</span> |
90 | <span class="sr-only">Siguiente</span> | 92 | <span class="sr-only">Siguiente</span> |
91 | </a> | 93 | </a> |
92 | </li> | 94 | </li> |
93 | </ul> | 95 | </ul> |
94 | </nav> | 96 | </nav> |
95 | </div> | 97 | </div> |
96 | <div class="modal-footer py-1"> | 98 | <div class="modal-footer py-1"> |
97 | <button class="btn btn-sm btn-secondary" type="button" ng-click="cancel()">Cancelar</button> | 99 | <button class="btn btn-sm btn-secondary" type="button" ng-click="cancel()">Cancelar</button> |
98 | </div> | 100 | </div> |
99 | 101 |