Commit d07d090 1 parent 1118fa8 commit d07d090 Copy full SHA for d07d090
File tree 2 files changed +26
-7
lines changed
resources/views/backend/layouts
2 files changed +26
-7
lines changed Original file line number Diff line number Diff line change @@ -346,3 +346,22 @@ function currencyFormat(mixed $value): string {
346
346
347
347
return '৳ ' .$ formatter ->format ($ value );
348
348
}
349
+
350
+ function routeWithQuery (string $ name , mixed $ params = []){
351
+ $ queryStrings = '' ;
352
+ $ count = 0 ;
353
+ if (count (request ()->query ()) > 0 ) {
354
+ $ queryStrings = '? ' ;
355
+ $ queryStrings .= http_build_query (request ()->query ());
356
+
357
+ return route (
358
+ $ name ,
359
+ $ params
360
+ ).$ queryStrings ;
361
+ }
362
+
363
+ return route (
364
+ $ name ,
365
+ $ params
366
+ );
367
+ }
Original file line number Diff line number Diff line change 742
742
<ul class =" nav-second-level" >
743
743
@canany ([' update appointment' , ' approve appointment' , ' read appointment' ] )
744
744
<li >
745
- <a href =" {{ route (' user-appointments.index' ) } }" >
745
+ <a href =" {{ request ( ' map_id ' ) ? routeWithQuery ( ' user-appointments.index ' ) : route (' user-appointments.index' ) } }" >
746
746
Pending For Approval
747
747
</a >
748
748
</li >
749
749
<li >
750
- <a href =" {{ route (' user-appointments.approved' ) } }" >
750
+ <a href =" {{ request ( ' map_id ' ) ? routeWithQuery ( ' user-appointments.approved ' ) : route (' user-appointments.approved' ) } }" >
751
751
Approved
752
752
</a >
753
753
</li >
754
754
<li >
755
- <a href =" {{ route (' user-appointments.completed' ) } }" >
755
+ <a href =" {{ request ( ' map_id ' ) ? routeWithQuery ( ' user-appointments.completed ' ) : route (' user-appointments.completed' ) } }" >
756
756
Completed
757
757
</a >
758
758
</li >
780
780
<ul class =" nav-second-level" >
781
781
@canany ([' update consultation' , ' approve consultation' , ' read consultation' ] )
782
782
<li >
783
- <a href =" {{ route (' user-appointments.index' ) . ' ? type= consultation' } }" >
783
+ <a href =" {{ route (' user-appointments.index' , [ ' type' => ' consultation' ]) } }" >
784
784
Pending For Approval
785
785
</a >
786
786
</li >
787
787
<li >
788
788
<a
789
- href =" {{ route (' user-appointments.approved' ) . ' ? type= consultation' } }" >
789
+ href =" {{ route (' user-appointments.approved' , [ ' type' => ' consultation' ]) } }" >
790
790
Approved
791
791
</a >
792
792
</li >
793
793
<li >
794
794
<a
795
- href =" {{ route (' user-appointments.completed' ) . ' ? type= consultation' } }" >
795
+ href =" {{ route (' user-appointments.completed' , [ ' type' => ' consultation' ]) } }" >
796
796
Completed
797
797
</a >
798
798
</li >
799
799
@if (auth ()-> user ()-> role_name == ' expert' )
800
800
<li >
801
801
<a
802
- href =" {{ route (' user-appointments.times' ) . ' ? type= consultation' } }" >
802
+ href =" {{ route (' user-appointments.times' , [ ' type' => ' consultation' ]) } }" >
803
803
Appointment Times
804
804
</a >
805
805
</li >
You can’t perform that action at this time.
0 commit comments