Ver código fonte

[Espace producteur] Abonnements : visibilité produits #1081

feature/souke
Guillaume Bourgeois 1 ano atrás
pai
commit
e343de82ab
1 arquivos alterados com 9 adições e 4 exclusões
  1. +9
    -4
      producer/web/js/vuejs/subscription-form.js

+ 9
- 4
producer/web/js/vuejs/subscription-form.js Ver arquivo

@@ -116,9 +116,6 @@ var app = new Vue({
}
},
dayChange: function () {
console.log(this.monday + ' ' + this.tuesday + ' ' + this.wednesday + ' ' +
this.thursday + ' ' + this.friday + ' ' + this.saturday + ' ' + this.sunday);

var count = Number(this.monday) + Number(this.tuesday) + Number(this.wednesday)
+ Number(this.thursday) + Number(this.friday) + Number(this.saturday)
+ Number(this.sunday);
@@ -136,7 +133,12 @@ var app = new Vue({
(!this.thursday || (this.thursday && product.thursday)) &&
(!this.friday || (this.friday && product.friday)) &&
(!this.saturday || (this.saturday && product.saturday)) &&
(!this.sunday || (this.sunday && product.sunday)) ;
(!this.sunday || (this.sunday && product.sunday)) &&
(
(product.available_on_points_sale && !this.checkProductPointSaleInclude(product))
|| (!product.available_on_points_sale && this.checkProductPointSaleInclude(product))
)
;

if (!available) {
product.quantity_form = 0;
@@ -144,6 +146,9 @@ var app = new Vue({

return available;
},
checkProductPointSaleInclude: function(product) {
return this.idPointSaleActive && product.product_point_sale_array.includes(parseInt(this.idPointSaleActive));
},
checkOneProductAvailable: function () {
var count = 0;
for (key in this.products) {

Carregando…
Cancelar
Salvar