@hedia/recommendation-screen 2.2.0-alpha.32 → 2.2.0-alpha.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -30,9 +30,9 @@ export interface IRecommendationProps {
|
|
|
30
30
|
/** The properties of the entered activity that are not used for making the calculation itself, but will be used on the recommendation screen. */
|
|
31
31
|
activityDisplayProps: IActivityDisplayProps | null;
|
|
32
32
|
/** Forecast data received from the app */
|
|
33
|
-
forecast
|
|
33
|
+
forecast: Logbook.Types.ILogbookEntry[`forecast_glucose`];
|
|
34
34
|
/** CGM data received from the app */
|
|
35
|
-
cgm
|
|
35
|
+
cgm: Logbook.Types.ILogbookEntry[`cgm_reading`];
|
|
36
36
|
/**
|
|
37
37
|
* Callback function taking a single boolean argument and returning nothing.
|
|
38
38
|
* To be called when the user decides on a presented carbohydrate recommendation.
|
|
@@ -10,7 +10,7 @@ export interface IProps {
|
|
|
10
10
|
cgm: Logbook.Types.ILogbookEntry[`cgm_reading`];
|
|
11
11
|
/** Unit label to print after the value. */
|
|
12
12
|
unit: BloodGlucoseUnit;
|
|
13
|
-
/**
|
|
13
|
+
/** optional object that contains as properties a valueID and a unitID */
|
|
14
14
|
testID?: {
|
|
15
15
|
valueID: Testing.Id.InfoBarTestIds.Value;
|
|
16
16
|
unitID: Testing.Id.InfoBarTestIds.Unit;
|
|
@@ -46,7 +46,7 @@ const ForecastInfoBar = (props) => {
|
|
|
46
46
|
<View style={forecastSubtitle}>
|
|
47
47
|
<LinearGradient colors={colors.gradientMain} useAngle={true} angle={135} style={forecastDot}/>
|
|
48
48
|
<TextRegular style={forecastText}>{i18n._(t `Forecast time:`)}</TextRegular>
|
|
49
|
-
<TextRegular style={forecastTime}>{
|
|
49
|
+
<TextRegular style={forecastTime}>{`${forecast?.forecastTimestamp}`}</TextRegular>
|
|
50
50
|
</View>
|
|
51
51
|
</View>
|
|
52
52
|
|
|
@@ -42,8 +42,12 @@ export function validateParams(props) {
|
|
|
42
42
|
if (props?.calculatorParams?.activity && props?.activityDisplayProps) {
|
|
43
43
|
checkActivityType(props.activityDisplayProps.activityType);
|
|
44
44
|
}
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
if (props?.forecast) {
|
|
46
|
+
checkForecast(props.forecast);
|
|
47
|
+
}
|
|
48
|
+
if (props?.cgm) {
|
|
49
|
+
checkCGM(props.cgm);
|
|
50
|
+
}
|
|
47
51
|
}
|
|
48
52
|
/**
|
|
49
53
|
* In case the users is providing a blood ketone current level, check if the blood ketone unit is defined.
|