|
@@ -533,12 +533,18 @@ WHERE cl.shadow_pro_id IS NULL
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ $incomingSmsMessagesPendingReply = DB::select("
|
|
|
|
+ SELECT cs.* ,c.uid as client_uid, c.name_first as client_name_first, c.name_last as client_name_last FROM client_sms cs LEFT JOIN client c ON c.id = cs.client_id
|
|
|
|
+ WHERE cs.is_reply_needed = 'YES' AND c.mcp_pro_id = :mcp_pro_id AND incoming_or_outgoing = 'INCOMING'
|
|
|
|
+ AND (cs.created_at > c.last_sms_sent_to_client_at OR c.last_sms_sent_to_client_at IS NULL)
|
|
|
|
+ ", ['mcp_pro_id' => $performer->pro->id]);
|
|
|
|
+
|
|
return view('app/dashboard-mcp', compact('keyNumbers', 'reimbursement', 'milliseconds',
|
|
return view('app/dashboard-mcp', compact('keyNumbers', 'reimbursement', 'milliseconds',
|
|
'businessNumbers',
|
|
'businessNumbers',
|
|
'incomingReports', 'tickets', 'supplyOrders',
|
|
'incomingReports', 'tickets', 'supplyOrders',
|
|
'numERx', 'numLabs', 'numImaging', 'numSupplyOrders',
|
|
'numERx', 'numLabs', 'numImaging', 'numSupplyOrders',
|
|
'newMCPAssociations', 'newNAAssociations',
|
|
'newMCPAssociations', 'newNAAssociations',
|
|
- 'mcpClientMemos', 'mcpClientMemosCount', 'naClientMemos'));
|
|
|
|
|
|
+ 'mcpClientMemos', 'mcpClientMemosCount', 'naClientMemos', 'incomingSmsMessagesPendingReply'));
|
|
}
|
|
}
|
|
|
|
|
|
private function dashboard_DNA(Request $request){
|
|
private function dashboard_DNA(Request $request){
|