GWM : enquiryAssignUpdate
This commit is contained in:
parent
f77cc72d3b
commit
daabec87ed
@ -459,15 +459,9 @@ class EnquiryController extends ResourceController
|
||||
return $this->respond(['status' => 'failed', 'code' => 200, 'error' => 'Data Not Found'], 200);
|
||||
}
|
||||
|
||||
//get insurer_branch_id
|
||||
$query = $this->db->query("SELECT id FROM insurer_branch WHERE insurer_id = ? LIMIT 1", [$data['insurer_id']]);
|
||||
$insurerBranchresult = $query->getRowArray();
|
||||
|
||||
$updateData = [
|
||||
'assigned_to' => $data['assigned_to'],
|
||||
'insurer_id' => $data['insurer_id'],
|
||||
'insurer_branch_id'=> $insurerBranchresult['id'] ?? 0,
|
||||
'broker_id' => $data['broker_id'] ?? 1,
|
||||
'assigned_to' => $data['assigned_to']
|
||||
];
|
||||
|
||||
$this->enquiryModel->update($id, $updateData);
|
||||
@ -475,9 +469,6 @@ class EnquiryController extends ResourceController
|
||||
// trigger_email('enquiry_assigned', ['enquiry_id' => $id]);
|
||||
|
||||
return $this->respond(['status' => 'success', 'code' => 200, 'message' => 'Enquiry updated successfully'], 200);
|
||||
|
||||
|
||||
return $this->respond(['status' => 'success', 'code' => 200, 'data' => $data], 200);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return $this->respond(['status' => 'failed', 'code' => 500, 'error' => $e->getMessage()], 500);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user