FabioFratini 11 ay önce
ebeveyn
işleme
cfb1e377ef

+ 0 - 13
app/Http/Livewire/Report.php

@@ -1372,23 +1372,10 @@ class Report extends Component
                         return;
                     }
 
-                    Log::debug(print_r($obj, true));
                     $this->anag_firstname = @$obj->dettaglioPatenteBaseOutput->anagrafica->nome;
                     $this->anag_lastname = @$obj->dettaglioPatenteBaseOutput->anagrafica->cognome;
                     $this->anag_birth_date = @$obj->dettaglioPatenteBaseOutput->anagrafica->dataNascita;
-
                     $this->anag_residenza_address = @$obj->dettaglioPatenteBaseOutput->datiResidenza->indirizzoResidenza;
-                    $residenzaTown = LocationTown::where('title', $obj->dettaglioPatenteBaseOutput->datiResidenza->comuneResidenza)
-                        ->first();
-
-                    $birthTown = null;
-                    if (isset($obj->dettaglioPatenteBaseOutput->luogoNascita->luogoItaliano)) {
-                        $birthTown = LocationTown::where('title', $obj->dettaglioPatenteBaseOutput->luogoNascita->luogoItaliano->descrizioneComunale)
-                            ->first();
-                    }
-
-                    $this->anag_residenza_town_id = $residenzaTown ? $residenzaTown->id : null;
-                    $this->anag_birth_town_id = $birthTown ? $birthTown->id : null;
                     $this->anag_documento_scadenza_il = @$obj->dettaglioPatenteBaseOutput->datiPatente->dataScadenza;
                     $this->anag_documento_rilasciato_il = @$obj->dettaglioPatenteBaseOutput->datiPatente->dataEmissione;
                 } catch (\SoapFault $fault) {

+ 2 - 1
resources/views/components/report/anagrafica/anagrafica-modal.blade.php

@@ -142,7 +142,8 @@
                                 <div class="col-md-8">
                                     <select class="form-control select2 anag_residenza_town_id"
                                         wire:model="anag_residenza_town_id" style="width:100%">
-                                        <option value="">
+                                        <option value="{{ $anag_residenza_town_id }}" id="anag_residenza_town_id">
+                                            {{ $this->getLocalita($anag_residenza_town_id) }}
 
                                     </select>
                                 </div>