Mostafijur Rahman 1 year ago
parent
commit
849ff0ad11

+ 52 - 1
app/Http/Controllers/TeacherHomeController.php

@@ -12,6 +12,7 @@ use App\Models\Requirement;
 use App\Institution;
 use App\Workexperience;
 use Auth;
+use Input;
 
 class TeacherHomeController extends Controller
 {
@@ -67,6 +68,56 @@ class TeacherHomeController extends Controller
         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_month_year = date('m-Y', strtotime($date_array[0]));
+            $to_month_year = date('m-Y', strtotime($date_array[1]));
+
+            $start_date=$carbon->parse('01-'.$from_month_year)->toDateString();
+            $end_date=$carbon->parse('01-'.$to_month_year)->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]));
+        //     $to_month_year = date('m-Y', strtotime($date_array[1]));
+
+        //     $start_date=$carbon->parse('01-'.$from_month_year)->toDateString();
+        //     $end_date=$carbon->parse('01-'.$to_month_year)->toDateString(); 
+            
+        //     $students->whereRaw("DATE(submitted_date) >= ? AND DATE(submitted_date) <= ?", [$start_date, $end_date]);  
+        // }  
+
+        $data=[ 
+            'students' => $students->paginate(50), 
+        ];    
+        
+        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,
 
     ],
 

+ 14 - 3
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,10 +81,20 @@
                                                         @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%;">
@@ -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> 

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

@@ -0,0 +1,150 @@
+@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-->
+@endif

+ 93 - 180
resources/views/teacher_profile.blade.php

@@ -328,6 +328,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">
@@ -356,7 +367,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
@@ -517,7 +528,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>
@@ -525,8 +536,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>
@@ -535,9 +551,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>
@@ -545,7 +559,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>
@@ -555,154 +569,13 @@ 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;"> Pu :
-                                                            <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%;">
@@ -1183,6 +1056,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();
             });
@@ -1339,43 +1225,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']);
 
 
 });