diff --git a/app/Http/Controllers/Frontend/ChatBoxController.php b/app/Http/Controllers/Frontend/ChatBoxController.php index 92da431..d08a091 100644 --- a/app/Http/Controllers/Frontend/ChatBoxController.php +++ b/app/Http/Controllers/Frontend/ChatBoxController.php @@ -12,7 +12,13 @@ class ChatBoxController extends Controller { public function index() { - // dd(Chat::where('user_id', auth()->guard('users')->user()->id)->get()); + $getUnreadChat = Chat::where(['user_id'=>auth()->guard('users')->user()->id,'is_read'=>false])->get(); + $getUnreadChat->each(function($value){ + chat::where(['id'=>$value->id,'user_id'=>auth()->guard('users')->user()->id])->update([ + 'is_read'=>true, + 'read_at'=>now(), + ]); + }); return view('Frontend.Pages.user-chat.index', [ 'chats' => Chat::where('user_id', auth()->guard('users')->user()->id)->get() ]); diff --git a/app/helper.php b/app/helper.php index 8e98950..4c1d369 100644 --- a/app/helper.php +++ b/app/helper.php @@ -36,6 +36,11 @@ if (!function_exists('validationErrorMessage')) { } } +function getUnreadMessage() +{ + return Chat::where(['user_id'=>auth()->guard('users')->user()->id,'is_read'=>false])->count(); +} + function imagePath($path = null) { $finalPath = "https://staging.jerichoalternatives.in/"; diff --git a/public/assets/css/FrontendCss/style.css b/public/assets/css/FrontendCss/style.css index 34581af..74018a4 100644 --- a/public/assets/css/FrontendCss/style.css +++ b/public/assets/css/FrontendCss/style.css @@ -971,7 +971,20 @@ input:focus { border-radius: 5px; font-size: 14px; } - +.admin-profile .dropdown.red_dot { + position: relative; +} +.admin-profile .dropdown.red_dot:before { + position: absolute; + content: ""; + top: 4px; + right: 32px; + background-color: red; + width: 10px; + height: 10px; + z-index: 9; + border-radius: 50px; +} .banner-btn a { padding: 9px 25px; background-color: #ffbd59; @@ -1736,6 +1749,35 @@ p.brown-text { width: 100%; font-weight: 500; } +.admin-profile .dropdown.red_dot { + position: relative; +} +.admin-profile .dropdown.red_dot:before { + position: absolute; + content: ""; + top: 4px; + right: 32px; + background-color: red; + width: 10px; + height: 10px; + z-index: 9; + border-radius: 50px; +} + +.admin-profile a.dropdown-item.red_dot { + position: relative; +} + +.admin-profile a.dropdown-item.red_dot:before { + content: ""; + position: absolute; + right: 23px; + top: 17px; + width: 7px; + height: 7px; + background-color: red; + border-radius: 50px; +} .portfolio .investor-image { width: 46%; @@ -4490,64 +4532,64 @@ span.start { /* */ +/* */ - .chksb p { - font-style: normal; - font-size: 18px; - color: #1B243D; - margin: 0; - font-weight: 600; - } +.chksb p { + font-style: normal; + font-size: 18px; + color: #1b243d; + margin: 0; + font-weight: 600; +} /*======responsive=====*/ @@ -4985,7 +5027,6 @@ span.start { } } @media (max-width: 767px) { - .investor-profile .profile-img img { width: 70px; } @@ -5563,17 +5604,15 @@ span.start { @media (max-width: 420px) { } @media (max-width: 380px) { - .chksb p { font-style: normal; font-size: 14px; - color: #1B243D; + color: #1b243d; margin: 0; font-weight: 600; -} + } } @media (max-width: 360px) { } @media (max-width: 320px) { - } diff --git a/resources/views/Frontend/menu-after-lg.blade.php b/resources/views/Frontend/menu-after-lg.blade.php index cfea63f..74c1dbc 100644 --- a/resources/views/Frontend/menu-after-lg.blade.php +++ b/resources/views/Frontend/menu-after-lg.blade.php @@ -450,7 +450,7 @@ -