Skip to content
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
18 changes: 18 additions & 0 deletions app/controllers/account/billing/invoices/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ export default class extends Controller.extend(EmberTableControllerMixin) {
{
name : 'View Invoice',
valuePath : 'invoicePdfUrl'
},
{
name : 'Action',
valuePath : 'identifier',
extraValuePaths : ['status'],
cellComponent : 'ui-table/cell/events/cell-action'
}

];
Expand Down Expand Up @@ -88,6 +94,12 @@ export default class extends Controller.extend(EmberTableControllerMixin) {
{
name : 'View Invoice',
valuePath : 'invoicePdfUrl'
},
{
name : 'Action',
valuePath : 'identifier',
extraValuePaths : ['status'],
cellComponent : 'ui-table/cell/events/cell-action'
}

];
Expand All @@ -111,6 +123,12 @@ export default class extends Controller.extend(EmberTableControllerMixin) {
{
name : 'Status',
valuePath : 'status'
},
{
name : 'Action',
valuePath : 'identifier',
extraValuePaths : ['status'],
cellComponent : 'ui-table/cell/events/cell-action'
}

];
Expand Down
9 changes: 9 additions & 0 deletions app/templates/components/ui-table/cell/events/cell-action.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{{#if (eq extraRecords.status 'due')}}
{{#link-to 'event-invoice.review' record class='ui blue button'}}
{{t 'Review and Pay'}}
{{/link-to}}
{{else}}
{{#link-to 'event-invoice.paid' record class='ui green button'}}
{{t 'See Payment'}}
{{/link-to}}
{{/if}}