Mostafijur Rahman 1 year ago
parent
commit
139a079781
25 changed files with 353 additions and 169 deletions
  1. 2 2
      app/Http/Controllers/Admin/AdminController.php
  2. 10 6
      app/Http/Controllers/AjaxController.php
  3. 1 0
      app/Http/Controllers/Auth/RegisterController.php
  4. 42 20
      app/Http/Controllers/ModalController.php
  5. 6 0
      app/Http/Controllers/StudentHomeController.php
  6. 6 3
      app/Http/Controllers/TeacherAuth/RegisterController.php
  7. 7 1
      app/Http/Controllers/TeacherHomeController.php
  8. 11 0
      app/User.php
  9. BIN
      public/uploads/proposal/1684920043documentfile_.pdf
  10. 10 2
      resources/views/Q_apply_form.blade.php
  11. 21 7
      resources/views/admin/admin_profile.blade.php
  12. 1 1
      resources/views/admin/sub_contents/load_profile_info.blade.php
  13. 4 1
      resources/views/application.blade.php
  14. 15 5
      resources/views/auth/invited_register_form.blade.php
  15. 14 4
      resources/views/auth/wishlist_register_form.blade.php
  16. 3 1
      resources/views/email/invitation_to_supervisor_email.blade.php
  17. 134 0
      resources/views/email/invitation_to_supervisor_email_with_checked.blade.php
  18. 1 0
      resources/views/email/q_apply_wishlist_registration_email.blade.php
  19. 7 7
      resources/views/email/student_proposal_email.blade.php
  20. 2 2
      resources/views/email/teacher_proposal_email.blade.php
  21. 11 6
      resources/views/email/wishlist_email.blade.php
  22. 6 0
      resources/views/modal_pages/teacher_invited.blade.php
  23. 15 1
      resources/views/modal_pages/view_apply_proposal.blade.php
  24. 4 95
      resources/views/profile.blade.php
  25. 20 5
      resources/views/teacher_profile.blade.php

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

@@ -49,7 +49,7 @@ class AdminController extends Controller
         )->whereNotNull(
             'admin_invite_id'
         )->where(
-            'register_type',1   //1=invitation
+            'register_type',1   //1=teacher invitation
         )->orderBy(
             'id','DESC'
         )->get();
@@ -57,7 +57,7 @@ class AdminController extends Controller
         $landing_wishlist =User::where(
             'user_type',2
         )->where(
-            'register_type',2  // 2=landing wishlist
+            'register_type',2  // 2=teacher landing
         )->orderBy(
             'id','DESC'
         )->get();

+ 10 - 6
app/Http/Controllers/AjaxController.php

@@ -172,6 +172,7 @@ class AjaxController extends Controller
                 'last_name'=>'required',
                 'university_name'=>'required',
                 'department'=>'required',
+                'designation'=>'required',
             ]);
 
             if($validator->fails()){
@@ -184,6 +185,7 @@ class AjaxController extends Controller
             $data->last_name =$req->last_name;
             $data->university_name =$req->university_name;
             $data->department =$req->department;
+            $data->designation =$req->designation;
             $data->update();
 
             return response(
@@ -416,8 +418,10 @@ class AjaxController extends Controller
                $user_data->first_name =$req->name;
                $user_data->email =$req->email; 
                $user_data->user_type =1;
-               $user_data->status =1; 
+               $user_data->status =0; 
                $user_data->register_type =3; // 1=invitation ; 2= landing/wishlish; 3 =q_form 
+               $user_data->invitation_date =now();
+               $user_data->wishlist_teacher_id =$req->id;
                $user_data->save();
             } 
 
@@ -485,7 +489,7 @@ class AjaxController extends Controller
                 $user_data->dob =\Carbon\Carbon::parse($req->dob)->format('Y-m-d');
                 $user_data->gender =$req->gender;
                 $user_data->password =Hash::make($req->password);
-                $user_data->status =1;
+                $user_data->status =0;
                 $user_data->sign_up =1;
                 $user_data->registered_date =now();
                 //$user_data->email_verification=1;
@@ -506,7 +510,7 @@ class AjaxController extends Controller
                  
 
                 return response(
-                    ['msg'=>'Successfully saved.']
+                    ['msg'=>'Successfully saved. Please check your email for verify.']
                 );
             }
 
@@ -564,7 +568,7 @@ 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;
                     $from = 'asraful@revinr.com';
 
@@ -697,9 +701,9 @@ class AjaxController extends Controller
                 $data['email'] = $user_data->email;
                 $from = 'asraful@revinr.com';
 
-                Mail::send('email.teacher_invited_email',$data, function ($message) use ($user_mail,$from) {
+                Mail::send('email.invitation_to_supervisor_email',$data, function ($message) use ($user_mail,$from) {
                     $message->from($from);
-                    $message->to($user_mail)->subject('We’re excited to have you as a member of our community');
+                    $message->to($user_mail)->subject('Manage Doctoral Applicants with Ease - You’re invited!');
                 });
             }
 

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

@@ -128,6 +128,7 @@ class RegisterController extends Controller
         $data = User::where('remember_token',$token)->first();
         $data->email_verification=1;
         $data->email_verified_at=now();
+        $data->status=1;
         $data->update();
         return Redirect('/login')->with('success','Your mail is activated successfully. Login here ');
      }

+ 42 - 20
app/Http/Controllers/ModalController.php

@@ -133,7 +133,9 @@ class ModalController extends Controller{
 			 if($user){
 				$data['name'] = $student_data->first_name.' '.$student_data->last_name;
 				$data['teacher'] = $proposal_user->first_name.' '.$proposal_user->last_name;
-				$data['arn'] = $proposal_user->ref_no;
+                $data['university'] = $proposal_user->university_name;
+                $data['submission_date'] = $student_data->created_at;
+				//$data['arn'] = $proposal_user->ref_no;
 				$user_mail =$student_data->email;
 				$from = 'asraful@revinr.com';
 				Mail::send('email.student_proposal_email',$data, function ($message) use ($user_mail,$from,$student_proposal) {
@@ -157,7 +159,7 @@ class ModalController extends Controller{
 				$from = 'asraful@revinr.com';
 				Mail::send('email.teacher_proposal_email',$data, function ($message) use ($user_mail,$from) {
 					$message->from($from);
-					$message->to($user_mail)->subject('New Email Send to you');
+					$message->to($user_mail)->subject('New Proposal Received - Action Required');
 				});
              }
 
@@ -168,7 +170,7 @@ class ModalController extends Controller{
             $user =Auth::guard('teacher')->user();
             $validator=\Validator::make($req->all(), [
                 'name'=>'required',
-                'email'=>'required|email|max:255|unique:users'
+                'email'=>'required|email|max:255'
             ]);
 
             if($validator->fails()){
@@ -176,18 +178,25 @@ 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->wishlist_teacher_id =$user->id;
-            $user_data->user_type =1;
-            $user_data->save();
+            $user_check_data =User::where('email',$req->email)->where('user_type',1)->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 =0; 
+                $user_data->register_type =4; // 1=invitation ; 2= landing/wishlish; 3 =q_form ; 4=student-wishlist
+                $user_data->invitation_date =now();
+                $user_data->wishlist_teacher_id =$user->id;
+                $user_data->save();
+            }
 
             $refer =new ReferUser;
             $refer->name =$req->name;
@@ -201,7 +210,10 @@ class ModalController extends Controller{
                 $data['teacher_id'] = $refer->teacher_id;
                 $data['student_id'] = $user_data->id;
                 $data['std_email'] = $refer->email;
-                $data['applicant_name'] = $user->first_name.' '.$user->last_name;
+                $data['teacher'] = $user->first_name.' '.$user->last_name;
+                $data['designation'] = $user->designation;
+                $data['department'] = $user->others_department;
+                $data['university'] = $user->university_name;
                 $user_mail = $refer->email;
                 $from = 'asraful@revinr.com';
 
@@ -217,6 +229,8 @@ class ModalController extends Controller{
 
         }elseif($name=="teacher_invited"){
 
+             
+
             $admin =Admin::find($req->id);
             $validator=\Validator::make($req->all(), [
                 'name'=>'required',
@@ -238,7 +252,7 @@ class ModalController extends Controller{
                 $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->invitation_date =now();  
                 $user_data->save();
             } 
 
@@ -260,15 +274,23 @@ class ModalController extends Controller{
                 $user_mail = $refer->email;
                 $from = 'asraful@revinr.com';
 
-                Mail::send('email.teacher_invited_email',$data, function ($message) use ($user_mail,$from) {
-                    $message->from($from);
-                    $message->to($user_mail)->subject('Manage Doctoral Applicants with Ease - You’re invited!');
-                });
+                if($req->is_currently_open==1){
+                    Mail::send('email.invitation_to_supervisor_email_with_checked',$data, function ($message) use ($user_mail,$from) {
+                        $message->from($from);
+                        $message->to($user_mail)->subject('Accepting Doctoral Applications? We Have a Tool to Simplify the Process!');
+                    });
+                }else{
+                    Mail::send('email.invitation_to_supervisor_email',$data, function ($message) use ($user_mail,$from) {
+                        $message->from($from);
+                        $message->to($user_mail)->subject('Manage Doctoral Applicants with Ease - You’re invited!');
+                    });
+                } 
+               
             }
 
             $already_invited =ReferUser::where('email',$refer->email)->count();
 
-            if($already_invited > 0) {
+            if($already_invited > 1) {
                 return response(
                     ['msg'=>"Successfully saved. Already invitation send {$already_invited} times."]
                 ); 

+ 6 - 0
app/Http/Controllers/StudentHomeController.php

@@ -64,6 +64,7 @@ class StudentHomeController extends Controller
 
     public function institution_save(Request $request)
     {
+        $student =Auth::user(); 
         $institution= New  Institution;
         $institution->student_id= Auth::user()->id;
         $institution->academic_level= $request->academiclevel;
@@ -75,6 +76,11 @@ class StudentHomeController extends Controller
         //$institution->start_date= date($request->startdate.'-'.$request->startmonth.'-01');
         //$institution->end_date= date($request->enddate.'-'.$request->endmonth.'-30');
         $institution->save();
+
+        $data = User::find($student->id); 
+        $data->is_education =1;
+        $data->update();
+
         return redirect()->back()->with('Added successfully.');
     }
 

+ 6 - 3
app/Http/Controllers/TeacherAuth/RegisterController.php

@@ -84,16 +84,19 @@ class RegisterController extends Controller
             'uni_website' => $req->universitywebsite,
             'user_type' => $req->user_type,
             'ref_no' => name_initials($req->firstname,$req->lastname).''.teacherRefNoGenerate(),
+            'status' =>1,
+            'sign_up' => 1, // 1=signup
+            'registered_date' =>now(),
         ]);
-       //Mail::to('test@mail.com')->send(new SignUp($data->id));
+       
 
-        $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;
         $from = 'asraful@revinr.com';
 
         Mail::send('email.register_teacher_email',$data, function ($message) use ($user_mail,$from) {
             $message->from($from);
-            $message->to($user_mail)->subject('New Email Send to you');
+            $message->to($user_mail)->subject('We’re excited to have you as a member of our community');
         });
 
         return redirect()->to("/login-v2")->with('success','Your registration successfully saved. Please check your email for verification login.');

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

@@ -22,7 +22,13 @@ class TeacherHomeController extends Controller
     {   $user = Auth::guard('teacher')->user(); 
         $students = StudentProposal::where('teacher_id',$user->id)->get(); 
         $departments =Department::where('status',1)->orderBy('name','ASC')->get();
-        $refer_users =ReferUser::where('teacher_id',$user->id)->orderBy('id','DESC')->get();
+       // $refer_users =ReferUser::where('teacher_id',$user->id)->orderBy('id','DESC')->get();
+        $refer_users =User::where(
+            'wishlist_teacher_id',$user->id
+        )->whereIn(
+            'register_type',[3,4] // 3=q_form; 4= wishlist
+        )->orderBy('id','DESC')->get();
+        
         $universities =University::orderBy('name','ASC')->get();
         return view('teacher_profile',compact('students','user','departments','refer_users','universities'));
     }

+ 11 - 0
app/User.php

@@ -32,10 +32,21 @@ class User extends Authenticatable
         'user_type',
         'ref_no',
         'others_department',
+        'is_education',
+        'is_publication',
+        'is_test_score',
+        'is_work_experience',
+        'admin_invite_id',
+        'is_available',
         'status',
+        'apply_status',
+        'register_type',
+        'sign_up',
         'remember_token',
         'email_verification',
         'email_verified_at',
+        'registered_date',
+        'invitation_date',
     ];
 
     /**

BIN
public/uploads/proposal/1684920043documentfile_.pdf


+ 10 - 2
resources/views/Q_apply_form.blade.php

@@ -54,6 +54,7 @@
             <link rel="stylesheet" href="{{ asset('css/pnotify/pnotify.min.css') }}">
             <link href="{{ asset('css/noty/lib/noty.css') }}" rel="stylesheet" type="text/css">
             <link href="{{ asset('css/noty/lib/themes/sunset.css') }}" rel="stylesheet" type="text/css">
+            <link href="{{ asset('css/wait-me/waitMe.min.css') }}" rel="stylesheet" type="text/css">
        </head>
        <style>
 
@@ -280,7 +281,7 @@
                                                     </div>
                                                 </div>
                                             </div>
-                                            <div class="col-lg-12 mt-4">
+                                            <div class="col-lg-12 mt-4 wait">
                                                 <div class="mb-3">
                                                     <input type="hidden" name="teacher_id" value="{{ $hash_teacher_ids[0] }}" id="teacher_id">
                                                     <label class="form-label" style="font-size: 19px; font-weight: 700; color: #3c3d5b;">Your name</label>
@@ -342,6 +343,7 @@
         <script src="{{ asset('css/jquery-form/dist/jquery.form.min.js') }}"></script>
         <script src="{{ asset('css/pnotify/pnotify.js') }}"></script>
         <script src="{{ asset('css/noty/lib/noty.min.js') }}"></script>
+        <script src="{{ asset('css/wait-me/waitMe.min.js') }}"></script>
         <script>
 
             function pop_up_msg(msg='No message specified', type='success', callback=null){
@@ -370,6 +372,7 @@
 
             $(function(){
                 $('.q_form_submit').on('click', function(){
+                    $('.wait').waitMe({effect : 'facebook', text : 'Please wait...'});
                     var id =$('#teacher_id').val();
                     var name =$('#name').val();
                     var email =$('#email').val();
@@ -382,14 +385,19 @@
                     }
 
                     $.post("{{ route('ajax-post', ['name'=>'student_q_form']) }}", form_data, function(res){
+                        $('.wait').waitMe("hide");
                         pop_up_msg(res.msg);
 
                     }).fail(function(err){
-
+                        $('.wait').waitMe("hide");
                         pop_up_msg(err_msg(err), 'error');
 
                     });
                 });
+
+                $('.wait-me').on('click', function(){
+                    $('.wait').waitMe({effect : 'facebook', text : 'Please wait...'});
+                });
             });
             </script>
         </body>

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

@@ -756,9 +756,9 @@ tbody, td, tfoot, th, thead, tr {
                                                                                         <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;">
                                                                                             @php
-                                                                                                $refer_signup_user = \App\User::where('email',$row->email)->first();
+                                                                                                $refer_signup_user = \App\User::where('email',$row->email)->where('sign_up',1)->first();
                                                                                             @endphp
-                                                                                            @if($refer_signup_user->sign_up==1)
+                                                                                            @if($refer_signup_user)
                                                                                                 <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
@@ -984,6 +984,7 @@ tbody, td, tfoot, th, thead, tr {
                                                                                         <th>Email</th>
                                                                                         <th>Invited on</th>
                                                                                         <th>Registered</th>
+                                                                                        <th class="text-center">Invitation</th>
                                                                                     </tr>
                                                                                 </thead>
 
@@ -993,14 +994,28 @@ tbody, td, tfoot, th, thead, tr {
                                                                                             <tr>
                                                                                                 <td style="font-size: 11px;">{{ ++$key }}</td>
                                                                                                 <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; width: 30%;">
+                                                                                                    {{ $row->email }}                                                  
+                                                                                                </td>
+                                                                                                <td style="font-size: 11px;">@if(!empty($row->invitation_date)) {{ date('d M Y', strtotime($row->invitation_date)) }} @else -- @endif</td>
                                                                                                 <td style="font-size: 11px;">@if(!empty($row->registered_date)) {{ date('d M Y', strtotime($row->registered_date)) }} @else -- @endif</td>
+                                                                                                <td class="text-center">
+                                                                                                    @php
+                                                                                                      $user_invited_count = \DB::table('refer_users')->where('email',$row->email)->count();
+                                                                                                    @endphp
+                                                                                                    @if($user_invited_count > 1)
+                                                                                                    <span class="badge bg-secondary">
+                                                                                                        {{ $user_invited_count }} 
+                                                                                                    </span>
+                                                                                                    @else
+                                                                                                      --
+                                                                                                    @endif
+                                                                                                </td>
                                                                                             </tr>
                                                                                         @endforeach
                                                                                         @else
                                                                                             <tr>
-                                                                                                <td colspan="5" class="text-center text-danger">No data found!</td>
+                                                                                                <td colspan="6" class="text-center text-danger">No data found!</td>
                                                                                             </tr>
                                                                                     @endif
                                                                                 </tbody>
@@ -1372,8 +1387,7 @@ tbody, td, tfoot, th, thead, tr {
 
                     if(isConfirm) {
                         $.post("{{ route('ajax-post', ['name'=>'landing_invitation_email_send'])}}" ,form_data).done(function(res){
-
-                                pop_up_msg(res.msg); 
+                            pop_up_msg(res.msg); 
                         }).fail(function(error){
 
                                 let msg='Sorry!, form submission failed try again later.';

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

@@ -24,7 +24,7 @@
 </div>   
 <div class="single_glance_row mt-1" style="display: flex;">
     <span class="title" style="font-size:11px; font-weight: 600;">Designation : </span>
-    <span class="ms-1" style="font-size: 11px; color: #868e96;"> {{$tuser-> designation}} </span>
+    <span class="ms-1" style="font-size: 11px; color: #868e96;"> {{$tuser->designation}} </span>
 </div>     
  
 @endsection

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

@@ -57,7 +57,10 @@
                                     <div class="left" style="width:50%;">
                                         <div class="uni_details" style="display:flex;">
                                             <div class="inner_right ms-5">
-                                                <strong style="font-size: 13px; font-weight: 600;">{{cn($row,'proposal.title','')}}</strong></br>
+                                                <span @if($row->proposal->document_file ) class="open_modal_page" style="cursor: pointer;"  data-url="{{route('modal-get',['name'=>'view_student_proposal','id'=>$row->proposal->id])}}" @endif>
+                                                     <strong style="font-size: 13px; font-weight: 600;">{{cn($row,'proposal.title','')}}</strong>
+                                                </span>
+                                               </br>
                                                     <div style="margin-top: -2px;">
                                                         <span style="font-size:12px;">{{cn($row,'proposal.proposal_ref','')}}</span>
                                                         <span> • </span>

+ 15 - 5
resources/views/auth/invited_register_form.blade.php

@@ -49,6 +49,7 @@
         <link rel="stylesheet" href="{{ asset('css/pnotify/pnotify.min.css') }}">
         <link href="{{ asset('css/noty/lib/noty.css') }}" rel="stylesheet" type="text/css">
         <link href="{{ asset('css/noty/lib/themes/sunset.css') }}" rel="stylesheet" type="text/css">
+        <link href="{{ asset('css/wait-me/waitMe.min.css') }}" rel="stylesheet" type="text/css">
     </head>
     <style>
     body {
@@ -142,7 +143,7 @@
                     <div class="col-lg-4 cover-my-30 ">
                         <div class="cover-user-img d-flex align-items-center p-5">
                             <div class="row">
-                                <div class="col-12">
+                                <div class="col-12 wait">
                                     <div class="card login-page border-0" style="z-index: 1">
                                         <div class="card border-0">
                                             <div class="card-body" style="padding: 0px;">
@@ -252,6 +253,7 @@
       <script src="{{ asset('css/pnotify/pnotify.js') }}"></script>
       <script src="{{ asset('css/noty/lib/noty.min.js') }}"></script>
       <script src="{{ asset('css/flatpickr/dist/flatpickr.min.js') }}"></script>
+      <script src="{{ asset('css/wait-me/waitMe.min.js') }}"></script>
       <script>
 
           function pop_up_msg(msg='No message specified', type='success', callback=null){
@@ -281,6 +283,9 @@
         $(function(){
 
             $('#invited_registration').on('click', function(){
+
+                $('.wait').waitMe({effect : 'facebook', text : 'Please wait...'});
+
                   var id =$('#teacher_id').val();
                   var first_name =$('#first_name').val();
                   var last_name =$('#last_name').val();
@@ -310,15 +315,20 @@
                   }
 
                   $.post("{{ route('ajax-post', ['name'=>'invitation_register_save']) }}", form_data, function(res){
-                      pop_up_msg(res.msg);
-                      window.location.href = "{{ url('/login-v2') }}";
+                    pop_up_msg(res.msg);
+                    $('.wait').waitMe("hide");
+                    window.location.href = "{{ url('/login-v2') }}";
 
                   }).fail(function(err){
-
-                      pop_up_msg(err_msg(err), 'error');
+                    $('.wait').waitMe("hide");
+                    pop_up_msg(err_msg(err), 'error');
 
                   });
               });
+
+              $('.wait-me').on('click', function(){
+                    $('.wait').waitMe({effect : 'facebook', text : 'Please wait...'});
+                });
         });
     </script>
 </body>

+ 14 - 4
resources/views/auth/wishlist_register_form.blade.php

@@ -49,6 +49,7 @@
         <link rel="stylesheet" href="{{ asset('css/pnotify/pnotify.min.css') }}">
         <link href="{{ asset('css/noty/lib/noty.css') }}" rel="stylesheet" type="text/css">
         <link href="{{ asset('css/noty/lib/themes/sunset.css') }}" rel="stylesheet" type="text/css">
+        <link href="{{ asset('css/wait-me/waitMe.min.css') }}" rel="stylesheet" type="text/css">
     </head>
     <style>
     body {
@@ -143,7 +144,7 @@
                     <div class="col-lg-4 cover-my-30 ">
                         <div class="cover-user-img d-flex align-items-center p-5">
                             <div class="row">
-                                <div class="col-12">
+                                <div class="col-12 wait">
                                     <div class="card login-page border-0" style="z-index: 1">
                                         <div class="card border-0">
                                             <div class="card-body" style="padding: 0px;">
@@ -244,6 +245,7 @@
       <script src="{{ asset('css/pnotify/pnotify.js') }}"></script>
       <script src="{{ asset('css/noty/lib/noty.min.js') }}"></script>
       <script src="{{ asset('css/flatpickr/dist/flatpickr.min.js') }}"></script>
+      <script src="{{ asset('css/wait-me/waitMe.min.js') }}"></script>
       <script>
 
           function pop_up_msg(msg='No message specified', type='success', callback=null){
@@ -277,6 +279,9 @@
             });
 
             $('#wishlist_reg_submit').on('click', function(){
+
+                $('.wait').waitMe({effect : 'facebook', text : 'Please wait...'});
+
                   var id =$('#student_id').val();
                   var first_name =$('#first_name').val();
                   var last_name =$('#last_name').val();
@@ -302,15 +307,20 @@
                   }
 
                   $.post("{{ route('ajax-post', ['name'=>'q_apply_wishlist_registration_save']) }}", form_data, function(res){
-                      pop_up_msg(res.msg);
+                    $('.wait').waitMe("hide");
+                    pop_up_msg(res.msg);
                       //window.location.href = "{{ url('/login') }}";
 
                   }).fail(function(err){
-
-                      pop_up_msg(err_msg(err), 'error');
+                    $('.wait').waitMe("hide");
+                    pop_up_msg(err_msg(err), 'error');
 
                   });
               });
+
+            $('.wait-me').on('click', function(){
+                $('.wait').waitMe({effect : 'facebook', text : 'Please wait...'});
+            });
         });
     </script>
 </body>

+ 3 - 1
resources/views/email/teacher_invited_email.blade.php → resources/views/email/invitation_to_supervisor_email.blade.php

@@ -100,7 +100,9 @@
                                 @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>
+                                <h4 style="font-weight: 300 !important;"> H Rahman  </h4>
+                                <h4 style="font-weight: 300 !important;"> Founder & CEO  </h4>
+                                <h4 style="font-weight: 300 !important;"> Research Admission Platform  </h4>
                                     <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>

+ 134 - 0
resources/views/email/invitation_to_supervisor_email_with_checked.blade.php

@@ -0,0 +1,134 @@
+<!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('teacher_invitation_signup', 25);
+                                @endphp
+                                <p class="mt-3"> Hope you are doing well.</p>
+                                <p class="mt-2"> We are reaching out to you regarding an exciting opportunity that we believe will interest you. We have observed that you are currently open to applications from doctoral candidates for your research project. With that in mind, we would like to introduce you to a tool designed to streamline the application process. Our aim is to propose a pre-screening mechanism that can help you and potential applicants save valuable time before proceeding with formal applications.</p>
+                                <p class="mt-2"> We understand that as a teacher and supervisor, 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. That's why we think a tool like Research Admission Platform could be helpful for you.</p>
+                                <p class="mt-2"> Research Admission Platform 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>
+                                <p class="mt-2"> This tool allows you to review, request further information or documents, reject, or express your interest in each proposal, enabling applicants to submit a formal application. The system keeps the applicant notified in real-time, ensuring efficient communication throughout the process.</p>
+                                <p class="mt-2"> The best part is that many faculties across the world are already using this tool, and it has been proven 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>
+                                @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;"> H Rahman  </h4>
+                                <h4 style="font-weight: 300 !important;"> Founder & CEO  </h4>
+                                <h4 style="font-weight: 300 !important;"> Research Admission Platform  </h4>
+                                    <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 © {{date('Y')}} 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>

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

@@ -83,6 +83,7 @@
                                 <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> 
+                                    <a href="{{url('verify')}}/{{$token}}" style="color: black">click here</a>
                                     <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>

+ 7 - 7
resources/views/email/student_proposal_email.blade.php

@@ -81,14 +81,14 @@
                             <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">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="">[insert link 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) {{ $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-3">Your proposal has been successfully submitted to </p>
+                                    <span>Name of teacher:  {{ $teacher }}</span><br>
+                                    <span>University Name: {{ $university }}</span><br>
+                                    <span>Submission at: {{ utc_to_ltz(local_tz(), $submission_date, 'M d, Y')}}</span>
+                                    <p>Once the supervisor starts working on it, and we receive an update from him/her, we will notify you its progress by email and notification through the portal.</p>
+                                    <p>We wish you all the best in your academic pursuits.</p>
                                     <p class="mt-2" style="margin: 0px;">Best regards,</p>
-                                    <h6>{{ $teacher }}</h6>
+                                    <h4>Research Admission Team</h4>
                                      <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>

+ 2 - 2
resources/views/email/teacher_proposal_email.blade.php

@@ -82,8 +82,8 @@
                                 <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">This is to notify you that a new proposal has been received and is awaiting your review from the following applicant: </p>
-                                <span>Student Name:  {{ $std_name }}</span>
-                                <span>Proposal Title: {{ $proposal_title }}</span>
+                                <span>Student Name:  {{ $std_name }}</span><br>
+                                <span>Proposal Title: {{ $proposal_title }}</span><br>
                                 <span>Submission Date: {{ utc_to_ltz(local_tz(), $date_time, 'M d, Y')}}</span>
                                 <p class="mt-2"> To access the proposal, please log in to your account and navigate to the application section.</p>
                                 <p class="mt-2" style="margin: 0px;">Best regards,</p>

+ 11 - 6
resources/views/email/wishlist_email.blade.php

@@ -84,12 +84,17 @@
                                 @php
                                     $hashids = new \Hashids\Hashids('student_wishlist_signup', 25);
                                 @endphp
-                                <p class="mt-3">I have found the Research Admission Platform incredibly helpful in my own search for a research supervisor. The platform is a free and easy-to-use tool that can help you connect with potential supervisors.</p>
-                                <p class="mt-2"> It allows you to submit your research proposal to multiple supervisors with just a few clicks. You can then track the real-time status of your application and receive a decision quickly. I found this feature particularly useful, as it allowed me to keep track of the progress of my applications without having to constantly follow up with supervisors.</p>
-                                <p class="mt-2"> I think you would find it to be a valuable resource in your own search for a research supervisor. It's free to use and can save you a lot of time and effort in finding the right match for your research interests. If you have any questions about the platform or would like some help getting started, please don't hesitate to reach out to me.</p>
-                                <a href="{{ url('register/'.$hashids->encode($student_id)) }}">click here</a>
-                                <p class="mt-2" style="margin: 0px;">Best regards,</p>
-                                <h4>{{$applicant_name}} </h4>
+                                 <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>

+ 6 - 0
resources/views/modal_pages/teacher_invited.blade.php

@@ -44,6 +44,12 @@
                                 </div>
                             </div>
                         </div><!--end col-->
+                        <div class="pretty p-default p-curve" style="margin-left: 16px;">
+                            <input type="checkbox" name="is_currently_open" value="1"/>
+                            <div class="state p-info">
+                                <label>Accepting Proposal ?</label>
+                            </div>
+                        </div>
 
                         <div class="col-md-12">
                             <div class="mt-2 text-center">

+ 15 - 1
resources/views/modal_pages/view_apply_proposal.blade.php

@@ -42,10 +42,24 @@
                                     <span class="label_badge_radius" style="background-image: linear-gradient(90deg,rgba(46,17,83,.19),#f5f4fd); font-weight: 400 !important; font-size: 10px;">Ref. ({{cn($std_proposal,'proposal.proposal_ref','')}})</span>
                                         <span> • </span>
                                         <span style="font-weight:400;">{{cn($std_proposal,'proposal.methology','')}}</span>
+                                        @php
+                                            $proposal =\DB::table('proposal')->where(
+                                                'id',$std_proposal->proposal_id
+                                                )->first();
+                                                
+                                            $department =\DB::table('departments')->where(
+                                                'id', $proposal->department
+                                            )->first();
+                                                
+                                        @endphp
+                                        
+                                        @if($department)
                                         <span> • </span>
-                                        <span style="font-weight:400;">{{cn($std_proposal,'proposal.department.name','')}}</span> 
+                                        <span style="font-weight:400;">{{$department->name}}</span> 
+                                        @endif
                                         <span> • </span>  
                                         <span style="font-weight:400;">{{cn($std_proposal,'proposal.status','')}}</span> 
+                                        
                                     </div>                                             
                                 </div>
                             </div>

+ 4 - 95
resources/views/profile.blade.php

@@ -299,7 +299,7 @@
                                                                             <div style="margin:0px !important; font-size:12px;font-weight: 600;">
                                                                                 <i class="fa fa-graduation-cap" style="padding: 7px;"></i>  EDUCATION HISTORY
                                                                                 
-                                                                                <div class="pretty p-default p-round" style="margin-left: 12px;">
+                                                                                {{-- <div class="pretty p-default p-round" style="margin-left: 12px;">
                                                                                     <input type="radio" class="is_education" data-id="{{$user_info->id}}" name="is_education" value="yes" {{ Auth::user()->is_education == 1 ? 'checked' : ''}} @if($is_freez_profile) disabled @endif>
                                                                                     <div class="state p-primary">
                                                                                         <label class="form-check-label" style="font-size: 12px;font-weight:bold;">Yes</label>
@@ -320,11 +320,11 @@
                                                                                     </div>
                                                                                 </div>
                                                                                 
-                                                                                @endif
+                                                                                @endif --}}
                                                                             </div>
                                                                         </div>
                                                                         <div class="col-md-6">
-                                                                            <div class="text-end mt-2 pt-1" id="add_education" @if(Auth::user()->is_education == 2 || Auth::user()->is_education == NULL) style="display:none;" @endif> 
+                                                                            <div class="text-end mt-2 pt-1" id="add_education"> 
                                                                                     <button type="button" class="btn btn2 btn-education-open @if($is_freez_profile) disabled @endif">Add</button>
                                                                                 </a>
                                                                             </div>
@@ -396,98 +396,7 @@
                                                                                             </div>
                                                                                         </div>
                                                                                     </div>
-                                                                                    <!-- <div class="col-md-3">
-                                                                                        <div class="row">
-                                                                                            <div class="col-md-6">
-                                                                                                <div class="mb-1">
-                                                                                                        <label class="form-label">Start Date <span class="text-danger">*</span></label>
-                                                                                                    <div class="form-icon position-relative">
-                                                                                                        <select name="startdate" id="start date" class="form-control frm" required="">
-                                                                                                            <option disabled="" selected="" value="">Year</option>
-                                                                                                            @php
-                                                                                                                $firstYear = (int)date('Y') - 20;
-                                                                                                                $lastYear = $firstYear + 20;
-                                                                                                                for($i=$firstYear;$i<=$lastYear;$i++){
-                                                                                                            @endphp
-                                                                                                            <option value="{{$i}}">{{$i}}</option>
-                                                                                                            @php
-                                                                                                                }
-                                                                                                            @endphp
-
-                                                                                                        </select>
-                                                                                                    </div>
-                                                                                                </div>
-                                                                                            </div>
-                                                                                            <div class="col-md-6">
-                                                                                                <div class="mb-1 mt-2">
-                                                                                                        <label class="form-label"></label>
-                                                                                                    <div class="form-icon position-relative">
-                                                                                                        <select name="startmonth" id="month" class="form-control frm" required="">
-                                                                                                            <option disabled="" selected="" value="">Month</option>
-                                                                                                            <option value="01">January</option>
-                                                                                                            <option value="02">February</option>
-                                                                                                            <option value="03">March</option>
-                                                                                                            <option value="04">April</option>
-                                                                                                            <option value="05">May</option>
-                                                                                                            <option value="06">June</option>
-                                                                                                            <option value="07">July</option>
-                                                                                                            <option value="08">August</option>
-                                                                                                            <option value="09">September</option>
-                                                                                                            <option value="10">October</option>
-                                                                                                            <option value="11">November</option>
-                                                                                                            <option value="12">December</option>
-                                                                                                        </select>
-                                                                                                    </div>
-                                                                                                </div>
-                                                                                            </div>
-                                                                                        </div>
-                                                                                    </div>
-                                                                                    <div class="col-md-3">
-                                                                                        <div class="row">
-                                                                                            <div class="col-md-6">
-                                                                                                <div class="mb-1">
-                                                                                                        <label class="form-label">End Date <span class="text-danger">*</span></label>
-                                                                                                    <div class="form-icon position-relative">
-                                                                                                        <select name="enddate" id="end date" class="form-control frm" required="">
-                                                                                                            <option disabled="" selected="" value="">Year</option>
-                                                                                                            @php
-                                                                                                                $firstYear = (int)date('Y') - 20;
-                                                                                                                $lastYear = $firstYear + 20;
-                                                                                                                for($i=$firstYear;$i<=$lastYear;$i++){
-                                                                                                            @endphp
-                                                                                                            <option value="{{$i}}">{{$i}}</option>
-                                                                                                            @php
-                                                                                                                }
-                                                                                                            @endphp
-
-                                                                                                        </select>
-                                                                                                    </div>
-                                                                                                </div>
-                                                                                            </div>
-                                                                                            <div class="col-md-6">
-                                                                                                <div class="mb-1 mt-2">
-                                                                                                        <label class="form-label"></label>
-                                                                                                    <div class="form-icon position-relative">
-                                                                                                        <select name="endmonth" id="month" class="form-control frm" required="">
-                                                                                                            <option disabled="" selected="" value="">Month</option>
-                                                                                                            <option value="01">January</option>
-                                                                                                            <option value="02">February</option>
-                                                                                                            <option value="03">March</option>
-                                                                                                            <option value="04">April</option>
-                                                                                                            <option value="05">May</option>
-                                                                                                            <option value="06">June</option>
-                                                                                                            <option value="07">July</option>
-                                                                                                            <option value="08">August</option>
-                                                                                                            <option value="09">September</option>
-                                                                                                            <option value="10">October</option>
-                                                                                                            <option value="11">November</option>
-                                                                                                            <option value="12">December</option>
-                                                                                                        </select>
-                                                                                                    </div>
-                                                                                                </div>
-                                                                                            </div>
-                                                                                        </div>
-                                                                                    </div> -->
+                                                                                    
                                                                                     <div class="col-md-4">
                                                                                         <div class="mt-4 pt-3">
                                                                                             <div class="text-end">

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

@@ -690,6 +690,7 @@ tbody, td, tfoot, th, thead, tr {
                                             <th>Invited on</th>
                                             <th>Applied</th>
                                             <th>Channel</th>
+                                            <th class="text-center">Total Invited</th>
                                         </tr>
                                     </thead>
                                     <tbody>
@@ -697,17 +698,29 @@ tbody, td, tfoot, th, thead, tr {
                                         @foreach($refer_users as $key=>$row)
                                         <tr>
                                             <td style="font-size: 11px;">{{$key+1}}</td>
-                                            <td style="font-size: 11px;">{{$row->name}}</td>
-                                            <td style="font-size: 11px;">{{$row->email}}</td>
-                                            <td style="font-size: 11px;">{{date('d M Y h.i A', strtotime($row->created_at))}}</td>
-                                            <td style="font-size: 11px;">{{date('d M Y h.i A', strtotime($row->created_at))}}</td>
+                                            <td style="font-size: 11px;">{{$row->first_name }} {{$row->last_name }}</td>
+                                            <td style="font-size: 11px;">{{$row->email}}</td> 
+                                            <td style="font-size: 11px;">@if(!empty($row->invitation_date)) {{ date('d M Y h.i A', strtotime($row->invitation_date)) }} @else -- @endif</td>
+                                            <td style="font-size: 11px;">@if(!empty($row->registered_date)) {{ date('d M Y h.i A', strtotime($row->registered_date)) }} @else -- @endif</td>
                                             <td style="font-size: 11px;">
-                                                @if($row->q_form_status==1)
+                                                @if($row->register_type==3)
                                                  Q-Apply
                                                 @else
                                                 --
                                                 @endif
                                             </td>
+                                            <td class="text-center">
+                                                @php
+                                                    $user_invited_count = \DB::table('refer_users')->where('email',$row->email)->count();
+                                                @endphp
+                                                @if($user_invited_count > 1)
+                                                <span class="badge bg-secondary">
+                                                    {{ $user_invited_count }} 
+                                                </span>
+                                                @else
+                                                    --
+                                                @endif
+                                            </td>
                                         </tr>
                                         @endforeach
                                         @else
@@ -1195,6 +1208,7 @@ tbody, td, tfoot, th, thead, tr {
                 var last_name =$('#last_name').val();
                 var university_name =$('#university_name').val();
                 var department =$('#department_id option:selected').val();
+                var designation =$('#designation').val();
 
                 var form_data={
                     _token: "{{ csrf_token() }}",
@@ -1203,6 +1217,7 @@ tbody, td, tfoot, th, thead, tr {
                     last_name: last_name,
                     university_name: university_name,
                     department: department,
+                    designation: designation,
                 }
 
                 $.post("{{ route('ajax-post', ['name'=>'update_profile']) }}", form_data, function(res){