mini change in anomalies

This commit is contained in:
tuanvu
2025-12-13 21:19:57 +01:00
parent 208de892d4
commit 85fc76ddec
2 changed files with 12 additions and 4 deletions

View File

@@ -76,8 +76,8 @@ export default function GestionnaireRessource() {
onPress={async () => { onPress={async () => {
setFilterType(t); setFilterType(t);
setShowFilterMenu(false); setShowFilterMenu(false);
const updatedChantiers = await getRessources(); const updateRessource = await getRessources();
setRessources(updatedChantiers) setRessources(updateRessource)
}} }}
> >
<ThemedText style={{ textAlign: "center" }}>{t}</ThemedText> <ThemedText style={{ textAlign: "center" }}>{t}</ThemedText>

View File

@@ -66,7 +66,7 @@ export default function Anomaly({data,style}: Props) {
{data.chantier.anomalies.length > 0 ? ( {data.chantier.anomalies.length > 0 ? (
data.chantier.anomalies.map((anomaly, index) => ( data.chantier.anomalies.map((anomaly, index) => (
<ThemedView key={index} lvl={2} style={styles.anomalyItem}> <ThemedView key={index} lvl={2} style={styles.anomalyItem}>
<ThemedText> {anomaly}</ThemedText> <ThemedText style={styles.anomalyText}> {anomaly}</ThemedText>
<TouchableOpacity onPress={() => handleDelete(anomaly)} style={styles.deleteButton}> <TouchableOpacity onPress={() => handleDelete(anomaly)} style={styles.deleteButton}>
<Text style={styles.deleteText}></Text> <Text style={styles.deleteText}></Text>
</TouchableOpacity> </TouchableOpacity>
@@ -99,7 +99,7 @@ const styles = StyleSheet.create({
anomaliesContainer: { anomaliesContainer: {
padding: 5, padding: 5,
borderRadius: 10, borderRadius: 10,
height: 150, //height: 150,
}, },
anomaliesTitle: { anomaliesTitle: {
fontSize: 16, fontSize: 16,
@@ -107,10 +107,16 @@ const styles = StyleSheet.create({
marginBottom: 8, marginBottom: 8,
}, },
anomalyItem: { anomalyItem: {
flexDirection: "row",
alignItems: "flex-start",
padding: 8, padding: 8,
marginBottom: 5, marginBottom: 5,
borderRadius: 8, borderRadius: 8,
}, },
anomalyText: {
flex: 1,
marginLeft: 5,
},
noAnomaly: { noAnomaly: {
fontStyle: "italic", fontStyle: "italic",
opacity: 0.7, opacity: 0.7,
@@ -133,6 +139,7 @@ const styles = StyleSheet.create({
//add anomaly styles //add anomaly styles
addContainer: { addContainer: {
marginTop: 10, marginTop: 10,
marginLeft: 2,
flexDirection: "row", flexDirection: "row",
alignItems: "center" alignItems: "center"
}, },
@@ -144,6 +151,7 @@ const styles = StyleSheet.create({
marginRight: 8, marginRight: 8,
}, },
addButton: { addButton: {
color: "white",
paddingVertical: 8, paddingVertical: 8,
paddingHorizontal: 12, paddingHorizontal: 12,
borderRadius: 8, borderRadius: 8,