Commit 17dbae23 authored by Wahyu Adjie Prasetyo's avatar Wahyu Adjie Prasetyo

Merge branch 'master' of ssh://repo.cs.co.id:2222/wahyu/bahanoprek

# Conflicts:
#	view/Home.js
parents 9ff85470 ec44f125
{
"expo": {
"extra" : {
"buildNumber" : "100",
"remarks": ""
},
"name": "Excelso CRM",
"slug": "excelso-crm",
"privacy": "public",
......@@ -9,10 +14,9 @@
"android",
"web"
],
"androidStatusBar": {
"hidden": "true"
},
"version": "2.0.0",
"orientation": "portrait",
"icon": "./assets/excelso.png",
"splash": {
......@@ -29,14 +33,14 @@
"ios": {
"supportsTablet": true,
"bundleIdentifier": "id.web.ravintola.excelsocrm",
"buildNumber": "2006250900",
"buildNumber": "2006290000",
"config": {
"googleMapsApiKey": "AIzaSyCvIFNvXKmBNetqPrV4VnjvF772avYbA3M"
}
},
"android": {
"package": "id.web.ravintola.excelsocrm",
"versionCode": 2006250900,
"versionCode": 2006290000,
"config": {
"googleMaps": {
"apiKey": "AIzaSyAcCfuNHVFstDUE-ZDafWsiUmA3ON79cqo"
......
......@@ -144,5 +144,7 @@
"alertyes":"Yes",
"alertno":"No",
"active": "Active",
"alertreedemexpired":"Sorry, the redemption code has expired, please cancel!"
"alertreedemexpired":"Sorry, the redemption code has expired, please cancel!",
"taxincluded":"(Tax Included)",
"tax":"Tax"
}
\ No newline at end of file
......@@ -146,6 +146,8 @@
"alertyes":"Ya",
"alertno":"Tidak",
"active": "Aktif ",
"alertreedemexpired":"Mohon maaf kode redeem sudah tidak berlaku, Mohon Batalkan !"
"alertreedemexpired":"Mohon maaf kode redeem sudah tidak berlaku, Mohon Batalkan !",
"taxincluded":"(Harga sudah termasuk pajak)",
"tax":"Pajak"
}
\ No newline at end of file
......@@ -483,11 +483,8 @@ class Account extends React.Component {
}
<View style={{ flex: 1, marginBottom: 20, marginTop: 25 }}>
{Platform.OS === 'ios' ? (
<Text style={{ color: 'grey', fontSize: 12, textAlign: 'center' }}>Version {Constants.manifest.version} Build {Constants.manifest.ios.buildNumber}</Text>
) : (
<Text style={{ color: 'grey', fontSize: 12, textAlign: 'center' }}>Version {Constants.manifest.version} Build {Constants.manifest.android.versionCode}</Text>
)}
<Text style={{ color: 'grey', fontSize: 12, textAlign: 'center' }}>Version {Constants.manifest.version} Build {Constants.manifest.extra.buildNumber}</Text>
<Text style={{ color: 'grey', fontSize: 12, textAlign: 'center' }}>{Constants.manifest.extra.remarks}</Text>
</View>
</ScrollView>
......
......@@ -184,7 +184,21 @@ class Auth extends React.Component {
},
title: 'SETTING URL'
}} />
<Stack.Screen name="Home" component={Home} />
{/* <Stack.Screen name="Home" component={Home} /> */}
<Stack.Screen name="Home" component={HomePage}
options={{
headerShown: false,
headerRight: props => <HandleInbox {...props} />,
title: 'TODAY PROMOTION',
headerStyle: { backgroundColor: '#CFB368' },
headerTitleContainerStyle: { alignContent: 'center' },
headerTitleStyle: {
alignSelf: 'center',
fontFamily: 'Gotham-Black',
color: 'white',
textAlign: 'center'
}
}} />
<Stack.Screen name="Profile" component={ProfilePage} options={{
headerStyle: { backgroundColor: '#CFB368' },
headerTitleContainerStyle: { alignContent: 'center' },
......
......@@ -289,24 +289,27 @@ class Home extends React.Component {
})
}
<<<<<<< HEAD
=======
>>>>>>> ec44f1258a343da5f41e3439f3f9aeeaa56bb661
onClickClaimCredit() {
Alert.alert(
"",
"Are you sure want to claim credit ?",
[
{
text: 'No',
onPress: () => console.log('Cancel Claim Credit'),
style: 'cancel',
},
{
text: 'Yes', onPress: () => this.handleClaimCredit()
},
],
{ cancelable: false },
"",
"Are you sure want to claim credit ?",
[
{
text: 'No',
onPress: () => console.log('Cancel Claim Credit'),
style: 'cancel',
},
{
text: 'Yes', onPress: () => this.handleClaimCredit()
},
],
{ cancelable: false },
)
}
}
render() {
const {navigation} = this.props
......@@ -318,14 +321,15 @@ class Home extends React.Component {
return (
<View style={styles.container}>
<StatusBar />
<StatusBar backgroundColor='#CFB368' />
<ScrollView>
<View style={{ flex: 6 }}>
<View style={styles.header}>
<View style={{ flex: 1, alignItems: 'flex-end' }}>
<View style={{ flex: 0.1, padding: 15 }} />
<View style={{ flex: 0.8, alignItems: 'center', padding: 15 }}>
<Text style={styles.titleText}>{i18n.t('promotion')}</Text>
</View>
<View style={{ margin: 15, flex: 0.15, alignItems: 'flex-end' }}>
<View style={{ padding: 15, flex: 0.1, alignItems: 'flex-end' }}>
<TouchableOpacity onPress={() => this.props.navigation.navigate('Inbox List')}>
<SimpleLineIcons name="bell" size={24} color="white" />
{
......@@ -524,20 +528,20 @@ class Home extends React.Component {
</View>
</Card>
{this.state.old_balance_claimed == false ? (
this.state.old_balance == 0 ? (null) :
(<Card style={{ padding: 10, margin: 10, alignContent: 'center' }}>
<View style={{ flex: 1, height: 80, borderRadius: 20, marginRight: 10, marginLeft: 10, justifyContent: 'center' }}>
<NumberFormat decimalScale={0} value={this.state.old_balance} renderText={value => <Text style={{ fontSize: 14, fontFamily: 'Gotham-Light', textAlign: 'center', marginBottom: 10, color: '#838383' }}>CREDIT : Rp. {value}</Text>} displayType={'text'} thousandSeparator={true} prefix={''} />
<View style={{ justifyContent: 'center' }}>
<TouchableOpacity onPress={() => this.handleClaimCredit()}>
<View style={{ height: 40, borderRadius: 10, backgroundColor: '#CFB368', marginRight: 20, marginLeft: 20, justifyContent: 'center' }}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 20, textAlign: 'center', margin: 15 }}>CLAIM CREDIT</Text>
</View>
</TouchableOpacity>
</View>
this.state.old_balance == 0 ? (null) :
(<Card style={{ padding: 10, margin: 10, alignContent: 'center' }}>
<View style={{ flex: 1, height: 80, borderRadius: 20, marginRight: 10, marginLeft: 10, justifyContent: 'center' }}>
<NumberFormat decimalScale={0} value={this.state.old_balance} renderText={value => <Text style={{ fontSize: 14, fontFamily: 'Gotham-Light', textAlign: 'center', marginBottom: 10, color: '#838383' }}>CREDIT : Rp. {value}</Text>} displayType={'text'} thousandSeparator={true} prefix={''} />
<View style={{ justifyContent: 'center' }}>
<TouchableOpacity onPress={() => this.onClickClaimCredit()}>
<View style={{ height: 40, borderRadius: 10, backgroundColor: '#CFB368', marginRight: 20, marginLeft: 20, justifyContent: 'center' }}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 20, textAlign: 'center', margin: 15 }}>CLAIM CREDIT</Text>
</View>
</TouchableOpacity>
</View>
</Card>)
) : (null)}
</View>
</Card>)
) : (null)}
</View>
) :
this.state.account_number == "" && this.state.is_expired == true ? (
......@@ -656,6 +660,16 @@ class Home extends React.Component {
<Text style={{ textAlign: 'center', color: 'white', fontFamily: 'Gotham-Black', fontSize: 14 }}>{i18n.t('topup')}</Text>
</View>
</TouchableOpacity>
<<<<<<< HEAD
</View>
<View style={{ justifyContent: 'center', flex: 1 }}>
<TouchableOpacity onPress={() => this.onClickClaimCredit()}>
<View style={{ height: 40, borderRadius: 10, backgroundColor: '#CFB368', marginRight: 20, marginLeft: 20, justifyContent: 'center' }}>
<Text style={{ textAlign: 'center', color: 'white', fontFamily: 'Gotham-Black', fontSize: 14 }}>{i18n.t('usebalance')}</Text>
</View>
</TouchableOpacity>
</View>
=======
</View>
<View style={{ justifyContent: 'center', flex: 1 }}>
<TouchableOpacity onPress={() => this.onClickClaimCredit()}>
......@@ -664,6 +678,7 @@ class Home extends React.Component {
</View>
</TouchableOpacity>
</View>
>>>>>>> ec44f1258a343da5f41e3439f3f9aeeaa56bb661
</View>
<View style={{ height: 40 }}></View>
</View>
......@@ -683,11 +698,11 @@ const styles = StyleSheet.create({
flex: 0.1,
flexDirection: 'row',
backgroundColor: '#CFB368',
paddingTop: StatusBar.currentHeight
// justifyContent: 'space-between',
// alignItems: 'center'
},
titleText: {
margin: 15,
fontSize: 20,
// fontWeight: 'bold',
fontFamily: 'Gotham-Black',
......
......@@ -298,8 +298,8 @@ class MenuSelection extends React.Component {
render() {
return (
<View style={styles.container}>
<StatusBar/>
<View style={{ flex: 0.5, height: 50, flexDirection: 'row' }}>
<StatusBar backgroundColor='#CFB368'/>
<View style={{ flex: 0.5, height: 50, flexDirection: 'row', paddingTop: StatusBar.currentHeight }}>
<FlatList horizontal={true} style={{ flexDirection: 'row' }}
showsHorizontalScrollIndicator={false}
data={this.state.listCategory}
......
......@@ -542,6 +542,31 @@ class OrderDetail extends React.Component {
<NumberFormat decimalScale={0} value={this.state.detail_trans.trans_subtotal} renderText={value => <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color: 'grey', textAlign: 'right' }}>Rp. {value}</Text>} displayType={'text'} thousandSeparator={true} prefix={''} />
</View>
</View>
{
this.state.detail_trans.trans_type == 3 ? (
<View style={{ marginHorizontal: 10, flexDirection: 'row', justifyContent: 'space-between', flex: 1 }}>
<View style={{ flex: 0.5, marginLeft: 10, marginVertical: 5 }}>
<Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color: 'grey' }}>{i18n.t('tax')}</Text>
</View>
<View style={{ flex: 0.5, marginVertical: 5, alignItems: 'flex-end', marginRight: 10 }}>
{/* <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', textAlign: 'right' }}>{this.state.detail_trans.trans_subtotal}</Text> */}
<NumberFormat decimalScale={0} value={this.state.detail_trans.trans_tax} renderText={value => <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color: 'grey', textAlign: 'right' }}>Rp. {value}</Text>} displayType={'text'} thousandSeparator={true} prefix={''} />
</View>
</View>
) : (
<View style={{ marginHorizontal: 10, flexDirection: 'row', justifyContent: 'space-between', flex: 1 }}>
<View style={{ flex: 0.5, marginLeft: 10, marginVertical: 5 }}>
<Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color: 'grey' }}>{i18n.t('taxincluded')}</Text>
</View>
{/* <View style={{ flex: 0.5, marginVertical: 5, alignItems: 'flex-end', marginRight: 10 }}> */}
{/* <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', textAlign: 'right' }}>{this.state.detail_trans.trans_subtotal}</Text> */}
{/* <NumberFormat decimalScale={0} value={this.state.detail_trans.trans_tax} renderText={value => <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color: 'grey', textAlign: 'right' }}>Rp. {value}</Text>} displayType={'text'} thousandSeparator={true} prefix={''} /> */}
{/* </View> */}
</View>
)
}
{
this.state.detail_trans != '' ? (
this.state.detail_trans.used_reward.length ? (
......
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