Add UI on Guidebook screen. Then, add Application Guide and Passport Requirements screens
This commit is contained in:
@ -18,6 +18,8 @@ import ExpressPassportScreen from '../screens/expressPassport';
|
||||
import GuidebookScreen from '../screens/guidebook';
|
||||
import EazyPassportScreen from '../screens/eazyPassport';
|
||||
import ApplicationDetailScreen from '../screens/applicationDetail';
|
||||
import PassportRequirementsScreen from '../screens/passportRequirements';
|
||||
import ApplicationGuideScreen from '../screens/applicationGuide';
|
||||
|
||||
const Stack = createNativeStackNavigator<RootStackParamList>();
|
||||
|
||||
@ -107,6 +109,16 @@ function RootStack() {
|
||||
component={ApplicationDetailScreen}
|
||||
options={{headerShown: false}}
|
||||
/>
|
||||
<Stack.Screen
|
||||
name="ApplicationGuide"
|
||||
component={ApplicationGuideScreen}
|
||||
options={{headerShown: false}}
|
||||
/>
|
||||
<Stack.Screen
|
||||
name="PassportRequirements"
|
||||
component={PassportRequirementsScreen}
|
||||
options={{headerShown: false}}
|
||||
/>
|
||||
</Stack.Navigator>
|
||||
);
|
||||
}
|
||||
|
@ -18,4 +18,6 @@ export type RootStackParamList = {
|
||||
Guidebook: undefined;
|
||||
EazyPassport: undefined;
|
||||
ApplicationDetail: {data: PassportAppointmentData};
|
||||
ApplicationGuide: undefined;
|
||||
PassportRequirements: undefined;
|
||||
};
|
||||
|
@ -18,6 +18,7 @@ const styles = StyleSheet.create({
|
||||
...FontFamily.notoSansRegular,
|
||||
fontSize: 22,
|
||||
marginStart: 16,
|
||||
includeFontPadding: false,
|
||||
},
|
||||
appBarIcon: {
|
||||
marginLeft: 16,
|
||||
|
38
src/screens/applicationGuide/index.tsx
Normal file
38
src/screens/applicationGuide/index.tsx
Normal file
@ -0,0 +1,38 @@
|
||||
import React from 'react';
|
||||
import {StatusBar, Text, View} from 'react-native';
|
||||
import styles from './styles';
|
||||
import Colors from '../../../assets/styles/Colors';
|
||||
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
|
||||
import { RootStackParamList } from '../../navigation/type';
|
||||
import { useNavigation } from '@react-navigation/native';
|
||||
import { NativeStackNavigationProp } from '@react-navigation/native-stack';
|
||||
|
||||
type ApplicationGuideScreenNavigationProp = NativeStackNavigationProp<
|
||||
RootStackParamList,
|
||||
'ApplicationGuide'
|
||||
>;
|
||||
|
||||
function ApplicationGuideScreen() {
|
||||
const navigation = useNavigation<ApplicationGuideScreenNavigationProp>();
|
||||
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<StatusBar
|
||||
backgroundColor={Colors.neutral100.color}
|
||||
barStyle="dark-content"
|
||||
/>
|
||||
<View style={styles.appBarContainer}>
|
||||
<Icon
|
||||
name="arrow-left"
|
||||
size={24}
|
||||
style={styles.appBarIcon}
|
||||
color={Colors.secondary30.color}
|
||||
onPress={() => navigation.goBack()}
|
||||
/>
|
||||
<Text style={styles.appBarTitle}>Panduan Aplikasi</Text>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
export default ApplicationGuideScreen;
|
28
src/screens/applicationGuide/styles.tsx
Normal file
28
src/screens/applicationGuide/styles.tsx
Normal file
@ -0,0 +1,28 @@
|
||||
import {StyleSheet} from 'react-native';
|
||||
import Colors from '../../../assets/styles/Colors';
|
||||
import FontFamily from '../../../assets/styles/FontFamily';
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
container: {
|
||||
flex: 1,
|
||||
backgroundColor: Colors.neutral100.color,
|
||||
},
|
||||
appBarTitle: {
|
||||
color: Colors.secondary30.color,
|
||||
...FontFamily.notoSansRegular,
|
||||
fontSize: 22,
|
||||
marginStart: 16,
|
||||
includeFontPadding: false,
|
||||
},
|
||||
appBarIcon: {
|
||||
marginLeft: 16,
|
||||
},
|
||||
appBarContainer: {
|
||||
height: 64,
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
backgroundColor: Colors.neutral100.color,
|
||||
},
|
||||
});
|
||||
|
||||
export default styles;
|
@ -12,6 +12,7 @@ const styles = StyleSheet.create({
|
||||
...FontFamily.notoSansRegular,
|
||||
fontSize: 22,
|
||||
marginStart: 16,
|
||||
includeFontPadding: false,
|
||||
},
|
||||
appBarIcon: {
|
||||
marginLeft: 16,
|
||||
|
@ -16,12 +16,14 @@ const styles = StyleSheet.create({
|
||||
fontSize: 12,
|
||||
includeFontPadding: false,
|
||||
textAlign: 'justify',
|
||||
lineHeight: 24,
|
||||
},
|
||||
appBarTitle: {
|
||||
color: Colors.neutral100.color,
|
||||
...FontFamily.notoSansRegular,
|
||||
fontSize: 22,
|
||||
marginStart: 16,
|
||||
includeFontPadding: false,
|
||||
},
|
||||
appBarIcon: {
|
||||
marginLeft: 16,
|
||||
|
@ -11,6 +11,7 @@ const styles = StyleSheet.create({
|
||||
color: Colors.neutral100.color,
|
||||
...FontFamily.notoSansRegular,
|
||||
fontSize: 22,
|
||||
includeFontPadding: false,
|
||||
marginStart: 16,
|
||||
},
|
||||
appBarIcon: {
|
||||
|
@ -1,160 +1,11 @@
|
||||
import React, {useState} from 'react';
|
||||
import {Button, Text, View} from 'react-native';
|
||||
import React from 'react';
|
||||
import {Text, View} from 'react-native';
|
||||
import styles from './styles';
|
||||
import Colors from '../../../assets/styles/Colors';
|
||||
import StepIndicator from '../../components/StepIndicator';
|
||||
|
||||
const renderContent = (
|
||||
step: number,
|
||||
subStep: number,
|
||||
setStep: (step: number) => void,
|
||||
setSubStep: (step: number) => void,
|
||||
) => {
|
||||
if (step === 1) {
|
||||
switch (subStep) {
|
||||
case 1:
|
||||
return (
|
||||
<View>
|
||||
<Text>Step 1.1</Text>
|
||||
<Button title="Next" onPress={() => setSubStep(2)} />
|
||||
</View>
|
||||
);
|
||||
case 2:
|
||||
return (
|
||||
<View>
|
||||
<Text>Step 1.2</Text>
|
||||
<Button title="Next" onPress={() => setSubStep(3)} />
|
||||
<Button title="Back" onPress={() => setSubStep(1)} />
|
||||
</View>
|
||||
);
|
||||
case 3:
|
||||
return (
|
||||
<View>
|
||||
<Text>Step 1.3</Text>
|
||||
<Button
|
||||
title="Next"
|
||||
onPress={() => {
|
||||
setStep(2);
|
||||
setSubStep(1);
|
||||
}}
|
||||
/>
|
||||
<Button title="Back" onPress={() => setSubStep(2)} />
|
||||
</View>
|
||||
);
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
if (step === 2) {
|
||||
switch (subStep) {
|
||||
case 1:
|
||||
return (
|
||||
<View>
|
||||
<Text>Step 2.1</Text>
|
||||
<Button title="Next" onPress={() => setSubStep(2)} />
|
||||
<Button
|
||||
title="Back"
|
||||
onPress={() => {
|
||||
setStep(1);
|
||||
setSubStep(3);
|
||||
}}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
case 2:
|
||||
return (
|
||||
<View>
|
||||
<Text>Step 2.2</Text>
|
||||
<Button title="Next" onPress={() => setSubStep(3)} />
|
||||
<Button title="Back" onPress={() => setSubStep(1)} />
|
||||
</View>
|
||||
);
|
||||
case 3:
|
||||
return (
|
||||
<View>
|
||||
<Text>Step 2.3</Text>
|
||||
<Button
|
||||
title="Next"
|
||||
onPress={() => {
|
||||
setStep(3);
|
||||
setSubStep(1);
|
||||
}}
|
||||
/>
|
||||
<Button title="Back" onPress={() => setSubStep(2)} />
|
||||
</View>
|
||||
);
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
switch (step) {
|
||||
case 3:
|
||||
return (
|
||||
<View>
|
||||
<Button title="Next" onPress={() => setStep(4)} />
|
||||
<Button title="Back" onPress={() => setStep(2)} />
|
||||
</View>
|
||||
);
|
||||
case 4:
|
||||
return (
|
||||
<View>
|
||||
<Button title="Next" onPress={() => setStep(5)} />
|
||||
<Button title="Back" onPress={() => setStep(3)} />
|
||||
</View>
|
||||
);
|
||||
case 5:
|
||||
return (
|
||||
<View>
|
||||
<Button title="Next" onPress={() => setStep(6)} />
|
||||
<Button title="Back" onPress={() => setStep(4)} />
|
||||
</View>
|
||||
);
|
||||
case 6:
|
||||
return (
|
||||
<View>
|
||||
<Button title="Next" onPress={() => setStep(7)} />
|
||||
<Button title="Back" onPress={() => setStep(5)} />
|
||||
</View>
|
||||
);
|
||||
case 7:
|
||||
return (
|
||||
<View>
|
||||
<Button title="Back" onPress={() => setStep(6)} />
|
||||
</View>
|
||||
);
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
function ExpressPassportScreen() {
|
||||
const [step, setStep] = useState(1);
|
||||
const [subStep, setSubStep] = useState(1);
|
||||
|
||||
const completedSteps = [...Array(step - 1)].map((_, i) => i + 1);
|
||||
const stepTitles: {[key: number]: string} = {
|
||||
1: 'Informasi Pribadi',
|
||||
2: 'Dokumen Pendukung',
|
||||
3: 'Pembayaran',
|
||||
4: 'Konfirmasi Data',
|
||||
5: 'Verifikasi',
|
||||
6: 'Pemrosesan',
|
||||
7: 'Selesai',
|
||||
};
|
||||
|
||||
return (
|
||||
<View style={{flex: 1}}>
|
||||
<View>
|
||||
<Text>{stepTitles[step]}</Text>
|
||||
</View>
|
||||
<StepIndicator
|
||||
currentStep={step}
|
||||
totalSteps={7}
|
||||
completedSteps={completedSteps}
|
||||
/>
|
||||
{renderContent(step, subStep, setStep, setSubStep)}
|
||||
<View style={styles.container}>
|
||||
<Text>Express Passport Screen</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
@ -1,11 +1,81 @@
|
||||
import React from 'react';
|
||||
import {Text, View} from 'react-native';
|
||||
import {Pressable, StatusBar, Text, View} from 'react-native';
|
||||
import styles from './styles';
|
||||
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
|
||||
import Colors from '../../../assets/styles/Colors';
|
||||
import {RootStackParamList} from '../../navigation/type';
|
||||
import {NativeStackNavigationProp} from '@react-navigation/native-stack';
|
||||
import {useNavigation} from '@react-navigation/native';
|
||||
import ApplicationGuideIcon from '../../../assets/icons/mobile_friendly.svg';
|
||||
import PassportRequirementsIcon from '../../../assets/icons/list_box_outline.svg';
|
||||
|
||||
type GuidebookScreenNavigationProp = NativeStackNavigationProp<
|
||||
RootStackParamList,
|
||||
'Guidebook'
|
||||
>;
|
||||
|
||||
function GuidebookScreen() {
|
||||
const navigation = useNavigation<GuidebookScreenNavigationProp>();
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<Text>Guidebook Screen</Text>
|
||||
<StatusBar
|
||||
backgroundColor={Colors.secondary30.color}
|
||||
barStyle="light-content"
|
||||
/>
|
||||
<View style={styles.appBarContainer}>
|
||||
<Icon
|
||||
name="arrow-left"
|
||||
size={24}
|
||||
style={styles.appBarIcon}
|
||||
color={Colors.neutral100.color}
|
||||
onPress={() => navigation.goBack()}
|
||||
/>
|
||||
<Text style={styles.appBarTitle}>Buku Panduan</Text>
|
||||
</View>
|
||||
<View style={styles.contentContainer}>
|
||||
<Pressable
|
||||
style={({pressed}) => [
|
||||
styles.guidebookMenuWrapper,
|
||||
{
|
||||
transform: [{scale: pressed ? 0.975 : 1}],
|
||||
},
|
||||
]}
|
||||
onPress={() => navigation.navigate('ApplicationGuide')}>
|
||||
<View style={styles.guidebookMenuContentWrapper}>
|
||||
<ApplicationGuideIcon />
|
||||
<View style={styles.guidebookMenuTextWrapper}>
|
||||
<Text style={styles.guidebookMenuTextTitle}>
|
||||
Panduan Aplikasi
|
||||
</Text>
|
||||
<Text style={styles.guidebookMenuTextDesc}>
|
||||
Panduan penggunaan aplikasi M-Paspor
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
<Icon name="menu-right" size={24} />
|
||||
</Pressable>
|
||||
<Pressable
|
||||
style={({pressed}) => [
|
||||
styles.guidebookMenuWrapper,
|
||||
{
|
||||
transform: [{scale: pressed ? 0.975 : 1}],
|
||||
},
|
||||
]}
|
||||
onPress={() => navigation.navigate('PassportRequirements')}>
|
||||
<View style={styles.guidebookMenuContentWrapper}>
|
||||
<PassportRequirementsIcon />
|
||||
<View style={styles.guidebookMenuTextWrapper}>
|
||||
<Text style={styles.guidebookMenuTextTitle}>
|
||||
Persyaratan Paspor
|
||||
</Text>
|
||||
<Text style={styles.guidebookMenuTextDesc}>
|
||||
Persyaratan seputar pengajuan paspor
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
<Icon name="menu-right" size={24} />
|
||||
</Pressable>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
@ -1,12 +1,69 @@
|
||||
import {StyleSheet} from 'react-native';
|
||||
import Colors from '../../../assets/styles/Colors';
|
||||
import FontFamily from '../../../assets/styles/FontFamily';
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
container: {
|
||||
flex: 1,
|
||||
alignContent: 'center',
|
||||
backgroundColor: Colors.neutral100.color,
|
||||
},
|
||||
appBarTitle: {
|
||||
color: Colors.neutral100.color,
|
||||
...FontFamily.notoSansRegular,
|
||||
fontSize: 22,
|
||||
marginStart: 16,
|
||||
includeFontPadding: false,
|
||||
},
|
||||
appBarIcon: {
|
||||
marginLeft: 16,
|
||||
},
|
||||
appBarContainer: {
|
||||
height: 64,
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
backgroundColor: 'white',
|
||||
justifyContent: 'center',
|
||||
backgroundColor: Colors.secondary30.color,
|
||||
},
|
||||
topContainer: {
|
||||
backgroundColor: Colors.secondary30.color,
|
||||
height: 85,
|
||||
alignItems: 'center',
|
||||
},
|
||||
contentContainer: {
|
||||
margin: 16,
|
||||
gap: 16,
|
||||
},
|
||||
guidebookMenuContainer: {
|
||||
gap: 16,
|
||||
},
|
||||
guidebookMenuWrapper: {
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'space-between',
|
||||
height: 90,
|
||||
padding: 16,
|
||||
borderWidth: 1,
|
||||
borderRadius: 20,
|
||||
borderColor: Colors.secondary70.color,
|
||||
},
|
||||
guidebookMenuContentWrapper: {
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
gap: 16,
|
||||
},
|
||||
guidebookMenuTextWrapper: {
|
||||
gap: 6,
|
||||
},
|
||||
guidebookMenuTextTitle: {
|
||||
...FontFamily.notoSansMedium,
|
||||
fontSize: 14,
|
||||
includeFontPadding: false,
|
||||
color: Colors.primary30.color,
|
||||
},
|
||||
guidebookMenuTextDesc: {
|
||||
...FontFamily.notoSansRegular,
|
||||
fontSize: 11,
|
||||
includeFontPadding: false,
|
||||
color: Colors.primary40.color,
|
||||
},
|
||||
});
|
||||
|
||||
|
@ -12,6 +12,7 @@ const styles = StyleSheet.create({
|
||||
...FontFamily.notoSansRegular,
|
||||
fontSize: 22,
|
||||
marginStart: 16,
|
||||
includeFontPadding: false,
|
||||
},
|
||||
appBarIcon: {
|
||||
marginLeft: 16,
|
||||
|
37
src/screens/passportRequirements/index.tsx
Normal file
37
src/screens/passportRequirements/index.tsx
Normal file
@ -0,0 +1,37 @@
|
||||
import React from 'react';
|
||||
import {StatusBar, Text, View} from 'react-native';
|
||||
import styles from './styles';
|
||||
import Colors from '../../../assets/styles/Colors';
|
||||
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
|
||||
import {RootStackParamList} from '../../navigation/type';
|
||||
import {NativeStackNavigationProp} from '@react-navigation/native-stack';
|
||||
import {useNavigation} from '@react-navigation/native';
|
||||
|
||||
type PassportRequirementsScreenNavigationProp = NativeStackNavigationProp<
|
||||
RootStackParamList,
|
||||
'PassportRequirements'
|
||||
>;
|
||||
|
||||
function PassportRequirementsScreen() {
|
||||
const navigation = useNavigation<PassportRequirementsScreenNavigationProp>();
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<StatusBar
|
||||
backgroundColor={Colors.neutral100.color}
|
||||
barStyle="dark-content"
|
||||
/>
|
||||
<View style={styles.appBarContainer}>
|
||||
<Icon
|
||||
name="arrow-left"
|
||||
size={24}
|
||||
style={styles.appBarIcon}
|
||||
color={Colors.secondary30.color}
|
||||
onPress={() => navigation.goBack()}
|
||||
/>
|
||||
<Text style={styles.appBarTitle}>Persyaratan Paspor</Text>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
export default PassportRequirementsScreen;
|
28
src/screens/passportRequirements/styles.tsx
Normal file
28
src/screens/passportRequirements/styles.tsx
Normal file
@ -0,0 +1,28 @@
|
||||
import {StyleSheet} from 'react-native';
|
||||
import Colors from '../../../assets/styles/Colors';
|
||||
import FontFamily from '../../../assets/styles/FontFamily';
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
container: {
|
||||
flex: 1,
|
||||
backgroundColor: Colors.neutral100.color,
|
||||
},
|
||||
appBarTitle: {
|
||||
color: Colors.secondary30.color,
|
||||
...FontFamily.notoSansRegular,
|
||||
fontSize: 22,
|
||||
marginStart: 16,
|
||||
includeFontPadding: false,
|
||||
},
|
||||
appBarIcon: {
|
||||
marginLeft: 16,
|
||||
},
|
||||
appBarContainer: {
|
||||
height: 64,
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
backgroundColor: Colors.neutral100.color,
|
||||
},
|
||||
});
|
||||
|
||||
export default styles;
|
@ -12,6 +12,7 @@ const styles = StyleSheet.create({
|
||||
...FontFamily.notoSansRegular,
|
||||
fontSize: 16,
|
||||
marginStart: 16,
|
||||
includeFontPadding: false,
|
||||
},
|
||||
appBarIcon: {
|
||||
marginLeft: 16,
|
||||
|
@ -12,6 +12,7 @@ const styles = StyleSheet.create({
|
||||
...FontFamily.notoSansRegular,
|
||||
fontSize: 22,
|
||||
marginStart: 16,
|
||||
includeFontPadding: false,
|
||||
},
|
||||
appBarIcon: {
|
||||
marginLeft: 16,
|
||||
|
Reference in New Issue
Block a user