Commit 416a101b authored by Dida Adams Arizona's avatar Dida Adams Arizona

Merge branch 'didam' into 'master'

update

See merge request !49
parents 70171da7 15cb4e61
......@@ -85,7 +85,7 @@ export default class BaseHeader extends Component {
</View>}
{this.props.notification && <View style={{ alignItems: 'center', width: '100%', paddingBottom: 10, paddingHorizontal: 20, height: STATUSBAR_HEIGHT + 60, paddingTop: 50, flexDirection: 'row', justifyContent: 'space-between', backgroundColor: '#4cc9f0' }}>
<TouchableOpacity onPress={this.props.onBackPress} style={{ marginBottom: -3, flexDirection: 'row' }}>
<Image source={Images.icon_backwhite} style={{ width: 20, height: 15, alignSelf: 'center' }} />
{/* <Image source={Images.icon_backwhite} style={{ width: 20, height: 15, alignSelf: 'center' }} /> */}
<BaseText text={this.props.leftText} type={'bold'} style={{ marginLeft: 10, color: 'white', fontSize: 16, alignSelf: 'center' }} />
</TouchableOpacity>
<TouchableOpacity style={{ justifyContent: 'center', alignSelf: 'center', marginBottom: -3, }} onPress={this.props.notificationPress}>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -20,6 +20,7 @@ import { NavigationEvents } from 'react-navigation';
import Toast from 'react-native-toast-message';
import Api from '../Services/Api';
import Constant from '../Lib/Constant'
import { titleCase } from '../Lib/Utils';
class HomePageScreen extends Component {
constructor(props) {
......@@ -83,9 +84,9 @@ class HomePageScreen extends Component {
<View style={{width: '50%', paddingTop: 30}}>
<Image source={Images.logo_eCart} style={{width: 120, height: 35}}/>
<View style={{elevation: 5, width: 85, height: 85, borderRadius: 85, borderWidth: 46, borderColor: 'white', marginTop: 25, backgroundColor: 'red', alignItems: 'center', justifyContent: 'center',}}>
<Image source={Images.beautyProduct} style={{width: 85, height: 85, borderRadius: 85}}/>
<Image source={{uri: this.state.user != null? 'https://apiecart.eksad.com/' + this.state.user.data.user_image : Images.beautyProduct}} style={{width: 85, height: 85, borderRadius: 85}}/>
</View>
<BaseText type={"bold"} text={'Kang Dadang'} style={{fontSize: 18, color: '#4b4b4b', marginLeft: 5, marginTop: 10}}/>
<BaseText type={"bold"} text={this.state.user != null? titleCase(this.state.user.data.user_name) : 'Kang Dadang'} style={{fontSize: 18, color: '#4b4b4b', marginLeft: 5, marginTop: 10}}/>
</View>
<View style={{width: '50%', alignItems:'flex-end'}}>
{/* <Image source={Images.sliceCircleBlue} style={{width: '100%', height: 150}}/> */}
......
......@@ -23,7 +23,8 @@ class PaymentMethodScreen extends Component {
loading: false,
currency: '',
paymentMethod: [],
paymentID: 0
paymentID: 0,
paymentName: ''
}
}
......@@ -51,6 +52,7 @@ class PaymentMethodScreen extends Component {
this.setState({ loading: true})
Api.create().getPaymentMethod().then(response => {
if (response.data.status == "success") {
console.log(response.data)
this.setState({
paymentMethod: response.data.data.reverse(),
loading: false
......@@ -72,6 +74,7 @@ class PaymentMethodScreen extends Component {
</View>
<View style={{ flexDirection: 'row', marginTop: 10 }}>
<BaseText text={'Use'} type={'regular'} style={{ opacity: .7, fontSize: 12 }} />
<BaseText text={this.state.paymentName} type={'bold'} style={{ opacity: .7, fontSize: 12, marginLeft: 10}} />
</View>
</View>
<View style={{ flex: 1, backgroundColor: '#ececec'}}>
......@@ -85,23 +88,26 @@ class PaymentMethodScreen extends Component {
}
{this.state.paymentMethod.map((item, index) => {
return (
<View style={{ flexDirection: 'row', backgroundColor: 'white', padding: 20, borderBottomWidth: 1, borderBottomColor: '#e0e0e0', justifyContent: 'space-between' }}>
<TouchableOpacity
onPress={() => {
this.props.navigation.state.params.setProps({paymentMethod: item})
this.setState({
paymentID: item.payment_method_id,
paymentName: item.payment_method_name
});
}}
style={{ flexDirection: 'row', backgroundColor: 'white', padding: 20, borderBottomWidth: 1, borderBottomColor: '#e0e0e0', justifyContent: 'space-between' }}>
<View style={{ flexDirection: 'row' }}>
<TouchableOpacity
style={this.state.paymentID == item.payment_method_id ? styles.radioCircleClick : styles.radioCircle}
onPress={() => {
this.setState({
paymentID: item.payment_method_id,
});
}}>
<View
style={this.state.paymentID == item.payment_method_id ? styles.radioCircleClick : styles.radioCircle}>
{this.state.paymentID == item.payment_method_id && <View style={styles.selectedRb} />}
</TouchableOpacity>
</View>
<BaseText text={item.payment_method_name} type={'regular'} style={{ opacity: .7, fontSize: 12, marginLeft: 20 }} />
</View>
{item.value != 0 && index == 0 ?
<BaseText text={item.value} type={'regular'} style={{ opacity: .7, fontSize: 12, marginLeft: 20 }} /> :
null}
</View>
</TouchableOpacity>
)
})}
</View>
......
......@@ -75,7 +75,12 @@ const create = (baseURL = 'https://apiecart.eksad.com/mobile/') => {
const getWallet = () => api.get('get_wallet')
const topUpWallet = (body) => api.post('topup_wallet', body)
const getPaymentMethod = () => api.get('get_payment_method')
// Courier
const getCategoryCourier = () => api.get('get_category_courier')
const getEstimateCourier = (rateId) => api.get(`get_estimate_courier/${rateId}`)
const getEstimateDelivery = (courierId) => api.get(`get_estimate_delivery/${courierId}`)
// Deal Of The Day
const getPeriodeDeal = (body) => api.post('get_deal_product_per_periode', body)
......@@ -189,7 +194,9 @@ const create = (baseURL = 'https://apiecart.eksad.com/mobile/') => {
getNotification,
getDetailNotif,
readNotification,
readAllNotification
readAllNotification,
getEstimateCourier,
getEstimateDelivery,
}
}
......
......@@ -52,6 +52,7 @@ const images = {
icon_coupon: require('../Images/Icons/icon_coupon.png'),
icon_check: require('../Images/Icons/icon_check.png'),
icon_pembayaran: require('../Images/Icons/icon_pembayaran.png'),
icon_delete: require('../Images/Icons/icon_delete.png'),
// big image
letter: require('../Images/letter.png'),
......
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