Luca Parisio 1 年之前
父节点
当前提交
9cbdeb9ce1

+ 1 - 0
app/Http/Livewire/Member.php

@@ -765,6 +765,7 @@ class Member extends Component
 
     public function add()
     {
+        //$this->from = 'members';
         $this->emit('load-select');
         $this->emit('hide-search');
         $this->showDetail = false;

+ 1 - 0
app/Http/Livewire/RecordIN.php

@@ -433,6 +433,7 @@ class RecordIN extends Component
 
     public function add()
     {
+
         $this->emit('load-select');
         //if ($this->hasFilter)
             $this->emit('hide-search');

+ 1 - 1
app/Http/Livewire/RecordOUT.php

@@ -299,7 +299,7 @@ class RecordOUT extends Component
 
     public function add()
     {
-        $this->fromPage = 'out';
+
         $this->emit('load-select');
         //if ($this->hasFilter)
             $this->emit('hide-search');

+ 3 - 7
resources/views/livewire/member.blade.php

@@ -1,9 +1,7 @@
 <div>
         @if($showDetail)
 
-        @if($from != '')
-            <a style="margin-top:20px" class="btn--ui lightGrey" href="/{{$from}}?showFilters=1"><i class="fa-solid fa-arrow-left"></i></a><br>
-        @endif
+        <a style="margin-top:20px" class="btn--ui lightGrey" href="/{{$from != '' ? ($from . '?showFilters=1') : 'members'}}"><i class="fa-solid fa-arrow-left"></i></a><br><br>
 
         <div class="col col-lg-12" style="margin-bottom:100px;">
             <div class="user--profile d-lg-flex" style="margin-top:20px !important">
@@ -489,9 +487,7 @@
 
                 <a name="top"></a>
 
-                @if($from != '')
-                    <a class="btn--ui lightGrey" href="/{{$from}}?showFilters=1"><i class="fa-solid fa-arrow-left"></i></a><br>
-                @endif
+                <a style="margin-top:20px" class="btn--ui lightGrey" href="/{{$from != '' ? ($from . '?showFilters=1') : 'members'}}"><i class="fa-solid fa-arrow-left"></i></a><br><br>
 
                 @if (session()->has('success'))
                     <div class="alert alert-success" role="alert">
@@ -1602,7 +1598,7 @@
                                     <button class="btn--ui primary d-flex order-1 me-2" onclick="updateAction(false)">continua</button>
                                     <button class="btn--ui primary d-flex order-3 ms-auto" onclick="updateAction(true)">salva e chiudi</button>
                                 @endif
-                                <a class="btn--ui lightGrey d-flex order-2" href="/{{$from}}?showFilters=1" >annulla</a>
+                                <a class="btn--ui lightGrey d-flex order-2" href="/{{$from != '' ? ($from . '?showFilters=1') : 'members'}}"><i class="fa-solid fa-arrow-left"></i></a><br><br>
                             </div>
                             <div class="col-md-5 col-xl-4"></div>
                         </div>

+ 12 - 11
resources/views/livewire/records_in.blade.php

@@ -1,8 +1,6 @@
 <div class="col card--ui" id="card--dashboard">
 
-    @if($fromPage != '')
-        <a style="margin-top:20px" class="btn--ui lightGrey" href="/{{$fromPage}}?showFilters=1"><i class="fa-solid fa-arrow-left"></i></a><br><br>
-    @endif
+
 
         <header id="title--section" style="display:none !important"  class="d-flex align-items-center justify-content-between">
             <div class="title--section_name d-flex align-items-center justify-content-between">
@@ -160,6 +158,8 @@
 
     @else
 
+        <a style="margin-top:20px" class="btn--ui lightGrey" href="/{{$fromPage != '' ? ($fromPage . '?showFilters=1') : 'in'}}"><i class="fa-solid fa-arrow-left"></i></a><br><br>
+
         <a name="top"></a>
         @if (session()->has('error'))
             <div class="alert alert-danger" role="alert">
@@ -539,7 +539,7 @@
 
 
                         <div class="accountingEntry--btn d-flex align-items-center justify-content-between mt-5">
-                            <a class="btn--ui lightGrey" href="/{{$fromPage}}?showFilters=1">annulla</a>
+                            <a class="btn--ui lightGrey" href="/{{$fromPage != '' ? ($fromPage . '?showFilters=1') : 'in'}}">annulla</a>
                             @if(!$deleted)
                                 @if($canSave)
                                     @if($add)
@@ -779,7 +779,7 @@
                     </div>
                 </div>
                 <div class="modal-footer">
-                    <button type="button" class="btn--ui lightGrey" data-bs-dismiss="modal">Annulla</button>
+                    <a class="btn--ui lightGrey" href="/{{$fromPage != '' ? ($fromPage . '?showFilters=1') : 'in'}}">annulla</a>
                     <button type="button" class="btn--ui btn-primary" wire:click.prevent="createMember()">Salva</button>
                 </div>
                 </div>
@@ -1036,36 +1036,37 @@
 
         @if(isset($_GET["showFilters"]))
             var filterCommercial = localStorage.getItem("filterCommercialRecordIn");
-            if (filterCommercial)
+            if (filterCommercial && filterCommercial != "null" && filterCommercial != "undefined")
             {
                 $('.filterCommercial').val(filterCommercial);
                 $('.filterCommercial').trigger('change');
             }
             var filterMember = localStorage.getItem("filterMemberRecordIn");
-            if (filterMember)
+            if (filterMember && filterMember != "null" && filterMember != "undefined")
             {
                 $('.filterMember').val(filterMember);
                 $('.filterMember').trigger('change');
             }
             var filterPaymentMethod = localStorage.getItem("filterPaymentMethodRecordIn");
-            if (filterPaymentMethod)
+            console.log(filterPaymentMethod);
+            if (filterPaymentMethod && filterPaymentMethod != "null" && filterPaymentMethod != "undefined")
             {
                 $('.filterPaymentMethod').val(filterPaymentMethod);
                 $('.filterPaymentMethod').trigger('change');
             }
             var filterCausals = localStorage.getItem("filterCausalsRecordIn");
-            if (filterCausals)
+            if (filterCausals && filterCausals != "null" && filterCausals != "undefined")
             {
                 $('.filterCausals').val(filterCausals);
                 $('.filterCausals').trigger('change');
             }
             var filterFrom = localStorage.getItem("filterFromRecordIn");
-            if (filterFrom)
+            if (filterFrom && filterFrom != "null" && filterFrom != "undefined")
             {
                 $('.filterFrom').val(filterFrom);
             }
             var filterTo = localStorage.getItem("filterToRecordIn");
-            if (filterTo)
+            if (filterTo && filterTo != "null" && filterTo != "undefined")
             {
                 $('.filterTo').val(filterTo);
             }

+ 4 - 0
resources/views/livewire/supplier.blade.php

@@ -1,6 +1,8 @@
 
 <div class="col card--ui" id="card--dashboard">
 
+
+
     <header id="title--section" style="display:none !important"  class="d-flex align-items-center justify-content-between">
         <div class="title--section_name d-flex align-items-center justify-content-between">
             <i class="ico--ui title_section utenti me-2"></i>
@@ -74,6 +76,8 @@
 
     @else
 
+    <a style="margin-top:20px" class="btn--ui lightGrey" href="/suppliers"><i class="fa-solid fa-arrow-left"></i></a><br><br>
+
         <div class="container">
 
             @if (session()->has('error'))