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
4dac1879
Commit
4dac1879
authored
Apr 23, 2019
by
Kittisak Maneewong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Edit
parent
de38734c
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
22 additions
and
8 deletions
+22
-8
CompanyController.php
app/Http/Controllers/CompanyController.php
+8
-2
filesystems.php
config/filesystems.php
+1
-1
app.js
public/js/app.js
+0
-0
Company1556018777.png
public/uploads/Company1556018777.png
+0
-0
Company1556018891.png
public/uploads/Company1556018891.png
+0
-0
Company1556020497.png
public/uploads/Company1556020497.png
+0
-0
Toolbar.vue
resources/js/components/Toolbar.vue
+1
-1
CreateJob.vue
resources/js/views/CreateJob.vue
+4
-1
EditJob.vue
resources/js/views/EditJob.vue
+4
-1
Employer.vue
resources/js/views/Employer.vue
+4
-2
No files found.
app/Http/Controllers/CompanyController.php
View file @
4dac1879
...
...
@@ -4,6 +4,7 @@ namespace App\Http\Controllers;
use
App\Company
;
use
App\User
;
use
App\Job
;
use
Illuminate\Http\Request
;
class
CompanyController
extends
Controller
...
...
@@ -85,10 +86,11 @@ class CompanyController extends Controller
public
function
show
(
$id
)
{
$exists
=
Company
::
where
(
'user_id'
,
$id
)
->
exists
();
$count
=
Job
::
where
(
'user_id'
,
$id
)
->
count
();
if
(
$exists
)
{
return
response
()
->
json
([
'exists'
=>
true
,
'company'
=>
Company
::
where
(
'user_id'
,
$id
)
->
first
()]);
return
response
()
->
json
([
'exists'
=>
true
,
'company'
=>
Company
::
where
(
'user_id'
,
$id
)
->
first
()
,
'count'
=>
$count
]);
}
else
{
return
response
()
->
json
([
'exists'
=>
false
,
'company'
=>
User
::
where
(
'id'
,
$id
)
->
first
()]);
return
response
()
->
json
([
'exists'
=>
false
,
'company'
=>
User
::
where
(
'id'
,
$id
)
->
first
()
,
'count'
=>
$count
]);
}
}
...
...
@@ -124,6 +126,8 @@ class CompanyController extends Controller
$name
=
'Company'
.
time
()
.
'.'
.
explode
(
'/'
,
explode
(
':'
,
substr
(
$image
,
0
,
strpos
(
$image
,
';'
)))[
1
])[
1
];
\Image
::
make
(
$request
->
get
(
'imageCompany'
))
->
save
(
public_path
(
'uploads/'
)
.
$name
);
$company
->
imageCompany
=
'/uploads/'
.
$name
;
}
else
{
$company
->
imageCompany
=
'https://asianinteriorservices.com/wp-content/uploads/2018/04/noImg.png'
;
}
}
if
(
$request
->
get
(
'imageMap'
)
!==
$company
->
imageMap
)
{
...
...
@@ -132,6 +136,8 @@ class CompanyController extends Controller
$name
=
'Map'
.
time
()
.
'.'
.
explode
(
'/'
,
explode
(
':'
,
substr
(
$image
,
0
,
strpos
(
$image
,
';'
)))[
1
])[
1
];
\Image
::
make
(
$request
->
get
(
'imageMap'
))
->
save
(
public_path
(
'uploads/'
)
.
$name
);
$company
->
imageMap
=
'/uploads/'
.
$name
;;
}
else
{
$company
->
imageMap
=
null
;
}
}
$company
->
company_name
=
$request
->
get
(
'company_name'
);
...
...
config/filesystems.php
View file @
4dac1879
...
...
@@ -45,7 +45,7 @@ return [
'local'
=>
[
'driver'
=>
'local'
,
'root'
=>
storage_path
(
'app
'
),
'root'
=>
public_path
(
'
'
),
],
'public'
=>
[
...
...
public/js/app.js
View file @
4dac1879
This diff is collapsed.
Click to expand it.
public/uploads/Company1556018777.png
0 → 100644
View file @
4dac1879
25.1 KB
public/uploads/Company1556018891.png
0 → 100644
View file @
4dac1879
86 KB
public/uploads/Company1556020497.png
0 → 100644
View file @
4dac1879
86 KB
resources/js/components/Toolbar.vue
View file @
4dac1879
...
...
@@ -4,7 +4,7 @@
<v-flex
xs12
sm10
offset-sm1
>
<v-toolbar
flat
color=
"white"
height=
"40"
>
<v-spacer></v-spacer>
<v-btn
small=
""
dark
color=
"deep-orange darken-4"
class=
"elevation-0"
@
click=
"$router.push('/employer
/login
')"
>
สำหรับผู้ประกอบการ
</v-btn>
<v-btn
small=
""
dark
color=
"deep-orange darken-4"
class=
"elevation-0"
@
click=
"$router.push('/employer')"
>
สำหรับผู้ประกอบการ
</v-btn>
<v-divider
inset
vertical
></v-divider>
<v-btn
v-if=
"!currentUser"
small
outline
color=
"deep-orange darken-4"
@
click
.
stop=
"login()"
>
<v-icon>
person
</v-icon>
เข้าสู่ระบบ
...
...
resources/js/views/CreateJob.vue
View file @
4dac1879
...
...
@@ -136,7 +136,7 @@
label=
"ระดับการศึกษา"
v-model=
"job_data.degree"
placeholder=
" "
item-value=
"text
"
:items=
"degree
"
></v-select>
<v-text-field
label=
"เกรดเฉลี่ย "
...
...
@@ -185,6 +185,9 @@
export
default
{
data
()
{
return
{
degree
:
[
'ระดับ'
],
gender
:
[],
items
:
[
'ชาย'
,
...
...
resources/js/views/EditJob.vue
View file @
4dac1879
...
...
@@ -136,7 +136,7 @@
label=
"ระดับการศึกษา"
v-model=
"job_data.degree"
placeholder=
" "
item-value=
"text
"
:items=
"degree
"
></v-select>
<v-text-field
label=
"เกรดเฉลี่ย "
...
...
@@ -185,6 +185,9 @@
export
default
{
data
()
{
return
{
degree
:
[
'ระดับ'
],
gender
:
[],
items
:
[
'ชาย'
,
...
...
resources/js/views/Employer.vue
View file @
4dac1879
...
...
@@ -41,7 +41,7 @@
งานทั้งหมด
</v-flex>
<v-flex
xs12
sm12
class=
"subheading font-weight-black"
>
0
งาน
{{
countJob
}}
งาน
</v-flex>
</v-flex>
<v-flex
xs4
sm1
class=
"text-sm-center text-xs-center"
>
...
...
@@ -52,7 +52,7 @@
งานที่เปิดรับสมัคร
</v-flex>
<v-flex
xs12
sm12
class=
"subheading font-weight-black"
>
0
งาน
{{
countJob
}}
งาน
</v-flex>
</v-flex>
<v-flex
xs4
sm1
class=
"text-sm-center text-xs-center"
>
...
...
@@ -122,6 +122,7 @@ export default {
data
()
{
return
{
user
:
null
,
countJob
:
0
,
companies
:
{
about
:
null
,
addr
:
null
,
...
...
@@ -166,6 +167,7 @@ export default {
axios
.
get
(
`/api/companys/
${
res
.
id
}
`
)
.
then
(
res
=>
{
console
.
log
(
res
)
this
.
countJob
=
res
.
data
.
count
if
(
res
.
data
.
exists
)
{
this
.
companies
=
res
.
data
.
company
}
else
{
...
...
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