Manta Developers
GitHub
Menu

@manta-eu/react/screens/goals

Reference for @manta-eu/react/screens/goals as it is on main.

Type Aliases

GoalStart

GoalStart = object

The reading a goal started from: on or before its start date, or the first after it.

Properties

day

day: string

value

value: number


GoalStarts

GoalStarts = ReadonlyMap<string, GoalStart>

Each goal’s start by the goal’s IRI.


GoalTracking

GoalTracking = { kind: "measured"; } | { kind: "noData"; message: string; } | { kind: "untracked"; message: string; }

Whether a goal has figures, and what to say in place of one when it has none.


MeasureDefinition

MeasureDefinition = object

A goal measure as the ontology defines it: its name, and where Manta reads its figures from or why it has none.

Properties

label

label: string

notTracked?

optional notTracked?: string

source?

optional source?: string


MeasureDefinitions

MeasureDefinitions = ReadonlyMap<string, MeasureDefinition>

Each measure’s definition by its key.


MeasureReading

MeasureReading = object

One reading of a measure: the Sunday that ends the week it covers, and the figure that week.

Properties

day

day: string

value

value: number


MeasureReadings

MeasureReadings = ReadonlyMap<string, readonly MeasureReading[]>

The readings of the measure series each goal follows, by the goal’s IRI, oldest first.

Variables

goalsPath

const goalsPath: "/goals" = "/goals"


proofPath

const proofPath: "/proof" = "/proof"


untrackedMessage

const untrackedMessage: "Manta doesn't read this measure for goals yet." = "Manta doesn't read this measure for goals yet."

Functions

goalsDatastoreRoutes()

goalsDatastoreRoutes(): ReactNode

Returns

ReactNode


goalsNavExtras()

goalsNavExtras(): NavExtra[]

Returns

NavExtra[]


goalTracking()

goalTracking(current, definition): GoalTracking

Measured once it has a figure; otherwise untracked unless its measure names where Manta reads it from.

Parameters

current

number | null

definition

MeasureDefinition | undefined

Returns

GoalTracking