Commit 30182c61 authored by didam's avatar didam

didam

parent ad6f251c
...@@ -6,6 +6,7 @@ import SvgAnimatedLinearGradient from 'react-native-svg-animated-linear-gradient ...@@ -6,6 +6,7 @@ import SvgAnimatedLinearGradient from 'react-native-svg-animated-linear-gradient
import Svg, { Circle, Rect } from 'react-native-svg' import Svg, { Circle, Rect } from 'react-native-svg'
import Colors from '../../library/colors'; import Colors from '../../library/colors';
import MaterialIcons from 'react-native-vector-icons/MaterialIcons' import MaterialIcons from 'react-native-vector-icons/MaterialIcons'
import fonts from '../../library/fonts';
const dateNow = M().format('DD-MM-YYYY') const dateNow = M().format('DD-MM-YYYY')
...@@ -28,6 +29,38 @@ class History extends Component { ...@@ -28,6 +29,38 @@ class History extends Component {
{ jam: '17.30', tanggal: '03-03-2020', noKontrak: 'K-01239923' }, { jam: '17.30', tanggal: '03-03-2020', noKontrak: 'K-01239923' },
{ jam: '17.30', tanggal: '03-03-2020', noKontrak: 'K-01239924' }, { jam: '17.30', tanggal: '03-03-2020', noKontrak: 'K-01239924' },
], ],
dataDummyHistory: [
{
tanggal: '09 MAR 2020',
data: [
{
type: 'Penerimaan',
unitName: 'Honda - Vario 125',
message: 'You accepted list from CLAR'
},
{
type: 'Appraisal',
unitName: 'Yamaha - R15',
message: 'You submiting new apraisal to manager'
},
]
},
{
tanggal: '12 MAR 2020',
data: [
{
type: 'Appraisal',
unitName: 'Yamaha - R25',
message: 'You submiting new apraisal to manager'
},
{
type: 'Penerimaan',
unitName: 'Honda - Beat Street',
message: 'You accepted list from CLAR'
},
]
},
],
date: new Date(), date: new Date(),
yesterday: '', yesterday: '',
loading: true, loading: true,
...@@ -73,17 +106,34 @@ class History extends Component { ...@@ -73,17 +106,34 @@ class History extends Component {
<Text style={{ fontWeight: 'bold', fontSize: 20, fontStyle: 'italic' }}>My History</Text> <Text style={{ fontWeight: 'bold', fontSize: 20, fontStyle: 'italic' }}>My History</Text>
</View> </View>
<View style={{ alignItems: 'center', justifyContent: 'center' }}> <View style={{ alignItems: 'center', justifyContent: 'center' }}>
<View style={{ height: 50, width: 50, borderRadius: 50, backgroundColor: '#f5f5f5', marginTop: 20, zIndex: 2 }} /> <View style={{ height: 50, width: 50, borderRadius: 50, backgroundColor: '#e8e8e8', marginTop: 20, zIndex: 2 }} />
</View> </View>
</View> </View>
<View style={{ backgroundColor: '#f5f5f5', paddingHorizontal: 20, zIndex: 3, height: '90%' }}> <View style={{ backgroundColor: '#f5f5f5', zIndex: 3, height: '90%' }}>
<ScrollView style={this.state.OrientationStatus == 'Landscape'? { flex: 1, marginBottom: 40 } : {flex: 1}} showsVerticalScrollIndicator={false}> <ScrollView style={this.state.OrientationStatus == 'Landscape'? { flex: 1, marginBottom: 40 } : {flex: 1}} showsVerticalScrollIndicator={false}>
{this.state.data.map((item, index) => { {this.state.dataDummyHistory.map((item, index) => {
return ( return (
<View> <View style={{width: '100%'}}>
{this.state.dataLoad && ( <View style={{backgroundColor: '#e8e8e8', width: '100%', padding: 3, paddingLeft: 15}}>
<Text style={{color: '#3b3b3b', fontSize: 12, fontFamily: fonts.type.fontBasic}}>{item.tanggal}</Text>
</View>
{item.data.map((items, indexs) => {
return (
<View style={{width: '100%', padding: 10, marginLeft: 5, borderBottomWidth: indexs == item.data.length -1? 0 : 1 , borderBottomColor: '#dbdbdb' }}>
<Text style={{fontSize: 14, fontWeight: '700', fontFamily: fonts.type.fontBasic}}>{items.type}</Text>
<View style={{flexDirection: 'row', width: '100%', marginTop: 5}}>
<Text style={{fontSize: 12, width: '75%', color: '#3b3b3b', fontFamily: fonts.type.fontBasic}} ellipsizeMode={'tail'} numberOfLines={1}>{items.message}</Text>
<Text style={{fontSize: 12, width: '25%', color: '#e4b300', fontFamily: fonts.type.fontBasic}} ellipsizeMode={'tail'} numberOfLines={1}>{items.unitName}</Text>
{/* <Text style={{fontStyle: 12, width: '70%'}}>{items.unitName}</Text>
<Text style={{fontStyle: 12, width: '30%', marginLeft: 10}}>{items.message}</Text> */}
</View>
</View>
)
})}
{/* {this.state.dataLoad && (
<View style={{ marginTop: index == 0 ? 40 : 20, marginBottom: index == this.state.data.length - 1 ? 20 : 0, height: 120 }}> <View style={{ marginTop: index == 0 ? 40 : 20, marginBottom: index == this.state.data.length - 1 ? 20 : 0, height: 120 }}>
<View style={{ width: '100%', height: 100, backgroundColor: '#fff', borderRadius: 10, padding: 10, flexDirection: 'row' }}> <View style={{ width: '100%', height: 100, backgroundColor: '#fff', borderRadius: 10, padding: 10, flexDirection: 'row' }}>
<View style={{ width: '70%' }}> <View style={{ width: '70%' }}>
...@@ -107,7 +157,7 @@ class History extends Component { ...@@ -107,7 +157,7 @@ class History extends Component {
> >
<Rect x="0" y="30" rx="5" ry="1" width="1000" height="100" /> <Rect x="0" y="30" rx="5" ry="1" width="1000" height="100" />
</SvgAnimatedLinearGradient> </SvgAnimatedLinearGradient>
)} )} */}
</View> </View>
) )
})} })}
......
...@@ -56,7 +56,7 @@ export default class Approval extends Component { ...@@ -56,7 +56,7 @@ export default class Approval extends Component {
<View key={index} style={{ paddingHorizontal: 7 }}> <View key={index} style={{ paddingHorizontal: 7 }}>
{!this.state.loading && ( {!this.state.loading && (
<TouchableOpacity style={{ marginTop: 10, borderRadius: 20 }} onPress={() => this.props.navigation.navigate('MenuAppraisal', { data: item })}> <TouchableOpacity style={{ marginTop: 10, borderRadius: 20 }} onLongPress={() => alert('takeit')} onPress={() => this.props.navigation.navigate('MenuAppraisal', { data: item })}>
<View style={{ height: 60, backgroundColor: '#e4b300', justifyContent: 'space-between', paddingHorizontal: 20, flexDirection: 'row', borderTopRightRadius: 10, borderTopLeftRadius: 10 }}> <View style={{ height: 60, backgroundColor: '#e4b300', justifyContent: 'space-between', paddingHorizontal: 20, flexDirection: 'row', borderTopRightRadius: 10, borderTopLeftRadius: 10 }}>
<View style={{ justifyContent: 'center' }}> <View style={{ justifyContent: 'center' }}>
<Text style={{ color: 'white', fontSize: 16, fontWeight: '700' }}>{item.contract_number}</Text> <Text style={{ color: 'white', fontSize: 16, fontWeight: '700' }}>{item.contract_number}</Text>
......
...@@ -40,7 +40,8 @@ class HomePageScreen extends Component { ...@@ -40,7 +40,8 @@ class HomePageScreen extends Component {
visAccepted: false, visAccepted: false,
visAppraisal: false, visAppraisal: false,
visApproved: false, visApproved: false,
username: '' username: '',
warhouseName: ''
} }
} }
...@@ -49,7 +50,7 @@ class HomePageScreen extends Component { ...@@ -49,7 +50,7 @@ class HomePageScreen extends Component {
if (this.state.selectedWarehouse != "") { if (this.state.selectedWarehouse != "") {
this.props.navigation.navigate('Penerimaan', { data: this.state.selectedWarehouse }) this.props.navigation.navigate('Penerimaan', { data: this.state.selectedWarehouse })
} else { } else {
alert('Select Warehouse First!') // alert('Select Warehouse First!')
} }
} else if (item == 'Appraisal') { } else if (item == 'Appraisal') {
this.props.navigation.navigate('Appraisal') this.props.navigation.navigate('Appraisal')
...@@ -98,7 +99,7 @@ class HomePageScreen extends Component { ...@@ -98,7 +99,7 @@ class HomePageScreen extends Component {
companyId: item.company_id companyId: item.company_id
}) })
}) })
this.setState({ arrayWarehouse }) this.setState({ arrayWarehouse, selectedWarehouse: arrayWarehouse[0], warhouseName: arrayWarehouse[0].label})
} }
}) })
} }
...@@ -171,14 +172,15 @@ class HomePageScreen extends Component { ...@@ -171,14 +172,15 @@ class HomePageScreen extends Component {
<Menu> <Menu>
<MenuTrigger> <MenuTrigger>
<View style={{alignItems:'center', justifyContent:'center', flexDirection:'row'}}> <View style={{alignItems:'center', justifyContent:'center', flexDirection:'row'}}>
<Text style={{color:'#fff'}}>Warehouse</Text> <Text style={{color:'#fff'}}>{this.state.warhouseName}</Text>
<FontAwesome5Icon size={20} color={'#fff'} name={'angle-down'} style={{marginLeft: 10, marginBottom: -5}}/> <FontAwesome5Icon size={20} color={'#fff'} name={'angle-down'} style={{marginLeft: 10, marginBottom: -5}}/>
</View> </View>
</MenuTrigger> </MenuTrigger>
<MenuOptions optionsContainerStyle={{borderRadius: 5, paddingVertical: 10, paddingHorizontal: 10, backgroundColor: 'white', width: null, height: null, marginTop: 20}}> <MenuOptions optionsContainerStyle={{borderRadius: 5, paddingVertical: 10, paddingHorizontal: 10, backgroundColor: 'white', width: null, height: null, marginTop: 20}}>
{this.state.arrayWarehouse.map((item, index) => { {this.state.arrayWarehouse.map((item, index) => {
// var indexId = this.state.arrayWarehouse.findIndex((val) => val.label == item.label)
return ( return (
<MenuOption style={{marginTop: index == 0? 0 : 5, borderBottomColor: '#dbdbdb', borderBottomWidth: .5}} onSelect={() => {this.setState({ selectedWarehouse: item })}}> this.state.warhouseName != item.label && <MenuOption style={{marginTop: index == 0? 0 : 5, borderBottomColor: '#dbdbdb', borderBottomWidth: .5}} onSelect={() => {this.setState({ selectedWarehouse: item, warhouseName: item.label })}}>
<Text style={{textAlign:'center'}}>{item.label}</Text> <Text style={{textAlign:'center'}}>{item.label}</Text>
</MenuOption> </MenuOption>
) )
......
...@@ -42,7 +42,7 @@ class Notif extends Component { ...@@ -42,7 +42,7 @@ class Notif extends Component {
<ScrollView style={{flex: 1}} showsVerticalScrollIndicator={false}> <ScrollView style={{flex: 1}} showsVerticalScrollIndicator={false}>
{this.state.data.map((item,index) => { {this.state.data.map((item,index) => {
return( return(
<View style={{marginTop: index == 0? 30 : 15, marginBottom: index == this.state.data.length -1 ? 20 : 0, backgroundColor: '#e4b300', padding: 0, paddingTop: 15, borderRadius: 5}}> <View key={index} style={{marginTop: index == 0? 30 : 15, marginBottom: index == this.state.data.length -1 ? 20 : 0, backgroundColor: '#e4b300', padding: 0, paddingTop: 15, borderRadius: 5}}>
<View style={{flexDirection: 'row'}}> <View style={{flexDirection: 'row'}}>
<View style={{width: '20%', justifyContent: 'center', alignItems:'flex-end'}}> <View style={{width: '20%', justifyContent: 'center', alignItems:'flex-end'}}>
<Image style={{width: 50, height: 50, borderRadius: 50, borderColor: '#fff', borderWidth: 2}} source={item.image}/> <Image style={{width: 50, height: 50, borderRadius: 50, borderColor: '#fff', borderWidth: 2}} source={item.image}/>
......
...@@ -70,9 +70,9 @@ class Profile extends Component { ...@@ -70,9 +70,9 @@ class Profile extends Component {
</View> </View>
</LinearGradient> </LinearGradient>
<View style={{ marginTop: 100 }}> <View style={{ marginTop: 100 }}>
{this.state.arrayDummy.map((item) => { {this.state.arrayDummy.map((item, index) => {
return ( return (
<View style={{ borderBottomColor: '#e4b300', borderWidth: 1, width: '100%', height: 50, borderTopColor: 'transparent', borderLeftColor: 'transparent', borderRightColor: 'transparent', justifyContent: 'center', paddingHorizontal: 20 }}> <View key={index} style={{ borderBottomColor: '#e4b300', borderWidth: 1, width: '100%', height: 50, borderTopColor: 'transparent', borderLeftColor: 'transparent', borderRightColor: 'transparent', justifyContent: 'center', paddingHorizontal: 20 }}>
<View style={{ flexDirection: 'row' }}> <View style={{ flexDirection: 'row' }}>
<View style={{ width: '15%' }}> <View style={{ width: '15%' }}>
<FontAwesome5 name={item.image} size={20} /> <FontAwesome5 name={item.image} size={20} />
......
const type = {
fontBasic: 'Ovo-Regular.ttf',
};
export default { type }
\ No newline at end of file
...@@ -61,7 +61,7 @@ class SplashScreen extends Component { ...@@ -61,7 +61,7 @@ class SplashScreen extends Component {
async getData() { async getData() {
var Token = await AsyncStorage.getItem(Constant.TOKEN) var Token = await AsyncStorage.getItem(Constant.TOKEN)
alert(Token) // alert(Token)
if (Token == null || Token == 'TOKEN' || Token == '') { if (Token == null || Token == 'TOKEN' || Token == '') {
setTimeout(() => {this.navigateToLogin()},2500) setTimeout(() => {this.navigateToLogin()},2500)
} else { } else {
......
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
623988521F684C1C97C152EA /* SF-UI-Text-Regular.otf in Resources */ = {isa = PBXBuildFile; fileRef = 81ECD607D5EB43F795FA2DBD /* SF-UI-Text-Regular.otf */; }; 623988521F684C1C97C152EA /* SF-UI-Text-Regular.otf in Resources */ = {isa = PBXBuildFile; fileRef = 81ECD607D5EB43F795FA2DBD /* SF-UI-Text-Regular.otf */; };
743A8D5CE6D14CB2BE10FC0F /* Skia.ttf in Resources */ = {isa = PBXBuildFile; fileRef = AE21B86821A74CB58C31342A /* Skia.ttf */; }; 743A8D5CE6D14CB2BE10FC0F /* Skia.ttf in Resources */ = {isa = PBXBuildFile; fileRef = AE21B86821A74CB58C31342A /* Skia.ttf */; };
89DFF5D059B6422292B31DDD /* Times New Roman.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 499080D8433C4AE79FF948F3 /* Times New Roman.ttf */; }; 89DFF5D059B6422292B31DDD /* Times New Roman.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 499080D8433C4AE79FF948F3 /* Times New Roman.ttf */; };
7BBA9F5935FF44C2B5F71082 /* Ovo-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = A32228D8B9BD424EA41758AD /* Ovo-Regular.ttf */; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */ /* Begin PBXContainerItemProxy section */
...@@ -109,6 +110,7 @@ ...@@ -109,6 +110,7 @@
81ECD607D5EB43F795FA2DBD /* SF-UI-Text-Regular.otf */ = {isa = PBXFileReference; name = "SF-UI-Text-Regular.otf"; path = "../node_modules/react-native-base/Fonts/SF-UI-Text-Regular.otf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; }; 81ECD607D5EB43F795FA2DBD /* SF-UI-Text-Regular.otf */ = {isa = PBXFileReference; name = "SF-UI-Text-Regular.otf"; path = "../node_modules/react-native-base/Fonts/SF-UI-Text-Regular.otf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
AE21B86821A74CB58C31342A /* Skia.ttf */ = {isa = PBXFileReference; name = "Skia.ttf"; path = "../node_modules/react-native-base/Fonts/Skia.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; }; AE21B86821A74CB58C31342A /* Skia.ttf */ = {isa = PBXFileReference; name = "Skia.ttf"; path = "../node_modules/react-native-base/Fonts/Skia.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
499080D8433C4AE79FF948F3 /* Times New Roman.ttf */ = {isa = PBXFileReference; name = "Times New Roman.ttf"; path = "../node_modules/react-native-base/Fonts/Times New Roman.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; }; 499080D8433C4AE79FF948F3 /* Times New Roman.ttf */ = {isa = PBXFileReference; name = "Times New Roman.ttf"; path = "../node_modules/react-native-base/Fonts/Times New Roman.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
A32228D8B9BD424EA41758AD /* Ovo-Regular.ttf */ = {isa = PBXFileReference; name = "Ovo-Regular.ttf"; path = "../app/library/fonts/Ovo-Regular.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
/* End PBXFileReference section */ /* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */ /* Begin PBXFrameworksBuildPhase section */
...@@ -248,6 +250,7 @@ ...@@ -248,6 +250,7 @@
81ECD607D5EB43F795FA2DBD /* SF-UI-Text-Regular.otf */, 81ECD607D5EB43F795FA2DBD /* SF-UI-Text-Regular.otf */,
AE21B86821A74CB58C31342A /* Skia.ttf */, AE21B86821A74CB58C31342A /* Skia.ttf */,
499080D8433C4AE79FF948F3 /* Times New Roman.ttf */, 499080D8433C4AE79FF948F3 /* Times New Roman.ttf */,
A32228D8B9BD424EA41758AD /* Ovo-Regular.ttf */,
); );
name = Resources; name = Resources;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -418,6 +421,7 @@ ...@@ -418,6 +421,7 @@
623988521F684C1C97C152EA /* SF-UI-Text-Regular.otf in Resources */, 623988521F684C1C97C152EA /* SF-UI-Text-Regular.otf in Resources */,
743A8D5CE6D14CB2BE10FC0F /* Skia.ttf in Resources */, 743A8D5CE6D14CB2BE10FC0F /* Skia.ttf in Resources */,
89DFF5D059B6422292B31DDD /* Times New Roman.ttf in Resources */, 89DFF5D059B6422292B31DDD /* Times New Roman.ttf in Resources */,
7BBA9F5935FF44C2B5F71082 /* Ovo-Regular.ttf in Resources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
......
...@@ -84,6 +84,7 @@ ...@@ -84,6 +84,7 @@
<string>SF-UI-Text-Regular.otf</string> <string>SF-UI-Text-Regular.otf</string>
<string>Skia.ttf</string> <string>Skia.ttf</string>
<string>Times New Roman.ttf</string> <string>Times New Roman.ttf</string>
<string>Ovo-Regular.ttf</string>
</array> </array>
</dict> </dict>
</plist> </plist>
module.exports = {
project: {
ios: {},
android: {},
},
assets: ['./app/library/fonts']
};
\ No newline at end of file
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