Sorts all terms requests ascendently. Align checkbox to the baseline of it's labels.

This commit is contained in:
Mateus Machado Luna 2018-06-08 12:03:09 -03:00
parent 23f25e8433
commit 7cdfc84e97
7 changed files with 10 additions and 6 deletions

View File

@ -1,4 +1,6 @@
.b-checkbox.checkbox {
align-items: baseline;
margin-bottom: 5px;
input[type="checkbox"] {
box-shadow: none !important;

View File

@ -117,6 +117,8 @@ export default {
display: block;
}
.b-checkbox.checkbox {
align-items: baseline;
margin-bottom: 5px;
input[type="checkbox"] {
box-shadow: none !important;

View File

@ -88,7 +88,7 @@
} else {
const instance = this;
axios.post(`/taxonomy/${this.taxonomy_id}/terms`, {
axios.post(`/taxonomy/${this.taxonomy_id}/terms?hideempty=0&order=asc`, {
name: this.name,
parent: this.parent
})

View File

@ -82,7 +82,7 @@
}
},
getTermsFromTaxonomy(){
axios.get('/taxonomy/' + this.taxonomy + '/terms?hideempty=0' ).then( res => {
axios.get('/taxonomy/' + this.taxonomy + '/terms?hideempty=0&order=asc' ).then( res => {
for (let item of res.data) {
this.terms.push( item );
}

View File

@ -55,7 +55,7 @@
},
methods: {
getValuesCategory( taxonomy ){
return axios.get('/taxonomy/' + taxonomy + '/terms?hideempty=0' ).then( res => {
return axios.get('/taxonomy/' + taxonomy + '/terms?hideempty=0&order=asc' ).then( res => {
for (let item of res.data) {
this.taxonomy = item.taxonomy;
this.options.push(item);

View File

@ -103,7 +103,7 @@
});
},
getValuesCategory( taxonomy, query ){
return axios.get('/taxonomy/' + taxonomy + '/terms?hideempty=0' ).then( res => {
return axios.get('/taxonomy/' + taxonomy + '/terms?hideempty=0&order=asc' ).then( res => {
for (let term of res.data) {
if( term.name.toLowerCase().indexOf( query.toLowerCase() ) >= 0 ){
this.taxonomy = term.taxonomy;
@ -130,7 +130,7 @@
}
},
getTerm( taxonomy, id ){
return axios.get('/taxonomy/' + taxonomy + '/terms/' + id ).then( res => {
return axios.get('/taxonomy/' + taxonomy + '/terms/' + id + '?order=asc&hideempty=0' ).then( res => {
this.$console.log(res);
})
.catch(error => {

View File

@ -171,7 +171,7 @@ export const updateTerm = ({ commit }, { categoryId, termId, name, description,
export const fetchTerms = ({ commit }, categoryId ) => {
return new Promise((resolve, reject) => {
axios.tainacan.get(`/taxonomy/${categoryId}/terms/?hideempty=0`)
axios.tainacan.get(`/taxonomy/${categoryId}/terms/?hideempty=0&order=asc`)
.then(res => {
let terms = res.data;
commit('setTerms', terms);