-
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?
Changes from 8 commits
bcb746d
e53c518
9d6d95b
a6de14b
14b83a9
6ab7952
484e63d
d2ce806
4b9f21b
7c59661
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,22 +21,22 @@ export const Util = { | |
} | ||
} | ||
|
||
export const fetch = function(config){ | ||
export const Fetch = function(config){ | ||
return $.ajax({ | ||
url: config.url, | ||
dataType: 'json' | ||
}); | ||
} | ||
|
||
export const post = function(config){ | ||
export const Post = function(config){ | ||
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 commentThe reason will be displayed to describe this comment to others. Learn more. Same as above. This should be |
||
$('html,body').animate({ | ||
scrollTop: $(element).offset().top | ||
}, speed); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,7 +39,7 @@ export const OrderTemplate = ` | |
<td><p class="table-content">{{ buyer_fullname }}</p></td> | ||
<td><p class="table-content">{{ buyer_email }}</p></td> | ||
<td><p class="table-content">{{ buyer_phone }}</p></td> | ||
<td><p class="table-content">{{currency}}{{ amount }}</p></td> | ||
<td><p class="table-content">{{ formatCurrency(amount) }}</p></td> | ||
<td><p class="table-content">{{ order_date }}</p></td> | ||
<td><p class="table-content">{{ id }}</p></td> | ||
<td> | ||
|
@@ -59,12 +59,12 @@ export const OrderTemplate = ` | |
</p> | ||
</td> | ||
</tr> | ||
{{#show_order}} | ||
{{#showOrder}} | ||
<div class="order-slider" intro-outro='fly:{x:200,y:0,duration:200}'> | ||
<button on-click="hideOrder" class="close-button"><i class="fa fa-close"></i></button> | ||
<p class="order-title">Order Invoice No: {{invoice_no}}</p> | ||
<p class="order-title">Order Invoice No: {{ invoice_no }}</p> | ||
<div class="line-items-wrapper"> | ||
{{#line_items:line_item}} | ||
{{#lineItems:lineItem}} | ||
<div class="ticket col-sm-6 col-xs-12" id="item-{{ @index }}"> | ||
<div class="heading"> | ||
<div class="ticket-type"> | ||
|
@@ -74,9 +74,9 @@ export const OrderTemplate = ` | |
<div class="content"> | ||
<div class="content-box"> | ||
<p><span class="italic-title">id:</span> {{ id }}</p> | ||
<p><span class="italic-title">Base amount:</span> {{ currency }}{{ base_amount }}</p> | ||
<p><span class="italic-title">Discounted amount:</span> {{ currency }}{{ discounted_amount }}</p> | ||
<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 commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't |
||
{{#discount_policy}}<p><span class="italic-title">Discount policy:</span> <span class="line-item-discount">{{ discount_policy }}</span>{{/}} | ||
{{#discount_coupon}}<p><span class="italic-title">Discount coupon:</span> <span class="line-item-discount">{{ discount_coupon }}</span>{{/}} | ||
{{#cancelled_at}}<p><b><span class="italic-title cancelled">Cancelled at: {{ cancelled_at }}</span></b></p>{{/}} | ||
|
@@ -96,15 +96,15 @@ export const OrderTemplate = ` | |
Cancel {{#cancelling}}<i class="fa fa-spinner fa-spin"></i>{{/}} | ||
</button> | ||
</p> | ||
<p class="error-msg left-aligned">{{cancel_error}}</p> | ||
<p class="error-msg left-aligned">{{ cancelError }}</p> | ||
{{/}} | ||
</div> | ||
</div> | ||
</div> | ||
{{/}} | ||
{{/lineItems}} | ||
</div> | ||
</div> | ||
{{/show_order}} | ||
{{/showOrder}} | ||
{{/orders}} | ||
</tbody> | ||
<tfoot> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,23 +11,20 @@ export const IndexTemplate = ` | |
</div> | ||
<div class="content"> | ||
<div class="content-box clearfix" intro='fly:{"x":20,"y":"0"}'> | ||
<div class="org-logo"><img src="{{details['logo']}}"/></div> | ||
<div class="org-logo"><img src="{{ details['logo'] }}"/></div> | ||
<p class="section-title">Organization id</p> | ||
<p class="section-content">{{id}}</p> | ||
<p class="section-content">{{ id }}</p> | ||
{{#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 commentThe reason will be displayed to describe this comment to others. Learn more. What is |
||
<div class="section-content">{{{ details[k] }}}</div> | ||
{{/if}} | ||
{{/details}} | ||
<p class="section-title">Contact email</p> | ||
<div class="section-content">{{contact_email}}</div> | ||
<div class="section-content">{{ contact_email }}</div> | ||
<div class="btn-wrapper"> | ||
<a class="boxoffice-button boxoffice-button-action" href="javascript:void(0)" on-click="navigate">View item collections</a> | ||
</div> | ||
{{#infoMsg}} | ||
<p class="info-msg">{{ infoMsg }} <i class="fa fa-check"></i></p> | ||
{{/}} | ||
</div> | ||
</div> | ||
{{/orgs}} | ||
|
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.