Commit a18264bd by Giang Tran

Merge branch '05_May' into dev_phase2

parents 846ac1ec 8d6a4322
...@@ -912,7 +912,7 @@ ...@@ -912,7 +912,7 @@
); );
INFOPLIST_FILE = Invest/Info.plist; INFOPLIST_FILE = Invest/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.7; MARKETING_VERSION = 1.8;
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
"$(inherited)", "$(inherited)",
"-ObjC", "-ObjC",
...@@ -941,7 +941,7 @@ ...@@ -941,7 +941,7 @@
DEVELOPMENT_TEAM = MXZ24GRH48; DEVELOPMENT_TEAM = MXZ24GRH48;
INFOPLIST_FILE = Invest/Info.plist; INFOPLIST_FILE = Invest/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.7; MARKETING_VERSION = 1.8;
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
"$(inherited)", "$(inherited)",
"-ObjC", "-ObjC",
......
...@@ -39,6 +39,10 @@ ...@@ -39,6 +39,10 @@
</array> </array>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string> <string>$(CURRENT_PROJECT_VERSION)</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>itms-apps</string>
</array>
<key>LSRequiresIPhoneOS</key> <key>LSRequiresIPhoneOS</key>
<true/> <true/>
<key>NSAppTransportSecurity</key> <key>NSAppTransportSecurity</key>
...@@ -57,7 +61,7 @@ ...@@ -57,7 +61,7 @@
<key>NSCameraUsageDescription</key> <key>NSCameraUsageDescription</key>
<string>Accect connect camera</string> <string>Accect connect camera</string>
<key>NSLocationWhenInUseUsageDescription</key> <key>NSLocationWhenInUseUsageDescription</key>
<string/> <string></string>
<key>NSPhotoLibraryUsageDescription</key> <key>NSPhotoLibraryUsageDescription</key>
<string>To upload images</string> <string>To upload images</string>
<key>UIAppFonts</key> <key>UIAppFonts</key>
...@@ -92,9 +96,5 @@ ...@@ -92,9 +96,5 @@
</array> </array>
<key>UIViewControllerBasedStatusBarAppearance</key> <key>UIViewControllerBasedStatusBarAppearance</key>
<false/> <false/>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>itms-apps</string>
</array>
</dict> </dict>
</plist> </plist>
...@@ -399,12 +399,12 @@ PODS: ...@@ -399,12 +399,12 @@ PODS:
- React-Core - React-Core
- RNI18n (2.0.15): - RNI18n (2.0.15):
- React - React
- RNImageCropPicker (0.36.0): - RNImageCropPicker (0.36.2):
- React-Core - React-Core
- React-RCTImage - React-RCTImage
- RNImageCropPicker/QBImagePickerController (= 0.36.0) - RNImageCropPicker/QBImagePickerController (= 0.36.2)
- TOCropViewController - TOCropViewController
- RNImageCropPicker/QBImagePickerController (0.36.0): - RNImageCropPicker/QBImagePickerController (0.36.2):
- React-Core - React-Core
- React-RCTImage - React-RCTImage
- TOCropViewController - TOCropViewController
...@@ -686,7 +686,7 @@ SPEC CHECKSUMS: ...@@ -686,7 +686,7 @@ SPEC CHECKSUMS:
RNFBMessaging: c32b623b46dbbabf19079f801f053be75f428398 RNFBMessaging: c32b623b46dbbabf19079f801f053be75f428398
RNGestureHandler: a479ebd5ed4221a810967000735517df0d2db211 RNGestureHandler: a479ebd5ed4221a810967000735517df0d2db211
RNI18n: e2f7e76389fcc6e84f2c8733ea89b92502351fd8 RNI18n: e2f7e76389fcc6e84f2c8733ea89b92502351fd8
RNImageCropPicker: e641bf83ac47324994cac139bde74635ec52c17c RNImageCropPicker: 35a3ceb837446fa11547704709bb22b5fac6d584
RNReanimated: e03f7425cb7a38dcf1b644d680d1bfc91c3337ad RNReanimated: e03f7425cb7a38dcf1b644d680d1bfc91c3337ad
RNScreens: f0d7a2a440a8ba9f4574ca1ddb3368f473891be4 RNScreens: f0d7a2a440a8ba9f4574ca1ddb3368f473891be4
RNVectorIcons: 31cebfcf94e8cf8686eb5303ae0357da64d7a5a4 RNVectorIcons: 31cebfcf94e8cf8686eb5303ae0357da64d7a5a4
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
"react-native-fast-image": "^8.3.4", "react-native-fast-image": "^8.3.4",
"react-native-gesture-handler": "^1.9.0", "react-native-gesture-handler": "^1.9.0",
"react-native-i18n": "^2.0.15", "react-native-i18n": "^2.0.15",
"react-native-image-crop-picker": "^0.36.0", "react-native-image-crop-picker": "^0.36.2",
"react-native-indicators": "^0.17.0", "react-native-indicators": "^0.17.0",
"react-native-linear-gradient": "^2.5.6", "react-native-linear-gradient": "^2.5.6",
"react-native-modal": "^11.7.0", "react-native-modal": "^11.7.0",
......
...@@ -22,6 +22,8 @@ const PacketCQG = (props) => { ...@@ -22,6 +22,8 @@ const PacketCQG = (props) => {
const [feeConnect, setFeeConnect] = useState({data: [], title: ''}); const [feeConnect, setFeeConnect] = useState({data: [], title: ''});
const [feeNonPro, setFeeNonPro] = useState({data: [], title: ''}); const [feeNonPro, setFeeNonPro] = useState({data: [], title: ''});
const [feePro, setFeePro] = useState({data: [], title: ''}); const [feePro, setFeePro] = useState({data: [], title: ''});
const [totalMD, setTotalMD] = useState(0);
const [totalTB, setTotalTB] = useState(0);
const navigate = useNavigation(); const navigate = useNavigation();
...@@ -30,14 +32,28 @@ const PacketCQG = (props) => { ...@@ -30,14 +32,28 @@ const PacketCQG = (props) => {
onChangeMoney(); onChangeMoney();
}, [listData]); }, [listData]);
useEffect(() => {
getTotal();
}, [feePro]);
const getTotal = () => {
let totalMD = 0;
let totalTB = 0;
if (feePro.data.length > 0)
feePro.data.map((e) => {
if (e.type_data == 'TB' && e.id != 11) totalTB += e.price_package.price;
if (e.type_data == 'MD' && e.id != 10) totalMD += e.price_package.price;
});
setTotalMD(totalMD);
setTotalTB(totalTB);
};
const onClick = async () => { const onClick = async () => {
const newList = listData.map((e) => e.id); const newList = listData.map((e) => e.id);
console.log(newList);
props.showLoading(); props.showLoading();
const res = await openCQG({packages: newList}); const res = await openCQG({packages: newList});
props.hideLoading(); props.hideLoading();
console.log(res);
if (res.data.code == 200) { if (res.data.code == 200) {
props.saveUserToRedux(res.data.data); props.saveUserToRedux(res.data.data);
setTimeout(() => { setTimeout(() => {
...@@ -54,15 +70,12 @@ const PacketCQG = (props) => { ...@@ -54,15 +70,12 @@ const PacketCQG = (props) => {
const onChangeMoney = () => { const onChangeMoney = () => {
setTimeout(() => { setTimeout(() => {
let totalMoney = 0; let totalMoney = 0;
console.log(listData);
listData.map((e) => { listData.map((e) => {
if (e.id == 10) totalMoney -= 960000; if (e.id == 10) totalMoney -= totalMD;
if (e.id == 11) totalMoney -= totalTB;
if (e.id == 11) totalMoney -= 90000;
totalMoney += e.price_package.price; totalMoney += e.price_package.price;
}); });
const result = listData.find((e) => e.id == 10); const result = listData.find((e) => e.id == 10);
console.log(result);
setPrice(totalMoney); setPrice(totalMoney);
}, 1000); }, 1000);
}; };
......
...@@ -23,15 +23,6 @@ import PickerImg from '../../components/Picker/PickerImg'; ...@@ -23,15 +23,6 @@ import PickerImg from '../../components/Picker/PickerImg';
import {HEIGHTXD, WIDTHXD, getFontXD} from '../../Config/Functions'; import {HEIGHTXD, WIDTHXD, getFontXD} from '../../Config/Functions';
import R from '../../assets/R'; import R from '../../assets/R';
import Button from '../../components/Button'; import Button from '../../components/Button';
import I18n from '../../helper/i18/i18n';
const radio_props = [
{label: I18n.t('VeryBad'), value: 0},
{label: I18n.t('Bad'), value: 1},
{label: I18n.t('Normal'), value: 2},
{label: I18n.t('Good'), value: 3},
{label: I18n.t('VeryGood'), value: 4},
];
const FeedbackView = (props) => { const FeedbackView = (props) => {
const [isSelected, setIsSelected] = useState(''); const [isSelected, setIsSelected] = useState('');
...@@ -65,7 +56,7 @@ const FeedbackView = (props) => { ...@@ -65,7 +56,7 @@ const FeedbackView = (props) => {
<View style={{flex: 1}}> <View style={{flex: 1}}>
<HeaderBack isWhite={true} title={'SendFeedback'} /> <HeaderBack isWhite={true} title={'SendFeedback'} />
<View style={styles.container}> <View style={styles.container}>
<Text style={styles.txt}>{I18n.t('ReviewService')}</Text> <Text style={styles.txt}>Review</Text>
<RadioForm animation={true}> <RadioForm animation={true}>
{radio_props.map((obj, i) => ( {radio_props.map((obj, i) => (
...@@ -98,7 +89,6 @@ const FeedbackView = (props) => { ...@@ -98,7 +89,6 @@ const FeedbackView = (props) => {
style={styles.txtInput} style={styles.txtInput}
placeholderTextColor={R.colors.placeHolder} placeholderTextColor={R.colors.placeHolder}
multiline={true} multiline={true}
placeholder={I18n.t('ShareYourFeel')}
onChangeText={(val) => setTxtInput(val)} onChangeText={(val) => setTxtInput(val)}
/> />
<View <View
...@@ -141,7 +131,7 @@ const FeedbackView = (props) => { ...@@ -141,7 +131,7 @@ const FeedbackView = (props) => {
))} ))}
</ScrollView> </ScrollView>
) : ( ) : (
<PickerImg title={I18n.t('UploadImage')} onClickImage={onClickImages} /> <PickerImg title={'addd'} onClickImage={onClickImages} />
)} )}
</View> </View>
</View> </View>
......
...@@ -7,12 +7,10 @@ import {HEIGHTXD} from '../../Config/Functions'; ...@@ -7,12 +7,10 @@ import {HEIGHTXD} from '../../Config/Functions';
const styles = StyleSheet.create({ const styles = StyleSheet.create({
container: { container: {
marginBottom: 10,
width: '100%', width: '100%',
height: HEIGHTXD(500), height: HEIGHTXD(400),
marginTop: 25, marginTop: 25,
marginBottom: 10,
borderTopWidth: 0.5,
borderBottomWidth: 0.5,
borderBottomColor: R.colors.borderGray, borderBottomColor: R.colors.borderGray,
borderTopColor: R.colors.borderGray, borderTopColor: R.colors.borderGray,
shadowColor: '#000', shadowColor: '#000',
...@@ -24,7 +22,6 @@ const styles = StyleSheet.create({ ...@@ -24,7 +22,6 @@ const styles = StyleSheet.create({
shadowRadius: 2.84, shadowRadius: 2.84,
elevation: 2, elevation: 2,
}, },
text: { text: {
color: '#fff', color: '#fff',
fontSize: 30, fontSize: 30,
...@@ -35,24 +32,28 @@ const styles = StyleSheet.create({ ...@@ -35,24 +32,28 @@ const styles = StyleSheet.create({
const SwiperComponent = (props) => { const SwiperComponent = (props) => {
return ( return (
<View style={styles.container}> <View style={styles.container}>
<Swiper style={styles.wrapper} loop={true} autoplay={true}> <Swiper
<View> paginationStyle={{bottom: 5}}
style={styles.wrapper}
loop={true}
autoplay={true}>
<View style={{marginHorizontal: 20, borderRadius: 10}}>
<Image <Image
style={{height: HEIGHTXD(500), width: '100%'}} style={{height: HEIGHTXD(400), width: '100%', borderRadius: 10}}
source={{uri: props.listImage[0].url}} source={{uri: props.listImage[0].url}}
resizeMode={'cover'} resizeMode={'cover'}
/> />
</View> </View>
<View> <View style={{marginHorizontal: 20, borderRadius: 10}}>
<Image <Image
style={{height: HEIGHTXD(500), width: '100%'}} style={{height: HEIGHTXD(400), width: '100%', borderRadius: 10}}
source={{uri: props.listImage[1].url}} source={{uri: props.listImage[1].url}}
resizeMode={'cover'} resizeMode={'cover'}
/> />
</View> </View>
<View> <View style={{marginHorizontal: 20, borderRadius: 10}}>
<Image <Image
style={{height: HEIGHTXD(500), width: '100%'}} style={{height: HEIGHTXD(400), width: '100%', borderRadius: 10}}
source={{uri: props.listImage[2].url}} source={{uri: props.listImage[2].url}}
resizeMode={'cover'} resizeMode={'cover'}
/> />
......
...@@ -7,7 +7,7 @@ export default { ...@@ -7,7 +7,7 @@ export default {
MyProfile: 'My Profile', MyProfile: 'My Profile',
VerifyAccount: 'Verify account', VerifyAccount: 'Verify account',
Payments: 'Payments', Payments: 'Payments',
Rose: 'Rose', Rose: 'Commission',
TeamBonus: 'Team bonus', TeamBonus: 'Team bonus',
MyPartner: 'My partner', MyPartner: 'My partner',
Account: 'Account', Account: 'Account',
...@@ -210,7 +210,7 @@ export default { ...@@ -210,7 +210,7 @@ export default {
FirstNotifyDate: 'First notify date', FirstNotifyDate: 'First notify date',
EndlessTransactionDate: 'Endless transaction date', EndlessTransactionDate: 'Endless transaction date',
Finance: 'Finance', Finance: 'Finance',
Support: 'Hỗ trợ', Support: 'Support',
Support_Customer: 'Support Customer', Support_Customer: 'Support Customer',
Price_List: 'Price list', Price_List: 'Price list',
Time_Transaction: 'Time transaction', Time_Transaction: 'Time transaction',
......
...@@ -221,5 +221,6 @@ export default { ...@@ -221,5 +221,6 @@ export default {
Due_Date: 'Lịch đáo hạn', Due_Date: 'Lịch đáo hạn',
Enter_Phone: 'Nhập số điện thoại', Enter_Phone: 'Nhập số điện thoại',
Version: 'Phiên bản', Version: 'Phiên bản',
UpdateDescription: 'Đã có phiên bản DCVInvest mới. Cập nhật ngay để tiếp tục sử dụng và trải nghiệm những tính năng mới nhất của hệ thống!', UpdateDescription:
'Đã có phiên bản DCVInvest mới. Cập nhật ngay để tiếp tục sử dụng và trải nghiệm những tính năng mới nhất của hệ thống!',
}; };
...@@ -6650,10 +6650,10 @@ react-native-i18n@^2.0.15: ...@@ -6650,10 +6650,10 @@ react-native-i18n@^2.0.15:
dependencies: dependencies:
i18n-js "3.0.11" i18n-js "3.0.11"
react-native-image-crop-picker@^0.36.0: react-native-image-crop-picker@^0.36.2:
version "0.36.0" version "0.36.2"
resolved "https://registry.yarnpkg.com/react-native-image-crop-picker/-/react-native-image-crop-picker-0.36.0.tgz" resolved "https://registry.yarnpkg.com/react-native-image-crop-picker/-/react-native-image-crop-picker-0.36.2.tgz#fcb35c1a12d805bedbb6d94a87078e86a6c9b49f"
integrity sha512-1S8+0EZJmUMWMcdo2tTadqIIsJo7aPxPed0P7Cop3DhBqEeYrAWfgdrJq9VoTXI+cIrOOcTAxn4NZPz+DQEn7g== integrity sha512-cTauoEHHzx14ZHA7Pt65e7RVnbn1WRYQz2ufTZp9/05EtNDrdsXwNhgtXdWVFbOhYB8qgUFQjy2NelkBOHIH3g==
react-native-indicators@^0.17.0: react-native-indicators@^0.17.0:
version "0.17.0" version "0.17.0"
......
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