Commit e4c658dc authored by Kittisak Maneewong's avatar Kittisak Maneewong

save

parent ddf480e2
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
<span class="headline font-weight-bold indigo--text">{{ detail_data.job_title }}</span> <span class="headline font-weight-bold indigo--text">{{ detail_data.job_title }}</span>
</v-flex> </v-flex>
<v-flex xs12 sm2> <v-flex xs12 sm2>
<v-btn color="deep-orange " v-if="!!localStorage.getItem('access_token')" @click="$store.commit('setDialogJob', !$store.getters.getDialogJob);" dark small depressed class="body-2">สมัครงานนี้</v-btn> <v-btn color="deep-orange " v-if="chk" @click="$store.commit('setDialogJob', !$store.getters.getDialogJob);" dark small depressed class="body-2">สมัครงานนี้</v-btn>
<v-btn color="deep-orange " v-if="!localStorage.getItem('access_token')" @click="$store.commit('setSnackbar', {show: true, color: 'error', text: 'จำเป็นต้องเข้าสู่ระบบสมาชิกก่อน!'})" dark small depressed class="body-2">สมัครงานนี้</v-btn> <v-btn color="deep-orange " v-if="!chk" @click="$store.commit('setSnackbar', {show: true, color: 'error', text: 'จำเป็นต้องเข้าสู่ระบบสมาชิกก่อน!'})" dark small depressed class="body-2">สมัครงานนี้</v-btn>
</v-flex> </v-flex>
</v-layout> </v-layout>
<v-flex xs12 sm8> <v-flex xs12 sm8>
...@@ -177,6 +177,11 @@ export default { ...@@ -177,6 +177,11 @@ export default {
detail_data: {} detail_data: {}
} }
}, },
computed: {
chk () {
return this.$store.getters.getUser.email
}
},
beforeMount () { beforeMount () {
axios.get(`/api/detail/${this.$route.params.id}`) axios.get(`/api/detail/${this.$route.params.id}`)
.then(res => { .then(res => {
......
...@@ -122,7 +122,8 @@ ...@@ -122,7 +122,8 @@
</v-flex> </v-flex>
<v-flex xs12 sm2> <v-flex xs12 sm2>
<v-layout row wrap justify-end> <v-layout row wrap justify-end>
<v-btn color="deep-orange " dark small depressed class="body-2" @click="$store.commit('setDialogJob', !$store.getters.getDialogJob);id=job.id">สมัครงานนี้</v-btn> <v-btn color="deep-orange " v-if="chk" dark small depressed class="body-2" @click="$store.commit('setDialogJob', !$store.getters.getDialogJob);id=job.id">สมัครงานนี้</v-btn>
<v-btn color="deep-orange " v-if="!chk" dark small depressed class="body-2" @click="$store.commit('setSnackbar', {show: true, color: 'error', text: 'จำเป็นต้องเข้าสู่ระบบสมาชิกก่อน!'})">สมัครงานนี้</v-btn>
</v-layout> </v-layout>
<v-layout row wrap justify-end class="px-2"> <v-layout row wrap justify-end class="px-2">
<label class="font-weight-bold">{{ job.num ? job.num + ' อัตรา' : '' }}</label> <label class="font-weight-bold">{{ job.num ? job.num + ' อัตรา' : '' }}</label>
...@@ -274,6 +275,9 @@ export default { ...@@ -274,6 +275,9 @@ export default {
} }
}, },
computed: { computed: {
chk () {
return this.$store.getters.getUser.email
},
chkChip() { chkChip() {
return Object.values(this.chips).includes(true); return Object.values(this.chips).includes(true);
}, },
......
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