modal-detalles.html
5.41 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
<div class="modal-header">
    <h3 class="modal-title">Ingrese detalles</h3>
</div>
<div class="modal-body" id="modal-body">
    <form name="formObservaciones">
        <div class="row">
            <div class="col"><label class="form-control-sm p-0">Observaciones:</label></div>
            <div class="col-10">
                <textarea
                    teclado-virtual
                    rows="5"
                    ng-model="detalles.observacion" 
                    class="form-control form-control-sm"
                    foca-focus="focused == 9"
                    ng-focus="focused = 9"
                    ng-required="true">
                </textarea>
            </div>
        </div>
        <div class="row my-3">
            <div class="col-12 col-md-5">
                <div class="row">
                    <div class="col">                    
                        <label class="form-control-sm p-0">Monto cubierto:</label>
                    </div> 
                    <div class="col-6 col-md-7 input-group input-group-sm mb-3">
                            <div class="input-group-prepend">
                                <span class="input-group-text" id="size">$</span>
                            </div>
                            <input
                            foca-tipo-input
                            teclado-virtual
                            class="form-control "
                            placeholder="Importe"
                            ng-model="detalles.importe"
                            ng-keypress="next($event.keyCode)"
                            ng-required="true"
                            foca-focus="focused == 6"
                            ng-focus="focused = 6"
                            aria-describedby="size"/>
                    </div> 
                </div>
            </div>
            <div class="col-12 col-md-7">
                <div class="row">
                    <!-- Botones PC -->
                    <div class="col-md-5 col-12 text-right">
                        <label class=" btn btn-outline-debo" ng-if="!mobile">
                            <input
                                type="file"
                                ng-file-model="newFiles.files"
                                multiple
                                accept=".jpg,.png">
                            <small>Elegir Archivos </small>
                        </label>
                    </div>
                    <div class="col-md-7 col-12 mt-1" ng-if=' 1 == detalles.files.length '>
                        <span class="text-left" ng-repeat="(key, file) in detalles.files">{{file.name | limitTo: 15}}</span>
                    </div>
                    <div class="col-md-7 col-12 align-items-center" ng-if="detalles.files.length > 1">
                            <small class="text-left ">{{detalles.files.length}} Archivos </small>
                        </div>
                    <div class="col text-center"> 
                        <small class="text-muted"> Solo .jpg y .png - Tamaño máximo 150mb</small>
                    </div>
                    <!-- Botones MOBILE -->
                    <div class="col-12 mb-2 col-md-6" ng-if="mobile">
                        <button
                            type="button"
                            ng-if="mobile"
                            class="form-control form-control-sm btn-outline-debo"
                            ng-click="seleccionarFoto()">
                            Seleccione imagen
                        </button>
                    </div>
                    <div class="col-12 mb-2 col-md-6" ng-if="mobile">
                        <button
                        type="button"
                        ng-if="mobile"
                        class="form-control form-control-sm"
                        ng-click="tomarFoto()">
                        Tome imagen
                        </button>
                    </div>
                    <div class="col-12" ng-if="mobile">
                        <small class="text-muted">Solo .jpg y .png - Tamaño máximo 150mb</small>
                    </div>
                </div>
            </div>
        </div>
    </form>
    <div class="row" ng-if="!mobile">
        <div class="col-md-3" ng-repeat="(key, file) in detalles.files">
            <img ng-src="{{file.url}}" alt="" class="col-md-12 p-0">
            <button
                type="button" 
                class="btn btn-delete-image btn-danger rounded-circle position-absolute p-0"
                title="Eliminar"
                ng-click="eliminarImg(key)">
                <i class="fa fa-times" aria-hidden="true"></i>
            </button>
        </div>
    </div>
    <div class="row" ng-if="mobile">
        <div class="col-12 d-flex justify-content-between" ng-repeat="(key, file) in detalles.files">
            <strong ng-bind="file.name"></strong>
            <button
                type="button" 
                class="btn p-0"
                title="Eliminar"
                ng-click="eliminarImg(key)">
                <i class="fa fa-times" aria-hidden="true"></i>
            </button>
        </div>
    </div>
</div>
<div class="modal-footer">
    <button
        class="btn btn-secondary"
        type="button"
        ng-click="cancel()"
    >Cancelar</button>
    <button
        class="btn btn-primary"
        type="button"
        ng-click="aceptar()"
        ng-disabled="!formObservaciones.$valid"
    >Aceptar</button>
</div>