Sfoglia il codice sorgente

various fixes for ios

master
Elias Sebbar 2 anni fa
parent
commit
aa30f6d522

+ 1
- 1
components/add_depense.js Vedi File

7
 export default function AddDepense(props){
7
 export default function AddDepense(props){
8
     const [addingDepense, onAddDepense] = React.useState(false);
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
     <View >
11
     <View >
12
         {addingDepense ? 
12
         {addingDepense ? 
13
             <DepenseForm fetchDepenses={props.fetchDepenses} onAddDepense={onAddDepense}/>
13
             <DepenseForm fetchDepenses={props.fetchDepenses} onAddDepense={onAddDepense}/>

+ 1
- 1
components/depenses_list.js Vedi File

49
                     // get depenses that are on the current day
49
                     // get depenses that are on the current day
50
                     var depenses_day = depenses.filter( obj => {
50
                     var depenses_day = depenses.filter( obj => {
51
                         var tpDate = new Date(obj.date);
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
                     data.push(
55
                     data.push(

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

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

+ 2
- 1
components/title_bar.js Vedi File

73
       paddingBottom: 5,
73
       paddingBottom: 5,
74
     },
74
     },
75
     input: {
75
     input: {
76
-        borderWidth: 0.5
76
+        borderWidth: 0.5,
77
+        width: 100,
77
     },
78
     },
78
     highlighted: {
79
     highlighted: {
79
         backgroundColor: "#ff8899",
80
         backgroundColor: "#ff8899",

Loading…
Annulla
Salva