Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
VeNJob
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tô Ngọc Ánh
VeNJob
Commits
55b2b499
Commit
55b2b499
authored
Sep 09, 2020
by
Tô Ngọc Ánh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decrease query in view applied_job
parent
f25be8dc
Pipeline
#1090
failed with stages
in 0 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
app/views/users/_applied_job.html.erb
+2
-2
lib/common/search_applied_job.rb
+2
-2
No files found.
app/views/users/_applied_job.html.erb
View file @
55b2b499
...
@@ -2,8 +2,8 @@
...
@@ -2,8 +2,8 @@
<div
class=
"row"
>
<div
class=
"row"
>
<div
class =
"col-lg-10"
>
<div
class =
"col-lg-10"
>
<div
class=
'card-body'
>
<div
class=
'card-body'
>
<%=
link_to
applied_job
.
job
.
title
,
job_path
(
applied_job
.
job
),
class:
'card-title font-weight-bold text-decoration-none'
%>
<%=
link_to
applied_job
.
job
.
title
,
job_path
(
applied_job
.
job
_id
),
class:
'card-title font-weight-bold text-decoration-none'
%>
<p><strong>
Candidate Name:
</strong>
<%=
link_to
applied_job
.
full_name
,
user_path
(
applied_job
.
user
)
%>
</p>
<p><strong>
Candidate Name:
</strong>
<%=
link_to
applied_job
.
full_name
,
user_path
(
applied_job
.
user
_id
)
%>
</p>
<p><strong>
Candidate's CV:
</strong>
<%=
link_to
applied_job
.
curriculum_vitae
.
identifier
,
applied_job
.
curriculum_vitae
.
url
%>
</p>
<p><strong>
Candidate's CV:
</strong>
<%=
link_to
applied_job
.
curriculum_vitae
.
identifier
,
applied_job
.
curriculum_vitae
.
url
%>
</p>
<p><strong>
Candidate's Email:
</strong>
<%=
applied_job
.
email
%>
</p>
<p><strong>
Candidate's Email:
</strong>
<%=
applied_job
.
email
%>
</p>
</div>
</div>
...
...
lib/common/search_applied_job.rb
View file @
55b2b499
...
@@ -2,14 +2,14 @@ module SearchAppliedJob
...
@@ -2,14 +2,14 @@ module SearchAppliedJob
def
self
.
search
(
params
)
def
self
.
search
(
params
)
date
=
{}
date
=
{}
if
params
[
:email
].
nil?
if
params
[
:email
].
nil?
applied_jobs
=
AppliedJob
.
includes
(
:job
).
order
(
created_at: :desc
).
page
(
params
[
:page
]).
per
(
2
).
decorate
applied_jobs
=
AppliedJob
.
includes
(
:job
).
order
(
created_at: :desc
).
page
(
params
[
:page
]).
decorate
date
[
:from
]
=
Date
.
today
date
[
:from
]
=
Date
.
today
date
[
:to
]
=
Date
.
today
date
[
:to
]
=
Date
.
today
else
else
date
[
:from
]
=
Date
.
new
(
params
[
:applied_at
][
"from(1i)"
].
to_i
,
params
[
:applied_at
][
"from(2i)"
].
to_i
,
params
[
:applied_at
][
"from(3i)"
].
to_i
)
date
[
:from
]
=
Date
.
new
(
params
[
:applied_at
][
"from(1i)"
].
to_i
,
params
[
:applied_at
][
"from(2i)"
].
to_i
,
params
[
:applied_at
][
"from(3i)"
].
to_i
)
date
[
:to
]
=
Date
.
new
(
params
[
:applied_at
][
"to(1i)"
].
to_i
,
params
[
:applied_at
][
"to(2i)"
].
to_i
,
params
[
:applied_at
][
"to(3i)"
].
to_i
)
date
[
:to
]
=
Date
.
new
(
params
[
:applied_at
][
"to(1i)"
].
to_i
,
params
[
:applied_at
][
"to(2i)"
].
to_i
,
params
[
:applied_at
][
"to(3i)"
].
to_i
)
job_ids
=
Job
.
of_industry
(
params
[
:industry
]).
of_location
(
params
[
:location
]).
pluck
(
:id
)
job_ids
=
Job
.
of_industry
(
params
[
:industry
]).
of_location
(
params
[
:location
]).
pluck
(
:id
)
applied_jobs
=
AppliedJob
.
of_email
(
params
[
:email
]).
where
(
created_at:
date
[
:from
]
..
date
[
:to
],
job_id:
job_ids
).
page
(
params
[
:page
]).
per
(
2
)
applied_jobs
=
AppliedJob
.
includes
(
:job
).
of_email
(
params
[
:email
]).
where
(
created_at:
date
[
:from
]
..
date
[
:to
],
job_id:
job_ids
).
page
(
params
[
:page
]
)
end
end
[
date
,
applied_jobs
]
[
date
,
applied_jobs
]
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment