소스 검색

Student propsal details

Mostafijur Rahman 1 년 전
부모
커밋
81730097b2
33개의 변경된 파일1131개의 추가작업 그리고 46개의 파일을 삭제
  1. 5 1
      app/Http/Controllers/Admin/AdminController.php
  2. 10 1
      app/Http/Controllers/Admin/SubContentController.php
  3. 46 2
      app/Http/Controllers/AjaxController.php
  4. 2 0
      app/Http/Controllers/HomeController.php
  5. 59 2
      app/Http/Controllers/ModalController.php
  6. 10 0
      app/Models/Requirement.php
  7. 5 0
      app/StudentProposal.php
  8. BIN
      public/uploads/required_doc/1683183631document_file_.jpeg
  9. BIN
      public/uploads/required_doc/1683183891document_file_.png
  10. BIN
      public/uploads/required_doc/1683188146document_file_.png
  11. BIN
      public/uploads/required_doc/1683188557document_file_.jpeg
  12. BIN
      public/uploads/required_doc/1683188585document_file_.png
  13. BIN
      public/uploads/required_doc/1683188691document_file_.png
  14. BIN
      public/uploads/required_doc/1683188708document_file_.png
  15. BIN
      public/uploads/required_doc/1683188930document_file_13jpeg
  16. BIN
      public/uploads/required_doc/1683189157document_file_23401jpeg
  17. BIN
      public/uploads/required_doc/document_file_23401.jpeg
  18. BIN
      public/uploads/required_doc/document_file_23401.png
  19. BIN
      public/uploads/required_doc/document_file_23401png
  20. 94 17
      resources/views/admin/admin_profile.blade.php
  21. 382 0
      resources/views/admin/sub_contents/document_required_load.blade.php
  22. 42 0
      resources/views/admin/sub_contents/upload_document_required.blade.php
  23. 197 0
      resources/views/modal_pages/add_doc_required.blade.php
  24. 1 1
      resources/views/modal_pages/add_wishlist.blade.php
  25. 1 1
      resources/views/modal_pages/apply_student_proposal.blade.php
  26. 1 1
      resources/views/modal_pages/base.blade.php
  27. 160 0
      resources/views/modal_pages/edit_doc_required.blade.php
  28. 1 1
      resources/views/modal_pages/teacher_invited.blade.php
  29. 2 2
      resources/views/modal_pages/view_apply_proposal.blade.php
  30. 94 16
      resources/views/teacher/student_proposal_details.blade.php
  31. 1 1
      resources/views/teacher_profile.blade.php
  32. 2 0
      routes/web.php
  33. 16 0
      sql/update.sql

+ 5 - 1
app/Http/Controllers/Admin/AdminController.php

@@ -8,6 +8,7 @@ use App\User;
 use App\Country;
 use App\Models\MarketCountry;
 use App\Models\ReferUser;
+use App\StudentProposal;
 use Auth;
 use Mail;
 use Session;
@@ -65,13 +66,16 @@ class AdminController extends Controller
 
         $refer_users =ReferUser::orderBy('id','DESC')->get();
 
+        $application = StudentProposal::orderBy('id','DESC')->get(); 
+
         $data =[
           'register_teachers_list'=>$register_teachers_list ,
           'active_teachers_list'=>$active_teachers_list,
           'register_student_list'=>$register_student_list ,
           'market_countries'=>$market_countries,
           'refer_users'=>$refer_users,
-          'invited_registered_list'=>$invited_registered_list
+          'invited_registered_list'=>$invited_registered_list,
+          'application'=>$application
         ];
         return view('admin.admin_profile',$data);
     }

+ 10 - 1
app/Http/Controllers/Admin/SubContentController.php

@@ -9,6 +9,7 @@ use App\Models\University;
 use App\Models\MarketCountry;
 use App\Models\Department;
 use App\Models\ResearchInterest;
+use App\Models\Requirement;
 use App\StudentProposal;
 use App\User;
 use Auth;
@@ -70,7 +71,15 @@ class SubContentController extends Controller
                 )->first();
             }
 
-        }else $name='default';
+        }elseif($name=="document_required_load"){
+			$proposal_details = StudentProposal::find($req->id);
+			$data['proposal_details'] =$proposal_details;
+			$data['requirements'] = Requirement::where('std_proposal_id',$proposal_details->id)->get();
+		}elseif($name=="upload_document_required"){
+			$data['requirements'] = Requirement::find($req->req_id);
+			$std_pro_id =$data['requirements'];
+			$data['proposal_details'] = StudentProposal::where('id',$std_pro_id->std_proposal_id)->first();
+		}else $name='default';
 		//$data['page_sl']=new PageSL($data['chapter_details']);
 		return view("admin.sub_contents.{$name}", $data);
 

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

@@ -10,6 +10,7 @@ use App\Models\University;
 use App\Models\Department;
 use App\Models\ReferUser;
 use App\Models\ResearchInterest;
+use App\Models\Requirement;
 use App\StudentProposal;
 use Session;
 use Mail;
@@ -411,7 +412,7 @@ class AjaxController extends Controller
                 ['msg'=>'Saved successfully.']
             );
         }elseif($name=="add_wishlist_registration"){
-            info($req->id);
+            
             $validator=\Validator::make($req->all(), [
                 'first_name'=>'required',
                 'last_name'=>'required',
@@ -517,10 +518,53 @@ class AjaxController extends Controller
                 $user_data->update();
 
                 return response(
-                    ['msg'=>'Registration successfully saved.You can login now']
+                    ['msg'=>'Registration successfully saved.You can login now.']
                 );
             }
 
+        }elseif($name=="delete_doc_required"){
+            $requirements=Requirement::find($req->delete_id);
+            $requirements->delete();
+            return response([
+                'msg'=>'Deleted Successfully.'
+            ]);
+        }elseif($name=="document_required_upload_save"){
+
+            $rules=[
+                'id'=>'required',
+                'document_file' => 'required',
+            ];
+            
+            $validator=\Validator::make($req->all(), $rules);
+
+            if($validator->fails()){
+                $errors=$validator->errors()->all();
+                return response(['msg'=>$errors[0]], 422);
+            }
+
+            $data=Requirement::find($req->id);
+            $std_ref = StudentProposal::find($data->std_proposal_id);
+            
+            if($req->document_file){
+                $destinationPath =   public_path('/uploads/required_doc');
+                $file = $req->document_file;
+                $ext = $file->getClientOriginalExtension();
+                $fileName = 'document_file_'.$std_ref->student_apply_ref.'.'.$ext;
+                if(file_exists($destinationPath.'/'.$fileName)){
+                    @unlink($destinationPath.'/'.$fileName);
+                }
+                $file->move($destinationPath, $fileName);
+    
+                $data->document_file = $fileName; 
+
+            }
+
+            $data->update();
+
+            return response([
+                'msg'=>'Successfully uploaded.'
+            ]);
+
         }
 	}
 }

+ 2 - 0
app/Http/Controllers/HomeController.php

@@ -48,4 +48,6 @@ class HomeController extends Controller
         $universities =University::orderBy('name','ASC')->get();
         return view('auth.invited_register_form',compact('hash_ids','user','departments','universities'));
     }
+
+     
 }

+ 59 - 2
app/Http/Controllers/ModalController.php

@@ -9,6 +9,7 @@ use App\User;
 use App\StudentProposal;
 use App\Models\ReferUser;
 use App\Models\Admin;
+use App\Models\Requirement;
 use Hash;
 use DB;
 use Session;
@@ -49,6 +50,10 @@ class ModalController extends Controller{
         }elseif($name=="teacher_invited"){
             $data['admin'] =Admin::find($req->id);
 
+        }elseif($name=="add_doc_required"){
+            $data['std_proposal']=StudentProposal::find($req->id);
+        }elseif($name=="edit_doc_required"){
+            $data['requirements']=Requirement::find($req->id);
         }else $name='default';
 
 
@@ -131,7 +136,7 @@ class ModalController extends Controller{
             $user =Auth::guard('teacher')->user();
             $validator=\Validator::make($req->all(), [
                 'name'=>'required',
-                'email'=>'required|email|max:255|unique:refer_users'
+                'email'=>'required|email|max:255|unique:users'
             ]);
 
             if($validator->fails()){
@@ -139,6 +144,12 @@ class ModalController extends Controller{
                 return response(['msg'=>$errors[0]], 422);
             }
 
+            $already_exists =User::where('email',$req->email)->exists();
+
+            if($already_exists){
+                return response(['msg'=>'Sorry! this email is already exists!.'],403);
+            }
+
             $user_data =new User;
             $user_data->first_name =$req->name;
             $user_data->email =$req->email;
@@ -177,7 +188,7 @@ class ModalController extends Controller{
             $admin =Admin::find($req->id);
             $validator=\Validator::make($req->all(), [
                 'name'=>'required',
-                'email'=>'required|email|max:255'
+                'email'=>'required|email|max:255|unique:users'
             ]);
 
             if($validator->fails()){
@@ -185,6 +196,12 @@ class ModalController extends Controller{
                 return response(['msg'=>$errors[0]], 422);
             }
 
+            $already_exists =User::where('email',$req->email)->exists();
+
+            if($already_exists){
+                return response(['msg'=>'Sorry! this email is already exists!.'],403);
+            }
+
             $user_data =new User;
             $user_data->first_name =$req->name;
             $user_data->email =$req->email;
@@ -215,6 +232,46 @@ class ModalController extends Controller{
             return response(
                 ['msg'=>'Invite saved successfully.']
             );
+        }elseif($name=="add_doc_required"){  
+            $user=auth_user(); 
+
+            $new_rules=[  
+                'others'=>'required|array',   
+                'others.*.requirement_title'=>'required',  
+            ]; 
+            $validator=\Validator::make($req->all(),$new_rules,[
+                'others.*.requirement_title.required'=>'Please!, fill-up all requirement field.'
+            ]);
+
+            if($validator->fails()){
+                $errors=$validator->errors()->all();
+                return response(['msg'=>$errors[0]], 422);
+            }
+
+            $std_proposal=StudentProposal::find($req->id);
+
+            foreach($req->others as $row){ 
+                   Requirement::create([
+                    'std_proposal_id'=>$std_proposal->id, 
+                    'requirement_title'=>$row['requirement_title'], 
+                    'need_upload'=>$row['need_upload'],
+                    'created_by'=>$user->id
+                ]); 
+            }
+
+            return response([
+                'msg'=>'Successfully Saved.'
+            ]);
+
+        }elseif($name=="edit_doc_required"){
+            $requirements=Requirement::find($req->id);
+            $requirements->requirement_title =$req->requirement_title;
+            $requirements->need_upload =$req->need_upload; 
+            $requirements->update();
+
+            return response([
+                'msg'=>'Successfully updated.'
+            ]);
         }
 
         return response(['msg'=>'No name argument found.'], 403);

+ 10 - 0
app/Models/Requirement.php

@@ -0,0 +1,10 @@
+<?php
+
+namespace App\Models;
+
+use Illuminate\Database\Eloquent\Model;
+
+class Requirement extends Model
+{
+    public $fillable =['std_proposal_id','requirement_title','need_upload','created_by','updated_by'];
+}

+ 5 - 0
app/StudentProposal.php

@@ -34,4 +34,9 @@ class StudentProposal extends Model
     {
         return $this->hasMany(Workexperience::class, 'student_id','student_id');
     } 
+
+    public function country_name()
+    {
+        return $this->belongsTo(Country::class, 'nationality', 'id');
+    } 
 }

BIN
public/uploads/required_doc/1683183631document_file_.jpeg


BIN
public/uploads/required_doc/1683183891document_file_.png


BIN
public/uploads/required_doc/1683188146document_file_.png


BIN
public/uploads/required_doc/1683188557document_file_.jpeg


BIN
public/uploads/required_doc/1683188585document_file_.png


BIN
public/uploads/required_doc/1683188691document_file_.png


BIN
public/uploads/required_doc/1683188708document_file_.png


BIN
public/uploads/required_doc/1683188930document_file_13jpeg


BIN
public/uploads/required_doc/1683189157document_file_23401jpeg


BIN
public/uploads/required_doc/document_file_23401.jpeg


BIN
public/uploads/required_doc/document_file_23401.png


BIN
public/uploads/required_doc/document_file_23401png


+ 94 - 17
resources/views/admin/admin_profile.blade.php

@@ -518,50 +518,75 @@ tbody, td, tfoot, th, thead, tr {
                                         </tr>
                                     </thead>
                                     <tbody>
+                                        @if(count($application) > 0)
+                                        @foreach($application as $key=>$row)
                                         <tr>
-                                            <td style="font-size: 11px;">1</td>
+                                            <td style="font-size: 11px;">{{++$key}}</td>
                                             <td style="font-size: 11px;">
                                                 <div style="font-size: 11px; font-weight: 600; color: black;">
-                                                    <span>first-name . last-name</span>
+                                                    <span>{{cn($row,'student_details.first_name','')}} . {{cn($row,'student_details.last_name','')}}</span>
                                                 </div>
                                                 <div style="font-size: 11px;">
-                                                    <span>nationality</span>
+                                                    <span>{{cn($row,'student_details.country_name.name','')}}</span>
                                                 </div>
                                                 <div style="font-size: 11px;">
-                                                    <span style="color: black;">Date of birth</span>
+                                                    <span style="color: black;">@if(!empty(cn($row,'student_details.dob'))){{date('d M Y', strtotime(cn($row,'student_details.dob','')))}} @endif</span>
                                                 </div>
                                             </td>
                                             <td style="font-size: 11px;">
                                                 <div style="font-size: 11px; font-weight: 600; color: black;">
-                                                    <span>first-name . last-name</span>
+                                                    <span>{{cn($row,'teacher_details.first_name','')}} . {{cn($row,'teacher_details.last_name','')}}</span>
                                                 </div>
                                                 <div style="font-size: 11px;">
-                                                    <span>designation</span>
+                                                    <span>{{cn($row,'teacher_details.designation','')}}</span>
                                                     <span>.</span>
-                                                    <span style="color: black;">department</span>
+                                                    @if(isset($row->teacher_details->department_name))
+                                                        <span style="color: black;">{{cn($row,'teacher_details.department_name.name','')}}</span>
+                                                    @else
+                                                        <span style="color: black;">{{cn($row,'teacher_details.others_department','')}}<</span>
+                                                    @endif
                                                 </div>
                                                 <div style="font-size: 11px;">
-                                                    <span style="color: black;">Uni name</span>
+                                                    <span style="color: black;">{{cn($row,'teacher_details.university.name','')}}</span>
                                                 </div>
                                             </td>
                                             <td style="font-size: 11px;">
                                                 <div style="font-size: 11px; font-weight: 600; color: black;">
-                                                    <span>Proposal title</span>
+                                                    <span>({{cn($row,'proposal.proposal_ref','')}}) - {{cn($row,'proposal.title','')}}</span>
                                                 </div>
                                                 <div style="font-size: 11px;">
-                                                    <span>Quantitative</span>
+                                                    <span>{{cn($row,'proposal.methology','')}}</span>
                                                     <span>.</span>
-                                                    <span style="color: black;"> math</span>
+                                                    <span style="color: black;"> {{cn($row,'proposal.department.name','')}}</span>
                                                     <span>.</span>
-                                                    <span style="color: black;">Self-Funded</span>
+                                                    <span style="color: black;">{{cn($row,'proposal.status','')}}</span>
                                                 </div>
                                             </td>
-                                            <td style="font-size: 11px;">Apply date</td>
-                                            <td style="font-size: 11px;">decision</td>
+                                            <td style="font-size: 11px;">@if(!empty($row->created_at)){{date('d M Y', strtotime($row->created_at))}} @endif</td>
+                                            <td style="font-size: 11px;">
+                                                @if($row->proposal_status==NULL)
+                                                   Hold
+                                                @endif
+                                                @if($row->proposal_status==1)
+                                                    In Review
+                                                @endif
+                                                @if($row->proposal_status==2)
+                                                    Pause
+                                                @endif
+                                                @if($row->proposal_status==3)
+                                                    Rejected
+                                                @endif
+                                                @if($row->proposal_status==4)
+                                                    Interested
+                                                @endif
+                                            </td>
                                         </tr>
-                                        <!-- <tr>
-                                            <td colspan="5" class="text-center text-danger">No data found!</td>
-                                        </tr> -->
+                                        @endforeach
+                                        @else
+                                         <tr>
+                                            <td colspan="6" class="text-center text-danger">No data found!</td>
+                                        </tr> 
+                                        @endif
                                     </tbody>
                                 </table>
                             </div>
@@ -1183,6 +1208,58 @@ tbody, td, tfoot, th, thead, tr {
 
         }
 
+        function ajax_form(form, cllback=null, config={spinner: true}){
+
+            $('.btn-submit').prop('disabled', true);
+            var redirect=$(form).data('redirect');
+
+            if(typeof config=='object'){
+
+            if(config.spinner) wait_me($(form));
+
+            }
+
+            $(form).ajaxSubmit({
+            success:function(res){
+
+                wait_me($(form), 'hide');
+
+                if(res.msg){
+
+                pop_up_msg(res.msg, 'success', function(){
+
+                    $('.btn-submit').prop('disabled', false);
+
+                    if(redirect) window.location.replace(redirect);
+                    else if(typeof cllback=='function'){
+                    cllback(form, res);
+                    }
+
+                });
+
+                }
+
+                //$.notify(res.msg, 'success');
+            },
+            error:function(res){
+
+                wait_me($(form), 'hide');
+
+                var msg="Request failed to process, try again later.";
+
+                if(res.responseJSON && res.responseJSON.msg){
+                msg=res.responseJSON.msg;
+                }
+
+                pop_up_msg(msg, 'error');
+                $('.btn-submit').prop('disabled', false);
+
+            }
+
+            });
+
+        } //End of ajax form definition
+
 
         $(function(){
 

+ 382 - 0
resources/views/admin/sub_contents/document_required_load.blade.php

@@ -0,0 +1,382 @@
+@extends('admin.sub_contents.base')  
+@section('main') 
+<style type="text/css">
+  	.list_table tbody tr td {
+    font-size: 12.5px;
+    font-weight: 400;
+    border-style: dashed;
+}
+
+    .list_table thead tr th, .list_table tbody tr td {
+        padding: 11px 6px 10px;
+    }
+
+    .table-bordered {
+        border: none !important;
+    }
+
+ 
+	.requirement_box{
+		width: 100%;
+	    height: 40px;
+	    background: #fff;
+	    /*box-shadow: 0px 0px 1px rgb(98, 95, 139);*/
+	    padding: 10px;
+	    border-radius: 2px;
+	    margin-bottom: 10px;
+	    border: 1px solid #e4e4e4;
+	}
+	.uni_name{
+		position: relative;
+		top: 10%;
+		font-size: 12px;
+	    font-weight: 600;
+	    color: rgb(98, 95, 139);
+	    cursor: pointer;
+	}
+	.requirement_box:last-child{
+		margin-bottom: 0;
+	}
+	.uni_name:hover{
+		color: #ff7f00;
+		transition: all 1s cubic-bezier(0.19, 1, 0.22, 1) 0s;
+	}
+	.sl_number{
+		color: #625f8b;
+	    font-size: 14px;
+	    position: relative;
+	    left: -28px;
+	    top: 2px;
+	}
+
+	.archive_btn:hover{
+		color: #ff7f00;
+    	transition: all 1s cubic-bezier(0.19, 1, 0.22, 1) 0s;
+	}
+	.archive_btn{
+		color: rgb(98, 95, 139);
+		font-size: 15px;
+	    top: 2px;
+	    position: relative;
+	}
+
+	.requirement_map_part .single_doc_item{
+        display: flex;
+        background: fff;
+        padding: 7px 16px;
+        margin-top: 10px;
+        border-radius: 0.75rem;
+        border: 1px solid #e9f0f3;
+    }
+    .requirement_map_part .single_doc_item:hover{
+        background: #f5f4fd;
+    }
+    .requirement_map_part .single_doc_item .left{
+        width: calc(100% - 190px);
+        align-self: center;
+    }
+    .requirement_map_part .single_doc_item .left strong{
+        color: rgb(57, 59, 62);
+        font-size: 12px;
+    }
+    .requirement_map_part .single_doc_item .right{
+        width: 190px;
+        align-self: center;
+        text-align: -webkit-right;
+    }
+    .requirement_map_part .single_doc_item .round_btn_groups .label_badge_radius {
+	    border-radius: 20px;
+	    padding: 1px 10px;
+	    font-size: 11px;
+	    font-weight: 400;
+	    line-height: 1.3;
+	    letter-spacing: .2px;
+	    background: #f5f4fd;
+	    border: 1px solid #ceccda;
+	}
+
+	.requirement_map_part .single_doc_item .right .add_more_drop .dropdown-toggle:after{
+        display: none;
+    }
+    /*.requirement_map_part .single_doc_item .right .add_more_drop .dropdown-toggle{
+        color: #c3c3c3;
+        cursor: pointer;
+        border: .5px solid #d8e2e7;
+        border-radius: 50%;
+        padding: 3px 5px;
+        font-size: .9rem;
+        padding: 3px 5px;
+    }*/
+    .requirement_map_part .single_doc_item .right .add_more_drop .dropdown-menu.show{
+        /*margin-left: -97px;*/
+        min-width: auto;
+        padding: 0;
+
+        z-index: 2;
+        top: -5px !important; 
+        left: 60px !important;
+    }
+    .requirement_map_part .single_doc_item .right .add_more_drop .dropdown-menu.show .dropdown-item{
+        background: #dedbf1;
+        color: #2e1153;
+        font-size: 12px;
+        border: none;
+    }
+    .requirement_map_part .single_doc_item .right .add_more_drop .dropdown-menu.show .dropdown-item:hover{
+        background: #2e1153;
+        color: #fff !important;
+    }
+    .requirement_map_part .single_doc_item .right .add_more_drop .dropdown-menu.show .activate{
+        background: #2e1153;
+        color: #fff;
+    }
+    .requirement_map_part .single_doc_item .right .add_more_drop .dropdown-menu.show .dropdown-item:first-child{
+        border-top-left-radius: .25rem;
+        border-top-right-radius: .25rem;
+    }
+    .requirement_map_part .single_doc_item .right .add_more_drop .dropdown-menu.show .dropdown-item:last-child{
+        border-bottom-left-radius: .25rem;
+        border-bottom-right-radius: .25rem;
+    }
+
+
+    .requirement_map_part .single_doc_item .right .add_more_drop .dropdown-toggle{
+        background: #dedbf1;
+        padding: 4px 8px 2px;
+        border-radius: 50%;
+        font-size: .8rem;
+        border: 1px solid transparent;
+        color: #2e1153;
+        cursor: pointer;
+    }
+    .requirement_map_part .single_doc_item .right .add_more_drop .dropdown-toggle:hover {
+        color: #ff7f00 !important;
+        transition: all 1s cubic-bezier(0.19, 1, 0.22, 1) 0s;
+        border: 1px solid #ff7f00;
+    }
+    .requirement_map_part .single_doc_item .right .add_more_drop{
+        z-index: auto !important;
+
+        margin: 0 3.5px;
+    }
+
+    .requirement_map_part .single_doc_item .round_btn_groups .add_more_drop .fa-paperclip{
+        padding: 4px 6px 4px !important;
+        font-size: .82rem;
+      }
+      .requirement_map_part .single_doc_item .round_btn_groups .add_more_drop .fa-upload, .requirement_map_part .single_doc_item .round_btn_groups .add_more_drop .fa-trash, .requirement_map_part .single_doc_item .round_btn_groups .add_more_drop .fa-pencil, .requirement_map_part .single_doc_item .round_btn_groups .add_more_drop .fa-info, .requirement_map_part .single_doc_item .round_btn_groups .add_more_drop .fa-archive{
+        color: #826aa0 !important;
+      }
+      .requirement_map_part .single_doc_item .round_btn_groups .add_more_drop .fa-eye{
+        padding: 4px 4.5px !important;
+        color: #826aa0 !important;
+      }
+      .requirement_map_part .single_doc_item .right .add_more_drop .dropdown-toggle{
+        padding: 4px 5px !important;
+      }
+      .requirement_map_part .single_doc_item .round_btn_groups .add_more_drop .font-icon{
+        color: #826aa0 !important;
+      }
+
+      .requirement_map_part .single_doc_item .right .add_more_drop{
+        z-index: auto !important;
+
+        margin: 0 3.5px;
+    }
+
+    .requirement_map_part .single_doc_item .right img {
+        width: 22px;
+        height: 22px;
+        border-radius: 50%;
+    }
+
+    .requirement_map_part .single_doc_item .round_btn_groups{
+        display: flex;
+        width: 190px;
+        justify-content: flex-end;
+      }
+
+
+    .open_requirement_doc_info_div_inner{
+        padding: 7px 16px;
+        margin-top: 10px;
+        border-radius: 30px;
+        border: 1px solid #e9f0f3;
+        display: flex;
+        width: fit-content;
+        margin-left: auto;
+        background: #f5f4fd;
+    }
+    .open_requirement_doc_info_div_inner .btn_part{
+        width: 175px;
+        text-align-last: right;
+        margin-top: 3px;
+        margin-left: 15px;
+    }
+
+    .label_badge_radius {
+	    background-image: linear-gradient(to right, rgb(46 17 83 / 19%), rgb(245, 244, 253));
+	    color: rgb(46, 17, 83);
+	    border-radius: 20px;
+	    padding: 1px 10px;
+	    font-size: 11px;
+	    font-weight: 400;
+	    line-height: 1.3;
+	    letter-spacing: .2px;
+	    display: inline-block;
+	}
+
+	.requirement_map_part .single_doc_item .left .pretty.p-switch.p-fill input:checked~.state.p-success:before {
+        background-color: #2e1153!important;
+    }
+    .requirement_map_part .single_doc_item .left .pretty.p-switch input:checked~.state.p-success:before{
+        border-color: #2e1153!important;;
+    }
+
+    
+ 
+	
+</style>
+
+<div class="row requirement_map_part">
+    <div class="col-lg-12"> 
+        <div class="row">
+            <div class="col-md-10">
+                <div class="content_header mb-3 ml-0">
+                <div class="left">
+                    <i class="fa fa-list-ul" aria-hidden="true" style="padding: 6px 6.8px;"></i>
+                </div>
+                <div class="right" style="display: flex; align-self: center;">
+                    <span class="main_title">Document or Information Required</span> 
+                    <span class="badge badge-success ml-2" style="background: #ffffff; font-weight: 700; font-size: 12px !important; border-radius: 10px; padding: 4px 12px !important; border: 1px solid #d4d2df; color: #2e1153; position: relative; margin-left:5px;">{{$requirements->count()}}</span> 
+                </div>
+                </div>
+            </div>
+            <div class="col-md-2 text-right">  
+                <span class="btn open_modal_page submit_button" data-url="{{route('modal-get',['add_doc_required', 'id'=>$proposal_details->id])}}" data-title="Add Requirement">Add New
+                </span> 
+            </div>
+        </div>
+    </div>
+        <div class="table-responsive">
+            @if($requirements->isEmpty())
+            <div class="alert mb-1" role="alert" style="border-color: #e9f0f3; font-size: 12px !important; color: #dc3545; border-radius: 30px; padding: 8px 15px;">
+                <span>No General Requirement available.</span>
+            </div>
+            @else
+            @foreach($requirements as $key=>$row)
+            <div class="single_doc_item">
+                <div class="left_icon" style="align-self: center;">
+                    @if($row->need_upload)
+                    <i class="fa fa-file-text tooltips" title="Document" style="background: #f1f0fb; padding: 4px 5px; border-radius: 50%; border: 1px solid #ceccda; margin: 0 5px 0 -5px; top: 7px; position: relative;"></i>
+                    @else
+                    <i class="fa fa-info tooltips" title="Information" style="background: #f1f0fb; padding: 4px 8px; border-radius: 50%; border: 1px solid #ceccda; margin: 0 5px 0 -5px; top: 7px; position: relative;"></i>
+                    @endif
+                </div>
+                <div class="left ml-2">
+                    <span>{{ $row->requirement_title }} </span>  
+	                <br> 
+                   <small style="color: rgb(134, 142, 150); font-size: 12px !important;">{{ utc_to_ltz($row->created_at) }} </small> 
+                </div>
+                <div class="right"> 
+                    <div class="round_btn_groups">
+                        {{-- <span style="border-bottom: none;">
+                            <div class="add_more_drop tooltips" title="" data-original-title="View File">
+                                <i class="fa fa-eye dropdown-toggle"></i>
+                            </div>
+                        </span> --}}
+                        @if($row->need_upload)
+                        <span class="add_more_drop add_more_drop" style="border-bottom: none;margin-top: -1px; margin-bottom: 1px;">
+                            <span class="fa fa-upload tooltips upload_document hand dropdown-toggle" aria-hidden="true" data-id="{{$row->id}}" title='Upload Document'></span>
+                        </span>
+                        @endif
+                        @if($row->document_file)
+                        <a href="{{ asset('uploads/required_doc') }}/{{$row->document_file}}" download="{{ $row->document_file }}" style="border-bottom: none;">
+	                        <div class="add_more_drop tooltips" title="" data-original-title="Download">
+	                            <i class="fa fa-paperclip dropdown-toggle"></i>
+	                        </div>
+	                    </a>
+                        @endif
+                        <span class="add_more_drop open_modal_page" data-url="{{route('modal-get',['name'=>'edit_doc_required','id'=>$row->id])}}" data-title="Edit Requirement" data-toggle="tooltip" data-original-title="Edit">
+                            <i class="fa fa-pencil action_button_hover dropdown-toggle"></i>
+                        </span>
+                        <span class="add_more_drop delete_doc_required" data-id="{{$row->id}}" data-toggle="tooltip" data-original-title="Delete">
+                            <i class="fa fa-trash delete action_button_hover dropdown-toggle"></i>
+                        </span>
+                    </div>
+                </div>
+                 
+            </div> 
+            @endforeach
+            @endif
+        </div>
+    </div>
+</div>
+ 
+@endsection
+
+<script>
+    $(function(){
+
+        var form_row_added=false;
+
+        $('.upload_document').on('click', function(){ 
+            if(form_row_added){ 
+                $('.open_department_info_div').remove();
+                form_row_added=false;
+            } 
+            var self=$(this);  
+            var self_tr=self.closest('.single_doc_item');
+
+            var req_id=self.data('id');
+
+            form_row_added=true;
+
+            self_tr.after( 
+            "<div class='open_department_info_div'><div class='open_document_info_div_inner'></div></div>"
+            );
+
+            fetch_sub_content(
+                '.open_document_info_div_inner',
+                "{{ route('sub-content', ['name'=>'upload_document_required']) }}?req_id="+req_id
+            ); 
+            
+        });
+
+
+        $('.delete_doc_required').on('click', function(){ 
+            var id = $(this).attr("data-id"); 
+            var form_data={
+                _token: "{{ csrf_token() }}",  
+                delete_id: id,
+            }  
+            swal({
+                title: "Are you sure?",
+                text: "You will not be able to recover this data!",
+                type: "warning",
+                showCancelButton: true,
+                confirmButtonClass: "btn-danger",
+                cancelButtonClass: "btn-info",
+                confirmButtonText: "Yes, delete!",
+                cancelButtonText: "No, cancel!",
+
+            }, function(isConfirm){
+
+                if(isConfirm){  
+                    $.post("{{ route('ajax-post', ['name'=>'delete_doc_required']) }}",form_data
+                    ).done(function(res){ 
+                        pop_up_msg(res.msg); 
+                        fetch_sub_content(
+                            '#doc_required_load',
+                            "{{ route('sub-content', ['name'=>'document_required_load','id'=>$proposal_details->id]) }}"
+                        );
+
+                    }).fail(function(err){ 
+                        pop_up_msg(err_msg(err), 'error'); 
+                    }); 
+                } 
+            }); 
+                        
+        });
+    });
+</script>

+ 42 - 0
resources/views/admin/sub_contents/upload_document_required.blade.php

@@ -0,0 +1,42 @@
+<form method="POST" action="{{route('ajax-post', ['name'=>'document_required_upload_save'])}}"  class="edit_dep_info_form" enctype="multipart/form-data"> 
+<input type="hidden" name="_token" value="{{ csrf_token() }}" />
+<input type="hidden" id="req_id" name="id" value="{{$requirements->id}}">
+    <div class="col-md-12">
+        <div class="mb-2">
+            <label class="form-label config"></label>
+            <div class="form-icon position-relative">
+                <input type="file" id="document_file" class="form-control" name="document_file" style="font-size: 13px;">
+            </div>
+        </div>
+    </div>     
+    <div class="col-md-12">
+        <div class="text-end">
+            <button type="button" class="btn cancel_button mr-1 btn-cancel close_form" >
+                <i aria-hidden="true" class="fa fa-refresh"></i>
+            </button>
+            <button type="submit" class="btn btn2 submit_upload_document">Update</button>                      
+        </div>
+    </div>
+</form>
+     
+ 
+
+<script>
+    $(function(){
+
+        $('.edit_dep_info_form').on('submit', function(event){
+            event.preventDefault();
+            var self = $(this); 
+            ajax_form(self, function(self){
+                fetch_sub_content(
+                    '#doc_required_load',
+                    "{{ route('sub-content', ['name'=>'document_required_load', 'id'=>$proposal_details->id]) }}"
+                ); 
+            });
+        }); 
+
+        $('.btn-cancel').on('click', function(){ 
+            $('.open_document_info_div_inner').addClass('d-none')
+        });
+    });
+</script>

+ 197 - 0
resources/views/modal_pages/add_doc_required.blade.php

@@ -0,0 +1,197 @@
+@extends('modal_pages.base')
+<style>
+    .listFlag{
+        height: 20px;
+        border-radius: 50%;
+        width: 20px;
+        margin-right: 5px;
+    }
+    .btn1{
+    background-color: #141639c4 !important;
+    color:white !important;
+    border-radius: 20px;
+    box-shadow:none !important;
+    }
+    .btn1:hover{
+        background: #ffff !important;
+        color: #141639c4 !important;
+        border-radius: 20px;
+        border: 1px solid #141639c4;
+    }
+
+    .box-typical {
+        font-size: 13px !important;
+    }
+
+    .box-typical {
+        -webkit-border-radius: 4px;
+        border-radius: 4px;
+        background: #fff;
+        border: solid 1px #d8e2e7;
+        margin: 0 0 20px;
+    }
+
+    .box-white {
+        background: #fff;
+        border-radius: 3px;
+        padding: 15px 20px;
+        font-size: 13px;
+    }
+
+    .btn.btn-warning {
+        background-color: #f29824 !important;
+        border-color: #f29824 !important;
+        color: #ffffff !important;
+    }
+
+    .text-right {
+        text-align: right!important;
+    }
+
+    .cancel_btn_new {
+        background-color: #ffc107 !important;
+        border-width: 1px !important;
+        border-color: #ffc107 !important;
+        color: #fff !important;
+        border-radius: 30px !important;
+        padding: 4px 12px !important;
+        height: 28px;
+        display: inline-block;
+    }
+
+    .pretty {
+        font-size: 14px;
+    }
+
+    .form-group {
+        margin-bottom: 1rem;
+    }
+
+    .form-label {
+        color: #5d5d5d !important;
+        font-size: 12px;
+        font-weight: 600;
+    }
+
+    .btn.btn-danger {
+        background-color: #fa424a !important;
+        border-color: #fa424a !important;
+        color: #ffffff !important;
+    }
+
+    .row {
+        display: -ms-flexbox;
+        display: flex;
+        -ms-flex-wrap: wrap;
+        flex-wrap: wrap;
+        margin-right: -15px;
+        margin-left: -15px;
+    }
+
+    .form-control {
+        padding: 5px 0.75rem !important;
+    }
+</style>
+@section('main')
+<form class="modal-form" action="{{ url()->current() }}" method="POST">
+	{{ csrf_field() }}
+    <input type="hidden" name="id" value="{{$std_proposal->id}}">
+    <input  type="hidden" name="requirement_source" value="others"/>
+    <div class="box-typical" id="others" style="padding: 10px 15px 0px; margin: 10px 15px 15px; border-radius: .25rem;">
+        <div class="row">
+			<div class="col">
+				<span style="font-size: 13px; font-weight: 600; display: block; margin-bottom: 5px;">Add Document requirements</span>
+			</div>
+			<div class="col text-right">
+				<button type="button" class="btn btn-warning btn-sm add_more_div">
+					Add More
+				</button>
+			</div>
+		</div>
+        <div class="others_div mt-2" style="border-top: 1px solid #e9f0f3;">
+            <div class="row">
+                <input type="hidden" class="index" name="others[1][index]" value="1"/>
+                <div class="col-md-6 form-group mt-2">
+                    <label class="form-label">Requirement</label>
+                    <textarea class="form-control requirement_title" name="others[1][requirement_title]" rows="1"></textarea>
+                </div>
+                <div class="col-md-5 form-group mt-2">
+                    <label class="form-label">Requirement Type</label>
+                    <div class="d-flex">
+                        <div class="pretty p-default p-curve">
+                            <input class="need_upload" type="radio" name="others[1][need_upload]" value="1" />
+                            <div class="state p-primary-o">
+                                <label>
+                                    <small>Document</small>
+                                </label>
+                            </div>
+                        </div>
+                        <div class="pretty p-default p-curve">
+                            <input class="need_upload" type="radio" name="others[1][need_upload]" value="0" />
+                            <div class="state p-primary-o">
+                                <label>
+                                    <small>Information</small>
+                                </label>
+                            </div>
+                        </div>
+                    </div>
+                    
+                </div>
+             
+                <div class="col-md-1 form-group mt-2">
+                    <button type="button" class="btn btn-danger mt-4 remove_others_div d-none cancel_button" style="padding: 4px 7px; line-height: 0; margin-top: 15px !important;">
+                        <i class="fa fa-close" aria-hidden="true"></i>
+                    </button>
+                </div>
+            </div> 
+            </div>
+           
+    </div>
+
+    <div class="row">
+        <div class="col">
+            <button type="submit" class="btn btn-inline pull-right submit_button">
+                Save
+            </button>
+            {{-- <button type="button" class="btn btn-inline pull-right btn-submit cancel_btn_new" data-dismiss="modal">
+                Cancel
+            </button> --}}
+        </div>
+    </div>
+</form>
+
+   <script>
+    $(function(){
+        $('#modal_page_footer').hide();
+
+
+        $('.add_more_div').on('click', function(){
+
+            var last_index=$('.others_div').last().index();
+
+            var cloned=$('.others_div').last().clone(true);
+
+            cloned.find(".remove_others_div" ).removeClass('d-none');
+
+            cloned.find(".index" ).attr('name', "others["+(last_index+1)+"][index]").val(last_index+1);
+
+            cloned.find(".requirement_title" ).attr('name', "others["+(last_index+1)+"][requirement_title]").val('');
+
+            cloned.find(".need_upload" ).attr('name', "others["+(last_index+1)+"][need_upload]").prop('checked', false);
+
+            cloned.appendTo( "#others" );
+
+        });
+
+        $('.remove_others_div').on('click', function(){
+
+            $(this).closest('.others_div').remove();
+
+        });
+
+    });
+
+    </script>
+
+
+@endsection

+ 1 - 1
resources/views/modal_pages/add_wishlist.blade.php

@@ -24,7 +24,7 @@
     <div class="container" style="background-color: white; border-radius: 6px;">
         <div class="row">
             <div class="co-md-12 p-3">
-                <form class="ajax-form" action="{{ url()->current() }}" method="POST" enctype="multipart/form-data">
+                <form class="modal-form" action="{{ url()->current() }}" method="POST" enctype="multipart/form-data">
                 {{ csrf_field() }}
                     <div class="row">
                         <div class="col-md-12">

+ 1 - 1
resources/views/modal_pages/apply_student_proposal.blade.php

@@ -1,7 +1,7 @@
 @extends('modal_pages.base')
 
 @section('main')
-<form class="ajax-form" action="{{ url()->current() }}" method="POST" enctype="multipart/form-data">
+<form class="modal-form" action="{{ url()->current() }}" method="POST" enctype="multipart/form-data">
     {{ csrf_field() }}
     <div class="container">
         <div class="col-md-12">

+ 1 - 1
resources/views/modal_pages/base.blade.php

@@ -13,7 +13,7 @@
 			dateFormat: "h:i K",
 		});
 	
-		$('.ajax-form').on('submit', function(event){
+		$('.modal-form').on('submit', function(event){
 	
 			event.preventDefault();
 			var self=$(this);

+ 160 - 0
resources/views/modal_pages/edit_doc_required.blade.php

@@ -0,0 +1,160 @@
+@extends('modal_pages.base')
+<style>
+    .listFlag{
+        height: 20px;
+        border-radius: 50%;
+        width: 20px;
+        margin-right: 5px;
+    }
+    .btn1{
+    background-color: #141639c4 !important;
+    color:white !important;
+    border-radius: 20px;
+    box-shadow:none !important;
+    }
+    .btn1:hover{
+        background: #ffff !important;
+        color: #141639c4 !important;
+        border-radius: 20px;
+        border: 1px solid #141639c4;
+    }
+
+    .box-typical {
+        font-size: 13px !important;
+    }
+
+    .box-typical {
+        -webkit-border-radius: 4px;
+        border-radius: 4px;
+        background: #fff;
+        border: solid 1px #d8e2e7;
+        margin: 0 0 20px;
+    }
+
+    .box-white {
+        background: #fff;
+        border-radius: 3px;
+        padding: 15px 20px;
+        font-size: 13px;
+    }
+
+    .btn.btn-warning {
+        background-color: #f29824 !important;
+        border-color: #f29824 !important;
+        color: #ffffff !important;
+    }
+
+    .text-right {
+        text-align: right!important;
+    }
+
+    .cancel_btn_new {
+        background-color: #ffc107 !important;
+        border-width: 1px !important;
+        border-color: #ffc107 !important;
+        color: #fff !important;
+        border-radius: 30px !important;
+        padding: 4px 12px !important;
+        height: 28px;
+        display: inline-block;
+    }
+
+    .pretty {
+        font-size: 14px;
+    }
+
+    .form-group {
+        margin-bottom: 1rem;
+    }
+
+    .form-label {
+        color: #5d5d5d !important;
+        font-size: 12px;
+        font-weight: 600;
+    }
+
+    .btn.btn-danger {
+        background-color: #fa424a !important;
+        border-color: #fa424a !important;
+        color: #ffffff !important;
+    }
+
+    .row {
+        display: -ms-flexbox;
+        display: flex;
+        -ms-flex-wrap: wrap;
+        flex-wrap: wrap;
+        margin-right: -15px;
+        margin-left: -15px;
+    }
+
+    .form-control {
+        padding: 5px 0.75rem !important;
+    }
+</style>
+@section('main')
+<form class="modal-form" action="{{ url()->current() }}" method="POST">
+	{{ csrf_field() }}
+    <input type="hidden" name="id" value="{{$requirements->id}}">
+    <input  type="hidden" name="requirement_source" value="others"/>
+    <div class="box-typical" id="others" style="padding: 10px 15px 0px; margin: 10px 15px 15px; border-radius: .25rem;">
+        <div class="row">
+			<div class="col">
+				<span style="font-size: 13px; font-weight: 600; display: block; margin-bottom: 5px;">Add Document requirements</span>
+			</div>
+			 
+		</div>
+        <div class="others_div mt-2" style="border-top: 1px solid #e9f0f3;">
+            <div class="row">
+                 
+                <div class="col-md-6 form-group mt-2">
+                    <label class="form-label">Requirement</label>
+                    <textarea class="form-control requirement_title" name="requirement_title" rows="1">{{$requirements->requirement_title}}</textarea>
+                </div>
+                <div class="col-md-5 form-group mt-2">
+                    <label class="form-label">Requirement Type</label>
+                    <div class="d-flex">
+                        <div class="pretty p-default p-curve">
+                            <input class="need_upload" type="radio" name="need_upload" @if($requirements->need_upload==1) checked @endif value="1" />
+                            <div class="state p-primary-o">
+                                <label>
+                                    <small>Document</small>
+                                </label>
+                            </div>
+                        </div>
+                        <div class="pretty p-default p-curve">
+                            <input class="need_upload" type="radio" name="need_upload" @if($requirements->need_upload==0) checked @endif value="0" />
+                            <div class="state p-primary-o">
+                                <label>
+                                    <small>Information</small>
+                                </label>
+                            </div>
+                        </div>
+                    </div> 
+                </div>  
+            </div> 
+            </div>
+           
+    </div>
+
+    <div class="row">
+        <div class="col">
+            <button type="submit" class="btn btn-inline pull-right submit_button">
+                Save
+            </button>
+            {{-- <button type="button" class="btn btn-inline pull-right btn-submit cancel_btn_new" data-dismiss="modal">
+                Cancel
+            </button> --}}
+        </div>
+    </div>
+</form>
+
+   <script>
+    $(function(){
+        $('#modal_page_footer').hide(); 
+    });
+
+    </script>
+
+
+@endsection

+ 1 - 1
resources/views/modal_pages/teacher_invited.blade.php

@@ -24,7 +24,7 @@
     <div class="container" style="background-color: white; border-radius: 6px;">
         <div class="row">
             <div class="co-md-12 p-3">
-                <form class="ajax-form" action="{{ url()->current() }}" method="POST" enctype="multipart/form-data">
+                <form class="modal-form" action="{{ url()->current() }}" method="POST" enctype="multipart/form-data">
                 {{ csrf_field() }}
                 <input type="hidden" name="id" value="{{ $admin->id }}">
                     <div class="row">

+ 2 - 2
resources/views/modal_pages/view_apply_proposal.blade.php

@@ -21,7 +21,7 @@
                     <span class="text-muted" style="font-weight: 500; font-size: 10px;">{{cn($std_proposal,'teacher_details.others_department','')}}</span>
                 @endif 
                 <span> . </span>
-                <span class="text-muted" style="font-weight: 500; font-size: 10px;">{{cn($std_proposal,'teacher_details.university_name','')}} </span>
+                <span class="text-muted" style="font-weight: 500; font-size: 10px;">{{cn($std_proposal,'teacher_details.university.name','')}} </span>
             </div>
         </div>
 
@@ -37,7 +37,7 @@
                                     <div style="margin-top: -11px; display: block; font-size: 10px;">
                                         <span style="font-weight:400;">{{cn($std_proposal,'proposal.methology','')}}</span>
                                         <span>.</span>
-                                        <span style="font-weight:400;">{{cn($std_proposal,'proposal.department','')}}</span> 
+                                        <span style="font-weight:400;">{{cn($std_proposal,'proposal.department.name','')}}</span> 
                                         <span>.</span>  
                                         <span style="font-weight:400;">{{cn($std_proposal,'proposal.status','')}}</span> 
                                     </div>                                             

+ 94 - 16
resources/views/teacher/student_proposal_details.blade.php

@@ -172,12 +172,18 @@ h1, h2, h3, h4, h5, h6 {
     border-color: #2e1153!important;
     color: #fff!important;
     border-radius: 30px!important;
-    padding: 0 11px!important;
+    padding: 6px 11px!important;
     height: 28px!important;
     font-size: 14px!important;
     line-height: 1!important;
     font-weight: 600!important;
 }
+
+.submit_button:hover {
+    background-color: #fff;
+    border-color: #2e1153;
+    color: #2e1153;
+}
 .ad_pref_item_header {
     display: flex;
     background: #dedbf1;
@@ -1254,21 +1260,7 @@ element.style {
                                                                     </div><!--end teb pane-->
                                                         
                                                                     <div class="card border-0 tab-pane fade" id="doc" role="tabpanel" aria-labelledby="doc-info">
-                                                                        <div class="row align-items-center">
-                                                                            <div class="col-md-12 mt-2">
-                                                                                <div class="row">
-                                                                                    <div class="content_header mb-3">
-                                                                                        <div class="left">
-                                                                                            <i class="fa fa-list-ul"></i>
-                                                                                        </div>
-                                                                                        <div class="right" style="position: relative;">
-                                                                                            <span class="main_title">Document or Information Required</span>
-                                                                                            
-                                                                                        </div>
-                                                                                    </div>
-                                                                                </div>
-                                                                            </div><!--end col-->
-                                                                        </div><!--end row-->
+                                                                        <div id="doc_required_load"></div> 
                                                                     </div><!--end row-->   
                                                                 </div><!--end tab content-->
                                                             </div><!--end col-->
@@ -1339,8 +1331,36 @@ element.style {
       <script src="{{ asset('css/flatpickr/dist/flatpickr.min.js') }}"></script>
       <script src="{{ asset('css/wait-me/waitMe.min.js')}}"></script>
 
+      @include('web.layouts.modal')
+
       <script>
 
+        function fetch_sub_content(selector, url, args=null){
+
+        var config={
+        spinner: true
+        }
+
+        if(typeof args=='object'){
+        config=Object.assign(config, args);
+        }
+
+        if(config.spinner){
+
+        $(selector).waitMe({
+            effect: 'facebook',
+            text: 'Please! Wait ...'
+        });
+
+        }
+
+        $(selector).load(url, null, function(){
+        $(selector).waitMe('hide');
+        if(typeof args=='function') args();
+        });
+
+        }
+
         function wait_me(selector, config=null){
 
             if(config){
@@ -1380,6 +1400,59 @@ element.style {
 
         }
 
+        function ajax_form(form, cllback=null, config={spinner: true}){
+
+            $('.btn-submit').prop('disabled', true);
+            var redirect=$(form).data('redirect');
+
+            if(typeof config=='object'){
+
+            if(config.spinner) wait_me($(form));
+
+            }
+            
+            $(form).ajaxSubmit({
+            success:function(res){
+
+                wait_me($(form), 'hide');
+
+                if(res.msg){
+
+                pop_up_msg(res.msg, 'success', function(){
+
+                    $('.btn-submit').prop('disabled', false);
+
+                    if(redirect) window.location.replace(redirect);
+                    else if(typeof cllback=='function'){
+                    cllback(form, res);
+                    }
+
+                });
+
+                }
+
+                //$.notify(res.msg, 'success');
+            },
+            error:function(res){
+
+                wait_me($(form), 'hide');
+
+                var msg="Request failed to process, try again later.";
+
+                if(res.responseJSON && res.responseJSON.msg){
+                msg=res.responseJSON.msg;
+                }
+
+                pop_up_msg(msg, 'error');
+                $('.btn-submit').prop('disabled', false);
+
+            }
+
+            });
+
+        } //End of ajax form definition
+
+
 
         $(function(){
 
@@ -1522,6 +1595,11 @@ element.style {
 
                 }); 
             });
+
+            fetch_sub_content(
+                '#doc_required_load',
+                "{{ route('sub-content', ['name'=>'document_required_load', 'id'=>$proposal_details->id]) }}"
+            );
         
         });
       </script>

+ 1 - 1
resources/views/teacher_profile.blade.php

@@ -630,7 +630,7 @@ tbody, td, tfoot, th, thead, tr {
                                                     <a href="{{ url('teacher/student-proposal-details') }}/{{$row->id}}"><strong style="font-size:11px; color:black;">{{cn($row,'proposal.title','')}}</strong></a></br>
                                                     <span style="color:black;">{{cn($row,'proposal.methology','')}}</span>
                                                     <span>.</span>
-                                                    <span style="color:black;">{{cn($row,'proposal.department','')}}</span>
+                                                    <span style="color:black;">{{cn($row,'proposal.department.name','')}}</span>
                                                     <span>.</span>
                                                     <span style="color:black;">{{cn($row,'proposal.status','')}}</span>
                                                 </div>

+ 2 - 0
routes/web.php

@@ -132,5 +132,7 @@ Route::get(
     'sub-content/{name}', [App\Http\Controllers\Admin\SubContentController::class, 'get']
 )->name('sub-content');
 
+ 
+
 
 

+ 16 - 0
sql/update.sql

@@ -123,3 +123,19 @@ ALTER TABLE `users`
 
 ALTER TABLE `users`
 	ADD COLUMN `registered_at` DATETIME NULL DEFAULT NULL AFTER `is_test_score`;
+
+
+CREATE TABLE `requirements` (
+	`id` INT(11) NOT NULL AUTO_INCREMENT,
+	`std_proposal_id` INT(11) NULL DEFAULT NULL,
+	`requirement_title` VARCHAR(255) NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci',
+	`need_upload` TINYINT(4) NULL DEFAULT NULL,
+	`created_by` INT(11) NULL DEFAULT NULL,
+	`updated_by` INT(11) NULL DEFAULT NULL,
+	`created_at` TIMESTAMP NULL DEFAULT NULL,
+	`updated_at` TIMESTAMP NULL DEFAULT NULL,
+	PRIMARY KEY (`id`) USING BTREE
+)
+COLLATE='utf8mb4_general_ci'
+ENGINE=InnoDB
+;