|
@@ -23,6 +23,8 @@ export default function DayList(props)
|
23
|
23
|
)
|
24
|
24
|
total += depense.value;
|
25
|
25
|
});
|
|
26
|
+ console.log("####");
|
|
27
|
+ console.log(props.dailyObjective);
|
26
|
28
|
let scale = Math.min(1, total/props.dailyObjective)
|
27
|
29
|
|
28
|
30
|
|
|
@@ -35,7 +37,8 @@ export default function DayList(props)
|
35
|
37
|
bg_color = "#FF"+
|
36
|
38
|
strLPad(parseInt(255 + Math.max(-255,(result / props.dailyObjective) * 100)).toString(16), 2, '0') +
|
37
|
39
|
strLPad(parseInt(255 + Math.max(-255, (result / props.dailyObjective) * 100)).toString(16), 2, '0')
|
38
|
|
-
|
|
40
|
+ console.log(bg_color);
|
|
41
|
+ console.log(scale);
|
39
|
42
|
return (
|
40
|
43
|
<View style={[day_list_styles.day_list_container, {backgroundColor: bg_color}, isCurrentday ? day_list_styles.current_day_container : null]}>
|
41
|
44
|
<LinearGradient
|