Skip to content

fix: Use UTC timezone for invoice issue dates #5204

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

Merged
merged 1 commit into from
Sep 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/components/ui-table/cell/cell-date.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{general-date @record @props.options.timezone @props.options.dateFormat}}
7 changes: 6 additions & 1 deletion app/controllers/account/billing/invoices/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ export default class extends Controller.extend(EmberTableControllerMixin) {
{
name : 'Date',
valuePath : 'issuedAt',
isSortable : true
isSortable : true,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy found an issue: Missing space after key 'isSortable'.

cellComponent : 'ui-table/cell/cell-date',
options: {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy found an issue: Missing space after key 'options'.

timezone: 'UTC',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy found an issue: Missing space after key 'timezone'.

dateFormat: 'MMMM DD, YYYY'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy found an issue: Missing space after key 'dateFormat'.

}
},
{
name : 'Amount',
Expand Down
6 changes: 4 additions & 2 deletions app/routes/event-invoice/review.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ export default class extends Route {
return this.l10n.tVar(`Review Event Invoice - ${model.get('identifier')}`);
}

model(params) {
return this.store.findRecord('event-invoice', params.invoice_identifier, {
async model(params) {
const model = await this.store.findRecord('event-invoice', params.invoice_identifier, {
include : 'event,user',
reload : true
});
await model.reload();
return model;
}

afterModel(model) {
Expand Down
2 changes: 1 addition & 1 deletion app/templates/event-invoice/review.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<strong>{{t 'Event Name'}}:</strong> {{this.model.event.name}}
</div>
<div class="item">
<strong>{{t 'Date Issued'}}:</strong> {{moment-format this.model.issuedAt 'MM/DD/YYYY'}}
<strong>{{t 'Date Issued'}}:</strong> {{general-date this.model.issuedAt 'UTC' 'MMMM DD, YYYY'}}
</div>
<div class="item">
<strong>{{t 'Total Invoice Amount'}}:</strong> {{currency-symbol this.model.event.paymentCurrency}} {{format-money this.model.amount}}
Expand Down