diff --git a/js/components/forms/details_of_use.js b/js/components/forms/details_of_use.js index bcd06361..94b0f5f0 100644 --- a/js/components/forms/details_of_use.js +++ b/js/components/forms/details_of_use.js @@ -17,8 +17,14 @@ export default { }, data: function () { + const { + estimated_monthly_spend = 0, + jedi_migration = '' + } = this.initialData + return { - jedi_migration: this.initialData.jedi_migration + estimated_monthly_spend, + jedi_migration } }, @@ -27,6 +33,10 @@ export default { }, computed: { + annualSpend: function () { + const monthlySpend = this.estimated_monthly_spend || 0 + return monthlySpend * 12 + }, isJediMigration: function () { return this.jedi_migration === 'yes' } diff --git a/templates/requests/screen-1.html b/templates/requests/screen-1.html index 971a738b..d0acf98d 100644 --- a/templates/requests/screen-1.html +++ b/templates/requests/screen-1.html @@ -42,7 +42,7 @@

Financial Usage

{{ TextInput(f.estimated_monthly_spend, validation='dollars') }} -

So this means you are spending approximately $X annually

+

So this means you are spending approximately $!{ annualSpend } annually

{{ TextInput(f.dollar_value, validation='dollars') }} {{ TextInput(f.number_user_sessions, validation='integer') }} {{ TextInput(f.average_daily_traffic, placeholder='Gigabytes per day', validation='gigabytes') }}