Skip to content

Commit

Permalink
fix: eslint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
trev-dev committed Jan 11, 2025
1 parent bcf17d9 commit f4352c8
Showing 1 changed file with 7 additions and 31 deletions.
38 changes: 7 additions & 31 deletions frontend/src/views/applications/ApplicationsHistoryView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -225,11 +225,7 @@ export default {
const hiddenCodes = [APPLICATION_STATUS_CODES.EXPIRED, APPLICATION_STATUS_CODES.REDIRECTED]
return this.sortApplicationItems(
this.applicationItems
.filter(
(application) =>
!this.facilityNameFilter ||
application.facilityName?.toLowerCase().includes(this.facilityNameFilter.toLowerCase()),
)
.filter((application) => !this.facilityNameFilter || application.facilityName?.toLowerCase().includes(this.facilityNameFilter.toLowerCase()))
.filter((application) => !hiddenCodes.includes(application.statusCode)),
)
},
Expand Down Expand Up @@ -308,16 +304,9 @@ export default {
},
showPDFDownloadButton(application) {
const invalidAppCodes = [
APPLICATION_STATUS_CODES.INELIGIBLE,
APPLICATION_STATUS_CODES.CANCELLED_BY_MINISTRY,
APPLICATION_STATUS_CODES.CANCELLED_BY_SP,
]
const invalidAppCodes = [APPLICATION_STATUS_CODES.INELIGIBLE, APPLICATION_STATUS_CODES.CANCELLED_BY_MINISTRY, APPLICATION_STATUS_CODES.CANCELLED_BY_SP]
if (
application.applicationType === APPLICATION_TYPES.IRREGULAR_EXPENSE ||
invalidAppCodes.includes(application.statusCode)
) {
if (application.applicationType === APPLICATION_TYPES.IRREGULAR_EXPENSE || invalidAppCodes.includes(application.statusCode)) {
return false
//OFM core generates PDF upon submit - Supp App generates PDF only once approved
} else if (application.applicationType === APPLICATION_TYPES.OFM) {
Expand Down Expand Up @@ -357,14 +346,10 @@ export default {
// Application button
await Promise.all(
applications.map(async (application) => {
application.status =
application.statusCode === APPLICATION_STATUS_CODES.VERIFIED ? 'In Review' : application.status
application.status = application.statusCode === APPLICATION_STATUS_CODES.VERIFIED ? 'In Review' : application.status
// we should ignore MOD igreements below - if MOD FA is in status of not active - it will prevent the user
// from applying for Irreg Expense funding
application.fundingAgreement = await FundingAgreementService.getActiveFundingAgreementByApplicationId(
application.applicationId,
true,
)
application.fundingAgreement = await FundingAgreementService.getActiveFundingAgreementByApplicationId(application.applicationId, true)
}),
)
this.applications = applications
Expand Down Expand Up @@ -446,24 +431,15 @@ export default {
this.applicationItems = [...this.applicationItems, ...supplementaryApplicationItems, ...this.irregularExpenses]
},
getStatusLabel(applicationItem) {
if (
[APPLICATION_STATUS_CODES.CANCELLED_BY_SP, APPLICATION_STATUS_CODES.CANCELLED_BY_MINISTRY].includes(
applicationItem.statusCode,
)
) {
if ([APPLICATION_STATUS_CODES.CANCELLED_BY_SP, APPLICATION_STATUS_CODES.CANCELLED_BY_MINISTRY].includes(applicationItem.statusCode)) {
return 'Cancelled'
}
return applicationItem.status
},
getStatusClass(statusCode) {
if (
this.DRAFT_STATUS_CODES.includes(statusCode) ||
[
APPLICATION_STATUS_CODES.REDIRECTED,
APPLICATION_STATUS_CODES.INELIGIBLE,
APPLICATION_STATUS_CODES.CANCELLED_BY_MINISTRY,
APPLICATION_STATUS_CODES.CANCELLED_BY_SP,
].includes(statusCode)
[APPLICATION_STATUS_CODES.REDIRECTED, APPLICATION_STATUS_CODES.INELIGIBLE, APPLICATION_STATUS_CODES.CANCELLED_BY_MINISTRY, APPLICATION_STATUS_CODES.CANCELLED_BY_SP].includes(statusCode)
) {
return 'status-gray'
} else if (
Expand Down

0 comments on commit f4352c8

Please sign in to comment.