Skip to content
Snippets Groups Projects
Commit 32b8dd6d authored by david.truong's avatar david.truong
Browse files

Enlever boutons annuler des cartes rendez-vous déjà passés

parent 232b640b
Branches
No related tags found
1 merge request!15Deleted rpg_app/assets/fonts/Inter-Bold.ttf,...
...@@ -64,6 +64,9 @@ const ConfirmDelete = (data, up) => { ...@@ -64,6 +64,9 @@ const ConfirmDelete = (data, up) => {
const RDVCard = ({ data, up }) => { const RDVCard = ({ data, up }) => {
const navigation = useNavigation(); const navigation = useNavigation();
const today = new Date()
const dateCard = new Date(data.date)
console.log(data.date)
return ( return (
<View style={{ backgroundColor: COLORS.white, borderRadius: SIZES.font, marginBottom: SIZES.extraLarge, margin: SIZES.base, ...SHADOWS.dark}}> <View style={{ backgroundColor: COLORS.white, borderRadius: SIZES.font, marginBottom: SIZES.extraLarge, margin: SIZES.base, ...SHADOWS.dark}}>
<View style={{ width: "100%", height: 150 }}> <View style={{ width: "100%", height: 150 }}>
...@@ -82,7 +85,7 @@ const RDVCard = ({ data, up }) => { ...@@ -82,7 +85,7 @@ const RDVCard = ({ data, up }) => {
<View style={{ flexDirection: "row"}}> <View style={{ flexDirection: "row"}}>
<RectButton minWidth={85} fontSize={SIZES.font} text="Détails" handlePress={() => navigation.navigate("Details", { data })}/> <RectButton minWidth={85} fontSize={SIZES.font} text="Détails" handlePress={() => navigation.navigate("Details", { data })}/>
<RectButton minWidth={85} fontSize={SIZES.font} text="Annuler" handlePress={() => ConfirmDelete(data, up)}/> {(today <= dateCard) && (<RectButton minWidth={85} fontSize={SIZES.font} text="Annuler" handlePress={() => ConfirmDelete(data, up)}/>)}
</View> </View>
</View> </View>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment