Commit d7b544bc by Giang Tran

edit cqg packet

parent 65d558bf
......@@ -912,7 +912,7 @@
);
INFOPLIST_FILE = Invest/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.7;
MARKETING_VERSION = 1.8;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
......@@ -940,7 +940,7 @@
DEVELOPMENT_TEAM = MXZ24GRH48;
INFOPLIST_FILE = Invest/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.7;
MARKETING_VERSION = 1.8;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
......
......@@ -39,6 +39,10 @@
</array>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>itms-apps</string>
</array>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
......@@ -57,7 +61,7 @@
<key>NSCameraUsageDescription</key>
<string>Accect connect camera</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string/>
<string></string>
<key>NSPhotoLibraryUsageDescription</key>
<string>To upload images</string>
<key>UIAppFonts</key>
......@@ -92,9 +96,5 @@
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>itms-apps</string>
</array>
</dict>
</plist>
......@@ -399,12 +399,12 @@ PODS:
- React-Core
- RNI18n (2.0.15):
- React
- RNImageCropPicker (0.36.0):
- RNImageCropPicker (0.36.2):
- React-Core
- React-RCTImage
- RNImageCropPicker/QBImagePickerController (= 0.36.0)
- RNImageCropPicker/QBImagePickerController (= 0.36.2)
- TOCropViewController
- RNImageCropPicker/QBImagePickerController (0.36.0):
- RNImageCropPicker/QBImagePickerController (0.36.2):
- React-Core
- React-RCTImage
- TOCropViewController
......@@ -686,7 +686,7 @@ SPEC CHECKSUMS:
RNFBMessaging: c32b623b46dbbabf19079f801f053be75f428398
RNGestureHandler: a479ebd5ed4221a810967000735517df0d2db211
RNI18n: e2f7e76389fcc6e84f2c8733ea89b92502351fd8
RNImageCropPicker: e641bf83ac47324994cac139bde74635ec52c17c
RNImageCropPicker: 35a3ceb837446fa11547704709bb22b5fac6d584
RNReanimated: e03f7425cb7a38dcf1b644d680d1bfc91c3337ad
RNScreens: f0d7a2a440a8ba9f4574ca1ddb3368f473891be4
RNVectorIcons: 31cebfcf94e8cf8686eb5303ae0357da64d7a5a4
......
......@@ -22,6 +22,8 @@ const PacketCQG = (props) => {
const [feeConnect, setFeeConnect] = useState({data: [], title: ''});
const [feeNonPro, setFeeNonPro] = useState({data: [], title: ''});
const [feePro, setFeePro] = useState({data: [], title: ''});
const [totalMD, setTotalMD] = useState(0);
const [totalTB, setTotalTB] = useState(0);
const navigate = useNavigation();
......@@ -30,14 +32,28 @@ const PacketCQG = (props) => {
onChangeMoney();
}, [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 newList = listData.map((e) => e.id);
console.log(newList);
props.showLoading();
const res = await openCQG({packages: newList});
props.hideLoading();
console.log(res);
if (res.data.code == 200) {
props.saveUserToRedux(res.data.data);
setTimeout(() => {
......@@ -54,15 +70,12 @@ 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;
if (e.id == 10) totalMoney -= totalMD;
if (e.id == 11) totalMoney -= totalTB;
totalMoney += e.price_package.price;
});
const result = listData.find((e) => e.id == 10);
console.log(result);
setPrice(totalMoney);
}, 1000);
};
......
......@@ -23,15 +23,6 @@ import PickerImg from '../../components/Picker/PickerImg';
import {HEIGHTXD, WIDTHXD, getFontXD} from '../../Config/Functions';
import R from '../../assets/R';
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 [isSelected, setIsSelected] = useState('');
......@@ -65,7 +56,7 @@ const FeedbackView = (props) => {
<View style={{flex: 1}}>
<HeaderBack isWhite={true} title={'SendFeedback'} />
<View style={styles.container}>
<Text style={styles.txt}>{I18n.t('ReviewService')}</Text>
<Text style={styles.txt}>Review</Text>
<RadioForm animation={true}>
{radio_props.map((obj, i) => (
......@@ -98,7 +89,6 @@ const FeedbackView = (props) => {
style={styles.txtInput}
placeholderTextColor={R.colors.placeHolder}
multiline={true}
placeholder={I18n.t('ShareYourFeel')}
onChangeText={(val) => setTxtInput(val)}
/>
<View
......@@ -141,7 +131,7 @@ const FeedbackView = (props) => {
))}
</ScrollView>
) : (
<PickerImg title={I18n.t('UploadImage')} onClickImage={onClickImages} />
<PickerImg title={'addd'} onClickImage={onClickImages} />
)}
</View>
</View>
......
......@@ -7,7 +7,7 @@ export default {
MyProfile: 'My Profile',
VerifyAccount: 'Verify account',
Payments: 'Payments',
Rose: 'Rose',
Rose: 'Commission',
TeamBonus: 'Team bonus',
MyPartner: 'My partner',
Account: 'Account',
......@@ -210,7 +210,7 @@ export default {
FirstNotifyDate: 'First notify date',
EndlessTransactionDate: 'Endless transaction date',
Finance: 'Finance',
Support: 'Hỗ trợ',
Support: 'Support',
Support_Customer: 'Support Customer',
Price_List: 'Price list',
Time_Transaction: 'Time transaction',
......
......@@ -221,5 +221,6 @@ export default {
Due_Date: 'Lịch đáo hạn',
Enter_Phone: 'Nhập số điện thoại',
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) {
headerStatusBarHeight: 0,
}}
headerMode={'none'}
initialRouteName={ScreenName.AUTHEN}>
initialRouteName={ScreenName.PACKETCQG}>
<Stack.Screen name={ScreenName.LOGINSCREEN} component={Login} />
<Stack.Screen name={ScreenName.HISTORYDETAIL} component={DetailHistory} />
<Stack.Screen name={ScreenName.LEGALDOCUMENT} component={LegaDocument} />
......
......@@ -6650,10 +6650,10 @@ react-native-i18n@^2.0.15:
dependencies:
i18n-js "3.0.11"
react-native-image-crop-picker@^0.36.0:
version "0.36.0"
resolved "https://registry.yarnpkg.com/react-native-image-crop-picker/-/react-native-image-crop-picker-0.36.0.tgz"
integrity sha512-1S8+0EZJmUMWMcdo2tTadqIIsJo7aPxPed0P7Cop3DhBqEeYrAWfgdrJq9VoTXI+cIrOOcTAxn4NZPz+DQEn7g==
react-native-image-crop-picker@^0.36.2:
version "0.36.2"
resolved "https://registry.yarnpkg.com/react-native-image-crop-picker/-/react-native-image-crop-picker-0.36.2.tgz#fcb35c1a12d805bedbb6d94a87078e86a6c9b49f"
integrity sha512-cTauoEHHzx14ZHA7Pt65e7RVnbn1WRYQz2ufTZp9/05EtNDrdsXwNhgtXdWVFbOhYB8qgUFQjy2NelkBOHIH3g==
react-native-indicators@^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