Sorts all terms requests ascendently. Align checkbox to the baseline of it's labels.
This commit is contained in:
parent
23f25e8433
commit
7cdfc84e97
|
@ -1,4 +1,6 @@
|
|||
.b-checkbox.checkbox {
|
||||
align-items: baseline;
|
||||
margin-bottom: 5px;
|
||||
|
||||
input[type="checkbox"] {
|
||||
box-shadow: none !important;
|
||||
|
|
|
@ -117,6 +117,8 @@ export default {
|
|||
display: block;
|
||||
}
|
||||
.b-checkbox.checkbox {
|
||||
align-items: baseline;
|
||||
margin-bottom: 5px;
|
||||
|
||||
input[type="checkbox"] {
|
||||
box-shadow: none !important;
|
||||
|
|
|
@ -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
|
||||
})
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 => {
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue