Explorar el Código

member - sistemato salvataggio con cambio scheda automatico

ferrari hace 2 meses
padre
commit
a0857ece4b
Se han modificado 1 ficheros con 13 adiciones y 0 borrados
  1. 13 0
      resources/views/livewire/member.blade.php

+ 13 - 0
resources/views/livewire/member.blade.php

@@ -1976,6 +1976,19 @@
             }
         });
 
+        Livewire.on('saved-and-continue', (currentTab) => {
+            const nextTab = getNextTab(currentTab);
+            if (nextTab !== currentTab) {
+                @this.change(nextTab);
+            }
+        });
+
+        function getNextTab(currentTab) {
+            const tabs = ['dati', 'tesseramento', 'corsi', 'gruppi'];
+            const currentIndex = tabs.indexOf(currentTab);
+            return currentIndex < tabs.length - 1 ? tabs[currentIndex + 1] : currentTab;
+        }
+
         function showData(id)
         {
             @this.showDetailF(id);