Kaynağa Gözat

fix scroll-top + nome colonna stato

ferrari 3 ay önce
ebeveyn
işleme
1ccd7f3966

+ 5 - 2
app/Http/Livewire/Member.php

@@ -816,6 +816,7 @@ class Member extends Component
         $this->update = false;
         $this->emit('setEdit', true);
         $this->emit('setEditCorso', false);
+        $this->dispatchBrowserEvent('scroll-to-top');
     }
 
     public function store($close)
@@ -1188,12 +1189,14 @@ class Member extends Component
                 $this->emit('setIds', $this->nation_id, $this->birth_nation_id);
 
                 $this->emit('load-select');
-
+                
                 $this->emit('load-provinces', $this->nation_id, 'provinceClass');
                 $this->emit('load-provinces', $this->birth_nation_id, 'provinceBirthClass');
-
+                
                 $this->emit('load-cities', $this->province_id, 'cityClass');
                 $this->emit('load-cities', $this->birth_province_id, 'cityBirthClass');
+
+                $this->dispatchBrowserEvent('scroll-to-top');
             }
         } catch (\Exception $ex) {
             session()->flash('error', 'Errore (' . $ex->getMessage() . ')');

+ 1 - 1
public/css/new_style.css

@@ -1129,7 +1129,7 @@ body .select2-container .select2-selection--single .select2-selection__rendered
 }
 
 body .form-select, body form .form-select {
-    padding-top: 11px;
+    /* padding-top: 11px; */
     line-height: 1;
 }
 

+ 8 - 1
resources/views/livewire/member.blade.php

@@ -401,7 +401,7 @@
                                 <th scope="col">Telefono</th>
                                 <th scope="col" style="text-align: center">Età</th>
                                 <th scope="col" style="text-align: center">Anno</th>
-                                <th scope="col">Stato</th>
+                                <th scope="col">Tesseramento</th>
                                 <th scope="col">Certificato</th>
                                 <th scope="col">...</th>
                             </tr>
@@ -1920,6 +1920,13 @@
 @push('scripts')
     <script>
 
+        window.addEventListener("scroll-to-top", (e) => {
+            let container = document.getElementById("card--dashboard");
+            if (container) {
+                container.scrollTo(0,0);
+            }
+        });
+
         function showData(id)
         {
             @this.showDetailF(id);