Update CBS Mobile App codebase
This commit is contained in:
@@ -4,8 +4,10 @@ import type { NativeStackScreenProps } from '@react-navigation/native-stack';
|
||||
import type { ServicesStackParamList } from '../../../navigation/types';
|
||||
import { ScreenShell } from '../../../components';
|
||||
import { ServiceGridItem } from '../../home/components/ServiceGridItem';
|
||||
import { useTheme } from '../../../theme';
|
||||
import { useTheme, fontFamily } from '../../../theme';
|
||||
import { ChequeAnimation } from '../components/ChequeAnimation';
|
||||
import { FeatureKey } from '../../../constants/featureKeys';
|
||||
import { useEnabledItems } from '../../../features';
|
||||
|
||||
type Props = NativeStackScreenProps<ServicesStackParamList, 'ChequeServicesHub'>;
|
||||
|
||||
@@ -16,29 +18,49 @@ export default function ChequeServicesHubScreen({ navigation }: Props) {
|
||||
() => [
|
||||
{
|
||||
id: 'request',
|
||||
feature: FeatureKey.SERVICES_CHEQUE_BOOK_REQUEST,
|
||||
title: 'Book Request',
|
||||
icon: 'book-outline',
|
||||
iconColor: '#3B82F6',
|
||||
iconColor: theme.colors.info,
|
||||
onPress: () => navigation.navigate('ChequeBookRequest'),
|
||||
},
|
||||
{
|
||||
id: 'stop',
|
||||
feature: FeatureKey.SERVICES_CHEQUE_STOP_PAYMENT,
|
||||
title: 'Stop Payment',
|
||||
icon: 'stop-circle-outline',
|
||||
iconColor: '#EF4444',
|
||||
iconColor: theme.colors.danger,
|
||||
onPress: () => navigation.navigate('StopPayment'),
|
||||
},
|
||||
{
|
||||
/**
|
||||
* Its key has always been `services.cheque.positivePay` — a child of
|
||||
* this hub — but the only tile pointing at it lived on the
|
||||
* service-requests hub. That hub is off, which left the screen
|
||||
* reachable by global search alone. This is where it belongs.
|
||||
*/
|
||||
id: 'positive_pay',
|
||||
feature: FeatureKey.SERVICES_CHEQUE_POSITIVE_PAY,
|
||||
title: 'Positive Pay',
|
||||
icon: 'shield-checkmark-outline',
|
||||
iconColor: theme.colors.primary,
|
||||
onPress: () => navigation.navigate('PositivePay'),
|
||||
},
|
||||
{
|
||||
id: 'track',
|
||||
feature: FeatureKey.SERVICES_CHEQUE_TRACKING,
|
||||
title: 'Track Cheques',
|
||||
icon: 'git-compare-outline',
|
||||
iconColor: '#10B981',
|
||||
iconColor: theme.colors.success,
|
||||
onPress: () => navigation.navigate('ChequeTracking'),
|
||||
},
|
||||
],
|
||||
[navigation]
|
||||
[navigation, theme]
|
||||
);
|
||||
|
||||
const visibleOptions = useEnabledItems(options);
|
||||
|
||||
|
||||
return (
|
||||
<ScreenShell title="Cheque Services" subtitle="Manage all your cheque-related needs">
|
||||
{/* Animated cheque illustration */}
|
||||
@@ -48,13 +70,13 @@ export default function ChequeServicesHubScreen({ navigation }: Props) {
|
||||
<View style={[styles.infoStrip, { backgroundColor: `${theme.colors.primary}08`, borderColor: `${theme.colors.primary}12` }]}>
|
||||
<View style={[styles.infoDot, { backgroundColor: theme.colors.accent }]} />
|
||||
<Text style={[styles.infoText, { color: theme.colors.textSecondary }]}>
|
||||
Request, track, or manage cheques — all in one place
|
||||
Request, track, register, or stop cheques — all in one place
|
||||
</Text>
|
||||
</View>
|
||||
|
||||
{/* Service grid */}
|
||||
<View style={styles.grid}>
|
||||
{options.map((opt) => (
|
||||
{visibleOptions.map((opt) => (
|
||||
<ServiceGridItem key={opt.id} {...opt} />
|
||||
))}
|
||||
</View>
|
||||
@@ -86,7 +108,7 @@ const styles = StyleSheet.create({
|
||||
},
|
||||
infoText: {
|
||||
fontSize: 12,
|
||||
fontWeight: '600',
|
||||
fontFamily: fontFamily.semibold,
|
||||
flex: 1,
|
||||
lineHeight: 17,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user