Israat Zarin 2 years ago
parent
commit
d3ee7c8dd6

+ 22 - 1
app/Http/Controllers/Admin/AdminController.php

@@ -4,6 +4,7 @@ namespace App\Http\Controllers\Admin;
 
 use App\Http\Controllers\Controller;
 use Illuminate\Http\Request;
+use App\User;
 use Auth;
 use Mail;
 use Session;
@@ -22,7 +23,27 @@ class AdminController extends Controller
     public function dashboard()
     {
         $admin = Auth::guard('admin')->user();
-        return view('admin.admin_profile');
+        $register_teachers_list =User::whereIn(
+                'status',[0,2]
+            )->where(
+                'user_type',2
+            )->orderBy(
+                'name','ASC'
+            )->get();
+
+        $active_teachers_list =User::where(
+                'status',1
+            )->where(
+                'user_type',2
+            )->orderBy(
+                'name','ASC'
+            )->get();
+        
+        $data =[
+          'register_teachers_list'=>$register_teachers_list , 
+          'active_teachers_list'=>$active_teachers_list  
+        ];
+        return view('admin.admin_profile',$data);
     }
 
     /**

+ 11 - 1
app/Http/Controllers/AjaxController.php

@@ -62,6 +62,16 @@ class AjaxController extends Controller
 
             } 
 
-		}  
+		}elseif($name=="teacher_user_status_change"){
+
+            $data =User::find($req->id);
+            $data->status =$req->status;
+            $data->update();
+
+            return response(
+                ['msg'=>'Status successfully changed.']
+            );
+
+        }  
 	}
 }

+ 3 - 3
app/Http/Controllers/TeacherAuth/LoginController.php

@@ -57,10 +57,10 @@ class LoginController extends Controller
         $teacher = User::where('user_type',2)->where('email',$request->email)->first();
 
         if(!$teacher){
-            return redirect('/')->with('error','Unknown Email address!');
+            return redirect('/login-v2')->with('error','Unknown Email address!');
         }else{
             if($teacher->status == 0){
-                return redirect('/')->with('error', 'Account Status is not Activated!');
+                return redirect('/login-v2')->with('error', 'Account Status is not Activated!');
             }
             else{
                 $credentials = [
@@ -74,7 +74,7 @@ class LoginController extends Controller
                     return redirect('teacher_profile');
                   }
                   else{
-                    return redirect('/')->with('error','Wrong Email/Password combination');
+                    return redirect('/login-v2')->with('error','Wrong Email/Password combination');
                 }
             }
         }

+ 107 - 0
public/css/pnotify/pnotify-init.js

@@ -0,0 +1,107 @@
+PNotify.prototype.options.styling = "bootstrap3";
+
+$(document).ready(function() {
+    $('#pn-simple').on('click', function() {
+        new PNotify('Check me out! I\'m a notice.');
+    });
+
+    $('#pn-regular').on('click', function() {
+        new PNotify({
+            title: 'Regular Notice',
+            text: 'Check me out! I\'m a notice.',
+            addclass: 'alert-with-icon'
+        });
+    });
+
+    $('#pn-glyphicon').on('click', function() {
+        new PNotify({
+            title: 'Bootstrap Icon',
+            text: 'I have an icon that uses the Bootstrap icon styles.',
+            icon: 'glyphicon glyphicon-envelope',
+            addclass: 'alert-with-icon'
+        });
+    });
+
+    $('#pn-custom-icon').on('click', function() {
+        new PNotify({
+            title: 'Custom Icon',
+            text: 'I have an icon that uses the Bootstrap icon styles.',
+            icon: 'font-icon font-icon-warning',
+            addclass: 'alert-with-icon'
+        });
+    });
+
+    $('#pn-no-icon').on('click', function() {
+        new PNotify({
+            title: 'No Icon Notice',
+            text: 'I have no icon.',
+            icon: false
+        });
+    });
+
+    $('#pn-info').on('click', function() {
+        new PNotify({
+            title: 'New Thing',
+            text: 'Just to let you know, something happened.',
+            type: 'info',
+            icon: 'font-icon font-icon-warning',
+            addclass: 'alert-with-icon'
+        });
+    });
+
+    $('#pn-success').on('click', function() {
+        new PNotify({
+            title: 'Regular Success',
+            text: 'That thing that you were trying to do worked!',
+            type: 'success',
+            icon: 'font-icon font-icon-check-circle',
+            addclass: 'alert-with-icon'
+        });
+    });
+
+    $('#pn-danger').on('click', function() {
+        new PNotify({
+            title: 'Oh No!',
+            text: 'Something terrible happened.',
+            type: 'error',
+            icon: 'font-icon font-icon-warning',
+            addclass: 'alert-with-icon'
+        });
+    });
+
+    $('#pn-warning').on('click', function() {
+        new PNotify({
+            title: 'Oh No!',
+            text: 'Something terrible happened.',
+            icon: 'font-icon font-icon-warning',
+            addclass: 'alert-with-icon'
+        });
+    });
+
+    $('#pn-purple').on('click', function() {
+        new PNotify({
+            title: 'Oh No!',
+            text: 'Something terrible happened.',
+            icon: 'font-icon font-icon-warning',
+            addclass: 'alert-with-icon alert-purple'
+        });
+    });
+
+    $('#pn-white').on('click', function() {
+        new PNotify({
+            title: 'Oh No!',
+            text: 'Something terrible happened.',
+            icon: 'font-icon font-icon-warning',
+            addclass: 'alert-with-icon alert-white'
+        });
+    });
+
+    $('#pn-grey').on('click', function() {
+        new PNotify({
+            title: 'Oh No!',
+            text: 'Something terrible happened.',
+            icon: 'font-icon font-icon-warning',
+            addclass: 'alert-with-icon alert-grey'
+        });
+    });
+});

+ 31 - 0
public/css/pnotify/pnotify.js

@@ -0,0 +1,31 @@
+/*
+PNotify 3.0.0 sciactive.com/pnotify/
+(C) 2015 Hunter Perrin; Google, Inc.
+license Apache-2.0
+*/
+(function(b,k){"function"===typeof define&&define.amd?define("pnotify",["jquery"],function(q){return k(q,b)}):"object"===typeof exports&&"undefined"!==typeof module?module.exports=k(require("jquery"),global||b):b.PNotify=k(b.jQuery,b)})(this,function(b,k){var q=function(l){var k={dir1:"down",dir2:"left",push:"bottom",spacing1:36,spacing2:36,context:b("body"),modal:!1},g,h,n=b(l),r=function(){h=b("body");d.prototype.options.stack.context=h;n=b(l);n.bind("resize",function(){g&&clearTimeout(g);g=setTimeout(function(){d.positionAll(!0)},
+2)})},s=function(c){var a=b("<div />",{"class":"ui-pnotify-modal-overlay"});a.prependTo(c.context);c.overlay_close&&a.click(function(){d.removeStack(c)});return a},d=function(c){this.parseOptions(c);this.init()};b.extend(d.prototype,{version:"3.0.0",options:{title:!1,title_escape:!1,text:!1,text_escape:!1,styling:"brighttheme",addclass:"",cornerclass:"",auto_display:!0,width:"300px",min_height:"16px",type:"notice",icon:!0,animation:"fade",animate_speed:"normal",shadow:!0,hide:!0,delay:8E3,mouse_reset:!0,
+remove:!0,insert_brs:!0,destroy:!0,stack:k},modules:{},runModules:function(c,a){var p,b;for(b in this.modules)p="object"===typeof a&&b in a?a[b]:a,"function"===typeof this.modules[b][c]&&(this.modules[b].notice=this,this.modules[b].options="object"===typeof this.options[b]?this.options[b]:{},this.modules[b][c](this,"object"===typeof this.options[b]?this.options[b]:{},p))},state:"initializing",timer:null,animTimer:null,styles:null,elem:null,container:null,title_container:null,text_container:null,animating:!1,
+timerHide:!1,init:function(){var c=this;this.modules={};b.extend(!0,this.modules,d.prototype.modules);this.styles="object"===typeof this.options.styling?this.options.styling:d.styling[this.options.styling];this.elem=b("<div />",{"class":"ui-pnotify "+this.options.addclass,css:{display:"none"},"aria-live":"assertive","aria-role":"alertdialog",mouseenter:function(a){if(c.options.mouse_reset&&"out"===c.animating){if(!c.timerHide)return;c.cancelRemove()}c.options.hide&&c.options.mouse_reset&&c.cancelRemove()},
+mouseleave:function(a){c.options.hide&&c.options.mouse_reset&&"out"!==c.animating&&c.queueRemove();d.positionAll()}});"fade"===this.options.animation&&this.elem.addClass("ui-pnotify-fade-"+this.options.animate_speed);this.container=b("<div />",{"class":this.styles.container+" ui-pnotify-container "+("error"===this.options.type?this.styles.error:"info"===this.options.type?this.styles.info:"success"===this.options.type?this.styles.success:this.styles.notice),role:"alert"}).appendTo(this.elem);""!==
+this.options.cornerclass&&this.container.removeClass("ui-corner-all").addClass(this.options.cornerclass);this.options.shadow&&this.container.addClass("ui-pnotify-shadow");!1!==this.options.icon&&b("<div />",{"class":"ui-pnotify-icon"}).append(b("<span />",{"class":!0===this.options.icon?"error"===this.options.type?this.styles.error_icon:"info"===this.options.type?this.styles.info_icon:"success"===this.options.type?this.styles.success_icon:this.styles.notice_icon:this.options.icon})).prependTo(this.container);
+this.title_container=b("<h4 />",{"class":"ui-pnotify-title"}).appendTo(this.container);!1===this.options.title?this.title_container.hide():this.options.title_escape?this.title_container.text(this.options.title):this.title_container.html(this.options.title);this.text_container=b("<div />",{"class":"ui-pnotify-text","aria-role":"alert"}).appendTo(this.container);!1===this.options.text?this.text_container.hide():this.options.text_escape?this.text_container.text(this.options.text):this.text_container.html(this.options.insert_brs?
+String(this.options.text).replace(/\n/g,"<br />"):this.options.text);"string"===typeof this.options.width&&this.elem.css("width",this.options.width);"string"===typeof this.options.min_height&&this.container.css("min-height",this.options.min_height);d.notices="top"===this.options.stack.push?b.merge([this],d.notices):b.merge(d.notices,[this]);"top"===this.options.stack.push&&this.queuePosition(!1,1);this.options.stack.animation=!1;this.runModules("init");this.options.auto_display&&this.open();return this},
+update:function(c){var a=this.options;this.parseOptions(a,c);this.elem.removeClass("ui-pnotify-fade-slow ui-pnotify-fade-normal ui-pnotify-fade-fast");"fade"===this.options.animation&&this.elem.addClass("ui-pnotify-fade-"+this.options.animate_speed);this.options.cornerclass!==a.cornerclass&&this.container.removeClass("ui-corner-all "+a.cornerclass).addClass(this.options.cornerclass);this.options.shadow!==a.shadow&&(this.options.shadow?this.container.addClass("ui-pnotify-shadow"):this.container.removeClass("ui-pnotify-shadow"));
+!1===this.options.addclass?this.elem.removeClass(a.addclass):this.options.addclass!==a.addclass&&this.elem.removeClass(a.addclass).addClass(this.options.addclass);!1===this.options.title?this.title_container.slideUp("fast"):this.options.title!==a.title&&(this.options.title_escape?this.title_container.text(this.options.title):this.title_container.html(this.options.title),!1===a.title&&this.title_container.slideDown(200));!1===this.options.text?this.text_container.slideUp("fast"):this.options.text!==
+a.text&&(this.options.text_escape?this.text_container.text(this.options.text):this.text_container.html(this.options.insert_brs?String(this.options.text).replace(/\n/g,"<br />"):this.options.text),!1===a.text&&this.text_container.slideDown(200));this.options.type!==a.type&&this.container.removeClass(this.styles.error+" "+this.styles.notice+" "+this.styles.success+" "+this.styles.info).addClass("error"===this.options.type?this.styles.error:"info"===this.options.type?this.styles.info:"success"===this.options.type?
+this.styles.success:this.styles.notice);if(this.options.icon!==a.icon||!0===this.options.icon&&this.options.type!==a.type)this.container.find("div.ui-pnotify-icon").remove(),!1!==this.options.icon&&b("<div />",{"class":"ui-pnotify-icon"}).append(b("<span />",{"class":!0===this.options.icon?"error"===this.options.type?this.styles.error_icon:"info"===this.options.type?this.styles.info_icon:"success"===this.options.type?this.styles.success_icon:this.styles.notice_icon:this.options.icon})).prependTo(this.container);
+this.options.width!==a.width&&this.elem.animate({width:this.options.width});this.options.min_height!==a.min_height&&this.container.animate({minHeight:this.options.min_height});this.options.hide?a.hide||this.queueRemove():this.cancelRemove();this.queuePosition(!0);this.runModules("update",a);return this},open:function(){this.state="opening";this.runModules("beforeOpen");var c=this;this.elem.parent().length||this.elem.appendTo(this.options.stack.context?this.options.stack.context:h);"top"!==this.options.stack.push&&
+this.position(!0);this.animateIn(function(){c.queuePosition(!0);c.options.hide&&c.queueRemove();c.state="open";c.runModules("afterOpen")});return this},remove:function(c){this.state="closing";this.timerHide=!!c;this.runModules("beforeClose");var a=this;this.timer&&(l.clearTimeout(this.timer),this.timer=null);this.animateOut(function(){a.state="closed";a.runModules("afterClose");a.queuePosition(!0);a.options.remove&&a.elem.detach();a.runModules("beforeDestroy");if(a.options.destroy&&null!==d.notices){var c=
+b.inArray(a,d.notices);-1!==c&&d.notices.splice(c,1)}a.runModules("afterDestroy")});return this},get:function(){return this.elem},parseOptions:function(c,a){this.options=b.extend(!0,{},d.prototype.options);this.options.stack=d.prototype.options.stack;for(var p=[c,a],m,f=0;f<p.length;f++){m=p[f];if("undefined"===typeof m)break;if("object"!==typeof m)this.options.text=m;else for(var e in m)this.modules[e]?b.extend(!0,this.options[e],m[e]):this.options[e]=m[e]}},animateIn:function(c){this.animating=
+"in";var a=this;c=function(){a.animTimer&&clearTimeout(a.animTimer);"in"===a.animating&&(a.elem.is(":visible")?(this&&this.call(),a.animating=!1):a.animTimer=setTimeout(c,40))}.bind(c);"fade"===this.options.animation?(this.elem.one("webkitTransitionEnd mozTransitionEnd MSTransitionEnd oTransitionEnd transitionend",c).addClass("ui-pnotify-in"),this.elem.css("opacity"),this.elem.addClass("ui-pnotify-fade-in"),this.animTimer=setTimeout(c,650)):(this.elem.addClass("ui-pnotify-in"),c())},animateOut:function(c){this.animating=
+"out";var a=this;c=function(){a.animTimer&&clearTimeout(a.animTimer);"out"===a.animating&&("0"!=a.elem.css("opacity")&&a.elem.is(":visible")?a.animTimer=setTimeout(c,40):(a.elem.removeClass("ui-pnotify-in"),this&&this.call(),a.animating=!1))}.bind(c);"fade"===this.options.animation?(this.elem.one("webkitTransitionEnd mozTransitionEnd MSTransitionEnd oTransitionEnd transitionend",c).removeClass("ui-pnotify-fade-in"),this.animTimer=setTimeout(c,650)):(this.elem.removeClass("ui-pnotify-in"),c())},position:function(c){var a=
+this.options.stack,b=this.elem;"undefined"===typeof a.context&&(a.context=h);if(a){"number"!==typeof a.nextpos1&&(a.nextpos1=a.firstpos1);"number"!==typeof a.nextpos2&&(a.nextpos2=a.firstpos2);"number"!==typeof a.addpos2&&(a.addpos2=0);var d=!b.hasClass("ui-pnotify-in");if(!d||c){a.modal&&(a.overlay?a.overlay.show():a.overlay=s(a));b.addClass("ui-pnotify-move");var f;switch(a.dir1){case "down":f="top";break;case "up":f="bottom";break;case "left":f="right";break;case "right":f="left"}c=parseInt(b.css(f).replace(/(?:\..*|[^0-9.])/g,
+""));isNaN(c)&&(c=0);"undefined"!==typeof a.firstpos1||d||(a.firstpos1=c,a.nextpos1=a.firstpos1);var e;switch(a.dir2){case "down":e="top";break;case "up":e="bottom";break;case "left":e="right";break;case "right":e="left"}c=parseInt(b.css(e).replace(/(?:\..*|[^0-9.])/g,""));isNaN(c)&&(c=0);"undefined"!==typeof a.firstpos2||d||(a.firstpos2=c,a.nextpos2=a.firstpos2);if("down"===a.dir1&&a.nextpos1+b.height()>(a.context.is(h)?n.height():a.context.prop("scrollHeight"))||"up"===a.dir1&&a.nextpos1+b.height()>
+(a.context.is(h)?n.height():a.context.prop("scrollHeight"))||"left"===a.dir1&&a.nextpos1+b.width()>(a.context.is(h)?n.width():a.context.prop("scrollWidth"))||"right"===a.dir1&&a.nextpos1+b.width()>(a.context.is(h)?n.width():a.context.prop("scrollWidth")))a.nextpos1=a.firstpos1,a.nextpos2+=a.addpos2+("undefined"===typeof a.spacing2?25:a.spacing2),a.addpos2=0;"number"===typeof a.nextpos2&&(a.animation?b.css(e,a.nextpos2+"px"):(b.removeClass("ui-pnotify-move"),b.css(e,a.nextpos2+"px"),b.css(e),b.addClass("ui-pnotify-move")));
+switch(a.dir2){case "down":case "up":b.outerHeight(!0)>a.addpos2&&(a.addpos2=b.height());break;case "left":case "right":b.outerWidth(!0)>a.addpos2&&(a.addpos2=b.width())}"number"===typeof a.nextpos1&&(a.animation?b.css(f,a.nextpos1+"px"):(b.removeClass("ui-pnotify-move"),b.css(f,a.nextpos1+"px"),b.css(f),b.addClass("ui-pnotify-move")));switch(a.dir1){case "down":case "up":a.nextpos1+=b.height()+("undefined"===typeof a.spacing1?25:a.spacing1);break;case "left":case "right":a.nextpos1+=b.width()+("undefined"===
+typeof a.spacing1?25:a.spacing1)}}return this}},queuePosition:function(b,a){g&&clearTimeout(g);a||(a=10);g=setTimeout(function(){d.positionAll(b)},a);return this},cancelRemove:function(){this.timer&&l.clearTimeout(this.timer);this.animTimer&&l.clearTimeout(this.animTimer);"closing"===this.state&&(this.state="open",this.animating=!1,this.elem.addClass("ui-pnotify-in"),"fade"===this.options.animation&&this.elem.addClass("ui-pnotify-fade-in"));return this},queueRemove:function(){var b=this;this.cancelRemove();
+this.timer=l.setTimeout(function(){b.remove(!0)},isNaN(this.options.delay)?0:this.options.delay);return this}});b.extend(d,{notices:[],reload:q,removeAll:function(){b.each(d.notices,function(){this.remove&&this.remove(!1)})},removeStack:function(c){b.each(d.notices,function(){this.remove&&this.options.stack===c&&this.remove(!1)})},positionAll:function(c){g&&clearTimeout(g);g=null;if(d.notices&&d.notices.length)b.each(d.notices,function(){var a=this.options.stack;a&&(a.overlay&&a.overlay.hide(),a.nextpos1=
+a.firstpos1,a.nextpos2=a.firstpos2,a.addpos2=0,a.animation=c)}),b.each(d.notices,function(){this.position()});else{var a=d.prototype.options.stack;a&&(delete a.nextpos1,delete a.nextpos2)}},styling:{brighttheme:{container:"brighttheme",notice:"brighttheme-notice",notice_icon:"brighttheme-icon-notice",info:"brighttheme-info",info_icon:"brighttheme-icon-info",success:"brighttheme-success",success_icon:"brighttheme-icon-success",error:"brighttheme-error",error_icon:"brighttheme-icon-error"},jqueryui:{container:"ui-widget ui-widget-content ui-corner-all",
+notice:"ui-state-highlight",notice_icon:"ui-icon ui-icon-info",info:"",info_icon:"ui-icon ui-icon-info",success:"ui-state-default",success_icon:"ui-icon ui-icon-circle-check",error:"ui-state-error",error_icon:"ui-icon ui-icon-alert"},bootstrap3:{container:"alert",notice:"alert-warning",notice_icon:"glyphicon glyphicon-exclamation-sign",info:"alert-info",info_icon:"glyphicon glyphicon-info-sign",success:"alert-success",success_icon:"glyphicon glyphicon-ok-sign",error:"alert-danger",error_icon:"glyphicon glyphicon-warning-sign"}}});
+d.styling.fontawesome=b.extend({},d.styling.bootstrap3);b.extend(d.styling.fontawesome,{notice_icon:"fa fa-exclamation-circle",info_icon:"fa fa-info",success_icon:"fa fa-check",error_icon:"fa fa-warning"});l.document.body?r():b(r);return d};return q(k)});

File diff suppressed because it is too large
+ 0 - 0
public/css/pnotify/pnotify.min.css


+ 145 - 24
resources/views/admin/admin_profile.blade.php

@@ -48,6 +48,11 @@
         <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@200;300&display=swap" rel="stylesheet">
         <link rel="stylesheet" href="{{asset('web/css/datepicker.min.css')}}">
         <link rel="stylesheet" href="{{asset('web/css/sweetalert/sweetalert.css')}}">
+        {{-- Ajax Form Submit --}}
+        <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/flatpickr/dist/flatpickr.min.css') }}" rel="stylesheet" type="text/css">
+        <link href="{{ asset('css/wait-me/waitMe.min.css')}}"  rel="stylesheet" type="text/css">
     </head>
     <style>
 
@@ -518,34 +523,55 @@ tbody, td, tfoot, th, thead, tr {
                                                                                     </tr>
                                                                                 </thead>
                                                                                 <tbody>
+                                                                                    @if(count($register_teachers_list)  > 0)
+                                                                                    @foreach($register_teachers_list as $key=>$row)
                                                                                     <tr>
-                                                                                        <td style="font-size: 11px;">1</td>
-                                                                                        <td style="font-size: 11px;">name<br> 
-                                                                                            <span>designation</span><br>  
-                                                                                            <span>email</span>  
+                                                                                        <td style="font-size: 11px;">{{++$key}}</td>
+                                                                                        <td style="font-size: 11px;">{{$row->first_name }} {{$row->last_name }}<br> 
+                                                                                            <span>{{$row->designation}}</span><br>  
+                                                                                            <span>{{$row->email}}</span>  
                                                                                         </td>
-                                                                                        <td style="font-size: 11px;">uni name<br>
-                                                                                            <span>website</span>  
+                                                                                        <td style="font-size: 11px;">{{$row->university_name}}<br>
+                                                                                            <span>{{$row->uni_website}}</span>  
                                                                                         </td>
-                                                                                        <td style="font-size: 11px;">test</td>
+                                                                                        <td style="font-size: 11px;">{{$row->department}}</td>
                                                                                         <td style="font-size: 11px; width: 9%;">
                                                                                             <div class="single_glance_row mt-1" style="display: flex;">
                                                                                                 <div class="top_part_status" style="position: relative; width: fit-content; margin-left: 10px;">
                                                                                                     <span class="top_part_status_name" style="background: #dcdcdc; color: #8c9094;">
+                                                                                                        @if($row->status==1)
                                                                                                         Active
+                                                                                                        @endif
+                                                                                                        @if($row->status==0)
+                                                                                                        In active
+                                                                                                        @endif
+                                                                                                        @if($row->status==2)
+                                                                                                        Suspend
+                                                                                                        @endif
+
                                                                                                     </span>
                                                                                                     <div class="dropdown" style="top: 0.4px; 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;">
-                                                                                                            <a class="dropdown-item document_review_status_change" data-sval="3" name="sublead_status" href="#">Active</a>
-                                                                                                            <a class="dropdown-item document_review_status_change" data-sval="3" name="sublead_status" href="#">In active</a>
-                                                                                                            <a class="dropdown-item document_review_status_change" data-sval="3" name="sublead_status" href="#">Suspend</a>
+                                                                                                            <a class="dropdown-item status_change" data-value="1" data-id={{$row->id}}>Active</a>
+                                                                                                            <a class="dropdown-item status_change" data-value="0" data-id={{$row->id}}>In active</a>
+                                                                                                            <a class="dropdown-item status_change" data-value="2" data-id={{$row->id}}>Suspend</a>
                                                                                                         </div>
                                                                                                     </div>
                                                                                                 </div>
                                                                                             </div>
                                                                                         </td>
-                                                                                    </tr>
+                                                                                    </tr>  
+                                                                                    @endforeach
+                                                                                    @else
+
+                                                                                     <tr>
+                                                                                        <td colspan="5" class="text-center">
+                                                                                            <span class="text-danger">No data found!</span>
+                                                                                        </td>
+                                                                                     </tr>
+                                                                                        
+                                                                                    @endif
                                                                                 </tbody>
                                                                             </table>
                                                                         </div>
@@ -568,34 +594,55 @@ tbody, td, tfoot, th, thead, tr {
                                                                                     </tr>
                                                                                 </thead>
                                                                                 <tbody>
+                                                                                    @if(count($active_teachers_list)  > 0)
+                                                                                    @foreach($active_teachers_list as $key=>$row)
                                                                                     <tr>
-                                                                                        <td style="font-size: 11px;">1</td>
-                                                                                        <td style="font-size: 11px;">name<br> 
-                                                                                            <span>designation</span><br>  
-                                                                                            <span>email</span>  
+                                                                                        <td style="font-size: 11px;">{{++$key}}</td>
+                                                                                        <td style="font-size: 11px;">{{$row->first_name }} {{$row->last_name }}<br> 
+                                                                                            <span>{{$row->designation}}</span><br>  
+                                                                                            <span>{{$row->email}}</span>  
                                                                                         </td>
-                                                                                        <td style="font-size: 11px;">uni name<br>
-                                                                                            <span>website</span>  
+                                                                                        <td style="font-size: 11px;">{{$row->university_name}}<br>
+                                                                                            <span>{{$row->uni_website}}</span>  
                                                                                         </td>
-                                                                                        <td style="font-size: 11px;">test</td>
+                                                                                        <td style="font-size: 11px;">{{$row->department}}</td>
                                                                                         <td style="font-size: 11px; width: 9%;">
                                                                                             <div class="single_glance_row mt-1" style="display: flex;">
                                                                                                 <div class="top_part_status" style="position: relative; width: fit-content; margin-left: 10px;">
                                                                                                     <span class="top_part_status_name" style="background: #dcdcdc; color: #8c9094;">
-                                                                                                        Pending
+                                                                                                        @if($row->status==1)
+                                                                                                        Active
+                                                                                                        @endif
+                                                                                                        @if($row->status==0)
+                                                                                                        In active
+                                                                                                        @endif
+                                                                                                        @if($row->status==2)
+                                                                                                        Suspend
+                                                                                                        @endif
+
                                                                                                     </span>
                                                                                                     <div class="dropdown" style="top: 0.4px; 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;">
-                                                                                                            <a class="dropdown-item document_review_status_change" data-sval="3" name="sublead_status" href="#">Pending</a>
-                                                                                                            <a class="dropdown-item document_review_status_change" data-sval="3" name="sublead_status" href="#">Approved</a>
-                                                                                                            <a class="dropdown-item document_review_status_change" data-sval="3" name="sublead_status" href="#">Terminate</a>
+                                                                                                            <a class="dropdown-item status_change" data-value="1" data-id={{$row->id}}>Active</a>
+                                                                                                            <a class="dropdown-item status_change" data-value="0" data-id={{$row->id}}>In active</a>
+                                                                                                            <a class="dropdown-item status_change" data-value="2" data-id={{$row->id}}>Suspend</a>
                                                                                                         </div>
                                                                                                     </div>
                                                                                                 </div>
                                                                                             </div>
                                                                                         </td>
-                                                                                    </tr>
+                                                                                    </tr>  
+                                                                                    @endforeach
+                                                                                    @else
+
+                                                                                     <tr>
+                                                                                        <td colspan="5" class="text-center">
+                                                                                            <span class="text-danger">No data found!</span>
+                                                                                        </td>
+                                                                                     </tr>
+                                                                                        
+                                                                                    @endif
                                                                                 </tbody>
                                                                             </table>
                                                                         </div>
@@ -640,6 +687,80 @@ tbody, td, tfoot, th, thead, tr {
       <script src="{{asset('web/js/plugins.init.js')}}"></script>
       <script src="{{asset('web/js/app.js')}}"></script>
       <script src="{{asset('web/css/sweetalert/sweetalert.min.js')}}"></script>
-      <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
+      {{-- <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script> --}}
+    <script src="{{ asset('css/jquery.min.js') }}"></script>
+    <script src="{{ asset('css/jquery-form/dist/jquery.form.min.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){ 
+            new Noty({
+            theme:'sunset',
+            text: msg,
+            type: type,
+            timeout:1500,
+            callbacks:{
+                afterClose: callback
+            }
+            }).show(); 
+        }
+
+        function err_msg(err){
+
+            var msg="Request failed to process, try again later.";
+
+            if(err.responseJSON && err.responseJSON.msg){
+            msg=err.responseJSON.msg;
+            }
+
+            return msg;
+
+        }
+
+        $(function(){
+            $('.status_change').on('click', function(e){  
+                var self =$(this); 
+                var id =$(this).data('id');
+                var value =$(this).data('value'); 
+
+                var form_data={
+                _token:"{{ csrf_token() }}",
+                'id':id,
+                'status':value
+                }  
+                swal({
+                    title: "Are you sure?", 
+                    text: "Do you want to change this status?",
+                    type: "warning",
+                    showCancelButton: true,
+                    confirmButtonClass: "btn btn-md btn-success",
+                    cancelButtonClass: 'btn btn-md btn-danger',
+                    confirmButtonText: "Yes"
+                }, function(isConfirm){
+
+                    if(isConfirm) {
+                        $.post("{{ route('ajax-post', ['name'=>'teacher_user_status_change'])}}" ,form_data).done(function(res){ 
+
+                                pop_up_msg(res.msg);
+                                window.location.reload();
+
+                        }).fail(function(error){
+
+                                let msg='Sorry!, form submission failed try again later.';
+
+                                if(error.responseJSON.msg){
+                                    msg=error.responseJSON.msg;
+                                }
+
+                            pop_up_msg(msg, 'error');  
+                        }); 
+                    } 
+                }); 
+            });
+        });
+      </script>
 </body>
 </html>

+ 9 - 0
resources/views/auth/login.blade.php

@@ -185,6 +185,15 @@
                                                 <h6 class="mt-5 pt-5" style="color: #141639c4; margin-top:7.5rem !important;">Please log-in to your account</h6> 
                                             <form method="POST" action="{{ route('login') }}">
                                                     @csrf
+                                                    @if ($message = Session::get('error'))
+                                                    <div class="row">
+                                                        <div class="col-md-12">
+                                                            <div class="alert alert-danger">
+                                                            {{@$message}}
+                                                            </div>
+                                                        </div>
+                                                    </div>
+                                                @endif
 
                                                     <div class="row">
                                                         <label for="email" class="col-md-4 col-form-label text-md-end"></label>

+ 22 - 0
resources/views/login-v2.blade.php

@@ -48,6 +48,8 @@
             <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>
 
@@ -200,6 +202,24 @@
                                 <h6 class="mt-5 pt-5" style="color: white; margin-top:7.5rem !important;">Please log-in to your account</h6>
                                     <form method="POST" action="{{ route('teacher-login') }}">
                                         @csrf
+                                        @if ($message = Session::get('success'))
+                                            <div class="row">
+                                                <div class="col-md-12">
+                                                    <div class="alert alert-success">
+                                                    {{@$message}}
+                                                    </div>
+                                                </div>
+                                            </div>
+                                        @endif
+                                        @if ($message = Session::get('error'))
+                                            <div class="row">
+                                                <div class="col-md-12">
+                                                    <div class="alert alert-danger">
+                                                    {{@$message}}
+                                                    </div>
+                                                </div>
+                                            </div>
+                                        @endif
                                         <div class="row">
                                             <div class="col-md-12 back">
                                                 <div class="mb-3">
@@ -247,5 +267,7 @@
         <!-- 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>

+ 10 - 8
resources/views/teacher_profile.blade.php

@@ -552,17 +552,19 @@ tbody, td, tfoot, th, thead, tr {
                                             </td>
                                             <td style="font-size: 11px; text-align:center;">
                                                 <div style="font-size: 11px; display:block;">
-                                                    {{-- @php
-                                                        $to = \Carbon\Carbon::parse($row->work_experience->end_date); 
-                                                        $from = \Carbon\Carbon::parse($row->work_experience->start_date); 
-                                                        $years = $to->diffInYears($from);
-                                                    @endphp --}}
-                                                    {{-- <span class="label_badge_work">@if($years) {{$years}} years @endif</span> --}}
+                                                    @php
+                                                        if(!empty($row->work_experience->end_date)){
+                                                            $to = \Carbon\Carbon::parse($row->work_experience->end_date);  
+                                                            $from = \Carbon\Carbon::parse($row->work_experience->start_date); 
+                                                            $years = $to->diffInYears($from);
+                                                        }
+                                                    @endphp
+                                                    <span class="label_badge_work">@if($years) {{$years}} years @endif</span>
                                                 </div>
                                                 <div style="font-size: 11px; font-weight: 600; display:block;">
-                                                    {{-- @if(empty($row->work_experience->end_date))
+                                                     @if(empty($row->work_experience->end_date))
                                                     <span>{{date('M Y', strtotime($row->work_experience->start_date))}} - continue</span>
-                                                    @endif --}}
+                                                    @endif 
                                                 </div>
                                             </td>
                                             <td style="font-size: 11px;">

Some files were not shown because too many files changed in this diff