Browse Source

Merge branch 'master' of https://revinr.site/mostafij-revinr/student-admission

Israat Zarin 2 years ago
parent
commit
c3e37076b5

+ 1 - 1
app/Http/Controllers/HomeController.php

@@ -34,7 +34,7 @@ class HomeController extends Controller
         $institution= Institution::where('student_id',Auth::user()->id)->get();
         $work_experience= Workexperience::where('student_id',Auth::user()->id)->get();
         $score= Score::where('student_id',$user->id)->get(); 
-        $proposal= Proposal::where('student_id',$user->id)->get();
+        $proposal= Proposal::where('student_id',$user->id)->orderBy('id','DESC')->get();
         $user_info= User::find($user->id);
         $academic_level= AcademicLevel::all();
         $proposal_files= StudentProposalUpload::where('student_id',$user->id)->get(); 

+ 4 - 4
resources/views/home.blade.php

@@ -84,14 +84,14 @@
                             </div>    
                         </div>
                     </div><!--end row-->
+                    @if(count($student_proposal) > 0 )
                     <div class="card p-2 mt-4 rounded border-0" style="background-color: white;">
                         <div class="col-md-12">
                             <div class="container">
                                 <div class="row mt-2">
                                     <div class="col-md-12">
                                             <h6 style="font-weight:bold !important; color: #141639c4;">Application you have submitted that are currently awaiting decisions</h6>                            
-                                        <div class="table-responsive">
-                                            @if(count($student_proposal) > 0 )
+                                        <div class="table-responsive"> 
                                             <table class="table table-bordered list_table">
                                                 <thead>
                                                     <tr>
@@ -117,14 +117,14 @@
                                                     </tr>
                                                     @endforeach
                                                 </tbody>
-                                            </table>
-                                            @endif
+                                            </table> 
                                         </div>                                    
                                     </div>
                                 </div>
                             </div>                                                           
                         </div>
                     </div>
+                    @endif
                     <div class="w3-container mt-5">
                     </div>
                 </div><!--end container-->

+ 2 - 0
resources/views/teacher_profile.blade.php

@@ -503,6 +503,7 @@ tbody, td, tfoot, th, thead, tr {
                                 </div>
                             </div>
                         </div>
+                        @if(count($students) >0)
                         <div class="col-md-12 bg-white" style="padding:10px; height:500px;">
                             <h4 class="text-info"></h4>
                             <div class="table-responsive">
@@ -597,6 +598,7 @@ tbody, td, tfoot, th, thead, tr {
                                 </table>
                             </div>
                         </div><!--end col-->
+                        @endif
                     </div><!--end teb pane-->
 
                     <div class="tab-pane fade bg-white p-2 rounded shadow" id="cardeo" role="tabpanel" aria-labelledby="cardeography"  style="height:100%;">