GWM : Ticket
This commit is contained in:
parent
fe6a1a22a1
commit
5c3d928c24
@ -3251,6 +3251,8 @@ class EmployeeRestController extends AdminController
|
|||||||
$modeOFIntimate = $this->ticketController->modeOFIntimate;
|
$modeOFIntimate = $this->ticketController->modeOFIntimate;
|
||||||
$claimType = $this->ticketController->claimType;
|
$claimType = $this->ticketController->claimType;
|
||||||
$relationshipType = $this->ticketController->relationshipType;
|
$relationshipType = $this->ticketController->relationshipType;
|
||||||
|
$ticketTypeArray = $this->ticketController->ticketType;
|
||||||
|
|
||||||
|
|
||||||
$emp_id = $this->request->getGet('emp_id');
|
$emp_id = $this->request->getGet('emp_id');
|
||||||
$ticket_type = $this->request->getGet('ticket_type') ?? null;
|
$ticket_type = $this->request->getGet('ticket_type') ?? null;
|
||||||
@ -3290,7 +3292,9 @@ class EmployeeRestController extends AdminController
|
|||||||
if (in_array($value['claim_type'], [2, 3, 4])) {
|
if (in_array($value['claim_type'], [2, 3, 4])) {
|
||||||
$claimPrimaryTypey = "2";
|
$claimPrimaryTypey = "2";
|
||||||
}
|
}
|
||||||
$ticket_data[$key]['claim_type_value'] = $claimType[$claimPrimaryTypey][$value['claim_type']] ?? null;
|
$ticket_data[$key]['claim_type_value'] = $claimType[$claimPrimaryTypey][$value['claim_type']] ?? null;
|
||||||
|
$ticket_data[$key]['ticket_policy_type'] = $ticketTypeArray[$value['ticket_type_id']] ?? null;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -680,16 +680,17 @@ class TicketMasterModel extends Model
|
|||||||
//api
|
//api
|
||||||
public function get_ticket_data($emp_id, $ticket_type = null, $ticket_id = null)
|
public function get_ticket_data($emp_id, $ticket_type = null, $ticket_id = null)
|
||||||
{
|
{
|
||||||
$query = $this->select('*')
|
$query = $this->select('ticket_master.*, tms.mail_subject as subject')
|
||||||
->where('is_active', 1)
|
->join('ticket_messages tms', 'ticket_master.id = tms.ticket_id', 'left')
|
||||||
->where('emp_id', $emp_id);
|
->where('ticket_master.is_active', 1)
|
||||||
|
->where('ticket_master.emp_id', $emp_id);
|
||||||
|
|
||||||
if (!empty($ticket_id)) {
|
if (!empty($ticket_id)) {
|
||||||
$query->where('id', $ticket_id);
|
$query->where('ticket_master.id', $ticket_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($ticket_type)) {
|
if (!empty($ticket_type)) {
|
||||||
$query->where('ticket_type_id', $ticket_type);
|
$query->where('ticket_master.ticket_type_id', $ticket_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
$data = $query->findAll();
|
$data = $query->findAll();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user