Browse Source

Full project modified

Mostafijur Rahman 1 year ago
parent
commit
8b6344d2fc

+ 8 - 4
app/Http/Controllers/Admin/AdminController.php

@@ -28,8 +28,10 @@ class AdminController extends Controller
     {
         $admin = Auth::guard('admin')->user(); 
 
-        $active_teachers_list =User::whereIn(
-                'status',[1,2,3]
+        $register_active_teachers_list =User::where(
+                'apply_status',1
+            )->where(
+                'sign_up',1
             )->where(
                 'user_type',2
             )->orderBy(
@@ -46,6 +48,8 @@ class AdminController extends Controller
             'user_type',2
         )->whereNotNull(
             'admin_invite_id'
+        )->where(
+            'register_type',1   //1=invitation
         )->orderBy(
             'id','DESC'
         )->get();
@@ -53,7 +57,7 @@ class AdminController extends Controller
         $landing_wishlist =User::where(
             'user_type',2
         )->where(
-            'landing_register',1
+            'register_type',2  // 2=landing wishlist
         )->orderBy(
             'id','DESC'
         )->get();
@@ -70,7 +74,7 @@ class AdminController extends Controller
         $application = StudentProposal::orderBy('id','DESC')->get(); 
 
         $data =[ 
-          'active_teachers_list'=>$active_teachers_list,
+          'register_active_teachers_list'=>$register_active_teachers_list,
           'register_student_list'=>$register_student_list ,
           'market_countries'=>$market_countries,
           'refer_users'=>$refer_users,

+ 2 - 2
app/Http/Controllers/Admin/SubContentController.php

@@ -90,8 +90,8 @@ class SubContentController extends Controller
 			$data['departments'] =Department::where('status',1)->orderBy('name','ASC')->get();
 
 		}elseif($name=="register_pending_teacher_load"){
-			$data['register_teachers_list'] =User::where(
-                'status',0
+			$data['register_teachers_list'] =User::whereIn(
+                'apply_status', [0,2,3] // 0 = Pending; 2= In active ; 3= Suspend
             )->where(
                 'user_type',2
             )->orderBy(

+ 98 - 62
app/Http/Controllers/AjaxController.php

@@ -22,6 +22,7 @@ use Session;
 use Mail;
 use Auth;
 use Hash;
+use Illuminate\Support\Str;
 
 
 class AjaxController extends Controller
@@ -85,20 +86,20 @@ class AjaxController extends Controller
 		}elseif($name=="teacher_user_status_change"){
             $user=auth_user('teacher');
             $teacher =User::find($req->id);
-            $teacher->status =$req->status;
+            $teacher->apply_status =$req->status;
             $teacher->update();
 
             $data['name'] = $teacher->first_name.' '.$teacher->last_name;
             $user_mail = $teacher->email;
             $from = 'asraful@revinr.com';
-            if($teacher->status==1){
+            if($teacher->apply_status==1){
                 Mail::send('email.approve_teacher_email',$data, function ($message) use ($user_mail,$from) {
                     $message->from($from);
                     $message->to($user_mail)->subject('Account Activation Confirmation');
                 });
             }
             return response(
-                ['msg'=>'Successfully updated.']
+                ['msg'=>'Successfully saved.']
             );
 
         }elseif($name=="set_country"){
@@ -400,7 +401,7 @@ class AjaxController extends Controller
 
             $validator=\Validator::make($req->all(), [
                 'name'=>'required',
-                'email'=>'required|email|max:255|unique:refer_users'
+                'email'=>'required|email|max:255'
             ]);
 
             if($validator->fails()){
@@ -408,32 +409,50 @@ class AjaxController extends Controller
                 return response(['msg'=>$errors[0]], 422);
             }
 
+            $user_check_data =User::where('email',$req->email)->doesntExist();
+
+            if($user_check_data){ 
+               $user_data =new User;
+               $user_data->first_name =$req->name;
+               $user_data->email =$req->email; 
+               $user_data->user_type =1;
+               $user_data->status =1; 
+               $user_data->register_type =3; // 1=invitation ; 2= landing/wishlish; 3 =q_form 
+               $user_data->save();
+            } 
+
+            $user =User::where('email',$req->email)->where('user_type',1)->first();
+
             $refer =new ReferUser;
             $refer->name =$req->name;
             $refer->email =$req->email;
-            $refer->refer_by =$req->id;
+            $refer->refer_by =$user->id;
             $refer->teacher_id =$req->id;
             $refer->q_form_status =1;
             $refer->save();
 
-            // if($refer->save()){
-            //     $data['name'] = $refer->name;
-            //     $data['teacher_id'] = $refer->teacher_id;
-            //     $data['std_email'] = $refer->email;
-            //     $data['applicant_name'] = $user->first_name.' '.$user->last_name;
-            //     $user_mail = $refer->email;
-            //     $from = 'test@mail.com';
+            if($refer->save()){
+                $user_teacher = User::find($refer->teacher_id); 
+                $data['name'] = $refer->name; 
+                $data['student_id'] = $user->id;
+                $data['teacher'] = $user_teacher->first_name.' '.$user_teacher->last_name;
+                $data['designation'] = $user_teacher->designation;
+                $data['department'] = $user_teacher->others_department;
+                $data['university'] = $user_teacher->university_name;
+                $data['email'] =$refer->email;
+                $user_mail = $refer->email;
+                $from = 'asraful@revinr.com';
 
-            //     Mail::send('email.refer_email',$data, function ($message) use ($user_mail,$from) {
-            //         $message->from($from);
-            //         $message->to($user_mail)->subject('New Email Send to you');
-            //     });
-            // }
+                Mail::send('email.q_form_email',$data, function ($message) use ($user_mail,$from) {
+                    $message->from($from);
+                    $message->to($user_mail)->subject('Invitation to submit your doctoral application');
+                });
+            }
 
             return response(
-                ['msg'=>'Saved successfully.']
+                ['msg'=>'Saved successfully. Please check your email for register.']
             );
-        }elseif($name=="add_wishlist_registration"){
+        }elseif($name=="q_apply_wishlist_registration_save"){
 
             $validator=\Validator::make($req->all(), [
                 'first_name'=>'required',
@@ -458,21 +477,7 @@ class AjaxController extends Controller
             $user_data = User::find($req->id);
             $token =Str::random(64);
 
-            if($user_data){
-
-                $user_exists = ReferUser::where('email',$req->email)->where('signup',1)->exists();
-
-                if($user_exists){
-                    return response(['msg'=>'You are already registered!.Please login.'], 403);
-                }
-
-                $refer_user_signup = ReferUser::where('email',$req->email)->where('signup',0)->first();
-
-                if($refer_user_signup){
-                    $refer_user_signup->signup =1;
-                    $refer_user_signup->update();
-                }
-
+            if($user_data){ 
                 $user_data->first_name =$req->first_name;
                 $user_data->last_name =$req->last_name;
                 $user_data->first_name =$req->first_name;
@@ -481,35 +486,38 @@ class AjaxController extends Controller
                 $user_data->gender =$req->gender;
                 $user_data->password =Hash::make($req->password);
                 $user_data->status =1;
-                $user_data->email_verification=1;
+                $user_data->sign_up =1;
+                $user_data->registered_date =now();
+                //$user_data->email_verification=1;
                 $user_data->remember_token=$token;
-                $user_data->email_verified_at=now();
-                $user_data->update();
-
+                //$user_data->email_verified_at=now();
+                $user_data->update(); 
 
-                if($user_data->update()){
-                    $data['name'] = $user_data->first_name .''.$user_data->last_name;
-                    $user_mail = $user_data->email;
-                    $from = 'asraful@revinr.com';
+                 
+                $data['name'] = $user_data->first_name .' '.$user_data->last_name;
+                $data['token']=$token;
+                $user_mail = $user_data->email;
+                $from = 'asraful@revinr.com';
 
-                    Mail::send('email.student_signup_email',$data, function ($message) use ($user_mail,$from) {
-                        $message->from($from);
-                        $message->to($user_mail)->subject('New Email Send to you');
-                    });
-                }
+                Mail::send('email.q_apply_wishlist_registration_email',$data, function ($message) use ($user_mail,$from) {
+                    $message->from($from);
+                    $message->to($user_mail)->subject('Thank You for joining us!');
+                });
+                 
 
                 return response(
-                    ['msg'=>'Registration successfully saved.You can login now']
+                    ['msg'=>'Successfully saved.']
                 );
             }
 
-        }elseif($name=="invited_registration"){
+        }elseif($name=="invitation_register_save"){
+             
             $validator=\Validator::make($req->all(), [
                 'first_name'=>'required',
                 'last_name'=>'required',
                 'email'=>'required',
                 'university'=>'required',
-                'department'=>'required',
+                'others_department'=>'required',
                 'designation'=>'required',
                 'password_confirmation'=>'required',
                 'password'=>[
@@ -528,29 +536,30 @@ class AjaxController extends Controller
 
             if($user_data){
 
-                $user_exists = ReferUser::where('email',$req->email)->where('signup',1)->exists();
+                // $user_exists = ReferUser::where('email',$req->email)->where('signup',1)->exists();
 
-                if($user_exists){
-                    return response(['msg'=>'You are already registered!.Please login.'], 403);
-                }
+                // if($user_exists){
+                //     return response(['msg'=>'You are already registered!.Please login.'], 403);
+                // }
 
-                $refer_user_signup = ReferUser::where('email',$req->email)->where('signup',0)->first();
+                // $refer_user_signup = ReferUser::where('email',$req->email)->where('signup',0)->first();
 
-                if($refer_user_signup){
-                    $refer_user_signup->signup =1;
-                    $refer_user_signup->update();
-                }
+                // if($refer_user_signup){
+                //     $refer_user_signup->signup =1;
+                //     $refer_user_signup->update();
+                // }
 
                 $user_data->first_name =$req->first_name;
                 $user_data->last_name =$req->last_name;
                 $user_data->university_name =$req->university;
                 $user_data->ref_no = name_initials($req->first_name,$req->last_name).''.teacherRefNoGenerate();
-                $user_data->department =$req->department;
+                //$user_data->department =$req->department;
                 $user_data->others_department =$req->others_department;
                 $user_data->designation =$req->designation;
                 $user_data->uni_website =$req->website;
                 $user_data->password =Hash::make($req->password);
                 $user_data->status =1;
+                $user_data->sign_up = 1; // 1=signup
                 $user_data->registered_date = now();
                 $user_data->update();
 
@@ -566,7 +575,7 @@ class AjaxController extends Controller
                 }
 
                 return response(
-                    ['msg'=>'Registration successfully saved.You can login now.']
+                    ['msg'=>'Registration successfully saved.']
                 );
             }
 
@@ -682,9 +691,10 @@ class AjaxController extends Controller
             $user_data->update();
 
             if($user_data->update()){
-                $data['name'] = $user_data->first_name .''.$user_data->last_name;
+                $data['name'] = $user_data->first_name .' '.$user_data->last_name;
                 $user_mail = $user_data->email;
                 $data['teacher_id'] = $user_data->id;
+                $data['email'] = $user_data->email;
                 $from = 'asraful@revinr.com';
 
                 Mail::send('email.teacher_invited_email',$data, function ($message) use ($user_mail,$from) {
@@ -949,6 +959,32 @@ class AjaxController extends Controller
             return response([
                 'msg'=>'Successfully saved.'
             ]);
+        }elseif($name=="all_publication_delete"){
+            Publication::where('student_id',$req->uid)->delete();
+            return response([
+                'msg'=>'Successfully delete.'
+            ]); 
+         
+        }elseif($name=="all_education_history_delete"){
+            Institution::where('student_id',$req->uid)->delete();
+            return response([
+                'msg'=>'Successfully delete.'
+            ]);
+             
+        }elseif($name=="all_work_experience_delete"){
+            Workexperience::where('student_id',$req->uid)->delete();
+            return response([
+                'msg'=>'Successfully delete.'
+            ]);
+             
+        }elseif($name=="all_test_score_delete"){
+            Score::where('student_id',$req->uid)->delete();
+            return response([
+                'msg'=>'Successfully delete.'
+            ]);
+             
         }
+
+
 	}
 }

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

@@ -38,9 +38,9 @@ class HomeController extends Controller
         return view('auth.wishlist_register_form',compact('hash_student_ids','user'));
     }
 
-    public function wishlist_teacher_register($hash)
+    public function invited_register_form($hash)
     {
-        $hashids=new \Hashids\Hashids('teacher_wishlist_signup', 25);
+        $hashids=new \Hashids\Hashids('teacher_invitation_signup', 25);
         $hash_ids=$hashids->decode($hash);
         if(empty($hash_ids[0])) abort(404);
         $user =User::find($hash_ids[0]);

+ 62 - 32
app/Http/Controllers/ModalController.php

@@ -61,9 +61,9 @@ class ModalController extends Controller{
             $data['std_proposal']=StudentProposal::find($req->id);
         }elseif($name=="edit_doc_required"){
             $data['requirements']=Requirement::find($req->id);
-        }elseif($name=="landing_ragister_your_interest"){
+        }elseif($name=="landing_ragister_form"){
             $data['countries'] =Country::where('status',1)->orderBy('name','ASC')->get();
-            $data['universities'] =University::orderBy('name','ASC')->get();
+            //$data['universities'] =University::orderBy('name','ASC')->get();
         }else $name='default';
 
 
@@ -220,7 +220,7 @@ class ModalController extends Controller{
             $admin =Admin::find($req->id);
             $validator=\Validator::make($req->all(), [
                 'name'=>'required',
-                'email'=>'required|email|max:255|unique:users'
+                'email'=>'required|email|max:255'
             ]);
 
             if($validator->fails()){
@@ -228,30 +228,35 @@ class ModalController extends Controller{
                 return response(['msg'=>$errors[0]], 422);
             }
 
-            $already_exists =User::where('email',$req->email)->exists();
+            $user_check_data =User::where('email',$req->email)->doesntExist();
 
-            if($already_exists){
-                return response(['msg'=>'Sorry! this email is already exists!.'],403);
-            }
+            if($user_check_data){
+               // return response(['msg'=>'Sorry! this email is already exists!.'],403);
+                $user_data =new User;
+                $user_data->first_name =$req->name;
+                $user_data->email =$req->email;
+                $user_data->admin_invite_id =$admin->id;
+                $user_data->user_type =2;
+                $user_data->register_type =1; // 1=invitation ; 2=wishlist/landing
+                $user_data->registered_date =now();  
+                $user_data->save();
+            } 
 
-            $user_data =new User;
-            $user_data->first_name =$req->name;
-            $user_data->email =$req->email;
-            $user_data->admin_invite_id =$admin->id;
-            $user_data->user_type =2;
-            $user_data->save();
+            $user_data =User::where('email',$req->email)->where('user_type',2)->first();
 
             $refer =new ReferUser;
             $refer->name =$req->name;
             $refer->email =$req->email;
-            $refer->refer_by =$admin->id;
-            //$refer->teacher_id =$admin->id;
+            $refer->refer_by =$admin->id; 
+            $refer->teacher_id =$user_data->id; 
             $refer->save();
 
+
             if($refer->save()){
                 $data['name'] = $refer->name;
                 $data['teacher_id'] = $user_data->id;
                 $data['applicant_name'] = $admin->first_name.' '.$admin->last_name;
+                $data['email']=$refer->email;
                 $user_mail = $refer->email;
                 $from = 'asraful@revinr.com';
 
@@ -261,9 +266,21 @@ class ModalController extends Controller{
                 });
             }
 
-            return response(
-                ['msg'=>'Invite saved successfully.']
-            );
+            $already_invited =ReferUser::where('email',$refer->email)->count();
+
+            if($already_invited > 0) {
+                return response(
+                    ['msg'=>"Successfully saved. Already invitation send {$already_invited} times."]
+                ); 
+            }else{
+                return response(
+                    ['msg'=>'Invitation saved successfully.']
+                );
+
+            }
+
+
+
         }elseif($name=="add_doc_required"){
             $user=auth_user();
 
@@ -304,7 +321,7 @@ class ModalController extends Controller{
             return response([
                 'msg'=>'Successfully updated.'
             ]);
-        }elseif($name=="landing_ragister_your_interest"){
+        }elseif($name=="landing_ragister_form"){
 
             $validator=\Validator::make($req->all(), [
                 'name'=>'required',
@@ -316,21 +333,34 @@ class ModalController extends Controller{
                 return response(['msg'=>$errors[0]], 422);
             }
 
-            $already_exists =User::where('email',$req->email)->exists();
+            // $already_exists =User::where('email',$req->email)->exists();
 
-            if($already_exists){
-                return response(['msg'=>'Sorry! this email is already exists!.'],403);
-            }
+            // if($already_exists){
+            //     return response(['msg'=>'Sorry! this email is already exists!.'],403);
+            // }
 
-            $user_data =new User;
-            $user_data->first_name =$req->name;
-            $user_data->email =$req->email;
-            $user_data->nationality =$req->country_id;
-            $user_data->university_name =$req->university_id;
-            $user_data->uni_website =$req->uni_website;
-            $user_data->user_type =2;
-            $user_data->landing_register =1;
-            $user_data->save();
+            $user_check_data =User::where('email',$req->email)->doesntExist();
+
+            if($user_check_data){ 
+               $user_data =new User;
+               $user_data->first_name =$req->name;
+               $user_data->email =$req->email;
+               $user_data->nationality =$req->country_id;
+               $user_data->university_name =$req->university;
+               $user_data->uni_website =$req->uni_website;
+               $user_data->user_type =2;
+               $user_data->register_type =2; // 1=invitation ; 2= landing/wishlish
+              // $user_data->invitation_date =now();  
+               $user_data->save();
+            } 
+
+            $user =User::where('email',$req->email)->where('user_type',2)->first();
+            
+                $refer =new ReferUser;
+                $refer->name =$req->name;
+                $refer->email =$req->email;
+                $refer->teacher_id =$user->id; 
+                $refer->save();
 
             return response(
                 ['msg'=>'Successfully saved.']

+ 3 - 1
app/Http/Controllers/StudentHomeController.php

@@ -12,6 +12,7 @@ use App\StudentProposalUpload;
 use App\StudentProposal;
 use App\AcademicLevel;
 use App\Models\Department;
+use App\Models\Publication;
 use Auth;
 use Carbon\Carbon;
 
@@ -39,6 +40,7 @@ class StudentHomeController extends Controller
    public function profile()
     {
          $user = Auth::user();
+         $publications= Publication::where('student_id',$user->id)->get();
          $institution= Institution::where('student_id',Auth::user()->id)->get();
          $work_experience= Workexperience::where('student_id',Auth::user()->id)->get();
          $score= Score::where('student_id',$user->id)->get();
@@ -54,7 +56,7 @@ class StudentHomeController extends Controller
             'freez_profile','!=',0 
          )->exists();   
     
-        return view('profile',compact('is_freez_profile','institution','academic_level','work_experience','score','user_info','proposal','proposal_files','departments'));
+        return view('profile',compact('publications','is_freez_profile','institution','academic_level','work_experience','score','user_info','proposal','proposal_files','departments'));
     }
 
 

+ 11 - 13
resources/views/admin/admin_profile.blade.php

@@ -755,14 +755,12 @@ tbody, td, tfoot, th, thead, tr {
                                                                                         <td style="font-size: 11px;">{{date('y M', strtotime($row->created_at))}}</td>
                                                                                         <td style="font-size: 11px;">{{cn($row, 'refer_by_user.first_name','')}} {{cn($row, 'refer_by_user.last_name','')}}</td>
                                                                                         <td style="font-size: 11px; text-align:center;">
-                                                                                            @if($row->signup==1)
-                                                                                            <span class="label_badge_radius" style="background-color: #d8fdd8; color: green;">Yes</span><br>
                                                                                             @php
                                                                                                 $refer_signup_user = \App\User::where('email',$row->email)->first();
                                                                                             @endphp
-                                                                                            @if($refer_signup_user)
-                                                                                            <span>{{date('y M', strtotime($refer_signup_user->created_at))}}</span>
-                                                                                            @endif
+                                                                                            @if($refer_signup_user->sign_up==1)
+                                                                                                <span class="label_badge_radius" style="background-color: #d8fdd8; color: green;">Yes</span><br> 
+                                                                                                <span>{{date('y M', strtotime($refer_signup_user->registered_date))}}</span> 
                                                                                             @else
                                                                                             <span class="label_badge_radius" style="background-color: #d8fdd8; color: rgb(230, 13, 13);">No</span><br>
                                                                                             @endif
@@ -848,8 +846,8 @@ tbody, td, tfoot, th, thead, tr {
                                                                                     </tr>
                                                                                 </thead>
                                                                                 <tbody>
-                                                                                    @if(count($active_teachers_list)  > 0)
-                                                                                    @foreach($active_teachers_list as $key=>$row)
+                                                                                    @if(count($register_active_teachers_list)  > 0)
+                                                                                    @foreach($register_active_teachers_list as $key=>$row)
                                                                                     <tr>
                                                                                         <td style="font-size: 11px;">{{++$key}}</td>
                                                                                         <td style="font-size: 11px;"><span style="font-weight: bold !important;">{{$row->first_name }} {{$row->last_name }}</span><br>
@@ -870,13 +868,13 @@ tbody, td, tfoot, th, thead, tr {
                                                                                             <div class="single_glance_row mt-1" style="display: flex;">
                                                                                                 <div class="top_part_status" style="position: relative; width: fit-content; margin-left: 10px;">
                                                                                                     <span class="top_part_status_name" style="background-color: #d8fdd8; color: green;">
-                                                                                                        @if($row->status==1)
+                                                                                                        @if($row->apply_status==1)
                                                                                                         Active
                                                                                                         @endif
-                                                                                                        @if($row->status==2)
+                                                                                                        @if($row->apply_status==2)
                                                                                                         In active
                                                                                                         @endif
-                                                                                                        @if($row->status==3)
+                                                                                                        @if($row->apply_status==3)
                                                                                                         Suspend
                                                                                                         @endif
 
@@ -946,7 +944,7 @@ tbody, td, tfoot, th, thead, tr {
                                                                                                                 <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">
-                                                                                                                <strong style="font-size:13px;">{{$row->university->name}}</strong></br>
+                                                                                                                <strong style="font-size:13px;">{{$row->university_name}}</strong></br>
                                                                                                                 <strong style="font-size:10px !important; font-weight:100 !important;">{{$row->uni_website}}</strong>
                                                                                                             </div>
                                                                                                         </div>
@@ -957,7 +955,7 @@ tbody, td, tfoot, th, thead, tr {
                                                                                         <td class="text-center" style="font-size: 11px;">@if(!empty($row->invitation_date)) {{ date('d M Y', strtotime($row->invitation_date)) }} @else -- @endif</td>
                                                                                         <td class="text-center" style="font-size: 11px;">@if(!empty($row->registered_date)) {{ date('d M Y', strtotime($row->registered_date)) }} @else -- @endif</td>
                                                                                         <td class="text-center" style="font-size: 11px;">
-                                                                                            <span class="invitation hand" data-id="{{ $row->id }}"><i class="fa fa-paper-plane"></i></span>
+                                                                                            <span class="invitation hand tooltips" data-id="{{ $row->id }}" title="Sent Invitation"><i class="fa fa-paper-plane"></i></span>
                                                                                         </td>
                                                                                     </tr>
                                                                                     @endforeach
@@ -997,7 +995,7 @@ tbody, td, tfoot, th, thead, tr {
                                                                                                 <td style="font-size: 11px; width: 22%;">{{ $row->first_name }}  {{ $row->last_name }}</td>
                                                                                                 <td style="font-size: 11px; width: 30%;">{{ $row->email }}</td>
                                                                                                 <td style="font-size: 11px;">{{ date('d M Y', strtotime($row->created_at)) }}</td>
-                                                                                                <td style="font-size: 11px;">@if(!empty($row->registered_at)) {{ date('d M Y', strtotime($row->registered_at)) }} @else -- @endif</td>
+                                                                                                <td style="font-size: 11px;">@if(!empty($row->registered_date)) {{ date('d M Y', strtotime($row->registered_date)) }} @else -- @endif</td>
                                                                                             </tr>
                                                                                         @endforeach
                                                                                         @else

+ 17 - 18
resources/views/admin/sub_contents/publication_list_load.blade.php

@@ -1,17 +1,17 @@
 @extends('admin.sub_contents.base')  
 @section('main') 
 <div class="table-responsive mt-2">
+    @if(count($publications) > 0)
     <table class="table table-bordered list_table" style="margin-bottom:10px;">
-        <thead>
-            <tr>
-                <th style="width: 8%">Sl</th>
-                <th style="width: 70%">Title</th>
-                <th style="width: 12%">Status</th>
-                <th style="width: 10%; text-align: center;">Action</th>
-            </tr>
-        </thead>
-        <tbody>
-            @if(count($publications) > 0)
+            <thead>
+                <tr>
+                    <th style="width: 8%">Sl</th>
+                    <th style="width: 70%">Title</th>
+                    <th style="width: 12%">Status</th>
+                    <th style="width: 10%; text-align: center;">Action</th>
+                </tr>
+            </thead>
+        <tbody> 
                 @foreach($publications as $key=>$row)
                 <tr>
                     <td style="font-size: 11px;">{{++$key}}</td>
@@ -44,16 +44,15 @@
                         <div class="edit_publication_load"></div>
                     </td>
                 </tr>
-                @endforeach
-                @else
-                <tr>
-                    <td colspan="4" class="text-center">
-                        <span class="text-danger">No publication available!</span>
-                    </td>
-                 </tr>
-                @endif
+                @endforeach 
+              
         </tbody>
     </table>
+    @else
+    <div class="alert  mt-1 mb-3" style="border-color: #e9f0f3; font-size: 12px !important; color: #dc3545; border-radius: 30px; padding: 8px 15px;">
+        <span>No publication available.</span>
+    </div>
+    @endif
 </div>
  
 @endsection

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

@@ -35,7 +35,7 @@
                     <div class="single_glance_row mt-1" style="display: flex;">
                         <div class="top_part_status" style="position: relative; width: fit-content; margin-left: 10px;">
                             <span class="top_part_status_name" style="background: #dcdcdc; color: #8c9094;">
-                                @if($row->status==0)
+                                @if($row->apply_status==0)
                                     Pending
                                 @endif
                             </span>

+ 11 - 9
resources/views/auth/invited_register_form.blade.php

@@ -150,7 +150,7 @@
                                                 <input type="hidden" name="teacher_id" value="{{ $hash_ids[0] }}" id="teacher_id">
                                                 <div class="row mb-4">
                                                     <div class="col-md-6">
-                                                        <input type="text" class="form-control" name="first_name" value="{{ $user->first_name }}" id="first_name" required  autofocus placeholder="Given Name">
+                                                        <input type="text" class="form-control" name="first_name" value="{{ old('first_name') }}" id="first_name" required  autofocus placeholder="Given Name">
                                                     </div>
                                                     <div class="col-md-6">
                                                         <input type="text" class="form-control" name="last_name" value="{{ old('last_name') }}" id ="last_name" required  placeholder="Family Name">
@@ -159,40 +159,42 @@
 
                                                 <div class="row mb-4">
                                                     <div class="col-md-12">
-                                                        <input type="email" class="form-control disabled" name="email" value="{{ $user->email}}" id="email" required placeholder="Email">
+                                                        <input type="email" class="form-control" name="email" value="{{ $user->email}}" id="email" required disabled placeholder="Email">
 
                                                     </div>
                                                 </div>
 
                                                 <div class="row mb-4">
                                                     <div class="col-md-12">
-                                                        <select class="form-control" name="university" id="university">
+                                                        <input type="text" class="form-control" name="university" value="{{ old('university') }}" id ="university" required  placeholder="University">
+                                                        {{-- <select class="form-control" name="university" id="university">
                                                             <option selected disabled>Select University</option>
                                                             @foreach($universities as $row)
                                                                 <option value="{{$row->id}}">{{$row->name}}</option>
                                                             @endforeach
-                                                        </select>
+                                                        </select> --}}
                                                     </div>
                                                 </div>
 
                                                 <div class="row mb-3">
                                                     <div class="col-md-12">
-                                                        <select class="form-control" name="department" id="department">
+                                                        <input type="text" class="form-control" name="others_department" value="{{ old('others_department') }}" id ="others_department" required  placeholder="Department">
+                                                        {{-- <select class="form-control" name="department" id="department">
                                                             <option selected disabled>Select department</option>
                                                             @foreach($departments as $row)
                                                                 <option value="{{$row->id}}">{{$row->name}}</option>
                                                             @endforeach
                                                             <option value="">Others</option>
-                                                        </select>
+                                                        </select> --}}
                                                     </div>
                                                 </div>
-                                                <div class="row mb-3">
+                                                {{-- <div class="row mb-3">
                                                 <div class="col-md-12 others_department" style="display:none;">
                                                         <div class="form-icon position-relative">
                                                             <input type="text" class="form-control" name="others_department" id="others_department" placeholder="Others department name">
                                                         </div>
                                                     </div>
-                                                </div>
+                                                </div> --}}
                                                 <div class="row mb-4">
                                                     <div class="col-md-12">
                                                         <input type="text" class="form-control" name="designation" id="designation" placeholder="Please enter your designation here" required="" autocomplete="off">
@@ -307,7 +309,7 @@
                       password_confirmation: password_confirmation,
                   }
 
-                  $.post("{{ route('ajax-post', ['name'=>'invited_registration']) }}", form_data, function(res){
+                  $.post("{{ route('ajax-post', ['name'=>'invitation_register_save']) }}", form_data, function(res){
                       pop_up_msg(res.msg);
                       window.location.href = "{{ url('/login-v2') }}";
 

+ 3 - 3
resources/views/auth/wishlist_register_form.blade.php

@@ -151,7 +151,7 @@
                                                 <input type="hidden" name="student_id" value="{{ $hash_student_ids[0] }}" id="student_id">
                                                 <div class="row mb-4">
                                                     <div class="col-md-6">
-                                                        <input type="text" class="form-control" name="first_name" value="{{ $user->first_name }}" id="first_name" required  autofocus placeholder="Given Name">
+                                                        <input type="text" class="form-control" name="first_name" value="{{ old('last_name') }}" id="first_name" required  autofocus placeholder="Given Name">
                                                     </div>
                                                     <div class="col-md-6">
                                                         <input type="text" class="form-control" name="last_name" value="{{ old('last_name') }}" id ="last_name" required  placeholder="Family Name">
@@ -160,7 +160,7 @@
 
                                                 <div class="row mb-4">
                                                     <div class="col-md-12">
-                                                        <input type="email" class="form-control disabled" name="email" value="{{ $user->email}}" id="email" required placeholder="Email">
+                                                        <input type="email" class="form-control disabled" name="email" value="{{ $user->email}}" id="email" required placeholder="Email" disabled>
 
                                                     </div>
                                                 </div>
@@ -301,7 +301,7 @@
                       password_confirmation: password_confirmation,
                   }
 
-                  $.post("{{ route('ajax-post', ['name'=>'add_wishlist_registration']) }}", form_data, function(res){
+                  $.post("{{ route('ajax-post', ['name'=>'q_apply_wishlist_registration_save']) }}", form_data, function(res){
                       pop_up_msg(res.msg);
                       //window.location.href = "{{ url('/login') }}";
 

+ 115 - 0
resources/views/email/q_apply_wishlist_registration_email.blade.php

@@ -0,0 +1,115 @@
+<!DOCTYPE html>
+    <html lang="en">
+        <head>
+            <meta charset="utf-8" />
+            <title>Research Admission</title>
+            <meta name="viewport" content="width=device-width, initial-scale=1.0">
+            <meta name="description" content="Information & Guidance on the PhD Process, Connect with Supervisor and Many" />
+            <meta name="keywords" content="" />
+
+            <!-- facebook tags -->
+            <meta property="og:url" content="http://www.facebook.com/researchadmission"/>
+            <meta property="og:type" content="website"/>
+            <meta property="og:title" content="Research Admission"/>
+            <meta property="og:description" content="Information & Guidance on the PhD Process, Connect with Supervisor and Many"/>
+            <!-- Linkedin tags -->
+            <meta property="og:url" content="https://www.linkedin.com/company/researchadmission"/>
+            <meta property="og:type" content="website"/>
+            <meta property="og:title" content="Research Admission"/>
+            <meta property="og:description" content="Information & Guidance on the PhD Process, Connect with Supervisor and Many"/>
+
+            <!-- favicon -->
+            <link rel="shortcut icon" href="{{asset('web/images/logo.png') }}">
+            <!-- Bootstrap -->
+            <link href="{{ asset('web/css/bootstrap.min.css') }}" rel="stylesheet" type="text/css" />
+            <!-- tobii css -->
+            <link href="{{asset('web/css/tobii.min.css')}}" rel="stylesheet" type="text/css" />
+            <!-- Icons -->
+            <link href="{{asset('web/css/materialdesignicons.min.css')}}" rel="stylesheet" type="text/css" />
+            <link rel="stylesheet" type="text/css" href="{{ asset('web/stylesheets/font-awesome.min.css') }}" />
+            <link rel="stylesheet" href="https://unicons.iconscout.com/release/v3.0.6/css/line.css">
+            <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css">
+
+            <!-- Slider -->
+            <link rel="stylesheet" href="{{asset('web/css/tiny-slider.css')}}"/>
+            <!-- Main Css -->
+            <link href="{{asset('web/css/style.css')}}" rel="stylesheet" type="text/css" id="theme-opt" />
+            <link href="{{asset('web/css/colors/default.css')}}" rel="stylesheet" id="color-opt">
+            <link rel="preconnect" href="https://fonts.googleapis.com">
+            <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
+            <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;900&display=swap" rel="stylesheet">
+
+            <link rel="preconnect" href="https://fonts.googleapis.com">
+            <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
+            <link href="https://fonts.googleapis.com/css2?family=Ubuntu:wght@700&display=swap" rel="stylesheet">
+            <link rel="preconnect" href="https://fonts.googleapis.com">
+            <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
+            <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@200;300&display=swap" rel="stylesheet">
+            <link rel="preconnect" href="https://fonts.googleapis.com">
+            <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
+            <link href="https://fonts.googleapis.com/css2?family=Montserrat+Alternates&display=swap" rel="stylesheet">
+            <link rel="stylesheet" href="{{ asset('css/pnotify/pnotify.min.css') }}">
+            <link href="{{ asset('css/noty/lib/noty.css') }}" rel="stylesheet" type="text/css">
+       </head>
+       <style>
+
+            body {
+                font-family: 'Oswald', sans-serif;
+                font-family: 'Quicksand', sans-serif;
+            }
+            h1, h2, h3, h4, h6 {
+                font-family:Ubuntu !important;
+            }
+            h5{
+                font-family: 'Montserrat Alternates', sans-serif !important;
+            }
+            .bg-half-170 {
+            padding:0px;
+            }
+            .tmail{
+                color: #a7a7a7; 
+                text-align: center; 
+                margin: 0px;
+            }
+       </style>
+        <section>
+        <div class="container mt-5 mb-5">
+                <div class="col-md-12">
+                    <div class="row">
+                        <div class="col-md-1"></div>
+                        <div class="col-md-9">
+                            <div class="card rounded border-0 shadow p-5" style="background-color:white;">
+                                <h3 style="text-align: center; font-family:Ubuntu !important; color: #3c4858 !important; font-size: 30px !important;">Research Admission</h3>
+                                <p class="mt-5">Dear {{ $name }},</p> 
+                                    <p class="mt-3">I hope this email finds you well. </p>
+                                    <p class="mt-2">Thank you for choosing Research Admission platform. We're confident our platform will exceed your expectations.</p> 
+                                    <p class="mt-2">We're excited to have you on board!</p>
+                                    <p class="mt-2" style="margin: 0px;">Best regards,</p>
+                                    <p>Research Admission</p>
+                                     <div style="border-top: 1px solid #eee;">
+                                        <p class="mt-3 tmail" style="font-style: italic;">This email was sent to example@gmail.com</p>
+                                    </div>
+                                    <p class="mt-3 tmail" style="font-size: 12px;">Copyright © 2023 Research Admission</p>
+                            </div>
+                        </div>
+                    </div><!--end row-->
+                </div>
+            </div> <!--end container-->
+        </section><!--end section-->
+        <!-- Hero End -->
+
+        <!-- javascript -->
+        <script src="{{asset('web/js/bootstrap.bundle.min.js')}}"></script>
+        <!-- tobii js -->
+        <script src="{{asset('web/js/tobii.min.js')}}"></script>
+        <!-- SLIDER -->
+        <script src="{{asset('web/js/tiny-slider.js')}}"></script>
+        <!-- Icons -->
+        <script src="{{asset('web/js/feather.min.js')}}"></script>
+        <!-- Main Js -->
+        <script src="{{asset('web/js/plugins.init.js')}}"></script>
+        <script src="{{asset('web/js/app.js')}}"></script>
+        <script src="{{ asset('css/pnotify/pnotify.js') }}"></script>
+        <script src="{{ asset('css/noty/lib/noty.min.js') }}"></script>
+        </body>
+  </html>

+ 124 - 0
resources/views/email/q_form_email.blade.php

@@ -0,0 +1,124 @@
+<!DOCTYPE html>
+    <html lang="en">
+        <head>
+            <meta charset="utf-8" />
+            <title>Research Admission</title>
+            <meta name="viewport" content="width=device-width, initial-scale=1.0">
+            <meta name="description" content="Information & Guidance on the PhD Process, Connect with Supervisor and Many" />
+            <meta name="keywords" content="" />
+
+            <!-- facebook tags -->
+            <meta property="og:url" content="http://www.facebook.com/researchadmission"/>
+            <meta property="og:type" content="website"/>
+            <meta property="og:title" content="Research Admission"/>
+            <meta property="og:description" content="Information & Guidance on the PhD Process, Connect with Supervisor and Many"/>
+            <!-- Linkedin tags -->
+            <meta property="og:url" content="https://www.linkedin.com/company/researchadmission"/>
+            <meta property="og:type" content="website"/>
+            <meta property="og:title" content="Research Admission"/>
+            <meta property="og:description" content="Information & Guidance on the PhD Process, Connect with Supervisor and Many"/>
+
+            <!-- favicon -->
+            <link rel="shortcut icon" href="{{asset('web/images/logo.png') }}">
+            <!-- Bootstrap -->
+            <link href="{{ asset('web/css/bootstrap.min.css') }}" rel="stylesheet" type="text/css" />
+            <!-- tobii css -->
+            <link href="{{asset('web/css/tobii.min.css')}}" rel="stylesheet" type="text/css" />
+            <!-- Icons -->
+            <link href="{{asset('web/css/materialdesignicons.min.css')}}" rel="stylesheet" type="text/css" />
+            <link rel="stylesheet" type="text/css" href="{{ asset('web/stylesheets/font-awesome.min.css') }}" />
+            <link rel="stylesheet" href="https://unicons.iconscout.com/release/v3.0.6/css/line.css">
+            <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css">
+
+            <!-- Slider -->
+            <link rel="stylesheet" href="{{asset('web/css/tiny-slider.css')}}"/>
+            <!-- Main Css -->
+            <link href="{{asset('web/css/style.css')}}" rel="stylesheet" type="text/css" id="theme-opt" />
+            <link href="{{asset('web/css/colors/default.css')}}" rel="stylesheet" id="color-opt">
+            <link rel="preconnect" href="https://fonts.googleapis.com">
+            <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
+            <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;900&display=swap" rel="stylesheet">
+
+            <link rel="preconnect" href="https://fonts.googleapis.com">
+            <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
+            <link href="https://fonts.googleapis.com/css2?family=Ubuntu:wght@700&display=swap" rel="stylesheet">
+            <link rel="preconnect" href="https://fonts.googleapis.com">
+            <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
+            <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@200;300&display=swap" rel="stylesheet">
+            <link rel="preconnect" href="https://fonts.googleapis.com">
+            <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
+            <link href="https://fonts.googleapis.com/css2?family=Montserrat+Alternates&display=swap" rel="stylesheet">
+            <link rel="stylesheet" href="{{ asset('css/pnotify/pnotify.min.css') }}">
+            <link href="{{ asset('css/noty/lib/noty.css') }}" rel="stylesheet" type="text/css">
+       </head>
+       <style>
+
+            body {
+                font-family: 'Oswald', sans-serif;
+                font-family: 'Quicksand', sans-serif;
+            }
+            h1, h2, h3, h4, h6 {
+                font-family:Ubuntu !important;
+            }
+            h5{
+                font-family: 'Montserrat Alternates', sans-serif !important;
+            }
+            .bg-half-170 {
+            padding:0px;
+            }
+            .tmail{
+                color: #a7a7a7; 
+                text-align: center; 
+                margin: 0px;
+            }
+       </style>
+        <section>
+        <div class="container mt-5 mb-5">
+                <div class="col-md-12">
+                    <div class="row">
+                        <div class="col-md-1"></div>
+                        <div class="col-md-9">
+                            <div class="card rounded border-0 shadow p-5" style="background-color:white;">
+                                <h3 style="text-align: center; font-family:Ubuntu !important; color: #3c4858 !important; font-size: 30px !important;">Research Admission</h3>
+                                <p class="mt-5">Dear {{ $name }},</p>
+                                @php
+                                    $hashids = new \Hashids\Hashids('student_wishlist_signup', 25);
+                                @endphp
+                                    <p class="mt-3">I hope this email finds you well. </p>
+                                    <p class="mt-2">I appreciate your initiative to contact me regarding your research admission interest. To proceed further, I would request you to please submit your research proposal using the following link</p>
+                                    <a href="{{ url('register/'.$hashids->encode($student_id)) }}">click here</a>
+                                    <p class="mt-2">The portal will guide you through the submission process and provide you with all the necessary information required for your submission. It will provide you with real-time updates on the status of your proposal as well.</p>
+                                    <p class="mt-2">In case you face any issues during the submission process, please use my Account Reference Number (ARN) and submit your proposal. This will ensure that your proposal reaches to me without any delay or technical difficulty.</p>
+                                    <p class="mt-2">I am looking forward to reviewing your research proposal and I hope to hear from you soon. If you have any further questions, please do not hesitate to contact me.</p>
+                                    <p class="mt-2" style="margin: 0px;">Best regards,</p>
+                                    <h5>{{ $teacher }}</h5>
+                                    <h5>{{ $designation }}</h5>
+                                    <h5>{{ $department }}</h5>
+                                    <h5>{{ $university }}</h5>
+                                     <div style="border-top: 1px solid #eee;">
+                                        <p class="mt-3 tmail" style="font-style: italic;">This email was sent to example@gmail.com</p>
+                                    </div>
+                                    <p class="mt-3 tmail" style="font-size: 12px;">Copyright © 2023 Research Admission</p>
+                            </div>
+                        </div>
+                    </div><!--end row-->
+                </div>
+            </div> <!--end container-->
+        </section><!--end section-->
+        <!-- Hero End -->
+
+        <!-- javascript -->
+        <script src="{{asset('web/js/bootstrap.bundle.min.js')}}"></script>
+        <!-- tobii js -->
+        <script src="{{asset('web/js/tobii.min.js')}}"></script>
+        <!-- SLIDER -->
+        <script src="{{asset('web/js/tiny-slider.js')}}"></script>
+        <!-- Icons -->
+        <script src="{{asset('web/js/feather.min.js')}}"></script>
+        <!-- Main Js -->
+        <script src="{{asset('web/js/plugins.init.js')}}"></script>
+        <script src="{{asset('web/js/app.js')}}"></script>
+        <script src="{{ asset('css/pnotify/pnotify.js') }}"></script>
+        <script src="{{ asset('css/noty/lib/noty.min.js') }}"></script>
+        </body>
+  </html>

+ 9 - 2
resources/views/email/teacher_invited_email.blade.php

@@ -82,7 +82,7 @@
                                 <h3 style="text-align: center; font-family:Ubuntu !important; color: #3c4858 !important; font-size: 30px !important;">Research Admission</h3>
                                 <p class="mt-5">Dear {{ $name }},</p>
                                 @php
-                                    $hashids = new \Hashids\Hashids('teacher_wishlist_signup', 25);
+                                    $hashids = new \Hashids\Hashids('teacher_invitation_signup', 25);
                                 @endphp
                                 <p class="mt-3"> We are reaching out to you regarding an exciting opportunity that we believe will interest you. As a teacher and supervisor, we understand that you must receive countless emails from doctoral applicants who are seeking to work with you on their research projects. Keeping track of all these emails can be a daunting task.</p>
                                 <p class="mt-2"> That's why we wanted to introduce you to a free tool that can make your life a lot easier. This tool is designed to help you manage all your doctoral applicants proposals in one place. With just three simple steps, applicants can submit their proposals to you, and you will receive email notifications each time a new proposal is submitted.</p>
@@ -90,7 +90,14 @@
                                 <p class="mt-2"> The best part? Many faculties across the world are already using this tool, and it has been proven to be effective in streamlining the application process for doctoral applicants.</p>
                                 <p class="mt-2"> At this point, registration is by invitation only, and we would like to extend an invitation to you to explore the many features that this tool offers. Your data will be 100% secure and will not be accessible or shared with any third party.</p>
                                 <p class="mt-2" style="font-weight: bolder !important;"> To get started, please follow the link below to create your account and begin exploring the system's features.</p>
-                                <a href="{{ url('register-v2/'.$hashids->encode($teacher_id)) }}" style="font-weight: bolder !important;"> click here</a>
+                                @php
+                                    $already_registared =\App\User::where('email',$email)->where('sign_up',1)->first();
+                                @endphp
+                                @if($already_registared)
+                                    <a href="{{ url('login-v2') }}" style="font-weight: bolder !important;"> click here</a>
+                                @else
+                                    <a href="{{ url('register-v2/'.$hashids->encode($teacher_id)) }}" style="font-weight: bolder !important;"> click here</a>
+                                @endif
                                 <p class="mt-2"> Thank you for your time, and we hope you find this tool as helpful as we have.</p>
                                 <p class="mt-2" style="margin: 0px;">Best regards,</p>
                                 <h4 style="font-weight: 300 !important;"> Research Admission  </h4>

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

@@ -323,7 +323,7 @@
                                         <p class="text-muted1 mt-4 text-left" style="font-size: 14px !important;">Pre-screening proposals can optimize the application process for supervisors and candidates. By using a tool to collect and organize information, including the proposal, Education Profile, English Proficiency, and Work Experience, supervisors can filter out unqualified applicants and provide feedback to candidates before they invest more time.</p>
                                         <p class="text-muted1 mt-4 text-left" style="font-size: 14px !important;">The tool's centralized communication system saves time and enhances the applicant experience. Utilizing this efficient tool improves the quality of the candidate pool and allows supervisors to spend more time evaluating and nurturing potential candidates.</p>
                                         <div style="display: flex; justify-content: center;">
-                                            <p class="mt-4 mb-4"><span class="master-link secondary open_modal_page hand" data-title="Register Your Interest" data-url="{{route('modal-get',['name'=>'landing_ragister_your_interest'])}}"><strong style="font-weight: bolder !important; cursor:pointer;">Register Your Interest <i class="fa fa-arrow-right fea icon-sm"></i> </strong> </span></p>    
+                                            <p class="mt-4 mb-4"><span class="master-link secondary open_modal_page hand" data-title="Register Your Interest" data-url="{{route('modal-get',['name'=>'landing_ragister_form'])}}"><strong style="font-weight: bolder !important; cursor:pointer;">Register Your Interest <i class="fa fa-arrow-right fea icon-sm"></i> </strong> </span></p>    
                                         </div>
                                     </div>
                                 </div>

+ 3 - 2
resources/views/modal_pages/landing_ragister_your_interest.blade.php → resources/views/modal_pages/landing_ragister_form.blade.php

@@ -57,12 +57,13 @@
                         <div class="col-lg-6">
                             <div class="mb-3">
                                 <label class="form-label"></label>
-                                <select class="form-control" name="university_id">
+                                <input type="text" class="form-control" placeholder="University" name="university" required="">
+                                {{-- <select class="form-control" name="university_id">
                                     <option selected disabled>Select University</option>
                                     @foreach($universities as $row)
                                         <option value="{{$row->id}}">{{$row->name}}</option>
                                     @endforeach
-                                </select>
+                                </select> --}}
                                 
                             </div>
                         </div><!--end col-->

+ 516 - 357
resources/views/profile.blade.php

@@ -214,12 +214,22 @@
                                                                                     <label class="form-check-label" style="font-size: 12px;font-weight:bold;">Yes</label>
                                                                                 </div>
                                                                             </div>
+                                                                            @if(count($publications) > 0)
+                                                                            <div class="pretty p-default p-round">
+                                                                                <input type="radio" class="all_publication_delete"  data-id="{{$user_info->id}}" name="is_publication" value="no" {{ Auth::user()->is_publication == 2 ? 'checked' : ''}} @if($is_freez_profile) disabled @endif>
+                                                                                <div class="state p-primary">
+                                                                                    <label class="form-check-label" style="font-size: 12px; font-weight:bold;">No</label>
+                                                                                </div>
+                                                                            </div> 
+                                                                            @else
                                                                             <div class="pretty p-default p-round">
                                                                                 <input type="radio" class="is_publication"  data-id="{{$user_info->id}}" name="is_publication" value="no" {{ Auth::user()->is_publication == 2 ? 'checked' : ''}} @if($is_freez_profile) disabled @endif>
                                                                                 <div class="state p-primary">
                                                                                     <label class="form-check-label" style="font-size: 12px; font-weight:bold;">No</label>
                                                                                 </div>
                                                                             </div> 
+
+                                                                            @endif
                                                                         </div>
                                                                     </div>
                                                                                                 
@@ -295,12 +305,22 @@
                                                                                         <label class="form-check-label" style="font-size: 12px;font-weight:bold;">Yes</label>
                                                                                     </div>
                                                                                 </div>
+                                                                                @if(count($institution) > 0)
+                                                                                <div class="pretty p-default p-round">
+                                                                                    <input type="radio" class="all_education_history_delete" data-id="{{$user_info->id}}" name="is_education" value="no" {{ Auth::user()->is_education == 2 ? 'checked' : ''}} @if($is_freez_profile) disabled @endif>
+                                                                                    <div class="state p-primary">
+                                                                                        <label class="form-check-label" style="font-size: 12px; font-weight:bold;">No</label>
+                                                                                    </div>
+                                                                                </div>
+                                                                                @else
                                                                                 <div class="pretty p-default p-round">
                                                                                     <input type="radio" class="is_education" data-id="{{$user_info->id}}" name="is_education" value="no" {{ Auth::user()->is_education == 2 ? 'checked' : ''}} @if($is_freez_profile) disabled @endif>
                                                                                     <div class="state p-primary">
                                                                                         <label class="form-check-label" style="font-size: 12px; font-weight:bold;">No</label>
                                                                                     </div>
-                                                                                </div> 
+                                                                                </div>
+                                                                                
+                                                                                @endif
                                                                             </div>
                                                                         </div>
                                                                         <div class="col-md-6">
@@ -503,12 +523,22 @@
                                                                             <label class="form-check-label" style="font-size: 12px;font-weight:bold;">Yes</label>
                                                                         </div>
                                                                     </div>
+                                                                    @if(count($work_experience) > 0)
+                                                                    <div class="pretty p-default p-round">
+                                                                        <input type="radio" class="all_work_experience_delete" data-id="{{$user_info->id}}" name="work_experience" value="no" {{ Auth::user()->is_work_experience == 2 ? 'checked' : ''}} @if($is_freez_profile) disabled @endif>
+                                                                        <div class="state p-primary">
+                                                                            <label class="form-check-label" style="font-size: 12px; font-weight:bold;">No</label>
+                                                                        </div>
+                                                                    </div> 
+                                                                    @else
                                                                     <div class="pretty p-default p-round">
                                                                         <input type="radio" class="work_experience" data-id="{{$user_info->id}}" name="work_experience" value="no" {{ Auth::user()->is_work_experience == 2 ? 'checked' : ''}} @if($is_freez_profile) disabled @endif>
                                                                         <div class="state p-primary">
                                                                             <label class="form-check-label" style="font-size: 12px; font-weight:bold;">No</label>
                                                                         </div>
                                                                     </div> 
+
+                                                                    @endif
                                                                 </div>
                                                             </div>
                                                                                         
@@ -672,12 +702,21 @@
                                                                                 <label class="form-check-label" style="font-size: 12px;font-weight:bold;">Yes</label>
                                                                             </div>
                                                                         </div>
+                                                                        @if(count($score) > 0)
+                                                                        <div class="pretty p-default p-round">
+                                                                            <input type="radio" class="all_test_score_delete" data-id="{{$user_info->id}}" name="is_test_score" value="no" {{ Auth::user()->is_test_score == 2 ? 'checked' : ''}} @if($is_freez_profile) disabled @endif>
+                                                                            <div class="state p-primary">
+                                                                                <label class="form-check-label" style="font-size: 12px; font-weight:bold;">No</label>
+                                                                            </div>
+                                                                        </div>
+                                                                        @else
                                                                         <div class="pretty p-default p-round">
                                                                             <input type="radio" class="is_test_score" data-id="{{$user_info->id}}" name="is_test_score" value="no" {{ Auth::user()->is_test_score == 2 ? 'checked' : ''}} @if($is_freez_profile) disabled @endif>
                                                                             <div class="state p-primary">
                                                                                 <label class="form-check-label" style="font-size: 12px; font-weight:bold;">No</label>
                                                                             </div>
                                                                         </div>
+                                                                        @endif
                                                                     </div>
                                                                 </div>
                                                                 <div class="col-md-6 mt-2" id="add_test_score" @if(Auth::user()->is_test_score == 2 || Auth::user()->is_test_score == NULL) style="display:none;" @endif>
@@ -791,17 +830,82 @@
                                 </div><!--end row-->
                             </div><!--end container-->
                         </div>
-                </div><!--end row-->
-            </div><!--end container-->
-        </section><!--end section-->
-        <!-- Hero End -->
-
+                    </div><!--end row-->
+                </div><!--end container-->
+            </section><!--end section-->
+            <!-- Hero End -->
+            
 @endsection
-@push('js')
+@push('js') 
 
 <script type="text/javascript">
     $( function() {
-         
+        
+        fetch_sub_content(
+            '#publication_load',
+            "{{ route('sub-content', ['name'=>'publication_list_load']) }}"
+        );
+        
+        fetch_sub_content(
+            '#education_history_load',
+            "{{ route('sub-content', ['name'=>'education_history_load']) }}"
+        );
+        
+        
+        fetch_sub_content(
+            '#work_experience_load',
+            "{{ route('sub-content', ['name'=>'work_experience_load']) }}"
+        );
+            
+        fetch_sub_content(
+            '#english_languge_proficiency_load',
+            "{{ route('sub-content', ['name'=>'english_languge_proficiency_load']) }}"
+        );
+
+        $('.btn-proposal-open').on('click', function(){ 
+            $('.proposal_info').show();
+        });
+
+
+        $('.btn-proposal-cancel').on('click', function(){ 
+            $('.proposal_info').hide();
+        });
+
+        $('.btn-publication-open').on('click', function(){ 
+            $('.publication_info').show();
+        });
+
+
+        $('.btn-publication-cancel').on('click', function(){ 
+            $('.publication_info').hide();
+        });
+
+        $('.btn-education-open').on('click', function(){ 
+            $('.education_info').show();
+        });
+
+
+        $('.btn-education-cancel').on('click', function(){ 
+            $('.education_info').hide();
+        });
+
+        $('.btn-workexp-open').on('click', function(){ 
+            $('.workexp_info').show();
+        });
+
+
+        $('.btn-workexp-cancel').on('click', function(){ 
+            $('.workexp_info').hide();
+        });
+
+        $('.btn-score-open').on('click', function(){ 
+            $('.score_info').show();
+        });
+
+
+        $('.btn-score-cancel').on('click', function(){ 
+            $('.score_info').hide();
+        });
 
         var form_row_added=false;
 
@@ -826,401 +930,456 @@
                 "{{ route('sub-content', ['name'=>'edit_proposal']) }}?p_id="+p_id
             ); 
              
+        }); 
+      
+
+        $('.delete_education').on('click', function(e) {
+            e.preventDefault();  
+            var delete_url="{{ url('education-remove') }}/"+$(this).data('id');
+            swal({
+                title: "Are you sure?",
+                text: "You will not be able to recover this data!",
+                type: "warning",
+                showCancelButton: true,
+                buttonsStyling: false,
+                confirmButtonClass: 'btn btn-primary',
+                cancelButtonClass: 'btn btn-light',
+                confirmButtonText: "Yes, delete!",
+                cancelButtonText: "No, cancel!"
+            },
+            function(isConfirm){
+                if(isConfirm){
+                    $.ajax({
+                        url:delete_url,
+                        type: "GET",
+                        success: function(data){
+                            setTimeout(function() { location.reload(); }, 1000);
+                        }
+                    });
+                }
+            });
         });
-    }); 
 
-      
 
-    $('.delete_education').on('click', function(e) {
-        e.preventDefault();  
-        var delete_url="{{ url('education-remove') }}/"+$(this).data('id');
-        swal({
-            title: "Are you sure?",
-            text: "You will not be able to recover this data!",
-            type: "warning",
-            showCancelButton: true,
-            buttonsStyling: false,
-            confirmButtonClass: 'btn btn-primary',
-            cancelButtonClass: 'btn btn-light',
-            confirmButtonText: "Yes, delete!",
-            cancelButtonText: "No, cancel!"
-        },
-        function(isConfirm){
-            if(isConfirm){
-                $.ajax({
-                    url:delete_url,
-                    type: "GET",
-                    success: function(data){
-                        setTimeout(function() { location.reload(); }, 1000);
-                    }
-                });
-            }
+        $('.delete_work').on('click', function(e) {
+            e.preventDefault();  
+            var delete_url="{{ url('work-remove') }}/"+$(this).data('id');
+            swal({
+                title: "Are you sure?",
+                text: "You will not be able to recover this data!",
+                type: "warning",
+                showCancelButton: true,
+                buttonsStyling: false,
+                confirmButtonClass: 'btn btn-primary',
+                cancelButtonClass: 'btn btn-light',
+                confirmButtonText: "Yes, delete!",
+                cancelButtonText: "No, cancel!"
+            },
+            function(isConfirm){
+                if(isConfirm){
+                    $.ajax({
+                        url:delete_url,
+                        type: "GET",
+                        success: function(data){
+                            setTimeout(function() { location.reload(); }, 1000);
+                        }
+                    });
+                }
+            });
         });
-    });
-    $('.delete_work').on('click', function(e) {
-        e.preventDefault();  
-        var delete_url="{{ url('work-remove') }}/"+$(this).data('id');
-        swal({
-            title: "Are you sure?",
-            text: "You will not be able to recover this data!",
-            type: "warning",
-            showCancelButton: true,
-            buttonsStyling: false,
-            confirmButtonClass: 'btn btn-primary',
-            cancelButtonClass: 'btn btn-light',
-            confirmButtonText: "Yes, delete!",
-            cancelButtonText: "No, cancel!"
-        },
-        function(isConfirm){
-            if(isConfirm){
-                $.ajax({
-                    url:delete_url,
-                    type: "GET",
-                    success: function(data){
-                        setTimeout(function() { location.reload(); }, 1000);
-                    }
-                });
-            }
+
+        $('.delete_score').on('click', function(e) {
+            e.preventDefault();  
+            var delete_url="{{ url('score-remove') }}/"+$(this).data('id');
+            swal({
+                title: "Are you sure?",
+                text: "You will not be able to recover this data!",
+                type: "warning",
+                showCancelButton: true,
+                buttonsStyling: false,
+                confirmButtonClass: 'btn btn-primary',
+                cancelButtonClass: 'btn btn-light',
+                confirmButtonText: "Yes, delete!",
+                cancelButtonText: "No, cancel!"
+            },
+            function(isConfirm){
+                if(isConfirm){
+                    $.ajax({
+                        url:delete_url,
+                        type: "GET",
+                        success: function(data){
+                            setTimeout(function() { location.reload(); }, 1000);
+                        }
+                    });
+                }
+            });
         });
-    });
-    $('.delete_score').on('click', function(e) {
-        e.preventDefault();  
-        var delete_url="{{ url('score-remove') }}/"+$(this).data('id');
-        swal({
-            title: "Are you sure?",
-            text: "You will not be able to recover this data!",
-            type: "warning",
-            showCancelButton: true,
-            buttonsStyling: false,
-            confirmButtonClass: 'btn btn-primary',
-            cancelButtonClass: 'btn btn-light',
-            confirmButtonText: "Yes, delete!",
-            cancelButtonText: "No, cancel!"
-        },
-        function(isConfirm){
-            if(isConfirm){
-                $.ajax({
-                    url:delete_url,
-                    type: "GET",
-                    success: function(data){
-                        setTimeout(function() { location.reload(); }, 1000);
-                    }
-                });
-            }
+
+        $('.delete_proposal').on('click', function(e) {
+            e.preventDefault();  
+            var delete_url="{{ url('proposal-remove') }}/"+$(this).data('id');
+            swal({
+                title: "Are you sure?",
+                text: "You will not be able to recover this data!",
+                type: "warning",
+                showCancelButton: true,
+                buttonsStyling: false,
+                confirmButtonClass: 'btn btn-primary',
+                cancelButtonClass: 'btn btn-light',
+                confirmButtonText: "Yes, delete!",
+                cancelButtonText: "No, cancel!"
+            },
+            function(isConfirm){
+                if(isConfirm){
+                    $.ajax({
+                        url:delete_url,
+                        type: "GET",
+                        success: function(data){
+                            setTimeout(function() { location.reload(); }, 1000);
+                        }
+                    });
+                }
+            });
         });
-    });
-    $('.delete_proposal').on('click', function(e) {
-        e.preventDefault();  
-        var delete_url="{{ url('proposal-remove') }}/"+$(this).data('id');
-        swal({
-            title: "Are you sure?",
-            text: "You will not be able to recover this data!",
-            type: "warning",
-            showCancelButton: true,
-            buttonsStyling: false,
-            confirmButtonClass: 'btn btn-primary',
-            cancelButtonClass: 'btn btn-light',
-            confirmButtonText: "Yes, delete!",
-            cancelButtonText: "No, cancel!"
-        },
-        function(isConfirm){
-            if(isConfirm){
-                $.ajax({
-                    url:delete_url,
-                    type: "GET",
-                    success: function(data){
-                        setTimeout(function() { location.reload(); }, 1000);
-                    }
-                });
-            }
+
+        $('.is_attended_conference').on('change', function(){
+            var self =$(this);
+            var checked =self.val(); 
+            var uid= self.data('id');
+
+            var form_data={
+                _token :"{{csrf_token()}}",
+                'checked':checked,
+                'uid':uid,
+                }
+
+            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'=>'is_attended_conference_status']) }}", form_data, function(res){
+                        pop_up_msg(res.msg);
+                        //window.location.reload();
+
+                    }).fail(function(err){
+
+                        pop_up_msg(err_msg(err), 'error');
+
+                    });
+                }else{
+                    window.location.reload();
+                }
+            });
         });
-    });
 
-    $('.is_attended_conference').on('change', function(){
-        var self =$(this);
-        var checked =self.val(); 
-        var uid= self.data('id');
+        $('#submit_publication').on('click', function(){
 
-        var form_data={
-            _token :"{{csrf_token()}}",
-            'checked':checked,
-            'uid':uid,
-            }
+            var publication =$('#publication').val();
+            var status =$('#publication_status option:selected').val(); 
 
-        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'=>'is_attended_conference_status']) }}", form_data, function(res){
-                    pop_up_msg(res.msg);
-                    //window.location.reload();
-
-                }).fail(function(err){
-
-                    pop_up_msg(err_msg(err), 'error');
-
-                });
-            }else{
-                window.location.reload();
+            var form_data={
+                _token: "{{ csrf_token() }}",
+                publication: publication,
+                status: status, 
             }
-        });
-    });
 
-    $('#submit_publication').on('click', function(){
+            $.post("{{ route('ajax-post', ['name'=>'add_proposal_publication']) }}", form_data, function(res){
+                pop_up_msg(res.msg);
 
-        var publication =$('#publication').val();
-        var status =$('#publication_status option:selected').val(); 
+                $('#publication').val('');
+                $('#publication_status').val('');
 
-        var form_data={
-            _token: "{{ csrf_token() }}",
-            publication: publication,
-            status: status, 
-        }
+                fetch_sub_content(
+                    '#publication_load',
+                    "{{ route('sub-content', ['name'=>'publication_list_load']) }}"
+                );
 
-        $.post("{{ route('ajax-post', ['name'=>'add_proposal_publication']) }}", form_data, function(res){
-            pop_up_msg(res.msg);
+            }).fail(function(err){
 
-            $('#publication').val('');
-            $('#publication_status').val('');
+                pop_up_msg(err_msg(err), 'error');
 
-            fetch_sub_content(
-                '#publication_load',
-                "{{ route('sub-content', ['name'=>'publication_list_load']) }}"
-            );
+            });
+        });
 
-        }).fail(function(err){
 
-            pop_up_msg(err_msg(err), 'error');
+        $(".is_publication").on('click',function(){ 
+            var self =$(this);
+            var value =self.val();
+            var uid= self.data('id');
+            var form_data={
+                _token :"{{csrf_token()}}",
+                'value':value,
+                'uid':uid,
+                }
 
-        });
-    });
-
-    fetch_sub_content(
-        '#publication_load',
-        "{{ route('sub-content', ['name'=>'publication_list_load']) }}"
-    );
-
-    fetch_sub_content(
-        '#education_history_load',
-        "{{ route('sub-content', ['name'=>'education_history_load']) }}"
-    );
-
-    fetch_sub_content(
-        '#english_languge_proficiency_load',
-        "{{ route('sub-content', ['name'=>'english_languge_proficiency_load']) }}"
-    );
-    
-    fetch_sub_content(
-        '#work_experience_load',
-        "{{ route('sub-content', ['name'=>'work_experience_load']) }}"
-    );
-
-    $(".is_publication").on('click',function(){ 
-        var self =$(this);
-        var value =self.val();
-        var uid= self.data('id');
-        var form_data={
-            _token :"{{csrf_token()}}",
-            'value':value,
-            'uid':uid,
-            }
+            $.post("{{ route('ajax-post', ['name'=>'publication_status_update']) }}", form_data, function(res){
+                pop_up_msg(res.msg); 
 
-        $.post("{{ route('ajax-post', ['name'=>'publication_status_update']) }}", form_data, function(res){
-            pop_up_msg(res.msg); 
+            }).fail(function(err){
 
-        }).fail(function(err){
+                pop_up_msg(err_msg(err), 'error');
 
-            pop_up_msg(err_msg(err), 'error');
+            });
 
+            if(value=="yes"){ 
+                $('#add_publication').css("display", "block");
+            }else{
+                $('#add_publication').css("display", "none");
+            }
+        
         });
 
-        if(value=="yes"){ 
-            $('#add_publication').css("display", "block");
-        }else{
-            $('#add_publication').css("display", "none");
-        }
-       
-    });
-
-    $(".is_education").on('click',function(){ 
-        var self =$(this);
-        var value =self.val();
-        var uid= self.data('id');
-        var form_data={
-            _token :"{{csrf_token()}}",
-            'value':value,
-            'uid':uid,
+        $(".is_education").on('click',function(){ 
+            var self =$(this);
+            var value =self.val();
+            var uid= self.data('id');
+            var form_data={
+                _token :"{{csrf_token()}}",
+                'value':value,
+                'uid':uid,
+                }
+
+            $.post("{{ route('ajax-post', ['name'=>'education_status_update']) }}", form_data, function(res){
+                pop_up_msg(res.msg); 
+
+            }).fail(function(err){
+
+                pop_up_msg(err_msg(err), 'error');
+
+            });
+
+            if(value=="yes"){ 
+                $('#add_education').css("display", "block");
+            }else{
+                $('#add_education').css("display", "none");
             }
+        
+        }); 
 
-        $.post("{{ route('ajax-post', ['name'=>'education_status_update']) }}", form_data, function(res){
-            pop_up_msg(res.msg); 
+        $(".work_experience").on('click',function(){ 
+            var self =$(this);
+            var value =self.val();
+            var uid= self.data('id');
+            var form_data={
+                _token :"{{csrf_token()}}",
+                'value':value,
+                'uid':uid,
+                }
 
-        }).fail(function(err){
+            $.post("{{ route('ajax-post', ['name'=>'work_experience_status_update']) }}", 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');
 
-        if(value=="yes"){ 
-            $('#add_education').css("display", "block");
-        }else{
-            $('#add_education').css("display", "none");
-        }
-       
-    }); 
-
-    $(".work_experience").on('click',function(){ 
-        var self =$(this);
-        var value =self.val();
-        var uid= self.data('id');
-        var form_data={
-            _token :"{{csrf_token()}}",
-            'value':value,
-            'uid':uid,
+            });
+
+            if(value=="yes"){ 
+                $('#add_work').css("display", "block");
+            }else{
+                $('#add_work').css("display", "none");
             }
+        
+        });
 
-        $.post("{{ route('ajax-post', ['name'=>'work_experience_status_update']) }}", form_data, function(res){
-            pop_up_msg(res.msg);
-            //window.location.reload();
+        $(".is_test_score").on('click',function(){ 
+            var self =$(this);
+            var value =self.val();
+            var uid= self.data('id');
+            var form_data={
+                _token :"{{csrf_token()}}",
+                'value':value,
+                'uid':uid,
+                }
 
-        }).fail(function(err){
+            $.post("{{ route('ajax-post', ['name'=>'test_score_status_update']) }}", 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');
+
+            });
+
+            if(value=="yes"){ 
+                $('#add_test_score').css("display", "block");
+            }else{
+                $('#add_test_score').css("display", "none");
+            }
+        
         });
 
-        if(value=="yes"){ 
-            $('#add_work').css("display", "block");
-        }else{
-            $('#add_work').css("display", "none");
-        }
-       
-    });
-
-    $(".is_test_score").on('click',function(){ 
-        var self =$(this);
-        var value =self.val();
-        var uid= self.data('id');
-        var form_data={
-            _token :"{{csrf_token()}}",
-            'value':value,
-            'uid':uid,
+        $(".all_publication_delete").on('click',function(){ 
+            var self =$(this); 
+            var uid= self.data('id');
+            var form_data={
+                _token :"{{csrf_token()}}", 
+                'uid':uid,
             }
 
-        $.post("{{ route('ajax-post', ['name'=>'test_score_status_update']) }}", form_data, function(res){
-            pop_up_msg(res.msg);
-            //window.location.reload();
+            swal({
+                title: "Are you sure?",
+                text: "You will not be able to recover this data!",
+                type: "warning",
+                showCancelButton: true,
+                buttonsStyling: false,
+                confirmButtonClass: 'btn btn-primary',
+                cancelButtonClass: 'btn btn-light',
+                confirmButtonText: "Yes, delete!",
+                cancelButtonText: "No, cancel!"
+            },
+            function(isConfirm){
+                if(isConfirm){
+                    $.post("{{ route('ajax-post', ['name'=>'all_publication_delete']) }}", form_data, function(res){
+                        pop_up_msg(res.msg);
+                        //window.location.reload();
+                        fetch_sub_content(
+                            '#publication_load',
+                            "{{ route('sub-content', ['name'=>'publication_list_load']) }}"
+                        );
+
+                    }).fail(function(err){
+
+                        pop_up_msg(err_msg(err), 'error');
+
+                    });
+                }
+            }); 
+       
+        });
+        
+        $(".all_education_history_delete").on('click',function(){ 
+            var self =$(this); 
+            var uid= self.data('id');
+            var form_data={
+                _token :"{{csrf_token()}}", 
+                'uid':uid,
+            }
 
-        }).fail(function(err){
+            swal({
+                title: "Are you sure?",
+                text: "You will not be able to recover this data!",
+                type: "warning",
+                showCancelButton: true,
+                buttonsStyling: false,
+                confirmButtonClass: 'btn btn-primary',
+                cancelButtonClass: 'btn btn-light',
+                confirmButtonText: "Yes, delete!",
+                cancelButtonText: "No, cancel!"
+            },
+            function(isConfirm){
+                if(isConfirm){
+                    $.post("{{ route('ajax-post', ['name'=>'all_education_history_delete']) }}", form_data, function(res){
+                        pop_up_msg(res.msg);
+                        //window.location.reload();
+                        fetch_sub_content(
+                            '#education_history_load',
+                            "{{ route('sub-content', ['name'=>'education_history_load']) }}"
+                        );
+
+                    }).fail(function(err){
+
+                        pop_up_msg(err_msg(err), 'error');
+
+                    });
+                }
+            }); 
+       
+        });
 
-            pop_up_msg(err_msg(err), 'error');
+        $(".all_work_experience_delete").on('click',function(){ 
+            var self =$(this); 
+            var uid= self.data('id');
+            var form_data={
+                _token :"{{csrf_token()}}", 
+                'uid':uid,
+            }
 
+            swal({
+                title: "Are you sure?",
+                text: "You will not be able to recover this data!",
+                type: "warning",
+                showCancelButton: true,
+                buttonsStyling: false,
+                confirmButtonClass: 'btn btn-primary',
+                cancelButtonClass: 'btn btn-light',
+                confirmButtonText: "Yes, delete!",
+                cancelButtonText: "No, cancel!"
+            },
+            function(isConfirm){
+                if(isConfirm){
+                    $.post("{{ route('ajax-post', ['name'=>'all_work_experience_delete']) }}", form_data, function(res){
+                        pop_up_msg(res.msg);
+                        //window.location.reload();
+                        fetch_sub_content(
+                            '#work_experience_load',
+                            "{{ route('sub-content', ['name'=>'work_experience_load']) }}"
+                        );
+
+                    }).fail(function(err){
+
+                        pop_up_msg(err_msg(err), 'error');
+
+                    });
+                }
+            }); 
+       
         });
 
-        if(value=="yes"){ 
-            $('#add_test_score').css("display", "block");
-        }else{
-            $('#add_test_score').css("display", "none");
-        }
+
+        $(".all_test_score_delete").on('click',function(){ 
+            var self =$(this); 
+            var uid= self.data('id');
+            var form_data={
+                _token :"{{csrf_token()}}", 
+                'uid':uid,
+            }
+
+            swal({
+                title: "Are you sure?",
+                text: "You will not be able to recover this data!",
+                type: "warning",
+                showCancelButton: true,
+                buttonsStyling: false,
+                confirmButtonClass: 'btn btn-primary',
+                cancelButtonClass: 'btn btn-light',
+                confirmButtonText: "Yes, delete!",
+                cancelButtonText: "No, cancel!"
+            },
+            function(isConfirm){
+                if(isConfirm){
+                    $.post("{{ route('ajax-post', ['name'=>'all_test_score_delete']) }}", form_data, function(res){
+                        pop_up_msg(res.msg);
+                        //window.location.reload();
+                        fetch_sub_content(
+                            '#english_languge_proficiency_load',
+                            "{{ route('sub-content', ['name'=>'english_languge_proficiency_load']) }}"
+                        );
+
+                    }).fail(function(err){
+
+                        pop_up_msg(err_msg(err), 'error');
+
+                    });
+                }
+            }); 
        
-    });
-
-    $('.btn-proposal-open').on('click', function(){ 
-        $('.proposal_info').show();
-    });
-
-
-    $('.btn-proposal-cancel').on('click', function(){ 
-        $('.proposal_info').hide();
-    });
-
-    $('.btn-publication-open').on('click', function(){ 
-        $('.publication_info').show();
-    });
-
-
-    $('.btn-publication-cancel').on('click', function(){ 
-        $('.publication_info').hide();
-    });
-
-    $('.btn-education-open').on('click', function(){ 
-        $('.education_info').show();
-    });
-
-
-    $('.btn-education-cancel').on('click', function(){ 
-        $('.education_info').hide();
-    });
-
-    $('.btn-workexp-open').on('click', function(){ 
-        $('.workexp_info').show();
-    });
-
-
-    $('.btn-workexp-cancel').on('click', function(){ 
-        $('.workexp_info').hide();
-    });
-
-    $('.btn-score-open').on('click', function(){ 
-        $('.score_info').show();
-    });
-
-
-    $('.btn-score-cancel').on('click', function(){ 
-        $('.score_info').hide();
-    });
-
-    function editInstitute(row){       
-        $('#edit-institute').attr("action","{{ url('institution-update') }}/"+row.id);
-        $('#edit-institute').find('select[name="academiclevel"]').val(row.academic_level).trigger('change'); 
-        $('#edit-institute').find('input[name="subject"]').val(row.subject);
-        $('#edit-institute').find('input[name="institution"]').val(row.institution);
-        $('#edit-institute').find('select[name="passingyear"]').val(row.passing_year).trigger('change');
-        $('#edit-institute').find('input[name="result"]').val(row.result);
-        $('#edit-institute').find('select[name="startdate"]').val(new Date(row.start_date).getFullYear()).trigger('change');
-        $('#edit-institute').find('select[name="startmonth"]').val(String(new Date(row.start_date).getUTCMonth() + 1).padStart(2, '0')).trigger('change');
-        $('#edit-institute').find('select[name="enddate"]').val(new Date(row.end_date).getFullYear()).trigger('change');
-        $('#edit-institute').find('select[name="endmonth"]').val(String(new Date(row.end_date).getUTCMonth() + 1).padStart(2, '0')).trigger('change');
-    }
-    function editWork(row){
-        $('#edit-work').attr("action","{{ url('work-update') }}/"+row.id);       
-        $('#edit-work').find('input[name="companyname"]').val(row.company_name); 
-        $('#edit-work').find('input[name="designation"]').val(row.designation);
-        // $('#edit-work').find('input[name="checkbox"]').val(row.checkbox);
-        $('#edit-work').find('select[name="startdate"]').val(new Date(row.start_date).getFullYear()).trigger('change');
-        $('#edit-work').find('select[name="startmonth"]').val(String(new Date(row.start_date).getUTCMonth() + 1).padStart(2, '0')).trigger('change'); 
-        $('#edit-work').find('select[name="enddate"]').val(new Date(row.end_date).getFullYear()).trigger('change');
-        $('#edit-work').find('select[name="endmonth"]').val(String(new Date(row.end_date).getUTCMonth() + 1).padStart(2, '0')).trigger('change');
-    }
-     function editScore(row){  
-        console.log(new Date(row.test_date).toDateString());
-        $('#edit-score').attr("action","{{ url('score-update') }}/"+row.id);            
-        $('#edit-score').find('input[name="testdate"]').val(new Date(row.test_date).toDateString()); 
-        $('#edit-score').find('input[name="expirationdate"]').val(new Date(row.expiration_date).toDateString());
-        $('#edit-score').find('input[name="testname"]').val(row.test_name);
-        $('#edit-score').find('input[name="overallscore"]').val(row.overall_score);
-        $('#edit-score').find('input[name="listening"]').val(row.listening);
-        $('#edit-score').find('input[name="writing"]').val(row.writing);
-        $('#edit-score').find('input[name="reading"]').val(row.reading);
-        $('#edit-score').find('input[name="speaking"]').val(row.speaking);
-    }
-    //   function editProposal(row){   
-    //     // console.log(row); 
-    //     $('#edit-proposal').attr("action","{{ url('proposal-update') }}/"+row.id); 
-    //     $('#edit-proposal').find('input[name="title"]').val(row.title);
-    //     $('#edit-proposal').find('select[name="methology"]').val(row.methology).trigger('change');
-    //     $('#edit-proposal').find('input[name="department"]').val(row.department.name).trigger('change');
-    //     $('#edit-proposal').find('select[name="status"]').val(row.status).trigger('change');
-    //  }
+        }); 
+   }); 
+     
+   
 </script>
 @endpush

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

@@ -376,7 +376,7 @@ tbody, td, tfoot, th, thead, tr {
                                 <div class="flag_country copy" style="display:flex; cursor:pointer;" data-clipboard-text="{{ url('student-q-form/'.$hashids->encode(auth_user('teacher')->id)) }}">
                                     <ul class="nav navbar-nav align-items-center ml-auto header_right ps-2">
                                         <li class="nav-item dropdown dropdown-notification">
-                                            <a href="">
+                                            <a href="javascript:void(0)">
                                                 <i class="fa fa-bolt change_pass_btn" style="padding: 8px 9px;"></i>
                                             </a>
                                         </li>

+ 1 - 1
routes/web.php

@@ -86,7 +86,7 @@ Route::get('/home/search', [App\Http\Controllers\StudentHomeController::class,'r
 
 
 // Teacher
-Route::get('register-v2/{hash}', [App\Http\Controllers\HomeController::class,'wishlist_teacher_register']);
+Route::get('register-v2/{hash}', [App\Http\Controllers\HomeController::class,'invited_register_form']);
 Route::get('register-v2', [App\Http\Controllers\TeacherAuth\RegisterController::class,'showRegistrationForm']);
 Route::post('register-v2/teacher-register-v2', [App\Http\Controllers\TeacherAuth\RegisterController::class,'create'])->name('teacher-register-v2');
 Route::get('/login-v2', [App\Http\Controllers\TeacherAuth\LoginController::class,'showLoginForm']);

+ 15 - 1
sql/update.sql

@@ -171,4 +171,18 @@ ALTER TABLE `users`
 	ADD COLUMN `is_education` TINYINT(1) NULL DEFAULT NULL COMMENT '1=yes, 2=no' AFTER `is_publication`;
 
 ALTER TABLE `users`
-	ADD COLUMN `freez_profile` TINYINT(4) NULL DEFAULT 0 AFTER `id`;
+	ADD COLUMN `freez_profile` TINYINT(4) NULL DEFAULT 0 AFTER `id`; 
+
+ALTER TABLE `users`
+	CHANGE COLUMN `user_type` `user_type` TINYINT(4) NULL DEFAULT NULL COMMENT '1=student, 2=teacher' AFTER `save_as_complete`,
+	CHANGE COLUMN `is_work_experience` `is_work_experience` TINYINT(4) NULL DEFAULT NULL COMMENT '1=yes, 2=no' AFTER `registered_date`,
+	CHANGE COLUMN `is_test_score` `is_test_score` TINYINT(4) NULL DEFAULT NULL COMMENT '1=yes, 2=no' AFTER `is_work_experience`,
+	CHANGE COLUMN `is_publication` `is_publication` TINYINT(4) NULL DEFAULT NULL COMMENT '1=yes, 2=no' AFTER `is_test_score`,
+	CHANGE COLUMN `is_education` `is_education` TINYINT(4) NULL DEFAULT NULL COMMENT '1=yes, 2=no' AFTER `is_publication`,
+	ADD COLUMN `sign_up` TINYINT(4) NULL DEFAULT '0' COMMENT '1=sign_up' AFTER `is_education`;
+
+ALTER TABLE `users`
+	ADD COLUMN `apply_status` TINYINT(4) NULL DEFAULT '0' COMMENT '1=active, 2=in-active, 3=suspend' AFTER `registered_date`;
+
+ALTER TABLE `users`
+	ADD COLUMN `register_type` TINYINT(4) NULL DEFAULT '0' COMMENT '1=invitation, 2=wishlist/landing, 3=q_form' AFTER `sign_up`;