Commit 0b6763c1 authored by didam's avatar didam

didam

parent d50f3dc1
......@@ -9,12 +9,13 @@ import React, { Component } from 'react';
import { StatusBar } from 'react-native';
import { Container } from 'native-base'
import AppNavigation from './navigation/appNavigation';
import Colors from './library/colors';
export default class App extends Component {
render() {
return (
<Container>
<StatusBar backgroundColor={'#1241cd'} translucent={false} barStyle={'light-content'}/>
{/* <StatusBar backgroundColor={Colors.yellowBasic} translucent={false} barStyle={'light-content'}/> */}
<AppNavigation/>
</Container>
);
......
import React, { Component } from 'react';
import { View, Text, ScrollView, Animated, TextInput } from 'react-native';
import { Container, Input } from 'native-base';
export default class createFormScreen extends Component {
constructor(props) {
super(props);
this.state = {
dataFormKontrak: [
{
label: 'Kode Cabang',
value: '',
errorMessage: ''
},
{
label: 'Nama Cabang',
value: '',
errorMessage: ''
},
{
label: 'No Kontrak',
value: '',
errorMessage: ''
},
{
label: 'No SubKontrak / Collateral ID',
value: '',
errorMessage: ''
},
{
label: 'Nama Nasabah',
value: '',
errorMessage: ''
},
{
label: 'Kode Warehouse',
value: '',
errorMessage: ''
},
{
label: 'Nama Warehouse',
value: '',
errorMessage: ''
},
{
label: 'Kode Remote',
value: '',
errorMessage: ''
},
{
label: 'Tanngal Appraisal',
value: '',
errorMessage: ''
},
{
label: 'Tipe Penilaian',
value: '',
errorMessage: ''
},
{
label: 'Tipe Jaminan',
value: '',
errorMessage: ''
},
{
label: 'Lokasi Unit',
value: '',
errorMessage: ''
},
{
label: 'Keterangan Lokasi Unit',
value: '',
errorMessage: ''
},
{
label: 'Nama Petugas Tarik',
value: '',
errorMessage: ''
},
{
label: 'Int/Ext Kolektor',
value: '',
errorMessage: ''
},
{
label: 'Tanggal Masuk Warehouse',
value: '',
errorMessage: ''
},
{
label: 'Tanggal Pick up',
value: '',
errorMessage: ''
},
{
label: 'Tanggal Perubahan Data',
value: '',
errorMessage: ''
}
]
};
}
handleEditable(item) {
var text = item
var edit = true
if (String(item).includes('Kode Cabang')
|| String(item).includes('Nama Cabang') || String(item).includes('No Kontrak')
|| String(item).includes('Collateral ID' || String(item).includes('Nama Nasabah'))) {
edit = false
alert(edit)
} else {
edit = true
}
return edit
}
render() {
return (
<Container>
<Animated.ScrollView style={{flex: 1,}}>
{this.state.dataFormKontrak.map((item,index) => {
return (
<View style={{flexDirection:'row', marginTop: 5, paddingHorizontal: 10}}>
<View style={{justifyContent: "center", paddingLeft: 10, width:'50%'}}>
<Text numberOfLines={1} ellipsizeMode='tail'>{item.label}</Text>
</View>
<View style={{justifyContent: "center",}}>
<TextInput
editable={item.label.includes('Kode Cabang')? false : true}
numberOfLines={2} ellipsizeMode='tail'
placeholder='INPUT WITH ERROR MESSAGE'
value={item.value}
style={{borderColor: 'red', borderWidth: .5, height: 30, fontSize: 13, padding: 0, paddingHorizontal: 5, borderRadius: 3}}
/>
</View>
</View>
)
})}
</Animated.ScrollView>
</Container>
);
}
}
import React, { Component } from 'react';
import { Container, View } from 'native-base';
import { Text, TouchableOpacity, Platform, Dimensions, StyleSheet, ImageBackground} from 'react-native';
import Icon from 'react-native-vector-icons/MaterialIcons';
import ReactNativeParallaxHeader from 'react-native-parallax-header';
import Colors from '../library/colors';
import Images from '../library/images';
const SCREEN_HEIGHT = Dimensions.get('window').height
const IS_IPHONE_X = SCREEN_HEIGHT === 812 || SCREEN_HEIGHT === 896;
const STATUS_BAR_HEIGHT = Platform.OS === 'ios' ? (IS_IPHONE_X ? 44 : 20) : 0;
const HEADER_HEIGHT = Platform.OS === 'ios' ? (IS_IPHONE_X ? 88 : 64) : 64;
const NAV_BAR_HEIGHT = HEADER_HEIGHT - STATUS_BAR_HEIGHT;
const images = {
background: require('../assets/homepage2.png'), // Put your own image here
};
const styles = StyleSheet.create({
container: {
flex: 1,
},
contentContainer: {
flexGrow: 1,
},
navContainer: {
height: HEADER_HEIGHT,
marginHorizontal: 25,
},
statusBar: {
height: STATUS_BAR_HEIGHT,
backgroundColor: 'transparent',
},
navBar: {
height: NAV_BAR_HEIGHT,
justifyContent: 'space-between',
alignItems: 'center',
flexDirection: 'row',
backgroundColor: 'transparent',
},
titleStyle: {
color: 'white',
// fontWeight: 'bold',
fontSize: 18,
},
});
export default class HomepageScreen extends Component {
render() {
return (
<Container>
<View style={{flex: 1, justifyContent: 'center', alignItems:'center', backgroundColor:'blue'}}>
</View>
</Container>
);
}
constructor(props) {
super(props)
this.state = {
data: [
{
image: Images.wh1,
label: 'WAREHOUSE 1'
},{
image: Images.wh2,
label: 'WAREHOUSE 2'
},{
image: Images.wh3,
label: 'WAREHOUSE 3'
},{
image: Images.wh4,
label: 'WAREHOUSE 4'
},
]
}
}
renderNavBar = () => (
<View style={styles.navContainer}>
<View style={styles.statusBar} />
<View style={styles.navBar}>
<TouchableOpacity style={styles.iconLeft} onPress={() => {}}>
{/* <Icon name="add" size={25} color="#fff" /> */}
<Text style={{color:'#fff'}}>John Rajasinga</Text>
</TouchableOpacity>
<TouchableOpacity style={styles.iconRight} onPress={() => {}}>
{/* <Icon name="search" size={25} color="#fff" /> */}
<Text style={{color:'#fff'}}>Mata Najwa</Text>
</TouchableOpacity>
</View>
</View>
)
renderContent = () => (
<View style={{padding: 20, alignItems:'center'}}>
{/* <Text>You are placed in this WAREHOUSE : </Text> */}
{this.state.data.map((item,index) => {
return (
<ImageBackground source={item.image} style={{marginBottom: index == this.state.data.length - 1 ? 20 : 0, backgroundColor: '#bababa', height: 250, width: 250, marginTop: 25, borderRadius: 10, elevation: 5}} imageStyle={{borderRadius: 10, opacity: .5}}>
<TouchableOpacity style={{flex: 1, backgroundColor:'transparent', justifyContent: 'center',}}>
<View style={{backgroundColor:'rgba(255, 221, 0, .5)', padding: 5, alignItems:'center'}}>
<Text style={{color: Colors.blackBasic}}>{item.label}</Text>
</View>
</TouchableOpacity>
{/* */}
</ImageBackground>
)
})}
</View>
)
render() {
return (
<Container>
<ReactNativeParallaxHeader
headerMinHeight={HEADER_HEIGHT}
headerMaxHeight={200}
extraScrollHeight={20}
navbarColor={Colors.blackBasic}
title={`Welcome back John!!`}
titleStyle={styles.titleStyle}
backgroundImage={images.background}
backgroundImageScale={1.2}
renderNavBar={this.renderNavBar}
renderContent={this.renderContent}
containerStyle={styles.container}
contentContainerStyle={styles.contentContainer}
innerContainerStyle={styles.container}
alwaysShowTitle={false}
alwaysShowNavBar={false}
scrollViewProps={{
onScrollBeginDrag: () => console.log('onScrollBeginDrag'),
onScrollEndDrag: () => console.log('onScrollEndDrag'),
}}
/>
</Container>
);
}
}
const Colors = {
yellowBasic: '#ffdd00',
blackBasic: '#010101'
}
export default Colors;
\ No newline at end of file
const Images = {
wh1: require('../assets/wh1.jpeg'),
wh2: require('../assets/wh2.jpg'),
wh3: require('../assets/wh3.jpg'),
wh4: require('../assets/wh4.jpg'),
}
export default Images;
\ No newline at end of file
......@@ -17,9 +17,11 @@ import Ionicons from 'react-native-vector-icons/Ionicons'
import { View , Image} from 'react-native';
import LinearGradient from 'react-native-linear-gradient';
import { TouchableOpacity } from 'react-native-gesture-handler';
import CreateFormScreen from '../container/createFormScreen';
const MainNavigator = createStackNavigator({
HomepageScreen: { screen: HomepageScreen, navigationOptions: { header: null} },
CreateFromScreen: { screen: CreateFormScreen, navigationOptions: { header: null}}
// LatihanDragDrop: { screen: LatihanDragDrop, navigationOptions: { title: 'Latihan'}}
}, {
headerMode: 'screen',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment