Commit d018635d authored by Kittisak Maneewong's avatar Kittisak Maneewong

edit

parent 722c0977
......@@ -115,7 +115,7 @@ class CompanyController extends Controller
*/
public function update(Request $request, $id)
{
//
return response()->json(['data' => $request->all()]);
}
/**
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -5,7 +5,7 @@
<v-icon color="black">business</v-icon> ข้อมูลบริษัท
<v-divider></v-divider>
</v-flex>
<v-form enctype="multipart/form-data" @submit.prevent="createJob()" ref="create">
<v-form enctype="multipart/form-data" @submit.prevent="editCompany()" ref="create">
<v-flex sm12 xs12>
<v-layout row wrap class="ป pa-3">
<v-flex sm4 xs12 class="px-3">
......@@ -433,7 +433,14 @@ export default {
this.company_data.imageMap = e.target.result
}
},
createJob () {
editCompany () {
axios.put(`/api/companys/${this.company.id}`, this.company)
.then(res => {
console.log(res)
})
.catch(err => {
console.log(err.response)
})
// this.loading = true
// if (this.amphoes.findIndex(x => x.amphoe_code === this.amphoe.amphoe_code) === -1) {this.amphoe = ''}
// if (this.tumbons.findIndex(x => x.tumbon_code === this.tumbon.tumbon_code) === -1) {this.tumbon = ''}
......
......@@ -166,10 +166,6 @@ export default {
this.companies = res.data.company
if (!this.companies.imageCompany) {
this.companies.imageCompany = 'https://asianinteriorservices.com/wp-content/uploads/2018/04/noImg.png'
} else {
// this.companies.imageCompany = '../../../storage/uploads/'+this.companies.imageCompany
this.companies.imageCompany = '../../../public/img/logologin.png'
console.log(this.companies.imageCompany)
}
})
.catch(err => {
......
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