Browse Source

jsais pu

master
DemiSel 3 years ago
parent
commit
7e03a707ac
3 changed files with 11 additions and 9 deletions
  1. 9
    5
      components/depense_list_entry.js
  2. 2
    2
      components/depenses_list.js
  3. 0
    2
      components/list/day_list.js

+ 9
- 5
components/depense_list_entry.js View File

13
                 toggleEdit(!editing);
13
                 toggleEdit(!editing);
14
             }}
14
             }}
15
             style={depense_list_entry_style.pressable_depense_list_entry}>
15
             style={depense_list_entry_style.pressable_depense_list_entry}>
16
-                    <Text >{props.depense.description}</Text>
17
-                    <Text >{new Date(props.depense.date).toDateString()}</Text>
18
-                    <Text >{props.depense.value}</Text>
16
+                    <Text style={depense_list_entry_style.depense_info}>{props.depense.description}</Text>
17
+                    {/* <Text >{new Date(props.depense.date).toDateString()}</Text> */}
18
+                    <Text style={depense_list_entry_style.depense_info}>{props.depense.value}</Text>
19
             </Pressable>
19
             </Pressable>
20
             {editing ? 
20
             {editing ? 
21
                 <DepenseForm fetchDepenses={props.fetchDepenses} onUpdateDepense={(res) => {toggleEdit(res)}} depense={props.depense}/> : 
21
                 <DepenseForm fetchDepenses={props.fetchDepenses} onUpdateDepense={(res) => {toggleEdit(res)}} depense={props.depense}/> : 
33
     pressable_depense_list_entry: {
33
     pressable_depense_list_entry: {
34
         display: "flex",
34
         display: "flex",
35
         flexDirection: "row",
35
         flexDirection: "row",
36
-        justifyContent: "space-between",
36
+        justifyContent: "space-evenly",
37
         margin: 2,
37
         margin: 2,
38
-
38
+    },
39
+    depense_info: {
40
+        paddingLeft: 50,
41
+        paddingRight: 50,
42
+        width: 200,
39
     }
43
     }
40
   });
44
   });

+ 2
- 2
components/depenses_list.js View File

51
 
51
 
52
 
52
 
53
     return(
53
     return(
54
-    <SafeAreaView>
54
+    <View>
55
         <ScrollView>
55
         <ScrollView>
56
             {content}
56
             {content}
57
         </ScrollView>
57
         </ScrollView>
58
-    </SafeAreaView >
58
+    </View>
59
     )
59
     )
60
 }
60
 }
61
 
61
 

+ 0
- 2
components/list/day_list.js View File

22
     let result = props.dailyObjective - total 
22
     let result = props.dailyObjective - total 
23
     let text_color = "#000000";
23
     let text_color = "#000000";
24
     let bg_color = "#FFFFFF";
24
     let bg_color = "#FFFFFF";
25
-    console.log(" "+props.dailyObjective +" - "+total +" = " + result)
26
     if( result > 0)
25
     if( result > 0)
27
         text_color = "#00"+parseInt(100 + (result / props.dailyObjective) * 100).toString(16) + "00"
26
         text_color = "#00"+parseInt(100 + (result / props.dailyObjective) * 100).toString(16) + "00"
28
     else
27
     else
30
             parseInt(255 + (result / props.dailyObjective) * 100).toString(16) + 
29
             parseInt(255 + (result / props.dailyObjective) * 100).toString(16) + 
31
             parseInt(255 + (result / props.dailyObjective) * 100).toString(16)
30
             parseInt(255 + (result / props.dailyObjective) * 100).toString(16)
32
 
31
 
33
-    console.log(text_color)
34
     return (
32
     return (
35
         <View style={[day_list_styles.day_list_container, {backgroundColor: bg_color}]}>
33
         <View style={[day_list_styles.day_list_container, {backgroundColor: bg_color}]}>
36
             <Pressable 
34
             <Pressable 

Loading…
Cancel
Save