Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
venjob_nth
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
3
Merge Requests
3
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
Ngô Trung Hưng
venjob_nth
Commits
5177fccb
Commit
5177fccb
authored
Sep 11, 2020
by
Ngô Trung Hưng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor method selected_date
parent
44da0847
Pipeline
#1102
failed with stages
in 0 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
24 deletions
+20
-24
app/assets/stylesheets/admin.scss
+7
-18
app/forms/apply.rb
+13
-6
No files found.
app/assets/stylesheets/admin.scss
View file @
5177fccb
...
@@ -10,10 +10,7 @@
...
@@ -10,10 +10,7 @@
border
:
1px
solid
#ced4da
;
border
:
1px
solid
#ced4da
;
border-radius
:
0
.25rem
;
border-radius
:
0
.25rem
;
height
:
40px
;
height
:
40px
;
padding-top
:
0
.375rem
;
padding
:
0
.375rem
0
.75rem
0
.375rem
0
.6rem
;
padding-right
:
0
.75rem
;
padding-bottom
:
0
.375rem
;
padding-left
:
0
.6rem
;
}
}
@mixin
admin_select__child
{
@mixin
admin_select__child
{
border
:
none
;
border
:
none
;
...
@@ -28,12 +25,10 @@
...
@@ -28,12 +25,10 @@
outline
:
none
;
outline
:
none
;
}
}
}
}
.admin_box_search__filter_city_id
{
.admin_box_search__filter_city_id
,
.admin_box_search__filter_industry_id
{
@include
admin_select
()
}
.admin_box_search__filter_industry_id
{
@include
admin_select
()
@include
admin_select
()
}
}
.admin_box_search__filter_date
{
.admin_box_search__filter_date
{
@include
admin_select
();
@include
admin_select
();
border
:
none
!
important
;
border
:
none
!
important
;
...
@@ -48,17 +43,15 @@
...
@@ -48,17 +43,15 @@
}
}
}
}
}
}
.admin_box_search__filter_date__past_time
{
.admin_box_search__filter_date__past_time
,
.admin_box_search__filter_date__current_time
{
width
:
100%
;
text-align
:
center
;
}
.admin_box_search__filter_date__current_time
{
width
:
100%
;
width
:
100%
;
text-align
:
center
;
text-align
:
center
;
}
}
.admin_box_search__btn
{
.admin_box_search__btn
{
margin-top
:
10px
;
margin-top
:
10px
;
}
}
.admin_box_search__download
{
.admin_box_search__download
{
width
:
100%
;
width
:
100%
;
text-align
:
right
;
text-align
:
right
;
...
@@ -71,11 +64,7 @@
...
@@ -71,11 +64,7 @@
.btn-admin-search
{
.btn-admin-search
{
width
:
100%
;
width
:
100%
;
}
}
#apply_city_id
{
#apply_city_id
,
#apply_industry_id
{
@include
admin_select__child
()
}
#apply_industry_id
{
@include
admin_select__child
()
@include
admin_select__child
()
}
}
...
...
app/forms/apply.rb
View file @
5177fccb
...
@@ -11,13 +11,20 @@ class Apply
...
@@ -11,13 +11,20 @@ class Apply
def
self
.
selected_date
(
params
)
def
self
.
selected_date
(
params
)
dt
=
{}
dt
=
{}
dt
[
:selected_past_year
]
=
params
.
present?
?
params
[
'past_time(1i)'
].
to_i
:
Date
.
current
.
year
if
params
.
present?
dt
[
:selected_past_month
]
=
params
.
present?
?
params
[
'past_time(2i)'
].
to_i
:
Date
.
current
.
month
debugger
dt
[
:selected_past_day
]
=
params
.
present?
?
params
[
'past_time(3i)'
].
to_i
:
Date
.
current
.
day
dt
[
:selected_past_year
]
=
params
[
'past_time(1i)'
].
to_i
dt
[
:selected_past_month
]
=
params
[
'past_time(2i)'
].
to_i
dt
[
:selected_past_day
]
=
params
[
'past_time(3i)'
].
to_i
dt
[
:selected_current_year
]
=
params
.
present?
?
params
[
'current_time(1i)'
].
to_i
:
Date
.
current
.
year
dt
[
:selected_current_year
]
=
params
[
'current_time(1i)'
].
to_i
dt
[
:selected_current_month
]
=
params
.
present?
?
params
[
'current_time(2i)'
].
to_i
:
Date
.
current
.
month
dt
[
:selected_current_month
]
=
params
[
'current_time(2i)'
].
to_i
dt
[
:selected_current_day
]
=
params
.
present?
?
params
[
'current_time(3i)'
].
to_i
:
Date
.
current
.
day
dt
[
:selected_current_day
]
=
params
[
'current_time(3i)'
].
to_i
else
dt
[
:selected_past_year
]
=
dt
[
:selected_current_year
]
=
Date
.
current
.
year
dt
[
:selected_past_month
]
=
dt
[
:selected_current_month
]
=
Date
.
current
.
month
dt
[
:selected_past_day
]
=
dt
[
:selected_current_day
]
=
Date
.
current
.
day
end
dt
dt
end
end
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