|
@@ -191,26 +191,26 @@ export const DetailsBody: React.FC<DetailsBodyProps> = (props) => {
|
|
|
*/
|
|
|
const EditingDisabledUpperView: React.FC = () => {
|
|
|
if (!groupList) {
|
|
|
- return (
|
|
|
- <View style={{flexDirection: 'row', justifyContent: 'space-between'}}>
|
|
|
- <View style={{flex: 8, flexDirection: 'column', marginBottom: 20}}>
|
|
|
- {props.landmark?.groupCount == -1 ?
|
|
|
- <TouchableOpacity style={styles.groupReturnButton} onPress={() => {props.setLandmark(props.landmark?.parent); toggleGroupList(true)}}>
|
|
|
- <FontAwesome size={15} color="white" name="chevron-left"/>
|
|
|
- <Text style={{color: "white", marginLeft: 5}}>Return to group</Text>
|
|
|
- </TouchableOpacity>
|
|
|
- : null}
|
|
|
- <Text style={{color: 'white', marginBottom: 10, fontSize: 15}}>{lmTypes[props.landmark?.landmark_type]?.label.toUpperCase()}</Text>
|
|
|
- <ScrollView nestedScrollEnabled={true}>
|
|
|
- <Text style={{color: 'white', fontSize: 13}}>{props.landmark?.description}</Text>
|
|
|
- {props.landmark?.expiry_date ?
|
|
|
- <Text style={{color: 'white', fontSize: 13}}>Landmark expires on {props.landmark.expiry_date.toString().substring(0,10)}</Text> : null}
|
|
|
- </ScrollView>
|
|
|
+ return (
|
|
|
+ <View style={{flexDirection: 'row', justifyContent: 'space-between'}}>
|
|
|
+ <View style={{flex: 8, flexDirection: 'column', marginBottom: 20}}>
|
|
|
+ {props.landmark?.groupCount == -1 ?
|
|
|
+ <TouchableOpacity style={styles.groupReturnButton} onPress={() => {props.setLandmark(props.landmark?.parent); toggleGroupList(true)}}>
|
|
|
+ <FontAwesome size={15} color="white" name="chevron-left"/>
|
|
|
+ <Text style={{color: "white", marginLeft: 5}}>Return to group</Text>
|
|
|
+ </TouchableOpacity>
|
|
|
+ : null}
|
|
|
+ <Text style={{color: 'white', marginBottom: 10, fontSize: 15}}>{lmTypes[props.landmark?.landmark_type]?.label.toUpperCase()}</Text>
|
|
|
+ <ScrollView nestedScrollEnabled={true}>
|
|
|
+ <Text style={{color: 'white', fontSize: 13}}>{props.landmark?.description}</Text>
|
|
|
+ {props.landmark?.expiry_date ?
|
|
|
+ <Text style={{color: 'white', fontSize: 13}}>Landmark expires on {props.landmark.expiry_date.toString().substring(0,10)}</Text> : null}
|
|
|
+ </ScrollView>
|
|
|
+ </View>
|
|
|
+ {props.landmark?.landmark_type ? <Image source={lmTypes[props.landmark?.landmark_type]?.image} /> : null}
|
|
|
</View>
|
|
|
- {props.landmark?.landmark_type ? <Image source={lmTypes[props.landmark?.landmark_type]?.image} /> : null}
|
|
|
- </View>
|
|
|
- )
|
|
|
- } else return null
|
|
|
+ )
|
|
|
+ } else return null
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -349,6 +349,12 @@ export const DetailsBody: React.FC<DetailsBodyProps> = (props) => {
|
|
|
processingPhoto={props.processingPhoto}
|
|
|
setProcessingPhoto={props.setProcessingPhoto}/>
|
|
|
: null}
|
|
|
+ {landmarkOwnedByUser(props.landmark) && !groupList ?
|
|
|
+ <TouchableOpacity style={{marginTop: 30, justifyContent: 'center', alignItems: 'center', opacity: .7}}
|
|
|
+ onPress={() => {props.promptAddLandmark(props.landmark?.longitude, props.landmark?.latitude, undefined, "newGroup", props.landmark?.id)}}>
|
|
|
+ <Text style={{fontSize: 20, marginBottom: 10, color: 'white'}}>Add another landmark here</Text>
|
|
|
+ <FontAwesome name="plus" size={30} color='white' />
|
|
|
+ </TouchableOpacity> : null }
|
|
|
|
|
|
</ScrollView>
|
|
|
)
|