1 |
www |
1 |
<?php
|
|
|
2 |
/**
|
|
|
3 |
*
|
|
|
4 |
* Controlador: Mis Perfiles
|
|
|
5 |
*
|
|
|
6 |
*/
|
|
|
7 |
declare(strict_types=1);
|
|
|
8 |
|
|
|
9 |
namespace LeadersLinked\Controller;
|
|
|
10 |
|
|
|
11 |
use Laminas\Db\Adapter\AdapterInterface;
|
6749 |
efrain |
12 |
use LeadersLinked\Cache\CacheInterface;
|
1 |
www |
13 |
use Laminas\Mvc\Controller\AbstractActionController;
|
|
|
14 |
use Laminas\Log\LoggerInterface;
|
|
|
15 |
use Laminas\View\Model\ViewModel;
|
|
|
16 |
use Laminas\View\Model\JsonModel;
|
|
|
17 |
|
|
|
18 |
use LeadersLinked\Library\Functions;
|
|
|
19 |
use LeadersLinked\Mapper\CompanyUserMapper;
|
|
|
20 |
use LeadersLinked\Model\Job;
|
|
|
21 |
use LeadersLinked\Mapper\LocationMapper;
|
|
|
22 |
use LeadersLinked\Mapper\JobMapper;
|
|
|
23 |
use LeadersLinked\Mapper\CompanyMapper;
|
|
|
24 |
use LeadersLinked\Mapper\JobCategoryMapper;
|
|
|
25 |
use LeadersLinked\Mapper\JobSkillMapper;
|
|
|
26 |
use LeadersLinked\Mapper\JobDegreeMapper;
|
|
|
27 |
use LeadersLinked\Mapper\JobLanguageMapper;
|
|
|
28 |
use LeadersLinked\Mapper\DegreeMapper;
|
|
|
29 |
use LeadersLinked\Mapper\LanguageMapper;
|
|
|
30 |
use LeadersLinked\Mapper\SkillMapper;
|
|
|
31 |
use LeadersLinked\Mapper\IndustryMapper;
|
|
|
32 |
use LeadersLinked\Mapper\CompanySizeMapper;
|
|
|
33 |
use LeadersLinked\Mapper\CompanyLocationMapper;
|
|
|
34 |
use LeadersLinked\Mapper\JobApplicationMapper;
|
|
|
35 |
use LeadersLinked\Form\Job\ApplyForm;
|
|
|
36 |
use LeadersLinked\Model\JobApplication;
|
|
|
37 |
use LeadersLinked\Mapper\JobSaveMapper;
|
|
|
38 |
use LeadersLinked\Model\JobSave;
|
|
|
39 |
use LeadersLinked\Mapper\QueryMapper;
|
|
|
40 |
use LeadersLinked\Mapper\UserProfileMapper;
|
|
|
41 |
|
2805 |
kerby |
42 |
|
1 |
www |
43 |
class JobController extends AbstractActionController
|
|
|
44 |
{
|
|
|
45 |
/**
|
|
|
46 |
*
|
|
|
47 |
* @var AdapterInterface
|
|
|
48 |
*/
|
|
|
49 |
private $adapter;
|
|
|
50 |
|
|
|
51 |
|
|
|
52 |
/**
|
|
|
53 |
*
|
6749 |
efrain |
54 |
* @var CacheInterface
|
1 |
www |
55 |
*/
|
|
|
56 |
private $cache;
|
|
|
57 |
|
|
|
58 |
/**
|
|
|
59 |
*
|
|
|
60 |
* @var LoggerInterface
|
|
|
61 |
*/
|
|
|
62 |
private $logger;
|
|
|
63 |
|
|
|
64 |
|
|
|
65 |
/**
|
|
|
66 |
*
|
|
|
67 |
* @var array
|
|
|
68 |
*/
|
|
|
69 |
private $config;
|
|
|
70 |
|
|
|
71 |
/**
|
|
|
72 |
*
|
|
|
73 |
* @param AdapterInterface $adapter
|
6749 |
efrain |
74 |
* @param CacheInterface $cache
|
1 |
www |
75 |
* @param LoggerInterface $logger
|
|
|
76 |
* @param array $config
|
|
|
77 |
*/
|
|
|
78 |
public function __construct($adapter, $cache , $logger, $config)
|
|
|
79 |
{
|
|
|
80 |
$this->adapter = $adapter;
|
|
|
81 |
$this->cache = $cache;
|
|
|
82 |
$this->logger = $logger;
|
|
|
83 |
$this->config = $config;
|
|
|
84 |
|
|
|
85 |
}
|
|
|
86 |
|
|
|
87 |
/**
|
|
|
88 |
*
|
|
|
89 |
* Generación del listado de perfiles
|
|
|
90 |
* {@inheritDoc}
|
|
|
91 |
* @see \Laminas\Mvc\Controller\AbstractActionController::indexAction()
|
|
|
92 |
*/
|
|
|
93 |
public function indexAction()
|
|
|
94 |
{
|
|
|
95 |
|
|
|
96 |
return new JsonModel([
|
|
|
97 |
'success' => false,
|
|
|
98 |
'data' => 'ERROR_METHOD_NOT_ALLOWED'
|
|
|
99 |
]);
|
|
|
100 |
}
|
|
|
101 |
|
|
|
102 |
public function viewAction()
|
|
|
103 |
{
|
3639 |
efrain |
104 |
$currentUserPlugin = $this->plugin('currentUserPlugin');
|
|
|
105 |
$currentUser = $currentUserPlugin->getUser();
|
1 |
www |
106 |
|
|
|
107 |
$flashMessenger = $this->plugin('FlashMessenger');
|
|
|
108 |
$request = $this->getRequest();
|
|
|
109 |
$id = $this->params()->fromRoute('id');
|
|
|
110 |
|
|
|
111 |
if(!$id) {
|
|
|
112 |
$flashMessenger->addErrorMessage('ERROR_INVALID_PARAMETER');
|
|
|
113 |
return $this->redirect()->toRoute('dashboard');
|
|
|
114 |
}
|
|
|
115 |
|
|
|
116 |
$jobMapper = JobMapper::getInstance($this->adapter);
|
3639 |
efrain |
117 |
$job = $jobMapper->fetchOneByUuidAndNetworkId($id, $currentUser->network_id);
|
1 |
www |
118 |
if(!$job) {
|
|
|
119 |
$flashMessenger->addErrorMessage('ERROR_RECORD_NOT_FOUND');
|
|
|
120 |
return $this->redirect()->toRoute('dashboard');
|
|
|
121 |
}
|
|
|
122 |
|
|
|
123 |
if($job->status != Job::STATUS_ACTIVE) {
|
|
|
124 |
$flashMessenger->addErrorMessage('ERROR_UNAUTHORIZED');
|
|
|
125 |
return $this->redirect()->toRoute('dashboard');
|
|
|
126 |
}
|
|
|
127 |
|
|
|
128 |
$companyMapper = CompanyMapper::getInstance($this->adapter);
|
|
|
129 |
$company = $companyMapper->fetchOne($job->company_id);
|
|
|
130 |
if(!$company) {
|
|
|
131 |
$flashMessenger->addErrorMessage('ERROR_RECORD_NOT_FOUND');
|
|
|
132 |
return $this->redirect()->toRoute('dashboard');
|
|
|
133 |
}
|
|
|
134 |
|
|
|
135 |
|
|
|
136 |
|
|
|
137 |
|
|
|
138 |
|
|
|
139 |
if($request->isGet()) {
|
|
|
140 |
$currentUserPlugin = $this->plugin('currentUserPlugin');
|
|
|
141 |
$currentUser = $currentUserPlugin->getUser();
|
|
|
142 |
|
|
|
143 |
$companyUserMapper = CompanyUserMapper::getInstance($this->adapter);
|
6388 |
efrain |
144 |
$now = $companyUserMapper->getDatebaseNow();
|
|
|
145 |
|
1 |
www |
146 |
$companyUser = $companyUserMapper->fetchOneByCompanyIdAndUserId($company->id, $currentUser->id);
|
|
|
147 |
|
|
|
148 |
$jobApplicationMapper = JobApplicationMapper::getInstance($this->adapter);
|
|
|
149 |
$total_applications = $jobApplicationMapper->fetchTotalApplicationsByJobId($job->id);
|
|
|
150 |
|
|
|
151 |
|
|
|
152 |
$job->visits++;
|
|
|
153 |
$jobMapper->updateVisits($job);
|
|
|
154 |
|
|
|
155 |
|
|
|
156 |
//if($companyUser) {
|
|
|
157 |
// $job_apply_operation = '';
|
|
|
158 |
//} else {
|
|
|
159 |
$jobApplication = $jobApplicationMapper->fetchOneByJobIdAndUserId($job->id, $currentUser->id);
|
|
|
160 |
if($jobApplication) {
|
|
|
161 |
$job_apply_operation = 'remove-apply';
|
|
|
162 |
} else {
|
|
|
163 |
$job_apply_operation = 'apply';
|
|
|
164 |
}
|
|
|
165 |
|
|
|
166 |
//}
|
|
|
167 |
|
|
|
168 |
$jobSaveMapper = JobSaveMapper::getInstance($this->adapter);
|
|
|
169 |
$jobSave = $jobSaveMapper->fetchOneByJobIdAndUserId($job->id, $currentUser->id);
|
|
|
170 |
if($jobSave) {
|
|
|
171 |
$job_save_operation = 'remove-job-saved';
|
|
|
172 |
} else {
|
|
|
173 |
$job_save_operation = 'job-save';
|
|
|
174 |
}
|
|
|
175 |
|
|
|
176 |
|
|
|
177 |
$months = [
|
|
|
178 |
1 => 'LABEL_MONTH_JANUARY',
|
|
|
179 |
2 => 'LABEL_MONTH_FEBRUARY',
|
|
|
180 |
3 => 'LABEL_MONTH_MARCH',
|
|
|
181 |
4 => 'LABEL_MONTH_APRIL',
|
|
|
182 |
5 => 'LABEL_MONTH_MAY',
|
|
|
183 |
6 => 'LABEL_MONTH_JUNE',
|
|
|
184 |
7 => 'LABEL_MONTH_JULY',
|
|
|
185 |
8 => 'LABEL_MONTH_AUGUST',
|
|
|
186 |
9 => 'LABEL_MONTH_SEPTEMBER',
|
|
|
187 |
10 => 'LABEL_MONTH_OCTOBER',
|
|
|
188 |
11 => 'LABEL_MONTH_NOVEMBER',
|
|
|
189 |
12 => 'LABEL_MONTH_DECEMBER',
|
|
|
190 |
];
|
|
|
191 |
|
|
|
192 |
$dt = \dateTime::createFromFormat('Y-m-d', $job->last_date_of_application);
|
|
|
193 |
$last_date_of_application = $dt->format('d') . ' de ' . $months[$dt->format('n')] . ' de ' . $dt->format('Y');
|
|
|
194 |
|
|
|
195 |
$locationMapper = LocationMapper::getInstance($this->adapter);
|
|
|
196 |
$location = $locationMapper->fetchOne($job->location_id);
|
|
|
197 |
|
|
|
198 |
$jobCategoryMapper = JobCategoryMapper::getInstance($this->adapter);
|
|
|
199 |
$jobCategory = $jobCategoryMapper->fetchOne($job->job_category_id);
|
|
|
200 |
|
|
|
201 |
switch($job->employment_type)
|
|
|
202 |
{
|
|
|
203 |
case Job::EMPLOYMENT_TYPE_FULL_TIME :
|
|
|
204 |
$employment_type = 'LABEL_EMPLOYMENT_TYPE_FULL_TIME';
|
|
|
205 |
break;
|
|
|
206 |
case Job::EMPLOYMENT_TYPE_PART_TIME :
|
|
|
207 |
$employment_type = 'LABEL_EMPLOYMENT_TYPE_PART_TIME';
|
|
|
208 |
break;
|
|
|
209 |
|
|
|
210 |
case Job::EMPLOYMENT_TYPE_CONTRACT :
|
|
|
211 |
$employment_type = 'LABEL_EMPLOYMENT_TYPE_CONTRACT';
|
|
|
212 |
break;
|
|
|
213 |
|
|
|
214 |
case Job::EMPLOYMENT_TYPE_TEMPORARY :
|
|
|
215 |
$employment_type = 'LABEL_EMPLOYMENT_TYPE_TEMPORARY';
|
|
|
216 |
break;
|
|
|
217 |
|
|
|
218 |
default :
|
|
|
219 |
$employment_type = '';
|
|
|
220 |
break;
|
|
|
221 |
}
|
|
|
222 |
|
|
|
223 |
$degrees = [];
|
|
|
224 |
$degreeMapper = DegreeMapper::getInstance($this->adapter);
|
3454 |
efrain |
225 |
$records = $degreeMapper->fetchAllActive();
|
1 |
www |
226 |
foreach($records as $record)
|
|
|
227 |
{
|
|
|
228 |
$degrees[$record->uuid] = $record->name;
|
|
|
229 |
}
|
|
|
230 |
|
|
|
231 |
$jobDegreeMapper = JobDegreeMapper::getInstance($this->adapter);
|
|
|
232 |
$records = $jobDegreeMapper->fetchAllByJobId($job->id);
|
|
|
233 |
|
|
|
234 |
$job_degrees = [];
|
|
|
235 |
foreach($records as $record)
|
|
|
236 |
{
|
|
|
237 |
$degree = $degreeMapper->fetchOne($record->degree_id);
|
|
|
238 |
array_push($job_degrees, $degree->name);
|
|
|
239 |
}
|
|
|
240 |
|
|
|
241 |
$languages = [];
|
|
|
242 |
$languageMapper = LanguageMapper::getInstance($this->adapter);
|
3454 |
efrain |
243 |
$records = $languageMapper->fetchAllActive();
|
1 |
www |
244 |
foreach($records as $record)
|
|
|
245 |
{
|
|
|
246 |
$languages[$record->id] = $record->name;
|
|
|
247 |
}
|
|
|
248 |
|
|
|
249 |
$jobLanguageMapper = JobLanguageMapper::getInstance($this->adapter);
|
|
|
250 |
$records = $jobLanguageMapper->fetchAllByJobId($job->id);
|
|
|
251 |
|
|
|
252 |
|
|
|
253 |
$job_languages = [];
|
|
|
254 |
foreach($records as $record)
|
|
|
255 |
{
|
|
|
256 |
$language = $languageMapper->fetchOne($record->language_id);
|
|
|
257 |
array_push($job_languages, $language->name);
|
|
|
258 |
}
|
|
|
259 |
|
|
|
260 |
$skills = [];
|
|
|
261 |
$skillMapper = SkillMapper::getInstance($this->adapter);
|
|
|
262 |
|
3454 |
efrain |
263 |
$records = $skillMapper->fetchAllActive();
|
1 |
www |
264 |
foreach($records as $record)
|
|
|
265 |
{
|
|
|
266 |
$skills[$record->uuid] = $record->name;
|
|
|
267 |
}
|
|
|
268 |
|
|
|
269 |
|
|
|
270 |
$jobSkillMapper = JobSkillMapper::getInstance($this->adapter);
|
|
|
271 |
$records = $jobSkillMapper->fetchAllByJobId($job->id);
|
|
|
272 |
|
|
|
273 |
$job_skills = [];
|
|
|
274 |
foreach($records as $record)
|
|
|
275 |
{
|
|
|
276 |
$skill = $skillMapper->fetchOne($record->skill_id);
|
|
|
277 |
array_push($job_skills, $skill->name);
|
|
|
278 |
}
|
|
|
279 |
|
|
|
280 |
|
|
|
281 |
$industryMapper = IndustryMapper::getInstance($this->adapter);
|
|
|
282 |
$industry = $industryMapper->fetchOne($company->industry_id);
|
|
|
283 |
|
|
|
284 |
$companySizeMapper = CompanySizeMapper::getInstance($this->adapter);
|
|
|
285 |
$companySize = $companySizeMapper->fetchOne($company->company_size_id);
|
|
|
286 |
|
|
|
287 |
$companyLocationMapper = CompanyLocationMapper::getInstance($this->adapter);
|
|
|
288 |
$companyLocation = $companyLocationMapper->fetchOneMainLocationByCompanyId($company->id);
|
|
|
289 |
|
|
|
290 |
|
|
|
291 |
$company_address = '';
|
|
|
292 |
if($companyLocation) {
|
|
|
293 |
$mainLocation = $locationMapper->fetchOne($companyLocation->location_id);
|
|
|
294 |
if($mainLocation) {
|
|
|
295 |
$company_address = $mainLocation->formatted_address;
|
|
|
296 |
}
|
|
|
297 |
}
|
|
|
298 |
|
|
|
299 |
$user_profiles = [];
|
|
|
300 |
$userProfileMapper = UserProfileMapper::getInstance($this->adapter);
|
|
|
301 |
$records = $userProfileMapper->fetchAllByUserId($currentUser->id);
|
|
|
302 |
foreach($records as $record)
|
|
|
303 |
{
|
|
|
304 |
$user_profiles[$record->uuid] = $record->name;
|
|
|
305 |
}
|
|
|
306 |
|
|
|
307 |
|
|
|
308 |
|
6388 |
efrain |
309 |
|
3138 |
efrain |
310 |
$timeElapsed = Functions::timeAgo($job->updated_on, $now);
|
|
|
311 |
|
1 |
www |
312 |
$formApply = new ApplyForm($this->adapter, $currentUser->id);
|
|
|
313 |
|
|
|
314 |
|
|
|
315 |
$this->layout()->setTemplate('layout/layout.phtml');
|
|
|
316 |
$viewModel = new ViewModel();
|
|
|
317 |
$viewModel->setTemplate('leaders-linked/job/view.phtml');
|
|
|
318 |
$viewModel->setVariables([
|
|
|
319 |
'company_uuid' => $company->uuid,
|
|
|
320 |
'company_image' => $company->image,
|
|
|
321 |
'job_uuid' => $job->uuid,
|
|
|
322 |
'job_title' => $job->title,
|
|
|
323 |
'job_description' => $job->description,
|
|
|
324 |
'total_applications' => $total_applications,
|
|
|
325 |
'location' => $location->formatted_address,
|
|
|
326 |
'employment_type' => $employment_type,
|
|
|
327 |
'last_date_of_application' => $last_date_of_application,
|
|
|
328 |
'job_category' => $jobCategory->name,
|
|
|
329 |
'timeElapsed' => $timeElapsed,
|
|
|
330 |
'experience' => $job->experience_visible ? $job->experience_min . '-' . $job->experience_max : '',
|
|
|
331 |
'salary' => $job->salary_visible ? $job->salary_min . '-' . $job->salary_max . ' (' . $job->salary_currency . ')' : '',
|
|
|
332 |
'job_degrees' => $job_degrees,
|
|
|
333 |
'job_languages' => $job_languages,
|
|
|
334 |
'job_skills' => $job_skills,
|
|
|
335 |
'job_visits' => $job->visits,
|
|
|
336 |
'job_apply_operation' => $job_apply_operation,
|
|
|
337 |
'job_save_operation' => $job_save_operation,
|
|
|
338 |
'company_name' => $company->name,
|
|
|
339 |
'company_foundation_year' => $company->foundation_year,
|
|
|
340 |
'company_website' => $company->website,
|
|
|
341 |
'company_industry' => $industry->name,
|
|
|
342 |
'company_size' => $companySize->minimum_no_of_employee . '-' . $companySize->maximum_no_of_employee,
|
|
|
343 |
'company_address' => $company_address,
|
|
|
344 |
'formApply' => $formApply,
|
|
|
345 |
'user_profiles' => $user_profiles
|
|
|
346 |
|
|
|
347 |
|
|
|
348 |
]);
|
|
|
349 |
return $viewModel ;
|
|
|
350 |
|
|
|
351 |
} else {
|
|
|
352 |
$data = [
|
|
|
353 |
'success' => false,
|
|
|
354 |
'data' => 'ERROR_METHOD_NOT_ALLOWED'
|
|
|
355 |
];
|
|
|
356 |
|
|
|
357 |
return new JsonModel($data);
|
|
|
358 |
}
|
|
|
359 |
|
|
|
360 |
return new JsonModel($data);
|
|
|
361 |
}
|
|
|
362 |
|
|
|
363 |
public function applyJobAction()
|
|
|
364 |
{
|
3639 |
efrain |
365 |
$currentUserPlugin = $this->plugin('currentUserPlugin');
|
|
|
366 |
$currentUser = $currentUserPlugin->getUser();
|
|
|
367 |
|
|
|
368 |
|
1 |
www |
369 |
$request = $this->getRequest();
|
|
|
370 |
$id = $this->params()->fromRoute('id');
|
|
|
371 |
|
|
|
372 |
if(!$id) {
|
|
|
373 |
$data = [
|
|
|
374 |
'success' => false,
|
|
|
375 |
'data' => 'ERROR_INVALID_PARAMETER'
|
|
|
376 |
];
|
|
|
377 |
|
|
|
378 |
return new JsonModel($data);
|
|
|
379 |
}
|
|
|
380 |
|
|
|
381 |
$jobMapper = JobMapper::getInstance($this->adapter);
|
3639 |
efrain |
382 |
$job = $jobMapper->fetchOneByUuidAndNetworkId($id, $currentUser->network_id);
|
1 |
www |
383 |
if(!$job) {
|
|
|
384 |
$data = [
|
|
|
385 |
'success' => false,
|
|
|
386 |
'data' => 'ERROR_RECORD_NOT_FOUND'
|
|
|
387 |
];
|
|
|
388 |
|
|
|
389 |
return new JsonModel($data);
|
|
|
390 |
}
|
|
|
391 |
|
|
|
392 |
if($job->status != Job::STATUS_ACTIVE) {
|
|
|
393 |
$data = [
|
|
|
394 |
'success' => false,
|
|
|
395 |
'data' => 'ERROR_UNAUTHORIZED'
|
|
|
396 |
];
|
|
|
397 |
|
|
|
398 |
return new JsonModel($data);
|
|
|
399 |
}
|
|
|
400 |
|
|
|
401 |
$companyMapper = CompanyMapper::getInstance($this->adapter);
|
|
|
402 |
$company = $companyMapper->fetchOne($job->company_id);
|
|
|
403 |
if(!$company) {
|
|
|
404 |
$data = [
|
|
|
405 |
'success' => false,
|
|
|
406 |
'data' => 'ERROR_RECORD_NOT_FOUND'
|
|
|
407 |
];
|
|
|
408 |
|
|
|
409 |
return new JsonModel($data);
|
|
|
410 |
}
|
|
|
411 |
|
|
|
412 |
|
|
|
413 |
if($request->isPost()) {
|
3639 |
efrain |
414 |
|
1 |
www |
415 |
$form = new ApplyForm($this->adapter, $currentUser->id);
|
|
|
416 |
$dataPost = $request->getPost()->toArray();
|
|
|
417 |
|
|
|
418 |
$form->setData($dataPost);
|
|
|
419 |
|
|
|
420 |
if($form->isValid()) {
|
|
|
421 |
$dataPost = (array) $form->getData();
|
|
|
422 |
|
|
|
423 |
$userProfileMapper = UserProfileMapper::getInstance($this->adapter);
|
|
|
424 |
$userProfile = $userProfileMapper->fetchOneByUuid($dataPost['user_profile_id']);
|
|
|
425 |
|
|
|
426 |
$jobApplicationMapper = JobApplicationMapper::getInstance($this->adapter);
|
|
|
427 |
$jobApplication = $jobApplicationMapper->fetchOneByJobIdAndUserId($job->id, $currentUser->id);
|
|
|
428 |
|
|
|
429 |
$result = true;
|
|
|
430 |
|
|
|
431 |
if(!$jobApplication) {
|
|
|
432 |
$jobApplication = new JobApplication();
|
|
|
433 |
$jobApplication->job_id = $job->id;
|
|
|
434 |
$jobApplication->user_id = $currentUser->id;
|
|
|
435 |
$jobApplication->user_profile_id = $userProfile->id;
|
|
|
436 |
|
|
|
437 |
$result = $jobApplicationMapper->insert($jobApplication);
|
|
|
438 |
if($result) {
|
|
|
439 |
$this->logger->info('El usuario ' . $currentUser->first_name . ' ' . $currentUser->last_name . ' aplico al trabajo ' . $job->title, ['user_id' => $currentUser->id, 'ip' => Functions::getUserIP()]);
|
|
|
440 |
}
|
|
|
441 |
}
|
|
|
442 |
|
|
|
443 |
if($result) {
|
|
|
444 |
|
|
|
445 |
$total = $jobApplicationMapper->fetchTotalApplicationsByJobId($job->id);
|
|
|
446 |
|
|
|
447 |
$data = [
|
|
|
448 |
'success' => true,
|
|
|
449 |
'data' => 'LABEL_SUCCESSFUL_APPLICATION',
|
|
|
450 |
'total' => $total
|
|
|
451 |
];
|
|
|
452 |
|
|
|
453 |
|
|
|
454 |
|
|
|
455 |
} else {
|
|
|
456 |
$data = [
|
|
|
457 |
'success' => false,
|
|
|
458 |
'data' => $jobApplicationMapper->getError()
|
|
|
459 |
];
|
|
|
460 |
}
|
|
|
461 |
|
|
|
462 |
|
|
|
463 |
return new JsonModel($data);
|
|
|
464 |
|
|
|
465 |
} else {
|
|
|
466 |
$messages = [];
|
|
|
467 |
$form_messages = (array) $form->getMessages();
|
|
|
468 |
foreach($form_messages as $fieldname => $field_messages)
|
|
|
469 |
{
|
|
|
470 |
$messages[$fieldname] = array_values($field_messages);
|
|
|
471 |
}
|
|
|
472 |
|
|
|
473 |
return new JsonModel([
|
|
|
474 |
'success' => false,
|
|
|
475 |
'data' => $messages
|
|
|
476 |
]);
|
|
|
477 |
}
|
|
|
478 |
|
|
|
479 |
} else {
|
|
|
480 |
$data = [
|
|
|
481 |
'success' => false,
|
|
|
482 |
'data' => 'ERROR_METHOD_NOT_ALLOWED'
|
|
|
483 |
];
|
|
|
484 |
|
|
|
485 |
return new JsonModel($data);
|
|
|
486 |
|
|
|
487 |
}
|
|
|
488 |
}
|
|
|
489 |
|
|
|
490 |
public function removeApplyJobAction()
|
|
|
491 |
{
|
3639 |
efrain |
492 |
$currentUserPlugin = $this->plugin('currentUserPlugin');
|
|
|
493 |
$currentUser = $currentUserPlugin->getUser();
|
|
|
494 |
|
1 |
www |
495 |
$request = $this->getRequest();
|
|
|
496 |
$id = $this->params()->fromRoute('id');
|
|
|
497 |
|
|
|
498 |
if(!$id) {
|
|
|
499 |
$data = [
|
|
|
500 |
'success' => false,
|
|
|
501 |
'data' => 'ERROR_INVALID_PARAMETER'
|
|
|
502 |
];
|
|
|
503 |
|
|
|
504 |
return new JsonModel($data);
|
|
|
505 |
}
|
|
|
506 |
|
|
|
507 |
$jobMapper = JobMapper::getInstance($this->adapter);
|
3639 |
efrain |
508 |
$job = $jobMapper->fetchOneByUuidAndNetworkId($id, $currentUser->network_id);
|
1 |
www |
509 |
if(!$job) {
|
|
|
510 |
$data = [
|
|
|
511 |
'success' => false,
|
|
|
512 |
'data' => 'ERROR_RECORD_NOT_FOUND'
|
|
|
513 |
];
|
|
|
514 |
|
|
|
515 |
return new JsonModel($data);
|
|
|
516 |
}
|
|
|
517 |
|
|
|
518 |
if($job->status != Job::STATUS_ACTIVE) {
|
|
|
519 |
$data = [
|
|
|
520 |
'success' => false,
|
|
|
521 |
'data' => 'ERROR_UNAUTHORIZED'
|
|
|
522 |
];
|
|
|
523 |
|
|
|
524 |
return new JsonModel($data);
|
|
|
525 |
}
|
|
|
526 |
|
|
|
527 |
$companyMapper = CompanyMapper::getInstance($this->adapter);
|
|
|
528 |
$company = $companyMapper->fetchOne($job->company_id);
|
|
|
529 |
if(!$company) {
|
|
|
530 |
$data = [
|
|
|
531 |
'success' => false,
|
|
|
532 |
'data' => 'ERROR_RECORD_NOT_FOUND'
|
|
|
533 |
];
|
|
|
534 |
|
|
|
535 |
return new JsonModel($data);
|
|
|
536 |
}
|
|
|
537 |
|
|
|
538 |
|
|
|
539 |
if($request->isPost()) {
|
|
|
540 |
|
|
|
541 |
$jobApplicationMapper = JobApplicationMapper::getInstance($this->adapter);
|
|
|
542 |
$result = $jobApplicationMapper->deleteByJobIdAndUserId($job->id, $currentUser->id);
|
|
|
543 |
|
|
|
544 |
if($result) {
|
|
|
545 |
$this->logger->info('El usuario ' . $currentUser->first_name . ' ' . $currentUser->last_name . ' removio su aplicación al trabajo ' . $job->title, ['user_id' => $currentUser->id, 'ip' => Functions::getUserIP()]);
|
|
|
546 |
|
|
|
547 |
$total = $jobApplicationMapper->fetchTotalApplicationsByJobId($job->id);
|
|
|
548 |
$data = [
|
|
|
549 |
'success' => true,
|
|
|
550 |
'data' => 'LABEL_APPLICATION_WAS_REMOVED',
|
|
|
551 |
'total' => $total
|
|
|
552 |
];
|
|
|
553 |
} else {
|
|
|
554 |
$data = [
|
|
|
555 |
'success' => false,
|
|
|
556 |
'data' => $jobApplicationMapper->getError()
|
|
|
557 |
];
|
|
|
558 |
|
|
|
559 |
|
|
|
560 |
}
|
|
|
561 |
|
|
|
562 |
return new JsonModel($data);
|
|
|
563 |
|
|
|
564 |
} else {
|
|
|
565 |
$data = [
|
|
|
566 |
'success' => false,
|
|
|
567 |
'data' => 'ERROR_METHOD_NOT_ALLOWED'
|
|
|
568 |
];
|
|
|
569 |
|
|
|
570 |
return new JsonModel($data);
|
|
|
571 |
|
|
|
572 |
}
|
|
|
573 |
}
|
|
|
574 |
|
|
|
575 |
public function removeSaveJobAction()
|
|
|
576 |
{
|
3639 |
efrain |
577 |
$currentUserPlugin = $this->plugin('currentUserPlugin');
|
|
|
578 |
$currentUser = $currentUserPlugin->getUser();
|
|
|
579 |
|
1 |
www |
580 |
$request = $this->getRequest();
|
|
|
581 |
$id = $this->params()->fromRoute('id');
|
|
|
582 |
|
|
|
583 |
if(!$id) {
|
|
|
584 |
$data = [
|
|
|
585 |
'success' => false,
|
|
|
586 |
'data' => 'ERROR_INVALID_PARAMETER'
|
|
|
587 |
];
|
|
|
588 |
|
|
|
589 |
return new JsonModel($data);
|
|
|
590 |
}
|
|
|
591 |
|
|
|
592 |
$jobMapper = JobMapper::getInstance($this->adapter);
|
3639 |
efrain |
593 |
$job = $jobMapper->fetchOneByUuidAndNetworkId($id, $currentUser->network_id);
|
1 |
www |
594 |
if(!$job) {
|
|
|
595 |
$data = [
|
|
|
596 |
'success' => false,
|
|
|
597 |
'data' => 'ERROR_RECORD_NOT_FOUND'
|
|
|
598 |
];
|
|
|
599 |
|
|
|
600 |
return new JsonModel($data);
|
|
|
601 |
}
|
|
|
602 |
|
|
|
603 |
if($job->status != Job::STATUS_ACTIVE) {
|
|
|
604 |
$data = [
|
|
|
605 |
'success' => false,
|
|
|
606 |
'data' => 'ERROR_UNAUTHORIZED'
|
|
|
607 |
];
|
|
|
608 |
|
|
|
609 |
return new JsonModel($data);
|
|
|
610 |
}
|
|
|
611 |
|
|
|
612 |
$companyMapper = CompanyMapper::getInstance($this->adapter);
|
|
|
613 |
$company = $companyMapper->fetchOne($job->company_id);
|
|
|
614 |
if(!$company) {
|
|
|
615 |
$data = [
|
|
|
616 |
'success' => false,
|
|
|
617 |
'data' => 'ERROR_RECORD_NOT_FOUND'
|
|
|
618 |
];
|
|
|
619 |
|
|
|
620 |
return new JsonModel($data);
|
|
|
621 |
}
|
|
|
622 |
|
|
|
623 |
|
|
|
624 |
if($request->isPost()) {
|
3639 |
efrain |
625 |
|
1 |
www |
626 |
$jobSaveMapper = JobSaveMapper::getInstance($this->adapter);
|
|
|
627 |
$result = $jobSaveMapper->deleteByJobIdAndUserId($job->id, $currentUser->id);
|
|
|
628 |
|
|
|
629 |
if($result) {
|
|
|
630 |
$this->logger->info('El usuario ' . $currentUser->first_name . ' ' . $currentUser->last_name . ' removio este trabajo salvado ' . $job->title, ['user_id' => $currentUser->id, 'ip' => Functions::getUserIP()]);
|
|
|
631 |
|
|
|
632 |
$data = [
|
|
|
633 |
'success' => true,
|
|
|
634 |
''
|
|
|
635 |
];
|
|
|
636 |
} else {
|
|
|
637 |
$data = [
|
|
|
638 |
'success' => false,
|
|
|
639 |
'data' => $jobSaveMapper->getError()
|
|
|
640 |
];
|
|
|
641 |
|
|
|
642 |
|
|
|
643 |
}
|
|
|
644 |
|
|
|
645 |
return new JsonModel($data);
|
|
|
646 |
|
|
|
647 |
} else {
|
|
|
648 |
$data = [
|
|
|
649 |
'success' => false,
|
|
|
650 |
'data' => 'ERROR_METHOD_NOT_ALLOWED'
|
|
|
651 |
];
|
|
|
652 |
|
|
|
653 |
return new JsonModel($data);
|
|
|
654 |
|
|
|
655 |
}
|
|
|
656 |
}
|
|
|
657 |
|
|
|
658 |
|
|
|
659 |
public function saveJobAction()
|
|
|
660 |
{
|
3639 |
efrain |
661 |
$currentUserPlugin = $this->plugin('currentUserPlugin');
|
|
|
662 |
$currentUser = $currentUserPlugin->getUser();
|
|
|
663 |
|
1 |
www |
664 |
$request = $this->getRequest();
|
|
|
665 |
$id = $this->params()->fromRoute('id');
|
|
|
666 |
|
|
|
667 |
if(!$id) {
|
|
|
668 |
$data = [
|
|
|
669 |
'success' => false,
|
|
|
670 |
'data' => 'ERROR_INVALID_PARAMETER'
|
|
|
671 |
];
|
|
|
672 |
|
|
|
673 |
return new JsonModel($data);
|
|
|
674 |
}
|
|
|
675 |
|
|
|
676 |
$jobMapper = JobMapper::getInstance($this->adapter);
|
3639 |
efrain |
677 |
$job = $jobMapper->fetchOneByUuidAndNetworkId($id, $currentUser->network_id);
|
1 |
www |
678 |
if(!$job) {
|
|
|
679 |
$data = [
|
|
|
680 |
'success' => false,
|
|
|
681 |
'data' => 'ERROR_RECORD_NOT_FOUND'
|
|
|
682 |
];
|
|
|
683 |
|
|
|
684 |
return new JsonModel($data);
|
|
|
685 |
}
|
|
|
686 |
|
|
|
687 |
if($job->status != Job::STATUS_ACTIVE) {
|
|
|
688 |
$data = [
|
|
|
689 |
'success' => false,
|
|
|
690 |
'data' => 'ERROR_UNAUTHORIZED'
|
|
|
691 |
];
|
|
|
692 |
|
|
|
693 |
return new JsonModel($data);
|
|
|
694 |
}
|
|
|
695 |
|
|
|
696 |
$companyMapper = CompanyMapper::getInstance($this->adapter);
|
|
|
697 |
$company = $companyMapper->fetchOne($job->company_id);
|
|
|
698 |
if(!$company) {
|
|
|
699 |
$data = [
|
|
|
700 |
'success' => false,
|
|
|
701 |
'data' => 'ERROR_RECORD_NOT_FOUND'
|
|
|
702 |
];
|
|
|
703 |
|
|
|
704 |
return new JsonModel($data);
|
|
|
705 |
}
|
|
|
706 |
|
|
|
707 |
|
|
|
708 |
if($request->isPost()) {
|
3639 |
efrain |
709 |
|
1 |
www |
710 |
$jobSaveMapper = JobSaveMapper::getInstance($this->adapter);
|
|
|
711 |
$jobSave = $jobSaveMapper->fetchOneByJobIdAndUserId($job->id, $currentUser->id);
|
|
|
712 |
|
|
|
713 |
if($jobSave) {
|
|
|
714 |
$result = true;
|
|
|
715 |
} else {
|
|
|
716 |
$jobSave = new JobSave();
|
|
|
717 |
$jobSave->job_id = $job->id;
|
|
|
718 |
$jobSave->user_id = $currentUser->id;
|
|
|
719 |
|
|
|
720 |
$result = $jobSaveMapper->insert($jobSave);
|
|
|
721 |
}
|
|
|
722 |
|
|
|
723 |
if($result) {
|
|
|
724 |
$this->logger->info('El usuario ' . $currentUser->first_name . ' ' . $currentUser->last_name . ' salvo este trabajo ' . $job->title, ['user_id' => $currentUser->id, 'ip' => Functions::getUserIP()]);
|
|
|
725 |
|
|
|
726 |
$data = [
|
|
|
727 |
'success' => true,
|
|
|
728 |
];
|
|
|
729 |
} else {
|
|
|
730 |
$data = [
|
|
|
731 |
'success' => false,
|
|
|
732 |
'data' => $jobSaveMapper->getError()
|
|
|
733 |
];
|
|
|
734 |
|
|
|
735 |
|
|
|
736 |
}
|
|
|
737 |
|
|
|
738 |
return new JsonModel($data);
|
|
|
739 |
|
|
|
740 |
} else {
|
|
|
741 |
$data = [
|
|
|
742 |
'success' => false,
|
|
|
743 |
'data' => 'ERROR_METHOD_NOT_ALLOWED'
|
|
|
744 |
];
|
|
|
745 |
|
|
|
746 |
return new JsonModel($data);
|
|
|
747 |
|
|
|
748 |
}
|
|
|
749 |
}
|
|
|
750 |
|
|
|
751 |
public function appliedJobsAction()
|
|
|
752 |
{
|
|
|
753 |
$currentUserPlugin = $this->plugin('currentUserPlugin');
|
|
|
754 |
$currentUser = $currentUserPlugin->getUser();
|
3639 |
efrain |
755 |
|
1 |
www |
756 |
$request = $this->getRequest();
|
|
|
757 |
if($request->isGet()) {
|
|
|
758 |
|
|
|
759 |
|
|
|
760 |
$headers = $request->getHeaders();
|
|
|
761 |
$isJson = false;
|
|
|
762 |
if($headers->has('Accept')) {
|
|
|
763 |
$accept = $headers->get('Accept');
|
|
|
764 |
|
|
|
765 |
$prioritized = $accept->getPrioritized();
|
|
|
766 |
|
|
|
767 |
foreach($prioritized as $key => $value) {
|
|
|
768 |
$raw = trim($value->getRaw());
|
|
|
769 |
|
|
|
770 |
if(!$isJson) {
|
|
|
771 |
$isJson = strpos($raw, 'json');
|
|
|
772 |
}
|
|
|
773 |
|
|
|
774 |
}
|
|
|
775 |
}
|
|
|
776 |
|
|
|
777 |
if($isJson) {
|
|
|
778 |
$employment_types = [
|
|
|
779 |
job::EMPLOYMENT_TYPE_FULL_TIME => 'LABEL_EMPLOYMENT_TYPE_FULL_TIME',
|
|
|
780 |
Job::EMPLOYMENT_TYPE_PART_TIME => 'LABEL_EMPLOYMENT_TYPE_PART_TIME',
|
|
|
781 |
Job::EMPLOYMENT_TYPE_TEMPORARY => 'LABEL_EMPLOYMENT_TYPE_TEMPORARY',
|
1327 |
efrain |
782 |
Job::EMPLOYMENT_TYPE_CONTRACT => 'LABEL_EMPLOYMENT_TYPE_CONTRACT',
|
1 |
www |
783 |
];
|
|
|
784 |
|
6749 |
efrain |
785 |
$search = Functions::sanitizeFilterString($this->params()->fromQuery('search', ''));
|
1 |
www |
786 |
|
|
|
787 |
$queryMapper = QueryMapper::getInstance($this->adapter);
|
|
|
788 |
|
|
|
789 |
$select = $queryMapper->getSql()->select();
|
|
|
790 |
$select->columns(['id', 'uuid', 'title', 'employment_type', 'last_date_of_application']);
|
|
|
791 |
$select->from(['j' => JobMapper::_TABLE]);
|
|
|
792 |
$select->join(['ja' => JobApplicationMapper::_TABLE], 'j.id = ja.job_id');
|
3639 |
efrain |
793 |
$select->where->equalTo('j.network_id', $currentUser->network_id);
|
1 |
www |
794 |
$select->where->equalTo('j.status', Job::STATUS_ACTIVE);
|
|
|
795 |
$select->where->equalTo('ja.user_id', $currentUser->id);
|
|
|
796 |
|
|
|
797 |
if($search) {
|
|
|
798 |
$select->where->like('title', '%' . $search . '%');
|
|
|
799 |
}
|
|
|
800 |
|
|
|
801 |
$select->order('last_date_of_application DESC');
|
|
|
802 |
|
|
|
803 |
$records = $queryMapper->fetchAll($select);
|
|
|
804 |
|
1327 |
efrain |
805 |
|
|
|
806 |
|
1 |
www |
807 |
|
|
|
808 |
$items = [];
|
|
|
809 |
foreach($records as $record)
|
|
|
810 |
{
|
|
|
811 |
|
|
|
812 |
$item = [
|
|
|
813 |
'id' => $record['uuid'],
|
|
|
814 |
'title' => $record['title'],
|
|
|
815 |
'employment_type' => $employment_types[$record['employment_type']],
|
|
|
816 |
'last_date_of_application' => $record['last_date_of_application'],
|
|
|
817 |
'link_remove' => $this->url()->fromRoute('job/remove-apply-job', ['id' => $record['uuid'] ]),
|
|
|
818 |
'link_view' => $this->url()->fromRoute('job/view', ['id' => $record['uuid'] ]),
|
|
|
819 |
];
|
|
|
820 |
|
|
|
821 |
array_push($items, $item);
|
|
|
822 |
}
|
|
|
823 |
|
|
|
824 |
|
|
|
825 |
|
|
|
826 |
$response = [
|
|
|
827 |
'success' => true,
|
|
|
828 |
'data' => $items
|
|
|
829 |
];
|
|
|
830 |
|
|
|
831 |
return new JsonModel($response);
|
|
|
832 |
|
|
|
833 |
|
|
|
834 |
} else {
|
|
|
835 |
$this->layout()->setTemplate('layout/layout.phtml');
|
|
|
836 |
$viewModel = new ViewModel();
|
|
|
837 |
$viewModel->setTemplate('leaders-linked/job/applied-jobs.phtml');
|
|
|
838 |
return $viewModel ;
|
|
|
839 |
}
|
|
|
840 |
|
|
|
841 |
} else {
|
|
|
842 |
return new JsonModel([
|
|
|
843 |
'success' => false,
|
|
|
844 |
'data' => 'ERROR_METHOD_NOT_ALLOWED'
|
|
|
845 |
]);
|
|
|
846 |
}
|
|
|
847 |
}
|
|
|
848 |
|
|
|
849 |
public function savedJobsAction()
|
|
|
850 |
{
|
|
|
851 |
$currentUserPlugin = $this->plugin('currentUserPlugin');
|
|
|
852 |
$currentUser = $currentUserPlugin->getUser();
|
3639 |
efrain |
853 |
|
1 |
www |
854 |
$request = $this->getRequest();
|
|
|
855 |
if($request->isGet()) {
|
|
|
856 |
|
|
|
857 |
|
|
|
858 |
$headers = $request->getHeaders();
|
|
|
859 |
|
|
|
860 |
$isJson = false;
|
|
|
861 |
if($headers->has('Accept')) {
|
|
|
862 |
$accept = $headers->get('Accept');
|
|
|
863 |
|
|
|
864 |
$prioritized = $accept->getPrioritized();
|
|
|
865 |
|
|
|
866 |
foreach($prioritized as $key => $value) {
|
|
|
867 |
$raw = trim($value->getRaw());
|
|
|
868 |
|
|
|
869 |
if(!$isJson) {
|
|
|
870 |
$isJson = strpos($raw, 'json');
|
|
|
871 |
}
|
|
|
872 |
|
|
|
873 |
}
|
|
|
874 |
}
|
|
|
875 |
|
|
|
876 |
if($isJson) {
|
|
|
877 |
$employment_types = [
|
|
|
878 |
job::EMPLOYMENT_TYPE_FULL_TIME => 'LABEL_EMPLOYMENT_TYPE_FULL_TIME',
|
|
|
879 |
Job::EMPLOYMENT_TYPE_PART_TIME => 'LABEL_EMPLOYMENT_TYPE_PART_TIME',
|
|
|
880 |
Job::EMPLOYMENT_TYPE_TEMPORARY => 'LABEL_EMPLOYMENT_TYPE_TEMPORARY',
|
|
|
881 |
];
|
|
|
882 |
|
6749 |
efrain |
883 |
$search = Functions::sanitizeFilterString($this->params()->fromQuery('search', ''));
|
1 |
www |
884 |
|
|
|
885 |
$queryMapper = QueryMapper::getInstance($this->adapter);
|
|
|
886 |
|
|
|
887 |
$select = $queryMapper->getSql()->select();
|
2803 |
kerby |
888 |
$select->columns(['id', 'uuid', 'title', 'employment_type', 'last_date_of_application']);
|
1 |
www |
889 |
$select->from(['j' => JobMapper::_TABLE]);
|
|
|
890 |
$select->join(['js' => JobSaveMapper::_TABLE], 'j.id = js.job_id');
|
2807 |
kerby |
891 |
$select->join(['c' => CompanyMapper::_TABLE], 'j.company_id = c.id',['image', 'comp_uuid'=>'uuid']);
|
3639 |
efrain |
892 |
$select->where->equalTo('j.network_id', $currentUser->network_id);
|
1 |
www |
893 |
$select->where->equalTo('j.status', Job::STATUS_ACTIVE);
|
|
|
894 |
$select->where->equalTo('js.user_id', $currentUser->id);
|
|
|
895 |
|
|
|
896 |
if($search) {
|
|
|
897 |
$select->where->like('title', '%' . $search . '%');
|
|
|
898 |
}
|
|
|
899 |
|
|
|
900 |
$select->order('last_date_of_application DESC');
|
2796 |
kerby |
901 |
|
2807 |
kerby |
902 |
// $selectString = $queryMapper->getSql()->buildSqlString($select);
|
2796 |
kerby |
903 |
|
2807 |
kerby |
904 |
// print_r(
|
|
|
905 |
// $selectString
|
|
|
906 |
// );
|
2796 |
kerby |
907 |
|
1 |
www |
908 |
|
|
|
909 |
$records = $queryMapper->fetchAll($select);
|
|
|
910 |
|
2809 |
kerby |
911 |
// print_r($records);
|
1 |
www |
912 |
$items = [];
|
|
|
913 |
foreach($records as $record)
|
|
|
914 |
{
|
|
|
915 |
|
|
|
916 |
$item = [
|
|
|
917 |
'id' => $record['uuid'],
|
|
|
918 |
'title' => $record['title'],
|
|
|
919 |
'employment_type' => $employment_types[$record['employment_type']],
|
|
|
920 |
'last_date_of_application' => $record['last_date_of_application'],
|
2808 |
kerby |
921 |
'image' => $this->url()->fromRoute('storage', ['type' => 'company', 'code' => $record['comp_uuid'], 'filename' => $record['image']]),
|
1 |
www |
922 |
'link_remove' => $this->url()->fromRoute('job/remove-save-job', ['id' => $record['uuid'] ]),
|
|
|
923 |
'link_view' => $this->url()->fromRoute('job/view', ['id' => $record['uuid'] ]),
|
|
|
924 |
];
|
|
|
925 |
|
|
|
926 |
array_push($items, $item);
|
|
|
927 |
}
|
|
|
928 |
|
|
|
929 |
|
|
|
930 |
|
|
|
931 |
$response = [
|
|
|
932 |
'success' => true,
|
|
|
933 |
'data' => $items
|
|
|
934 |
];
|
|
|
935 |
|
|
|
936 |
return new JsonModel($response);
|
|
|
937 |
|
|
|
938 |
|
|
|
939 |
} else {
|
|
|
940 |
$this->layout()->setTemplate('layout/layout.phtml');
|
|
|
941 |
$viewModel = new ViewModel();
|
|
|
942 |
$viewModel->setTemplate('leaders-linked/job/saved-jobs.phtml');
|
|
|
943 |
return $viewModel ;
|
|
|
944 |
}
|
|
|
945 |
|
|
|
946 |
} else {
|
|
|
947 |
return new JsonModel([
|
|
|
948 |
'success' => false,
|
|
|
949 |
'data' => 'ERROR_METHOD_NOT_ALLOWED'
|
|
|
950 |
]);
|
|
|
951 |
}
|
|
|
952 |
}
|
|
|
953 |
|
|
|
954 |
}
|