diff --git a/src/components/gameplay/CacheCardItem.js b/src/components/gameplay/CacheCardItem.js index 519fb1e..520d7c3 100644 --- a/src/components/gameplay/CacheCardItem.js +++ b/src/components/gameplay/CacheCardItem.js @@ -2,7 +2,7 @@ import {StyleSheet, Text, View} from 'react-native'; import Card from '../UI/Card'; import {Button} from '../UI/Button'; -const CacheCardItem = ({cache, isAdmin, isClaimed, isSelected, onEdit, onDelete, onSelect, disabled}) => { +const CacheCardItem = ({cache, isAdmin, isClaimed, isSelected, onEdit, onDelete, onSelect, disabled, departmentName}) => { // Initialisation ------------- const displayName = cache.name || cache.clue || 'Unnamed Cache'; @@ -16,6 +16,9 @@ const CacheCardItem = ({cache, isAdmin, isClaimed, isSelected, onEdit, onDelete, {displayName} + {isAdmin && departmentName ? ( + Department: {departmentName} + ) : null} {cache.name ? ( {cache.clue} ) : null} @@ -87,6 +90,7 @@ const styles = StyleSheet.create({ marginBottom: 8, }, clue: {fontSize: 13, color: '#6b7280', marginTop: 2}, + departmentText: {fontSize: 13, color: '#2563eb', marginTop: 2, fontWeight: '600'}, nameWrap: {flex: 1, marginRight: 8}, name: {fontSize: 15, fontWeight: '600', color: '#1f2937'}, claimedText: {color: '#9ca3af'}, diff --git a/src/components/screens/DepartmentSettingsScreen.js b/src/components/screens/DepartmentSettingsScreen.js index 8c4b13c..08f15a5 100644 --- a/src/components/screens/DepartmentSettingsScreen.js +++ b/src/components/screens/DepartmentSettingsScreen.js @@ -69,7 +69,10 @@ const DepartmentSettingsScreen = ({route, navigation}) => { }; const handleManageCaches = () => { - navigation.navigate('MapScreen'); + navigation.navigate('MapScreen', { + selectedDepartmentSGid: SGid, + selectedDepartmentName: deptName || null, + }); }; // View ----------------------- diff --git a/src/components/screens/GameSettingsScreen.js b/src/components/screens/GameSettingsScreen.js index c5115dd..cbc071f 100644 --- a/src/components/screens/GameSettingsScreen.js +++ b/src/components/screens/GameSettingsScreen.js @@ -254,7 +254,7 @@ const GameSettingsScreen = ({navigation}) => {