-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
fix: Restructure Account Invoice Tab #5049
Changes from 2 commits
a10f78c
9673490
1b77767
bcf342d
e624591
1deb03b
df5ea51
50574e5
a3d9fdc
c1bb4c1
3b7415d
46d819e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,12 @@ export default class extends Route.extend(EmberTableRouteMixin) { | |
return this.l10n.t('Due'); | ||
case 'upcoming': | ||
return this.l10n.t('Upcoming'); | ||
case 'unpaid': | ||
return this.l10n.t('Unpaid'); | ||
case 'refunding': | ||
return this.l10n.t('Refunding'); | ||
case 'refunded': | ||
return this.l10n.t('Refunded'); | ||
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. Simply use capitalize function instead of switch case. Check out 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. ok |
||
case 'all': | ||
return this.l10n.t('All'); | ||
} | ||
|
@@ -21,7 +27,7 @@ export default class extends Route.extend(EmberTableRouteMixin) { | |
this.set('params', params); | ||
const searchField = 'status'; | ||
let filterOptions = []; | ||
if (params.invoice_status === 'paid' || params.invoice_status === 'due') { | ||
if (params.invoice_status === 'paid' || params.invoice_status === 'due' || params.invoice_status === 'refunding' || params.invoice_status === 'refunded') { | ||
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. Use |
||
filterOptions = [ | ||
{ | ||
name : 'status', | ||
|
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.
I don't understand. It's the exact same code. Why are there else if statements everywhere?
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.
it will be changed, I don't know what would be the exact column name. Not mentioned in issue.