Commit 5b7e2bf2 authored by TTS Kieu Tuan Anh's avatar TTS Kieu Tuan Anh

CRUD products

parent 30845731
......@@ -25,7 +25,7 @@
/>
<label>Parent :</label>
<b-form-select v-model="parent_id">
<option v-for="item in categories" :value="item.id">
<option v-for="item in categories" :value="item.id" v-if="item.parent_id == null">
{{item.name}}
</option>
</b-form-select>
......
This diff is collapsed.
......@@ -183,7 +183,7 @@
</v-toolbar>
</template>
<template v-slot:item.actions="{ item }">
<v-icon small class="mr-2" @click=" editUser(item.id);" :id ="item.id"> mdi-pencil </v-icon>
<v-icon small class="mr-2" @click=" editUser(item);" :id ="item.id"> mdi-pencil </v-icon>
<v-icon small @click="deleteUser(item.id, item)" :id ="item.id"> mdi-delete </v-icon>
</template>
<template v-slot:no-data>
......@@ -223,7 +223,7 @@ export default {
},
{ text: "id", value: "id" },
{ text: "email", value: "email" },
{ text: "status", value: "status", sortable: false },
{ text: "status", value: "id", sortable: false },
{ text: "created_at", value: "created_at" },
{ text: "updated_at", value: "updated_at" },
{ text: 'Actions', value: 'actions', sortable: false },
......@@ -360,9 +360,11 @@ export default {
}
}
},
editUser(userID) {
editUser(user) {
this.$bvModal.show('modal-edit');
this.eID = userID;
this.eID = user.id;
this.eEmail = user.email;
this.eName = user.name;
console.log(this?.eID);
},
updateUser(userID) {
......
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