Browse Source

various fixes for ios

master
Elias Sebbar 2 years ago
parent
commit
aa30f6d522

+ 1
- 1
components/add_depense.js View File

@@ -7,7 +7,7 @@ import DepenseForm from './depense_edit/depense_form';
7 7
 export default function AddDepense(props){
8 8
     const [addingDepense, onAddDepense] = React.useState(false);
9 9
 
10
-    return (<SafeAreaView style={ add_depenses_styles.overlay }>
10
+    return (<SafeAreaView pointerEvents="box-none" style={ add_depenses_styles.overlay }>
11 11
     <View >
12 12
         {addingDepense ? 
13 13
             <DepenseForm fetchDepenses={props.fetchDepenses} onAddDepense={onAddDepense}/>

+ 1
- 1
components/depenses_list.js View File

@@ -49,7 +49,7 @@ function DepensesList(props)
49 49
                     // get depenses that are on the current day
50 50
                     var depenses_day = depenses.filter( obj => {
51 51
                         var tpDate = new Date(obj.date);
52
-                        return tpDate.getUTCFullYear() == day.getUTCFullYear() && tpDate.getUTCMonth() == day.getUTCMonth() && tpDate.getUTCDate() == day.getUTCDate()
52
+                        return tpDate.getFullYear() == day.getFullYear() && tpDate.getMonth() == day.getMonth() && tpDate.getDate() == day.getDate()
53 53
                     } )
54 54
 
55 55
                     data.push(

+ 4
- 1
components/list/day_list.js View File

@@ -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

+ 2
- 1
components/title_bar.js View File

@@ -73,7 +73,8 @@ const title_bar_styles = StyleSheet.create({
73 73
       paddingBottom: 5,
74 74
     },
75 75
     input: {
76
-        borderWidth: 0.5
76
+        borderWidth: 0.5,
77
+        width: 100,
77 78
     },
78 79
     highlighted: {
79 80
         backgroundColor: "#ff8899",

Loading…
Cancel
Save