diff --git a/index.html b/index.html index a504b01..167b2b3 100644 --- a/index.html +++ b/index.html @@ -215,7 +215,8 @@

+ v-bind:class="[isItemInBundle(bundle_id, item.id, $index) ? 'is-success' : '', + !isItemInBundle(bundle_id, item.id, $index) && !isBundleComplete(bundle_id) ? 'is-danger' : '' ]"> @@ -290,7 +291,8 @@

+ v-bind:class="[isItemInBundle(bundle_id, item.id, $index) ? 'is-success' : '', + !isItemInBundle(bundle_id, item.id, $index) && !isBundleComplete(bundle_id) ? 'is-danger' : '' ]"> @@ -367,7 +369,8 @@

+ v-bind:class="[isItemInBundle(bundle_id, item.id, $index) ? 'is-success' : '', + !isItemInBundle(bundle_id, item.id, $index) && !isBundleComplete(bundle_id) ? 'is-danger' : '' ]"> @@ -446,7 +449,8 @@

+ v-bind:class="[isItemInBundle(bundle_id, item.id, $index) ? 'is-success' : '', + !isItemInBundle(bundle_id, item.id, $index) && !isBundleComplete(bundle_id) ? 'is-danger' : '' ]"> diff --git a/main.js b/main.js index 234091c..66dc2f8 100644 --- a/main.js +++ b/main.js @@ -140,6 +140,9 @@ var v = new Vue({ } return true; + }, + isBundleComplete: function(bundle_id){ + return this.user_data[bundle_id].length >= this.static.bundles[bundle_id].items_required; } } });