Commit fd1a54b9 authored by TTS Kieu Tuan Anh's avatar TTS Kieu Tuan Anh

fix ident

parent 209387e4
......@@ -30,7 +30,6 @@
placeholder="Parent ID"
v-model="parent_id"
/>
<label>Ordering :</label>
<input
type="text"
......@@ -48,7 +47,6 @@
placeholder="Choose a image or drop it here..."
drop-placeholder="Drop file here..."
></b-form-file>
</form>
</p>
<template #modal-footer>
......@@ -76,7 +74,6 @@
placeholder="Parent ID"
v-model="eParent_id"
/>
<label>Ordering :</label>
<input
type="text"
......@@ -92,7 +89,6 @@
placeholder="Choose a image or drop it here..."
drop-placeholder="Drop file here..."
></b-form-file>
</form>
</p>
<template #modal-footer>
......@@ -101,7 +97,6 @@
</template>
</b-modal>
<div>
<v-data-table
:headers="headers"
:items="categories"
......@@ -120,7 +115,6 @@
<v-card-title>
<span class="text-h5">{{ formTitle }}</span>
</v-card-title>
<v-card-text>
<v-container>
<v-row>
......@@ -157,7 +151,6 @@
</v-row>
</v-container>
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="blue darken-1" text @click="close">
......@@ -194,14 +187,8 @@
<v-btn color="primary" @click="initialize"> Reset </v-btn>
</template>
</v-data-table>
</div>
</div>
</div>
</div>
</template>
<script>
import Nav from "@/components/Nav";
......@@ -216,7 +203,6 @@ export default {
components: { Navigation },
components: { notification },
middleware: ["web"],
data: () => {
return {
parent_id:'',
......@@ -256,7 +242,6 @@ export default {
status: "",
created_at: "",
updated_at: "",
},
defaultItem: {
name: "",
......@@ -370,9 +355,9 @@ export default {
this.image = file;
console.log(file)
console.log(this.image)
},
deleteCategory(ID,index) {
const self = this
this.editedIndex = this.categories.indexOf(index);
if(confirm("Do you really want to delete?")){
try{
......@@ -380,12 +365,14 @@ export default {
.delete(`http://127.0.0.1:8000/api/categories/${ID}`)
.then(response => {
this.categories.splice(this.editedIndex, 1);
self.$toast.success('Category deleted successfully!',{
duration: 3000
});
})
} catch(error){
console.log(error)
}
}
},
getID(item) {
console.log(this.categories.indexOf(item))
......@@ -423,9 +410,6 @@ export default {
console.log(error)
}
}
},
};
</script>
\ No newline at end of file
<template>
<div>
<div>
<h1 style="text-align: center">HOME</h1>
</div>
</div>
</div>
</template>
<script>
import { onMounted } from "vue";
import axios from "axios";
import VueAxios from "vue-axios";
import Nav from "@/components/Nav";
export default {
layout: "admin",
components: { Nav },
middleware: ['web'],
middleware: ['web'],
};
</script>
<style></style>
......@@ -34,7 +34,6 @@
v-model="email"
required
/>
<label>Password :</label>
<input
type="password"
......@@ -43,7 +42,6 @@
v-model="password"
required
/>
</form>
</p>
<template #modal-footer>
......@@ -73,7 +71,6 @@
v-model="eEmail"
required
/>
<label>Password :</label>
<input
type="password"
......@@ -193,8 +190,7 @@
<v-btn color="primary" @click="initialize"> Reset </v-btn>
</template>
</v-data-table>
</div>
</div>
</template>
<script>
import Nav from "@/components/Nav";
......@@ -209,8 +205,7 @@ export default {
components: { Nav },
components: { Navigation },
components: { notification },
middleware: ["web"],
middleware: ["web"],
data: () => {
return {
email:'',
......@@ -349,8 +344,7 @@ export default {
self.$toast.error('something went wrong while trying create!',{
duration: 3000
});
});
});
},
deleteUser(userID) {
if(confirm("Do you really want to delete?")){
......@@ -361,9 +355,7 @@ export default {
console.log(error)
}
}
},
},
editUser(userID) {
this.$bvModal.show('modal-edit');
this.eID = userID;
......@@ -390,9 +382,7 @@ export default {
} catch(error){
console.log(error)
}
}
}
},
};
</script>
......@@ -118,21 +118,17 @@ export default {
this.$router.push("/");
}
},
checkForm: function (e) {
if (this.name && this.age) {
return true;
}
this.errors = [];
if (!this.name) {
this.errors.push("Name required.");
}
if (!this.age) {
this.errors.push("Age required.");
}
e.preventDefault();
},
},
......
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