Changeset View
Changeset View
Standalone View
Standalone View
src/resources/vue/Widgets/SubscriptionSelect.vue
Show First 20 Lines • Show All 190 Lines • ▼ Show 20 Lines | export default { | ||||
cost = sku.cost * (value - sku.units_free) | cost = sku.cost * (value - sku.units_free) | ||||
} | } | ||||
// Update the label | // Update the label | ||||
input.prev().text(value + ' ' + sku.range.unit) | input.prev().text(value + ' ' + sku.range.unit) | ||||
// Update the price | // Update the price | ||||
record.find('.price').text(this.$root.priceLabel(cost, this.discount, this.currency)) | record.find('.price').text(this.$root.priceLabel(cost, this.discount, this.currency)) | ||||
}, | |||||
getSkus() { | |||||
let skus = {} | |||||
$(this.$el).find('input[type=checkbox]:checked').each((idx, input) => { | |||||
let id = $(input).val() | |||||
let range = $(input).parents('tr').first().find('input[type=range]').val() | |||||
skus[id] = range || 1 | |||||
}) | |||||
return skus | |||||
} | } | ||||
} | } | ||||
} | } | ||||
</script> | </script> |