Browse Source

[Espace producteur] Commander > Produits : dérouler la première catégorie #1238

feature/souke
Guillaume Bourgeois 1 year ago
parent
commit
3dac516b87
1 changed files with 10 additions and 4 deletions
  1. +10
    -4
      producer/web/js/vuejs/order-order.js

+ 10
- 4
producer/web/js/vuejs/order-order.js View File

} }
} }


if(response.data.categories) {
app.categories = response.data.categories ;
app.setCategoryCurrent(response.data.categories[0]) ;
}
app.producer = response.data.producer; app.producer = response.data.producer;
app.user = response.data.user; app.user = response.data.user;
app.useCredit = response.data.producer.use_credit_checked_default; app.useCredit = response.data.producer.use_credit_checked_default;
} }
} }


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

setTimeout(function() { setTimeout(function() {
app.responsive(); app.responsive();
opendistrib_products(); opendistrib_products();

Loading…
Cancel
Save