Commit ce03f845 authored by Kittisak Maneewong's avatar Kittisak Maneewong

Edit employer

parent ac84964b
<?php
namespace App\Http\Controllers;
use App\User;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Validator;
use Tymon\JWTAuth\Facades\JWTAuth;
use Tymon\JWTAuth\Facades\JWTFactory;
use Tymon\JWTAuth\Exceptions\JWTException;
use Tymon\JWTAuth\Contracts\JWTSubject;
use Tymon\JWTAuth\PayloadFactory;
use Tymon\JWTAuth\JWTManager as JWT;
class AuthController extends Controller
{
public function register(Request $request)
{
if ($request->json()->get('role') == 1) {
$validator = Validator::make($request->json()->all() , [
'first_name' => 'required|string|max:255',
'last_name' => 'required|string|max:255',
'email' => 'required|string|email|max:255|unique:users,email_users',
'password' => 'required|string|min:8|confirmed',
]);
if($validator->fails()) {
return response()->json($validator->errors()->toJson(), 400);
}
$user = User::create([
'name' => $request->json()->get('first_name')." ".$request->json()->get('last_name'),
'password' => Hash::make($request->json()->get('password')),
'email_users' => $request->json()->get('email'),
]);
} else {
$validator = Validator::make($request->json()->all() , [
'company_name' => 'required|string|max:255',
'username' => 'required|string|max:255|unique:users',
'email' => 'required|string|email|max:255|unique:users,email_employers',
'password' => 'required|string|min:8|confirmed',
'tel' => 'required|string|max:255',
]);
if($validator->fails()) {
return response()->json($validator->errors()->toJson(), 400);
}
$user = User::create([
'company_name' => $request->json()->get('company_name'),
'password' => Hash::make($request->json()->get('password')),
'username' => $request->json()->get('username'),
'tel' => $request->json()->get('tel'),
'role' => 2,
'email_employers' => $request->json()->get('email'),
]);
}
$token = JWTAuth::fromUser($user);
return response()->json(compact('user', 'token'), 201);
}
public function login(Request $request)
{
$credentials = $request->json()->all();
try {
if(! $token = JWTAuth::attempt($credentials)) {
return response()->json(['error' => 'invalid_credentials'], 400);
}
} catch(JWTException $e) {
return response()->json(['error' => 'could_not_create_token', 500]);
}
return response()->json(compact('token'));
}
public function getAuthenticatedUser()
{
try {
if(! $user = JWTAuth::parseToken()->authenticate()) {
return response()->json(['user_not_found'], 404);
}
} catch(Tymon\JWTAuth\Exceptions\TokenExpiredException $e) {
return response()->json(['token_expired'], $e->getStatusCode());
} catch(Tymon\JWTAuth\Exceptions\TokenInvalidException $e) {
return response()->json(['token_invalid', $e->getStatusCode()]);
} catch(Tymon\JWTAuth\Exceptions\JWTException $e) {
return response()->json(['token_absent'], $e->getStatusCode());
}
return response()->json(compact('user'));
}
}
<?php
namespace App\Http\Controllers;
use App\User;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Validator;
use Tymon\JWTAuth\Facades\JWTAuth;
use Tymon\JWTAuth\Facades\JWTFactory;
use Tymon\JWTAuth\Exceptions\JWTException;
use Tymon\JWTAuth\Contracts\JWTSubject;
use Tymon\JWTAuth\PayloadFactory;
use Tymon\JWTAuth\JWTManager as JWT;
class AuthController extends Controller
{
public function register(Request $request)
{
if ($request->json()->get('role') == 1) {
$validator = Validator::make($request->json()->all() , [
'first_name' => 'required|string|max:255',
'last_name' => 'required|string|max:255',
'email' => 'required|string|email|max:255|unique:users,email_users',
'password' => 'required|string|min:8|confirmed',
]);
if($validator->fails()) {
return response()->json($validator->errors()->toJson(), 400);
}
$user = User::create([
'name' => $request->json()->get('first_name')." ".$request->json()->get('last_name'),
'password' => Hash::make($request->json()->get('password')),
'email_users' => $request->json()->get('email'),
]);
} else {
$validator = Validator::make($request->json()->all() , [
'company_name' => 'required|string|max:255',
'username' => 'required|string|max:255|unique:users',
'email' => 'required|string|email|max:255|unique:users,email_employers',
'password' => 'required|string|min:8|confirmed',
'tel' => 'required|string|max:255',
]);
if($validator->fails()) {
return response()->json($validator->errors()->toJson(), 400);
}
$user = User::create([
'company_name' => $request->json()->get('company_name'),
'password' => Hash::make($request->json()->get('password')),
'username' => $request->json()->get('username'),
'tel' => $request->json()->get('tel'),
'role' => 2,
'email_employers' => $request->json()->get('email'),
]);
}
$token = JWTAuth::fromUser($user);
return response()->json(compact('user', 'token'), 201);
}
public function login(Request $request)
{
$credentials = $request->json()->all();
try {
if(! $token = JWTAuth::attempt($credentials)) {
return response()->json(['error' => 'invalid_credentials'], 400);
}
} catch(JWTException $e) {
return response()->json(['error' => 'could_not_create_token', 500]);
}
$date = date()
return response()->json(compact('token', 'date'));
}
public function getAuthenticatedUser()
{
try {
if(! $user = JWTAuth::parseToken()->authenticate()) {
return response()->json(['user_not_found'], 404);
}
} catch(Tymon\JWTAuth\Exceptions\TokenExpiredException $e) {
return response()->json(['token_expired'], $e->getStatusCode());
} catch(Tymon\JWTAuth\Exceptions\TokenInvalidException $e) {
return response()->json(['token_invalid', $e->getStatusCode()]);
} catch(Tymon\JWTAuth\Exceptions\JWTException $e) {
return response()->json(['token_absent'], $e->getStatusCode());
}
return response()->json(compact('user'));
}
}
<?php
namespace App\Http\Controllers;
use App\User;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Validator;
use Tymon\JWTAuth\Facades\JWTAuth;
use Tymon\JWTAuth\Facades\JWTFactory;
use Tymon\JWTAuth\Exceptions\JWTException;
use Tymon\JWTAuth\Contracts\JWTSubject;
use Tymon\JWTAuth\PayloadFactory;
use Tymon\JWTAuth\JWTManager as JWT;
class AuthController extends Controller
{
public function register(Request $request)
{
if ($request->json()->get('role') == 1) {
$validator = Validator::make($request->json()->all() , [
'first_name' => 'required|string|max:255',
'last_name' => 'required|string|max:255',
'email' => 'required|string|email|max:255|unique:users,email_users',
'password' => 'required|string|min:8|confirmed',
]);
if($validator->fails()) {
return response()->json($validator->errors()->toJson(), 400);
}
$user = User::create([
'name' => $request->json()->get('first_name')." ".$request->json()->get('last_name'),
'password' => Hash::make($request->json()->get('password')),
'email_users' => $request->json()->get('email'),
]);
} else {
$validator = Validator::make($request->json()->all() , [
'company_name' => 'required|string|max:255',
'username' => 'required|string|max:255|unique:users',
'email' => 'required|string|email|max:255|unique:users,email_employers',
'password' => 'required|string|min:8|confirmed',
'tel' => 'required|string|max:255',
]);
if($validator->fails()) {
return response()->json($validator->errors()->toJson(), 400);
}
$user = User::create([
'company_name' => $request->json()->get('company_name'),
'password' => Hash::make($request->json()->get('password')),
'username' => $request->json()->get('username'),
'tel' => $request->json()->get('tel'),
'role' => 2,
'email_employers' => $request->json()->get('email'),
]);
}
$token = JWTAuth::fromUser($user);
return response()->json(compact('user', 'token'), 201);
}
public function login(Request $request)
{
$credentials = $request->json()->all();
try {
if(! $token = JWTAuth::attempt($credentials)) {
return response()->json(['error' => 'invalid_credentials'], 400);
}
} catch(JWTException $e) {
return response()->json(['error' => 'could_not_create_token', 500]);
}
$date = date();
return response()->json(compact('token', 'date'));
}
public function getAuthenticatedUser()
{
try {
if(! $user = JWTAuth::parseToken()->authenticate()) {
return response()->json(['user_not_found'], 404);
}
} catch(Tymon\JWTAuth\Exceptions\TokenExpiredException $e) {
return response()->json(['token_expired'], $e->getStatusCode());
} catch(Tymon\JWTAuth\Exceptions\TokenInvalidException $e) {
return response()->json(['token_invalid', $e->getStatusCode()]);
} catch(Tymon\JWTAuth\Exceptions\JWTException $e) {
return response()->json(['token_absent'], $e->getStatusCode());
}
return response()->json(compact('user'));
}
}
<?php
namespace App\Http\Controllers;
use App\User;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Validator;
use Tymon\JWTAuth\Facades\JWTAuth;
use Tymon\JWTAuth\Facades\JWTFactory;
use Tymon\JWTAuth\Exceptions\JWTException;
use Tymon\JWTAuth\Contracts\JWTSubject;
use Tymon\JWTAuth\PayloadFactory;
use Tymon\JWTAuth\JWTManager as JWT;
class AuthController extends Controller
{
public function register(Request $request)
{
if ($request->json()->get('role') == 1) {
$validator = Validator::make($request->json()->all() , [
'first_name' => 'required|string|max:255',
'last_name' => 'required|string|max:255',
'email' => 'required|string|email|max:255|unique:users,email_users',
'password' => 'required|string|min:8|confirmed',
]);
if($validator->fails()) {
return response()->json($validator->errors()->toJson(), 400);
}
$user = User::create([
'name' => $request->json()->get('first_name')." ".$request->json()->get('last_name'),
'password' => Hash::make($request->json()->get('password')),
'email_users' => $request->json()->get('email'),
]);
} else {
$validator = Validator::make($request->json()->all() , [
'company_name' => 'required|string|max:255',
'username' => 'required|string|max:255|unique:users',
'email' => 'required|string|email|max:255|unique:users,email_employers',
'password' => 'required|string|min:8|confirmed',
'tel' => 'required|string|max:255',
]);
if($validator->fails()) {
return response()->json($validator->errors()->toJson(), 400);
}
$user = User::create([
'company_name' => $request->json()->get('company_name'),
'password' => Hash::make($request->json()->get('password')),
'username' => $request->json()->get('username'),
'tel' => $request->json()->get('tel'),
'role' => 2,
'email_employers' => $request->json()->get('email'),
]);
}
$token = JWTAuth::fromUser($user);
return response()->json(compact('user', 'token'), 201);
}
public function login(Request $request)
{
$credentials = $request->json()->all();
try {
if(! $token = JWTAuth::attempt($credentials)) {
return response()->json(['error' => 'invalid_credentials'], 400);
}
} catch(JWTException $e) {
return response()->json(['error' => 'could_not_create_token', 500]);
}
return response()->json(compact('token'));
}
public function getAuthenticatedUser()
{
try {
if(! $user = JWTAuth::parseToken()->authenticate()) {
return response()->json(['user_not_found'], 404);
}
} catch(Tymon\JWTAuth\Exceptions\TokenExpiredException $e) {
return response()->json(['token_expired'], $e->getStatusCode());
} catch(Tymon\JWTAuth\Exceptions\TokenInvalidException $e) {
return response()->json(['token_invalid', $e->getStatusCode()]);
} catch(Tymon\JWTAuth\Exceptions\JWTException $e) {
return response()->json(['token_absent'], $e->getStatusCode());
}
return response()->json(compact('user'));
}
}
window.Vue = require('vue');
window._ = require('lodash');
window.axios = require('axios');
window.axios.defaults.baseUrl = 'http://localhost:8000/';
import Vue from 'vue';
import Vuetify from 'vuetify';
import iView from 'iview';
import App from './App.vue';
import router from './route';
import store from './store';
import 'iview/dist/styles/iview.css';
Vue.use(Vuetify);
Vue.use(iView);
iView.LoadingBar.config({
height: 3
});
const app = new Vue({
el: '#app',
router,
store,
render: h => h(App)
});
window.Vue = require('vue');
window._ = require('lodash');
window.axios = require('axios');
window.axios.defaults.baseUrl = 'http://localhost:8000/';
import Vue from 'vue';
import Vuetify from 'vuetify';
import iView from 'iview';
import App from './App.vue';
import router from './route';
import store from './store';
import 'iview/dist/styles/iview.css';
Vue.use(Vuetify);
Vue.use(iView);
iView.LoadingBar.config({
color: '#006064',
height: 3
});
const app = new Vue({
el: '#app',
router,
store,
render: h => h(App)
});
window.Vue = require('vue');
window._ = require('lodash');
window.axios = require('axios');
window.axios.defaults.baseUrl = 'http://localhost:8000/';
import Vue from 'vue';
import Vuetify from 'vuetify';
import iView from 'iview';
import App from './App.vue';
import router from './route';
import store from './store';
import 'iview/dist/styles/iview.css';
Vue.use(Vuetify);
Vue.use(iView);
iView.LoadingBar.config({
color: '#1B5E20',
height: 3
});
const app = new Vue({
el: '#app',
router,
store,
render: h => h(App)
});
import Vue from 'vue';
import Vuex from 'vuex';
import iView from 'iview';
Vue.use(Vuex);
export default new Vuex.Store({
state: {
message: 'Kittisak Maneewong',
user: {
name: null,
email: null
},
employer: {
username: null,
company_name: null,
email: null
},
jwt: localStorage.getItem('access_token') || null,
jwt_employer: localStorage.getItem('access_token_employer') || null,
dialog: false,
snackbar: {
show: false,
color: null,
text: null
},
loading: false,
error: null
},
mutations: {
setJwt (state, payload) {
state.jwt = payload
},
setJwtEmployer (state, payload) {
state.jwt_employer = payload
},
setDialog (state, payload) {
state.dialog = payload
},
setSnackbar (state, payload) {
state.snackbar = payload
},
setUser (state, payload) {
state.user = payload
},
setEmployer (state, payload) {
state.employer = payload
},
setLoading (state, payload) {
state.loading = payload
},
setError (state, payload) {
state.error = payload
}
},
actions: {
login ({commit, dispatch}, payload) {
return new Promise((resolve, reject) => {
commit('setLoading', true)
axios.post('/api/auth/login', payload)
.then(res => {
commit('setLoading', false)
if (payload.role == 1) {
iView.LoadingBar.finish()
localStorage.setItem('access_token', res.data.token)
commit('setJwt', res.data.token)
dispatch('checkUser')
} else {
localStorage.setItem('access_token_employer', res.data.token)
commit('setJwtEmployer', res.data.token)
dispatch('checkEmployer')
}
commit('setSnackbar', {
show: true,
color: 'success',
text: 'เข้าสู่ระบบสำเร็จ!'
})
commit('setDialog', false)
resolve(res)
console.log(res)
})
.catch(err => {
iView.LoadingBar.error()
commit('setLoading', false)
if (err.response.data.error === 'invalid_credentials') {
if (payload.role === 1) {
commit('setError', 'อีเมลหรือรหัสผ่านไม่ถูกต้อง')
} else {
commit('setError', 'ชื่อผู้ใช้หรือรหัสผ่านไม่ถูกต้อง')
}
setTimeout(() => {
commit('setError', null)
}, 4000);
}
console.log(err.response)
reject(err.response)
})
})
},
register ({commit}, payload) {
return new Promise((resolve, reject) => {
commit('setLoading', true)
axios.post('/api/auth/register', payload)
.then(res => {
if (payload.role === 1) {
iView.LoadingBar.finish()
}
commit('setLoading', false)
commit('setSnackbar', {
show: true,
color: 'success',
text: 'ลงทะเบียนสำเร็จ!'
})
commit('setDialog', false)
console.log(res)
resolve(res)
})
.catch(err => {
iView.LoadingBar.error()
commit('setLoading', false)
console.log(err.response)
const error = JSON.parse(err.response.data);
if (error.username && error.email) {
commit('setError', 'ชื่อผู้ใช้เเละอีเมลถูกใช้งานเเล้ว')
setTimeout(() => {
commit('setError', null)
}, 4000);
} else if (error.email) {
commit('setError', 'อีเมลนี้ถูกใช้งานเเล้ว')
setTimeout(() => {
commit('setError', null)
}, 4000);
errorMessage = 'อีเมลนี้ถูกใช้งานเเล้ว'
} else if (error.username) {
commit('setError', 'ชื่อผู้ใช้นี้ถูกใช้งานเเล้ว')
setTimeout(() => {
commit('setError', null)
}, 4000);
errorMessage = 'ชื่อผู้ใช้นี้ถูกใช้งานเเล้ว'
}
reject(err.response)
})
})
},
logout ({commit}) {
iView.LoadingBar.finish()
localStorage.removeItem('access_token')
commit('setUser', {
name: null,
email: null
})
commit('setSnackbar', {
show: true,
color: 'success',
text: 'ออกจากระบบสำเร็จ!'
})
},
logoutEmployer ({commit}) {
localStorage.removeItem('access_token_employer')
commit('setEmployer', {
username: null,
company_name: null,
email: null
})
commit('setSnackbar', {
show: true,
color: 'success',
text: 'ออกจากระบบสำเร็จ!'
})
},
checkUser ({commit}) {
if (!!localStorage.getItem('access_token')) {
axios.get('/api/auth/current', {
headers: {
Authorization: `Bearer ${localStorage.getItem('access_token')}`
}
})
.then(res => {
commit('setUser', {
name: res.data.user.name,
email: res.data.user.email_users
})
console.log(res)
})
.catch(err => {
console.log(err.response)
})
}
},
checkEmployer ({commit}) {
if (!!localStorage.getItem('access_token_employer')) {
axios.get('/api/auth/current', {
headers: {
Authorization: `Bearer ${localStorage.getItem('access_token_employer')}`
}
})
.then(res => {
commit('setEmployer', {
username: res.data.user.username,
company_name: res.data.user.company_name,
email: res.data.user.email_employers
})
console.log(res)
})
.catch(err => {
console.log(err.response)
})
}
}
},
getters: {
welcome (state) {
return state.message
},
getJwt (state) {
return state.jwt
},
getJwtEmployer (state) {
return state.jwt_employer;
},
getDialog (state) {
return state.dialog
},
getSnackbar (state) {
return state.snackbar
},
getUser (state) {
return state.user
},
getEmployer (state) {
return state.employer
},
getLoading (state) {
return state.loading
},
getError (state) {
return state.error
}
}
});
import Vue from 'vue';
import Vuex from 'vuex';
import iView from 'iview';
Vue.use(Vuex);
export default new Vuex.Store({
state: {
message: 'Kittisak Maneewong',
user: {
name: null,
email: null
},
employer: {
username: null,
company_name: null,
email: null
},
jwt: localStorage.getItem('access_token') || null,
jwt_employer: localStorage.getItem('access_token_employer') || null,
dialog: false,
snackbar: {
show: false,
color: null,
text: null
},
loading: false,
error: null
},
mutations: {
setJwt (state, payload) {
state.jwt = payload
},
setJwtEmployer (state, payload) {
state.jwt_employer = payload
},
setDialog (state, payload) {
state.dialog = payload
},
setSnackbar (state, payload) {
state.snackbar = payload
},
setUser (state, payload) {
state.user = payload
},
setEmployer (state, payload) {
state.employer = payload
},
setLoading (state, payload) {
state.loading = payload
},
setError (state, payload) {
state.error = payload
}
},
actions: {
login ({commit, dispatch}, payload) {
return new Promise((resolve, reject) => {
commit('setLoading', true)
axios.post('/api/auth/login', payload)
.then(res => {
commit('setLoading', false)
if (payload.role == 1) {
iView.LoadingBar.finish()
localStorage.setItem('access_token', res.data.token)
commit('setJwt', res.data.token)
dispatch('checkUser')
} else {
localStorage.setItem('access_token_employer', res.data.token)
commit('setJwtEmployer', res.data.token)
dispatch('checkEmployer')
}
commit('setSnackbar', {
show: true,
color: 'success',
text: 'เข้าสู่ระบบสำเร็จ!'
})
commit('setDialog', false)
resolve(res)
console.log(res)
})
.catch(err => {
iView.LoadingBar.error()
commit('setLoading', false)
if (err.response.data.error === 'invalid_credentials') {
if (payload.role === 1) {
commit('setError', 'อีเมลหรือรหัสผ่านไม่ถูกต้อง')
} else {
commit('setError', 'ชื่อผู้ใช้หรือรหัสผ่านไม่ถูกต้อง')
}
setTimeout(() => {
commit('setError', null)
}, 4000);
}
console.log(err.response)
reject(err.response)
})
})
},
register ({commit}, payload) {
return new Promise((resolve, reject) => {
commit('setLoading', true)
axios.post('/api/auth/register', payload)
.then(res => {
if (payload.role === 1) {
iView.LoadingBar.finish()
}
commit('setLoading', false)
commit('setSnackbar', {
show: true,
color: 'success',
text: 'ลงทะเบียนสำเร็จ!'
})
commit('setDialog', false)
console.log(res)
resolve(res)
})
.catch(err => {
iView.LoadingBar.error()
commit('setLoading', false)
console.log(err.response)
const error = JSON.parse(err.response.data);
if (error.username && error.email) {
commit('setError', 'ชื่อผู้ใช้เเละอีเมลถูกใช้งานเเล้ว')
setTimeout(() => {
commit('setError', null)
}, 4000);
} else if (error.email) {
commit('setError', 'อีเมลนี้ถูกใช้งานเเล้ว')
setTimeout(() => {
commit('setError', null)
}, 4000);
errorMessage = 'อีเมลนี้ถูกใช้งานเเล้ว'
} else if (error.username) {
commit('setError', 'ชื่อผู้ใช้นี้ถูกใช้งานเเล้ว')
setTimeout(() => {
commit('setError', null)
}, 4000);
errorMessage = 'ชื่อผู้ใช้นี้ถูกใช้งานเเล้ว'
}
reject(err.response)
})
})
},
logout ({commit}) {
iView.LoadingBar.finish()
localStorage.removeItem('access_token')
commit('setUser', {
name: null,
email: null
})
commit('setSnackbar', {
show: true,
color: 'success',
text: 'ออกจากระบบสำเร็จ!'
})
},
logoutEmployer ({commit}) {
localStorage.removeItem('access_token_employer')
commit('setEmployer', {
username: null,
company_name: null,
email: null
})
commit('setSnackbar', {
show: true,
color: 'success',
text: 'ออกจากระบบสำเร็จ!'
})
},
checkUser ({commit}) {
if (!!localStorage.getItem('access_token')) {
axios.get('/api/auth/current', {
headers: {
Authorization: `Bearer ${localStorage.getItem('access_token')}`
}
})
.then(res => {
commit('setUser', {
name: res.data.user.name,
email: res.data.user.email_users
})
console.log(res)
})
.catch(err => {
console.log(err.response)
})
}
},
checkEmployer ({commit}) {
if (!!localStorage.getItem('access_token_employer')) {
axios.get('/api/auth/current', {
headers: {
Authorization: `Bearer ${localStorage.getItem('access_token_employer')}`
}
})
.then(res => {
commit('setEmployer', {
username: res.data.user.username,
company_name: res.data.user.company_name,
email: res.data.user.email_employers
console.log(res)
})
console.log(res)
})
.catch(err => {
console.log(err.response)
})
}
}
},
getters: {
welcome (state) {
return state.message
},
getJwt (state) {
return state.jwt
},
getJwtEmployer (state) {
return state.jwt_employer;
},
getDialog (state) {
return state.dialog
},
getSnackbar (state) {
return state.snackbar
},
getUser (state) {
return state.user
},
getEmployer (state) {
return state.employer
},
getLoading (state) {
return state.loading
},
getError (state) {
return state.error
}
}
});
import Vue from 'vue';
import Vuex from 'vuex';
import iView from 'iview';
Vue.use(Vuex);
export default new Vuex.Store({
state: {
message: 'Kittisak Maneewong',
user: {
name: null,
email: null
},
employer: {
username: null,
company_name: null,
email: null
},
jwt: localStorage.getItem('access_token') || null,
jwt_employer: localStorage.getItem('access_token_employer') || null,
dialog: false,
snackbar: {
show: false,
color: null,
text: null
},
loading: false,
error: null
},
mutations: {
setJwt (state, payload) {
state.jwt = payload
},
setJwtEmployer (state, payload) {
state.jwt_employer = payload
},
setDialog (state, payload) {
state.dialog = payload
},
setSnackbar (state, payload) {
state.snackbar = payload
},
setUser (state, payload) {
state.user = payload
},
setEmployer (state, payload) {
state.employer = payload
},
setLoading (state, payload) {
state.loading = payload
},
setError (state, payload) {
state.error = payload
}
},
actions: {
login ({commit, dispatch}, payload) {
return new Promise((resolve, reject) => {
commit('setLoading', true)
axios.post('/api/auth/login', payload)
.then(res => {
commit('setLoading', false)
if (payload.role == 1) {
iView.LoadingBar.finish()
localStorage.setItem('access_token', res.data.token)
commit('setJwt', res.data.token)
dispatch('checkUser')
} else {
localStorage.setItem('access_token_employer', res.data.token)
commit('setJwtEmployer', res.data.token)
dispatch('checkEmployer')
}
commit('setSnackbar', {
show: true,
color: 'success',
text: 'เข้าสู่ระบบสำเร็จ!'
})
commit('setDialog', false)
resolve(res)
console.log(res)
})
.catch(err => {
iView.LoadingBar.error()
commit('setLoading', false)
if (err.response.data.error === 'invalid_credentials') {
if (payload.role === 1) {
commit('setError', 'อีเมลหรือรหัสผ่านไม่ถูกต้อง')
} else {
commit('setError', 'ชื่อผู้ใช้หรือรหัสผ่านไม่ถูกต้อง')
}
setTimeout(() => {
commit('setError', null)
}, 4000);
}
console.log(err.response)
reject(err.response)
})
})
},
register ({commit}, payload) {
return new Promise((resolve, reject) => {
commit('setLoading', true)
axios.post('/api/auth/register', payload)
.then(res => {
if (payload.role === 1) {
iView.LoadingBar.finish()
}
commit('setLoading', false)
commit('setSnackbar', {
show: true,
color: 'success',
text: 'ลงทะเบียนสำเร็จ!'
})
commit('setDialog', false)
console.log(res)
resolve(res)
})
.catch(err => {
iView.LoadingBar.error()
commit('setLoading', false)
console.log(err.response)
const error = JSON.parse(err.response.data);
if (error.username && error.email) {
commit('setError', 'ชื่อผู้ใช้เเละอีเมลถูกใช้งานเเล้ว')
setTimeout(() => {
commit('setError', null)
}, 4000);
} else if (error.email) {
commit('setError', 'อีเมลนี้ถูกใช้งานเเล้ว')
setTimeout(() => {
commit('setError', null)
}, 4000);
errorMessage = 'อีเมลนี้ถูกใช้งานเเล้ว'
} else if (error.username) {
commit('setError', 'ชื่อผู้ใช้นี้ถูกใช้งานเเล้ว')
setTimeout(() => {
commit('setError', null)
}, 4000);
errorMessage = 'ชื่อผู้ใช้นี้ถูกใช้งานเเล้ว'
}
reject(err.response)
})
})
},
logout ({commit}) {
iView.LoadingBar.finish()
localStorage.removeItem('access_token')
commit('setUser', {
name: null,
email: null
})
commit('setSnackbar', {
show: true,
color: 'success',
text: 'ออกจากระบบสำเร็จ!'
})
},
logoutEmployer ({commit}) {
localStorage.removeItem('access_token_employer')
commit('setEmployer', {
username: null,
company_name: null,
email: null
})
commit('setSnackbar', {
show: true,
color: 'success',
text: 'ออกจากระบบสำเร็จ!'
})
},
checkUser ({commit}) {
if (!!localStorage.getItem('access_token')) {
axios.get('/api/auth/current', {
headers: {
Authorization: `Bearer ${localStorage.getItem('access_token')}`
}
})
.then(res => {
commit('setUser', {
name: res.data.user.name,
email: res.data.user.email_users
})
console.log(res)
})
.catch(err => {
console.log(err.response)
})
}
},
checkEmployer ({commit}) {
if (!!localStorage.getItem('access_token_employer')) {
axios.get('/api/auth/current', {
headers: {
Authorization: `Bearer ${localStorage.getItem('access_token_employer')}`
}
})
.then(res => {
commit('setEmployer', {
username: res.data.user.username,
company_name: res.data.user.company_name,
email: res.data.user.email_employers
})
console.log(res)
})
.catch(err => {
console.log(err.response)
})
}
}
},
getters: {
welcome (state) {
return state.message
},
getJwt (state) {
return state.jwt
},
getJwtEmployer (state) {
return state.jwt_employer;
},
getDialog (state) {
return state.dialog
},
getSnackbar (state) {
return state.snackbar
},
getUser (state) {
return state.user
},
getEmployer (state) {
return state.employer
},
getLoading (state) {
return state.loading
},
getError (state) {
return state.error
}
}
});
import Vue from 'vue';
import Vuex from 'vuex';
import iView from 'iview';
Vue.use(Vuex);
export default new Vuex.Store({
state: {
message: 'Kittisak Maneewong',
user: {
name: null,
email: null
},
employer: {
username: null,
company_name: null,
email: null
},
jwt: localStorage.getItem('access_token') || null,
jwt_employer: localStorage.getItem('access_token_employer') || null,
dialog: false,
snackbar: {
show: false,
color: null,
text: null
},
loading: false,
error: null,
time: ''
},
mutations: {
setJwt (state, payload) {
state.jwt = payload
},
setJwtEmployer (state, payload) {
state.jwt_employer = payload
},
setDialog (state, payload) {
state.dialog = payload
},
setSnackbar (state, payload) {
state.snackbar = payload
},
setUser (state, payload) {
state.user = payload
},
setEmployer (state, payload) {
state.employer = payload
},
setLoading (state, payload) {
state.loading = payload
},
setError (state, payload) {
state.error = payload
},
setTime (state, payload) {
state.time = payload
}
},
actions: {
login ({commit, dispatch}, payload) {
return new Promise((resolve, reject) => {
commit('setLoading', true)
axios.post('/api/auth/login', payload)
.then(res => {
commit('setLoading', false)
if (payload.role == 1) {
iView.LoadingBar.finish()
localStorage.setItem('access_token', res.data.token)
commit('setJwt', res.data.token)
dispatch('checkUser')
} else {
localStorage.setItem('access_token_employer', res.data.token)
commit('setJwtEmployer', res.data.token)
dispatch('checkEmployer')
}
commit('setSnackbar', {
show: true,
color: 'success',
text: 'เข้าสู่ระบบสำเร็จ!'
})
commit('setDialog', false)
resolve(res)
console.log(res)
})
.catch(err => {
iView.LoadingBar.error()
commit('setLoading', false)
if (err.response.data.error === 'invalid_credentials') {
if (payload.role === 1) {
commit('setError', 'อีเมลหรือรหัสผ่านไม่ถูกต้อง')
} else {
commit('setError', 'ชื่อผู้ใช้หรือรหัสผ่านไม่ถูกต้อง')
}
setTimeout(() => {
commit('setError', null)
}, 4000);
}
console.log(err.response)
reject(err.response)
})
})
},
register ({commit}, payload) {
return new Promise((resolve, reject) => {
commit('setLoading', true)
axios.post('/api/auth/register', payload)
.then(res => {
if (payload.role === 1) {
iView.LoadingBar.finish()
}
commit('setLoading', false)
commit('setSnackbar', {
show: true,
color: 'success',
text: 'ลงทะเบียนสำเร็จ!'
})
commit('setDialog', false)
console.log(res)
resolve(res)
})
.catch(err => {
iView.LoadingBar.error()
commit('setLoading', false)
console.log(err.response)
const error = JSON.parse(err.response.data);
if (error.username && error.email) {
commit('setError', 'ชื่อผู้ใช้เเละอีเมลถูกใช้งานเเล้ว')
setTimeout(() => {
commit('setError', null)
}, 4000);
} else if (error.email) {
commit('setError', 'อีเมลนี้ถูกใช้งานเเล้ว')
setTimeout(() => {
commit('setError', null)
}, 4000);
errorMessage = 'อีเมลนี้ถูกใช้งานเเล้ว'
} else if (error.username) {
commit('setError', 'ชื่อผู้ใช้นี้ถูกใช้งานเเล้ว')
setTimeout(() => {
commit('setError', null)
}, 4000);
errorMessage = 'ชื่อผู้ใช้นี้ถูกใช้งานเเล้ว'
}
reject(err.response)
})
})
},
logout ({commit}) {
iView.LoadingBar.finish()
localStorage.removeItem('access_token')
commit('setUser', {
name: null,
email: null
})
commit('setSnackbar', {
show: true,
color: 'success',
text: 'ออกจากระบบสำเร็จ!'
})
},
logoutEmployer ({commit}) {
localStorage.removeItem('access_token_employer')
commit('setEmployer', {
username: null,
company_name: null,
email: null
})
commit('setSnackbar', {
show: true,
color: 'success',
text: 'ออกจากระบบสำเร็จ!'
})
},
checkUser ({commit}) {
if (!!localStorage.getItem('access_token')) {
axios.get('/api/auth/current', {
headers: {
Authorization: `Bearer ${localStorage.getItem('access_token')}`
}
})
.then(res => {
commit('setUser', {
name: res.data.user.name,
email: res.data.user.email_users
})
console.log(res)
})
.catch(err => {
console.log(err.response)
})
}
},
checkEmployer ({commit}) {
if (!!localStorage.getItem('access_token_employer')) {
axios.get('/api/auth/current', {
headers: {
Authorization: `Bearer ${localStorage.getItem('access_token_employer')}`
}
})
.then(res => {
commit('setEmployer', {
username: res.data.user.username,
company_name: res.data.user.company_name,
email: res.data.user.email_employers
})
console.log(res)
})
.catch(err => {
console.log(err.response)
})
}
}
},
getters: {
welcome (state) {
return state.message
},
getJwt (state) {
return state.jwt
},
getJwtEmployer (state) {
return state.jwt_employer;
},
getDialog (state) {
return state.dialog
},
getSnackbar (state) {
return state.snackbar
},
getUser (state) {
return state.user
},
getEmployer (state) {
return state.employer
},
getLoading (state) {
return state.loading
},
getError (state) {
return state.error
},
getTime (state) {
return state.time
}
}
});
import Vue from 'vue';
import Vuex from 'vuex';
import iView from 'iview';
Vue.use(Vuex);
export default new Vuex.Store({
state: {
message: 'Kittisak Maneewong',
user: {
name: null,
email: null
},
employer: {
username: null,
company_name: null,
email: null
},
jwt: localStorage.getItem('access_token') || null,
jwt_employer: localStorage.getItem('access_token_employer') || null,
dialog: false,
snackbar: {
show: false,
color: null,
text: null
},
loading: false,
error: null,
time: ''
},
mutations: {
setJwt (state, payload) {
state.jwt = payload
},
setJwtEmployer (state, payload) {
state.jwt_employer = payload
},
setDialog (state, payload) {
state.dialog = payload
},
setSnackbar (state, payload) {
state.snackbar = payload
},
setUser (state, payload) {
state.user = payload
},
setEmployer (state, payload) {
state.employer = payload
},
setLoading (state, payload) {
state.loading = payload
},
setError (state, payload) {
state.error = payload
},
setTime (state, payload) {
state.time = payload
}
},
actions: {
login ({commit, dispatch}, payload) {
return new Promise((resolve, reject) => {
commit('setLoading', true)
axios.post('/api/auth/login', payload)
.then(res => {
commit('setLoading', false)
if (payload.role == 1) {
iView.LoadingBar.finish()
localStorage.setItem('access_token', res.data.token)
commit('setJwt', res.data.token)
dispatch('checkUser')
} else {
localStorage.setItem('access_token_employer', res.data.token)
commit('setJwtEmployer', res.data.token)
dispatch('checkEmployer')
}
commit('setSnackbar', {
show: true,
color: 'success',
text: 'เข้าสู่ระบบสำเร็จ!'
})
commit('setDialog', false)
resolve(res)
console.log(res)
})
.catch(err => {
iView.LoadingBar.error()
commit('setLoading', false)
if (err.response.data.error === 'invalid_credentials') {
if (payload.role === 1) {
commit('setError', 'อีเมลหรือรหัสผ่านไม่ถูกต้อง')
} else {
commit('setError', 'ชื่อผู้ใช้หรือรหัสผ่านไม่ถูกต้อง')
}
setTimeout(() => {
commit('setError', null)
}, 4000);
}
console.log(err.response)
reject(err.response)
})
})
},
register ({commit}, payload) {
return new Promise((resolve, reject) => {
commit('setLoading', true)
axios.post('/api/auth/register', payload)
.then(res => {
if (payload.role === 1) {
iView.LoadingBar.finish()
}
commit('setLoading', false)
commit('setSnackbar', {
show: true,
color: 'success',
text: 'ลงทะเบียนสำเร็จ!'
})
commit('setDialog', false)
console.log(res)
resolve(res)
})
.catch(err => {
iView.LoadingBar.error()
commit('setLoading', false)
console.log(err.response)
const error = JSON.parse(err.response.data);
if (error.username && error.email) {
commit('setError', 'ชื่อผู้ใช้เเละอีเมลถูกใช้งานเเล้ว')
setTimeout(() => {
commit('setError', null)
}, 4000);
} else if (error.email) {
commit('setError', 'อีเมลนี้ถูกใช้งานเเล้ว')
setTimeout(() => {
commit('setError', null)
}, 4000);
errorMessage = 'อีเมลนี้ถูกใช้งานเเล้ว'
} else if (error.username) {
commit('setError', 'ชื่อผู้ใช้นี้ถูกใช้งานเเล้ว')
setTimeout(() => {
commit('setError', null)
}, 4000);
errorMessage = 'ชื่อผู้ใช้นี้ถูกใช้งานเเล้ว'
}
reject(err.response)
})
})
},
logout ({commit}) {
iView.LoadingBar.finish()
localStorage.removeItem('access_token')
commit('setUser', {
name: null,
email: null
})
commit('setSnackbar', {
show: true,
color: 'success',
text: 'ออกจากระบบสำเร็จ!'
})
},
logoutEmployer ({commit}) {
localStorage.removeItem('access_token_employer')
commit('setEmployer', {
username: null,
company_name: null,
email: null
})
commit('setSnackbar', {
show: true,
color: 'success',
text: 'ออกจากระบบสำเร็จ!'
})
},
checkUser ({commit}) {
if (!!localStorage.getItem('access_token')) {
axios.get('/api/auth/current', {
headers: {
Authorization: `Bearer ${localStorage.getItem('access_token')}`
}
})
.then(res => {
commit('setUser', {
name: res.data.user.name,
email: res.data.user.email_users
})
console.log(res)
})
.catch(err => {
console.log(err.response)
})
}
},
checkEmployer ({commit}) {
if (!!localStorage.getItem('access_token_employer')) {
axios.get('/api/auth/current', {
headers: {
Authorization: `Bearer ${localStorage.getItem('access_token_employer')}`
}
})
.then(res => {
commit('setEmployer', {
username: res.data.user.username,
company_name: res.data.user.company_name,
email: res.data.user.email_employers
})
commit('setTime', res.headers.date)
console.log(res)
})
.catch(err => {
console.log(err.response)
})
}
}
},
getters: {
welcome (state) {
return state.message
},
getJwt (state) {
return state.jwt
},
getJwtEmployer (state) {
return state.jwt_employer;
},
getDialog (state) {
return state.dialog
},
getSnackbar (state) {
return state.snackbar
},
getUser (state) {
return state.user
},
getEmployer (state) {
return state.employer
},
getLoading (state) {
return state.loading
},
getError (state) {
return state.error
},
getTime (state) {
return state.time
}
}
});
import Vue from 'vue';
import Vuex from 'vuex';
import iView from 'iview';
Vue.use(Vuex);
export default new Vuex.Store({
state: {
message: 'Kittisak Maneewong',
user: {
name: null,
email: null
},
employer: {
username: null,
company_name: null,
email: null
},
jwt: localStorage.getItem('access_token') || null,
jwt_employer: localStorage.getItem('access_token_employer') || null,
dialog: false,
snackbar: {
show: false,
color: null,
text: null
},
loading: false,
error: null,
time: ''
},
mutations: {
setJwt (state, payload) {
state.jwt = payload
},
setJwtEmployer (state, payload) {
state.jwt_employer = payload
},
setDialog (state, payload) {
state.dialog = payload
},
setSnackbar (state, payload) {
state.snackbar = payload
},
setUser (state, payload) {
state.user = payload
},
setEmployer (state, payload) {
state.employer = payload
},
setLoading (state, payload) {
state.loading = payload
},
setError (state, payload) {
state.error = payload
},
setTime (state, payload) {
state.time = payload
}
},
actions: {
login ({commit, dispatch}, payload) {
return new Promise((resolve, reject) => {
commit('setLoading', true)
axios.post('/api/auth/login', payload)
.then(res => {
commit('setLoading', false)
if (payload.role == 1) {
iView.LoadingBar.finish()
localStorage.setItem('access_token', res.data.token)
commit('setJwt', res.data.token)
dispatch('checkUser')
} else {
localStorage.setItem('access_token_employer', res.data.token)
commit('setJwtEmployer', res.data.token)
dispatch('checkEmployer')
}
commit('setSnackbar', {
show: true,
color: 'success',
text: 'เข้าสู่ระบบสำเร็จ!'
})
commit('setDialog', false)
resolve(res)
console.log(res)
})
.catch(err => {
iView.LoadingBar.error()
commit('setLoading', false)
if (err.response.data.error === 'invalid_credentials') {
if (payload.role === 1) {
commit('setError', 'อีเมลหรือรหัสผ่านไม่ถูกต้อง')
} else {
commit('setError', 'ชื่อผู้ใช้หรือรหัสผ่านไม่ถูกต้อง')
}
setTimeout(() => {
commit('setError', null)
}, 4000);
}
console.log(err.response)
reject(err.response)
})
})
},
register ({commit}, payload) {
return new Promise((resolve, reject) => {
commit('setLoading', true)
axios.post('/api/auth/register', payload)
.then(res => {
if (payload.role === 1) {
iView.LoadingBar.finish()
}
commit('setLoading', false)
commit('setSnackbar', {
show: true,
color: 'success',
text: 'ลงทะเบียนสำเร็จ!'
})
commit('setDialog', false)
console.log(res)
resolve(res)
})
.catch(err => {
iView.LoadingBar.error()
commit('setLoading', false)
console.log(err.response)
const error = JSON.parse(err.response.data);
if (error.username && error.email) {
commit('setError', 'ชื่อผู้ใช้เเละอีเมลถูกใช้งานเเล้ว')
setTimeout(() => {
commit('setError', null)
}, 4000);
} else if (error.email) {
commit('setError', 'อีเมลนี้ถูกใช้งานเเล้ว')
setTimeout(() => {
commit('setError', null)
}, 4000);
errorMessage = 'อีเมลนี้ถูกใช้งานเเล้ว'
} else if (error.username) {
commit('setError', 'ชื่อผู้ใช้นี้ถูกใช้งานเเล้ว')
setTimeout(() => {
commit('setError', null)
}, 4000);
errorMessage = 'ชื่อผู้ใช้นี้ถูกใช้งานเเล้ว'
}
reject(err.response)
})
})
},
logout ({commit}) {
iView.LoadingBar.finish()
localStorage.removeItem('access_token')
commit('setUser', {
name: null,
email: null
})
commit('setSnackbar', {
show: true,
color: 'success',
text: 'ออกจากระบบสำเร็จ!'
})
},
logoutEmployer ({commit}) {
localStorage.removeItem('access_token_employer')
commit('setEmployer', {
username: null,
company_name: null,
email: null
})
commit('setSnackbar', {
show: true,
color: 'success',
text: 'ออกจากระบบสำเร็จ!'
})
},
checkUser ({commit}) {
if (!!localStorage.getItem('access_token')) {
axios.get('/api/auth/current', {
headers: {
Authorization: `Bearer ${localStorage.getItem('access_token')}`
}
})
.then(res => {
commit('setUser', {
name: res.data.user.name,
email: res.data.user.email_users
})
console.log(res)
})
.catch(err => {
console.log(err.response)
})
}
},
checkEmployer ({commit}) {
if (!!localStorage.getItem('access_token_employer')) {
axios.get('/api/auth/current', {
headers: {
Authorization: `Bearer ${localStorage.getItem('access_token_employer')}`
}
})
.then(res => {
commit('setEmployer', {
username: res.data.user.username,
company_name: res.data.user.company_name,
email: res.data.user.email_employers
})
// commit('setTime', res.headers.date)
const a = res.headers.date.split(',')
console.log(a)
console.log(res)
})
.catch(err => {
console.log(err.response)
})
}
}
},
getters: {
welcome (state) {
return state.message
},
getJwt (state) {
return state.jwt
},
getJwtEmployer (state) {
return state.jwt_employer;
},
getDialog (state) {
return state.dialog
},
getSnackbar (state) {
return state.snackbar
},
getUser (state) {
return state.user
},
getEmployer (state) {
return state.employer
},
getLoading (state) {
return state.loading
},
getError (state) {
return state.error
},
getTime (state) {
return state.time
}
}
});
import Vue from 'vue';
import Vuex from 'vuex';
import iView from 'iview';
Vue.use(Vuex);
export default new Vuex.Store({
state: {
message: 'Kittisak Maneewong',
user: {
name: null,
email: null
},
employer: {
username: null,
company_name: null,
email: null
},
jwt: localStorage.getItem('access_token') || null,
jwt_employer: localStorage.getItem('access_token_employer') || null,
dialog: false,
snackbar: {
show: false,
color: null,
text: null
},
loading: false,
error: null,
time: ''
},
mutations: {
setJwt (state, payload) {
state.jwt = payload
},
setJwtEmployer (state, payload) {
state.jwt_employer = payload
},
setDialog (state, payload) {
state.dialog = payload
},
setSnackbar (state, payload) {
state.snackbar = payload
},
setUser (state, payload) {
state.user = payload
},
setEmployer (state, payload) {
state.employer = payload
},
setLoading (state, payload) {
state.loading = payload
},
setError (state, payload) {
state.error = payload
},
setTime (state, payload) {
state.time = payload
}
},
actions: {
login ({commit, dispatch}, payload) {
return new Promise((resolve, reject) => {
commit('setLoading', true)
axios.post('/api/auth/login', payload)
.then(res => {
commit('setLoading', false)
if (payload.role == 1) {
iView.LoadingBar.finish()
localStorage.setItem('access_token', res.data.token)
commit('setJwt', res.data.token)
dispatch('checkUser')
} else {
localStorage.setItem('access_token_employer', res.data.token)
commit('setJwtEmployer', res.data.token)
dispatch('checkEmployer')
}
commit('setSnackbar', {
show: true,
color: 'success',
text: 'เข้าสู่ระบบสำเร็จ!'
})
commit('setDialog', false)
resolve(res)
console.log(res)
})
.catch(err => {
iView.LoadingBar.error()
commit('setLoading', false)
if (err.response.data.error === 'invalid_credentials') {
if (payload.role === 1) {
commit('setError', 'อีเมลหรือรหัสผ่านไม่ถูกต้อง')
} else {
commit('setError', 'ชื่อผู้ใช้หรือรหัสผ่านไม่ถูกต้อง')
}
setTimeout(() => {
commit('setError', null)
}, 4000);
}
console.log(err.response)
reject(err.response)
})
})
},
register ({commit}, payload) {
return new Promise((resolve, reject) => {
commit('setLoading', true)
axios.post('/api/auth/register', payload)
.then(res => {
if (payload.role === 1) {
iView.LoadingBar.finish()
}
commit('setLoading', false)
commit('setSnackbar', {
show: true,
color: 'success',
text: 'ลงทะเบียนสำเร็จ!'
})
commit('setDialog', false)
console.log(res)
resolve(res)
})
.catch(err => {
iView.LoadingBar.error()
commit('setLoading', false)
console.log(err.response)
const error = JSON.parse(err.response.data);
if (error.username && error.email) {
commit('setError', 'ชื่อผู้ใช้เเละอีเมลถูกใช้งานเเล้ว')
setTimeout(() => {
commit('setError', null)
}, 4000);
} else if (error.email) {
commit('setError', 'อีเมลนี้ถูกใช้งานเเล้ว')
setTimeout(() => {
commit('setError', null)
}, 4000);
errorMessage = 'อีเมลนี้ถูกใช้งานเเล้ว'
} else if (error.username) {
commit('setError', 'ชื่อผู้ใช้นี้ถูกใช้งานเเล้ว')
setTimeout(() => {
commit('setError', null)
}, 4000);
errorMessage = 'ชื่อผู้ใช้นี้ถูกใช้งานเเล้ว'
}
reject(err.response)
})
})
},
logout ({commit}) {
iView.LoadingBar.finish()
localStorage.removeItem('access_token')
commit('setUser', {
name: null,
email: null
})
commit('setSnackbar', {
show: true,
color: 'success',
text: 'ออกจากระบบสำเร็จ!'
})
},
logoutEmployer ({commit}) {
localStorage.removeItem('access_token_employer')
commit('setEmployer', {
username: null,
company_name: null,
email: null
})
commit('setSnackbar', {
show: true,
color: 'success',
text: 'ออกจากระบบสำเร็จ!'
})
},
checkUser ({commit}) {
if (!!localStorage.getItem('access_token')) {
axios.get('/api/auth/current', {
headers: {
Authorization: `Bearer ${localStorage.getItem('access_token')}`
}
})
.then(res => {
commit('setUser', {
name: res.data.user.name,
email: res.data.user.email_users
})
console.log(res)
})
.catch(err => {
console.log(err.response)
})
}
},
checkEmployer ({commit}) {
if (!!localStorage.getItem('access_token_employer')) {
axios.get('/api/auth/current', {
headers: {
Authorization: `Bearer ${localStorage.getItem('access_token_employer')}`
}
})
.then(res => {
commit('setEmployer', {
username: res.data.user.username,
company_name: res.data.user.company_name,
email: res.data.user.email_employers
})
// commit('setTime', res.headers.date)
const a = res.headers.date.split(',')[1].split(' ')
console.log(a)
console.log(res)
})
.catch(err => {
console.log(err.response)
})
}
}
},
getters: {
welcome (state) {
return state.message
},
getJwt (state) {
return state.jwt
},
getJwtEmployer (state) {
return state.jwt_employer;
},
getDialog (state) {
return state.dialog
},
getSnackbar (state) {
return state.snackbar
},
getUser (state) {
return state.user
},
getEmployer (state) {
return state.employer
},
getLoading (state) {
return state.loading
},
getError (state) {
return state.error
},
getTime (state) {
return state.time
}
}
});
import Vue from 'vue';
import Vuex from 'vuex';
import iView from 'iview';
Vue.use(Vuex);
export default new Vuex.Store({
state: {
message: 'Kittisak Maneewong',
user: {
name: null,
email: null
},
employer: {
username: null,
company_name: null,
email: null
},
jwt: localStorage.getItem('access_token') || null,
jwt_employer: localStorage.getItem('access_token_employer') || null,
dialog: false,
snackbar: {
show: false,
color: null,
text: null
},
loading: false,
error: null,
time: ''
},
mutations: {
setJwt (state, payload) {
state.jwt = payload
},
setJwtEmployer (state, payload) {
state.jwt_employer = payload
},
setDialog (state, payload) {
state.dialog = payload
},
setSnackbar (state, payload) {
state.snackbar = payload
},
setUser (state, payload) {
state.user = payload
},
setEmployer (state, payload) {
state.employer = payload
},
setLoading (state, payload) {
state.loading = payload
},
setError (state, payload) {
state.error = payload
},
setTime (state, payload) {
state.time = payload
}
},
actions: {
login ({commit, dispatch}, payload) {
return new Promise((resolve, reject) => {
commit('setLoading', true)
axios.post('/api/auth/login', payload)
.then(res => {
commit('setLoading', false)
if (payload.role == 1) {
iView.LoadingBar.finish()
localStorage.setItem('access_token', res.data.token)
commit('setJwt', res.data.token)
dispatch('checkUser')
} else {
localStorage.setItem('access_token_employer', res.data.token)
commit('setJwtEmployer', res.data.token)
dispatch('checkEmployer')
}
commit('setSnackbar', {
show: true,
color: 'success',
text: 'เข้าสู่ระบบสำเร็จ!'
})
commit('setDialog', false)
resolve(res)
console.log(res)
})
.catch(err => {
iView.LoadingBar.error()
commit('setLoading', false)
if (err.response.data.error === 'invalid_credentials') {
if (payload.role === 1) {
commit('setError', 'อีเมลหรือรหัสผ่านไม่ถูกต้อง')
} else {
commit('setError', 'ชื่อผู้ใช้หรือรหัสผ่านไม่ถูกต้อง')
}
setTimeout(() => {
commit('setError', null)
}, 4000);
}
console.log(err.response)
reject(err.response)
})
})
},
register ({commit}, payload) {
return new Promise((resolve, reject) => {
commit('setLoading', true)
axios.post('/api/auth/register', payload)
.then(res => {
if (payload.role === 1) {
iView.LoadingBar.finish()
}
commit('setLoading', false)
commit('setSnackbar', {
show: true,
color: 'success',
text: 'ลงทะเบียนสำเร็จ!'
})
commit('setDialog', false)
console.log(res)
resolve(res)
})
.catch(err => {
iView.LoadingBar.error()
commit('setLoading', false)
console.log(err.response)
const error = JSON.parse(err.response.data);
if (error.username && error.email) {
commit('setError', 'ชื่อผู้ใช้เเละอีเมลถูกใช้งานเเล้ว')
setTimeout(() => {
commit('setError', null)
}, 4000);
} else if (error.email) {
commit('setError', 'อีเมลนี้ถูกใช้งานเเล้ว')
setTimeout(() => {
commit('setError', null)
}, 4000);
errorMessage = 'อีเมลนี้ถูกใช้งานเเล้ว'
} else if (error.username) {
commit('setError', 'ชื่อผู้ใช้นี้ถูกใช้งานเเล้ว')
setTimeout(() => {
commit('setError', null)
}, 4000);
errorMessage = 'ชื่อผู้ใช้นี้ถูกใช้งานเเล้ว'
}
reject(err.response)
})
})
},
logout ({commit}) {
iView.LoadingBar.finish()
localStorage.removeItem('access_token')
commit('setUser', {
name: null,
email: null
})
commit('setSnackbar', {
show: true,
color: 'success',
text: 'ออกจากระบบสำเร็จ!'
})
},
logoutEmployer ({commit}) {
localStorage.removeItem('access_token_employer')
commit('setEmployer', {
username: null,
company_name: null,
email: null
})
commit('setSnackbar', {
show: true,
color: 'success',
text: 'ออกจากระบบสำเร็จ!'
})
},
checkUser ({commit}) {
if (!!localStorage.getItem('access_token')) {
axios.get('/api/auth/current', {
headers: {
Authorization: `Bearer ${localStorage.getItem('access_token')}`
}
})
.then(res => {
commit('setUser', {
name: res.data.user.name,
email: res.data.user.email_users
})
console.log(res)
})
.catch(err => {
console.log(err.response)
})
}
},
checkEmployer ({commit}) {
if (!!localStorage.getItem('access_token_employer')) {
axios.get('/api/auth/current', {
headers: {
Authorization: `Bearer ${localStorage.getItem('access_token_employer')}`
}
})
.then(res => {
commit('setEmployer', {
username: res.data.user.username,
company_name: res.data.user.company_name,
email: res.data.user.email_employers
})
// commit('setTime', res.headers.date)
const a = res.headers.date.split(',')[1].split(' ')
const date = a[1] + ' ' + a[2] + ' ' +a[3]
console.log(a)
console.log(res)
})
.catch(err => {
console.log(err.response)
})
}
}
},
getters: {
welcome (state) {
return state.message
},
getJwt (state) {
return state.jwt
},
getJwtEmployer (state) {
return state.jwt_employer;
},
getDialog (state) {
return state.dialog
},
getSnackbar (state) {
return state.snackbar
},
getUser (state) {
return state.user
},
getEmployer (state) {
return state.employer
},
getLoading (state) {
return state.loading
},
getError (state) {
return state.error
},
getTime (state) {
return state.time
}
}
});
import Vue from 'vue';
import Vuex from 'vuex';
import iView from 'iview';
Vue.use(Vuex);
export default new Vuex.Store({
state: {
message: 'Kittisak Maneewong',
user: {
name: null,
email: null
},
employer: {
username: null,
company_name: null,
email: null
},
jwt: localStorage.getItem('access_token') || null,
jwt_employer: localStorage.getItem('access_token_employer') || null,
dialog: false,
snackbar: {
show: false,
color: null,
text: null
},
loading: false,
error: null,
time: ''
},
mutations: {
setJwt (state, payload) {
state.jwt = payload
},
setJwtEmployer (state, payload) {
state.jwt_employer = payload
},
setDialog (state, payload) {
state.dialog = payload
},
setSnackbar (state, payload) {
state.snackbar = payload
},
setUser (state, payload) {
state.user = payload
},
setEmployer (state, payload) {
state.employer = payload
},
setLoading (state, payload) {
state.loading = payload
},
setError (state, payload) {
state.error = payload
},
setTime (state, payload) {
state.time = payload
}
},
actions: {
login ({commit, dispatch}, payload) {
return new Promise((resolve, reject) => {
commit('setLoading', true)
axios.post('/api/auth/login', payload)
.then(res => {
commit('setLoading', false)
if (payload.role == 1) {
iView.LoadingBar.finish()
localStorage.setItem('access_token', res.data.token)
commit('setJwt', res.data.token)
dispatch('checkUser')
} else {
localStorage.setItem('access_token_employer', res.data.token)
commit('setJwtEmployer', res.data.token)
dispatch('checkEmployer')
}
commit('setSnackbar', {
show: true,
color: 'success',
text: 'เข้าสู่ระบบสำเร็จ!'
})
commit('setDialog', false)
resolve(res)
console.log(res)
})
.catch(err => {
iView.LoadingBar.error()
commit('setLoading', false)
if (err.response.data.error === 'invalid_credentials') {
if (payload.role === 1) {
commit('setError', 'อีเมลหรือรหัสผ่านไม่ถูกต้อง')
} else {
commit('setError', 'ชื่อผู้ใช้หรือรหัสผ่านไม่ถูกต้อง')
}
setTimeout(() => {
commit('setError', null)
}, 4000);
}
console.log(err.response)
reject(err.response)
})
})
},
register ({commit}, payload) {
return new Promise((resolve, reject) => {
commit('setLoading', true)
axios.post('/api/auth/register', payload)
.then(res => {
if (payload.role === 1) {
iView.LoadingBar.finish()
}
commit('setLoading', false)
commit('setSnackbar', {
show: true,
color: 'success',
text: 'ลงทะเบียนสำเร็จ!'
})
commit('setDialog', false)
console.log(res)
resolve(res)
})
.catch(err => {
iView.LoadingBar.error()
commit('setLoading', false)
console.log(err.response)
const error = JSON.parse(err.response.data);
if (error.username && error.email) {
commit('setError', 'ชื่อผู้ใช้เเละอีเมลถูกใช้งานเเล้ว')
setTimeout(() => {
commit('setError', null)
}, 4000);
} else if (error.email) {
commit('setError', 'อีเมลนี้ถูกใช้งานเเล้ว')
setTimeout(() => {
commit('setError', null)
}, 4000);
errorMessage = 'อีเมลนี้ถูกใช้งานเเล้ว'
} else if (error.username) {
commit('setError', 'ชื่อผู้ใช้นี้ถูกใช้งานเเล้ว')
setTimeout(() => {
commit('setError', null)
}, 4000);
errorMessage = 'ชื่อผู้ใช้นี้ถูกใช้งานเเล้ว'
}
reject(err.response)
})
})
},
logout ({commit}) {
iView.LoadingBar.finish()
localStorage.removeItem('access_token')
commit('setUser', {
name: null,
email: null
})
commit('setSnackbar', {
show: true,
color: 'success',
text: 'ออกจากระบบสำเร็จ!'
})
},
logoutEmployer ({commit}) {
localStorage.removeItem('access_token_employer')
commit('setEmployer', {
username: null,
company_name: null,
email: null
})
commit('setSnackbar', {
show: true,
color: 'success',
text: 'ออกจากระบบสำเร็จ!'
})
},
checkUser ({commit}) {
if (!!localStorage.getItem('access_token')) {
axios.get('/api/auth/current', {
headers: {
Authorization: `Bearer ${localStorage.getItem('access_token')}`
}
})
.then(res => {
commit('setUser', {
name: res.data.user.name,
email: res.data.user.email_users
})
console.log(res)
})
.catch(err => {
console.log(err.response)
})
}
},
checkEmployer ({commit}) {
if (!!localStorage.getItem('access_token_employer')) {
axios.get('/api/auth/current', {
headers: {
Authorization: `Bearer ${localStorage.getItem('access_token_employer')}`
}
})
.then(res => {
commit('setEmployer', {
username: res.data.user.username,
company_name: res.data.user.company_name,
email: res.data.user.email_employers
})
// commit('setTime', res.headers.date)
const a = res.headers.date.split(',')[1].split(' ')
const date = a[1] + ' ' + a[2] + ' ' +a[3]
console.log(date)
console.log(res)
})
.catch(err => {
console.log(err.response)
})
}
}
},
getters: {
welcome (state) {
return state.message
},
getJwt (state) {
return state.jwt
},
getJwtEmployer (state) {
return state.jwt_employer;
},
getDialog (state) {
return state.dialog
},
getSnackbar (state) {
return state.snackbar
},
getUser (state) {
return state.user
},
getEmployer (state) {
return state.employer
},
getLoading (state) {
return state.loading
},
getError (state) {
return state.error
},
getTime (state) {
return state.time
}
}
});
import Vue from 'vue';
import Vuex from 'vuex';
import iView from 'iview';
Vue.use(Vuex);
export default new Vuex.Store({
state: {
message: 'Kittisak Maneewong',
user: {
name: null,
email: null
},
employer: {
username: null,
company_name: null,
email: null
},
jwt: localStorage.getItem('access_token') || null,
jwt_employer: localStorage.getItem('access_token_employer') || null,
dialog: false,
snackbar: {
show: false,
color: null,
text: null
},
loading: false,
error: null,
time: ''
},
mutations: {
setJwt (state, payload) {
state.jwt = payload
},
setJwtEmployer (state, payload) {
state.jwt_employer = payload
},
setDialog (state, payload) {
state.dialog = payload
},
setSnackbar (state, payload) {
state.snackbar = payload
},
setUser (state, payload) {
state.user = payload
},
setEmployer (state, payload) {
state.employer = payload
},
setLoading (state, payload) {
state.loading = payload
},
setError (state, payload) {
state.error = payload
},
setTime (state, payload) {
state.time = payload
}
},
actions: {
login ({commit, dispatch}, payload) {
return new Promise((resolve, reject) => {
commit('setLoading', true)
axios.post('/api/auth/login', payload)
.then(res => {
commit('setLoading', false)
if (payload.role == 1) {
iView.LoadingBar.finish()
localStorage.setItem('access_token', res.data.token)
commit('setJwt', res.data.token)
dispatch('checkUser')
} else {
localStorage.setItem('access_token_employer', res.data.token)
commit('setJwtEmployer', res.data.token)
dispatch('checkEmployer')
}
commit('setSnackbar', {
show: true,
color: 'success',
text: 'เข้าสู่ระบบสำเร็จ!'
})
commit('setDialog', false)
resolve(res)
console.log(res)
})
.catch(err => {
iView.LoadingBar.error()
commit('setLoading', false)
if (err.response.data.error === 'invalid_credentials') {
if (payload.role === 1) {
commit('setError', 'อีเมลหรือรหัสผ่านไม่ถูกต้อง')
} else {
commit('setError', 'ชื่อผู้ใช้หรือรหัสผ่านไม่ถูกต้อง')
}
setTimeout(() => {
commit('setError', null)
}, 4000);
}
console.log(err.response)
reject(err.response)
})
})
},
register ({commit}, payload) {
return new Promise((resolve, reject) => {
commit('setLoading', true)
axios.post('/api/auth/register', payload)
.then(res => {
if (payload.role === 1) {
iView.LoadingBar.finish()
}
commit('setLoading', false)
commit('setSnackbar', {
show: true,
color: 'success',
text: 'ลงทะเบียนสำเร็จ!'
})
commit('setDialog', false)
console.log(res)
resolve(res)
})
.catch(err => {
iView.LoadingBar.error()
commit('setLoading', false)
console.log(err.response)
const error = JSON.parse(err.response.data);
if (error.username && error.email) {
commit('setError', 'ชื่อผู้ใช้เเละอีเมลถูกใช้งานเเล้ว')
setTimeout(() => {
commit('setError', null)
}, 4000);
} else if (error.email) {
commit('setError', 'อีเมลนี้ถูกใช้งานเเล้ว')
setTimeout(() => {
commit('setError', null)
}, 4000);
errorMessage = 'อีเมลนี้ถูกใช้งานเเล้ว'
} else if (error.username) {
commit('setError', 'ชื่อผู้ใช้นี้ถูกใช้งานเเล้ว')
setTimeout(() => {
commit('setError', null)
}, 4000);
errorMessage = 'ชื่อผู้ใช้นี้ถูกใช้งานเเล้ว'
}
reject(err.response)
})
})
},
logout ({commit}) {
iView.LoadingBar.finish()
localStorage.removeItem('access_token')
commit('setUser', {
name: null,
email: null
})
commit('setSnackbar', {
show: true,
color: 'success',
text: 'ออกจากระบบสำเร็จ!'
})
},
logoutEmployer ({commit}) {
localStorage.removeItem('access_token_employer')
commit('setEmployer', {
username: null,
company_name: null,
email: null
})
commit('setSnackbar', {
show: true,
color: 'success',
text: 'ออกจากระบบสำเร็จ!'
})
},
checkUser ({commit}) {
if (!!localStorage.getItem('access_token')) {
axios.get('/api/auth/current', {
headers: {
Authorization: `Bearer ${localStorage.getItem('access_token')}`
}
})
.then(res => {
commit('setUser', {
name: res.data.user.name,
email: res.data.user.email_users
})
console.log(res)
})
.catch(err => {
console.log(err.response)
})
}
},
checkEmployer ({commit}) {
if (!!localStorage.getItem('access_token_employer')) {
axios.get('/api/auth/current', {
headers: {
Authorization: `Bearer ${localStorage.getItem('access_token_employer')}`
}
})
.then(res => {
commit('setEmployer', {
username: res.data.user.username,
company_name: res.data.user.company_name,
email: res.data.user.email_employers
})
// commit('setTime', res.headers.date)
const a = res.headers.date.split(',')[1].split(' ')
console.log(a)
const date = a[1] + ' ' + a[2] + ' ' +a[3]
console.log(date)
console.log(res)
})
.catch(err => {
console.log(err.response)
})
}
}
},
getters: {
welcome (state) {
return state.message
},
getJwt (state) {
return state.jwt
},
getJwtEmployer (state) {
return state.jwt_employer;
},
getDialog (state) {
return state.dialog
},
getSnackbar (state) {
return state.snackbar
},
getUser (state) {
return state.user
},
getEmployer (state) {
return state.employer
},
getLoading (state) {
return state.loading
},
getError (state) {
return state.error
},
getTime (state) {
return state.time
}
}
});
import Vue from 'vue';
import Vuex from 'vuex';
import iView from 'iview';
Vue.use(Vuex);
export default new Vuex.Store({
state: {
message: 'Kittisak Maneewong',
user: {
name: null,
email: null
},
employer: {
username: null,
company_name: null,
email: null
},
jwt: localStorage.getItem('access_token') || null,
jwt_employer: localStorage.getItem('access_token_employer') || null,
dialog: false,
snackbar: {
show: false,
color: null,
text: null
},
loading: false,
error: null,
time: ''
},
mutations: {
setJwt (state, payload) {
state.jwt = payload
},
setJwtEmployer (state, payload) {
state.jwt_employer = payload
},
setDialog (state, payload) {
state.dialog = payload
},
setSnackbar (state, payload) {
state.snackbar = payload
},
setUser (state, payload) {
state.user = payload
},
setEmployer (state, payload) {
state.employer = payload
},
setLoading (state, payload) {
state.loading = payload
},
setError (state, payload) {
state.error = payload
},
setTime (state, payload) {
state.time = payload
}
},
actions: {
login ({commit, dispatch}, payload) {
return new Promise((resolve, reject) => {
commit('setLoading', true)
axios.post('/api/auth/login', payload)
.then(res => {
commit('setLoading', false)
if (payload.role == 1) {
iView.LoadingBar.finish()
localStorage.setItem('access_token', res.data.token)
commit('setJwt', res.data.token)
dispatch('checkUser')
} else {
localStorage.setItem('access_token_employer', res.data.token)
commit('setJwtEmployer', res.data.token)
dispatch('checkEmployer')
}
commit('setSnackbar', {
show: true,
color: 'success',
text: 'เข้าสู่ระบบสำเร็จ!'
})
commit('setDialog', false)
resolve(res)
console.log(res)
})
.catch(err => {
iView.LoadingBar.error()
commit('setLoading', false)
if (err.response.data.error === 'invalid_credentials') {
if (payload.role === 1) {
commit('setError', 'อีเมลหรือรหัสผ่านไม่ถูกต้อง')
} else {
commit('setError', 'ชื่อผู้ใช้หรือรหัสผ่านไม่ถูกต้อง')
}
setTimeout(() => {
commit('setError', null)
}, 4000);
}
console.log(err.response)
reject(err.response)
})
})
},
register ({commit}, payload) {
return new Promise((resolve, reject) => {
commit('setLoading', true)
axios.post('/api/auth/register', payload)
.then(res => {
if (payload.role === 1) {
iView.LoadingBar.finish()
}
commit('setLoading', false)
commit('setSnackbar', {
show: true,
color: 'success',
text: 'ลงทะเบียนสำเร็จ!'
})
commit('setDialog', false)
console.log(res)
resolve(res)
})
.catch(err => {
iView.LoadingBar.error()
commit('setLoading', false)
console.log(err.response)
const error = JSON.parse(err.response.data);
if (error.username && error.email) {
commit('setError', 'ชื่อผู้ใช้เเละอีเมลถูกใช้งานเเล้ว')
setTimeout(() => {
commit('setError', null)
}, 4000);
} else if (error.email) {
commit('setError', 'อีเมลนี้ถูกใช้งานเเล้ว')
setTimeout(() => {
commit('setError', null)
}, 4000);
errorMessage = 'อีเมลนี้ถูกใช้งานเเล้ว'
} else if (error.username) {
commit('setError', 'ชื่อผู้ใช้นี้ถูกใช้งานเเล้ว')
setTimeout(() => {
commit('setError', null)
}, 4000);
errorMessage = 'ชื่อผู้ใช้นี้ถูกใช้งานเเล้ว'
}
reject(err.response)
})
})
},
logout ({commit}) {
iView.LoadingBar.finish()
localStorage.removeItem('access_token')
commit('setUser', {
name: null,
email: null
})
commit('setSnackbar', {
show: true,
color: 'success',
text: 'ออกจากระบบสำเร็จ!'
})
},
logoutEmployer ({commit}) {
localStorage.removeItem('access_token_employer')
commit('setEmployer', {
username: null,
company_name: null,
email: null
})
commit('setSnackbar', {
show: true,
color: 'success',
text: 'ออกจากระบบสำเร็จ!'
})
},
checkUser ({commit}) {
if (!!localStorage.getItem('access_token')) {
axios.get('/api/auth/current', {
headers: {
Authorization: `Bearer ${localStorage.getItem('access_token')}`
}
})
.then(res => {
commit('setUser', {
name: res.data.user.name,
email: res.data.user.email_users
})
console.log(res)
})
.catch(err => {
console.log(err.response)
})
}
},
checkEmployer ({commit}) {
if (!!localStorage.getItem('access_token_employer')) {
axios.get('/api/auth/current', {
headers: {
Authorization: `Bearer ${localStorage.getItem('access_token_employer')}`
}
})
.then(res => {
commit('setEmployer', {
username: res.data.user.username,
company_name: res.data.user.company_name,
email: res.data.user.email_employers
})
// commit('setTime', res.headers.date)
const a = res.headers.date.split(',')[1].split(' ')
const date = a[1] + ' ' + a[2] + ' ' +a[3]
const b = res.headers.date.split(',')[1].split(' ')[4].split(':')
console.log(b)
console.log(date)
console.log(res)
})
.catch(err => {
console.log(err.response)
})
}
}
},
getters: {
welcome (state) {
return state.message
},
getJwt (state) {
return state.jwt
},
getJwtEmployer (state) {
return state.jwt_employer;
},
getDialog (state) {
return state.dialog
},
getSnackbar (state) {
return state.snackbar
},
getUser (state) {
return state.user
},
getEmployer (state) {
return state.employer
},
getLoading (state) {
return state.loading
},
getError (state) {
return state.error
},
getTime (state) {
return state.time
}
}
});
import Vue from 'vue';
import Vuex from 'vuex';
import iView from 'iview';
Vue.use(Vuex);
export default new Vuex.Store({
state: {
message: 'Kittisak Maneewong',
user: {
name: null,
email: null
},
employer: {
username: null,
company_name: null,
email: null
},
jwt: localStorage.getItem('access_token') || null,
jwt_employer: localStorage.getItem('access_token_employer') || null,
dialog: false,
snackbar: {
show: false,
color: null,
text: null
},
loading: false,
error: null,
time: ''
},
mutations: {
setJwt (state, payload) {
state.jwt = payload
},
setJwtEmployer (state, payload) {
state.jwt_employer = payload
},
setDialog (state, payload) {
state.dialog = payload
},
setSnackbar (state, payload) {
state.snackbar = payload
},
setUser (state, payload) {
state.user = payload
},
setEmployer (state, payload) {
state.employer = payload
},
setLoading (state, payload) {
state.loading = payload
},
setError (state, payload) {
state.error = payload
},
setTime (state, payload) {
state.time = payload
}
},
actions: {
login ({commit, dispatch}, payload) {
return new Promise((resolve, reject) => {
commit('setLoading', true)
axios.post('/api/auth/login', payload)
.then(res => {
commit('setLoading', false)
if (payload.role == 1) {
iView.LoadingBar.finish()
localStorage.setItem('access_token', res.data.token)
commit('setJwt', res.data.token)
dispatch('checkUser')
} else {
localStorage.setItem('access_token_employer', res.data.token)
commit('setJwtEmployer', res.data.token)
dispatch('checkEmployer')
}
commit('setSnackbar', {
show: true,
color: 'success',
text: 'เข้าสู่ระบบสำเร็จ!'
})
commit('setDialog', false)
resolve(res)
console.log(res)
})
.catch(err => {
iView.LoadingBar.error()
commit('setLoading', false)
if (err.response.data.error === 'invalid_credentials') {
if (payload.role === 1) {
commit('setError', 'อีเมลหรือรหัสผ่านไม่ถูกต้อง')
} else {
commit('setError', 'ชื่อผู้ใช้หรือรหัสผ่านไม่ถูกต้อง')
}
setTimeout(() => {
commit('setError', null)
}, 4000);
}
console.log(err.response)
reject(err.response)
})
})
},
register ({commit}, payload) {
return new Promise((resolve, reject) => {
commit('setLoading', true)
axios.post('/api/auth/register', payload)
.then(res => {
if (payload.role === 1) {
iView.LoadingBar.finish()
}
commit('setLoading', false)
commit('setSnackbar', {
show: true,
color: 'success',
text: 'ลงทะเบียนสำเร็จ!'
})
commit('setDialog', false)
console.log(res)
resolve(res)
})
.catch(err => {
iView.LoadingBar.error()
commit('setLoading', false)
console.log(err.response)
const error = JSON.parse(err.response.data);
if (error.username && error.email) {
commit('setError', 'ชื่อผู้ใช้เเละอีเมลถูกใช้งานเเล้ว')
setTimeout(() => {
commit('setError', null)
}, 4000);
} else if (error.email) {
commit('setError', 'อีเมลนี้ถูกใช้งานเเล้ว')
setTimeout(() => {
commit('setError', null)
}, 4000);
errorMessage = 'อีเมลนี้ถูกใช้งานเเล้ว'
} else if (error.username) {
commit('setError', 'ชื่อผู้ใช้นี้ถูกใช้งานเเล้ว')
setTimeout(() => {
commit('setError', null)
}, 4000);
errorMessage = 'ชื่อผู้ใช้นี้ถูกใช้งานเเล้ว'
}
reject(err.response)
})
})
},
logout ({commit}) {
iView.LoadingBar.finish()
localStorage.removeItem('access_token')
commit('setUser', {
name: null,
email: null
})
commit('setSnackbar', {
show: true,
color: 'success',
text: 'ออกจากระบบสำเร็จ!'
})
},
logoutEmployer ({commit}) {
localStorage.removeItem('access_token_employer')
commit('setEmployer', {
username: null,
company_name: null,
email: null
})
commit('setSnackbar', {
show: true,
color: 'success',
text: 'ออกจากระบบสำเร็จ!'
})
},
checkUser ({commit}) {
if (!!localStorage.getItem('access_token')) {
axios.get('/api/auth/current', {
headers: {
Authorization: `Bearer ${localStorage.getItem('access_token')}`
}
})
.then(res => {
commit('setUser', {
name: res.data.user.name,
email: res.data.user.email_users
})
console.log(res)
})
.catch(err => {
console.log(err.response)
})
}
},
checkEmployer ({commit}) {
if (!!localStorage.getItem('access_token_employer')) {
axios.get('/api/auth/current', {
headers: {
Authorization: `Bearer ${localStorage.getItem('access_token_employer')}`
}
})
.then(res => {
commit('setEmployer', {
username: res.data.user.username,
company_name: res.data.user.company_name,
email: res.data.user.email_employers
})
// commit('setTime', res.headers.date)
const a = res.headers.date.split(',')[1].split(' ')
const date = a[1] + ' ' + a[2] + ' ' +a[3]
const b = res.headers.date.split(',')[1].split(' ')[4].split(':')
const time = ((b[0]*1 + 7) % 24) +':'+b[1]+':'+b[2]
console.log(time)
console.log(date)
console.log(res)
})
.catch(err => {
console.log(err.response)
})
}
}
},
getters: {
welcome (state) {
return state.message
},
getJwt (state) {
return state.jwt
},
getJwtEmployer (state) {
return state.jwt_employer;
},
getDialog (state) {
return state.dialog
},
getSnackbar (state) {
return state.snackbar
},
getUser (state) {
return state.user
},
getEmployer (state) {
return state.employer
},
getLoading (state) {
return state.loading
},
getError (state) {
return state.error
},
getTime (state) {
return state.time
}
}
});
import Vue from 'vue';
import Vuex from 'vuex';
import iView from 'iview';
Vue.use(Vuex);
export default new Vuex.Store({
state: {
message: 'Kittisak Maneewong',
user: {
name: null,
email: null
},
employer: {
username: null,
company_name: null,
email: null
},
jwt: localStorage.getItem('access_token') || null,
jwt_employer: localStorage.getItem('access_token_employer') || null,
dialog: false,
snackbar: {
show: false,
color: null,
text: null
},
loading: false,
error: null,
time: {
date: '',
time: ''
}
},
mutations: {
setJwt (state, payload) {
state.jwt = payload
},
setJwtEmployer (state, payload) {
state.jwt_employer = payload
},
setDialog (state, payload) {
state.dialog = payload
},
setSnackbar (state, payload) {
state.snackbar = payload
},
setUser (state, payload) {
state.user = payload
},
setEmployer (state, payload) {
state.employer = payload
},
setLoading (state, payload) {
state.loading = payload
},
setError (state, payload) {
state.error = payload
},
setTime (state, payload) {
state.time = payload
}
},
actions: {
login ({commit, dispatch}, payload) {
return new Promise((resolve, reject) => {
commit('setLoading', true)
axios.post('/api/auth/login', payload)
.then(res => {
commit('setLoading', false)
if (payload.role == 1) {
iView.LoadingBar.finish()
localStorage.setItem('access_token', res.data.token)
commit('setJwt', res.data.token)
dispatch('checkUser')
} else {
localStorage.setItem('access_token_employer', res.data.token)
commit('setJwtEmployer', res.data.token)
dispatch('checkEmployer')
}
commit('setSnackbar', {
show: true,
color: 'success',
text: 'เข้าสู่ระบบสำเร็จ!'
})
commit('setDialog', false)
resolve(res)
console.log(res)
})
.catch(err => {
iView.LoadingBar.error()
commit('setLoading', false)
if (err.response.data.error === 'invalid_credentials') {
if (payload.role === 1) {
commit('setError', 'อีเมลหรือรหัสผ่านไม่ถูกต้อง')
} else {
commit('setError', 'ชื่อผู้ใช้หรือรหัสผ่านไม่ถูกต้อง')
}
setTimeout(() => {
commit('setError', null)
}, 4000);
}
console.log(err.response)
reject(err.response)
})
})
},
register ({commit}, payload) {
return new Promise((resolve, reject) => {
commit('setLoading', true)
axios.post('/api/auth/register', payload)
.then(res => {
if (payload.role === 1) {
iView.LoadingBar.finish()
}
commit('setLoading', false)
commit('setSnackbar', {
show: true,
color: 'success',
text: 'ลงทะเบียนสำเร็จ!'
})
commit('setDialog', false)
console.log(res)
resolve(res)
})
.catch(err => {
iView.LoadingBar.error()
commit('setLoading', false)
console.log(err.response)
const error = JSON.parse(err.response.data);
if (error.username && error.email) {
commit('setError', 'ชื่อผู้ใช้เเละอีเมลถูกใช้งานเเล้ว')
setTimeout(() => {
commit('setError', null)
}, 4000);
} else if (error.email) {
commit('setError', 'อีเมลนี้ถูกใช้งานเเล้ว')
setTimeout(() => {
commit('setError', null)
}, 4000);
errorMessage = 'อีเมลนี้ถูกใช้งานเเล้ว'
} else if (error.username) {
commit('setError', 'ชื่อผู้ใช้นี้ถูกใช้งานเเล้ว')
setTimeout(() => {
commit('setError', null)
}, 4000);
errorMessage = 'ชื่อผู้ใช้นี้ถูกใช้งานเเล้ว'
}
reject(err.response)
})
})
},
logout ({commit}) {
iView.LoadingBar.finish()
localStorage.removeItem('access_token')
commit('setUser', {
name: null,
email: null
})
commit('setSnackbar', {
show: true,
color: 'success',
text: 'ออกจากระบบสำเร็จ!'
})
},
logoutEmployer ({commit}) {
localStorage.removeItem('access_token_employer')
commit('setEmployer', {
username: null,
company_name: null,
email: null
})
commit('setSnackbar', {
show: true,
color: 'success',
text: 'ออกจากระบบสำเร็จ!'
})
},
checkUser ({commit}) {
if (!!localStorage.getItem('access_token')) {
axios.get('/api/auth/current', {
headers: {
Authorization: `Bearer ${localStorage.getItem('access_token')}`
}
})
.then(res => {
commit('setUser', {
name: res.data.user.name,
email: res.data.user.email_users
})
console.log(res)
})
.catch(err => {
console.log(err.response)
})
}
},
checkEmployer ({commit}) {
if (!!localStorage.getItem('access_token_employer')) {
axios.get('/api/auth/current', {
headers: {
Authorization: `Bearer ${localStorage.getItem('access_token_employer')}`
}
})
.then(res => {
commit('setEmployer', {
username: res.data.user.username,
company_name: res.data.user.company_name,
email: res.data.user.email_employers
})
// commit('setTime', res.headers.date)
const a = res.headers.date.split(',')[1].split(' ')
const date = a[1] + ' ' + a[2] + ' ' +a[3]
const b = res.headers.date.split(',')[1].split(' ')[4].split(':')
const time = ((b[0]*1 + 7) % 24) +':'+b[1]+':'+b[2]
commit('setTime', {
date: date,
time: time
})
console.log(res)
})
.catch(err => {
console.log(err.response)
})
}
}
},
getters: {
welcome (state) {
return state.message
},
getJwt (state) {
return state.jwt
},
getJwtEmployer (state) {
return state.jwt_employer;
},
getDialog (state) {
return state.dialog
},
getSnackbar (state) {
return state.snackbar
},
getUser (state) {
return state.user
},
getEmployer (state) {
return state.employer
},
getLoading (state) {
return state.loading
},
getError (state) {
return state.error
},
getTime (state) {
return state.time
}
}
});
<template>
<div>
<v-layout row wrap class="bodyborder pa-3">
<v-flex xs12 sm12 >
<span class=" subheading font-weight-bold teal--text"><v-icon color="teal">business</v-icon> ข้อมูลบริษัท</span>
<v-divider ></v-divider>
</v-flex>
<v-layout row wrap class="pa-3">
<v-flex sm2 xs12 class="text-sm-center text-xs-center">
<img src="https://www.jobbkk.com/upload/employer/0A/86A/00786A/images/308262.png" alt="" height="160">
</v-flex>
<v-flex xs12 sm10 class="px-3">
<v-flex xs12 sm12>
<label class="font-weight-bold subheading green--text">บริษัท พีพี ออนไทม์ จำกัด</label>
</v-flex>
<v-flex xs12 sm12>
<label class="body-2">1011 อาคารศุภาลัย แกรนด์ ทาวเวอร์ ชั้น 16 ถนนพระราม 3 แขวงช่องนนทรี เขตยานนาวา จังหวัดกรุงเทพมหานคร 10120</label>
</v-flex>
<v-flex xs12 sm12 class="mt-1">
<label class="caption"><v-icon small>email</v-icon> kittipong.ma.59@ubu.ac.th</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>desktop_mac</v-icon> http://www.pp-ontime.co.th/</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>phone</v-icon> โทร. 02-056-2099</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>print</v-icon> แฟกซ์. : 02-056-2088</label>
</v-flex>
<v-flex xs12 sm12>
<v-btn small depressed dark color="red">
<v-icon dark >settings</v-icon> แก้ไขข้อมูล
</v-btn>
</v-flex>
</v-flex>
</v-layout>
</v-layout>
</div>
</template>
<style lang="scss" scoped>
.bodyborder{
border: 1px solid #dcdcdc;
border-radius: 3px;
}
</style>
<template>
<div>
<v-layout row wrap class="bodyborder pa-3">
<v-flex xs12 sm12 >
<span class=" subheading font-weight-bold teal--text"><v-icon color="teal">business</v-icon> ข้อมูลบริษัท</span>
<v-divider ></v-divider>
</v-flex>
<v-layout row wrap class="pa-3">
<v-flex sm2 xs12 class="text-sm-center text-xs-center">
<img src="https://www.jobbkk.com/upload/employer/0A/86A/00786A/images/308262.png" alt="" height="160">
</v-flex>
<v-flex xs12 sm10 class="px-3">
<v-flex xs12 sm12>
<label class="font-weight-bold subheading green--text">บริษัท พีพี ออนไทม์ จำกัด</label>
</v-flex>
<v-flex xs12 sm12>
<label class="body-2">1011 อาคารศุภาลัย แกรนด์ ทาวเวอร์ ชั้น 16 ถนนพระราม 3 แขวงช่องนนทรี เขตยานนาวา จังหวัดกรุงเทพมหานคร 10120</label>
</v-flex>
<v-flex xs12 sm12 class="mt-1">
<label class="caption"><v-icon small>email</v-icon> kittipong.ma.59@ubu.ac.th</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>desktop_mac</v-icon> http://www.pp-ontime.co.th/</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>phone</v-icon> โทร. 02-056-2099</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>print</v-icon> แฟกซ์. : 02-056-2088</label>
</v-flex>
<v-flex xs12 sm12>
<v-btn small depressed dark color="red">
<v-icon dark >settings</v-icon> แก้ไขข้อมูล
</v-btn>
</v-flex>
</v-flex>
</v-layout>
<v-flex xs12 sm12 >
<span class=" subheading font-weight-bold teal--text"><v-icon color="teal">business</v-icon> ข้อมูลบริษัท</span>
<v-divider ></v-divider>
</v-flex>
</v-layout>
</div>
</template>
<style lang="scss" scoped>
.bodyborder{
border: 1px solid #dcdcdc;
border-radius: 3px;
}
</style>
<template>
<div>
<v-layout row wrap class="bodyborder pa-3">
<v-flex xs12 sm12 >
<span class=" subheading font-weight-bold teal--text"><v-icon color="teal">business</v-icon> ข้อมูลบริษัท</span>
<v-divider ></v-divider>
</v-flex>
<v-layout row wrap class="pa-3">
<v-flex sm2 xs12 class="text-sm-center text-xs-center">
<img src="https://www.jobbkk.com/upload/employer/0A/86A/00786A/images/308262.png" alt="" height="160">
</v-flex>
<v-flex xs12 sm10 class="px-3">
<v-flex xs12 sm12>
<label class="font-weight-bold subheading green--text">บริษัท พีพี ออนไทม์ จำกัด</label>
</v-flex>
<v-flex xs12 sm12>
<label class="body-2">1011 อาคารศุภาลัย แกรนด์ ทาวเวอร์ ชั้น 16 ถนนพระราม 3 แขวงช่องนนทรี เขตยานนาวา จังหวัดกรุงเทพมหานคร 10120</label>
</v-flex>
<v-flex xs12 sm12 class="mt-1">
<label class="caption"><v-icon small>email</v-icon> kittipong.ma.59@ubu.ac.th</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>desktop_mac</v-icon> http://www.pp-ontime.co.th/</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>phone</v-icon> โทร. 02-056-2099</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>print</v-icon> แฟกซ์. : 02-056-2088</label>
</v-flex>
<v-flex xs12 sm12>
<v-btn small depressed dark color="red">
<v-icon dark >settings</v-icon> แก้ไขข้อมูล
</v-btn>
</v-flex>
</v-flex>
</v-layout>
<v-flex xs12 sm12 >
<span class=" subheading font-weight-bold teal--text"><v-icon color="teal">person_pin</v-icon> ข้อมูลบริษัท</span>
<v-divider ></v-divider>
</v-flex>
</v-layout>
</div>
</template>
<style lang="scss" scoped>
.bodyborder{
border: 1px solid #dcdcdc;
border-radius: 3px;
}
</style>
<template>
<div>
<v-layout row wrap class="bodyborder pa-3">
<v-flex xs12 sm12 >
<span class=" subheading font-weight-bold teal--text"><v-icon color="teal">business</v-icon> ข้อมูลบริษัท</span>
<v-divider ></v-divider>
</v-flex>
<v-layout row wrap class="pa-3">
<v-flex sm2 xs12 class="text-sm-center text-xs-center">
<img src="https://www.jobbkk.com/upload/employer/0A/86A/00786A/images/308262.png" alt="" height="160">
</v-flex>
<v-flex xs12 sm10 class="px-3">
<v-flex xs12 sm12>
<label class="font-weight-bold subheading green--text">บริษัท พีพี ออนไทม์ จำกัด</label>
</v-flex>
<v-flex xs12 sm12>
<label class="body-2">1011 อาคารศุภาลัย แกรนด์ ทาวเวอร์ ชั้น 16 ถนนพระราม 3 แขวงช่องนนทรี เขตยานนาวา จังหวัดกรุงเทพมหานคร 10120</label>
</v-flex>
<v-flex xs12 sm12 class="mt-1">
<label class="caption"><v-icon small>email</v-icon> kittipong.ma.59@ubu.ac.th</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>desktop_mac</v-icon> http://www.pp-ontime.co.th/</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>phone</v-icon> โทร. 02-056-2099</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>print</v-icon> แฟกซ์. : 02-056-2088</label>
</v-flex>
<v-flex xs12 sm12>
<v-btn small depressed dark color="red">
<v-icon dark >settings</v-icon> แก้ไขข้อมูล
</v-btn>
</v-flex>
</v-flex>
</v-layout>
<v-flex xs12 sm12 >
<span class=" subheading font-weight-bold teal--text"><v-icon color="teal">person_pin</v-icon> แก้ไขข้อมูลผู้ใช้</span>
<v-divider ></v-divider>
</v-flex>
</v-layout>
</div>
</template>
<style lang="scss" scoped>
.bodyborder{
border: 1px solid #dcdcdc;
border-radius: 3px;
}
</style>
<template>
<div>
<v-layout row wrap class="bodyborder pa-3">
<v-flex xs12 sm12 >
<span class=" subheading font-weight-bold teal--text"><v-icon color="teal">business</v-icon> ข้อมูลบริษัท</span>
<v-divider ></v-divider>
</v-flex>
<v-layout row wrap class="pa-3">
<v-flex sm2 xs12 class="text-sm-center text-xs-center">
<img src="https://www.jobbkk.com/upload/employer/0A/86A/00786A/images/308262.png" alt="" height="160">
</v-flex>
<v-flex xs12 sm10 class="px-3">
<v-flex xs12 sm12>
<label class="font-weight-bold subheading green--text">บริษัท พีพี ออนไทม์ จำกัด</label>
</v-flex>
<v-flex xs12 sm12>
<label class="body-2">1011 อาคารศุภาลัย แกรนด์ ทาวเวอร์ ชั้น 16 ถนนพระราม 3 แขวงช่องนนทรี เขตยานนาวา จังหวัดกรุงเทพมหานคร 10120</label>
</v-flex>
<v-flex xs12 sm12 class="mt-1">
<label class="caption"><v-icon small>email</v-icon> kittipong.ma.59@ubu.ac.th</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>desktop_mac</v-icon> http://www.pp-ontime.co.th/</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>phone</v-icon> โทร. 02-056-2099</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>print</v-icon> แฟกซ์. : 02-056-2088</label>
</v-flex>
<v-flex xs12 sm12>
<v-btn small depressed dark color="red">
<v-icon dark >settings</v-icon> แก้ไขข้อมูล
</v-btn>
</v-flex>
</v-flex>
</v-layout>
<v-flex xs12 sm12 >
<span class=" subheading font-weight-bold teal--text"><v-icon color="teal">person_pin</v-icon> การตั้งค่าบัญชีผู้ใช้</span>
<v-divider ></v-divider>
</v-flex>
</v-layout>
</div>
</template>
<style lang="scss" scoped>
.bodyborder{
border: 1px solid #dcdcdc;
border-radius: 3px;
}
</style>
<template>
<div>
<v-layout row wrap class="bodyborder pa-3">
<v-flex xs12 sm12 >
<span class=" subheading font-weight-bold teal--text"><v-icon color="teal">person_pin</v-icon> การตั้งค่าบัญชีผู้ใช้</span>
<v-divider ></v-divider>
</v-flex>
<v-flex xs12 sm12 >
<span class=" subheading font-weight-bold teal--text"><v-icon color="teal">business</v-icon> ข้อมูลบริษัท</span>
<v-divider ></v-divider>
</v-flex>
<v-layout row wrap class="pa-3">
<v-flex sm2 xs12 class="text-sm-center text-xs-center">
<img src="https://www.jobbkk.com/upload/employer/0A/86A/00786A/images/308262.png" alt="" height="160">
</v-flex>
<v-flex xs12 sm10 class="px-3">
<v-flex xs12 sm12>
<label class="font-weight-bold subheading green--text">บริษัท พีพี ออนไทม์ จำกัด</label>
</v-flex>
<v-flex xs12 sm12>
<label class="body-2">1011 อาคารศุภาลัย แกรนด์ ทาวเวอร์ ชั้น 16 ถนนพระราม 3 แขวงช่องนนทรี เขตยานนาวา จังหวัดกรุงเทพมหานคร 10120</label>
</v-flex>
<v-flex xs12 sm12 class="mt-1">
<label class="caption"><v-icon small>email</v-icon> kittipong.ma.59@ubu.ac.th</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>desktop_mac</v-icon> http://www.pp-ontime.co.th/</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>phone</v-icon> โทร. 02-056-2099</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>print</v-icon> แฟกซ์. : 02-056-2088</label>
</v-flex>
<v-flex xs12 sm12>
<v-btn small depressed dark color="red">
<v-icon dark >settings</v-icon> แก้ไขข้อมูล
</v-btn>
</v-flex>
</v-flex>
</v-layout>
</v-layout>
</div>
</template>
<style lang="scss" scoped>
.bodyborder{
border: 1px solid #dcdcdc;
border-radius: 3px;
}
</style>
<template>
<div>
<v-layout row wrap class="bodyborder pa-3">
</v-layout>
<v-layout row wrap class="bodyborder pa-3">
<v-flex xs12 sm12 >
<span class=" subheading font-weight-bold teal--text"><v-icon color="teal">person_pin</v-icon> การตั้งค่าบัญชีผู้ใช้</span>
<v-divider ></v-divider>
</v-flex>
<v-flex xs12 sm12 >
<span class=" subheading font-weight-bold teal--text"><v-icon color="teal">business</v-icon> ข้อมูลบริษัท</span>
<v-divider ></v-divider>
</v-flex>
<v-layout row wrap class="pa-3">
<v-flex sm2 xs12 class="text-sm-center text-xs-center">
<img src="https://www.jobbkk.com/upload/employer/0A/86A/00786A/images/308262.png" alt="" height="160">
</v-flex>
<v-flex xs12 sm10 class="px-3">
<v-flex xs12 sm12>
<label class="font-weight-bold subheading green--text">บริษัท พีพี ออนไทม์ จำกัด</label>
</v-flex>
<v-flex xs12 sm12>
<label class="body-2">1011 อาคารศุภาลัย แกรนด์ ทาวเวอร์ ชั้น 16 ถนนพระราม 3 แขวงช่องนนทรี เขตยานนาวา จังหวัดกรุงเทพมหานคร 10120</label>
</v-flex>
<v-flex xs12 sm12 class="mt-1">
<label class="caption"><v-icon small>email</v-icon> kittipong.ma.59@ubu.ac.th</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>desktop_mac</v-icon> http://www.pp-ontime.co.th/</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>phone</v-icon> โทร. 02-056-2099</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>print</v-icon> แฟกซ์. : 02-056-2088</label>
</v-flex>
<v-flex xs12 sm12>
<v-btn small depressed dark color="red">
<v-icon dark >settings</v-icon> แก้ไขข้อมูล
</v-btn>
</v-flex>
</v-flex>
</v-layout>
</v-layout>
</div>
</template>
<style lang="scss" scoped>
.bodyborder{
border: 1px solid #dcdcdc;
border-radius: 3px;
}
</style>
<template>
<div>
<v-layout row wrap class="bodyborder pa-3">
<v-flex xs12 sm12>
</v-flex>
</v-layout>
<v-layout row wrap class="bodyborder pa-3">
<v-flex xs12 sm12 >
<span class=" subheading font-weight-bold teal--text"><v-icon color="teal">person_pin</v-icon> การตั้งค่าบัญชีผู้ใช้</span>
<v-divider ></v-divider>
</v-flex>
<v-flex xs12 sm12 >
<span class=" subheading font-weight-bold teal--text"><v-icon color="teal">business</v-icon> ข้อมูลบริษัท</span>
<v-divider ></v-divider>
</v-flex>
<v-layout row wrap class="pa-3">
<v-flex sm2 xs12 class="text-sm-center text-xs-center">
<img src="https://www.jobbkk.com/upload/employer/0A/86A/00786A/images/308262.png" alt="" height="160">
</v-flex>
<v-flex xs12 sm10 class="px-3">
<v-flex xs12 sm12>
<label class="font-weight-bold subheading green--text">บริษัท พีพี ออนไทม์ จำกัด</label>
</v-flex>
<v-flex xs12 sm12>
<label class="body-2">1011 อาคารศุภาลัย แกรนด์ ทาวเวอร์ ชั้น 16 ถนนพระราม 3 แขวงช่องนนทรี เขตยานนาวา จังหวัดกรุงเทพมหานคร 10120</label>
</v-flex>
<v-flex xs12 sm12 class="mt-1">
<label class="caption"><v-icon small>email</v-icon> kittipong.ma.59@ubu.ac.th</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>desktop_mac</v-icon> http://www.pp-ontime.co.th/</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>phone</v-icon> โทร. 02-056-2099</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>print</v-icon> แฟกซ์. : 02-056-2088</label>
</v-flex>
<v-flex xs12 sm12>
<v-btn small depressed dark color="red">
<v-icon dark >settings</v-icon> แก้ไขข้อมูล
</v-btn>
</v-flex>
</v-flex>
</v-layout>
</v-layout>
</div>
</template>
<style lang="scss" scoped>
.bodyborder{
border: 1px solid #dcdcdc;
border-radius: 3px;
}
</style>
<template>
<div>
<v-layout row wrap class="bodyborder pa-3">
<v-flex xs12 sm12>
ยินดีต้อนรับ
</v-flex>
</v-layout>
<v-layout row wrap class="bodyborder pa-3">
<v-flex xs12 sm12 >
<span class=" subheading font-weight-bold teal--text"><v-icon color="teal">person_pin</v-icon> การตั้งค่าบัญชีผู้ใช้</span>
<v-divider ></v-divider>
</v-flex>
<v-flex xs12 sm12 >
<span class=" subheading font-weight-bold teal--text"><v-icon color="teal">business</v-icon> ข้อมูลบริษัท</span>
<v-divider ></v-divider>
</v-flex>
<v-layout row wrap class="pa-3">
<v-flex sm2 xs12 class="text-sm-center text-xs-center">
<img src="https://www.jobbkk.com/upload/employer/0A/86A/00786A/images/308262.png" alt="" height="160">
</v-flex>
<v-flex xs12 sm10 class="px-3">
<v-flex xs12 sm12>
<label class="font-weight-bold subheading green--text">บริษัท พีพี ออนไทม์ จำกัด</label>
</v-flex>
<v-flex xs12 sm12>
<label class="body-2">1011 อาคารศุภาลัย แกรนด์ ทาวเวอร์ ชั้น 16 ถนนพระราม 3 แขวงช่องนนทรี เขตยานนาวา จังหวัดกรุงเทพมหานคร 10120</label>
</v-flex>
<v-flex xs12 sm12 class="mt-1">
<label class="caption"><v-icon small>email</v-icon> kittipong.ma.59@ubu.ac.th</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>desktop_mac</v-icon> http://www.pp-ontime.co.th/</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>phone</v-icon> โทร. 02-056-2099</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>print</v-icon> แฟกซ์. : 02-056-2088</label>
</v-flex>
<v-flex xs12 sm12>
<v-btn small depressed dark color="red">
<v-icon dark >settings</v-icon> แก้ไขข้อมูล
</v-btn>
</v-flex>
</v-flex>
</v-layout>
</v-layout>
</div>
</template>
<style lang="scss" scoped>
.bodyborder{
border: 1px solid #dcdcdc;
border-radius: 3px;
}
</style>
<template>
<div>
<v-layout row wrap class="bodyborder pa-3 mb-2">
<v-flex xs12 sm12>
ยินดีต้อนรับ
</v-flex>
</v-layout>
<v-layout row wrap class="bodyborder pa-3">
<v-flex xs12 sm12 >
<span class=" subheading font-weight-bold teal--text"><v-icon color="teal">person_pin</v-icon> การตั้งค่าบัญชีผู้ใช้</span>
<v-divider ></v-divider>
</v-flex>
<v-flex xs12 sm12 >
<span class=" subheading font-weight-bold teal--text"><v-icon color="teal">business</v-icon> ข้อมูลบริษัท</span>
<v-divider ></v-divider>
</v-flex>
<v-layout row wrap class="pa-3">
<v-flex sm2 xs12 class="text-sm-center text-xs-center">
<img src="https://www.jobbkk.com/upload/employer/0A/86A/00786A/images/308262.png" alt="" height="160">
</v-flex>
<v-flex xs12 sm10 class="px-3">
<v-flex xs12 sm12>
<label class="font-weight-bold subheading green--text">บริษัท พีพี ออนไทม์ จำกัด</label>
</v-flex>
<v-flex xs12 sm12>
<label class="body-2">1011 อาคารศุภาลัย แกรนด์ ทาวเวอร์ ชั้น 16 ถนนพระราม 3 แขวงช่องนนทรี เขตยานนาวา จังหวัดกรุงเทพมหานคร 10120</label>
</v-flex>
<v-flex xs12 sm12 class="mt-1">
<label class="caption"><v-icon small>email</v-icon> kittipong.ma.59@ubu.ac.th</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>desktop_mac</v-icon> http://www.pp-ontime.co.th/</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>phone</v-icon> โทร. 02-056-2099</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>print</v-icon> แฟกซ์. : 02-056-2088</label>
</v-flex>
<v-flex xs12 sm12>
<v-btn small depressed dark color="red">
<v-icon dark >settings</v-icon> แก้ไขข้อมูล
</v-btn>
</v-flex>
</v-flex>
</v-layout>
</v-layout>
</div>
</template>
<style lang="scss" scoped>
.bodyborder{
border: 1px solid #dcdcdc;
border-radius: 3px;
}
</style>
<template>
<div>
<v-layout row wrap class="bodyborder pa-3 mb-2">
<v-flex xs12 sm12>
ยินดีต้อนรับ
</v-flex>
<v-flex xs12 sm12>
ยินดีต้อนรับ
</v-flex>
</v-layout>
<v-layout row wrap class="bodyborder pa-3">
<v-flex xs12 sm12 >
<span class=" subheading font-weight-bold teal--text"><v-icon color="teal">person_pin</v-icon> การตั้งค่าบัญชีผู้ใช้</span>
<v-divider ></v-divider>
</v-flex>
<v-flex xs12 sm12 >
<span class=" subheading font-weight-bold teal--text"><v-icon color="teal">business</v-icon> ข้อมูลบริษัท</span>
<v-divider ></v-divider>
</v-flex>
<v-layout row wrap class="pa-3">
<v-flex sm2 xs12 class="text-sm-center text-xs-center">
<img src="https://www.jobbkk.com/upload/employer/0A/86A/00786A/images/308262.png" alt="" height="160">
</v-flex>
<v-flex xs12 sm10 class="px-3">
<v-flex xs12 sm12>
<label class="font-weight-bold subheading green--text">บริษัท พีพี ออนไทม์ จำกัด</label>
</v-flex>
<v-flex xs12 sm12>
<label class="body-2">1011 อาคารศุภาลัย แกรนด์ ทาวเวอร์ ชั้น 16 ถนนพระราม 3 แขวงช่องนนทรี เขตยานนาวา จังหวัดกรุงเทพมหานคร 10120</label>
</v-flex>
<v-flex xs12 sm12 class="mt-1">
<label class="caption"><v-icon small>email</v-icon> kittipong.ma.59@ubu.ac.th</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>desktop_mac</v-icon> http://www.pp-ontime.co.th/</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>phone</v-icon> โทร. 02-056-2099</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>print</v-icon> แฟกซ์. : 02-056-2088</label>
</v-flex>
<v-flex xs12 sm12>
<v-btn small depressed dark color="red">
<v-icon dark >settings</v-icon> แก้ไขข้อมูล
</v-btn>
</v-flex>
</v-flex>
</v-layout>
</v-layout>
</div>
</template>
<style lang="scss" scoped>
.bodyborder{
border: 1px solid #dcdcdc;
border-radius: 3px;
}
</style>
<template>
<div>
<v-layout row wrap class="bodyborder pa-3 mb-2">
<v-flex xs12 sm12>
ยินดีต้อนรับ
</v-flex>
<v-flex xs12 sm12>
Kittipong Maneewong
</v-flex>
</v-layout>
<v-layout row wrap class="bodyborder pa-3">
<v-flex xs12 sm12 >
<span class=" subheading font-weight-bold teal--text"><v-icon color="teal">person_pin</v-icon> การตั้งค่าบัญชีผู้ใช้</span>
<v-divider ></v-divider>
</v-flex>
<v-flex xs12 sm12 >
<span class=" subheading font-weight-bold teal--text"><v-icon color="teal">business</v-icon> ข้อมูลบริษัท</span>
<v-divider ></v-divider>
</v-flex>
<v-layout row wrap class="pa-3">
<v-flex sm2 xs12 class="text-sm-center text-xs-center">
<img src="https://www.jobbkk.com/upload/employer/0A/86A/00786A/images/308262.png" alt="" height="160">
</v-flex>
<v-flex xs12 sm10 class="px-3">
<v-flex xs12 sm12>
<label class="font-weight-bold subheading green--text">บริษัท พีพี ออนไทม์ จำกัด</label>
</v-flex>
<v-flex xs12 sm12>
<label class="body-2">1011 อาคารศุภาลัย แกรนด์ ทาวเวอร์ ชั้น 16 ถนนพระราม 3 แขวงช่องนนทรี เขตยานนาวา จังหวัดกรุงเทพมหานคร 10120</label>
</v-flex>
<v-flex xs12 sm12 class="mt-1">
<label class="caption"><v-icon small>email</v-icon> kittipong.ma.59@ubu.ac.th</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>desktop_mac</v-icon> http://www.pp-ontime.co.th/</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>phone</v-icon> โทร. 02-056-2099</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>print</v-icon> แฟกซ์. : 02-056-2088</label>
</v-flex>
<v-flex xs12 sm12>
<v-btn small depressed dark color="red">
<v-icon dark >settings</v-icon> แก้ไขข้อมูล
</v-btn>
</v-flex>
</v-flex>
</v-layout>
</v-layout>
</div>
</template>
<style lang="scss" scoped>
.bodyborder{
border: 1px solid #dcdcdc;
border-radius: 3px;
}
</style>
<template>
<div>
<v-layout row wrap class="bodyborder pa-3 mb-2">
<v-flex xs12 sm12>
ยินดีต้อนรับ
</v-flex>
<v-flex xs12 sm12 class="font-weight-bold">
Kittipong Maneewong
</v-flex>
</v-layout>
<v-layout row wrap class="bodyborder pa-3">
<v-flex xs12 sm12 >
<span class=" subheading font-weight-bold teal--text"><v-icon color="teal">person_pin</v-icon> การตั้งค่าบัญชีผู้ใช้</span>
<v-divider ></v-divider>
</v-flex>
<v-flex xs12 sm12 >
<span class=" subheading font-weight-bold teal--text"><v-icon color="teal">business</v-icon> ข้อมูลบริษัท</span>
<v-divider ></v-divider>
</v-flex>
<v-layout row wrap class="pa-3">
<v-flex sm2 xs12 class="text-sm-center text-xs-center">
<img src="https://www.jobbkk.com/upload/employer/0A/86A/00786A/images/308262.png" alt="" height="160">
</v-flex>
<v-flex xs12 sm10 class="px-3">
<v-flex xs12 sm12>
<label class="font-weight-bold subheading green--text">บริษัท พีพี ออนไทม์ จำกัด</label>
</v-flex>
<v-flex xs12 sm12>
<label class="body-2">1011 อาคารศุภาลัย แกรนด์ ทาวเวอร์ ชั้น 16 ถนนพระราม 3 แขวงช่องนนทรี เขตยานนาวา จังหวัดกรุงเทพมหานคร 10120</label>
</v-flex>
<v-flex xs12 sm12 class="mt-1">
<label class="caption"><v-icon small>email</v-icon> kittipong.ma.59@ubu.ac.th</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>desktop_mac</v-icon> http://www.pp-ontime.co.th/</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>phone</v-icon> โทร. 02-056-2099</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>print</v-icon> แฟกซ์. : 02-056-2088</label>
</v-flex>
<v-flex xs12 sm12>
<v-btn small depressed dark color="red">
<v-icon dark >settings</v-icon> แก้ไขข้อมูล
</v-btn>
</v-flex>
</v-flex>
</v-layout>
</v-layout>
</div>
</template>
<style lang="scss" scoped>
.bodyborder{
border: 1px solid #dcdcdc;
border-radius: 3px;
}
</style>
<template>
<div>
<v-layout row wrap class="bodyborder pa-3 mb-2">
<v-flex xs12 sm12>
ยินดีต้อนรับ
</v-flex>
<v-flex xs12 sm12 class="font-weight-bold gray--text">
Kittipong Maneewong
</v-flex>
</v-layout>
<v-layout row wrap class="bodyborder pa-3">
<v-flex xs12 sm12 >
<span class=" subheading font-weight-bold teal--text"><v-icon color="teal">person_pin</v-icon> การตั้งค่าบัญชีผู้ใช้</span>
<v-divider ></v-divider>
</v-flex>
<v-flex xs12 sm12 >
<span class=" subheading font-weight-bold teal--text"><v-icon color="teal">business</v-icon> ข้อมูลบริษัท</span>
<v-divider ></v-divider>
</v-flex>
<v-layout row wrap class="pa-3">
<v-flex sm2 xs12 class="text-sm-center text-xs-center">
<img src="https://www.jobbkk.com/upload/employer/0A/86A/00786A/images/308262.png" alt="" height="160">
</v-flex>
<v-flex xs12 sm10 class="px-3">
<v-flex xs12 sm12>
<label class="font-weight-bold subheading green--text">บริษัท พีพี ออนไทม์ จำกัด</label>
</v-flex>
<v-flex xs12 sm12>
<label class="body-2">1011 อาคารศุภาลัย แกรนด์ ทาวเวอร์ ชั้น 16 ถนนพระราม 3 แขวงช่องนนทรี เขตยานนาวา จังหวัดกรุงเทพมหานคร 10120</label>
</v-flex>
<v-flex xs12 sm12 class="mt-1">
<label class="caption"><v-icon small>email</v-icon> kittipong.ma.59@ubu.ac.th</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>desktop_mac</v-icon> http://www.pp-ontime.co.th/</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>phone</v-icon> โทร. 02-056-2099</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>print</v-icon> แฟกซ์. : 02-056-2088</label>
</v-flex>
<v-flex xs12 sm12>
<v-btn small depressed dark color="red">
<v-icon dark >settings</v-icon> แก้ไขข้อมูล
</v-btn>
</v-flex>
</v-flex>
</v-layout>
</v-layout>
</div>
</template>
<style lang="scss" scoped>
.bodyborder{
border: 1px solid #dcdcdc;
border-radius: 3px;
}
</style>
<template>
<div>
<v-layout row wrap class="bodyborder pa-3 mb-2">
<v-flex xs12 sm12>
ยินดีต้อนรับ
</v-flex>
<v-flex xs12 sm12 class="font-weight-bold grey--text">
Kittipong Maneewong
</v-flex>
</v-layout>
<v-layout row wrap class="bodyborder pa-3">
<v-flex xs12 sm12 >
<span class=" subheading font-weight-bold teal--text"><v-icon color="teal">person_pin</v-icon> การตั้งค่าบัญชีผู้ใช้</span>
<v-divider ></v-divider>
</v-flex>
<v-flex xs12 sm12 >
<span class=" subheading font-weight-bold teal--text"><v-icon color="teal">business</v-icon> ข้อมูลบริษัท</span>
<v-divider ></v-divider>
</v-flex>
<v-layout row wrap class="pa-3">
<v-flex sm2 xs12 class="text-sm-center text-xs-center">
<img src="https://www.jobbkk.com/upload/employer/0A/86A/00786A/images/308262.png" alt="" height="160">
</v-flex>
<v-flex xs12 sm10 class="px-3">
<v-flex xs12 sm12>
<label class="font-weight-bold subheading green--text">บริษัท พีพี ออนไทม์ จำกัด</label>
</v-flex>
<v-flex xs12 sm12>
<label class="body-2">1011 อาคารศุภาลัย แกรนด์ ทาวเวอร์ ชั้น 16 ถนนพระราม 3 แขวงช่องนนทรี เขตยานนาวา จังหวัดกรุงเทพมหานคร 10120</label>
</v-flex>
<v-flex xs12 sm12 class="mt-1">
<label class="caption"><v-icon small>email</v-icon> kittipong.ma.59@ubu.ac.th</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>desktop_mac</v-icon> http://www.pp-ontime.co.th/</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>phone</v-icon> โทร. 02-056-2099</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>print</v-icon> แฟกซ์. : 02-056-2088</label>
</v-flex>
<v-flex xs12 sm12>
<v-btn small depressed dark color="red">
<v-icon dark >settings</v-icon> แก้ไขข้อมูล
</v-btn>
</v-flex>
</v-flex>
</v-layout>
</v-layout>
</div>
</template>
<style lang="scss" scoped>
.bodyborder{
border: 1px solid #dcdcdc;
border-radius: 3px;
}
</style>
<template>
<div>
<v-layout row wrap class="bodyborder pa-3 mb-2">
<v-flex xs12 sm12>
ยินดีต้อนรับ
</v-flex>
<v-flex xs12 sm12 class="font-weight-bold grey--text">
<v-icon>account_circle</v-icon> Kittipong Maneewong
</v-flex>
</v-layout>
<v-layout row wrap class="bodyborder pa-3">
<v-flex xs12 sm12 >
<span class=" subheading font-weight-bold teal--text"><v-icon color="teal">person_pin</v-icon> การตั้งค่าบัญชีผู้ใช้</span>
<v-divider ></v-divider>
</v-flex>
<v-flex xs12 sm12 >
<span class=" subheading font-weight-bold teal--text"><v-icon color="teal">business</v-icon> ข้อมูลบริษัท</span>
<v-divider ></v-divider>
</v-flex>
<v-layout row wrap class="pa-3">
<v-flex sm2 xs12 class="text-sm-center text-xs-center">
<img src="https://www.jobbkk.com/upload/employer/0A/86A/00786A/images/308262.png" alt="" height="160">
</v-flex>
<v-flex xs12 sm10 class="px-3">
<v-flex xs12 sm12>
<label class="font-weight-bold subheading green--text">บริษัท พีพี ออนไทม์ จำกัด</label>
</v-flex>
<v-flex xs12 sm12>
<label class="body-2">1011 อาคารศุภาลัย แกรนด์ ทาวเวอร์ ชั้น 16 ถนนพระราม 3 แขวงช่องนนทรี เขตยานนาวา จังหวัดกรุงเทพมหานคร 10120</label>
</v-flex>
<v-flex xs12 sm12 class="mt-1">
<label class="caption"><v-icon small>email</v-icon> kittipong.ma.59@ubu.ac.th</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>desktop_mac</v-icon> http://www.pp-ontime.co.th/</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>phone</v-icon> โทร. 02-056-2099</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>print</v-icon> แฟกซ์. : 02-056-2088</label>
</v-flex>
<v-flex xs12 sm12>
<v-btn small depressed dark color="red">
<v-icon dark >settings</v-icon> แก้ไขข้อมูล
</v-btn>
</v-flex>
</v-flex>
</v-layout>
</v-layout>
</div>
</template>
<style lang="scss" scoped>
.bodyborder{
border: 1px solid #dcdcdc;
border-radius: 3px;
}
</style>
<template>
<div>
<v-layout row wrap class="bodyborder pa-3 mb-2">
<v-flex xs12 sm12>
ยินดีต้อนรับ
</v-flex>
<v-flex xs12 sm12 class="font-weight-bold grey--text">
<v-icon small>account_circle</v-icon> Kittipong Maneewong
</v-flex>
</v-layout>
<v-layout row wrap class="bodyborder pa-3">
<v-flex xs12 sm12 >
<span class=" subheading font-weight-bold teal--text"><v-icon color="teal">person_pin</v-icon> การตั้งค่าบัญชีผู้ใช้</span>
<v-divider ></v-divider>
</v-flex>
<v-flex xs12 sm12 >
<span class=" subheading font-weight-bold teal--text"><v-icon color="teal">business</v-icon> ข้อมูลบริษัท</span>
<v-divider ></v-divider>
</v-flex>
<v-layout row wrap class="pa-3">
<v-flex sm2 xs12 class="text-sm-center text-xs-center">
<img src="https://www.jobbkk.com/upload/employer/0A/86A/00786A/images/308262.png" alt="" height="160">
</v-flex>
<v-flex xs12 sm10 class="px-3">
<v-flex xs12 sm12>
<label class="font-weight-bold subheading green--text">บริษัท พีพี ออนไทม์ จำกัด</label>
</v-flex>
<v-flex xs12 sm12>
<label class="body-2">1011 อาคารศุภาลัย แกรนด์ ทาวเวอร์ ชั้น 16 ถนนพระราม 3 แขวงช่องนนทรี เขตยานนาวา จังหวัดกรุงเทพมหานคร 10120</label>
</v-flex>
<v-flex xs12 sm12 class="mt-1">
<label class="caption"><v-icon small>email</v-icon> kittipong.ma.59@ubu.ac.th</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>desktop_mac</v-icon> http://www.pp-ontime.co.th/</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>phone</v-icon> โทร. 02-056-2099</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>print</v-icon> แฟกซ์. : 02-056-2088</label>
</v-flex>
<v-flex xs12 sm12>
<v-btn small depressed dark color="red">
<v-icon dark >settings</v-icon> แก้ไขข้อมูล
</v-btn>
</v-flex>
</v-flex>
</v-layout>
</v-layout>
</div>
</template>
<style lang="scss" scoped>
.bodyborder{
border: 1px solid #dcdcdc;
border-radius: 3px;
}
</style>
<template>
<div>
<v-layout row wrap class="bodyborder pa-3 mb-2">
<v-flex xs12 sm12>
ยินดีต้อนรับ
</v-flex>
<v-flex xs12 sm12 class="font-weight-bold grey--text">
Kittipong Maneewong
</v-flex>
</v-layout>
<v-layout row wrap class="bodyborder pa-3">
<v-flex xs12 sm12 >
<span class=" subheading font-weight-bold teal--text"><v-icon color="teal">person_pin</v-icon> การตั้งค่าบัญชีผู้ใช้</span>
<v-divider ></v-divider>
</v-flex>
<v-flex xs12 sm12 >
<span class=" subheading font-weight-bold teal--text"><v-icon color="teal">business</v-icon> ข้อมูลบริษัท</span>
<v-divider ></v-divider>
</v-flex>
<v-layout row wrap class="pa-3">
<v-flex sm2 xs12 class="text-sm-center text-xs-center">
<img src="https://www.jobbkk.com/upload/employer/0A/86A/00786A/images/308262.png" alt="" height="160">
</v-flex>
<v-flex xs12 sm10 class="px-3">
<v-flex xs12 sm12>
<label class="font-weight-bold subheading green--text">บริษัท พีพี ออนไทม์ จำกัด</label>
</v-flex>
<v-flex xs12 sm12>
<label class="body-2">1011 อาคารศุภาลัย แกรนด์ ทาวเวอร์ ชั้น 16 ถนนพระราม 3 แขวงช่องนนทรี เขตยานนาวา จังหวัดกรุงเทพมหานคร 10120</label>
</v-flex>
<v-flex xs12 sm12 class="mt-1">
<label class="caption"><v-icon small>email</v-icon> kittipong.ma.59@ubu.ac.th</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>desktop_mac</v-icon> http://www.pp-ontime.co.th/</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>phone</v-icon> โทร. 02-056-2099</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>print</v-icon> แฟกซ์. : 02-056-2088</label>
</v-flex>
<v-flex xs12 sm12>
<v-btn small depressed dark color="red">
<v-icon dark >settings</v-icon> แก้ไขข้อมูล
</v-btn>
</v-flex>
</v-flex>
</v-layout>
</v-layout>
</div>
</template>
<style lang="scss" scoped>
.bodyborder{
border: 1px solid #dcdcdc;
border-radius: 3px;
}
</style>
<template>
<div>
<v-layout row wrap class="bodyborder pa-3 mb-2">
<v-flex xs12 sm12 class="grey--text">
ยินดีต้อนรับ
</v-flex>
<v-flex xs12 sm12 class="font-weight-bold black--text">
Kittipong Maneewong
</v-flex>
</v-layout>
<v-layout row wrap class="bodyborder pa-3">
<v-flex xs12 sm12 >
<span class=" subheading font-weight-bold teal--text"><v-icon color="teal">person_pin</v-icon> การตั้งค่าบัญชีผู้ใช้</span>
<v-divider ></v-divider>
</v-flex>
<v-flex xs12 sm12 >
<span class=" subheading font-weight-bold teal--text"><v-icon color="teal">business</v-icon> ข้อมูลบริษัท</span>
<v-divider ></v-divider>
</v-flex>
<v-layout row wrap class="pa-3">
<v-flex sm2 xs12 class="text-sm-center text-xs-center">
<img src="https://www.jobbkk.com/upload/employer/0A/86A/00786A/images/308262.png" alt="" height="160">
</v-flex>
<v-flex xs12 sm10 class="px-3">
<v-flex xs12 sm12>
<label class="font-weight-bold subheading green--text">บริษัท พีพี ออนไทม์ จำกัด</label>
</v-flex>
<v-flex xs12 sm12>
<label class="body-2">1011 อาคารศุภาลัย แกรนด์ ทาวเวอร์ ชั้น 16 ถนนพระราม 3 แขวงช่องนนทรี เขตยานนาวา จังหวัดกรุงเทพมหานคร 10120</label>
</v-flex>
<v-flex xs12 sm12 class="mt-1">
<label class="caption"><v-icon small>email</v-icon> kittipong.ma.59@ubu.ac.th</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>desktop_mac</v-icon> http://www.pp-ontime.co.th/</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>phone</v-icon> โทร. 02-056-2099</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>print</v-icon> แฟกซ์. : 02-056-2088</label>
</v-flex>
<v-flex xs12 sm12>
<v-btn small depressed dark color="red">
<v-icon dark >settings</v-icon> แก้ไขข้อมูล
</v-btn>
</v-flex>
</v-flex>
</v-layout>
</v-layout>
</div>
</template>
<style lang="scss" scoped>
.bodyborder{
border: 1px solid #dcdcdc;
border-radius: 3px;
}
</style>
<template>
<div>
<v-layout row wrap class="bodyborder pa-3 mb-2">
<v-flex xs12 sm12>
ยินดีต้อนรับ
</v-flex>
<v-flex xs12 sm12 class="font-weight-bold grey--text">
Kittipong Maneewong
</v-flex>
</v-layout>
<v-layout row wrap class="bodyborder pa-3">
<v-flex xs12 sm12 >
<span class=" subheading font-weight-bold teal--text"><v-icon color="teal">person_pin</v-icon> การตั้งค่าบัญชีผู้ใช้</span>
<v-divider ></v-divider>
</v-flex>
<v-flex xs12 sm12 >
<span class=" subheading font-weight-bold teal--text"><v-icon color="teal">business</v-icon> ข้อมูลบริษัท</span>
<v-divider ></v-divider>
</v-flex>
<v-layout row wrap class="pa-3">
<v-flex sm2 xs12 class="text-sm-center text-xs-center">
<img src="https://www.jobbkk.com/upload/employer/0A/86A/00786A/images/308262.png" alt="" height="160">
</v-flex>
<v-flex xs12 sm10 class="px-3">
<v-flex xs12 sm12>
<label class="font-weight-bold subheading green--text">บริษัท พีพี ออนไทม์ จำกัด</label>
</v-flex>
<v-flex xs12 sm12>
<label class="body-2">1011 อาคารศุภาลัย แกรนด์ ทาวเวอร์ ชั้น 16 ถนนพระราม 3 แขวงช่องนนทรี เขตยานนาวา จังหวัดกรุงเทพมหานคร 10120</label>
</v-flex>
<v-flex xs12 sm12 class="mt-1">
<label class="caption"><v-icon small>email</v-icon> kittipong.ma.59@ubu.ac.th</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>desktop_mac</v-icon> http://www.pp-ontime.co.th/</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>phone</v-icon> โทร. 02-056-2099</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>print</v-icon> แฟกซ์. : 02-056-2088</label>
</v-flex>
<v-flex xs12 sm12>
<v-btn small depressed dark color="red">
<v-icon dark >settings</v-icon> แก้ไขข้อมูล
</v-btn>
</v-flex>
</v-flex>
</v-layout>
</v-layout>
</div>
</template>
<style lang="scss" scoped>
.bodyborder{
border: 1px solid #dcdcdc;
border-radius: 3px;
}
</style>
<template>
<div>
<v-layout row wrap class="bodyborder pa-3 mb-2">
<v-flex xs12 sm12>
ยินดีต้อนรับ
</v-flex>
<v-flex xs12 sm12 class="font-weight-bold grey--text">
ake8225
</v-flex>
</v-layout>
<v-layout row wrap class="bodyborder pa-3">
<v-flex xs12 sm12 >
<span class=" subheading font-weight-bold teal--text"><v-icon color="teal">person_pin</v-icon> การตั้งค่าบัญชีผู้ใช้</span>
<v-divider ></v-divider>
</v-flex>
<v-flex xs12 sm12 >
<span class=" subheading font-weight-bold teal--text"><v-icon color="teal">business</v-icon> ข้อมูลบริษัท</span>
<v-divider ></v-divider>
</v-flex>
<v-layout row wrap class="pa-3">
<v-flex sm2 xs12 class="text-sm-center text-xs-center">
<img src="https://www.jobbkk.com/upload/employer/0A/86A/00786A/images/308262.png" alt="" height="160">
</v-flex>
<v-flex xs12 sm10 class="px-3">
<v-flex xs12 sm12>
<label class="font-weight-bold subheading green--text">บริษัท พีพี ออนไทม์ จำกัด</label>
</v-flex>
<v-flex xs12 sm12>
<label class="body-2">1011 อาคารศุภาลัย แกรนด์ ทาวเวอร์ ชั้น 16 ถนนพระราม 3 แขวงช่องนนทรี เขตยานนาวา จังหวัดกรุงเทพมหานคร 10120</label>
</v-flex>
<v-flex xs12 sm12 class="mt-1">
<label class="caption"><v-icon small>email</v-icon> kittipong.ma.59@ubu.ac.th</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>desktop_mac</v-icon> http://www.pp-ontime.co.th/</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>phone</v-icon> โทร. 02-056-2099</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>print</v-icon> แฟกซ์. : 02-056-2088</label>
</v-flex>
<v-flex xs12 sm12>
<v-btn small depressed dark color="red">
<v-icon dark >settings</v-icon> แก้ไขข้อมูล
</v-btn>
</v-flex>
</v-flex>
</v-layout>
</v-layout>
</div>
</template>
<style lang="scss" scoped>
.bodyborder{
border: 1px solid #dcdcdc;
border-radius: 3px;
}
</style>
<template>
<div>
<v-layout row wrap class="bodyborder pa-3 mb-2">
<v-flex xs12 sm12>
ยินดีต้อนรับ
</v-flex>
<v-flex xs12 sm12 class="font-weight-bold grey--text">
<font size="+1">ake8225</font>
</v-flex>
</v-layout>
<v-layout row wrap class="bodyborder pa-3">
<v-flex xs12 sm12 >
<span class=" subheading font-weight-bold teal--text"><v-icon color="teal">person_pin</v-icon> การตั้งค่าบัญชีผู้ใช้</span>
<v-divider ></v-divider>
</v-flex>
<v-flex xs12 sm12 >
<span class=" subheading font-weight-bold teal--text"><v-icon color="teal">business</v-icon> ข้อมูลบริษัท</span>
<v-divider ></v-divider>
</v-flex>
<v-layout row wrap class="pa-3">
<v-flex sm2 xs12 class="text-sm-center text-xs-center">
<img src="https://www.jobbkk.com/upload/employer/0A/86A/00786A/images/308262.png" alt="" height="160">
</v-flex>
<v-flex xs12 sm10 class="px-3">
<v-flex xs12 sm12>
<label class="font-weight-bold subheading green--text">บริษัท พีพี ออนไทม์ จำกัด</label>
</v-flex>
<v-flex xs12 sm12>
<label class="body-2">1011 อาคารศุภาลัย แกรนด์ ทาวเวอร์ ชั้น 16 ถนนพระราม 3 แขวงช่องนนทรี เขตยานนาวา จังหวัดกรุงเทพมหานคร 10120</label>
</v-flex>
<v-flex xs12 sm12 class="mt-1">
<label class="caption"><v-icon small>email</v-icon> kittipong.ma.59@ubu.ac.th</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>desktop_mac</v-icon> http://www.pp-ontime.co.th/</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>phone</v-icon> โทร. 02-056-2099</label>
</v-flex>
<v-flex xs12 sm12>
<label class="caption"><v-icon small>print</v-icon> แฟกซ์. : 02-056-2088</label>
</v-flex>
<v-flex xs12 sm12>
<v-btn small depressed dark color="red">
<v-icon dark >settings</v-icon> แก้ไขข้อมูล
</v-btn>
</v-flex>
</v-flex>
</v-layout>
</v-layout>
</div>
</template>
<style lang="scss" scoped>
.bodyborder{
border: 1px solid #dcdcdc;
border-radius: 3px;
}
</style>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -20,6 +20,7 @@ Vue.use(Vuetify);
Vue.use(iView);
iView.LoadingBar.config({
color: '#1B5E20',
height: 3
});
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment