|
110 | 110 | <hr> |
111 | 111 | <div class="row"> |
112 | 112 | <div class="col-md-4"> |
113 | | - <div class="card card-outline card-primary shadow"> |
| 113 | + <div class="card card-primary card-outline shadow"> |
114 | 114 | <div class="card-header"> |
115 | | - <h3 class="card-title"><i class="fa fa-vcard"></i> <span style="color: #000;">'.tr('Cliente').'</span></h3> |
| 115 | + <h3 class="card-title"><i class="fa fa-vcard"></i> <span class="text-dark">'.tr('Cliente').'</span></h3> |
116 | 116 | </div> |
117 | 117 | <div class="card-body"> |
118 | 118 | <div class="row"> |
|
133 | 133 | </p> |
134 | 134 |
|
135 | 135 | <div class="mt-3"> |
136 | | - '.($sede['telefono'] ? '<a class="btn btn-light btn-xs mr-1 mb-1" href="tel:'.$sede['telefono'].'" target="_blank"><i class="fa fa-phone text-primary"></i> '.$sede['telefono'].'</a>' : '').' |
137 | | - '.($sede['email'] ? '<a class="btn btn-light btn-xs mr-1 mb-1" href="mailto:'.$sede['email'].'"><i class="fa fa-envelope text-primary"></i> '.$sede['email'].'</a>' : '').' |
| 136 | + '.($sede['telefono'] ? '<a class="btn btn-light btn-sm mr-1 mb-1" href="tel:'.$sede['telefono'].'" target="_blank"><i class="fa fa-phone text-primary"></i> '.$sede['telefono'].'</a>' : '').' |
| 137 | + '.($sede['email'] ? '<a class="btn btn-light btn-sm mr-1 mb-1" href="mailto:'.$sede['email'].'"><i class="fa fa-envelope text-primary"></i> '.$sede['email'].'</a>' : '').' |
138 | 138 | '.($referente['nome'] ? '<div class="mt-2"><i class="fa fa-user-o text-muted"></i> '.$referente['nome'].'</div>' : '').' |
139 | | - '.($referente['telefono'] ? '<a class="btn btn-light btn-xs mr-1 mb-1" href="tel:'.$referente['telefono'].'" target="_blank"><i class="fa fa-phone text-primary"></i> '.$referente['telefono'].'</a>' : '').' |
140 | | - '.($referente['email'] ? '<a class="btn btn-light btn-xs mr-1 mb-1" href="mailto:'.$referente['email'].'"><i class="fa fa-envelope text-primary"></i> '.$referente['email'].'</a>' : '').' |
| 139 | + '.($referente['telefono'] ? '<a class="btn btn-light btn-sm mr-1 mb-1" href="tel:'.$referente['telefono'].'" target="_blank"><i class="fa fa-phone text-primary"></i> '.$referente['telefono'].'</a>' : '').' |
| 140 | + '.($referente['email'] ? '<a class="btn btn-light btn-sm mr-1 mb-1" href="mailto:'.$referente['email'].'"><i class="fa fa-envelope text-primary"></i> '.$referente['email'].'</a>' : '').' |
141 | 141 | </div> |
142 | 142 | </div> |
143 | 143 | </div> |
|
150 | 150 | $prezzi_ivati = setting('Utilizza prezzi di vendita comprensivi di IVA'); |
151 | 151 |
|
152 | 152 | $stato = Modules\Interventi\Stato::find($intervento->stato->id); |
| 153 | +$stato_colore = $stato->colore; |
| 154 | +$stato_testo_colore = color_inverse($stato_colore); |
| 155 | + |
153 | 156 | echo ' |
154 | 157 | <div class="col-md-4"> |
155 | | - <div class="card card-outline card-primary shadow"> |
| 158 | + <div class="card card-primary card-outline shadow"> |
156 | 159 |
|
157 | 160 | <div class="card-header"> |
158 | 161 | <div class="d-flex justify-content-between align-items-center"> |
159 | | - <h3 class="card-title"><i class="fa fa-wrench"></i> <span style="color: #000;">'.tr('Attività').'</span> <strong class="text-primary">'.$intervento->codice.'</strong> <span style="color: #000;">'.tr('del').'</span> <strong>'.Translator::dateToLocale($intervento->data_richiesta).'</strong></h3> |
| 162 | + <h3 class="card-title"><i class="fa fa-wrench"></i> <span class="text-dark">'.tr('Attività').'</span> <strong class="text-primary">'.$intervento->codice.'</strong> <span class="text-dark">'.tr('del').'</span> <strong>'.Translator::dateToLocale($intervento->data_richiesta).'</strong></h3> |
160 | 163 | <div class="ml-auto"> |
161 | | - <button type="button" class="btn btn-sm" style="background-color: '.$stato->colore.'; color: <?php echo color_inverse($stato->colore); ?>;"> |
| 164 | + <button type="button" class="btn btn-sm" style="background-color: '.$stato_colore.'; color: '.$stato_testo_colore.';"> |
162 | 165 | <i class="fa fa-calendar-check-o mr-1"></i> '.$intervento->stato->name.' |
163 | 166 | </button> |
164 | 167 | </div> |
|
170 | 173 | <div class="col-md-3 text-center"> |
171 | 174 | <div class="d-flex flex-column"> |
172 | 175 | <span class="text-muted small mb-1">'.tr('Sessioni').'</span> |
173 | | - <span class="badge badge-light p-2 font-weight-bold"><i class="fa fa-user text-primary mr-1"></i> '.$intervento->sessioni->count().'</span> |
| 176 | + <span class="badge bg-light p-2 fw-bold"><i class="fa fa-user text-primary mr-1"></i> '.$intervento->sessioni->count().'</span> |
174 | 177 | </div> |
175 | 178 | </div> |
176 | 179 |
|
177 | 180 | <div class="col-md-3 text-center"> |
178 | 181 | <div class="d-flex flex-column"> |
179 | 182 | <span class="text-muted small mb-1">'.tr('Ore').'</span> |
180 | | - <span class="badge badge-light p-2 font-weight-bold"><i class="fa fa-hourglass text-primary mr-1"></i> '.Translator::numberToLocale($intervento->sessioni->sum('ore')).'</span> |
| 183 | + <span class="badge bg-light p-2 fw-bold"><i class="fa fa-hourglass text-primary mr-1"></i> '.Translator::numberToLocale($intervento->sessioni->sum('ore')).'</span> |
181 | 184 | </div> |
182 | 185 | </div> |
183 | 186 |
|
184 | 187 | <div class="col-md-3 text-center"> |
185 | 188 | <div class="d-flex flex-column"> |
186 | 189 | <span class="text-muted small mb-1">'.tr('Distanza').'</span> |
187 | | - <span class="badge badge-light p-2 font-weight-bold"><i class="fa fa-truck text-primary mr-1"></i> '.Translator::numberToLocale($intervento->sessioni->sum('km')).' '.tr('km').'</span> |
| 190 | + <span class="badge bg-light p-2 fw-bold"><i class="fa fa-truck text-primary mr-1"></i> '.Translator::numberToLocale($intervento->sessioni->sum('km')).' '.tr('km').'</span> |
188 | 191 | </div> |
189 | 192 | </div> |
190 | 193 |
|
191 | 194 | <div class="col-md-3 text-center"> |
192 | 195 | <div class="d-flex flex-column"> |
193 | 196 | <span class="text-muted small mb-1">'.tr('Importo').'</span> |
194 | | - <span class="badge badge-light p-2 font-weight-bold"><i class="fa fa-money text-primary mr-1"></i> '.($show_prezzi ? moneyFormat($prezzi_ivati ? $intervento->totale : $intervento->totale_imponibile, 2) : '-').'</span> |
| 197 | + <span class="badge bg-light p-2 fw-bold"><i class="fa fa-money text-primary mr-1"></i> '.($show_prezzi ? moneyFormat($prezzi_ivati ? $intervento->totale : $intervento->totale_imponibile, 2) : '-').'</span> |
195 | 198 | </div> |
196 | 199 | </div> |
197 | 200 | </div> |
|
214 | 217 | $diffTime = (new Carbon($intervento_programmato->data_richiesta))->diffForHumans(); |
215 | 218 | // Remove the "days" label by using a regex to extract just the number |
216 | 219 | $diffTime = preg_replace('/(\d+)\s+giorni?.*/', '$1', $diffTime); |
217 | | - echo ' <a class="btn btn-outline-primary btn-sm mr-1 mb-1" href="'.base_path_osm().'/editor.php?id_module='.$id_module.'&id_record='.$intervento_programmato->id.'" target="_blank"><i class="fa fa-calendar-check-o mr-1"></i>'.$intervento_programmato->codice.' <span class="badge badge-light ml-1">('.$diffTime.')</span></a>'; |
| 220 | + echo ' <a class="btn btn-outline-primary btn-sm mr-1 mb-1" href="'.base_path_osm().'/editor.php?id_module='.$id_module.'&id_record='.$intervento_programmato->id.'" target="_blank"><i class="fa fa-calendar-check-o mr-1"></i>'.$intervento_programmato->codice.' <span class="badge bg-light ml-1">('.$diffTime.')</span></a>'; |
218 | 221 | } |
219 | 222 | echo ' </div>'; |
220 | 223 | } |
|
224 | 227 | if ($contratto) { |
225 | 228 | echo ' |
226 | 229 | <div class="mb-3 status-item contratto-item"> |
227 | | - <div class="d-flex align-items-center"> |
228 | | - <span class="status-icon badge badge-info mr-2"><i class="fa fa-book"></i></span> |
229 | | - <span class="status-text">'.Modules::link('Contratti', $contratto->id, tr('Contratto num. _NUM_ del _DATA_', ['_NUM_' => '<strong>'.$contratto->numero.'</strong>', '_DATA_' => Translator::dateToLocale($contratto->data_bozza)])).'</span> |
| 230 | + <div class="d-flex align-items-center justify-content-between"> |
| 231 | + <div class="d-flex align-items-center"> |
| 232 | + <span class="status-icon badge badge-info mr-2"><i class="fa fa-book"></i></span> |
| 233 | + <span class="status-text">'.Modules::link('Contratti', $contratto->id, tr('Contratto num. _NUM_ del _DATA_', ['_NUM_' => '<strong>'.$contratto->numero.'</strong>', '_DATA_' => Translator::dateToLocale($contratto->data_bozza)])).'</span> |
| 234 | + </div>'; |
| 235 | + if ($ore_previste > 0) { |
| 236 | + echo ' |
| 237 | + <span>'.Translator::numberToLocale($ore_erogate, 2).'/'.$ore_previste.' '.tr('ore').'</span>'; |
| 238 | + } |
| 239 | + echo ' |
230 | 240 | </div>'; |
231 | 241 | if ($ore_previste > 0) { |
232 | 242 | echo ' |
233 | | - <div class="mt-1 ml-4"> |
234 | | - <span class="badge badge-light">'.Translator::numberToLocale($ore_erogate, 2).'/'.$ore_previste.' '.tr('ore').'</span> |
235 | | - <div class="progress mt-1" style="height:6px; border-radius:3px;"> |
236 | | - <div class="progress-bar bg-'.$color.'" style="width:'.$perc_ore.'%"></div> |
237 | | - </div> |
| 243 | + <div class="progress mt-1" style="height: 6px; border-radius:3px;"> |
| 244 | + <div class="progress-bar bg-'.$color.'" style="width:'.$perc_ore.'%"></div> |
238 | 245 | </div>'; |
239 | 246 | } |
240 | 247 | echo ' |
|
279 | 286 |
|
280 | 287 | echo ' |
281 | 288 | <div class="col-md-4"> |
282 | | - <div class="card card-outline card-primary shadow"> |
| 289 | + <div class="card card-primary card-outline shadow"> |
283 | 290 | <div class="card-header"> |
284 | | - <h3 class="card-title"><i class="fa fa-map"></i> <span style="color: #000;">'.tr('Geolocalizzazione').'</span></h3> |
| 291 | + <h3 class="card-title"><i class="fa fa-map"></i> <span class="text-dark">'.tr('Geolocalizzazione').'</span></h3> |
285 | 292 | </div> |
286 | 293 | <div class="card-body">'; |
287 | 294 |
|
288 | 295 | if (!empty($sede_cliente->gaddress) || (!empty($sede_cliente->lat) && !empty($sede_cliente->lng))) { |
289 | 296 | echo ' |
290 | | - <div id="map-edit" style="width: 100%; min-height: 150px; border-radius: 4px; border: 1px solid #eee;"></div> |
| 297 | + <div id="map-edit" class="w-100 rounded border border-light-subtle" style="min-height: 150px;"></div> |
291 | 298 |
|
292 | 299 | <div class="clearfix"></div> |
293 | 300 | <div class="mt-3"> |
@@ -463,7 +470,7 @@ function caricaMappa() { |
463 | 470 | $map_container.css("height", "320px"); |
464 | 471 | alignMaxHeight(".module-header .card"); |
465 | 472 | $("#" + map_id).css("height", "85%"); |
466 | | - $("#" + map_id).css("border", "none"); |
| 473 | + $("#" + map_id).removeClass("border border-light-subtle"); |
467 | 474 |
|
468 | 475 | $map_container.find(".load").addClass("hidden"); |
469 | 476 | $map_container.find(".go-to").removeClass("hidden"); |
|
0 commit comments