Просмотр исходного кода

removed functions used in trait

FabioFratini 1 год назад
Родитель
Сommit
ef9092e51d
1 измененных файлов с 1 добавлено и 68 удалено
  1. 1 68
      app/Http/Livewire/Report.php

+ 1 - 68
app/Http/Livewire/Report.php

@@ -2297,45 +2297,6 @@ class Report extends Component
         $this->emit('close-modal');
     }
 
-    public function accertatoreSave()
-    {
-
-        if ($this->currentAccertatore > 0)
-        {
-            \App\Models\User::whereId($this->currentAccertatore)->update([
-                'firstname' => $this->accertatore_nome,
-                'lastname' => $this->accertatore_cognome,
-                'username' => $this->accertatore_username,
-                'email' => $this->accertatore_email,
-                'password' => $this->accertatore_password,
-            ]);
-        }
-        else
-        {
-            $accertatore = \App\Models\User::create([
-                'firstname' => $this->accertatore_nome,
-                'lastname' => $this->accertatore_cognome,
-                'username' => $this->accertatore_username,
-                'email' => $this->accertatore_email,
-                'password' => bcrypt($this->accertatore_password),
-            ]);
-
-            if ($this->currentAccertatoreNumero == 1)
-                $this->accertatore_1 = $accertatore->id;
-            if ($this->currentAccertatoreNumero == 2)
-                $this->accertatore_2 = $accertatore->id;
-            if ($this->currentAccertatoreNumero == 3)
-                $this->accertatore_3 = $accertatore->id;
-            if ($this->currentAccertatoreNumero == 4)
-                $this->accertatore_4 = $accertatore->id;
-            if ($this->currentAccertatoreNumero == 5)
-                $this->accertatore_5 = $accertatore->id;
-
-        }
-        $this->resetAccertatore();
-        $this->emit('close-modal');
-    }
-
     public function veicoloSave()
     {
         $this->validate([
@@ -2442,25 +2403,7 @@ class Report extends Component
         $this->emit('close-modal');
     }
 
-    public function editAccertatore($utente)
-{
-        $this->resetAccertatore();
-        $acc = \App\Models\User::where('id', $utente)->first();
-
-        if ($acc != null){
-            $this->currentAccertatore = $utente;
-            $this->accertatore_nome = $acc->firstname;
-            $this->accertatore_cognome = $acc->lastname;
-            $this->accertatore_username = $acc->username;
-            $this->accertatore_email = $acc->email;
-            $this->accertatore_password = '';
-            $this->accertatore_password_conferma = '';
-        }
-
-    }
-
-    public function anagraficaDataParteComuneSave()
-    {
+    public function anagraficaDataParteComuneSave(){
 
         ReportDataVeicoli::where('progressive', $this->currentProgressive)->where('report_id', $this->dataId)->delete();
         \App\Models\ReportDataInfortunati::where('progressive', $this->currentProgressive)->where('report_id', $this->dataId)->delete();
@@ -2717,16 +2660,6 @@ class Report extends Component
         return "";
     }
 
-    public function getAccertatore($accertatore)
-    {
-        if ($accertatore > 0)
-        {
-            $ret = DB::table('fcf_users')->where('id', $accertatore)->first();
-            return @$ret->lastname . " " . @$ret->firstname;
-        }
-        return "";
-    }
-
     public function getVeicolo($veicolo)
     {
         if ($veicolo > 0)