Sfoglia il codice sorgente

[Espace producteur] Commande > produits : ouverture première catégorie par défaut

feature/souke
Guillaume Bourgeois 1 anno fa
parent
commit
82a133fd50
1 ha cambiato i file con 4 aggiunte e 4 eliminazioni
  1. +4
    -4
      producer/web/js/vuejs/order-order.js

+ 4
- 4
producer/web/js/vuejs/order-order.js Vedi File

if(response.data.categories) { if(response.data.categories) {
app.categories = response.data.categories ; app.categories = response.data.categories ;
if(app.countProductsByCategory(response.data.categories[0])) { if(app.countProductsByCategory(response.data.categories[0])) {
app.setCategoryCurrent(response.data.categories[0]) ;
app.setCategoryCurrent(response.data.categories[0], true) ;
} }
else { else {
app.setCategoryCurrent(response.data.categories[1]) ;
app.setCategoryCurrent(response.data.categories[1], true) ;
} }
} }




return count ; return count ;
}, },
setCategoryCurrent: function(category) {
if(this.categoryCurrent && this.categoryCurrent.id == category.id) {
setCategoryCurrent: function(category, first) {
if(this.categoryCurrent && this.categoryCurrent.id == category.id && !first) {
this.categoryCurrent = null ; this.categoryCurrent = null ;
} }
else { else {

Loading…
Annulla
Salva