Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

only display time range in statement PDF when range is available (#6896, #6897) #6933

Merged
merged 2 commits into from
Feb 16, 2017
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
9 changes: 8 additions & 1 deletion js/about/contributionStatement.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,12 +262,19 @@ class ContributionStatement extends ImmutableComponent {
return pages
}

get contributionDateRangeString () {
if (this.lastContributionHumanFormattedDate !== '') {
return (this.lastContributionHumanFormattedDate + ' - ' + this.thisContributionHumanFormattedDate)
}
return null
}

ContributionStatementDetailTable (page, pageIdx, totalPages) {
return (
<div className='contributionStatementDetailTableContainer'>
<div>
<span className='statementDatesCoveredText pull-right'>
{ this.lastContributionHumanFormattedDate } - { this.thisContributionHumanFormattedDate }
{ this.contributionDateRangeString }
</span>
<table className='contributionStatementDetailTable'>
<tbody>
Expand Down
2 changes: 1 addition & 1 deletion tools/lib/utilApp/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ app.on('ready', () => {
cleanUserData(process.argv[3])
break
case 'addSimulatedLedgerTransactions':
addSimulatedLedgerTransactions(process.argv[3])
addSimulatedLedgerTransactions(parseInt(process.argv[3]))
break
case 'addSimulatedSynopsisVisits':
addSimulatedSynopsisVisits(process.argv[3])
Expand Down
2 changes: 1 addition & 1 deletion tools/utilAppRunner.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function runUtilApp (cmd, file, stdioOptions) {
}
cmd = cmd.split(' ')
if (process.env.NODE_ENV === 'development') {
cmd.push('--user-data-dir=brave-development')
cmd.push('--user-data-dir=../../../brave-development')
Copy link
Member

Choose a reason for hiding this comment

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

@willy-b - what's the motivation behind this change, i think it might break some other tests...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good question, @mrose17. This change ensures Brave has the right path to ledger-state.json when NODE_ENV is set to development.

Reason:
For these utility scripts, the userData path is retrieved via app.getPath(\"userData\") run in ./tools/lib/utilApp/index.js (three directory levels removed from the base of the repo).
Before this change, ./tools/utilAppRunner.js was running brave with --user-data-dir=brave-development, which would cause Brave to look in ./tools/lib/utilApp/brave-development instead of ./brave-development.

What tests do you think it might break?

}
const utilApp = proc.spawnSync('electron', [utilAppDir].concat(cmd), options)
if (utilApp.error) {
Expand Down