Skip to content

Commit

Permalink
Update as per PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Jozzey committed Sep 4, 2024
1 parent 3eaaa20 commit ae87adb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/services/bill-runs/setup/submit-year.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ async function go (sessionId, payload) {
}

const regionId = session.region
const twoPartTariff = session.type.startsWith('two_part')
const licenceSupplementaryYears = await FetchLicenceSupplementaryYearsService.go(regionId, twoPartTariff)
const twoPartTariffSupplementary = session.type === 'two_part_supplementary'
const licenceSupplementaryYears = await FetchLicenceSupplementaryYearsService.go(regionId, twoPartTariffSupplementary)

const formattedData = YearPresenter.go(licenceSupplementaryYears, session)

Expand Down
6 changes: 3 additions & 3 deletions app/services/bill-runs/setup/year.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
*/

const FetchLicenceSupplementaryYearsService = require('./fetch-licence-supplementary-years.service.js')
const YearPresenter = require('../../../presenters/bill-runs/setup/year.presenter.js')
const SessionModel = require('../../../models/session.model.js')
const YearPresenter = require('../../../presenters/bill-runs/setup/year.presenter.js')

/**
* Orchestrates fetching and presenting the data for `/bill-runs/setup/{sessionId}/year` page
Expand All @@ -23,8 +23,8 @@ async function go (sessionId) {
const session = await SessionModel.query().findById(sessionId)

const regionId = session.region
const twoPartTariff = session.type.startsWith('two_part')
const licenceSupplementaryYears = await FetchLicenceSupplementaryYearsService.go(regionId, twoPartTariff)
const twoPartTariffSupplementary = session.type === 'two_part_supplementary'
const licenceSupplementaryYears = await FetchLicenceSupplementaryYearsService.go(regionId, twoPartTariffSupplementary)

const formattedData = YearPresenter.go(licenceSupplementaryYears, session)

Expand Down

0 comments on commit ae87adb

Please sign in to comment.