Skip to content
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

add initial router and controller for the issue details page #247

Merged
merged 6 commits into from
Aug 9, 2024
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
5 changes: 5 additions & 0 deletions src/controllers/OrganisationsController.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,11 @@ const organisationsController = {
logger.warn(`getDAtasetTaskList() failed for lpa='${lpa}', datasetId='${datasetId}'`, { type: types.App })
next(e)
}
},

async getIssueDetails (req, res, next) {
const params = {}
res.render('organisations/issueDetails.html', params)
}

}
Expand Down
2 changes: 2 additions & 0 deletions src/routes/organisations.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import OrganisationsController from '../controllers/OrganisationsController.js'

const router = express.Router()

router.get('/:lpa/:dataset/get-started', OrganisationsController.getGetStarted)
router.get('/:lpa/:dataset/:issueType', OrganisationsController.getIssueDetails)
router.get('/:lpa/:dataset/get-started', OrganisationsController.getGetStarted)
router.get('/:lpa/:dataset', OrganisationsController.getDatasetTaskList)
router.get('/:lpa', OrganisationsController.getOverview)
Expand Down
1 change: 1 addition & 0 deletions src/views/organisations/issueDetails.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<h1>under construction</h1>
8 changes: 8 additions & 0 deletions test/unit/organisationsController.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -271,4 +271,12 @@ describe('OrganisationsController.js', () => {
expect(next).toHaveBeenCalledWith(expect.any(Error))
})
})

describe('issue details', () => {
it.todo('should call render with the issue details page')

it.todo('should fetch the issue details and pass the on to the template')

it.todo('should catch errors and pass them onto the next function ')
})
})