diff --git a/app/components/ui-table/cell/events/cell-download-invoice.js b/app/components/ui-table/cell/events/cell-download-invoice.js deleted file mode 100644 index 17be14697e8..00000000000 --- a/app/components/ui-table/cell/events/cell-download-invoice.js +++ /dev/null @@ -1,5 +0,0 @@ -import classic from 'ember-classic-decorator'; -import Component from '@ember/component'; - -@classic -export default class CellDownloadInvoice extends Component {} diff --git a/app/components/ui-table/cell/events/cell-event-invoice.js b/app/components/ui-table/cell/events/cell-event-invoice.js deleted file mode 100644 index c0a60424cfd..00000000000 --- a/app/components/ui-table/cell/events/cell-event-invoice.js +++ /dev/null @@ -1,5 +0,0 @@ -import classic from 'ember-classic-decorator'; -import Component from '@ember/component'; - -@classic -export default class CellEventInvoice extends Component {} diff --git a/app/controllers/account/billing/invoices/list.js b/app/controllers/account/billing/invoices/list.js index 8a728acfdab..193b1f196cd 100644 --- a/app/controllers/account/billing/invoices/list.js +++ b/app/controllers/account/billing/invoices/list.js @@ -11,18 +11,27 @@ export default class extends Controller.extend(EmberTableControllerMixin) { cellComponent : 'ui-table/cell/events/cell-download-invoice' }, { - name : 'Event Name', - valuePath : 'event', - cellComponent : 'ui-table/cell/events/cell-event-invoice' + name : 'Event Name', + valuePath : 'event.name' }, { - name : 'Date', - valuePath : 'issuedAt', - isSortable : true, + name : 'Invoice Date', + valuePath : 'issuedAt', + isSortable : true, cellComponent : 'ui-table/cell/cell-date', - options: { - timezone: 'UTC', - dateFormat: 'MMMM DD, YYYY' + options : { + timezone : 'UTC', + dateFormat : 'MMMM DD, YYYY' + } + }, + { + name : 'Due Date', + valuePath : 'dueAt', + isSortable : true, + cellComponent : 'ui-table/cell/cell-date', + options : { + timezone : 'UTC', + dateFormat : 'MMMM DD, YYYY' } }, { diff --git a/app/models/event-invoice.js b/app/models/event-invoice.js index 96d467c559c..ed457e30500 100644 --- a/app/models/event-invoice.js +++ b/app/models/event-invoice.js @@ -15,6 +15,7 @@ export default ModelBase.extend({ brand : attr('string'), createdAt : attr('moment'), issuedAt : attr('moment'), + dueAt : attr('moment'), paymentMode : attr('string'), stripeToken : attr('string'), last4 : attr('string'), diff --git a/app/routes/account/billing/index.js b/app/routes/account/billing/index.js index 7e9a38db3a6..1768b612562 100644 --- a/app/routes/account/billing/index.js +++ b/app/routes/account/billing/index.js @@ -8,6 +8,6 @@ export default class extends Route.extend(AuthenticatedRouteMixin) { beforeModel() { super.beforeModel(...arguments); - this.replaceWith('account.billing.payment-info'); + this.replaceWith('account.billing.invoices'); } } diff --git a/app/routes/account/billing/invoices/list.js b/app/routes/account/billing/invoices/list.js index 88888fc55fb..2424dedae05 100644 --- a/app/routes/account/billing/invoices/list.js +++ b/app/routes/account/billing/invoices/list.js @@ -1,5 +1,4 @@ import Route from '@ember/routing/route'; -import moment from 'moment'; import EmberTableRouteMixin from 'open-event-frontend/mixins/ember-table-route'; import { action } from '@ember/object'; import { capitalize } from 'lodash-es'; @@ -25,23 +24,6 @@ export default class extends Route.extend(EmberTableRouteMixin) { val : params.invoice_status } ]; - } else if (params.invoice_status === 'upcoming') { - filterOptions = [ - { - and: [ - { - name : 'deleted-at', - op : 'eq', - val : null - }, - { - name : 'issued-at', - op : 'ge', - val : moment().subtract(30, 'days').toISOString() - } - ] - } - ]; } diff --git a/app/templates/account/billing.hbs b/app/templates/account/billing.hbs index c793ae11e21..15159c2b2f3 100644 --- a/app/templates/account/billing.hbs +++ b/app/templates/account/billing.hbs @@ -2,12 +2,12 @@
- - {{t 'Payment Information'}} - {{t 'Invoices'}} + + {{t 'Payment Information'}} +
diff --git a/app/templates/account/billing/invoices.hbs b/app/templates/account/billing/invoices.hbs index eca25b961d4..0c6400dfd07 100644 --- a/app/templates/account/billing/invoices.hbs +++ b/app/templates/account/billing/invoices.hbs @@ -11,9 +11,6 @@ {{t 'Paid'}} - - {{t 'Upcoming'}} - {{t 'Refunding'}} diff --git a/app/templates/components/ui-table/cell/events/cell-download-invoice.hbs b/app/templates/components/ui-table/cell/events/cell-download-invoice.hbs index 8ddb295a1cf..bf02f42ba38 100644 --- a/app/templates/components/ui-table/cell/events/cell-download-invoice.hbs +++ b/app/templates/components/ui-table/cell/events/cell-download-invoice.hbs @@ -1,4 +1,3 @@ -

{{this.record}}

- - + + {{@record}} diff --git a/app/templates/components/ui-table/cell/events/cell-event-invoice.hbs b/app/templates/components/ui-table/cell/events/cell-event-invoice.hbs deleted file mode 100644 index 401c882fd38..00000000000 --- a/app/templates/components/ui-table/cell/events/cell-event-invoice.hbs +++ /dev/null @@ -1,3 +0,0 @@ -
- Event Logo
{{this.record.name}} -
\ No newline at end of file diff --git a/app/templates/event-invoice/review.hbs b/app/templates/event-invoice/review.hbs index ad597117b5c..2e0175a92b5 100644 --- a/app/templates/event-invoice/review.hbs +++ b/app/templates/event-invoice/review.hbs @@ -17,6 +17,9 @@
{{t 'Date Issued'}}: {{general-date this.model.issuedAt 'UTC' 'MMMM DD, YYYY'}}
+
+ {{t 'Due Date'}}: {{general-date this.model.dueAt 'UTC' 'MMMM DD, YYYY'}} +
{{t 'Total Invoice Amount'}}: {{currency-symbol this.model.event.paymentCurrency}} {{format-money this.model.amount}}
diff --git a/tests/acceptance/invoices-test.js b/tests/acceptance/invoices-test.js index c3b1180534e..18898d99c6a 100644 --- a/tests/acceptance/invoices-test.js +++ b/tests/acceptance/invoices-test.js @@ -16,6 +16,6 @@ module('Acceptance | account/billing/invoices', function(hooks) { test('visiting account/billing/invoices with login', async function(assert) { await login(assert); await visit('/account/billing/invoices'); - assert.equal(currentURL(), '/account/billing/invoices'); + assert.equal(currentURL(), '/account/billing/invoices/all'); }); });