Commit d7b544bc by Giang Tran

edit cqg packet

parent 65d558bf
...@@ -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",
...@@ -940,7 +940,7 @@ ...@@ -940,7 +940,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,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!',
}; };
...@@ -63,7 +63,7 @@ function MyStack(props) { ...@@ -63,7 +63,7 @@ function MyStack(props) {
headerStatusBarHeight: 0, headerStatusBarHeight: 0,
}} }}
headerMode={'none'} headerMode={'none'}
initialRouteName={ScreenName.AUTHEN}> initialRouteName={ScreenName.PACKETCQG}>
<Stack.Screen name={ScreenName.LOGINSCREEN} component={Login} /> <Stack.Screen name={ScreenName.LOGINSCREEN} component={Login} />
<Stack.Screen name={ScreenName.HISTORYDETAIL} component={DetailHistory} /> <Stack.Screen name={ScreenName.HISTORYDETAIL} component={DetailHistory} />
<Stack.Screen name={ScreenName.LEGALDOCUMENT} component={LegaDocument} /> <Stack.Screen name={ScreenName.LEGALDOCUMENT} component={LegaDocument} />
......
...@@ -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