-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename variable and function names and add functional tests for booking workflows #131
base: main
Are you sure you want to change the base?
Conversation
vidya-ram
commented
Jan 31, 2017
- Rename variable and function names to follow camel case convention.
- Change boxoffice widget variable.
- Add currency format function to client side.
- Add functional tests for booking workflows using Casperjs
…ency formatting for all prices and amounts.
boxoffice/static/js/models/util.js
Outdated
@@ -21,22 +21,22 @@ export const Util = { | |||
} | |||
} | |||
|
|||
export const fetch = function(config){ | |||
export const Fetch = function(config){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this capitalized? Capitals are usually reserved for constructors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or for container objects.
boxoffice/static/js/models/util.js
Outdated
return $.ajax({ | ||
url: config.url, | ||
type: 'POST', | ||
dataType: 'json' | ||
}); | ||
} | ||
|
||
export const scrollToElement = function(element, speed=500) { | ||
export const ScrollToElement = function(element, speed=500) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above. This should be scrollToElement
.
{{#details:k,v}} | ||
{{#if k !== 'logo'}} | ||
<p class="section-title">{{k}}</p> | ||
<div class="section-content">{{{details[k]}}}</div> | ||
<p class="section-title">{{ k }}</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is k
?
<p><span class="italic-title">Final amount:</span> {{ currency }}{{ final_amount }}</p> | ||
<p><span class="italic-title">Base amount:</span> {{ formatCurrency(base_amount) }}</p> | ||
<p><span class="italic-title">Discounted amount:</span> {{ formatCurrency(discounted_amount) }}</p> | ||
<p><span class="italic-title">Final amount:</span> {{ formatCurrency(final_amount) }}</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't base_amount
, discounted_amount
and final_amount
also be in camelCase?