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
74fad557
Commit
74fad557
authored
Apr 24, 2019
by
Kittisak Maneewong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
60590055
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
12 additions
and
3 deletions
+12
-3
AppController.php
app/Http/Controllers/AppController.php
+7
-0
JobController.php
app/Http/Controllers/JobController.php
+1
-1
app.js
public/js/app.js
+0
-0
CreateJob.vue
resources/js/views/CreateJob.vue
+3
-1
DetailJob.vue
resources/js/views/DetailJob.vue
+0
-0
ShowJob.vue
resources/js/views/ShowJob.vue
+0
-1
api.php
routes/api.php
+1
-0
No files found.
app/Http/Controllers/AppController.php
View file @
74fad557
...
...
@@ -18,4 +18,11 @@ class AppController extends Controller
->
get
();
return
response
()
->
json
([
'jobs'
=>
$jobs
]);
}
public
function
detail
(
$id
)
{
$job
=
Job
::
join
(
'companies'
,
'jobs.user_id'
,
'companies.user_id'
)
->
where
(
'jobs.id'
,
$id
)
->
first
();
return
response
()
->
json
([
'job'
=>
$job
]);
}
}
app/Http/Controllers/JobController.php
View file @
74fad557
...
...
@@ -66,7 +66,7 @@ class JobController extends Controller
* @return \Illuminate\Http\Response
*/
public
function
show
(
$id
)
{
{
$job
=
Job
::
where
(
'user_id'
,
$id
)
->
get
();
return
response
()
->
json
([
'jobs'
=>
$job
]);
}
...
...
public/js/app.js
View file @
74fad557
This diff is collapsed.
Click to expand it.
resources/js/views/CreateJob.vue
View file @
74fad557
...
...
@@ -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
:
''
,
...
...
@@ -231,6 +232,7 @@
beforeMount
()
{
this
.
$store
.
dispatch
(
'checkEmployer'
)
.
then
(
res
=>
{
console
.
log
(
res
)
this
.
job_data
.
id
=
res
.
id
})
.
catch
(
err
=>
{
...
...
resources/js/views/DetailJob.vue
View file @
74fad557
This diff is collapsed.
Click to expand it.
resources/js/views/ShowJob.vue
View file @
74fad557
...
...
@@ -155,7 +155,6 @@
</v-layout>
</v-flex>
</v-layout>
{{
chkChip
}}
</div>
</
template
>
...
...
routes/api.php
View file @
74fad557
...
...
@@ -24,6 +24,7 @@ Route::resource('/companys', 'CompanyController');
Route
::
resource
(
'/jobs'
,
'JobController'
);
Route
::
get
(
'/show'
,
'AppController@show'
);
Route
::
get
(
'/detail/{id}'
,
'AppController@detail'
);
Route
::
get
(
'/province'
,
'DistrictController@provinces'
);
Route
::
get
(
'/province/{province_code}/amphoe'
,
'DistrictController@amphoes'
);
...
...
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