Commit 103e18596e36a5ab499530f49ed5de14f416364f
Exists in
master
and in
1 other branch
Merge branch 'master' into 'develop'
Master See merge request !12
Showing
2 changed files
Show diff stats
package.json
1 | { | 1 | { |
2 | "name": "foca-modal-nota-pedido", | 2 | "name": "foca-modal-nota-pedido", |
3 | "version": "0.0.1", | 3 | "version": "0.0.1", |
4 | "description": "Modal para seleccion de notasPedido", | 4 | "description": "Modal para seleccion de notasPedido", |
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+ssh://git@git.focasoftware.com: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-nota-pedido" | 17 | "url": "https://debo.suite.repo/modulos-npm/foca-modal-nota-pedido" |
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+ssh://git@git.focasoftware.com:npm/foca-directivas" | 36 | "foca-directivas": "git+http://git.focasoftware.com/npm/foca-directivas.git" |
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+ssh://git@git.focasoftware.com:npm/foca-directivas", | 42 | "foca-directivas": "git+http://git.focasoftware.com/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.3", | 45 | "gulp-angular-templatecache": "^2.2.3", |
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-nota-pedido.html
1 | <div class="modal-header py-1"> | 1 | <div class="modal-header py-1"> |
2 | <div class="row w-100"> | 2 | <div class="row w-100"> |
3 | <div class="col-lg-6"> | 3 | <div class="col-lg-6"> |
4 | <h5 class="modal-title my-1">Búsqueda de Nota de Pedido</h5> | 4 | <h5 class="modal-title my-1">Búsqueda de Nota de Pedido</h5> |
5 | </div> | 5 | </div> |
6 | <div class="input-group col-lg-6 pr-0 my-2"> | 6 | <div class="input-group col-lg-6 pr-0 my-2"> |
7 | <input | 7 | <input |
8 | ladda="searchLoading" | 8 | ladda="searchLoading" |
9 | type="text" | 9 | type="text" |
10 | class="form-control form-control-sm" | 10 | class="foca-input form-control form-control-sm" |
11 | id="search" | 11 | id="search" |
12 | placeholder="Cliente" | 12 | placeholder="Cliente" |
13 | ng-model="filters" | 13 | ng-model="filters" |
14 | ng-change="search()" | 14 | ng-change="search()" |
15 | ng-keydown="busquedaDown($event.keyCode)" | 15 | ng-keydown="busquedaDown($event.keyCode)" |
16 | ng-keypress="busquedaPress($event.keyCode)" | 16 | ng-keypress="busquedaPress($event.keyCode)" |
17 | foca-focus="selectedNotaPedido == -1" | 17 | foca-focus="selectedNotaPedido == -1" |
18 | ng-focus="selectedNotaPedido = -1" | 18 | ng-focus="selectedNotaPedido = -1" |
19 | teclado-virtual | 19 | teclado-virtual |
20 | uppercase-only | ||
20 | /> | 21 | /> |
21 | <div class="input-group-append"> | 22 | <div class="input-group-append"> |
22 | <button | 23 | <button |
23 | ladda="searchLoading" | 24 | ladda="searchLoading" |
24 | data-spinner-color="#FF0000" | 25 | data-spinner-color="#FF0000" |
25 | class="btn btn-outline-secondary" | 26 | class="btn btn-outline-secondary" |
26 | type="button" | 27 | type="button" |
27 | ng-click="busquedaPress(13)" | 28 | ng-click="busquedaPress(13)" |
28 | > | 29 | > |
29 | <i class="fa fa-search" aria-hidden="true"></i> | 30 | <i class="fa fa-search" aria-hidden="true"></i> |
30 | </button> | 31 | </button> |
31 | </div> | 32 | </div> |
32 | </div> | 33 | </div> |
33 | </div> | 34 | </div> |
34 | </div> | 35 | </div> |
35 | <div class="modal-body" id="modal-body"> | 36 | <div class="modal-body" id="modal-body"> |
36 | 37 | ||
37 | <div class="input-group row"> | 38 | <div class="input-group row"> |
38 | <small class="col-md-2 col-4 text-left my-1">Fecha Desde</small> | 39 | <small class="col-md-2 col-4 text-left my-1">Fecha Desde</small> |
39 | <div class="col-md-4 col-8 input-group mb-3"> | 40 | <div class="col-md-4 col-8 input-group mb-3"> |
40 | <div class="input-group-prepend"> | 41 | <div class="input-group-prepend"> |
41 | <button | 42 | <button |
42 | class="input-group-text" | 43 | class="input-group-text" |
43 | type="button" | 44 | type="button" |
44 | ng-click="datepickerOpen = true" | 45 | ng-click="datepickerOpen = true" |
45 | > | 46 | > |
46 | <i class="fa fa-calendar"></i> | 47 | <i class="fa fa-calendar"></i> |
47 | </button> | 48 | </button> |
48 | </div> | 49 | </div> |
49 | <input | 50 | <input |
50 | class="form-control form-control-sm" | 51 | class="foca-input form-control form-control-sm" |
51 | id="inlineFormInputGroup" | 52 | id="inlineFormInputGroup" |
52 | ladda="searchLoading" | 53 | ladda="searchLoading" |
53 | type="text" | 54 | type="text" |
54 | ng-model="fechaDesde" | 55 | ng-model="fechaDesde" |
55 | ng-required="true" | 56 | ng-required="true" |
56 | uib-datepicker-popup="dd/MM/yyyy" | 57 | uib-datepicker-popup="dd/MM/yyyy" |
57 | show-button-bar="false" | 58 | show-button-bar="false" |
58 | is-open="datepickerOpen" | 59 | is-open="datepickerOpen" |
59 | on-open-focus="false" | 60 | on-open-focus="false" |
60 | ng-focus="datepickerOpen = true" | 61 | ng-focus="datepickerOpen = true" |
61 | datepicker-options="dateOptions" | 62 | datepicker-options="dateOptions" |
62 | /> | 63 | /> |
63 | </div> | 64 | </div> |
64 | <small class="col-md-2 col-4 text-left my-1">Fecha Hasta</small> | 65 | <small class="col-md-2 col-4 text-left my-1">Fecha Hasta</small> |
65 | <div class="col-md-4 col-8 input-group mb-3"> | 66 | <div class="col-md-4 col-8 input-group mb-3"> |
66 | <div class="input-group-prepend"> | 67 | <div class="input-group-prepend"> |
67 | <button | 68 | <button |
68 | class="input-group-text" | 69 | class="input-group-text" |
69 | type="button" | 70 | type="button" |
70 | ng-click="datepicker2Open = true" | 71 | ng-click="datepicker2Open = true" |
71 | > | 72 | > |
72 | <i class="fa fa-calendar"></i> | 73 | <i class="fa fa-calendar"></i> |
73 | </button> | 74 | </button> |
74 | </div> | 75 | </div> |
75 | <input | 76 | <input |
76 | class="form-control form-control-sm" | 77 | class="foca-input form-control form-control-sm" |
77 | id="inlineFormInputGroup" | 78 | id="inlineFormInputGroup" |
78 | ladda="searchLoading" | 79 | ladda="searchLoading" |
79 | type="text" | 80 | type="text" |
80 | ng-model="fechaHasta" | 81 | ng-model="fechaHasta" |
81 | ng-required="true" | 82 | ng-required="true" |
82 | uib-datepicker-popup="dd/MM/yyyy" | 83 | uib-datepicker-popup="dd/MM/yyyy" |
83 | show-button-bar="false" | 84 | show-button-bar="false" |
84 | is-open="datepicker2Open" | 85 | is-open="datepicker2Open" |
85 | on-open-focus="false" | 86 | on-open-focus="false" |
86 | ng-focus="datepicker2Open = true" | 87 | ng-focus="datepicker2Open = true" |
87 | /> | 88 | /> |
88 | </div> | 89 | </div> |
89 | </div> | 90 | </div> |
90 | <table ng-show="primerBusqueda" class="table table-striped table-sm"> | 91 | <table ng-show="primerBusqueda" class="table table-striped table-sm"> |
91 | <thead> | 92 | <thead> |
92 | <tr> | 93 | <tr> |
93 | <th>Fecha</th> | 94 | <th>Fecha</th> |
94 | <th>Cliente</th> | 95 | <th>Cliente</th> |
95 | <th>Comprobante</th> | 96 | <th>Comprobante</th> |
96 | <th class="text-right">Importe</th> | 97 | <th class="text-right">Importe</th> |
97 | <th></th> | 98 | <th></th> |
98 | </tr> | 99 | </tr> |
99 | </thead> | 100 | </thead> |
100 | <tbody> | 101 | <tbody> |
101 | <tr ng-show="currentPageNotasPedido.length == 0 && primerBusqueda"> | 102 | <tr ng-show="currentPageNotasPedido.length == 0 && primerBusqueda"> |
102 | <td colspan="5"> | 103 | <td colspan="5"> |
103 | No se encontraron resultados. | 104 | No se encontraron resultados. |
104 | </td> | 105 | </td> |
105 | </tr> | 106 | </tr> |
106 | <tr class="selectable" | 107 | <tr class="selectable" |
107 | ng-repeat="(key,notaPedido) in currentPageNotasPedido" | 108 | ng-repeat="(key,notaPedido) in currentPageNotasPedido" |
108 | ng-click="select(notaPedido)"> | 109 | ng-click="select(notaPedido)"> |
109 | <td ng-bind="notaPedido.fechaCarga | date : 'dd/MM/yyyy'"></td> | 110 | <td ng-bind="notaPedido.fechaCarga | date : 'dd/MM/yyyy'"></td> |
110 | <td ng-bind="notaPedido.nombreCliente"></td> | 111 | <td ng-bind="notaPedido.nombreCliente"></td> |
111 | <td ng-bind="[notaPedido.sucursal, notaPedido.numeroNotaPedido] | comprobante"></td> | 112 | <td ng-bind="[notaPedido.sucursal, notaPedido.numeroNotaPedido] | comprobante"></td> |
112 | <td ng-bind="notaPedido.total | number: 2" class="text-right"></td> | 113 | <td ng-bind="notaPedido.total | number: 2" class="text-right"></td> |
113 | <td> | 114 | <td> |
114 | <button | 115 | <button |
115 | type="button" | 116 | type="button" |
116 | class="btn btn-xs p-1 float-right" | 117 | class="btn btn-xs p-1 float-right" |
117 | ng-class="{ | 118 | ng-class="{ |
118 | 'btn-secondary': selectedNotaPedido != key, | 119 | 'btn-secondary': selectedNotaPedido != key, |
119 | 'btn-primary': selectedNotaPedido == key | 120 | 'btn-brown': selectedNotaPedido == key |
120 | }" | 121 | }" |
121 | foca-focus="selectedNotaPedido == {{key}}" | 122 | foca-focus="selectedNotaPedido == {{key}}" |
122 | ng-keydown="itemNotaPedido($event.keyCode)" | 123 | ng-keydown="itemNotaPedido($event.keyCode)" |
123 | > | 124 | > |
124 | <i class="fa fa-circle-thin" aria-hidden="true"></i> | 125 | <i class="fa fa-circle-thin icon-white" aria-hidden="true"></i> |
125 | </button> | 126 | </button> |
126 | </td> | 127 | </td> |
127 | </tr> | 128 | </tr> |
128 | </tbody> | 129 | </tbody> |
129 | </table> | 130 | </table> |
130 | </div> | 131 | </div> |
131 | <div class="modal-footer py-1"> | 132 | <div class="modal-footer py-1"> |
132 | <nav ng-show="currentPageNotasPedido.length > 0 && primerBusqueda" class="mr-auto"> | 133 | <nav ng-show="currentPageNotasPedido.length > 0 && primerBusqueda" class="mr-auto"> |
133 | <ul class="pagination pagination-sm justify-content mb-0"> | 134 | <ul class="pagination pagination-sm justify-content mb-0"> |
134 | <li class="page-item" ng-class="{'disabled': currentPage == 1}"> | 135 | <li class="page-item" ng-class="{'disabled': currentPage == 1}"> |
135 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage - 1)"> | 136 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage - 1)"> |
136 | <span aria-hidden="true">«</span> | 137 | <span aria-hidden="true">«</span> |
137 | <span class="sr-only">Anterior</span> | 138 | <span class="sr-only">Anterior</span> |
138 | </a> | 139 | </a> |
139 | </li> | 140 | </li> |
140 | <li | 141 | <li |
141 | class="page-item" | 142 | class="page-item" |
142 | ng-repeat="pagina in paginas" | 143 | ng-repeat="pagina in paginas" |
143 | ng-class="{'active': pagina == currentPage}" | 144 | ng-class="{'active': pagina == currentPage}" |
144 | > | 145 | > |
145 | <a | 146 | <a |
146 | class="page-link" | 147 | class="page-link" |
147 | href="javascript:void();" | 148 | href="javascript:void();" |
148 | ng-click="selectPage(pagina)" | 149 | ng-click="selectPage(pagina)" |
149 | ng-bind="pagina" | 150 | ng-bind="pagina" |
150 | ></a> | 151 | ></a> |
151 | </li> | 152 | </li> |
152 | <li class="page-item" ng-class="{'disabled': currentPage == lastPage}"> | 153 | <li class="page-item" ng-class="{'disabled': currentPage == lastPage}"> |
153 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage + 1)"> | 154 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage + 1)"> |
154 | <span aria-hidden="true">»</span> | 155 | <span aria-hidden="true">»</span> |
155 | <span class="sr-only">Siguiente</span> | 156 | <span class="sr-only">Siguiente</span> |
156 | </a> | 157 | </a> |
157 | </li> | 158 | </li> |
158 | </ul> | 159 | </ul> |
159 | </nav> | 160 | </nav> |
160 | <button class="btn btn-sm btn-secondary" type="button" ng-click="cancel()">Cancelar</button> | 161 | <button class="btn btn-sm btn-secondary" type="button" ng-click="cancel()">Cancelar</button> |
161 | </div> | 162 | </div> |
162 | 163 |