Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
CO-OP Search
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kittisak Maneewong
CO-OP Search
Commits
737cf4df
Commit
737cf4df
authored
Apr 24, 2019
by
Kittisak Maneewong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
74fad557
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
64 additions
and
39 deletions
+64
-39
JobController.php
app/Http/Controllers/JobController.php
+5
-3
app.js
public/js/app.js
+0
-0
Company1556078176.jpeg
public/uploads/Company1556078176.jpeg
+0
-0
route.js
resources/js/route.js
+18
-22
404.vue
resources/js/views/404.vue
+10
-0
CreateJob.vue
resources/js/views/CreateJob.vue
+5
-0
DetailJob.vue
resources/js/views/DetailJob.vue
+5
-0
EditCompany.vue
resources/js/views/EditCompany.vue
+0
-0
EditJob.vue
resources/js/views/EditJob.vue
+3
-1
Employer.vue
resources/js/views/Employer.vue
+6
-1
LoginEmployer.vue
resources/js/views/LoginEmployer.vue
+4
-4
RegisterEmployer.vue
resources/js/views/RegisterEmployer.vue
+8
-8
No files found.
app/Http/Controllers/JobController.php
View file @
737cf4df
...
...
@@ -24,7 +24,7 @@ class JobController extends Controller
*/
public
function
create
()
{
//
}
/**
...
...
@@ -67,8 +67,9 @@ class JobController extends Controller
*/
public
function
show
(
$id
)
{
$jobs
=
Job
::
all
();
$job
=
Job
::
where
(
'user_id'
,
$id
)
->
get
();
return
response
()
->
json
([
'jobs'
=>
$job
]);
return
response
()
->
json
([
'jobs'
=>
$job
,
'job_all'
=>
$jobs
]);
}
/**
...
...
@@ -79,9 +80,10 @@ class JobController extends Controller
*/
public
function
edit
(
$id
)
{
$jobs
=
Job
::
all
();
$job
=
Job
::
find
(
$id
);
$job
->
gender
=
explode
(
', '
,
$job
->
gender
);
return
response
()
->
json
([
'job'
=>
$job
]);
return
response
()
->
json
([
'job'
=>
$job
,
'job_all'
=>
$jobs
]);
}
/**
...
...
public/js/app.js
View file @
737cf4df
This diff is collapsed.
Click to expand it.
public/uploads/Company1556078176.jpeg
0 → 100644
View file @
737cf4df
124 KB
resources/js/route.js
View file @
737cf4df
...
...
@@ -12,7 +12,6 @@ import Account from './views/Account.vue';
import
Employer
from
'./views/Employer.vue'
;
import
LoginEmployer
from
'./views/LoginEmployer.vue'
;
import
PageNotFound
from
'./views/PageNotFound.vue'
;
import
EditCompany
from
'./views/EditCompany.vue'
;
import
RegisterEmployer
from
'./views/RegisterEmployer'
;
import
ManagejobEmployer
from
'./views/managejob.vue'
;
import
ConfigCompany
from
'./views/ConfigCompany.vue'
;
...
...
@@ -20,6 +19,9 @@ import CreateJob from './views/CreateJob.vue';
import
EditJob
from
'./views/EditJob.vue'
;
import
DetailJob
from
'./views/DetailJob.vue'
;
import
ShowJob
from
'./views/ShowJob.vue'
;
import
Page404
from
'./views/404.vue'
;
import
Axios
from
'axios'
;
import
store
from
'./store'
;
const
router
=
new
VueRouter
({
mode
:
'history'
,
...
...
@@ -34,8 +36,7 @@ const router = new VueRouter({
name
:
'Employer'
,
component
:
Employer
,
meta
:
{
loginEmployer
:
true
,
configProfile
:
true
loginEmployer
:
true
}
},
{
...
...
@@ -53,17 +54,7 @@ const router = new VueRouter({
name
:
'managejobEmployer'
,
component
:
ManagejobEmployer
,
meta
:
{
loginEmployer
:
true
,
configProfile
:
true
}
},
{
path
:
'editcompany'
,
name
:
'editcompany'
,
component
:
EditCompany
,
meta
:
{
loginEmployer
:
true
,
configProfile
:
true
loginEmployer
:
true
}
},
{
...
...
@@ -71,14 +62,16 @@ const router = new VueRouter({
name
:
'createjob'
,
component
:
CreateJob
,
meta
:
{
loginEmployer
:
true
,
configProfile
:
true
loginEmployer
:
true
}
},
{
path
:
'editjob/:id'
,
name
:
'editJob'
,
component
:
EditJob
component
:
EditJob
,
meta
:
{
loginEmployer
:
true
}
},
{
path
:
'configcompany'
,
...
...
@@ -123,10 +116,7 @@ const router = new VueRouter({
{
path
:
'*'
,
name
:
'pageNotFound'
,
component
:
PageNotFound
,
meta
:
{
requiredUser
:
true
}
component
:
Page404
}
]
}
...
...
@@ -137,10 +127,16 @@ router.beforeEach((to, from, next) => {
iView
.
LoadingBar
.
start
();
if
(
to
.
matched
.
some
(
record
=>
record
.
meta
.
requiredUser
))
{
if
(
!
localStorage
.
getItem
(
'access_token'
))
{
next
(
'/
employer/login
'
)
next
(
'/'
)
}
else
{
next
()
}
}
else
if
(
to
.
matched
.
some
(
record
=>
record
.
meta
.
loginEmployer
))
{
if
(
!
localStorage
.
getItem
(
'access_token_employer'
))
{
next
(
'/employer/login'
)
}
else
{
next
()
}
}
else
{
next
()
}
...
...
resources/js/views/404.vue
0 → 100644
View file @
737cf4df
<
template
>
<div>
<v-layout
align-center
justify-center
row
fill-height
>
<img
width=
"800"
src=
"../../../public/img/404.png"
>
</v-layout>
>
<v-layout
align-end
justify-center
row
fill-height
>
<router-link
to=
"/"
><v-btn
outline
color=
"info"
>
Back To Home
</v-btn></router-link>
</v-layout>
</div>
</
template
>
resources/js/views/CreateJob.vue
View file @
737cf4df
...
...
@@ -234,6 +234,11 @@
.
then
(
res
=>
{
console
.
log
(
res
)
this
.
job_data
.
id
=
res
.
id
axios
.
get
(
`/api/jobs/
${
res
.
id
}
`
)
.
then
(
res
=>
{
this
.
jobs_data
=
res
.
data
.
job_all
.
map
(
x
=>
x
.
job_type
).
filter
((
item
,
pos
,
self
)
=>
{
return
self
.
indexOf
(
item
)
==
pos
})
})
.
catch
(
err
=>
{
console
.
log
(
err
.
response
)})
})
.
catch
(
err
=>
{
console
.
log
(
err
)
...
...
resources/js/views/DetailJob.vue
View file @
737cf4df
...
...
@@ -116,6 +116,11 @@
<v-flex
xs12
sm12
class=
" font-weight-bold subheading mt-2 my-1"
>
<v-icon
small
>
fas fa-street-view
</v-icon>
แผนที่ตั้งบริษัท
<v-divider></v-divider>
<GmapMap
v-if=
"detail_data.lat"
style=
"width: 100%; height: 200px;"
:zoom=
"15"
:center=
"
{lat: detail_data.lat*1, lng: detail_data.long*1}">
<GmapMarker
:position=
"
{lat: detail_data.lat*1, lng: detail_data.long*1}"
/>
</GmapMap>
</v-flex>
<v-flex
xs12
sm12
class=
" font-weight-bold subheading mt-2 my-1"
>
<v-icon
small
>
fas fa-plane
</v-icon>
การเดินทาง
...
...
resources/js/views/EditCompany.vue
deleted
100644 → 0
View file @
74fad557
This diff is collapsed.
Click to expand it.
resources/js/views/EditJob.vue
View file @
737cf4df
...
...
@@ -29,7 +29,7 @@
></v-text-field>
<v-combobox
v-model=
"job_data.job_type"
:items=
"
items
"
:items=
"
jobs_data
"
:rules=
"[v => !!v || 'จำเป็นต้องกรอก']"
label=
"ประเภทงาน"
placeholder=
" "
...
...
@@ -195,6 +195,7 @@
'ชาย'
,
'หญิง'
],
jobs_data
:
[],
job_data
:
{
id
:
null
,
job_title
:
''
,
...
...
@@ -247,6 +248,7 @@
this
.
job_data
.
feature
=
res
.
data
.
job
.
feature
this
.
job_data
.
role
=
res
.
data
.
job
.
role
this
.
job_data
.
welfare
=
res
.
data
.
job
.
welfare
this
.
jobs_data
=
res
.
data
.
job_all
.
map
(
x
=>
x
.
job_type
).
filter
((
item
,
pos
,
self
)
=>
{
return
self
.
indexOf
(
item
)
==
pos
})
console
.
log
(
res
)
})
.
catch
(
err
=>
{
console
.
log
(
err
.
response
)})
...
...
resources/js/views/Employer.vue
View file @
737cf4df
...
...
@@ -25,7 +25,10 @@
<span
class=
" subheading font-weight-bold indigo--text"
><v-icon
color=
"indigo"
>
person_pin
</v-icon>
ข้อมูลบัญชีผู้ใช้
</span>
</v-flex>
<v-flex
xs4
sm4
class=
"text-sm-right text-xs-right"
>
<v-btn
small
depressed
color=
"orange darken-2"
dark
@
click=
"$router.push('/employer/createjob')"
>
<v-btn
v-if=
"exists"
small
depressed
color=
"orange darken-2"
dark
@
click=
"$router.push('/employer/createjob')"
>
<v-icon
dark
small
>
fas fa-plus
</v-icon>
ประกาศงาน
</v-btn>
<v-btn
v-if=
"!exists"
small
depressed
color=
"orange darken-2"
dark
@
click=
"$store.commit('setSnackbar',
{show: true, color: 'error', text: 'จำเป็นต้องกรอกข้อมูลบริษัทก่อน!'})">
<v-icon
dark
small
>
fas fa-plus
</v-icon>
ประกาศงาน
</v-btn>
</v-flex>
...
...
@@ -122,6 +125,7 @@ export default {
data
()
{
return
{
user
:
null
,
exists
:
false
,
countJob
:
0
,
companies
:
{
about
:
null
,
...
...
@@ -167,6 +171,7 @@ export default {
axios
.
get
(
`/api/companys/
${
res
.
id
}
`
)
.
then
(
res
=>
{
console
.
log
(
res
)
this
.
exists
=
res
.
data
.
exists
this
.
countJob
=
res
.
data
.
count
if
(
res
.
data
.
exists
)
{
this
.
companies
=
res
.
data
.
company
...
...
resources/js/views/LoginEmployer.vue
View file @
737cf4df
...
...
@@ -5,7 +5,7 @@
<h3
class=
"title font-weight-bold my-3"
>
เข้าสู่ระบบสำหรับผู้ประกอบการ
</h3>
<v-form
@
submit
.
prevent=
"login()"
ref=
"loginEmployer"
>
<v-text-field
color=
"
cyan darken-4
"
color=
"
blue darken-3
"
outline
label=
"ชื่อผู้ใช้"
prepend-inner-icon=
"person"
...
...
@@ -15,7 +15,7 @@
required
></v-text-field>
<v-text-field
color=
"
cyan darken-4
"
color=
"
blue darken-3
"
outline
label=
"รหัสผ่าน"
v-model=
"loginData.password"
...
...
@@ -35,7 +35,7 @@
>
{{
error
}}
</v-alert></p>
<v-btn
color=
"
cyan darken-4
"
large
dark
block
type=
"submit"
>
เข้าสู่ระบบ
</v-btn>
<v-btn
color=
"
blue darken-3
"
large
dark
block
type=
"submit"
>
เข้าสู่ระบบ
</v-btn>
</v-form>
<v-layout
row
wrap
justify-center
class=
"my-2"
>
<span
class=
"body-2 font-weight-medium"
>
ยังไม่มีบัญชีผู้ใช้?
<router-link
to=
"/employer/register"
href=
"#"
>
สมัครสมาชิก
</router-link></span>
...
...
@@ -49,7 +49,7 @@
width=
"300"
>
<v-card
color=
"
cyan darken-4
"
color=
"
blue darken-3
"
dark
>
<v-card-text>
...
...
resources/js/views/RegisterEmployer.vue
View file @
737cf4df
...
...
@@ -8,7 +8,7 @@
<v-flex
xs12
sm6
class=
"px-3"
>
<label
class=
"font-weight-bold "
>
ชื่อผู้ใช้
<span
class=
"red--text"
>
*
</span></label>
<v-text-field
color=
"
cyan darken-4
"
color=
"
blue darken-3
"
outline
label=
"ชื่อผู้ใช้"
v-model=
"registerData.username"
...
...
@@ -19,7 +19,7 @@
<label
class=
"font-weight-bold"
>
รหัสผ่าน
<span
class=
"red--text"
>
*
</span></label>
<v-text-field
color=
"
cyan darken-4
"
color=
"
blue darken-3
"
outline
label=
"รหัสผ่าน"
:append-icon=
"showPassword ? 'visibility' : 'visibility_off'"
...
...
@@ -33,7 +33,7 @@
<label
class=
"font-weight-bold"
>
รหัสผ่านอีกครั้ง
<span
class=
"red--text"
>
*
</span></label>
<v-text-field
color=
"
cyan darken-4
"
color=
"
blue darken-3
"
outline
label=
"รหัสผ่านอีกครั้ง"
:append-icon=
"showPasswordConfirm ? 'visibility' : 'visibility_off'"
...
...
@@ -49,7 +49,7 @@
<v-flex
xs12
sm6
class=
"px-3"
>
<label
class=
"font-weight-bold"
>
ชื่อบริษัท
<span
class=
"red--text"
>
*
</span></label>
<v-text-field
color=
"
cyan darken-4
"
color=
"
blue darken-3
"
outline
label=
"ชื่อบริษัท"
v-model=
"registerData.company_name"
...
...
@@ -60,7 +60,7 @@
<label
class=
"font-weight-bold"
>
อีเมล
<span
class=
"red--text"
>
*
</span></label>
<v-text-field
color=
"
cyan darken-4
"
color=
"
blue darken-3
"
outline
label=
"อีเมล"
v-model=
"registerData.email"
...
...
@@ -71,7 +71,7 @@
<label
class=
"font-weight-bold"
>
เบอร์โทรศัพท์
<span
class=
"red--text"
>
*
</span></label>
<v-text-field
color=
"
cyan darken-4
"
color=
"
blue darken-3
"
outline
label=
"เบอร์โทรศัพท์"
v-model=
"registerData.tel"
...
...
@@ -91,7 +91,7 @@
</v-flex>
</v-layout>
<v-layout
row
wrap
justify-center
>
<v-btn
color=
"
cyan darken-4
my-3"
dark
type=
"submit"
>
สมัครสมาชิก
</v-btn>
<v-btn
color=
"
blue darken-3
my-3"
dark
type=
"submit"
>
สมัครสมาชิก
</v-btn>
</v-layout>
<v-layout
row
wrap
justify-center
>
<span
class=
"body-2 font-weight-medium"
>
มีบัญชีผู้ใช้แล้ว?
<router-link
to=
"/employer/login"
>
เข้าสู่ระบบ
</router-link></span>
...
...
@@ -106,7 +106,7 @@
width=
"300"
>
<v-card
color=
"
cyan darken-4
"
color=
"
blue darken-3
"
dark
>
<v-card-text>
...
...
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