Israat Zarin 1 year ago
parent
commit
f66c67470c

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

@@ -38,6 +38,16 @@ class AdminController extends Controller
                 'id','DESC'
             )->get();
 
+        $pending_student_list =User::where(
+            'user_type',1
+        )->where(
+            'sign_up',0
+        )->where(
+            'register_type',4
+        )->orderBy(
+            'id','DESC'
+        )->get();
+
         $register_student_list =User::where(
                 'user_type',1
             )->where(
@@ -89,6 +99,7 @@ class AdminController extends Controller
           'invited_registered_list'=>$invited_registered_list,
           'application'=>$application,
           'landing_wishlist'=>$landing_wishlist,
+          'pending_student_list'=>$pending_student_list,
           'admin'=>$admin
         ];
         return view('admin.admin_profile',$data);

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

@@ -596,12 +596,17 @@ class AjaxController extends Controller
 
         }elseif($name=="invitation_register_save"){
 
-            $validator=\Validator::make($req->all(), [
+            $new_rules=[
+                'others_department'=>'required',
+            ];
+
+            $validator=\Validator::make($req->all(),$new_rules, [
                 'first_name'=>'required',
                 'last_name'=>'required',
                 'email'=>'required',
                 'university'=>'required',
-                'others_department'=>'required',
+                'others_department.required'=>'Department field is required.',
+                'website'=>'required',
                 'designation'=>'required',
                 'password_confirmation'=>'required',
                 'password'=>[

+ 1 - 1
app/Http/Controllers/Auth/LoginController.php

@@ -64,7 +64,7 @@ class LoginController extends Controller
             return redirect('/login')->with('error','Unknown Email address!');
         }else{
             if($student->email_verification == 0){
-                return redirect('/login')->with('error', 'Account is not verified!. Please check your email.');
+                return redirect('/login')->with('error', 'Your e-mail is not verified!. Please check your email.');
             }else{
                 $credentials = [
                     'email' => $request->email,

+ 1 - 1
app/Http/Controllers/Auth/RegisterController.php

@@ -146,7 +146,7 @@ class RegisterController extends Controller
         $data->email_verified_at=now();
         $data->status=1;
         $data->update(); 
-        return Redirect('/login')->with('success','Your mail is activated successfully. Login here ');
+        return Redirect('/login')->with('success','Your e-mail has been verified successfully. Please login to your account');
         
      }
 }

+ 36 - 6
app/Http/Controllers/ModalController.php

@@ -21,6 +21,7 @@ use DB;
 use Session;
 use Auth;
 use Mail;
+Use Carbon\Carbon;
 
 class ModalController extends Controller{
 
@@ -153,7 +154,13 @@ class ModalController extends Controller{
                 return response(['msg'=>'Application you have submitted that are approved'],403);
             }
 
-           
+            $currentYear = date('Y');
+            $currentMonth = date('m');
+            $selectedMonth =$req->startmonth;
+
+            if($currentYear ==$req->startdate && $currentMonth >= $selectedMonth){ 
+                return response(['msg'=>'Current or previous month is not supported'],403);
+            } 
 
             $student_proposal =new StudentProposal;
             $student_proposal->student_id =$req->student_id;
@@ -161,6 +168,7 @@ class ModalController extends Controller{
             $student_proposal->proposal_id =$req->proposal_id;
             $student_proposal->start_year =$req->startdate;
             $student_proposal->start_month =$req->startmonth;
+            $student_proposal->preferred_start_date =$req->startdate.'-'.$req->startmonth.'-'.'01'; 
             $student_proposal->student_apply_ref =studentRefNoGenerate();
             $student_proposal->proposal_submit_status = 1;
             $student_proposal->submitted_date = now();
@@ -216,7 +224,7 @@ class ModalController extends Controller{
 
             return response(['msg'=>'Proposal send successfully.']);
 
-        }elseif($name=="update_student_proposal"){
+        }elseif($name=="update_student_proposal"){  
 
             $new_rules=[
                 'proposal_id'=>'required',
@@ -247,7 +255,7 @@ class ModalController extends Controller{
             )->exists();
 
             if($approved_proposal){
-                return response(['msg'=>'Application you have submitted that are approved'],403);
+                return response(['msg'=>'Already Selected proposal has been submitted'],403);
             }
 
             $awaiting = StudentProposal::where(
@@ -266,10 +274,20 @@ class ModalController extends Controller{
                 return response(['msg'=>'Application you have submitted that are currently awaiting decisions'],403);
             }
 
+            $currentYear = date('Y');
+            $currentMonth = date('m');
+            $selectedMonth =$req->startmonth;
+
+            if($currentYear ==$req->startdate && $currentMonth >= $selectedMonth){ 
+                return response(['msg'=>'Current or previous month is not supported'],403);
+            } 
+
+
             $student_proposal =StudentProposal::find($req->id);
             $student_proposal->proposal_id =$req->proposal_id;
             $student_proposal->start_year =$req->startdate;
             $student_proposal->start_month =$req->startmonth;
+            $student_proposal->preferred_start_date =$req->startdate.'-'.$req->startmonth.'-'.'01'; 
             $student_proposal->student_apply_ref =studentRefNoGenerate();
             $student_proposal->proposal_submit_status = 1;
             $student_proposal->submitted_date = now();
@@ -385,7 +403,19 @@ class ModalController extends Controller{
                 $refer->teacher_id =$teacher->id;
                 $refer->save();
 
-                $user_notify =User::where('email',$req->email)->where('user_type',1)->first();
+                $teacher =User::where('email',$req->email)->where('user_type',1)->first();
+
+                if($teacher->others_department){
+                    $department =$teacher->others_department;
+                }else{
+                    $department = cn($teacher,'department_name.name','');
+                }
+
+                if($teacher->university_name){
+                    $university =$teacher->university_name;
+                }else{
+                    $university = cn($teacher,'university.name','');
+                }
 
                 $data['name'] = $refer->name;
                 $data['teacher_id'] = $refer->teacher_id;
@@ -394,8 +424,8 @@ class ModalController extends Controller{
                 $data['teacher'] = $teacher->first_name.' '.$teacher->last_name;
                 $data['arn'] = $teacher->ref_no;
                 $data['designation'] = $teacher->designation;
-                $data['department'] = $teacher->others_department;
-                $data['university'] = $teacher->university_name;
+                $data['department'] = $department;
+                $data['university'] =  $university;
                 $data['receive_email']=$refer->email;
                 $user_mail = $refer->email;
                 $from = 'asraful@revinr.com';

+ 68 - 15
app/Http/Controllers/TeacherHomeController.php

@@ -12,20 +12,21 @@ use App\Models\Requirement;
 use App\Institution;
 use App\Workexperience;
 use Auth;
+use Input;
 
 class TeacherHomeController extends Controller
 {
     public function __construct()
    {
        $this->middleware('teacher');
-   } 
+   }
     public function teacher_profile(Request $request)
-    {   $user = Auth::guard('teacher')->user(); 
+    {   $user = Auth::guard('teacher')->user();
         $students = StudentProposal::where(
             'teacher_id',$user->id
         )->where(
             'proposal_submit_status',1
-        )->get(); 
+        )->get();
         $departments =Department::where('status',1)->orderBy('name','ASC')->get();
        // $refer_users =ReferUser::where('teacher_id',$user->id)->orderBy('id','DESC')->get();
         $refer_users =User::where(
@@ -33,7 +34,7 @@ class TeacherHomeController extends Controller
         )->whereIn(
             'register_type',[3,4] // 3=q_form; 4= wishlist
         )->orderBy('id','DESC')->get();
-        
+
         $universities =University::orderBy('name','ASC')->get();
         return view('teacher_profile',compact('students','user','departments','refer_users','universities'));
     }
@@ -47,26 +48,78 @@ class TeacherHomeController extends Controller
 
         $experience =Workexperience::where(
             'student_id',$proposal_details->student_id
-        )->get(); 
+        )->get();
 
-        if(isset($experience)){ 
-            $work_experince =[]; 
-            foreach($experience as $key=>$row){ 
+        if(isset($experience)){
+            $work_experince =[];
+            foreach($experience as $key=>$row){
                 array_push($work_experince,$row->start_date);
-                array_push($work_experince,$row->end_date); 
-            } 
+                array_push($work_experince,$row->end_date);
+            }
 
-            $start_date = current($work_experince); 
-            $end_date = end($work_experince);   
-        } 
+            $start_date = current($work_experince);
+            $end_date = end($work_experince);
+        }
 
         $doc_info =Requirement::where(
             'std_proposal_id',$proposal_details->id
         )->get();
-        
+
         return view('teacher.student_proposal_details',compact('proposal_details','education_history','start_date','end_date','doc_info'));
     }
 
-    
 
+    public function search()
+    {
+        $input = Input::all();
+        $request = (object) $input;
+        $carbon=new \Carbon\Carbon;
+        $teacher = Auth::guard('teacher')->user();
+
+        $students = StudentProposal::where(
+            'proposal_submit_status',1
+        )->where(
+            'teacher_id',$teacher->id
+        )->orderBy('id','desc');
+
+        if ($request->apply_ref) {
+            $students->where('student_apply_ref',$request->apply_ref);
+        }
+
+        if (isset($input['proposal_status'])) {
+            $students->where('proposal_status',$input['proposal_status']);
+        }
+
+        if($request->submitted_date){
+            $date_array = explode("to",$request->submitted_date); 
+
+            $from_date = date('d-m-Y', strtotime($date_array[0]));
+            $to_date = date('d-m-Y', strtotime($date_array[1])); 
+
+            $start_date=$carbon->parse($from_date)->toDateString();
+            $end_date=$carbon->parse($to_date)->toDateString();
+             
+
+            $students->whereRaw("DATE(submitted_date) >= ? AND DATE(submitted_date) <= ?", [$start_date, $end_date]);
+        }
+
+        if($request->preffered_start_date){
+            $date_array = explode("to",$request->preffered_start_date);
+
+            $from_month_year = date('m-Y', strtotime($date_array[0])); //01-06-2023
+            $to_month_year = date('m-Y', strtotime($date_array[1]));//31-07-2023
+            
+            $start_date=$carbon->parse('01-'.$from_month_year)->toDateString();
+            $end_date=$carbon->parse('01-'.$to_month_year)->toDateString();
+
+            $students->whereRaw("DATE(preferred_start_date) >= ? AND DATE(preferred_start_date) <= ?", [$start_date, $end_date]);
+        }
+
+        $data=[
+            'students' => $students->get(),
+            'user'=> Auth::guard('teacher')->user(),
+        ];
+
+        return view('teacher.load_application',$data);
+    }
 }

+ 92 - 100
composer.lock

@@ -710,21 +710,21 @@
         },
         {
             "name": "guzzlehttp/guzzle",
-            "version": "7.5.1",
+            "version": "7.7.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/guzzle/guzzle.git",
-                "reference": "b964ca597e86b752cd994f27293e9fa6b6a95ed9"
+                "reference": "fb7566caccf22d74d1ab270de3551f72a58399f5"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/guzzle/guzzle/zipball/b964ca597e86b752cd994f27293e9fa6b6a95ed9",
-                "reference": "b964ca597e86b752cd994f27293e9fa6b6a95ed9",
+                "url": "https://api.github.com/repos/guzzle/guzzle/zipball/fb7566caccf22d74d1ab270de3551f72a58399f5",
+                "reference": "fb7566caccf22d74d1ab270de3551f72a58399f5",
                 "shasum": ""
             },
             "require": {
                 "ext-json": "*",
-                "guzzlehttp/promises": "^1.5",
+                "guzzlehttp/promises": "^1.5.3 || ^2.0",
                 "guzzlehttp/psr7": "^1.9.1 || ^2.4.5",
                 "php": "^7.2.5 || ^8.0",
                 "psr/http-client": "^1.0",
@@ -736,7 +736,8 @@
             "require-dev": {
                 "bamarni/composer-bin-plugin": "^1.8.1",
                 "ext-curl": "*",
-                "php-http/client-integration-tests": "^3.0",
+                "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999",
+                "php-http/message-factory": "^1.1",
                 "phpunit/phpunit": "^8.5.29 || ^9.5.23",
                 "psr/log": "^1.1 || ^2.0 || ^3.0"
             },
@@ -750,9 +751,6 @@
                 "bamarni-bin": {
                     "bin-links": true,
                     "forward-command": false
-                },
-                "branch-alias": {
-                    "dev-master": "7.5-dev"
                 }
             },
             "autoload": {
@@ -818,7 +816,7 @@
             ],
             "support": {
                 "issues": "https://github.com/guzzle/guzzle/issues",
-                "source": "https://github.com/guzzle/guzzle/tree/7.5.1"
+                "source": "https://github.com/guzzle/guzzle/tree/7.7.0"
             },
             "funding": [
                 {
@@ -834,20 +832,20 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2023-04-17T16:30:08+00:00"
+            "time": "2023-05-21T14:04:53+00:00"
         },
         {
             "name": "guzzlehttp/promises",
-            "version": "1.5.2",
+            "version": "1.5.3",
             "source": {
                 "type": "git",
                 "url": "https://github.com/guzzle/promises.git",
-                "reference": "b94b2807d85443f9719887892882d0329d1e2598"
+                "reference": "67ab6e18aaa14d753cc148911d273f6e6cb6721e"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/guzzle/promises/zipball/b94b2807d85443f9719887892882d0329d1e2598",
-                "reference": "b94b2807d85443f9719887892882d0329d1e2598",
+                "url": "https://api.github.com/repos/guzzle/promises/zipball/67ab6e18aaa14d753cc148911d273f6e6cb6721e",
+                "reference": "67ab6e18aaa14d753cc148911d273f6e6cb6721e",
                 "shasum": ""
             },
             "require": {
@@ -857,11 +855,6 @@
                 "symfony/phpunit-bridge": "^4.4 || ^5.1"
             },
             "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "1.5-dev"
-                }
-            },
             "autoload": {
                 "files": [
                     "src/functions_include.php"
@@ -902,7 +895,7 @@
             ],
             "support": {
                 "issues": "https://github.com/guzzle/promises/issues",
-                "source": "https://github.com/guzzle/promises/tree/1.5.2"
+                "source": "https://github.com/guzzle/promises/tree/1.5.3"
             },
             "funding": [
                 {
@@ -918,7 +911,7 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2022-08-28T14:55:35+00:00"
+            "time": "2023-05-21T12:31:43+00:00"
         },
         {
             "name": "guzzlehttp/psr7",
@@ -1937,16 +1930,16 @@
         },
         {
             "name": "nesbot/carbon",
-            "version": "2.66.0",
+            "version": "2.67.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/briannesbitt/Carbon.git",
-                "reference": "496712849902241f04902033b0441b269effe001"
+                "reference": "c1001b3bc75039b07f38a79db5237c4c529e04c8"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/496712849902241f04902033b0441b269effe001",
-                "reference": "496712849902241f04902033b0441b269effe001",
+                "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/c1001b3bc75039b07f38a79db5237c4c529e04c8",
+                "reference": "c1001b3bc75039b07f38a79db5237c4c529e04c8",
                 "shasum": ""
             },
             "require": {
@@ -2035,20 +2028,20 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2023-01-29T18:53:47+00:00"
+            "time": "2023-05-25T22:09:47+00:00"
         },
         {
             "name": "nikic/php-parser",
-            "version": "v4.15.4",
+            "version": "v4.15.5",
             "source": {
                 "type": "git",
                 "url": "https://github.com/nikic/PHP-Parser.git",
-                "reference": "6bb5176bc4af8bcb7d926f88718db9b96a2d4290"
+                "reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/6bb5176bc4af8bcb7d926f88718db9b96a2d4290",
-                "reference": "6bb5176bc4af8bcb7d926f88718db9b96a2d4290",
+                "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/11e2663a5bc9db5d714eedb4277ee300403b4a9e",
+                "reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e",
                 "shasum": ""
             },
             "require": {
@@ -2089,9 +2082,9 @@
             ],
             "support": {
                 "issues": "https://github.com/nikic/PHP-Parser/issues",
-                "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.4"
+                "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.5"
             },
-            "time": "2023-03-05T19:49:14+00:00"
+            "time": "2023-05-19T20:20:00+00:00"
         },
         {
             "name": "opis/closure",
@@ -2594,16 +2587,16 @@
         },
         {
             "name": "psy/psysh",
-            "version": "v0.11.16",
+            "version": "v0.11.18",
             "source": {
                 "type": "git",
                 "url": "https://github.com/bobthecow/psysh.git",
-                "reference": "151b145906804eea8e5d71fea23bfb470c904bfb"
+                "reference": "4f00ee9e236fa6a48f4560d1300b9c961a70a7ec"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/bobthecow/psysh/zipball/151b145906804eea8e5d71fea23bfb470c904bfb",
-                "reference": "151b145906804eea8e5d71fea23bfb470c904bfb",
+                "url": "https://api.github.com/repos/bobthecow/psysh/zipball/4f00ee9e236fa6a48f4560d1300b9c961a70a7ec",
+                "reference": "4f00ee9e236fa6a48f4560d1300b9c961a70a7ec",
                 "shasum": ""
             },
             "require": {
@@ -2664,9 +2657,9 @@
             ],
             "support": {
                 "issues": "https://github.com/bobthecow/psysh/issues",
-                "source": "https://github.com/bobthecow/psysh/tree/v0.11.16"
+                "source": "https://github.com/bobthecow/psysh/tree/v0.11.18"
             },
-            "time": "2023-04-26T12:53:57+00:00"
+            "time": "2023-05-23T02:31:11+00:00"
         },
         {
             "name": "ralouphie/getallheaders",
@@ -2978,16 +2971,16 @@
         },
         {
             "name": "symfony/console",
-            "version": "v5.4.23",
+            "version": "v5.4.24",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/console.git",
-                "reference": "90f21e27d0d88ce38720556dd164d4a1e4c3934c"
+                "reference": "560fc3ed7a43e6d30ea94a07d77f9a60b8ed0fb8"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/console/zipball/90f21e27d0d88ce38720556dd164d4a1e4c3934c",
-                "reference": "90f21e27d0d88ce38720556dd164d4a1e4c3934c",
+                "url": "https://api.github.com/repos/symfony/console/zipball/560fc3ed7a43e6d30ea94a07d77f9a60b8ed0fb8",
+                "reference": "560fc3ed7a43e6d30ea94a07d77f9a60b8ed0fb8",
                 "shasum": ""
             },
             "require": {
@@ -3057,7 +3050,7 @@
                 "terminal"
             ],
             "support": {
-                "source": "https://github.com/symfony/console/tree/v5.4.23"
+                "source": "https://github.com/symfony/console/tree/v5.4.24"
             },
             "funding": [
                 {
@@ -3073,7 +3066,7 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2023-04-24T18:47:29+00:00"
+            "time": "2023-05-26T05:13:16+00:00"
         },
         {
             "name": "symfony/css-selector",
@@ -3210,16 +3203,16 @@
         },
         {
             "name": "symfony/error-handler",
-            "version": "v5.4.23",
+            "version": "v5.4.24",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/error-handler.git",
-                "reference": "218206b4772d9f412d7d277980c020d06e9d8a4e"
+                "reference": "c1b9be3b8a6f60f720bec28c4ffb6fb5b00a8946"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/error-handler/zipball/218206b4772d9f412d7d277980c020d06e9d8a4e",
-                "reference": "218206b4772d9f412d7d277980c020d06e9d8a4e",
+                "url": "https://api.github.com/repos/symfony/error-handler/zipball/c1b9be3b8a6f60f720bec28c4ffb6fb5b00a8946",
+                "reference": "c1b9be3b8a6f60f720bec28c4ffb6fb5b00a8946",
                 "shasum": ""
             },
             "require": {
@@ -3261,7 +3254,7 @@
             "description": "Provides tools to manage errors and ease debugging PHP code",
             "homepage": "https://symfony.com",
             "support": {
-                "source": "https://github.com/symfony/error-handler/tree/v5.4.23"
+                "source": "https://github.com/symfony/error-handler/tree/v5.4.24"
             },
             "funding": [
                 {
@@ -3277,7 +3270,7 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2023-04-17T10:03:27+00:00"
+            "time": "2023-05-02T16:13:31+00:00"
         },
         {
             "name": "symfony/event-dispatcher",
@@ -3508,16 +3501,16 @@
         },
         {
             "name": "symfony/http-foundation",
-            "version": "v5.4.23",
+            "version": "v5.4.24",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/http-foundation.git",
-                "reference": "af9fbb378f5f956c8f29d4886644c84c193780ac"
+                "reference": "3c59f97f6249ce552a44f01b93bfcbd786a954f5"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/http-foundation/zipball/af9fbb378f5f956c8f29d4886644c84c193780ac",
-                "reference": "af9fbb378f5f956c8f29d4886644c84c193780ac",
+                "url": "https://api.github.com/repos/symfony/http-foundation/zipball/3c59f97f6249ce552a44f01b93bfcbd786a954f5",
+                "reference": "3c59f97f6249ce552a44f01b93bfcbd786a954f5",
                 "shasum": ""
             },
             "require": {
@@ -3564,7 +3557,7 @@
             "description": "Defines an object-oriented layer for the HTTP specification",
             "homepage": "https://symfony.com",
             "support": {
-                "source": "https://github.com/symfony/http-foundation/tree/v5.4.23"
+                "source": "https://github.com/symfony/http-foundation/tree/v5.4.24"
             },
             "funding": [
                 {
@@ -3580,20 +3573,20 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2023-04-18T06:30:11+00:00"
+            "time": "2023-05-19T07:21:23+00:00"
         },
         {
             "name": "symfony/http-kernel",
-            "version": "v5.4.23",
+            "version": "v5.4.24",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/http-kernel.git",
-                "reference": "48ea17a7c65ef1ede0c3b2dbc35adace99071810"
+                "reference": "f38b722e1557eb3f487d351b48f5a1279b50e9d1"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/http-kernel/zipball/48ea17a7c65ef1ede0c3b2dbc35adace99071810",
-                "reference": "48ea17a7c65ef1ede0c3b2dbc35adace99071810",
+                "url": "https://api.github.com/repos/symfony/http-kernel/zipball/f38b722e1557eb3f487d351b48f5a1279b50e9d1",
+                "reference": "f38b722e1557eb3f487d351b48f5a1279b50e9d1",
                 "shasum": ""
             },
             "require": {
@@ -3676,7 +3669,7 @@
             "description": "Provides a structured process for converting a Request into a Response",
             "homepage": "https://symfony.com",
             "support": {
-                "source": "https://github.com/symfony/http-kernel/tree/v5.4.23"
+                "source": "https://github.com/symfony/http-kernel/tree/v5.4.24"
             },
             "funding": [
                 {
@@ -3692,7 +3685,7 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2023-04-28T13:29:52+00:00"
+            "time": "2023-05-27T08:06:30+00:00"
         },
         {
             "name": "symfony/mime",
@@ -4597,16 +4590,16 @@
         },
         {
             "name": "symfony/process",
-            "version": "v5.4.23",
+            "version": "v5.4.24",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/process.git",
-                "reference": "4b842fc4b61609e0a155a114082bd94e31e98287"
+                "reference": "e3c46cc5689c8782944274bb30702106ecbe3b64"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/process/zipball/4b842fc4b61609e0a155a114082bd94e31e98287",
-                "reference": "4b842fc4b61609e0a155a114082bd94e31e98287",
+                "url": "https://api.github.com/repos/symfony/process/zipball/e3c46cc5689c8782944274bb30702106ecbe3b64",
+                "reference": "e3c46cc5689c8782944274bb30702106ecbe3b64",
                 "shasum": ""
             },
             "require": {
@@ -4639,7 +4632,7 @@
             "description": "Executes commands in sub-processes",
             "homepage": "https://symfony.com",
             "support": {
-                "source": "https://github.com/symfony/process/tree/v5.4.23"
+                "source": "https://github.com/symfony/process/tree/v5.4.24"
             },
             "funding": [
                 {
@@ -4655,7 +4648,7 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2023-04-18T13:50:24+00:00"
+            "time": "2023-05-17T11:26:05+00:00"
         },
         {
             "name": "symfony/routing",
@@ -4918,16 +4911,16 @@
         },
         {
             "name": "symfony/translation",
-            "version": "v5.4.22",
+            "version": "v5.4.24",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/translation.git",
-                "reference": "9a401392f01bc385aa42760eff481d213a0cc2ba"
+                "reference": "de237e59c5833422342be67402d487fbf50334ff"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/translation/zipball/9a401392f01bc385aa42760eff481d213a0cc2ba",
-                "reference": "9a401392f01bc385aa42760eff481d213a0cc2ba",
+                "url": "https://api.github.com/repos/symfony/translation/zipball/de237e59c5833422342be67402d487fbf50334ff",
+                "reference": "de237e59c5833422342be67402d487fbf50334ff",
                 "shasum": ""
             },
             "require": {
@@ -4995,7 +4988,7 @@
             "description": "Provides tools to internationalize your application",
             "homepage": "https://symfony.com",
             "support": {
-                "source": "https://github.com/symfony/translation/tree/v5.4.22"
+                "source": "https://github.com/symfony/translation/tree/v5.4.24"
             },
             "funding": [
                 {
@@ -5011,7 +5004,7 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2023-03-27T16:07:23+00:00"
+            "time": "2023-05-19T12:34:17+00:00"
         },
         {
             "name": "symfony/translation-contracts",
@@ -5093,16 +5086,16 @@
         },
         {
             "name": "symfony/var-dumper",
-            "version": "v5.4.23",
+            "version": "v5.4.24",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/var-dumper.git",
-                "reference": "9a8a5b6d6508928174ded2109e29328a55342a42"
+                "reference": "8e12706bf9c68a2da633f23bfdc15b4dce5970b3"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/var-dumper/zipball/9a8a5b6d6508928174ded2109e29328a55342a42",
-                "reference": "9a8a5b6d6508928174ded2109e29328a55342a42",
+                "url": "https://api.github.com/repos/symfony/var-dumper/zipball/8e12706bf9c68a2da633f23bfdc15b4dce5970b3",
+                "reference": "8e12706bf9c68a2da633f23bfdc15b4dce5970b3",
                 "shasum": ""
             },
             "require": {
@@ -5111,7 +5104,6 @@
                 "symfony/polyfill-php80": "^1.16"
             },
             "conflict": {
-                "phpunit/phpunit": "<5.4.3",
                 "symfony/console": "<4.4"
             },
             "require-dev": {
@@ -5162,7 +5154,7 @@
                 "dump"
             ],
             "support": {
-                "source": "https://github.com/symfony/var-dumper/tree/v5.4.23"
+                "source": "https://github.com/symfony/var-dumper/tree/v5.4.24"
             },
             "funding": [
                 {
@@ -5178,7 +5170,7 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2023-04-18T09:26:27+00:00"
+            "time": "2023-05-25T13:05:00+00:00"
         },
         {
             "name": "tijsverkoyen/css-to-inline-styles",
@@ -5659,16 +5651,16 @@
         },
         {
             "name": "fakerphp/faker",
-            "version": "v1.21.0",
+            "version": "v1.22.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/FakerPHP/Faker.git",
-                "reference": "92efad6a967f0b79c499705c69b662f738cc9e4d"
+                "reference": "f85772abd508bd04e20bb4b1bbe260a68d0066d2"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/92efad6a967f0b79c499705c69b662f738cc9e4d",
-                "reference": "92efad6a967f0b79c499705c69b662f738cc9e4d",
+                "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/f85772abd508bd04e20bb4b1bbe260a68d0066d2",
+                "reference": "f85772abd508bd04e20bb4b1bbe260a68d0066d2",
                 "shasum": ""
             },
             "require": {
@@ -5721,9 +5713,9 @@
             ],
             "support": {
                 "issues": "https://github.com/FakerPHP/Faker/issues",
-                "source": "https://github.com/FakerPHP/Faker/tree/v1.21.0"
+                "source": "https://github.com/FakerPHP/Faker/tree/v1.22.0"
             },
-            "time": "2022-12-13T13:54:32+00:00"
+            "time": "2023-05-14T12:31:37+00:00"
         },
         {
             "name": "filp/whoops",
@@ -6497,16 +6489,16 @@
         },
         {
             "name": "phpunit/phpunit",
-            "version": "9.6.7",
+            "version": "9.6.8",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/phpunit.git",
-                "reference": "c993f0d3b0489ffc42ee2fe0bd645af1538a63b2"
+                "reference": "17d621b3aff84d0c8b62539e269e87d8d5baa76e"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c993f0d3b0489ffc42ee2fe0bd645af1538a63b2",
-                "reference": "c993f0d3b0489ffc42ee2fe0bd645af1538a63b2",
+                "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/17d621b3aff84d0c8b62539e269e87d8d5baa76e",
+                "reference": "17d621b3aff84d0c8b62539e269e87d8d5baa76e",
                 "shasum": ""
             },
             "require": {
@@ -6580,7 +6572,7 @@
             "support": {
                 "issues": "https://github.com/sebastianbergmann/phpunit/issues",
                 "security": "https://github.com/sebastianbergmann/phpunit/security/policy",
-                "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.7"
+                "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.8"
             },
             "funding": [
                 {
@@ -6596,7 +6588,7 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2023-04-14T08:58:40+00:00"
+            "time": "2023-05-11T05:14:45+00:00"
         },
         {
             "name": "sebastian/cli-parser",
@@ -6898,16 +6890,16 @@
         },
         {
             "name": "sebastian/diff",
-            "version": "4.0.4",
+            "version": "4.0.5",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/diff.git",
-                "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d"
+                "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d",
-                "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d",
+                "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/74be17022044ebaaecfdf0c5cd504fc9cd5a7131",
+                "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131",
                 "shasum": ""
             },
             "require": {
@@ -6952,7 +6944,7 @@
             ],
             "support": {
                 "issues": "https://github.com/sebastianbergmann/diff/issues",
-                "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4"
+                "source": "https://github.com/sebastianbergmann/diff/tree/4.0.5"
             },
             "funding": [
                 {
@@ -6960,7 +6952,7 @@
                     "type": "github"
                 }
             ],
-            "time": "2020-10-26T13:10:38+00:00"
+            "time": "2023-05-07T05:35:17+00:00"
         },
         {
             "name": "sebastian/environment",

+ 2 - 0
config/app.php

@@ -226,6 +226,8 @@ return [
         'URL' => Illuminate\Support\Facades\URL::class,
         'Validator' => Illuminate\Support\Facades\Validator::class,
         'View' => Illuminate\Support\Facades\View::class,
+        'Input' => Illuminate\Support\Facades\Input::class,
+        'Input' => Illuminate\Support\Facades\Request::class,
 
     ],
 

BIN
public/uploads/proposal/1685870399documentfile_.pdf


+ 78 - 7
resources/views/admin/admin_profile.blade.php

@@ -621,7 +621,12 @@ tbody, td, tfoot, th, thead, tr {
                                 <div class="col-md-12 mb-4" style="padding: 0px; margin-top: -2.4rem; ">
                                     <ul class="nav nav-pills flex-column flex-sm-row d-md-inline-flex nav-justified mb-0 rounded-top position-relative overflow-hidden" id="pills-tab" role="tablist">
                                         <li class="nav-item m-1 ms-2 tech">
-                                            <a class="nav-link  active rounded" id="student-register" data-bs-toggle="pill" href="#registers" role="tab" aria-controls="registers" aria-selected="false" style="width:114px;">
+                                            <a class="nav-link  active rounded" id="student-pending" data-bs-toggle="pill" href="#student_pending" role="tab" aria-controls="student_pending" aria-selected="false" style="width:114px;">
+                                                Pending
+                                            </a>
+                                        </li>
+                                        <li class="nav-item m-1 ms-2 tech">
+                                            <a class="nav-link  rounded" id="student-register" data-bs-toggle="pill" href="#registers" role="tab" aria-controls="registers" aria-selected="false" style="width:114px;">
                                                 Registered
                                             </a>
                                         </li>
@@ -638,7 +643,73 @@ tbody, td, tfoot, th, thead, tr {
 
                                             <div class="row">
                                                 <div class="tab-content" id="pills-tabContent">
-                                                    <div class="card border-0 tab-pane fade show active" id="registers" role="tabpanel" aria-labelledby="student-register">
+
+                                                    <div class="card border-0 tab-pane fade show active" id="student_pending" role="tabpanel" aria-labelledby="student-pending">
+                                                        <div class="row align-items-center">
+                                                            <div class="col-md-12">
+                                                                <div class="table-responsive">
+                                                                    <table class="table table-bordered list_table" style="margin: 0px;">
+                                                                        <thead>
+                                                                            <tr>
+                                                                                <th>Sl</th>
+                                                                                <th>Name</th>
+                                                                                <th>Email</th>
+                                                                                {{-- <th>Signed Up</th>
+                                                                                <th class="text-center">Application</th> --}}
+                                                                                <th class="text-center" style="width: 12%;">Action</th>
+                                                                            </tr>
+                                                                        </thead>
+                                                                        <tbody>
+                                                                            @if(count($pending_student_list) > 0)
+                                                                                @foreach($pending_student_list as $key=>$row)
+                                                                                    <tr>
+                                                                                        <td style="font-size: 11px;">{{++$key}}</td>
+                                                                                        <td style="font-size: 11px;">
+                                                                                            <div class="scrolled_content_part">
+                                                                                                <div class="single_ad_pref_item">
+                                                                                                    <div class="left" style="width:50%;">
+                                                                                                        <div class="uni_details" style="display:flex;"> 
+                                                                                                            {{-- @if($row->nationality)
+                                                                                                                <img class="img-responsive listFlag" style="border-radius: 20px; padding: 0px;height: 35px;width: 35px;" src="{{ asset('/assets/img/flags/4x3').'/'.strtolower(cn($row,'country_name.iso_3166_2','')).'.svg' }}" alt="Flag" data-toggle="tooltip" title="" data-placement="top">
+                                                                                                            @endif --}}
+                                                                                                            <div class="inner_right ms-2 mt-1">
+                                                                                                                <strong style="font-size:13px;">{{$row->first_name}} {{$row->last_name }}</strong></br>
+                                                                                                                @if(!empty($row->invitation_date)){{utc_to_ltz($row->invitation_date, 'd M Y g:i A', local_tz($admin))}} @else @endif
+                                                                                                            </div>
+                                                                                                        </div>
+                                                                                                    </div>
+                                                                                                </div>
+                                                                                            </div>
+                                                                                        </td>
+                                                                                        <td style="font-size: 11px;">{{$row->email}}
+                                                                                            <div class="mt-1">
+                                                                                                {{-- @if($row->email_verification ==1)
+                                                                                                    <span class="label_badge_radius" style="background-color: #d8fdd8; color: green;">verified</span>
+                                                                                                @else
+                                                                                                <span class="label_badge_radius" style="background-color: #f9edc7; color: rgb(228, 139, 38);">pending</span>
+                                                                                                @endif --}}
+                                                                                            </div> 
+                                                                                        </td>
+                                                                                       
+                                                                                    </tr>
+                                                                                @endforeach
+                                                                            @else
+                                                                            <tr>
+                                                                                <td colspan="6" class="text-center">
+                                                                                    <span class="text-danger">No data found!</span>
+                                                                                </td>
+                                                                            </tr>
+                                                                            @endif
+                                                                        </tbody>
+                                                                    </table>
+                                                                    <div class="text-center mt-1" id="pagination">
+                                                                        {{-- {{ $register_student_list->appends(request()->all())->links('pagination::bootstrap-4') }} --}}
+                                                                    </div>
+                                                                </div>
+                                                            </div>
+                                                        </div>
+                                                    </div>
+                                                    <div class="card border-0 tab-pane fade show" id="registers" role="tabpanel" aria-labelledby="student-register">
                                                         <div class="row align-items-center">
                                                             <div class="col-md-12">
                                                                 <div class="table-responsive">
@@ -692,7 +763,7 @@ tbody, td, tfoot, th, thead, tr {
                                                                                                 @endif
                                                                                             </div> 
                                                                                         </td>
-                                                                                        <td style="font-size: 11px;">@if(!empty($row->registered_date)){{date('d M Y h:i A', strtotime($row->registered_date))}} @else @endif</td>
+                                                                                        <td style="font-size: 11px;">@if(!empty($row->registered_date)){{utc_to_ltz($row->registered_date, 'd M Y g:i A', local_tz($admin))}} @else @endif</td>
                                                                                         <td style="font-size: 11px; text-align:center;">
                                                                                             @php
                                                                                                $total_draft =\DB::table(
@@ -1005,8 +1076,8 @@ tbody, td, tfoot, th, thead, tr {
                                                                                                 </div>
                                                                                             </div>
                                                                                         </td>
-                                                                                        <td class="text-center" style="font-size: 11px;">@if(!empty($row->invitation_date)) {{ date('d M Y H:i:A', strtotime($row->invitation_date)) }} @else -- @endif</td>
-                                                                                        <td class="text-center" style="font-size: 11px;">@if(!empty($row->registered_date)) {{ date('d M Y H:i:A', strtotime($row->registered_date)) }} @else -- @endif</td>
+                                                                                        <td class="text-center" style="font-size: 11px;">@if(!empty($row->invitation_date)) {{utc_to_ltz($row->invitation_date, 'd M Y g:i A', local_tz($admin))}} @else -- @endif</td>
+                                                                                        <td class="text-center" style="font-size: 11px;">@if(!empty($row->registered_date)) {{utc_to_ltz($row->registered_date, 'd M Y g:i A', local_tz($admin))}} @else -- @endif</td>
                                                                                         <td class="text-center" style="font-size: 11px;">
                                                                                             <span class="invitation hand tooltips" data-id="{{ $row->id }}" data-email="{{$row->email}}" title="Sent Invitation"><i class="fa fa-paper-plane"></i></span>
                                                                                         </td>
@@ -1050,8 +1121,8 @@ tbody, td, tfoot, th, thead, tr {
                                                                                                 <td style="font-size: 11px; width: 30%;">
                                                                                                     {{ $row->email }}
                                                                                                 </td>
-                                                                                                <td style="font-size: 11px;">@if(!empty($row->invitation_date)) {{ date('d M Y H:i:A', strtotime($row->invitation_date)) }} @else -- @endif</td>
-                                                                                                <td style="font-size: 11px;">@if(!empty($row->registered_date)) {{ date('d M Y H:i:A', strtotime($row->registered_date)) }} @else -- @endif</td>
+                                                                                                <td style="font-size: 11px;">@if(!empty($row->invitation_date)) {{utc_to_ltz($row->invitation_date, 'd M Y g:i A', local_tz($admin))}} @else -- @endif</td>
+                                                                                                <td style="font-size: 11px;">@if(!empty($row->registered_date)) {{utc_to_ltz($row->registered_date, 'd M Y g:i A', local_tz($admin))}} @else -- @endif</td>
                                                                                                 {{-- <td class="text-center">
                                                                                                     @php
                                                                                                       $user_invited_count = \DB::table('refer_users')->where('email',$row->email)->count();

+ 15 - 4
resources/views/application.blade.php

@@ -56,9 +56,10 @@
                                     </div>
                                 </div>
                                 <div class="p-2" style="display:flex; border-top: 1px solid #eee;">
+                                    @if($row->proposal_submit_status ==1) 
                                     <div class="left" style="width:50%;">
                                         <div class="uni_details" style="display:flex;">
-                                            <div class="inner_right ms-5">
+                                            <div class="inner_right ms-5"> 
                                                 <span @if(isset($row->proposal->document_file)) class="open_modal_page" style="cursor: pointer;"  data-url="{{route('modal-get',['name'=>'view_student_proposal','id'=>$row->proposal->id])}}" @endif>
                                                      <strong style="font-size: 13px; font-weight: 600;">{{cn($row,'proposal.title','N/A')}}</strong>
                                                 </span>
@@ -80,16 +81,26 @@
                                                         @endif
                                                         <span> • </span>
                                                         <span style="font-size:12px;">{{cn($row,'proposal.status','N/A')}}</span>
-                                                    </div>
+                                                    </div> 
                                             </div>
                                         </div>
                                     </div>
+                                        @else
+
+                                        <div class="left" style="width:100%;">  
+                                            <span class="alert mt-3" role="alert" style="font-size: 12px !important; border-radius: .55rem; padding: 8px 12px; margin-top: 6px; background: #fff0d6; color: rgb(237, 14, 14); border-color: #ffebca; border-width: 3px; border-style: double;"> 
+                                                <i class="fa fa-warning" style="font-size: 11px; margin-right: 5px; color: rgb(237, 14, 14) !important; top: 0px; position: relative;"></i>  
+                                                No proposal available
+                                            </span>
+                                        </div>  
+                                        @endif
+                                   
                                 </div>
                                 <div class="p-2" style="display:flex; border-top: 1px solid #eee;">
                                     <div class="left" style="width:50%;">
                                         <div class="uni_details" style="display:flex;">
                                             <div class="inner_right ms-5">
-                                                <span style="font-size:12px;">Preferred Start Date : <br><strong style="font-size:13px;">@if(!empty($row->submitted_date)){{ date('M Y', strtotime($row->submitted_date))}} @else {{'N/A'}} @endif</strong></span><br>
+                                                <span style="font-size:12px;">Preferred Start Date : <br><strong style="font-size:13px;">@if(!empty($row->preferred_start_date)){{ date('M Y', strtotime($row->preferred_start_date))}} @else {{'N/A'}} @endif</strong></span><br>
                                             </div>
                                         </div>
                                     </div>
@@ -108,7 +119,7 @@
                                         @elseif($proposal =='true' || $publication =='true' || $worK_exp =='true'|| $institution =='true'|| $score =='true')   
                                           <span class="label_badge_radius" style="background-color: #d8fdd8; color: green; border-radius: 5px; font-weight: bold; cursor: pointer;">Draft</span>
                                         @else
-                                            <span class="label_badge_radius open_modal_page" data-url="{{ route('modal-get',['name'=>'update_student_proposal','id'=>$row->id,'student_id'=>$row->student_id,'teacher_id'=>$row->teacher_id]) }}" data-title="Submit your Proposal" style="background-color: #f2d0a4; color: #dc3545; border-radius: 5px; font-weight: bold; cursor: pointer;">Submit</span>
+                                            <span class="label_badge_radius open_modal_page tooltips" title="Click to Submit" data-url="{{ route('modal-get',['name'=>'update_student_proposal','id'=>$row->id,'student_id'=>$row->student_id,'teacher_id'=>$row->teacher_id]) }}" data-title="Submit your Proposal" style="background-color: #f2d0a4; color: #dc3545; border-radius: 5px; font-weight: bold; cursor: pointer;">Not Yet Submitted</span>
                                         @endif
                                     </div>
                                 </div> 

+ 1 - 1
resources/views/email/wishlist_email.blade.php

@@ -95,7 +95,7 @@
                                     <h5>{{ $teacher }}</h5>
                                     <h5>{{ $designation }}</h5>
                                     <h5>{{ $department }}</h5>
-                                    {{-- <h5>{{ $university }}</h5> --}}
+                                    <h5>{{ $university }}</h5>
                                 </div>
                                 <div style="background-color: #eee; border-radius: 0px 0px 5px 5px;">
                                     <p class="mt-5 tmail">This email was sent to {{$receive_email}}</p>

+ 156 - 0
resources/views/teacher/load_application.blade.php

@@ -0,0 +1,156 @@
+@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">
+            <table class="table table-bordered list_table">
+                <thead>
+                    <tr>
+                        <th>Sl</th>
+                        <th>Student Information</th>
+                        <th>Education</th>
+                        <th class="text-center">English Test</th>
+                        <th class="text-center">Others</th>
+                        <th>Proposal Summary</th>
+                        <th class="text-center">Status</th>
+                    </tr>
+                </thead>
+                <tbody>
+                @foreach($students as $key=>$row)
+                    <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: 11px;">
+                                <a href="" class="" style="color: black;"><span>Apply Ref : {{$row->student_apply_ref ?? "N/A"}} </span></a>
+                            </div>
+                            <div style="font-size: 11px;">
+                                <span style="color: black;">Applied : {{utc_to_ltz($row->submitted_date, 'd M Y g:i A', local_tz($user))}}</span>
+                            </div>
+                        </td>
+                        <td style="font-size: 11px;">
+                            <div style="font-size: 11px; font-weight: 600; display:block;">
+                                <span style="color: black;">{{cn($row,'institutes.institution','')}}</span>
+                            </div>
+                            <div style="font-size: 11px;">
+                                <span style="color: black;">P Year :  {{cn($row,'institutes.passing_year','N/A')}} </span>
+                            </div>
+                            <div class="mt-1" style="font-size: 11px;">
+                                <span class="label_badge_gpa">{{cn($row,'institutes.result','')}} (GPA)</span>
+                            </div>
+                        </td>
+                        <td style="font-size: 11px; text-align:center; color: black;">{{cn($row,'scores.test_name','N/A')}} - {{cn($row,'scores.overall_score','')}}
+                            <div style="font-size: 11px;">
+                                <span style="color: black;">
+                                @php
+                                        $work_history_first =$row->work_experience_date()->whereNotNull('start_date')->oldest()->first();
+
+                                        $work_history_last =$row->work_experience_date()->latest()->first();
+                                        if($work_history_first && $work_history_last && $work_history_last->end_date){
+
+                                        $diff_in_days =diff_in_days($work_history_first->start_date,$work_history_last->end_date);
+
+                                        }elseif($work_history_first){
+                                        $diff_in_days =diff_in_days($work_history_first->start_date, now());
+                                        }else{
+                                        $diff_in_days =0;
+                                        }
+
+                                        $years = ($diff_in_days / 365) ;
+                                        $years = floor($years);
+                                        $month = ($diff_in_days % 365) / 30.5;
+                                        $month = floor($month);
+                                        $days = ($diff_in_days % 365) % 30.5;
+                                        @endphp
+
+                                        <div class="mt-1" style="font-size: 11px; display:block;">
+                                            <span class="label_badge_work">{{$years}} years</span>
+                                        </div>
+                                </span>
+                            </div>
+                        </td>
+                        <td style="font-size: 11px; text-align:center;"> 
+                            <div style="font-size: 11px; display:block;">
+                                <div style="font-size: 11px; color: black;"> Pu :
+                                    @if($row->student_details->is_publication==1) 
+                                        <span class="label_badge_work"> yes</span>
+                                    @else
+                                        <span class="label_badge_no"> No</span>
+                                    @endif
+                                </div>
+                                <div class="mt-1" style="font-size: 11px; color: black;"> Con :
+                                    @if($row->student_details->is_attended_conference==1) 
+                                        <span class="label_badge_work"> yes</span>
+                                    @else
+                                        <span class="label_badge_no"> No</span>
+                                    @endif
+                                </div>  
+                            </div>
+                        </td>
+                        <td style="font-size: 11px;">
+                            <div class="inner_right">
+                                <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>
+                                @php
+                                    $proposal =\DB::table('proposal')->where(
+                                        'student_id',$row->student_id
+                                        )->first();
+
+                                    if(isset($proposal)){
+                                        $department =\DB::table('departments')->where(
+                                            'id',$proposal->department
+                                        )->first();
+                                    } 
+                                @endphp
+                                @if(isset($department))
+                                <span>.</span>
+                                <span style="color:black;"> 
+                                    {{ $department->name }} 
+                                </span>
+                                @endif
+                                <span>.</span>
+                                <span style="color:black;">{{cn($row,'proposal.status','')}}</span>
+                            </div>
+                        </td>
+                        <td style="font-size: 11px; text-align:center;">
+
+                            <div class="top_part_status">
+                                @if($row->accepted_status==1 && $row->proposal_status ==1)
+                                        <button class="btn btn2" style="padding: 1px 10px !important; font-size: 11px;">Reviewing</button>
+                                @elseif($row->accepted_status==1 && $row->proposal_status ==2)
+                                    <button class="btn btn2" style="padding: 1px 10px !important; font-size: 11px;">Reviewing</button>
+                                @elseif($row->accepted_status==1 && $row->proposal_status ==3)
+                                    <button class="btn btn2" style="padding: 1px 10px !important; font-size: 11px;">Push</button>
+                                @elseif($row->accepted_status==1 && $row->proposal_status ==4)
+                                    <button class="btn btn2" style="padding: 1px 10px !important; font-size: 11px;">Hold</button>
+                                @elseif($row->accepted_status==1 && $row->proposal_status ==5)
+                                    <button class="btn btn2" style="padding: 1px 10px !important; font-size: 11px;">Interested</button>
+                                @elseif($row->accepted_status==1 && $row->proposal_status ==6)
+                                    <button class="btn btn2" style="padding: 1px 10px !important; font-size: 11px;">Rejected</button>
+                                @else
+                                    <button class="btn btn2 accept_status_update" data-id="{{$row->id}}" style="padding: 1px 10px !important; font-size: 11px;">Accept</button>
+                                @endif
+
+                                @if($row->proposal_status_date)
+                                    <br>
+                                    <span style="font-size:11px; font-weight: bold;"> 
+                                    {{utc_to_ltz($row->proposal_status_date, 'd M Y g:i A', local_tz($user))}}
+                                </span>
+
+                                @endif
+                            </div>
+                        </td>
+                    </tr>
+                @endforeach
+                </tbody>
+            </table>
+        </div>
+    </div><!--end col-->
+    @else
+    <div class="col-md-12 bg-white" style="padding:10px;">
+        <div class="alert  mt-1 mb-3" style="border-color: #e9f0f3; font-size: 12px !important; color: #dc3545; border-radius: 30px; padding: 8px 15px; text-align: center;">
+            <span>No data available.</span>
+        </div>
+    </div>
+@endif

+ 92 - 181
resources/views/teacher_profile.blade.php

@@ -329,6 +329,17 @@ tbody, td, tfoot, th, thead, tr {
     background-color: #eee;
     border-radius: 5px;
 }
+
+.label_badge_no {
+    color: #e75555;
+    border-radius: 20px;
+    padding: 1px 10px;
+    font-size: 11px;
+    line-height: 1.3;
+    letter-spacing: .2px;
+    font-weight: 600;
+    background-color: #eed4ce;
+}
 </style>
 <body>
 <header id="" class="site-header">
@@ -357,7 +368,7 @@ tbody, td, tfoot, th, thead, tr {
                                             <p class="form-check-label ms-2" style="font-size: 11px; margin-top: 9px;">Not Available for Supervision</p>
                                         @endif
                                         <div class="form-check form-switch ms-3" id="" style="margin-top: 6px;">
-                                            <input class="form-check-input teacher_is_available" type="checkbox" name="is_available" value="" @if(\Auth::guard('teacher')->user()->is_available ==1) checked @endif>
+                                            <input class="form-check-input teacher_is_available" type="checkbox" name="is_available" value="" @if(\Auth::guard('teacher')->user()->is_available ==0) checked @endif>
                                             @if(\Auth::guard('teacher')->user()->is_available ==1)
                                             <label class="form-check-label" for="" style="font-size: 11px; margin-top: -1px; margin-right: 9px;">Available for Supervision </label>
                                             @endif
@@ -518,7 +529,7 @@ tbody, td, tfoot, th, thead, tr {
                                     <div class="mb-1">
                                             <label class="form-label" for="apply_ref" style="color: white; font-size:12px;">Apply Ref/Student Name or Email</label>
                                         <div class="form-icon position-relative">
-                                            <input type="text" for="apply_ref" name="apply_ref" class="form-control ps-2" required="">
+                                            <input type="text" for="apply_ref" name="apply_ref" id="apply_ref" class="form-control ps-2" required="">
                                         </div>
                                     </div>
                                 </div>
@@ -526,8 +537,13 @@ tbody, td, tfoot, th, thead, tr {
                                         <div class="mb-1">
                                             <label class="form-label" for="" style="color: white; font-size:12px;">Status</label>
                                         <div class="form-icon position-relative">
-                                            <select name="approve" id="approve" class="form-control frm" required="">
+                                            <select name="proposal_status" id="proposal_status" class="form-control frm" required="">
                                                 <option disabled="" selected="" value="">Default</option>
+                                                <option value="2">Reviewing</option>
+                                                <option value="3">Pause</option>
+                                                <option value="4">Hold</option>
+                                                <option value="5">Interested</option>
+                                                <option value="6">Rejected</option>
                                             </select>
                                         </div>
                                     </div>
@@ -536,9 +552,7 @@ tbody, td, tfoot, th, thead, tr {
                                     <div class="mb-1">
                                             <label class="form-label" style="color: white; font-size:12px;">Application Received</label>
                                         <div class="form-icon position-relative">
-                                            <select name="app_date" id="app_date" class="form-control frm" required="">
-                                                <option disabled="" selected="" value="">Date Range</option>
-                                            </select>
+                                            <input type="text" class="form-control submitted_date" name="submitted_date" id="submitted_date" placeholder="Date Range" data-validation="required" autocomplete="off" value="{{old('submitted_date')}}">
                                         </div>
                                     </div>
                                 </div>
@@ -546,7 +560,7 @@ tbody, td, tfoot, th, thead, tr {
                                     <div class="mb-1">
                                             <label class="form-label" for="start date" style="color: white; font-size:12px;">Preffered Start Date</label>
                                         <div class="form-icon position-relative">
-                                            <input name="startdate" type="text" class="form-control start_date" placeholder="Start Date" autocomplete="off">
+                                            <input name="preffered_start_date" type="text" class="form-control preffered_start_date" id="preffered_start_date" placeholder="Date Range" data-validation="required" autocomplete="off" value="{{old('preffered_start_date')}}">
                                         </div>
                                     </div>
                                 </div>
@@ -556,154 +570,11 @@ tbody, td, tfoot, th, thead, tr {
                             <div class="mb-4" style="padding:15px;">
                                 <div class="text-end">
                                     <button class="btn btncl"><i class="fa fa-refresh"></i></button>
-                                    <button class="btn btn2">search</button>
+                                    <button class="btn btn2 search_button">search</button>
                                 </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">
-                                <table class="table table-bordered list_table">
-                                    <thead>
-                                        <tr>
-                                            <th>Sl</th>
-                                            <th>Student Information</th>
-                                            <th>Education</th>
-                                            <th class="text-center">English Test</th>
-                                            <th class="text-center">Others</th>
-                                            <th>Proposal Summary</th>
-                                            <th class="text-center">Status</th>
-                                        </tr>
-                                    </thead>
-                                    <tbody>
-                                    @foreach($students as $key=>$row)
-                                        <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: 11px;">
-                                                    <a href="" class="" style="color: black;"><span>Apply Ref : {{$row->student_apply_ref ?? "N/A"}} </span></a>
-                                                </div>
-                                                <div style="font-size: 11px;">
-                                                    <span style="color: black;">Applied : @if(!empty($row->student_details->dob)){{ date("d M, Y", strtotime(cn($row,'student_details.dob','')))}} @else @endif</span>
-                                                </div>
-                                            </td>
-                                            <td style="font-size: 11px;">
-                                                <div style="font-size: 11px; font-weight: 600; display:block;">
-                                                    <span style="color: black;">{{cn($row,'institutes.institution','')}}</span>
-                                                </div>
-                                                <div style="font-size: 11px;">
-                                                    <span style="color: black;">P Year : @if(!empty($row->institutes->start_date)) {{date('M Y',strtotime(cn($row,'institutes.start_date','N/A')))}} @else @endif  @if(!empty($row->institutes->end_date)) - {{date('M Y',strtotime(cn($row,'institutes.end_date','N/A')))}} @else @endif</span>
-                                                </div>
-                                                <div class="mt-1" style="font-size: 11px;">
-                                                    <span class="label_badge_gpa">{{cn($row,'institutes.result','')}} (GPA)</span>
-                                                </div>
-                                            </td>
-                                            <td style="font-size: 11px; text-align:center; color: black;">{{cn($row,'scores.test_name','N/A')}} - {{cn($row,'scores.overall_score','')}}
-                                                <div style="font-size: 11px;">
-                                                    <span style="color: black;">
-                                                    @php
-                                                            $work_history_first =$row->work_experience_date()->whereNotNull('start_date')->oldest()->first();
-
-                                                            $work_history_last =$row->work_experience_date()->latest()->first();
-                                                            if($work_history_first && $work_history_last && $work_history_last->end_date){
-
-                                                            $diff_in_days =diff_in_days($work_history_first->start_date,$work_history_last->end_date);
-
-                                                            }elseif($work_history_first){
-                                                            $diff_in_days =diff_in_days($work_history_first->start_date, now());
-                                                            }else{
-                                                            $diff_in_days =0;
-                                                            }
-
-                                                            $years = ($diff_in_days / 365) ;
-                                                            $years = floor($years);
-                                                            $month = ($diff_in_days % 365) / 30.5;
-                                                            $month = floor($month);
-                                                            $days = ($diff_in_days % 365) % 30.5;
-                                                            @endphp
-
-                                                            <div class="mt-1" style="font-size: 11px; display:block;">
-                                                                <span class="label_badge_work">{{$years}} years</span>
-                                                            </div>
-                                                    </span>
-                                                </div>
-                                            </td>
-                                            <td style="font-size: 11px; text-align:center;">
-                                             
-                                                <div style="font-size: 11px; display:block;">
-                                                        <div style="font-size: 11px; color: black;"><i class="fa-light fa-file"></i> Pub :
-                                                            <span class="label_badge_work"> yes</span>
-                                                        </div>
-                                                        <div class="mt-1" style="font-size: 11px; color: black;"> Con :
-                                                            <span class="label_badge_work"> yes</span>
-                                                        </div>
-
-                                                    {{-- ({{ dDate($work_history_first->start_date) }} - {{dDate($work_history_last->end_date, 'd M Y', 'Continue')}})  --}}
-
-                                                </div>
-                                            </td>
-                                            <td style="font-size: 11px;">
-                                                <div class="inner_right">
-                                                    <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>
-                                                    @php
-                                                        $proposal =\DB::table('proposal')->where(
-                                                           'student_id',$row->student_id
-                                                           )->first();
-
-                                                        if(isset($proposal)){
-                                                            $department =\DB::table('departments')->where(
-                                                               'id',$proposal->department
-                                                               )->first();
-                                                        } 
-                                                    @endphp
-                                                    @if(isset($department))
-                                                    <span>.</span>
-                                                    <span style="color:black;"> 
-                                                        {{ $department->name }} 
-                                                    </span>
-                                                    @endif
-                                                    <span>.</span>
-                                                    <span style="color:black;">{{cn($row,'proposal.status','')}}</span>
-                                                </div>
-                                            </td>
-                                            <td style="font-size: 11px; text-align:center;">
-
-                                                <div class="top_part_status">
-                                                    @if($row->accepted_status==1 && $row->proposal_status ==1)
-                                                         <button class="btn btn2" style="padding: 1px 10px !important; font-size: 11px;">Reviewing</button>
-                                                    @elseif($row->accepted_status==1 && $row->proposal_status ==2)
-                                                        <button class="btn btn2" style="padding: 1px 10px !important; font-size: 11px;">Reviewing</button>
-                                                    @elseif($row->accepted_status==1 && $row->proposal_status ==3)
-                                                        <button class="btn btn2" style="padding: 1px 10px !important; font-size: 11px;">Push</button>
-                                                    @elseif($row->accepted_status==1 && $row->proposal_status ==4)
-                                                        <button class="btn btn2" style="padding: 1px 10px !important; font-size: 11px;">Hold</button>
-                                                    @elseif($row->accepted_status==1 && $row->proposal_status ==5)
-                                                        <button class="btn btn2" style="padding: 1px 10px !important; font-size: 11px;">Interested</button>
-                                                    @elseif($row->accepted_status==1 && $row->proposal_status ==6)
-                                                        <button class="btn btn2" style="padding: 1px 10px !important; font-size: 11px;">Rejected</button>
-                                                    @else
-                                                        <button class="btn btn2 accept_status_update" data-id="{{$row->id}}" style="padding: 1px 10px !important; font-size: 11px;">Accept</button>
-                                                    @endif
-
-                                                    @if($row->proposal_status_date)
-                                                       <br>
-                                                      <span style="font-size:11px; font-weight: bold;">{{date('d M Y H:i:A', strtotime($row->proposal_status_date))}}</span>
-
-                                                    @endif
-                                                </div>
-                                            </td>
-                                        </tr>
-                                    @endforeach
-                                    </tbody>
-                                </table>
-                            </div>
-                        </div><!--end col-->
-                        @endif
+                        <div id="load_data"></div>
                     </div><!--end teb pane-->
 
                     <div class="tab-pane fade bg-white p-2 rounded shadow" id="list" role="tabpanel" aria-labelledby="wisthlist"  style="height:100%;">
@@ -1184,6 +1055,19 @@ tbody, td, tfoot, th, thead, tr {
 
 
         $(function(){
+
+            $(".submitted_date").flatpickr({
+                dateFormat: 'd-m-Y',
+                mode: "range"
+                // maxDate:"today",
+            });
+
+            $(".preffered_start_date").flatpickr({
+                dateFormat: 'd-m-Y',
+                mode: "range"
+                // maxDate:"today",
+            });
+
             $("#edit_profile_open_hide").on('click', function(){
                 $("#demo16").show();
             });
@@ -1340,43 +1224,70 @@ tbody, td, tfoot, th, thead, tr {
             });
 
 
-    $('.teacher_is_available').on('click', function(){
-        var self =$(this);
-        var checked =self.prop("checked");
+            $('.teacher_is_available').on('click', function(){
+                var self =$(this);
+                var checked =self.prop("checked");
 
-        var form_data={
-            _token :"{{csrf_token()}}",
-            'checked':checked,
-            }
+                var form_data={
+                    _token :"{{csrf_token()}}",
+                    'checked':checked,
+                    }
 
-        swal({
-            title: "Are you sure you want to change status?",
-            text: "Please check before submitting!",
-            type: "warning",
-            showCancelButton: true,
-            confirmButtonClass: "btn-danger",
-            cancelButtonClass: "btn-info",
-            confirmButtonText: "Yes",
-            cancelButtonText: "No",
-            closeOnConfirm: true,
-            closeOnCancel: true
-        }, function(isConfirm){
-
-            if(isConfirm){
-                $.post("{{ route('ajax-post', ['name'=>'teacher_is_available']) }}", form_data, function(res){
-                    pop_up_msg(res.msg);
-                    window.location.reload();
+                swal({
+                    title: "Are you sure you want to change status?",
+                    text: "Please check before submitting!",
+                    type: "warning",
+                    showCancelButton: true,
+                    confirmButtonClass: "btn-danger",
+                    cancelButtonClass: "btn-info",
+                    confirmButtonText: "Yes",
+                    cancelButtonText: "No",
+                    closeOnConfirm: true,
+                    closeOnCancel: true
+                }, function(isConfirm){
 
-                }).fail(function(err){
+                    if(isConfirm){
+                        $.post("{{ route('ajax-post', ['name'=>'teacher_is_available']) }}", form_data, function(res){
+                            pop_up_msg(res.msg);
+                            window.location.reload();
 
-                    pop_up_msg(err_msg(err), 'error');
+                        }).fail(function(err){
+
+                            pop_up_msg(err_msg(err), 'error');
 
+                        });
+                    }
+                });
+            });
+
+
+            $('.search_button').on('click', function(){
+                get_data();
+            });
+
+            function get_data(){
+                var base = '{{url('/')}}';
+                var apply_ref = $('#apply_ref').val();
+                var proposal_status = $('#proposal_status').find('option:selected').val();
+                var submitted_date = $('#submitted_date').val();
+                var preffered_start_date = $('#preffered_start_date').val();  
+
+                $.ajax({
+                    method: 'GET', 
+                    url: base+'/teacher_profile/application/search', 
+                    // url: base+'/applyuser/reports/join_list/search', 
+                    data: {'apply_ref' : apply_ref,'proposal_status' : proposal_status,'submitted_date' : submitted_date,'preffered_start_date' : preffered_start_date}, 
+                    success: function(response){ // What to do if we succeed 
+                        $('#load_data').html(response);
+                    },
+                    error: function(jqXHR, textStatus, errorThrown) { // What to do if we fail
+                        console.log(JSON.stringify(jqXHR));
+                        console.log("AJAX error: " + textStatus + ' : ' + errorThrown);
+                    }
                 });
             }
-        });
-    });
 
-  });
+        });
 
 
         // let answer = document.getElementById("interest").contentEditable;

+ 1 - 0
routes/web.php

@@ -99,6 +99,7 @@ Route::post('teacher-logout', [App\Http\Controllers\TeacherAuth\LoginController:
 Route::group(['middleware' => ['teacher']], function() {
     Route::get('/teacher_profile', [App\Http\Controllers\TeacherHomeController::class,'teacher_profile'])->name('teacher_profile');
     Route::get('teacher/student-proposal-details/{id}', [App\Http\Controllers\TeacherHomeController::class,'student_proposal_details']);
+    Route::get('teacher_profile/application/search', [App\Http\Controllers\TeacherHomeController::class,'search']);
 
 
 });

+ 5 - 1
sql/update.sql

@@ -235,4 +235,8 @@ ALTER TABLE `users`
 	CHANGE COLUMN `is_work_experience` `is_work_experience` TINYINT(4) NULL DEFAULT '0' COMMENT '1=yes, 2=no' AFTER `apply_status`,
 	CHANGE COLUMN `is_test_score` `is_test_score` TINYINT(4) NULL DEFAULT '0' COMMENT '1=yes, 2=no' AFTER `is_work_experience`,
 	CHANGE COLUMN `is_publication` `is_publication` TINYINT(4) NULL DEFAULT '0' COMMENT '1=yes, 2=no' AFTER `is_test_score`,
-	CHANGE COLUMN `is_education` `is_education` TINYINT(4) NULL DEFAULT '0' COMMENT '1=yes, 2=no' AFTER `is_publication`;
+	CHANGE COLUMN `is_education` `is_education` TINYINT(4) NULL DEFAULT '0' COMMENT '1=yes, 2=no' AFTER `is_publication`;
+
+
+ALTER TABLE `student_proposals`
+	ADD COLUMN `preferred_start_date` DATE NULL DEFAULT NULL AFTER `proposal_id`;