Sfoglia il codice sorgente

modifica update dati presenza a database

ferrari 3 mesi fa
parent
commit
8c86afcd1c
1 ha cambiato i file con 1 aggiunte e 2 eliminazioni
  1. 1 2
      app/Http/Livewire/Presence.php

+ 1 - 2
app/Http/Livewire/Presence.php

@@ -252,7 +252,7 @@ class Presence extends Component
             ->where('calendar_id', $calendarId)
             ->where('user_id', $userId)
             ->where('status', '<>', 99)
-            ->whereIn('id', function ($q) use ($calendarId, $userId, $ids) {
+            ->whereIn('id', function ($q) use ($calendarId, $userId) {
                 $q->selectRaw('MAX(id)')
                     ->from('presences')
                     ->where('calendar_id', $calendarId)
@@ -270,7 +270,6 @@ class Presence extends Component
             ->where('calendar_id', $calendarId)
             ->where('user_id', $userId)
             ->where('status', '<>', 99)
-            ->where('member_id', $ids)
             ->delete();
 
         // Ricreo le presenze per ogni membro contenuto in $ids