foca-abm-choferes-listado.html
8.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
<div class="row">
    <foca-cabecera-facturador 
    titulo="'Choferes'"
    fecha="now"
    class="mb-0 col-lg-12"
    ></foca-cabecera-facturador>
</div>
<div class="row">
    <div class="col-12 col-md-10 p-0 mt-4 border border-white rounded">
        <div class="row px-5 py-2 botonera-secundaria">
            <div class="col-12">
                <foca-botonera-facturador botones="botonera" max="6" class="row"></foca-botonera-facturador>
            </div>
        </div>
        <table class="table table-default table-hover table-sm table-abm table-striped mb-0">
            <thead>
                <tr>
                    <th>Nombre</th>
                    <th>Tipo</th>
                    <th>Documento</th>
                    <th>Teléfono</th>
                    <th class="text-center">
                        <button
                            title="Agregar"
                            class="btn btn-outline-debo boton-accion"
                            ng-click="crearChofer()"
                            ng-disabled="!crear"
                        >
                            <i class="fa fa-plus"></i>
                        </button>
                    </th>
                </tr>
            </thead>
            <tbody>
                <tr ng-show="creando">
                    <td align="center">
                        <input
                            class="form-control"
                            type="text"
                            teclado-virtual
                            ng-model="chofer.nombre"
                            ng-required="true"
                            ng-keypress="next($event.keyCode)"
                            foca-focus="focused == 1"
                            ng-focus="focused = 1"
                        >
                    </td>
                    <td align="center">
                        <div class="col-sm-4">
                            <select 
                                class="form-control"
                                ng-options="tipoDocumento.id as tipoDocumento.descripcion for tipoDocumento in tiposDocumento track by tipoDocumento.id"
                                ng-model="chofer.idTipoDocumento">
                            </select>
                        </div>
                    </td>
                    <td align="center">
                        <input
                            class="form-control"
                            foca-tipo-input
                            teclado-virtual
                            solo-positivos
                            limite-numeros-max="15"
                            ng-model="chofer.dni"
                            ng-required="true"
                            ng-keypress="next($event.keyCode)"
                            foca-focus="focused == 2"
                            ng-focus="focused = 2"
                            ng-disabled="!nuevo"
                            string-toNumber
                        >
                    </td>
                    <td align="center">
                        <input
                            class="form-control"
                            foca-tipo-input
                            teclado-virtual
                            solo-positivos
                            limite-numeros-max="15"
                            ng-model="chofer.telefono"
                            ng-required="true"
                            foca-focus="focused == 3"
                            ng-focus="focused = 3"
                            string-toNumber
                        >
                    </td>
                    <td align="center">
                            <button
                                class="btn btn-outline-dark boton-accion"
                                ng-click="agregarChofer()"
                            >
                                <i class="fa fa-save"></i>
                            </button>
                        </td>
                </tr>
                
                <tr ng-repeat="(key, chofer) in choferes | filter:filters" ng-hide="chofer.desactivado">
                    <td ng-bind="chofer.nombre" ng-hide="chofer.editando"></td>
                    <td align="center" ng-show="chofer.editando">
                        <input
                            class="form-control"
                            type="text"
                            teclado-virtual
                            ng-model="chofer.nombre"
                            ng-required="true"
                            ng-keypress="next($event.keyCode)"
                            foca-focus="focused == 1"
                            ng-focus="focused = 1"
                            esc-key="volver(chofer, key)"
                        >
                    </td>
                    <td ng-bind="tipoDocumento(chofer.idTipoDocumento)" ng-hide="chofer.editando"></td>
                    <td align="center" ng-show="chofer.editando">
                            <div class="col-sm-15">
                                <select 
                                    class="form-control"
                                    ng-options="tipoDocumento.id as tipoDocumento.descripcion for tipoDocumento in tiposDocumento track by tipoDocumento.id"
                                    ng-model="chofer.idTipoDocumento">
                                </select>
                            </div>
                        </td>
                    <td ng-bind="chofer.dni" ng-hide="chofer.editando">
                        <td align="center" ng-show="chofer.editando">
                            <input
                                class="form-control"
                                type="text"
                                teclado-virtual
                                ng-model="chofer.dni"
                                ng-required="true"
                                ng-keypress="next($event.keyCode)"
                                foca-focus="focused == 2"
                                ng-focus="focused = 2"
                                esc-key="volver(chofer, key)"
                            >
                        </td>
                    </td>
                    <td ng-bind="chofer.telefono" ng-hide="chofer.editando"></td>
                    <td align="center" ng-show="chofer.editando">
                        <input
                            class="form-control"
                            foca-tipo-input
                            teclado-virtual
                            solo-positivos
                            limite-numeros-max="15"
                            ng-model="chofer.telefono"
                            ng-required="true"
                            foca-focus="focused == 3"
                            ng-focus="focused = 3"
                            string-toNumber
                            esc-key="volver(chofer, key)"
                        >
                    </td>
                    <td class="text-center" ng-hide="chofer.editando">
                        <button
                            class="btn btn-outline-dark boton-accion"
                            title="Editar"
                            ng-click="editar(chofer)"
                        >
                            <i class="fa fa-pencil"></i>
                        </button>
                        <button
                            class="btn btn-outline-dark boton-accion"
                            title="Eliminar"
                            ng-click="solicitarConfirmacion(chofer)"
                        >
                            <i class="fa fa-trash"></i>
                        </button>
                    </td>
                    <td align="center" ng-show="chofer.editando">
                        <button
                            class="btn btn-outline-dark boton-accion"
                            ng-click="agregarChofer(chofer)"
                        >
                            <i class="fa fa-save"></i>
                        </button>
                        <button
                            class="btn btn-outline-dark boton-accion"
                            ng-click="volver(chofer, key)"
                        >
                            <i class="fa fa-undo" aria-hidden="true"></i>
                        </button>
                    </td>
                </tr>
            </body>
        </table>
    </div>
</div>