Ver código fonte

[Espace producteur] Abonnement : l'ajout ne fonctionne pas (boutons +/- inactifs) #908

prodstable
Guillaume Bourgeois 1 ano atrás
pai
commit
a2c926a9e3
2 arquivos alterados com 5 adições e 6 exclusões
  1. +4
    -0
      producer/controllers/SubscriptionController.php
  2. +1
    -6
      producer/web/js/vuejs/subscription-form.js

+ 4
- 0
producer/controllers/SubscriptionController.php Ver arquivo

@@ -295,6 +295,10 @@ class SubscriptionController extends ProducerBaseController
]),
]
);

if($product['unit'] == 'piece' && is_null($product['step'])) {
$product['step'] = 1;
}
}

$params['products'] = $productsArray;

+ 1
- 6
producer/web/js/vuejs/subscription-form.js Ver arquivo

@@ -116,12 +116,7 @@ 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);
var count = Number(this.monday) + Number(this.tuesday) + Number(this.wednesday) + Number(this.thursday) + Number(this.friday) + Number(this.saturday) + Number(this.sunday);

if (count == 1 && this.lastCountDays == 0) {
this.lastCountDays = count;

Carregando…
Cancelar
Salvar