Pārlūkot izejas kodu

Notification with Project divide

Mostafijur Rahman 1 gadu atpakaļ
vecāks
revīzija
dfe442c709
38 mainītis faili ar 1327 papildinājumiem un 41 dzēšanām
  1. 46 9
      app/Http/Controllers/AjaxController.php
  2. 54 0
      app/Http/Controllers/Application/NotificationController.php
  3. 32 12
      app/Http/Controllers/ModalController.php
  4. 3 3
      app/Http/Controllers/StudentHomeController.php
  5. 21 0
      app/Http/ViewComposers/AdminNotificationComposer.php
  6. 21 0
      app/Http/ViewComposers/ApplicationNotificationComposer.php
  7. 21 0
      app/Http/ViewComposers/SupervisorNotificationComposer.php
  8. 10 0
      app/Models/Notitifation.php
  9. 71 0
      app/Notifications/TicketNotification.php
  10. 31 0
      app/Providers/ComposerServiceProvider.php
  11. 1 0
      config/app.php
  12. 1 1
      resources/views/application/application.blade.php
  13. 1 1
      resources/views/application/explore.blade.php
  14. 1 1
      resources/views/application/home.blade.php
  15. 0 0
      resources/views/application/layouts/bottom.blade.php
  16. 0 0
      resources/views/application/layouts/footer.blade - Copy.php
  17. 0 0
      resources/views/application/layouts/footer.blade.php
  18. 0 0
      resources/views/application/layouts/header.blade - Copy (2).php
  19. 0 0
      resources/views/application/layouts/header.blade - Copy.php
  20. 0 0
      resources/views/application/layouts/header.blade.php
  21. 11 0
      resources/views/application/layouts/master.blade.php
  22. 0 0
      resources/views/application/layouts/modal.blade.php
  23. 0 0
      resources/views/application/layouts/notification_list_popup_header.blade.php
  24. 0 0
      resources/views/application/layouts/top.blade.php
  25. 16 0
      resources/views/application/notifications/notification_partial.blade.php
  26. 91 0
      resources/views/application/notifications/notifications.blade.php
  27. 85 0
      resources/views/application/notifications/type/agent_university_notification.blade.php
  28. 130 0
      resources/views/application/notifications/type/ticket_notification.blade.php
  29. 1 1
      resources/views/application/profile.blade.php
  30. 135 0
      resources/views/email/hold_status_email.blade.php
  31. 118 0
      resources/views/email/interested_status_email.blade.php
  32. 119 0
      resources/views/email/rejected_status_email.blade.php
  33. 120 0
      resources/views/email/terminate_status_email.blade.php
  34. 153 0
      resources/views/notifications/ticket_notification.blade.php
  35. 7 1
      resources/views/teacher/student_proposal_details.blade.php
  36. 0 11
      resources/views/web/layouts/master.blade.php
  37. 3 1
      routes/web.php
  38. 24 0
      sql/update.sql

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

@@ -338,21 +338,58 @@ class AjaxController extends Controller
             );
 
         }elseif($name=="proposal_status_update"){
-            $data =StudentProposal::find($req->id);
-            $data->proposal_status =$req->value;
-            $data->proposal_status_date =now();
-            $data->feedback_msg =NULL;
-            $data->feedback_reason =NULL;
-            $data->update();
+            $proposal =StudentProposal::find($req->id);
+            $proposal->proposal_status =$req->value;
+            $proposal->proposal_status_date =now();
+            $proposal->feedback_msg =NULL;
+            $proposal->feedback_reason =NULL;
+            $proposal->update();
 
             if($req->value){
-                $user_data = User::find($data->student_id);
-                $user_data->freez_profile =2;  // 2 = [In Review,Pause,Interested]
+                $user_data = User::find($proposal->student_id);
+                $user_data->freez_profile =2;  // 2 = [In Review,Pause,Interested,Terminate]
                 $user_data->update();
             }
 
+            // Status wise email send
+            $teacher =User::find($proposal->teacher_id);
+            $student =User::find($proposal->student_id);
+            $data['teacher'] = $teacher->first_name.' '.$teacher->last_name;
+            $data['student'] = $student->first_name.' '.$student->last_name; 
+            $data['receive_email']=$student->email;
+            $from = 'asraful@revinr.com';
+            $user_mail = $student->email; 
+
+            //-----Hold----
+            if($proposal->proposal_status == 4){  
+
+                $data['doc_requirement_list']=Requirement::where('std_proposal_id',$proposal->id)->get();
+                
+                Mail::send('email.hold_status_email',$data, function ($message) use ($user_mail,$from) {
+                    $message->from($from);
+                    $message->to($user_mail)->subject('Request for additional Documents and Information');
+                });
+            }
+
+            //-----Interested----
+            if($proposal->proposal_status == 5){    
+                Mail::send('email.interested_status_email',$data, function ($message) use ($user_mail,$from) {
+                    $message->from($from);
+                    $message->to($user_mail)->subject('Expression of Interest in Supervising Your Research Application');
+                });
+            }
+
+            //-----Terminate----
+            if($proposal->proposal_status == 7){  
+                  
+                Mail::send('email.terminate_status_email',$data, function ($message) use ($user_mail,$from) {
+                    $message->from($from);
+                    $message->to($user_mail)->subject('Your doctoral application has been terminated.');
+                });
+            } 
+            
             return response(
-                ['msg'=>'Updated successfully.']
+                ['msg'=>'Saved successfully.']
             );
 
         }elseif($name=="accept_status_update"){

+ 54 - 0
app/Http/Controllers/Application/NotificationController.php

@@ -0,0 +1,54 @@
+<?php
+
+namespace App\Http\Controllers\Application;
+use Auth;
+use Illuminate\Http\Request;
+use App\Http\Controllers\Controller;
+
+class NotificationController extends Controller
+{
+    public function __construct()
+    {
+        $this->middleware('admin');
+    }
+    /**
+     * Display a listing of the resource.
+     *
+     * @return \Illuminate\Http\Response
+     */
+
+    public function index()
+    {
+        $user = Auth::guard('admin')->user(); 
+        return view('application.notifications.notifications');
+    }
+
+    public function partial()
+    {
+        $user = Auth::guard('admin')->user();
+        $notifications = $user->notifications()->paginate(30);  
+
+        return view('application.notifications.notification_partial',compact('notifications'));
+    }
+
+    public function markAsRead(Request $request)
+    {
+        $user = Auth::user();
+        $notification = $user->unreadNotifications()->where('id',$request->id)->first();
+        if ($notification){
+            $notification->markAsRead();
+        }
+        echo 'success';
+    }
+
+    public function markAllAsRead()
+    {
+        $user = Auth::user();
+        $notifications = $user->unreadNotifications()->get();
+        foreach ($notifications as $key => $notification) {
+            $notification->markAsRead();
+        }
+
+        return redirect()->back();
+    }
+}

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

@@ -642,24 +642,44 @@ class ModalController extends Controller{
                 return response(['msg'=>$errors[0]], 422);
             }
 
-            $data =StudentProposal::find($req->id);
-            $data->proposal_status = 6; // rejected
+            $proposal =StudentProposal::find($req->id);
+            $proposal->proposal_status = 6; // rejected
 
             if($req->feedback=="others"){ 
-                $data->feedback_msg =$req->feedback_msg;
-                $data->feedback_reason =NULL;
+                $proposal->feedback_msg =$req->feedback_msg;
+                $proposal->feedback_reason =NULL;
             }else{
-                $data->feedback_reason =$req->feedback;
-                $data->feedback_msg =NULL;
+                $proposal->feedback_reason =$req->feedback;
+                $proposal->feedback_msg =NULL;
             }
-            $data->proposal_status_date =now();
-            $data->update();
 
-            if($data->proposal_status ==6){ // 6= rejected
-                $user_rejected = User::find($data->student_id);
-                $user_rejected->freez_profile =0;
-                $user_rejected->update();
+            $proposal->proposal_status_date =now();
+            $proposal->update();  
+             
+            $student = User::find($proposal->student_id);
+            $student->freez_profile =0;
+            $student->update(); 
+
+            $teacher =User::find($proposal->teacher_id); 
+
+            if($proposal->feedback_msg){
+                $reason  = $proposal->feedback_msg;
+            }else{
+                $reason  = $proposal->feedback_reason;
             }
+            
+            $data['teacher'] = $teacher->first_name.' '.$teacher->last_name;
+            $data['student'] = $student->first_name.' '.$student->last_name; 
+            $data['reason'] =$reason;
+            $data['receive_email']=$student->email;
+            $from = 'asraful@revinr.com';
+            $user_mail = $student->email; 
+                  
+            Mail::send('email.rejected_status_email',$data, function ($message) use ($user_mail,$from) {
+                $message->from($from);
+                $message->to($user_mail)->subject('Rejection of Research Application');
+            });
+            
 
             return response(
                 ['msg'=>'Saved successfully.']

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

@@ -32,7 +32,7 @@ class StudentHomeController extends Controller
       )->where(
          'proposal_submit_status',1
       )->orderBy('id','DESC')->get();
-      return view('home',compact('student_proposal'));
+      return view('application.home',compact('student_proposal'));
    }
 
    public function application(){
@@ -51,7 +51,7 @@ class StudentHomeController extends Controller
          'score'=>$score,
          'student_proposal'=>$student_proposal,
       ];
-      return view('application',$data);
+      return view('application.application',$data);
    }
 
    public function profile()
@@ -73,7 +73,7 @@ class StudentHomeController extends Controller
             'freez_profile','!=',0 
          )->exists();   
     
-        return view('profile',compact('publications','is_freez_profile','institution','academic_level','work_experience','score','user_info','proposal','proposal_files','departments'));
+        return view('application.profile',compact('publications','is_freez_profile','institution','academic_level','work_experience','score','user_info','proposal','proposal_files','departments'));
     }
 
 

+ 21 - 0
app/Http/ViewComposers/AdminNotificationComposer.php

@@ -0,0 +1,21 @@
+<?php
+
+namespace App\Http\ViewComposers;
+use Auth;
+use Illuminate\Contracts\View\View;
+use Illuminate\Support\Facades\Notification;
+
+class AdminNotificationComposer{
+    public function compose(View $view){
+
+		$user = Auth::guard('admin')->user();
+
+        $notifications = $user->notifications->take(15);
+        $unreadnotifications = $user->unreadnotifications;
+
+        $view->with('notifications',$notifications);
+        $view->with('unreadnotifications',$unreadnotifications);
+    }
+}
+
+?>

+ 21 - 0
app/Http/ViewComposers/ApplicationNotificationComposer.php

@@ -0,0 +1,21 @@
+<?php
+
+namespace App\Http\ViewComposers;
+use Auth;
+use Illuminate\Contracts\View\View;
+use Illuminate\Support\Facades\Notification;
+
+class ApplicationNotificationComposer{
+    public function compose(View $view){
+
+		$user = Auth::user();
+
+        $notifications = $user->notifications->take(15);
+        $unreadnotifications = $user->unreadnotifications;
+
+        $view->with('notifications',$notifications);
+        $view->with('unreadnotifications',$unreadnotifications);
+    }
+}
+
+?>

+ 21 - 0
app/Http/ViewComposers/SupervisorNotificationComposer.php

@@ -0,0 +1,21 @@
+<?php
+
+namespace App\Http\ViewComposers;
+use Auth;
+use Illuminate\Contracts\View\View;
+use Illuminate\Support\Facades\Notification;
+
+class SupervisorNotificationComposer{
+    public function compose(View $view){
+
+		$user = Auth::guard('teacher')->user();
+
+        $notifications = $user->notifications->take(15);
+        $unreadnotifications = $user->unreadnotifications;
+
+        $view->with('notifications',$notifications);
+        $view->with('unreadnotifications',$unreadnotifications);
+    }
+}
+
+?>

+ 10 - 0
app/Models/Notitifation.php

@@ -0,0 +1,10 @@
+<?php
+
+namespace App\Models;
+
+use Illuminate\Database\Eloquent\Model;
+
+class Notitifation extends Model
+{
+    protected $table = "notification";
+}

+ 71 - 0
app/Notifications/TicketNotification.php

@@ -0,0 +1,71 @@
+<?php
+
+namespace App\Notifications;
+
+use Illuminate\Bus\Queueable;
+use Illuminate\Notifications\Notification;
+use Illuminate\Contracts\Queue\ShouldQueue;
+use Illuminate\Notifications\Messages\MailMessage;
+
+class TicketNotification extends Notification
+{
+    use Queueable;
+    protected $ticket,$action_type, $addedBy;
+
+    /**
+     * Create a new notification instance.
+     *
+     * @return void
+     */
+    public function __construct($ticket,$action_type, $addedBy, $comment=NULL)
+    {
+        $this->ticket         = $ticket;
+        $this->action_type    = $action_type;
+        $this->addedBy        = $addedBy;
+        $this->comment        = $comment;
+       
+        //$this->assign_person  = $assign_person;
+         
+    }
+
+    /**
+     * Get the notification's delivery channels.
+     *
+     * @param  mixed  $notifiable
+     * @return array
+     */
+    public function via($notifiable)
+    {
+        return ['database'];
+    }
+
+    /**
+     * Get the mail representation of the notification.
+     *
+     * @param  mixed  $notifiable
+     * @return \Illuminate\Notifications\Messages\MailMessage
+     */
+    public function toDatabase($notifiable)
+    {
+        return [
+            'ticket'  => $this->ticket,// ticket information
+            'action_type' => $this->action_type, // creator
+            'addedBy' => $this->addedBy, // creator
+            'comment' => $this->comment, // creator
+            'user'    => $notifiable // send
+        ];
+    }
+
+    /**
+     * Get the array representation of the notification.
+     *
+     * @param  mixed  $notifiable
+     * @return array
+     */
+    public function toArray($notifiable)
+    {
+        return [
+            //
+        ];
+    }
+}

+ 31 - 0
app/Providers/ComposerServiceProvider.php

@@ -0,0 +1,31 @@
+<?php
+
+namespace App\Providers;
+
+use Illuminate\Support\ServiceProvider;
+
+class ComposerServiceProvider extends ServiceProvider
+{
+    /**
+     * Register services.
+     *
+     * @return void
+     */
+    public function register()
+    {
+        //
+    }
+
+    /**
+     * Bootstrap services.
+     *
+     * @return void
+     */
+    public function boot()
+    {
+        view()->composer('application.layouts.header','App\Http\ViewComposers\ApplicationNotificationComposer');
+        view()->composer('supervisor.layout.header','App\Http\ViewComposers\SupervisorNotificationComposer');
+        view()->composer('admin.layouts.header','App\Http\ViewComposers\AdminNotificationComposer');
+        
+    }
+}

+ 1 - 0
config/app.php

@@ -174,6 +174,7 @@ return [
         // App\Providers\BroadcastServiceProvider::class,
         App\Providers\EventServiceProvider::class,
         App\Providers\RouteServiceProvider::class,
+        App\Providers\ComposerServiceProvider::class,
 
     ],
 

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

@@ -1,4 +1,4 @@
-@extends('web.layouts.master')
+@extends('application.layouts.master')
 @section('content')
         <section class="bg-half-170 d-table w-100" style="background-color: #efefef; height:100vh; padding:121px 0px 5px;">
             <div class="container mb-2">

+ 1 - 1
resources/views/explore.blade.php → resources/views/application/explore.blade.php

@@ -1,4 +1,4 @@
-@extends('web.layouts.master')
+@extends('application.layouts.master')
 @section('content') 
         <section class="bg-half-170 d-table w-100" style="padding : 175px 0px 0px; background-color: #efefef; height: 100vh;">
             <div class="container mt-5">

+ 1 - 1
resources/views/home.blade.php → resources/views/application/home.blade.php

@@ -1,4 +1,4 @@
-@extends('web.layouts.master')
+@extends('application.layouts.master')
 @section('content')
         <section class="bg-half-170 d-table w-100" style="background-color: #efefef; height: 100vh;">
             <div class="container mt-5 pt-4" style="padding: 10px 20px 0px 20px;">

+ 0 - 0
resources/views/web/layouts/bottom.blade.php → resources/views/application/layouts/bottom.blade.php


+ 0 - 0
resources/views/web/layouts/footer.blade - Copy.php → resources/views/application/layouts/footer.blade - Copy.php


+ 0 - 0
resources/views/web/layouts/footer.blade.php → resources/views/application/layouts/footer.blade.php


+ 0 - 0
resources/views/web/layouts/header.blade - Copy (2).php → resources/views/application/layouts/header.blade - Copy (2).php


+ 0 - 0
resources/views/web/layouts/header.blade - Copy.php → resources/views/application/layouts/header.blade - Copy.php


+ 0 - 0
resources/views/web/layouts/header.blade.php → resources/views/application/layouts/header.blade.php


+ 11 - 0
resources/views/application/layouts/master.blade.php

@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html lang="en">
+@include('application.layouts.top')
+<body>
+ @include('application.layouts.header')
+    @yield('content')
+@include('application.layouts.footer')
+</body>
+@include('application.layouts.bottom')
+@include('application.layouts.modal')
+</html>

+ 0 - 0
resources/views/web/layouts/modal.blade.php → resources/views/application/layouts/modal.blade.php


+ 0 - 0
resources/views/web/layouts/notification_list_popup_header.blade.php → resources/views/application/layouts/notification_list_popup_header.blade.php


+ 0 - 0
resources/views/web/layouts/top.blade.php → resources/views/application/layouts/top.blade.php


+ 16 - 0
resources/views/application/notifications/notification_partial.blade.php

@@ -0,0 +1,16 @@
+@forelse($notifications as $notification)
+    @include('application.notifications.type.'.snake_case(class_basename($notification->type)))
+    @empty
+    <br>
+    <h4 class="text-danger text-center">No Notification Found!</h4>
+@endforelse
+<div class="text-center">
+    {{$notifications->appends(request()->query())->links('paginator')}}
+</div>
+
+<script type="text/javascript">
+    $('.page-link').on('click',function(e) {
+        e.preventDefault();
+        $('#notification_load').load($(this).attr('href'));
+    });
+</script>

+ 91 - 0
resources/views/application/notifications/notifications.blade.php

@@ -0,0 +1,91 @@
+@extends('application.layouts.admin')
+
+@section('content')
+<link rel="stylesheet" href="{{ asset('/assets/css/lib/bootstrap-sweetalert/sweetalert.css') }}">
+<style type="text/css">
+    #enroll_badge {
+        border-color: transparent;
+        background-color: rgba(11, 1, 70, 0.2);
+        color: rgba(11, 1, 70, 1);
+        padding: .5rem .7rem !important;
+        border-radius: 30px;
+        font-size: 14px !important;
+    }
+    .mark_as_btn{
+        padding: 0px 12px !important;
+        height: 24px;
+        background-color: #2e58a6 !important;
+        border-width: 1px !important;
+        border-color: #2e58a6 !important;
+        color: #fff !important;
+        border-radius: 30px !important;
+        padding: 0 12px !important;
+    }
+    .mark_as_btn:hover {
+        background-color: #fff !important;
+        border-color: #2e58a6 !important;
+        color: #2e58a6 !important;
+    }
+</style>
+
+<div class="page-content pr-0">
+    <div class="container-fluid">
+        {{-- <header class="section-header">
+            <div class="tbl">
+                <div class="tbl-row">
+                    <div class="tbl-cell">
+                        <h2>All Notifications</h2>
+                        <div class="subtitle"></div>
+                    </div>
+                </div>
+            </div>
+        </header> --}}
+        <div class="row">
+            <div class="col-lg-2"></div>
+            <div class="col-lg-8">
+                <div class="row mb-3">
+                    <div class="col-lg-9">
+                        <h5 class="mb-0"><span class="badge badge-primary" id="enroll_badge">All Notifications</span></h5>
+                    </div>
+                    <div class="col-lg-3 text-right">
+                        <button class="btn btn-info btn-sm mark_as_btn" onclick="markAllAsRead();">Mark all as read</button>
+                    </div>
+                </div>
+                <ul class="exp-timeline" id="notification_load">
+
+                </ul>
+            </div>
+            <div class="col-lg-2"></div>
+        </div>
+    </div><!--.container-fluid-->
+</div>
+<input type="hidden" id="base" value="{{url('/')}}">
+<script src="{{ asset('/assets/js/lib/bootstrap-sweetalert/sweetalert.min.js') }}"></script>
+<script type="text/javascript">
+    $(document).ready(function(){
+        load_page();
+    });
+
+    function load_page(){
+        var base = $('#base').val();
+        $('#notification_load').load(base+'/admin/notifications/get-notifications-partial');
+    }
+
+    function markAllAsRead(){
+        var base = $('#base').val();
+        swal({
+            title: "Are you sure?",
+            type: "warning",
+            showCancelButton: true,
+            confirmButtonClass: "btn-success",
+            confirmButtonText: "Yes, sure!",
+            cancelButtonText: "No, cancel!",
+        });
+
+        $('button.confirm').one('click',function(f){
+          f.preventDefault();
+          window.location.replace(base+'/admin/notifications/mark-all-as-read');
+        });
+    }
+</script>
+@endsection

+ 85 - 0
resources/views/application/notifications/type/agent_university_notification.blade.php

@@ -0,0 +1,85 @@
+
+<style type="text/css">
+    .file_no{
+        border-bottom: none !important;
+        color: #4c4c4c !important;
+        transition: all 1s cubic-bezier(0.19, 1, 0.22, 1) 0s;
+    }
+    .file_no:hover{
+        border-bottom: none !important;
+        color: #ff7f00 !important;
+        transition: all 1s cubic-bezier(0.19, 1, 0.22, 1) 0s;
+    }
+    .site-header .dropdown-menu-notif .dropdown-menu-notif-item{
+        /*background: #dbe4ea !important;*/
+        /*background: aliceblue !important;*/
+    }
+    /*.site-header .dropdown-menu-notif .dropdown-menu-notif-item .dot{
+        display: none;
+    }
+
+    .site-header .dropdown-menu-notif .dropdown-menu-notif-item{
+        padding: 8px 15px 8px 50px !important;
+        border-bottom: .5px dashed #e3e8ec;
+    }
+    .site-header .dropdown-menu-notif .dropdown-menu-notif-item .photo{
+        width: 35px !important;
+        height: 35px !important;
+    }*/
+
+    .dot{
+        display: inline-block;
+        vertical-align: middle;
+        width: 6px;
+        height: 6px;
+        margin: 0 0 6px;
+        -webkit-border-radius: 50%;
+        border-radius: 50%;
+        background: #fa424a;
+        position: relative;
+        top: 2px;
+    }
+</style>
+<div class="tbl form-section" style="margin-bottom: 15px;">
+    <div class="tbl-row" style="@if($notification->read_at == null) background: aliceblue; @else background: #fff; @endif">
+        <div class="tbl-cell tbl-cell-id left text-center" style="width: 10%;">
+            <i class="fa fa-university" style="background: #dbe4ea; padding: 7px; border-radius: 50%; color: #ff7f00; font-size: 13px;"></i>
+            
+        </div>
+        <div class="tbl-cell">
+            <div class="box-typical py-3 px-2" style="margin: 10px 0px; border:0px; @if($notification->read_at == null) background: aliceblue; @else background: #fff; @endif">
+                <div class="tbl details">
+                    <div class="tbl-row">
+                        <div class="tbl-cell">
+                            <div class="exp-timeline-status">
+                                
+                                <a href="{{url('/admin/pending-universities')}}" onclick="markAdminAsRead('{{$notification->id}}');" class="file_no"> 
+                                    Agent: <span style="text-transform: capitalize;">{{$notification['data']['company']['name']}}</span> has added a new institute <b>{{$notification['data']['university']['name']}}</b> 
+                                </a><br>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="tbl-row">
+                        <div class="tbl-cell">
+                            <div class="color-blue-grey-lighter"> 
+                                {{$notification->created_at->diffForHumans()}}
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+
+
+<script type="text/javascript">
+   
+    function markAdminAsRead(id) {
+         $.post('{{url('')}}/admin/notification/mark-as-read', {'_token': '{{ csrf_token() }}','id': id}, function (data) {
+            data.success ? (window.location.href = targetHref) : false;
+        }, 'json');
+
+        return false;
+    }
+</script>

+ 130 - 0
resources/views/application/notifications/type/ticket_notification.blade.php

@@ -0,0 +1,130 @@
+<style type="text/css">
+    .file_no{
+        border-bottom: none !important;
+        color: #4c4c4c !important;
+        transition: all 1s cubic-bezier(0.19, 1, 0.22, 1) 0s;
+    }
+    .file_no:hover{
+        border-bottom: none !important;
+        color: #ff7f00 !important;
+        transition: all 1s cubic-bezier(0.19, 1, 0.22, 1) 0s;
+    }
+    .site-header .dropdown-menu-notif .dropdown-menu-notif-item{
+        /*background: #dbe4ea !important;*/
+        /*background: aliceblue !important;*/
+    }
+    /*.site-header .dropdown-menu-notif .dropdown-menu-notif-item .dot{
+        display: none;
+    }
+
+    .site-header .dropdown-menu-notif .dropdown-menu-notif-item{
+        padding: 8px 15px 8px 50px !important;
+        border-bottom: .5px dashed #e3e8ec;
+    }
+    .site-header .dropdown-menu-notif .dropdown-menu-notif-item .photo{
+        width: 35px !important;
+        height: 35px !important;
+    }*/
+
+    .dot{
+        display: inline-block;
+        vertical-align: middle;
+        width: 6px;
+        height: 6px;
+        margin: 0 0 6px;
+        -webkit-border-radius: 50%;
+        border-radius: 50%;
+        background: #fa424a;
+        position: relative;
+        top: 2px;
+    }
+</style>
+
+
+<div class="tbl form-section" style="margin-bottom: 15px;">
+    <div class="tbl-row" style="@if($notification->read_at == null) background: aliceblue; @else background: #fff; @endif">
+        <div class="tbl-cell tbl-cell-id left text-center" style="width: 10%;">
+            <i class="fa fa-ticket" style="background: #dbe4ea; padding: 7px; border-radius: 50%; color: #ff7f00; font-size: 13px;"></i>
+            
+        </div>
+        <div class="tbl-cell">
+            <div class="box-typical py-3 px-2" style="margin: 10px 0px; border:0px; @if($notification->read_at == null) background: aliceblue; @else background: #fff; @endif">
+                <div class="tbl details">
+                    <div class="tbl-row">
+                        <div class="tbl-cell">
+                            <div class="exp-timeline-status">
+                                {{-- @if($notification->read_at == null)
+                                <div class="dot"></div>
+                                @endif --}} 
+
+                                    <a href="{{url('/admin/manage-tickets/ticket-details',$notification['data']['ticket']['id'])}}" onclick="markAdminAsRead('{{$notification->id}}');" class="file_no"> 
+
+                                    @if($notification['data']['action_type'] =='Assigned')  
+                                        {{-- @php
+                                            $assigned = model('Agent')::where('id', $notification['data']['ticket']['creator_agent_id'])->first();
+                                        @endphp
+                                        <b> {{ $assigned['name'] }} assigned you a token #{{$notification['data']['ticket']['ticket_number']}}</b> --}}
+                                        <b>{{ $notification['data']['addedBy']['name'] }} assigned you a token #{{$notification['data']['ticket']['ticket_number']}}</b>
+                                    @endif
+
+                                    @if($notification['data']['action_type'] =='Open')
+                                        @php 
+                                           $company_name = model('Company')::where('id',$notification['data']['ticket']['company_id'])->first();
+                                        @endphp
+                                        @if($company_name)
+                                             <b>{{ $notification['data']['addedBy']['name'] }}</b> from
+                                             <b>  <span>{{ $company_name['name'] }}</b> has created this token #<b>{{ $notification['data']['ticket']['ticket_number'] }}</b>
+                                            @else
+                                             <b>{{ $notification['data']['addedBy']['name'] }}</b> has created this token #<b>{{ $notification['data']['ticket']['ticket_number'] }}</b>
+                                        @endif
+                                    @endif
+                                   
+                                    @if($notification['data']['action_type'] =='Start') 
+
+                                        <b>{{ $notification['data']['addedBy']['name'] }} started token #{{$notification['data']['ticket']['ticket_number']}}</b>
+                                    @endif
+
+                                    @if($notification['data']['action_type'] =='Finish')  
+
+                                        <b>{{ $notification['data']['addedBy']['name'] }} fixed token #{{$notification['data']['ticket']['ticket_number']}}</b>
+                                    @endif
+
+                                    @if($notification['data']['action_type'] =='Close') 
+                                        <b>{{ $notification['data']['addedBy']['name'] }} close token #{{$notification['data']['ticket']['ticket_number']}}</b>
+                                    @endif
+
+                                    @if($notification['data']['action_type']=="Reopen") 
+                                          
+                                        <b>{{ $notification['data']['addedBy']['name'] }} reopen token #{{$notification['data']['ticket']['ticket_number']}}</b>
+                                    @endif 
+
+                                    @if($notification['data']['action_type']=="Comment") 
+                                        <b>A Comment this token #{{$notification['data']['ticket']['ticket_number']}}</b>
+                                    @endif   
+                                </a><br>   
+                               {{--  <small><b>{{$notification['data']['ticket']['title']}}</b>  Deadline {{date('d M Y',strtotime($notification['data']['task']['created_at']))}}.</small> --}}
+                            </div>
+                        </div>
+                    </div>
+                    <div class="tbl-row">
+                        <div class="tbl-cell">
+                            <div class="color-blue-grey-lighter"> 
+                                {{$notification->created_at->diffForHumans()}}
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+
+<script type="text/javascript">
+    function markAsRead(id) {
+         $.post('{{url('')}}/admin/notification/mark-as-read', {'_token': '{{ csrf_token() }}','id': id}, function (data) {
+            data.success ? (window.location.href = targetHref) : false;
+        }, 'json');
+
+        return false;
+    }
+</script>

+ 1 - 1
resources/views/profile.blade.php → resources/views/application/profile.blade.php

@@ -1,4 +1,4 @@
-@extends('web.layouts.master')
+@extends('application.layouts.master')
 @section('content')     
         <!-- Hero Start -->
         <section class="bg-half-170 d-table w-100 it-home mt-5" style="background-color: #efefef; height: 100vh;">

+ 135 - 0
resources/views/email/hold_status_email.blade.php

@@ -0,0 +1,135 @@
+<!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: 'Quicksand', sans-serif;
+            }
+            h5{
+                font-family: 'Montserrat Alternates', sans-serif !important;
+            }
+            .bg-half-170 {
+                padding:0px;
+            }
+            .tmail{
+                color: #6d6d6d; 
+                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" style="background-color:white;">
+                                <div class="p-5">
+                                    <h3 style="text-align: center; font-family:Ubuntu !important; color: #3c4858 !important; font-size: 30px !important;">Research Admission</h3>
+                                    <p class="mt-5">Dear {{ $student }},</p>
+                                    <p class="mt-2">Thank you for submitting your research proposal.</p>
+                                    <p class="mt-2">To further evaluate your application, the following documents/information are required:</p>
+                                    
+                                    <ul>
+                                        @if(count($doc_requirement_list) > 0)
+                                        @foreach($doc_requirement_list as $row)
+                                        <li>
+                                            <div class="input-group mt-2"> 
+                                                <div class="input-group-addon">
+                                                    <div class="checkbox-bird green" style="margin: 0px;">
+                                                         {{ $row->requirement_title}}
+                                                    </div>
+                                                </div>
+                                            </div>
+                                        </li>
+                                        @endforeach
+                                        @endif
+                                    </ul> 
+                                    <p class="mt-2">I highly recommend that you provide the required documents/information as soon as possible to avoid any delays in the review process.</p>
+                                    <p class="mt-2">Looking forward to hearing from you.</p>
+                                    <h4 class="mt-3">Thanking you,</h4>
+                                    <h5>{{ $teacher }}</h5>
+                                </div> 
+                                <div style="background-color: #eee; border-radius: 0px 0px 5px 5px;">
+                                    <p class="mt-5 tmail">This email was sent to {{$receive_email}}</p>
+                                    <p class="mt-3 tmail">Research Admission is a revolutionary platform that simplifies the application process for<br> both applicants and supervisors, thereby saving valuable time.</p>
+                                    <p class="mt-3 tmail" style="font-size: 12px;">Copyright © {{date('Y')}} Research Admission</p>
+                                </div>
+                            </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>

+ 118 - 0
resources/views/email/interested_status_email.blade.php

@@ -0,0 +1,118 @@
+<!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: 'Quicksand', sans-serif;
+            }
+            h5{
+                font-family: 'Montserrat Alternates', sans-serif !important;
+            }
+            .bg-half-170 {
+                padding:0px;
+            }
+            .tmail{
+                color: #6d6d6d; 
+                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" style="background-color:white;">
+                                <div class="p-5">
+                                    <h3 style="text-align: center; font-family:Ubuntu !important; color: #3c4858 !important; font-size: 30px !important;">Research Admission</h3>
+                                    <p class="mt-5">Dear {{ $student }},</p>
+                                    <p class="mt-2">I hope this email finds you well. </p>
+                                    <p class="mt-2">I wanted to reach out to you to express my interest in supervising your research project. I found your research proposal and topic to be very intriguing and I believe that I would be able to provide valuable guidance and support as you pursue your research goals.</p> 
+                                    <p class="mt-2">If you are still interested in having me as your supervisor, I would kindly request that you submit a formal application as soon as possible. I am looking forward to the opportunity to work with you and contribute to your academic success.</p> 
+                                    <h4 class="mt-3">Thank you and best regards,</h4>
+                                    <h5>{{ $teacher }}</h5>
+                                </div> 
+                                <div style="background-color: #eee; border-radius: 0px 0px 5px 5px;">
+                                    <p class="mt-5 tmail">This email was sent to {{$receive_email}}</p>
+                                    <p class="mt-3 tmail">Research Admission is a revolutionary platform that simplifies the application process for<br> both applicants and supervisors, thereby saving valuable time.</p>
+                                    <p class="mt-3 tmail" style="font-size: 12px;">Copyright © {{date('Y')}} Research Admission</p>
+                                </div>
+                            </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>

+ 119 - 0
resources/views/email/rejected_status_email.blade.php

@@ -0,0 +1,119 @@
+<!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: 'Quicksand', sans-serif;
+            }
+            h5{
+                font-family: 'Montserrat Alternates', sans-serif !important;
+            }
+            .bg-half-170 {
+                padding:0px;
+            }
+            .tmail{
+                color: #6d6d6d; 
+                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" style="background-color:white;">
+                                <div class="p-5">
+                                    <h3 style="text-align: center; font-family:Ubuntu !important; color: #3c4858 !important; font-size: 30px !important;">Research Admission</h3>
+                                    <p class="mt-5">Dear {{ $student }},</p>
+                                    <p class="mt-2">I hope this email finds you well. </p>
+                                    <p class="mt-2">I regret to inform you that your research application has been rejected due <strong>“{{ $reason }}”</strong></p> 
+                                    <p class="mt-2">Please do not be discouraged by this setback, as there may be other opportunities for you to pursue your research interests in the future. In the meantime, I encourage you to continue exploring your interests and developing your skills in your chosen field.</p> 
+                                    <p class="mt-2">Thank you for your interest in our research program, and I wish you all the best in your future academic endeavors.</p> 
+                                    <h4 class="mt-3">Sincerely,</h4>
+                                    <h5>{{ $teacher }}</h5>
+                                </div> 
+                                <div style="background-color: #eee; border-radius: 0px 0px 5px 5px;">
+                                    <p class="mt-5 tmail">This email was sent to {{$receive_email}}</p>
+                                    <p class="mt-3 tmail">Research Admission is a revolutionary platform that simplifies the application process for<br> both applicants and supervisors, thereby saving valuable time.</p>
+                                    <p class="mt-3 tmail" style="font-size: 12px;">Copyright © {{date('Y')}} Research Admission</p>
+                                </div>
+                            </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>

+ 120 - 0
resources/views/email/terminate_status_email.blade.php

@@ -0,0 +1,120 @@
+<!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: 'Quicksand', sans-serif;
+            }
+            h5{
+                font-family: 'Montserrat Alternates', sans-serif !important;
+            }
+            .bg-half-170 {
+                padding:0px;
+            }
+            .tmail{
+                color: #6d6d6d; 
+                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" style="background-color:white;">
+                                <div class="p-5">
+                                    <h3 style="text-align: center; font-family:Ubuntu !important; color: #3c4858 !important; font-size: 30px !important;">Research Admission</h3>
+                                    <p class="mt-5">Dear {{ $student }},</p>
+                                    <p class="mt-2">I hope this email finds you well. </p>
+                                    <p class="mt-2">I am writing to inform you that I have not received the additional documents/information that I requested to review your application.</p> 
+                                    <p class="mt-2">It has been several days since I requested the information, therefore, I regret to inform you that I am terminating your application at this time. </p> 
+                                    <p class="mt-2">I understand that unforeseen circumstances can arise, and I would be happy to consider your application again if you choose to reapply in the future. However, please note that you would need to submit a new application and ensure that all the necessary information is included.</p> 
+                                    <p class="mt-2">Thank you for your interest and I wish you all the best in your future endeavors. </p> 
+                                    <h4 class="mt-3">Sincerely,</h4>
+                                    <h5>{{ $teacher }}</h5>
+                                </div> 
+                                <div style="background-color: #eee; border-radius: 0px 0px 5px 5px;">
+                                    <p class="mt-5 tmail">This email was sent to {{$receive_email}}</p>
+                                    <p class="mt-3 tmail">Research Admission is a revolutionary platform that simplifies the application process for<br> both applicants and supervisors, thereby saving valuable time.</p>
+                                    <p class="mt-3 tmail" style="font-size: 12px;">Copyright © {{date('Y')}} Research Admission</p>
+                                </div>
+                            </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>

+ 153 - 0
resources/views/notifications/ticket_notification.blade.php

@@ -0,0 +1,153 @@
+<div class="single_radius_item" style="@if($notification->read_at == null) background: #f5f4fd; @else background: #fff; @endif">
+    <i class="fa fa-ticket"></i>
+    
+    @if(Auth::guard('agent')->user())
+    <span>
+        <a href="{{url('/agent/token-details',$notification['data']['ticket']['id'])}}" onclick="markAsRead('{{$notification->id}}');" class="link_hover">
+            Token: 
+            @if($notification['data']['action_type'] =='Open')
+               #{{$notification['data']['ticket']['ticket_number']}}
+            @endif 
+            @if($notification['data']['action_type'] =='Start')
+                #{{$notification['data']['ticket']['ticket_number']}}
+            @endif
+            @if($notification['data']['action_type'] =='Finish') 
+                #{{$notification['data']['ticket']['ticket_number']}}
+            @endif
+            @if($notification['data']['action_type'] =='Close') 
+                #{{$notification['data']['ticket']['ticket_number']}}
+            @endif
+            @if($notification['data']['action_type']=='Reopen') 
+                #{{$notification['data']['ticket']['ticket_number']}}
+            @endif 
+            @if($notification['data']['action_type']=="Comment") 
+                #{{$notification['data']['ticket']['ticket_number']}}
+            @endif
+        </a>
+        <br>
+        @if($notification['data']['action_type'] =='Open')
+           Your token has been created by SAMS GLOBAL.
+        @endif
+        @if($notification['data']['action_type'] =='Start')
+            Your token has started.
+        @endif
+        @if($notification['data']['action_type'] =='Finish') 
+            Your token has fixed.
+        @endif
+        @if($notification['data']['action_type'] =='Close') 
+            Your token has close.
+        @endif
+        @if($notification['data']['action_type']=='Reopen') 
+            Your token has reopen.
+        @endif
+        @if($notification['data']['action_type']=="Comment") 
+            A comment in this token.
+        @endif
+        <br>
+        <small>{{ date('d M Y',strtotime($notification->created_at)) }}, {{ date('H:i A',strtotime($notification->created_at)) }}</small>
+    </span>
+    @elseif(Auth::guard('franchise')->user())
+    <span>
+        <a href="{{url('/franchise/token-details',$notification['data']['ticket']['id'])}}" onclick="markAsRead('{{$notification->id}}');" class="link_hover">
+            Token: 
+            @if($notification['data']['action_type'] =='Start')
+                #{{$notification['data']['ticket']['ticket_number']}}
+            @endif
+            @if($notification['data']['action_type'] =='Finish') 
+                #{{$notification['data']['ticket']['ticket_number']}}
+            @endif
+            @if($notification['data']['action_type'] =='Close') 
+                #{{$notification['data']['ticket']['ticket_number']}}
+            @endif
+            @if($notification['data']['action_type']=='Reopen') 
+                #{{$notification['data']['ticket']['ticket_number']}}
+            @endif 
+            @if($notification['data']['action_type']=="Comment") 
+                #{{$notification['data']['ticket']['ticket_number']}}
+            @endif
+        </a>
+        <br>
+        @if($notification['data']['action_type'] =='Start')
+            Your token has started.
+        @endif
+        @if($notification['data']['action_type'] =='Finish') 
+            Your token has fixed.
+        @endif
+        @if($notification['data']['action_type'] =='Close') 
+            Your token has close.
+        @endif
+        @if($notification['data']['action_type']=='Reopen') 
+            Your token has reopen.
+        @endif
+        @if($notification['data']['action_type']=="Comment") 
+            A comment in this token.
+        @endif
+        <br>
+        <small>{{ date('d M Y',strtotime($notification->created_at)) }}, {{ date('H:i A',strtotime($notification->created_at)) }}</small>
+    </span>
+    @elseif(Auth::guard('admin')->user())
+    <span>
+        <a href="{{url('/admin/manage-tickets/ticket-details',$notification['data']['ticket']['id'])}}" onclick="markAsRead('{{$notification->id}}');" class="link_hover">
+            Token: #{{$notification['data']['ticket']['ticket_number']}}
+        </a>
+        <br>
+        @if($notification['data']['action_type'] =='Open' && $notification['data']['ticket']['creator_franchise_id'] !='')
+        @php 
+           $company_name = model('Company')::where('id',$notification['data']['ticket']['company_id'])->select('name')->first();
+        @endphp
+        @if($company_name)
+            <b>{{ $notification['data']['addedBy']['name'] }}</b> created this token for {{ $company_name['name'] }}.
+        @endif
+        @elseif($notification['data']['action_type'] =='Open')
+        @php 
+           $company_name = model('Company')::where('id',$notification['data']['ticket']['company_id'])->select('name')->first();
+        @endphp
+        @if($company_name)
+            <b>{{ $notification['data']['addedBy']['name'] }}</b> from {{ $company_name['name'] }} has been created this token.</b>
+        @else
+        <b>{{ $notification['data']['addedBy']['name'] }}</b> has been created this token.
+        @endif
+        @endif
+        @if($notification['data']['action_type'] =='Assigned')
+            <b>{{ $notification['data']['addedBy']['name'] }}</b> assigned you in this token.</b>
+        @endif
+        @if($notification['data']['action_type'] =='Start') 
+            <b>{{ $notification['data']['addedBy']['name'] }}</b> started this token.</b>
+        @endif
+        @if($notification['data']['action_type'] =='Finish') 
+            <b>{{ $notification['data']['addedBy']['name'] }}</b> fixed this token.</b>
+        @endif
+        @if($notification['data']['action_type'] =='Close') 
+            <b>{{ $notification['data']['addedBy']['name'] }}</b> closed this token.</b>
+        @endif
+        @if($notification['data']['action_type']=="Reopen")
+            <b>{{ $notification['data']['addedBy']['name'] }}</b> reopened this token.</b>
+        @endif 
+        @if($notification['data']['action_type']=="Comment") 
+            <b>{{ $notification['data']['addedBy']['name'] }}</b> commented on this token.</b>
+        @endif
+        <br>
+        <small>{{ date('d M Y',strtotime($notification->created_at)) }}, {{ date('H:i A',strtotime($notification->created_at)) }}</small>
+    </span>
+    @endif
+    
+</div>
+
+
+<script type="text/javascript">
+    function markAsRead(id) {
+         $.post('{{url('')}}/agent/notification/mark-as-read', {'_token': '{{ csrf_token() }}','id': id}, function (data) {
+            data.success ? (window.location.href = targetHref) : false;
+        }, 'json');
+
+        return false;
+    }
+
+    function markAdminAsRead(id) {
+         $.post('{{url('')}}/admin/notification/mark-as-read', {'_token': '{{ csrf_token() }}','id': id}, function (data) {
+            data.success ? (window.location.href = targetHref) : false;
+        }, 'json');
+
+        return false;
+    }
+</script>

+ 7 - 1
resources/views/teacher/student_proposal_details.blade.php

@@ -1117,6 +1117,11 @@ element.style {
                                                                             Rejected
                                                                         </span>
                                                                         @endif
+                                                                        @if($proposal_details->proposal_status==7)
+                                                                        <span class="top_part_status_name" style="background: #dcdcdc; color: #8c9094;">
+                                                                            Terminate
+                                                                        </span>
+                                                                        @endif
                                                                         <div class="dropdown" style="top: -2px; position: absolute; right: 9px;">
                                                                                 <i class="fa fa-caret-down dropdown-toggle add_hover tooltips" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" data-original-title="Change Status" style="color: #8c9094;"></i>
                                                                             <div class="dropdown-menu" aria-labelledby="dropdownMenuButton" x-placement="bottom-start" style="position: absolute; transform: translate3d(10px, 13px, 0px); top: 0px; left: 0px; will-change: transform; margin-left: -75px; z-index: 2; margin-top: 10px;">
@@ -1126,6 +1131,7 @@ element.style {
                                                                                 <a class="dropdown-item status_change hand" data-val="4" data-id="{{$proposal_details->id}}" name="proposal_status">Hold</a>  <!--holding it for longer does something-->
                                                                                 <a class="dropdown-item status_change hand" data-val="5" data-id="{{$proposal_details->id}}" name="proposal_status">Interested</a>
                                                                                 <a class="dropdown-item open_modal_page hand" data-url="{{route('modal-get',['name'=>'proposal_status_rejected_form','id'=>$proposal_details->id])}}" data-title="Rejected" data-val="6" data-id="{{$proposal_details->id}}">Rejected</a>
+                                                                                <a class="dropdown-item status_change hand" data-val="7" data-id="{{$proposal_details->id}}" name="proposal_status">Terminate</a>
                                                                             </div>
                                                                         </div>
                                                                     </div>
@@ -1592,7 +1598,7 @@ element.style {
                     'value':value
                  }
                  
-                 if(value==2 || value ==3  || value ==4  || value ==5){  // 2 =Reviewing; 3 =Push; 4 =Hold; 5 =Interested
+                 if(value==2 || value ==3  || value ==4  || value ==5 || value ==7){  // 2 =Reviewing; 3 =Push; 4 =Hold; 5 =Interested
                      
                     swal({
                         title: "Are you sure you want to change status?",

+ 0 - 11
resources/views/web/layouts/master.blade.php

@@ -1,11 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-@include('web.layouts.top')
-<body>
- @include('web.layouts.header')
-    @yield('content')
-@include('web.layouts.footer')
-</body>
-@include('web.layouts.bottom')
-@include('web.layouts.modal')
-</html>

+ 3 - 1
routes/web.php

@@ -1,5 +1,7 @@
 <?php
 
+use Illuminate\Support\Facades\Artisan;
+use Illuminate\Support\Facades\Auth;
 use Illuminate\Support\Facades\Route;
 
 /*
@@ -32,7 +34,7 @@ Route::get('/dashboard', function () {
 });
 
 Route::get('/explore', function () {
-    return view('explore');
+    return view('application.explore');
 });
 
 Route::get('/landing', function () {

+ 24 - 0
sql/update.sql

@@ -256,3 +256,27 @@ CREATE TABLE `feedback_reasons` (
 COLLATE='utf8mb4_general_ci'
 ENGINE=InnoDB 
 ;
+
+------------06/06/2023--------------
+
+
+ALTER TABLE `student_proposals`
+	CHANGE COLUMN `proposal_status` `proposal_status` TINYINT(4) NULL DEFAULT '1' COMMENT '1=New,2=Reviewing,3=Pause, 4=Hold, , 5=Interested ,6=Rejected,7=Terminate' AFTER `concept`;
+
+
+CREATE TABLE `notifications` (
+	`id` CHAR(36) NOT NULL COLLATE 'utf8mb4_unicode_ci',
+	`type` VARCHAR(191) NOT NULL COLLATE 'utf8mb4_unicode_ci',
+	`notifiable_type` VARCHAR(191) NOT NULL COLLATE 'utf8mb4_unicode_ci',
+	`notifiable_id` BIGINT(20) UNSIGNED NOT NULL,
+	`data` TEXT NOT NULL COLLATE 'utf8mb4_unicode_ci',
+	`read_at` TIMESTAMP NULL DEFAULT NULL, 
+	`counter` INT(11) NOT NULL DEFAULT '0',
+	`created_at` TIMESTAMP NULL DEFAULT NULL,
+	`updated_at` TIMESTAMP NULL DEFAULT NULL,
+	PRIMARY KEY (`id`) USING BTREE,
+	INDEX `notifications_notifiable_type_notifiable_id_index` (`notifiable_type`, `notifiable_id`) USING BTREE
+)
+COLLATE='utf8mb4_unicode_ci'
+ENGINE=InnoDB
+;