@php $base_path = asset('dist/images'); $default_usr_pic = $base_path."/"."profile-default.png"; if(@$chat_wth_usr_info) { $f_nm = trim(@$chat_wth_usr_info->first_name); $l_nm = trim(@$chat_wth_usr_info->last_name); $cht_usr_name = ucwords(strtolower(trim(@$f_nm.' '.@$l_nm))); $profile_pic = trim(@$chat_wth_usr_info->profile_pic); $cht_usr_type = (@$chat_wth_usr_info->user_type) ?? ''; //Chat User Type $cht_usr_role_ids = @explode(',', @$chat_wth_usr_info->usr_role_ids); //Role Ids Assigned to Chat User $cht_usr_type_cap = ''; $user_last_activity_time_stamp = $chat_wth_usr_info->user_last_activity_time_stamp ?? ""; if(@$cht_usr_type == 'ADMIN' || @$cht_usr_type == _ADMIN_USER_ || @in_array(_DEVELOPER_ROLE_ID_, @$cht_usr_role_ids) || @in_array(_ADMIN_ROLE_ID_, @$cht_usr_role_ids)) { $cht_usr_type_cap = @_USER_TYPE_ARR_[@_ADMIN_USER_]; } else if(@$cht_usr_type == _INVESTOR_USER_ || @in_array(_INVESTOR_ROLE_ID_, @$cht_usr_role_ids)) { $cht_usr_type_cap = @_USER_TYPE_ARR_[@_INVESTOR_USER_]; } else if(@$cht_usr_type == 'MENTOR' || @in_array(_MENTOR_ROLE_ID_, @$cht_usr_role_ids)) { $cht_usr_type_cap = @_USER_TYPE_ARR_[@_MENTOR_USER_]; } else if(@$cht_usr_type == 'VC_FUND' || @in_array(_VC_FUND_ROLE_ID_, @$cht_usr_role_ids)) { $cht_usr_type_cap = @_USER_TYPE_ARR_[@_VC_FUND_USER_]; } else if(@$cht_usr_type == 'STARTUP' || @in_array(_STARTUP_ROLE_ID_, @$cht_usr_role_ids)) { $cht_usr_type_cap = @_USER_TYPE_ARR_[@_STARTUP_USER_]; } else if(@$cht_usr_type == 'INHOUSE' || @in_array(_IN_HOUSE_ROLE_ID_, @$cht_usr_role_ids)) { $cht_usr_type_cap = @_USER_TYPE_ARR_[@_INHOUSE_USER_]; } $cht_usr_type_cap = (@$cht_usr_type_cap) ?? 'User'; $cht_usr_profile_pic = ''; if(@$profile_pic && @$profile_pic != '') { $cht_usr_profile_pic = asset('uploads/users_profile_pic').'/'.@$profile_pic; $cht_usr_profile_pic = (@file_exists(public_path().'/uploads/users_profile_pic/'.@$profile_pic)) ? $cht_usr_profile_pic : ''; } $chat_status = strtolower(trim(@$chat_wth_usr_info->chat_status)); $status_cls = 'avatar-online'; if(@$chat_status == 'busy') { $status_cls = 'avatar-busy'; } else if(@$chat_status == 'away') { $status_cls = 'avatar-away'; } } @endphp
@if(@$chat_wth_usr_info) @if(@$cht_usr_profile_pic && @$cht_usr_profile_pic != '')
{{ @$cht_usr_name }}
@else @php $arr_nm = explode(' ', @$cht_usr_name); $fnm = @$arr_nm[0]; $lnm = @$arr_nm[1]; $f_fc = substr(@$fnm, 0, 1); $l_lc = substr(@$fnm, -1); $l_lc = (@$lnm && @$lnm != '') ? substr(@$lnm, 0, 1) : $l_lc; @endphp
{{ strtoupper($f_fc.$l_lc) }}
@endif @endif
@if(@$cht_usr_name) {{ $cht_usr_name }} @else   @endif
@if($user_last_activity_time_stamp) @php $hour_diff = (strtotime(date('Y-m-d H:i:s')) - strtotime($user_last_activity_time_stamp))/3600; @endphp @if($hour_diff >= (24 * 15)) last seen {{ @date_format(@date_create(@$user_last_activity_time_stamp),'j F Y') }} @elseif($hour_diff <= 24) last seen {{ displayHumanFormat($user_last_activity_time_stamp) }} @else last seen {{ @date_format(@date_create(@$user_last_activity_time_stamp),'j F Y') }} @endif @endif
@if(@$cht_usr_type_cap) {{ $cht_usr_type_cap }} @else   @endif