Browse Source

feat(activity): page project activity

master
farhantock 7 months ago
parent
commit
f17873a67c
  1. 150
      src/screens/activity/index.js

150
src/screens/activity/index.js

@ -0,0 +1,150 @@
import React, { useEffect, useCallback, useMemo, useState, useRef } from 'react';
import { Card, Text, Avatar, useTheme, IconButton, Appbar, Button, List, TouchableRipple } from 'react-native-paper';
import { RefreshControl, StyleSheet, View, ScrollView, StatusBar } from 'react-native';
import { colors } from '../../utils/color';
import Icon from 'react-native-vector-icons/AntDesign';
import { strings } from '../../utils/i18n';
export default function Activitycreen({ route, navigation }) {
const [expanded, setExpanded] = React.useState(true);
return (
<View style={styles.container}>
<StatusBar backgroundColor={colors.blue} barStyle='light-content' translucent={true} />
<Appbar.Header mode='center-aligned' style={{ backgroundColor: colors.blue, elevation: 4 }}>
<Appbar.BackAction color={colors.pureWhite} onPress={() => { navigation.goBack() }} />
<Appbar.Content titleStyle={{ fontWeight: 'bold' }} color={colors.pureWhite} title={strings('activity.title')} />
</Appbar.Header>
<ScrollView style={{ backgroundColor: colors.pureWhite }}>
<TouchableRipple rippleColor={colors.pureWhite} onPress={() => { navigation.navigate('ShiftScreen') }}>
<List.Item
titleStyle={{ color: colors.blue }}
rippleColor={colors.semiBlue}
style={styles.accordion}
title="Serah terima shift"
right={() => <List.Icon icon="chevron-right" />}
/>
</TouchableRipple>
<List.Accordion
titleStyle={{ color: colors.blue }}
rippleColor={colors.semiBlue}
style={styles.accordion}
title="Kelengkapan Aset Project">
<TouchableRipple rippleColor={colors.pureWhite} onPress={() => { navigation.navigate('PPEScreen') }}>
<List.Item
title="Aset Personnel (PPE)"
right={() => <List.Icon icon="chevron-right" />}
/>
</TouchableRipple>
<TouchableRipple rippleColor={colors.pureWhite} onPress={() => { navigation.navigate('PPEScreen') }}>
<List.Item
title="Aset Pos"
right={() => <List.Icon icon="chevron-right" />}
/>
</TouchableRipple>
<TouchableRipple rippleColor={colors.pureWhite} onPress={() => { navigation.navigate('PPEScreen') }}>
<List.Item
title="Aset Project"
right={() => <List.Icon icon="chevron-right" />}
/>
</TouchableRipple>
</List.Accordion>
<TouchableRipple rippleColor={colors.pureWhite} onPress={() => { navigation.navigate('BriefScreen') }}>
<List.Item
titleStyle={{ color: colors.blue }}
rippleColor={colors.semiBlue}
style={styles.accordion}
title="Apel / briefing"
right={() => <List.Icon icon="chevron-right" />}
/>
</TouchableRipple>
<TouchableRipple rippleColor={colors.pureWhite} onPress={() => { navigation.navigate('PersonelScreen') }}>
<List.Item
titleStyle={{ color: colors.blue }}
rippleColor={colors.semiBlue}
style={styles.accordion}
title="Cek Personel"
right={() => <List.Icon icon="chevron-right" />}
/>
</TouchableRipple>
<TouchableRipple rippleColor={colors.pureWhite} onPress={() => { navigation.navigate('ActionActivityScreen') }}>
<List.Item
titleStyle={{ color: colors.blue }}
rippleColor={colors.semiBlue}
style={styles.accordion}
title="Aktivitas"
right={() => <List.Icon icon="chevron-right" />}
/>
</TouchableRipple>
<TouchableRipple rippleColor={colors.pureWhite} onPress={() => { navigation.navigate('TrainingActivityScreen') }}>
<List.Item
titleStyle={{ color: colors.blue }}
rippleColor={colors.semiBlue}
style={styles.accordion}
title="Pelatihan"
right={() => <List.Icon icon="chevron-right" />}
/>
</TouchableRipple>
<TouchableRipple rippleColor={colors.pureWhite} onPress={() => { navigation.navigate('VisitActivityScreen') }}>
<List.Item
titleStyle={{ color: colors.blue }}
rippleColor={colors.semiBlue}
style={styles.accordion}
title="Kunjungan Tamu"
right={() => <List.Icon icon="chevron-right" />}
/>
</TouchableRipple>
<TouchableRipple rippleColor={colors.pureWhite} onPress={() => { navigation.navigate('MutationBookScreen') }}>
<List.Item
titleStyle={{ color: colors.blue }}
rippleColor={colors.semiBlue}
style={styles.accordion}
title="Buku mutasi"
right={() => <List.Icon icon="chevron-right" />}
/>
</TouchableRipple>
<TouchableRipple rippleColor={colors.pureWhite} onPress={() => { navigation.navigate('SpesialRequestAcitivityScreen') }}>
<List.Item
titleStyle={{ color: colors.blue }}
rippleColor={colors.semiBlue}
style={styles.accordion}
title="Spesial Request"
right={() => <List.Icon icon="chevron-right" />}
/>
</TouchableRipple>
</ScrollView>
</View >
)
}
const styles = StyleSheet.create({
container: {
flex: 1,
marginTop: 20,
backgroundColor: colors.pureWhite
},
accordion: {
backgroundColor: colors.semiBlue,
color: colors.blue,
marginHorizontal: 10,
marginTop: 10,
borderRadius: 5
},
button: {
flex: 1,
margin: 5,
borderRadius: 5
},
row: {
flexDirection: 'row',
alignItems: 'center',
marginBottom: 5,
},
buttonContainer: {
flexDirection: 'row',
justifyContent: 'space-between',
padding: 10,
paddingBottom: 20,
},
})
Loading…
Cancel
Save