Browse Source

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

Israat Zarin 1 year ago
parent
commit
b104fcab94

+ 20 - 0
app/Http/Controllers/Admin/AdminController.php

@@ -9,6 +9,7 @@ use App\Country;
 use App\Models\MarketCountry;
 use App\Models\ReferUser;
 use App\StudentProposal;
+use App\Models\University;
 use Auth;
 use Mail;
 use Session;
@@ -118,4 +119,23 @@ class AdminController extends Controller
     }
 
 
+    public function destination_wise_university(Request $request){
+
+        $universities = University::where(
+                'country_id',$request->country_id
+            )->orderBy(
+                'name'
+            )->select(
+                'id','name'
+            )->get();
+
+        return [
+            'msg'=>'Destination wise university data',
+            'data'=>[
+                'universities'=>$universities
+            ]
+        ];
+    }
+
+
 }

+ 7 - 0
app/Http/Controllers/Admin/SubContentController.php

@@ -103,6 +103,13 @@ class SubContentController extends Controller
 			$user=Auth::guard('admin')->user();
 			$data['departments'] =Department::where('status',1)->orderBy('name','ASC')->get();
             $data['universities'] =University::orderBy('name','ASC')->get();
+			$data['market_countries'] = MarketCountry::where(
+                'status', 1
+            )->select(
+                'market_countries.*', \DB::raw('(SELECT name FROM countries WHERE market_countries.country_id = countries.id ) as name')
+            )->orderBy('name')->get();
+
+			info($data['market_countries']);
 			$data['edit_data'] =User::find($req->edit_id);
 		}elseif($name=="edit_research_form"){
 			$data['edit_research'] =ResearchInterest::find($req->res_id);

+ 2 - 1
app/Http/Controllers/AjaxController.php

@@ -754,6 +754,7 @@ class AjaxController extends Controller
                 'university'=>'required',
                 'department'=>'required',
                 'designation'=>'required',
+                'destination'=>'required',
             ]);
 
             if($validator->fails()){
@@ -769,7 +770,7 @@ class AjaxController extends Controller
             $user_data->department =$req->department;
             $user_data->others_department = NULL;
             $user_data->designation =$req->designation;
-            $user_data->uni_website =$req->uni_website;
+            $user_data->nationality =$req->destination;
             $user_data->update();
             return response(
                 ['msg'=>'Successfully updated.']

+ 1 - 1
resources/views/admin/sub_contents/country_wise_university.blade.php

@@ -5,7 +5,7 @@
     <thead>
         <tr>
             <th>Sl</th>
-            <th>Designation</th>
+            <th>Destination</th>
             <th>University Name</th>
             <th>University website</th>
             <th style="text-align: center;">Action</th>

+ 70 - 34
resources/views/admin/sub_contents/edit_teacher_load.blade.php

@@ -29,50 +29,49 @@
                     </div>
                 </div>
             </div>
-            
             <div class="col-md-4">
                 <div class="mb-2">
-                    <label class="form-label config">University</label>
+                    <label class="form-label config">Department</label>
                     <div class="form-icon position-relative"> 
-                        <select name="university" id="university" class="form-control" required="" style="font-size: 13px;">
-                            <option selected disabled>Select University</option>
-                            @foreach($universities as $row)
-                                <option value="{{$row->id}}" @if($row->id==$edit_data->university_name) selected @endif>{{$row->name}}</option>
+                        <select name="department" class="form-control" required="" style="font-size: 13px;">
+                            <option selected disabled>Select Department</option>
+                            @foreach($departments as $row)
+                              <option value="{{$row->id}}" @if($row->id==$edit_data->department) selected @endif>{{$row->name}}</option>
                             @endforeach 
                         </select>
                     </div>
                 </div>
             </div>
+
             <div class="col-md-4">
                 <div class="mb-2">
-                    <label class="form-label config">Department</label>
+                    <label class="form-label config">Destination</label>
                     <div class="form-icon position-relative"> 
-                        <select name="department" class="form-control department_id" required="" style="font-size: 13px;">
-                            <option selected disabled>Select Department</option>
-                            @foreach($departments as $row)
-                              <option value="{{$row->id}}" @if($row->id==$edit_data->department) selected @endif>{{$row->name}}</option>
-                            @endforeach
-                            <option value="">Others</option>
+                        <select name="destination" id="destination_id" class="form-control" required="" style="font-size: 13px;">
+                            <option selected disabled>Select Destination</option>
+                            @foreach($market_countries as $row)
+                                <option value="{{$row->country_id}}" @if($row->country_id==$edit_data->nationality) selected @endif>{{$row->name}}</option>
+                            @endforeach 
                         </select>
                     </div>
                 </div>
             </div>
-            {{-- <div class="col-md-4 others_department" style="display: none;">
-                <div class="mb-2">
-                    <label class="form-label config" >Others Department</label>
-                    <div class="form-icon position-relative">
-                        <input type="text" class="form-control" placeholder="Others Department" id="others_department" name="others_department" value="{{$edit_data->others_department}}" style="font-size: 13px;">
-                    </div>
-                </div>
-            </div>  --}}
+            
             <div class="col-md-4">
                 <div class="mb-2">
-                    <label class="form-label config">Website</label>
-                    <div class="form-icon position-relative">
-                        <input type="text" class="form-control" placeholder="www.xyz.com" id="uni_website" name="uni_website" value="{{$edit_data->uni_website}}"  style="font-size: 13px;">
+                    <label class="form-label config">University</label>
+                    <div class="form-icon position-relative"> 
+                        <input type="hidden" id="edit_university_id" value="{{$edit_data->university_id}}">
+                        <select name="university" id="university_id" class="form-control" required="" style="font-size: 13px;">
+                            <option selected disabled>Select University</option>
+                            {{-- @foreach($universities as $row)
+                                <option value="{{$row->id}}" @if($row->id==$edit_data->university_id) selected @endif>{{$row->name}}</option>
+                            @endforeach  --}}
+                        </select>
                     </div>
                 </div>
-            </div>
+            </div> 
+             
         </div>  
         <div class="row">
             <div class="col-md-12">
@@ -90,15 +89,52 @@
 
 <script>
     $(function(){
-        // $('.department_id').change(function() { 
-        //     var value = $(this).attr('selected','selected').val();
-        //     if (value == "" ) {
-        //         $('.others_department').show();
-        //     } else {
-        //         $('.others_department').removeClass('display:none');
-        //         $('.others_department').hide();
-        //     }
-        // });
+
+        
+      
+         
+        $('#destination_id').change(function(){  
+            var self=$(this); 
+            var id = $(this).val();
+            var url="{{ route('destination-wise-university')}}";   
+
+            if(id){
+
+            $.get(url, {country_id:id}).done(function(res){   
+                $("#university_id").empty();
+                $("#university_id").append('<option value="">Select One..</option>');
+                res.data.universities.forEach(function(row){  
+                     $("#university_id").append('<option value="'+row.id+'">'+row.name+'</option>'); 
+                }) 
+            }) 
+                
+            }else{
+                $("#university_id").empty(); 
+            }   
+        });
+
+        var destination_id =$("#destination_id").val();
+        var edit_university_id =$("#edit_university_id").val();
+
+        if (destination_id) { 
+            var self=$(this);  
+            var url="{{ route('destination-wise-university')}}";  
+            $.get(url, {country_id:destination_id}).done(function(res){   
+                $("#university_id").empty(); 
+                var selected = 'selected'
+                res.data.universities.forEach(function(row){
+                    if(row.id ==edit_university_id){ 
+                        $("#university_id").append('<option selected="'+selected+'" value="'+row.id+'">'+row.name+'</option>');
+                    }
+
+                    if(row.id !=edit_university_id){ 
+                        $("#university_id").append('<option value="'+row.id+'">'+row.name+'</option>');
+                    } 
+
+                }) 
+            });
+        
+		}
 
         $('.edit_register_pending_teacher_form').on('submit', function(event){
             event.preventDefault();

+ 30 - 37
resources/views/modal_pages/proposal_status_rejected_form.blade.php

@@ -28,26 +28,28 @@
                 {{ csrf_field() }}
                     <div class="row">
                         <div class="col-md-12"> 
-                            <div class="pretty p-default p-curve">
-                                <input class="feedback" type="radio" name="feedback" />
-                                <div class="state p-success-o">
-                                    <label>Success</label>
-                                </div>
-                            </div>
-                            <div class="pretty p-default p-curve">
-                                <input class="feedback" type="radio" name="feedback" />
-                                <div class="state p-success-o">
-                                    <label>Success</label>
-                                </div>
-                            </div>
-                            <div class="pretty p-default p-curve">
-                                <input class="feedback feedback_msg" type="radio" name="feedback" value="others"/>
-                                <div class="state p-success-o">
-                                    <label>Others</label>
-                                </div>
-                            </div> 
+                            <ul>
+                                <li>
+                                    <div class="pretty p-default p-curve">
+                                        <input class="feedback" type="radio" name="feedback" value="reasons" />
+                                        <div class="state p-success-o">
+                                            <label>Success</label>
+                                        </div>
+                                    </div>
+                                </li>
+                                <li>
+                                    <div class="pretty p-default p-curve">
+                                        <input class="feedback" type="radio" name="feedback" value="others"/>
+                                        <div class="state p-success-o">
+                                            <label>Others</label>
+                                        </div>
+                                    </div>
+                                </li>
+                            </ul>
+                            
+                           
                         </div> 
-                        <div class="col-md-12" id="feedback_msg"> 
+                        <div class="col-md-12" id="feedback_msg" style="display: none;"> 
                             <label class="form-label">Feedback</label>
                             <div class="form-icon position-relative">
                                 <input type="hidden" name="p_status" id="p_status" value="">
@@ -69,24 +71,15 @@
 
    <script>
     $(function(){
-        $('#modal_page_footer').hide(); 
-
-        var feedback=[ 
-            'others',
-        ];
-
-        feedback.forEach(function(row){
-            $('#'+row).hide();
-        });
-
-        $('.feedback_msg').on('click', function(){
-
-            feedback.forEach(function(row){
-                $('#'+row).hide();
-            });
-
-            var feedback_msg=$(this).val();
-            $('#'+feedback_msg).show();
+        $('#modal_page_footer').hide();
+        
+        $('.feedback').on('click', function(){   
+            var value =$(this).val(); 
+            if(value=="others"){ 
+                $('#feedback_msg').show(); 
+            }else{
+                $('#feedback_msg').hide();  
+            }
 
         });
     }); 

+ 27 - 16
resources/views/teacher/load_application.blade.php

@@ -19,25 +19,36 @@
                     <tr>
                         <td style="font-size: 11px;">{{$key+1}}</td>
                         <td>
-                            <div style="font-size: 12px; font-weight: 600; color: black; text-transform: capitalize;">
-                                <span>{{cn($row,'student_details.first_name','')}} {{cn($row,'student_details.last_name','')}}</span>
-                            </div>
-                            <div style="font-size: 11.5px;">
-                                <a href="" class="" style="color: #868e96;"><span>Ref : {{$row->student_apply_ref ?? "N/A"}} </span></a>
-                            </div>
-                            <div style="font-size: 11.5px;">
-                                <span style="color: #868e96;">Applied : {{utc_to_ltz($row->submitted_date, 'd M Y g:i A', local_tz($user))}}</span>
+                            <div style="display:flex;">
+                                @if($row->student_details->nationality)
+                                    <img class="img-responsive listFlag" style="border-radius: 2px; padding: 0px;height: 35px; width: 35px;" src="{{ asset('/assets/img/flags/4x3').'/'.strtolower(cn($row,'student_details.country_name.iso_3166_2','')).'.svg' }}" alt="Flag" data-toggle="tooltip" title="" data-placement="top">
+                                @endif
+                                <div class="alert" style="background-color:white; padding: 3px 7px; margin-bottom: 0px;">
+                                    <div style="font-size: 12px; font-weight: 600; color: black; text-transform: capitalize;">
+                                        <span>{{cn($row,'student_details.first_name','')}} {{cn($row,'student_details.last_name','')}}</span>
+                                    </div>
+                                    <div style="font-size: 11.5px;">
+                                        <a href="" class="" style="color: #868e96;"><span>Ref : {{$row->student_apply_ref ?? "N/A"}} </span></a>
+                                    </div>
+                                    <div style="font-size: 11.5px;">
+                                        <span style="color: #868e96;">Applied : {{utc_to_ltz($row->submitted_date, 'd M Y g:i A', local_tz($user))}}</span>
+                                    </div>
+                                </div>
                             </div>
                         </td>
                         <td style="font-size: 11.5px;">
-                            <div style="font-size: 11.5px; font-weight: 600; display:block;">
-                                <span style="color: black;">{{cn($row,'institutes.institution','')}}</span>
-                            </div>
-                            <div style="font-size: 11.5px;">
-                                <span style="color: black;">Passing Year :  {{cn($row,'institutes.passing_year','N/A')}} </span>
-                            </div>
-                            <div class="mt-1" style="font-size: 11.5px;">
-                                <span class="label_badge_gpa">{{cn($row,'institutes.result','')}} (GPA)</span>
+                            <div style="display:flex;"> 
+                                <div class="alert" style="background-color:white; padding: 3px 7px; margin-bottom: 0px;">
+                                    <div style="font-size: 11.5px; font-weight: 600; display:block;">
+                                        <span style="color: black;">{{cn($row,'institutes.institution','')}}</span>
+                                    </div>
+                                    <div style="font-size: 11.5px;">
+                                        <span style="color: black;">Passing Year :  {{cn($row,'institutes.passing_year','N/A')}} </span>
+                                    </div>
+                                    <div class="mt-1" style="font-size: 11.5px;">
+                                        <span class="label_badge_gpa">{{cn($row,'institutes.result','')}} (GPA)</span>
+                                    </div>
+                                </div>
                             </div>
                         </td>
                         <td style="font-size: 11.5px; text-align:center; color: black;">{{cn($row,'scores.test_name','N/A')}} - {{cn($row,'scores.overall_score','')}}

+ 6 - 20
resources/views/teacher_profile.blade.php

@@ -189,17 +189,17 @@ tbody, td, tfoot, th, thead, tr {
     line-height: 1.3;
     letter-spacing: .2px;
     font-weight: 600;
-    background-color: #e5f3ff;
+    background-color:#e2edff;
 }
 .label_badge_work {
+    color: #10bd77;
     border-radius: 20px;
     padding: 1px 10px;
     font-size: 11px;
     line-height: 1.3;
     letter-spacing: .2px;
     font-weight: 600;
-    background: #e5ebf7;
-    color: #2466dc;
+    background-color:#dffff2;;
 }
 .ms-5 {
     margin-left: 2.4rem!important;
@@ -340,20 +340,6 @@ tbody, td, tfoot, th, thead, tr {
     font-weight: 600;
     background-color: #eed4ce;
 }
-.Q{
-    border-radius: 20px;
-    box-shadow:none !important;
-    font-size:13px;
-    padding: 5px 10px !important;
-    background-color: #ffad00 !important; 
-    color: #191e38 !important;
-}
-.Q:hover{
-    background: #191e38 !important;
-    color: #ffad00  !important;
-    border-radius: 20px;
-    border-color: #191e38 !important;
-}
 </style>
 <body>
 <header id="" class="site-header">
@@ -392,7 +378,7 @@ tbody, td, tfoot, th, thead, tr {
                                 <ul class="nav navbar-nav align-items-center ml-auto header_right ps-2">
                                     <li class="nav-item dropdown dropdown-notification">
                                         <a href="javascript:void(0)" class="open_modal_page" data-url="{{route('modal-get',['name'=>'add_wishlist'])}}" data-title="Wishlist">
-                                        <button class="btn btn2" style="padding: 5px 10px !important;">New Invite</button>
+                                        <button class="btn btn2" style="padding: 6px 10px !important;">New Invite</button>
                                         </a>
                                     </li>
                                 </ul>
@@ -403,7 +389,7 @@ tbody, td, tfoot, th, thead, tr {
                                     <ul class="nav navbar-nav align-items-center ml-auto header_right ps-2">
                                         <li class="nav-item dropdown dropdown-notification">
                                             <a href="javascript:void(0)">
-                                                <button class="btn Q" style="">Q-Apply</button>
+                                                <button class="btn btn2" style="padding: 6px 10px !important; background-color: #ffad00 !important; color: #191e38 !important;">Q-Apply</button>
                                             </a>
                                         </li>
                                     </ul>
@@ -521,7 +507,7 @@ tbody, td, tfoot, th, thead, tr {
                                     <h6 style="font-weight:bold !important;">3 Ways you can receive proposals from Doctoral candidates : </h6>
                                     <div class="col-md-4 mt-3 ms-3 method-box">
                                         <h6 class="method"> Option 1:</h6>
-                                        <p style="font-size: 13px;"> You can give your ARN <span class="mb-0" style="font-size: 13px !important; color: #191e38; font-weight: bolder !important;">({{ auth_user('teacher')->ref_no }})</span> to the student and request them to submit their proposal using your reference.</p>
+                                        <p style="font-size: 13px;"> You can give your ARN to the student and request them to submit their proposal using your reference.</p>
                                     </div>
                                     <div class="col-md-4 mt-3 ms-3 method-box">
                                         <h6 class="method"> Option 2:</h6>

+ 4 - 1
routes/web.php

@@ -112,7 +112,10 @@ Route::post('admin-logout', [App\Http\Controllers\AdminAuth\LoginController::cla
 Route::group(['middleware' => ['admin']], function() {
     Route::get('/admin/dashboard', [App\Http\Controllers\Admin\AdminController::class,'dashboard']);
     Route::get('/admin/dashboard/load_country_list/{text}', [App\Http\Controllers\Admin\AdminController::class,'load_country_list']);
-
+    Route::get(
+        'destination-wise-university',
+        [App\Http\Controllers\Admin\AdminController::class,'destination_wise_university']
+    )->name('destination-wise-university');
 
 });