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
d1f99aab
Commit
d1f99aab
authored
Apr 24, 2019
by
Kittisak Maneewong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://projectcs.sci.ubu.ac.th/Kittisak162/co-op-search
parents
6e9e9e2f
239424b7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
196 additions
and
8 deletions
+196
-8
Applicant.php
app/Applicant.php
+10
-0
ApplicantController.php
app/Http/Controllers/ApplicantController.php
+94
-0
2019_04_24_070106_create_applicants_table.php
.../migrations/2019_04_24_070106_create_applicants_table.php
+40
-0
app.js
public/js/app.js
+0
-0
Company1556090173.jpeg
public/uploads/Company1556090173.jpeg
+0
-0
DetailJob.vue
resources/js/views/DetailJob.vue
+7
-2
RegisterJob.vue
resources/js/views/RegisterJob.vue
+38
-5
ShowJob.vue
resources/js/views/ShowJob.vue
+5
-1
api.php
routes/api.php
+2
-0
No files found.
app/Applicant.php
0 → 100644
View file @
d1f99aab
<?php
namespace
App
;
use
Illuminate\Database\Eloquent\Model
;
class
Applicant
extends
Model
{
//
}
app/Http/Controllers/ApplicantController.php
0 → 100644
View file @
d1f99aab
<?php
namespace
App\Http\Controllers
;
use
App\Applicant
;
use
Illuminate\Http\Request
;
class
ApplicantController
extends
Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public
function
index
()
{
//
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public
function
create
()
{
//
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public
function
store
(
Request
$request
)
{
$applicant
=
new
Applicant
();
$applicant
->
email
=
$request
->
get
(
'email'
);
$applicant
->
name
=
$request
->
get
(
'name'
);
$applicant
->
degree
=
$request
->
get
(
'degree'
);
$applicant
->
major
=
$request
->
get
(
'major'
);
$applicant
->
faculty
=
$request
->
get
(
'faculty'
);
$applicant
->
university
=
$request
->
get
(
'university'
);
$applicant
->
gpax
=
$request
->
get
(
'gpax'
);
$applicant
->
job_id
=
$request
->
get
(
'job_id'
);
$applicant
->
save
();
}
/**
* Display the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public
function
show
(
$id
)
{
//
}
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public
function
edit
(
$id
)
{
//
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public
function
update
(
Request
$request
,
$id
)
{
//
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public
function
destroy
(
$id
)
{
//
}
}
database/migrations/2019_04_24_070106_create_applicants_table.php
0 → 100644
View file @
d1f99aab
<?php
use
Illuminate\Support\Facades\Schema
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Database\Migrations\Migration
;
class
CreateApplicantsTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'applicants'
,
function
(
Blueprint
$table
)
{
$table
->
bigIncrements
(
'id'
);
$table
->
string
(
'email'
);
$table
->
string
(
'name'
);
$table
->
string
(
'degree'
)
->
nullable
();
$table
->
string
(
'major'
)
->
nullable
();
$table
->
string
(
'faculty'
)
->
nullable
();
$table
->
string
(
'university'
)
->
nullable
();
$table
->
string
(
'gpax'
)
->
nullable
();
$table
->
unsignedBigInteger
(
'job_id'
);
$table
->
foreign
(
'job_id'
)
->
references
(
'id'
)
->
on
(
'jobs'
);
$table
->
timestamps
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'applicants'
);
}
}
public/js/app.js
View file @
d1f99aab
This diff is collapsed.
Click to expand it.
public/uploads/Company1556090173.jpeg
0 → 100644
View file @
d1f99aab
124 KB
resources/js/views/DetailJob.vue
View file @
d1f99aab
...
...
@@ -8,8 +8,8 @@
<span
class=
"headline font-weight-bold indigo--text"
>
{{
detail_data
.
job_title
}}
</span>
</v-flex>
<v-flex
xs12
sm2
>
<v-btn
color=
"deep-orange "
v-if=
"
!!localStorage.getItem('access_token')
"
@
click=
"$store.commit('setDialogJob', !$store.getters.getDialogJob);"
dark
small
depressed
class=
"body-2"
>
สมัครงานนี้
</v-btn>
<v-btn
color=
"deep-orange "
v-if=
"!
localStorage.getItem('access_token')
"
@
click=
"$store.commit('setSnackbar',
{show: true, color: 'error', text: 'จำเป็นต้องเข้าสู่ระบบสมาชิกก่อน!'})" dark small depressed class="body-2">สมัครงานนี้
</v-btn>
<v-btn
color=
"deep-orange "
v-if=
"
chk
"
@
click=
"$store.commit('setDialogJob', !$store.getters.getDialogJob);"
dark
small
depressed
class=
"body-2"
>
สมัครงานนี้
</v-btn>
<v-btn
color=
"deep-orange "
v-if=
"!
chk
"
@
click=
"$store.commit('setSnackbar',
{show: true, color: 'error', text: 'จำเป็นต้องเข้าสู่ระบบสมาชิกก่อน!'})" dark small depressed class="body-2">สมัครงานนี้
</v-btn>
</v-flex>
</v-layout>
<v-flex
xs12
sm8
>
...
...
@@ -177,6 +177,11 @@ export default {
detail_data
:
{}
}
},
computed
:
{
chk
()
{
return
this
.
$store
.
getters
.
getUser
.
email
}
},
beforeMount
()
{
axios
.
get
(
`/api/detail/
${
this
.
$route
.
params
.
id
}
`
)
.
then
(
res
=>
{
...
...
resources/js/views/RegisterJob.vue
View file @
d1f99aab
...
...
@@ -25,7 +25,7 @@
label=
"อีเมล"
color=
"deep-orange"
type=
"text"
v-model=
"
registerJob_data.
email"
v-model=
"email"
required
></v-text-field>
<v-text-field
...
...
@@ -33,7 +33,7 @@
label=
"ชื่อ"
color=
"deep-orange"
type=
"text"
v-model=
"
registerJob_data.
name"
v-model=
"name"
required
></v-text-field>
<v-text-field
...
...
@@ -93,8 +93,6 @@ export default {
data
()
{
return
{
registerJob_data
:
{
name
:
''
,
email
:
''
,
major
:
''
,
faculty
:
''
,
university
:
''
,
...
...
@@ -103,10 +101,45 @@ export default {
}
}
},
computed
:
{
name
()
{
return
this
.
$store
.
getters
.
getUser
.
name
},
email
()
{
return
this
.
$store
.
getters
.
getUser
.
email
}
},
methods
:
{
registerJob
()
{
if
(
this
.
$refs
.
registerJob
.
validate
())
{
axios
.
post
(
'/api/applicants'
,
{
job_id
:
this
.
id
,
email
:
this
.
email
,
name
:
this
.
name
,
degree
:
this
.
registerJob_data
.
degree
,
major
:
this
.
registerJob_data
.
major
,
faculty
:
this
.
registerJob_data
.
faculty
,
university
:
this
.
registerJob_data
.
university
,
gpax
:
this
.
registerJob_data
.
gpax
})
.
then
(
res
=>
{
this
.
$store
.
commit
(
'setSnackbar'
,
{
show
:
true
,
color
:
'success'
,
text
:
'สมัครงานสำเร็จ'
})
this
.
$store
.
commit
(
'setDialogJob'
,
false
)
this
.
registerJob_data
=
{
major
:
''
,
faculty
:
''
,
university
:
''
,
gpax
:
''
,
degree
:
''
}
})
.
catch
(
err
=>
{
console
.
log
(
err
.
response
)
})
}
else
{
this
.
$Loading
.
error
()
}
...
...
resources/js/views/ShowJob.vue
View file @
d1f99aab
...
...
@@ -122,7 +122,8 @@
</v-flex>
<v-flex
xs12
sm2
>
<v-layout
row
wrap
justify-end
>
<v-btn
color=
"deep-orange "
dark
small
depressed
class=
"body-2"
@
click=
"$store.commit('setDialogJob', !$store.getters.getDialogJob);id=job.id"
>
สมัครงานนี้
</v-btn>
<v-btn
color=
"deep-orange "
v-if=
"chk"
dark
small
depressed
class=
"body-2"
@
click=
"$store.commit('setDialogJob', !$store.getters.getDialogJob);id=job.id"
>
สมัครงานนี้
</v-btn>
<v-btn
color=
"deep-orange "
v-if=
"!chk"
dark
small
depressed
class=
"body-2"
@
click=
"$store.commit('setSnackbar',
{show: true, color: 'error', text: 'จำเป็นต้องเข้าสู่ระบบสมาชิกก่อน!'})">สมัครงานนี้
</v-btn>
</v-layout>
<v-layout
row
wrap
justify-end
class=
"px-2"
>
<label
class=
"font-weight-bold"
>
{{
job
.
num
?
job
.
num
+
' อัตรา'
:
''
}}
</label>
...
...
@@ -274,6 +275,9 @@ export default {
}
},
computed
:
{
chk
()
{
return
this
.
$store
.
getters
.
getUser
.
email
},
chkChip
()
{
return
Object
.
values
(
this
.
chips
).
includes
(
true
);
},
...
...
routes/api.php
View file @
d1f99aab
...
...
@@ -23,6 +23,8 @@ Route::resource('/companys', 'CompanyController');
Route
::
resource
(
'/jobs'
,
'JobController'
);
Route
::
resource
(
'/applicants'
,
'ApplicantController'
);
Route
::
get
(
'/show'
,
'AppController@show'
);
Route
::
get
(
'/detail/{id}'
,
'AppController@detail'
);
...
...
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