Commit 10902d82 by Giang Tran

edit cqg screen

parent c88e19fa
......@@ -54,9 +54,15 @@ const PacketCQG = (props) => {
const onChangeMoney = () => {
setTimeout(() => {
let totalMoney = 0;
console.log(listData);
listData.map((e) => {
if (e.id == 10) totalMoney -= 960000;
if (e.id == 11) totalMoney -= 90000;
totalMoney += e.price_package.price;
});
const result = listData.find((e) => e.id == 10);
console.log(result);
setPrice(totalMoney);
}, 1000);
};
......
......@@ -8,7 +8,7 @@ import {HEIGHTXD} from '../../Config/Functions';
const styles = StyleSheet.create({
container: {
width: '100%',
height: HEIGHTXD(440),
height: HEIGHTXD(500),
marginTop: 25,
marginBottom: 10,
borderTopWidth: 0.5,
......@@ -38,21 +38,21 @@ const SwiperComponent = (props) => {
<Swiper style={styles.wrapper} loop={true} autoplay={true}>
<View>
<Image
style={{height: HEIGHTXD(440), width: '100%'}}
style={{height: HEIGHTXD(500), width: '100%'}}
source={{uri: props.listImage[0].url}}
resizeMode={'cover'}
/>
</View>
<View>
<Image
style={{height: HEIGHTXD(440), width: '100%'}}
style={{height: HEIGHTXD(500), width: '100%'}}
source={{uri: props.listImage[1].url}}
resizeMode={'cover'}
/>
</View>
<View>
<Image
style={{height: HEIGHTXD(440), width: '100%'}}
style={{height: HEIGHTXD(500), width: '100%'}}
source={{uri: props.listImage[2].url}}
resizeMode={'cover'}
/>
......
......@@ -5,16 +5,18 @@ import {getFontXD} from '../../../../Config/Functions';
import {connect} from 'react-redux';
import AppText from '../../../../components/AppText';
import I18n from '../../../../helper/i18/i18n';
import {useNavigation} from '@react-navigation/native';
import {PACKETCQG} from '../../../../routers/ScreenNames';
const Profile = (props) => {
const navigation = useNavigation();
return (
<View style={styles.container}>
{props.user.status == 3 ? (
{props.user.status == 6 ? (
<View>
{' '}
<View style={styles.item}>
<AppText i18nKey={'ContactCode'} style={styles.txtTitle}></AppText>
<Text style={styles.txtBig}>{props.user.cqg_id}</Text>
<Text style={styles.txtBig}>{props.user.contract_code}</Text>
</View>
<View style={styles.item}>
<AppText
......@@ -26,12 +28,29 @@ const Profile = (props) => {
<AppText
i18nKey={'TraddingAccountNumber'}
style={styles.txtTitle}></AppText>
<Text style={styles.txtBig}>{props.user.account}</Text>
<Text style={styles.txtBig}>{props.user.cqg_account}</Text>
</View>
</View>
) : (
<View>
<Text>Hello</Text>
<View style={{justifyContent: 'center', alignItems: 'center', flex: 1}}>
{props.user.status == 5 ? (
<AppText
i18nKey={'WaitVerification'}
style={styles.txtNoti1}></AppText>
) : (
<View style={{justifyContent: 'center', alignItems: 'center'}}>
<AppText
i18nKey={'PopupOpenCQG'}
style={styles.txtNoti}></AppText>
<TouchableOpacity
onPress={() => navigation.navigate(PACKETCQG)}
style={styles.containerBtn}>
<AppText
i18nKey={'OpenAccountCQG'}
style={styles.txtBtn}></AppText>
</TouchableOpacity>
</View>
)}
</View>
)}
</View>
......@@ -54,12 +73,34 @@ const styles = StyleSheet.create({
fontSize: getFontXD(42),
color: R.colors.color777,
marginBottom: 5,
paddingTop: 5,
},
txtNoti: {
fontSize: getFontXD(42),
color: R.colors.black,
marginBottom: 5,
textAlign: 'center',
},
txtNoti1: {
fontSize: getFontXD(52),
color: R.colors.orange,
marginBottom: 5,
textAlign: 'center',
},
txtBig: {
fontSize: getFontXD(46),
},
txtBtn: {
fontSize: getFontXD(52),
color: R.colors.white,
},
containerBtn: {
paddingVertical: 10,
paddingHorizontal: 20,
backgroundColor: R.colors.main,
borderRadius: 5,
marginTop: 30,
},
});
const mapStateToProps = (state) => {
......
import io.invertase.gradle.common.PackageJson
buildscript {
// The Android Gradle plugin is only required when opening the android folder stand-alone.
// This avoids unnecessary downloads and potential conflicts when the library is included as a
// module dependency in an application project.
if (project == rootProject) {
repositories {
google()
jcenter()
}
dependencies {
classpath("com.android.tools.build:gradle:3.5.2")
}
}
}
plugins {
id "io.invertase.gradle.build" version "1.4"
}
def appProject
if (findProject(':@react-native-firebase_app')) {
appProject = project(':@react-native-firebase_app')
} else if (findProject(':react-native-firebase_app')) {
appProject = project(':react-native-firebase_app')
} else {
throw new GradleException('Could not find the react-native-firebase/app package, have you installed it?')
}
def packageJson = PackageJson.getForProject(project)
def appPackageJson = PackageJson.getForProject(appProject)
def firebaseBomVersion = appPackageJson['sdkVersions'] ? appPackageJson['sdkVersions']['android']['firebase'] : "25.3.1"
def coreVersionDetected = appPackageJson['version']
def coreVersionRequired = packageJson['peerDependencies'][appPackageJson['name']]
// Only log after build completed so log warning appears at the end
if (coreVersionDetected != coreVersionRequired) {
gradle.buildFinished {
project.logger.warn("ReactNativeFirebase WARNING: NPM package '${packageJson['name']}' depends on '${appPackageJson['name']}' v${coreVersionRequired} but found v${coreVersionDetected}, this might cause build issues or runtime crashes.")
}
}
project.ext {
set('react-native', [
versions: [
android : [
minSdk : 16,
targetSdk : 28,
compileSdk: 28,
// optional as gradle.buildTools comes with one by default
// overriding here though to match the version RN uses
buildTools: "28.0.3"
],
firebase: [
bom: firebaseBomVersion,
],
],
])
}
apply from: file("./../../app/android/firebase-json.gradle")
def autoInitEnabled = "true"
def notificationChannelId = ""
def defaultNotificationColor = "@color/white";
def notificationColor = defaultNotificationColor
if (rootProject.ext && rootProject.ext.firebaseJson) {
if (rootProject.ext.firebaseJson.isFlagEnabled("messaging_auto_init_enabled") == false) {
autoInitEnabled = "false"
}
notificationChannelId = rootProject.ext.firebaseJson.getStringValue("messaging_android_notification_channel_id", "")
notificationColor = rootProject.ext.firebaseJson.getStringValue("messaging_android_notification_color", defaultNotificationColor)
}
android {
defaultConfig {
multiDexEnabled true
manifestPlaceholders = [
firebaseJsonAutoInitEnabled: autoInitEnabled,
firebaseJsonNotificationChannelId: notificationChannelId,
firebaseJsonNotificationColor: notificationColor
]
}
lintOptions {
disable 'GradleCompatible'
abortOnError false
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
repositories {
google()
jcenter()
}
dependencies {
api appProject
implementation platform("com.google.firebase:firebase-bom:${ReactNative.ext.getVersion("firebase", "bom")}")
implementation "com.google.firebase:firebase-messaging"
}
ReactNative.shared.applyPackageVersion()
ReactNative.shared.applyDefaultExcludes()
ReactNative.module.applyAndroidVersions()
ReactNative.module.applyReactNativeDependency("api")
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