| Línea 872... |
Línea 872... |
| 872 |
$search = trim(filter_var($this->params()->fromQuery('search', ''), FILTER_SANITIZE_STRING));
|
872 |
$search = trim(filter_var($this->params()->fromQuery('search', ''), FILTER_SANITIZE_STRING));
|
| Línea 873... |
Línea 873... |
| 873 |
|
873 |
|
| Línea 874... |
Línea 874... |
| 874 |
$queryMapper = QueryMapper::getInstance($this->adapter);
|
874 |
$queryMapper = QueryMapper::getInstance($this->adapter);
|
| 875 |
|
875 |
|
| 876 |
$select = $queryMapper->getSql()->select();
|
876 |
$select = $queryMapper->getSql()->select();
|
| 877 |
$select->columns(['id', 'uuid', 'title', 'employment_type', 'last_date_of_application']);
|
877 |
$select->columns(['id', 'uuid', 'title', 'employment_type', 'last_date_of_application'], true);
|
| 878 |
$select->from(['j' => JobMapper::_TABLE]);
|
878 |
$select->from(['j' => JobMapper::_TABLE]);
|
| 879 |
$select->join(['js' => JobSaveMapper::_TABLE], 'j.id = js.job_id');
|
879 |
$select->join(['js' => JobSaveMapper::_TABLE], 'j.id = js.job_id');
|
| 880 |
$select->join(['c' => CompanyMapper::_TABLE], 'j.company_id = c.id');
|
880 |
$select->join(['c' => CompanyMapper::_TABLE], 'j.company_id = c.id');
|
| Línea 885... |
Línea 885... |
| 885 |
$select->where->like('title', '%' . $search . '%');
|
885 |
$select->where->like('title', '%' . $search . '%');
|
| 886 |
}
|
886 |
}
|
| Línea 887... |
Línea 887... |
| 887 |
|
887 |
|
| Línea 888... |
Línea 888... |
| 888 |
$select->order('last_date_of_application DESC');
|
888 |
$select->order('last_date_of_application DESC');
|
| Línea 889... |
Línea 889... |
| 889 |
|
889 |
|
| 890 |
// $selectString = $queryMapper->getSql()->buildSqlString($select);
|
890 |
$selectString = $queryMapper->getSql()->buildSqlString($select);
|
| 891 |
|
891 |
|
| Línea 892... |
Línea 892... |
| 892 |
// print_r(
|
892 |
print_r(
|
| Línea 904... |
Línea 904... |
| 904 |
$item = [
|
904 |
$item = [
|
| 905 |
'id' => $record['uuid'],
|
905 |
'id' => $record['uuid'],
|
| 906 |
'title' => $record['title'],
|
906 |
'title' => $record['title'],
|
| 907 |
'employment_type' => $employment_types[$record['employment_type']],
|
907 |
'employment_type' => $employment_types[$record['employment_type']],
|
| 908 |
'last_date_of_application' => $record['last_date_of_application'],
|
908 |
'last_date_of_application' => $record['last_date_of_application'],
|
| 909 |
'company_image'=> $record['image'],
|
909 |
'image' => $this->url()->fromRoute('storage', ['type' => 'company', 'code' => $record['uuid'], 'filename' => $record['image']]),
|
| 910 |
'link_remove' => $this->url()->fromRoute('job/remove-save-job', ['id' => $record['uuid'] ]),
|
910 |
'link_remove' => $this->url()->fromRoute('job/remove-save-job', ['id' => $record['uuid'] ]),
|
| 911 |
'link_view' => $this->url()->fromRoute('job/view', ['id' => $record['uuid'] ]),
|
911 |
'link_view' => $this->url()->fromRoute('job/view', ['id' => $record['uuid'] ]),
|
| 912 |
];
|
912 |
];
|
| Línea 913... |
Línea 913... |
| 913 |
|
913 |
|