@extends('layouts.default', ['appTopMenu' => true]) @push('scripts') @endpush @push('head') Assigned Tasks @endpush @section('content')
@php if(count($projectname) > 0){ @endphp
@php $j=1; foreach($arr as $ar){ $active = ''; $cnt = 1; if($j == 1) { $active='active show'; } @endphp
@php $pro = DB::table('tm_project_member')->select('project_id')->where('id','=',$ar)->where('display','=','Y')->get(); $pid = $pro[0]->project_id; $mem = ""; $projectmembers = DB::table('tm_project_member')->select('tm_project_member.*','name') ->LEFTJOIN('users', 'tm_project_member.user_id', '=', 'users.id') ->where('project_id','=',$pid)->where('display','=','Y')->orderBy('name', 'desc')->get(); foreach($projectmembers as $pmem){ //echo $pmem->name; //$mem = strtok(ucwords(strtolower($pmem->name)), " ").", ".$mem; $mem = ucwords(strtolower($pmem->name)).", ".$mem; } $mem= rtrim($mem,', '); $details = DB::table('tm_project_member_task')->select('tm_project_member_task.id','description', 'file', 'target_dt', 'priority', 'tm_project_member_task.id', 'from_dt', 'tm_project.project', 'date_change') ->LEFTJOIN('tm_project', 'tm_project_member_task.module_id', '=', 'tm_project.id') ->where('pro_mem_id', '=', $ar)->where('status', '=', 'Pending') ->whereNull('complete_dt') ->orderBy('target_dt','desc')->get(); foreach($details as $assigns){ @endphp @php $cnt++; } @endphp
No. Module Description Priority Assigned Date Target Date Completed Date Change
{{ $cnt }} {{ $assigns->project }} {{ $assigns->description }} {{ $assigns->priority }} {{ date("d-m-Y",strtotime($assigns->from_dt)) }} {{ date("d-m-Y",strtotime($assigns->target_dt)) }} id)}}">Complete

Project Discussion Group

{{ count($projectmembers) }} members

({{ $mem }})

@php $allMsgs = DB::table('tm_msg')->select('tm_msg.*', 'users.name') ->LEFTJOIN('users', 'tm_msg.from_id', '=', 'users.id') ->where('tm_msg.pid', '=', $pid)->where('tm_msg.display','=','Y') ->orderBy('ent_dt', 'asc')->get(); $dt = ""; foreach($allMsgs as $msg){ $strname = ""; if (date("Y-m-d", strtotime($msg->ent_dt)) == date("Y-m-d")) { $tme = "Today"; } else { $tme = date('F d, Y', strtotime($msg->ent_dt)); } if (date("Y-m-d", strtotime($msg->ent_dt)) == date('Y-m-d', strtotime("-1 days"))) { $tme = "Yesterday"; } if($dt != date("d-m-Y",strtotime($msg->ent_dt))){ @endphp
{{ $tme }}
@php $dt = date("d-m-Y",strtotime($msg->ent_dt)); } $old = DB::table('tm_msg')->select('*')->where('id',$msg->old_id)->where('display','Y')->get(); if(count($old) > 0){ $old_msg = $old[0]->msg; } if($msg->from_id != Auth::user()->id){ if($msg->to_id != 0){ $to_id = $msg->to_id; $to_id = explode('@', $to_id); if(!in_array(Auth::user()->id, $to_id)){ continue; }else{ for($i=0; $i < count($to_id); $i++){ if(Auth::user()->id != $to_id[$i]){ $res = DB::table("users")->where('id',$to_id[$i])->select('name')->get(); if (!empty($res[0])) { $fname = ucwords(strtolower(strtok($res[0]->name, " "))); $strname = $fname.", ".$strname; } } } } } $strname = rtrim($strname, ", "); @endphp
{{ strtok(ucwords(strtolower($msg->name)), " ") }}
{{ $msg->msg }} @php if($msg->file != 'NA'){ @endphp @php } @endphp

{{ $strname }}
{{ date("H:i A", strtotime($msg->ent_dt)) }}
@php }else{ $strname = ""; if($msg->to_id != '0'){ $to_id = $msg->to_id; $to_id = explode('@', $to_id); $strname = ""; for($i=0; $i < count($to_id); $i++){ $res = DB::table("users")->where('id',$to_id[$i])->select('name')->get(); if (!empty($res[0])) { $fname = ucwords(strtolower(strtok($res[0]->name, " "))); $strname = $fname.", ".$strname; } } } $strname = rtrim($strname, ", "); @endphp
{{ date("h:i A", strtotime($msg->ent_dt)) }}
{{ $msg->msg }} @php if($msg->file != 'NA'){ @endphp @php } @endphp
{{ $strname }}
@php } } @endphp
@csrf

@error('msg') {{ $message }} @enderror
@error('file') {{ $message }} @enderror
@php $j++; } @endphp
@php }else{ @endphp @php } @endphp
@endsection @push('scripts') @endpush