Mandatory Assignment 2

Description

The mission is to create a simple app where a user can list either all programs or all data sets fetched from a DHIS2 instance.

The user should be able to click on an a specific program or data set from the list and more details (id, name and created at date) should be shown.

The app must use the starting code we have provided. Visual changes is of course permitted, but you must still try to use components from the @dhis2/ui library as much as possible. All data fetching must be done through the app runtime's useDataQuery hook.

Queries

As already mentioned, all data fetching must be performed using the app runtime's data fetching hook. To help you on your way, we'll give you the properties of the two queries you need to fetch data sets and programs.

No modifications

Do not make modifications to these queries as they are sufficient for your task and changing them might break the automated tests. Keep the order of the fields and do not add additional parameters.

Programs

{
resource: 'programs',
params: {
paging: false,
fields: ['id', 'name', 'created'],
}
}

Data sets

{
resource: 'dataSets',
params: {
paging: false,
fields: ['id', 'name', 'created'],
}
}