add eslint working conf
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-between flex-center mb-1">
|
||||
<a href="#" class="btn" @click="$router.back()">< Back</a>
|
||||
<a href="#" class="btn" @click="$router.back()">Back</a>
|
||||
|
||||
<a href="#" class="btn-primary" @click="modal = ! modal">Add New List</a>
|
||||
</div>
|
||||
@@ -27,50 +27,52 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Loader from "../../components/Loader";
|
||||
import InputField from "../../components/InputField";
|
||||
import ToDoList from "./ToDoList";
|
||||
import Loader from '../../components/Loader'
|
||||
import InputField from '../../components/InputField'
|
||||
import ToDoList from './ToDoList'
|
||||
|
||||
export default {
|
||||
name: "ToDoListIndex",
|
||||
components: {
|
||||
Loader, InputField, ToDoList
|
||||
},
|
||||
data: function () {
|
||||
return {
|
||||
loading: true,
|
||||
modal: false,
|
||||
toDoLists: null,
|
||||
name: '',
|
||||
errors: null,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
axios.get('/api/to-do-lists')
|
||||
export default {
|
||||
name: 'ToDoListIndex',
|
||||
components: {
|
||||
Loader, InputField, ToDoList
|
||||
},
|
||||
data: function () {
|
||||
return {
|
||||
loading: true,
|
||||
modal: false,
|
||||
toDoLists: null,
|
||||
name: '',
|
||||
errors: null,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// eslint-disable-next-line no-undef
|
||||
axios.get('/api/to-do-lists')
|
||||
.then(res => {
|
||||
this.toDoLists = res.data.data
|
||||
this.loading = false
|
||||
})
|
||||
.catch(errorRes => {
|
||||
this.loading = false
|
||||
if (errorRes.response.status === 404) {
|
||||
this.$router.push('/')
|
||||
}
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
create: function () {
|
||||
// eslint-disable-next-line no-undef
|
||||
axios.post('/api/to-do-lists', {name: this.name})
|
||||
.then(res => {
|
||||
this.toDoLists = res.data.data
|
||||
this.loading = false
|
||||
console.log(res)
|
||||
this.modal = false
|
||||
this.name = ''
|
||||
this.toDoLists.push(res.data)
|
||||
})
|
||||
.catch(errorRes => {
|
||||
this.loading = false
|
||||
if (errorRes.response.status === 404) {
|
||||
this.$router.push('/')
|
||||
}
|
||||
console.log('Internal Error, Unable to delete contact.' + errorRes)
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
create: function () {
|
||||
axios.post('/api/to-do-lists', {name: this.name})
|
||||
.then(res => {
|
||||
console.log(res)
|
||||
this.modal = false
|
||||
this.name = ''
|
||||
this.toDoLists.push(res.data)
|
||||
})
|
||||
.catch(errorRes => {
|
||||
console.log('Internal Error, Unable to delete contact.' + errorRes)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user