Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
masimons committed Aug 6, 2024
1 parent 5cb5189 commit ff7d467
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
14 changes: 6 additions & 8 deletions packages/client/src/components/GrantsTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -284,17 +284,15 @@ export default {
const formattedDate = new Date(date).toLocaleDateString('en-US', { timeZone: 'UTC' });
if (['posted'].includes(status) && !date) {
return 'Not yet issued';
} else if (status === 'forecasted') {
if (!!date) {
} if (status === 'forecasted') {
if (date) {
return `est. ${formattedDate}`;
} else if (!!close_date_explanation) {
return "See details";
} else {
return "Not yet issued";
} if (close_date_explanation) {

Check failure on line 290 in packages/client/src/components/GrantsTable.vue

View workflow job for this annotation

GitHub Actions / qa / Lint JavaScript

Identifier 'close_date_explanation' is not in camel case
return 'See details';
}
} else {
return formattedDate;
return 'Not yet issued';
}
return formattedDate;
};
const generateOpenDate = (date, status) => {
const formattedDate = new Date(date).toLocaleDateString('en-US', { timeZone: 'UTC' });
Expand Down
9 changes: 4 additions & 5 deletions packages/client/src/views/GrantDetailsView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -379,20 +379,19 @@ export default {
if (this.currentGrant.opportunity_status === 'forecasted') {
// change this.currentGrant.open_date to relevant field
// check for date validity here and in closeDateDisplay
return `est. ${this.formatDate(this.currentGrant.open_date)}`
return `est. ${this.formatDate(this.currentGrant.open_date)}`;
}
return this.formatDate(this.currentGrant.open_date);
},
closeDateDisplay() {
// If we have an explainer text instead of a real close date, display that instead
if (this.currentGrant.close_date === FAR_FUTURE_CLOSE_DATE) {
return this.currentGrant.close_date_explanation ?? NOT_AVAILABLE_TEXT;
} else if (this.currentGrant.opportunity_status === 'forecasted') { // what if we check for posted status as well?
} if (this.currentGrant.opportunity_status === 'forecasted') { // what if we check for posted status as well?
if (!this.currentGrant.close_date) {
return this.currentGrant.close_date_explanation ? this.currentGrant.close_date_explanation : "Not yet issued";
} else {
return `est. ${this.formatDate(this.currentGrant.close_date)}`;
return this.currentGrant.close_date_explanation ? this.currentGrant.close_date_explanation : 'Not yet issued';
}
return `est. ${this.formatDate(this.currentGrant.close_date)}`;
}
return this.formatDate(this.currentGrant.close_date);
},
Expand Down

0 comments on commit ff7d467

Please sign in to comment.