Procházet zdrojové kódy

certificato medico anno e bottoni

FabioFratini před 8 měsíci
rodič
revize
9e72ecce5f

+ 4 - 4
app/Http/Livewire/Member.php

@@ -236,7 +236,7 @@ class Member extends Component
         $this->certificate_type = 'N';
         $this->certificate_filename = '';
         $this->certificate_filename_old = '';
-        $this->certificate_expire_date = null;
+        $this->certificate_expire_date = date('Y-m-d', strtotime('+1 year'));
         $this->certificate_status = 0;
     }
 
@@ -1569,11 +1569,11 @@ class Member extends Component
             /*if ($r->when_start == 'COURSE')
                 $start = $c->date_from;
 
-            // 
+            //
             $month_day = $r->month_day;
             if ($month_day > 0)
-            {              
-                if ($month_day >= 29)  
+            {
+                if ($month_day >= 29)
                     $start = date("Y-m-t", strtotime($start));
                 else
                     $start = date('Y-m-d', strtotime('+' . ($month_day - 1) . ' days', strtotime('first day of ' . ((int)date('j', strtotime($start)) < $month_day ? 'this' : 'next' ) . ' month', strtotime($start))));

+ 9 - 10
resources/views/livewire/member.blade.php

@@ -915,16 +915,15 @@
                                                                     </div>
                                                                 </form>
                                                             </div>
-
-                                                            <br>
-                                                            <button class="btn--ui lightGrey" wire:click.prevent="cancelCertificate()">Annulla</button>
-                                                            @if($addCertificate)
-                                                                <button class="btn--ui primary" wire:click.prevent="storeCertificate()">Salva</button>
-                                                            @endif
-                                                            @if($updateCertificate)
-                                                                <button class="btn--ui primary" wire:click.prevent="updateCertificate()">Salva</button>
-                                                            @endif
-
+                                                            <div class="d-flex justify-content-end mt-3">
+                                                                <button class="btn--ui lightGrey me-2" wire:click.prevent="cancelCertificate()">Annulla</button>
+                                                                @if($addCertificate)
+                                                                    <button class="btn--ui primary" wire:click.prevent="storeCertificate()">Salva</button>
+                                                                @endif
+                                                                @if($updateCertificate)
+                                                                    <button class="btn--ui primary" wire:click.prevent="updateCertificate()">Salva</button>
+                                                                @endif
+                                                            </div>
                                                         @endif
                                                     @else
                                                         <label for="last_name" class="form-label">Prima di caricare un certificato salva l'utente</label>