|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
dayChange: function () { |
|
|
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) |
|
|
var count = Number(this.monday) + Number(this.tuesday) + Number(this.wednesday) |
|
|
+ Number(this.thursday) + Number(this.friday) + Number(this.saturday) |
|
|
+ Number(this.thursday) + Number(this.friday) + Number(this.saturday) |
|
|
+ Number(this.sunday); |
|
|
+ Number(this.sunday); |
|
|
|
|
|
|
|
|
(!this.thursday || (this.thursday && product.thursday)) && |
|
|
(!this.thursday || (this.thursday && product.thursday)) && |
|
|
(!this.friday || (this.friday && product.friday)) && |
|
|
(!this.friday || (this.friday && product.friday)) && |
|
|
(!this.saturday || (this.saturday && product.saturday)) && |
|
|
(!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) { |
|
|
if (!available) { |
|
|
product.quantity_form = 0; |
|
|
product.quantity_form = 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return available; |
|
|
return available; |
|
|
}, |
|
|
}, |
|
|
|
|
|
checkProductPointSaleInclude: function(product) { |
|
|
|
|
|
return this.idPointSaleActive && product.product_point_sale_array.includes(parseInt(this.idPointSaleActive)); |
|
|
|
|
|
}, |
|
|
checkOneProductAvailable: function () { |
|
|
checkOneProductAvailable: function () { |
|
|
var count = 0; |
|
|
var count = 0; |
|
|
for (key in this.products) { |
|
|
for (key in this.products) { |