GWM : acm name not display issue
This commit is contained in:
parent
332c412d0f
commit
85017b002e
@ -234,8 +234,24 @@ class ThzController extends BaseController
|
|||||||
->where('thz_master.thz_id', $thz_id)
|
->where('thz_master.thz_id', $thz_id)
|
||||||
->findAll();
|
->findAll();
|
||||||
|
|
||||||
|
$clientId = $result['master'][0]['client_id'];
|
||||||
|
|
||||||
|
$accManagerId = $this->getAcmIdUsingClientId($clientId ?? null);
|
||||||
|
|
||||||
|
$accManager = $this->userModel->find($accManagerId);
|
||||||
|
|
||||||
if (!empty($result['master'])) {
|
if (!empty($result['master'])) {
|
||||||
$notes = $this->thzMasterNotesModel->ticketConversationList($thz_id, $returnType);
|
$notes = $this->thzMasterNotesModel->ticketConversationList($thz_id, $returnType);
|
||||||
|
$accManagerName = $accManager['first_name'] ?? '';
|
||||||
|
|
||||||
|
foreach ($notes as &$note) {
|
||||||
|
|
||||||
|
if (empty($note['name'])) {
|
||||||
|
$note['name'] = $accManagerName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
unset($note);
|
||||||
$result['notes'] = !empty($notes) ? $notes : [];
|
$result['notes'] = !empty($notes) ? $notes : [];
|
||||||
} else {
|
} else {
|
||||||
$this->myLogger->logme('error', 'No tickets found for ticket id ' . json_encode($thz_id));
|
$this->myLogger->logme('error', 'No tickets found for ticket id ' . json_encode($thz_id));
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user