diff --git a/android/app/build.gradle b/android/app/build.gradle
index b306af8..490fd9e 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -128,17 +128,17 @@ def nativeArchitectures = project.getProperties().get("reactNativeDebugArchitect
android {
ndkVersion rootProject.ext.ndkVersion
-
+
compileSdkVersion rootProject.ext.compileSdkVersion
defaultConfig {
applicationId "com.rndanovin"
- minSdkVersion rootProject.ext.minSdkVersion
+ minSdkVersion 21
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
- missingDimensionStrategy 'react-native-camera', 'general' <-- insert this line
-
+ missingDimensionStrategy 'react-native-camera', 'general'
+ multiDexEnabled true
}
splits {
abi {
@@ -192,6 +192,8 @@ android {
}
dependencies {
+ implementation 'androidx.multidex:multidex:2.0.1'
+
implementation fileTree(dir: "libs", include: ["*.jar"])
//noinspection GradleDynamicVersion
implementation "com.facebook.react:react-native:+" // From node_modules
diff --git a/android/gradlew b/android/gradlew
old mode 100755
new mode 100644
index 4f906e0..4e04a6b
--- a/android/gradlew
+++ b/android/gradlew
@@ -1,5 +1,4 @@
#!/usr/bin/env sh
-
#
# Copyright 2015 the original author or authors.
#
@@ -93,14 +92,12 @@ if [ -n "$JAVA_HOME" ] ; then
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
@@ -182,4 +179,4 @@ APP_ARGS=`save "$@"`
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
-exec "$JAVACMD" "$@"
+exec "$JAVACMD" "$@"
\ No newline at end of file
diff --git a/navigation.js b/navigation.js
index 4ae3972..6d488fd 100644
--- a/navigation.js
+++ b/navigation.js
@@ -1,105 +1,124 @@
import * as React from 'react';
import {NavigationContainer} from '@react-navigation/native';
import {createNativeStackNavigator} from '@react-navigation/native-stack';
-import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
+import {createBottomTabNavigator} from '@react-navigation/bottom-tabs';
import Splash from './src/screens/Splash';
import Home from './src/screens/Home';
import Login from './src/screens/Login';
-import Otp from "./src/screens/Otp";
+import Otp from './src/screens/Otp';
import Product from './src/screens/Product';
import Products from './src/screens/Products';
import ShoppingCart from './src/screens/ShoppingCart';
import QR from './src/screens/QR/index';
import {connect} from 'react-redux';
-import i18n from "./src/services/i18n";
-import {useTranslation} from "react-i18next";
-import Profile from "./src/screens/Profile";
-import Videos from "./src/screens/Videos";
-import Exams from "./src/screens/Exams";
+import i18n from './src/services/i18n';
+import {useTranslation} from 'react-i18next';
+import Profile from './src/screens/Profile';
+import Videos from './src/screens/Videos';
+import Exams from './src/screens/Exams';
+import OrderDetails from './src/screens/OrderDetails';
const mapStateToProps = state => {
- return {
- profile: state.profile,
- config: state.config,
- };
+ return {
+ profile: state.profile,
+ config: state.config,
+ };
};
const Stack = createNativeStackNavigator();
const Tab = createBottomTabNavigator();
function BottomTab(props) {
+ const {t} = useTranslation('translation', {keyPrefix: 'main'});
- const {t} = useTranslation('translation', {keyPrefix: 'main'});
-
- return (
-
-
-
-
-
-
-
- )
+ return (
+
+
+
+
+
+
+
+ );
}
function Navigator(props) {
+ React.useEffect(() => {
+ i18n.changeLanguage(props.config.lan);
+ }, [props.config]);
- React.useEffect(() => {
- i18n.changeLanguage(props.config.lan)
- }, [props.config])
-
- return (
-
-
-
-
-
-
-
-
-
-
-
-
- );
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+ );
}
export default connect(mapStateToProps)(Navigator);
diff --git a/src/screens/Home/components/Blogs.js b/src/screens/Home/components/Blogs.js
deleted file mode 100644
index f9727c1..0000000
--- a/src/screens/Home/components/Blogs.js
+++ /dev/null
@@ -1,125 +0,0 @@
-import React from 'react';
-import {View, Text, ScrollView, Image, Dimensions} from 'react-native';
-import food from '../assets/food.png';
-import arrowIcon from '../assets/arrow.png';
-import userImage from '../assets/user.png';
-import message from '../assets/message.png';
-import tw from 'tailwind-react-native-classnames';
-
-const width = Dimensions.get('window').width;
-const height = Dimensions.get('window').height;
-export default function Shop({blogs}) {
- return (
-
-
-
- فروشگاه
-
-
-
-
-
-
- {blogs.map((blog, index) => (
-
-
-
-
- {blog.name}
-
-
-
-
- {'اکبر یوسفی'}
-
-
- {'زمان مطالعه 30 دقیقه'}
-
-
-
-
-
-
- ))}
-
-
-
- );
-}
-
-Shop.defaultProps = {
- blogs: [
- {
- name: 'آیا مواد غذای پر فیبر مفید هستند؟',
- imageUrl: food,
- grade: 3,
- progress: 70,
- },
- {
- name: 'آیا مواد غذای پر فیبر مفید هستند؟',
- imageUrl: food,
- grade: 4,
- progress: 60,
- },
- {
- name: 'آیا مواد غذای پر فیبر مفید هستند؟',
- imageUrl: food,
- grade: 12,
- progress: 90,
- },
- {
- name: 'آیا مواد غذای پر فیبر مفید هستند؟',
- imageUrl: food,
- grade: 3,
- progress: 70,
- },
- {
- name: 'آیا مواد غذای پر فیبر مفید هستند؟',
- imageUrl: food,
- grade: 4,
- progress: 60,
- },
- {
- name: 'آیا مواد غذای پر فیبر مفید هستند؟',
- imageUrl: food,
- grade: 12,
- progress: 90,
- },
- ],
-};
diff --git a/src/screens/Home/components/MyBooks.js b/src/screens/Home/components/MyBooks.js
deleted file mode 100644
index 94c1f2e..0000000
--- a/src/screens/Home/components/MyBooks.js
+++ /dev/null
@@ -1,110 +0,0 @@
-import React from 'react';
-import {View, Text, ScrollView, Image, Dimensions} from 'react-native';
-import tw from 'tailwind-react-native-classnames';
-import olum2Image from '../assets/olum2.png';
-import olum1Image from '../assets/olum1.png';
-import zist11Image from '../assets/zist11.png';
-
-const width = Dimensions.get('window').width;
-const height = Dimensions.get('window').height;
-export default function MyBooks({myBooks}) {
- return (
-
-
- کتاب من
-
-
-
- {myBooks.map((book, index) => (
-
-
-
- {book.name}
-
-
- {book.grade}
-
-
-
-
-
- ))}
-
-
- );
-}
-
-MyBooks.defaultProps = {
- myBooks: [
- {
- name: 'علوم تجربی',
- imageUrl: zist11Image,
- grade: 3,
- progress: 70,
- },
- {
- name: 'زیست شناسی',
- imageUrl: zist11Image,
- grade: 4,
- progress: 60,
- },
- {
- name: 'علوم اجتماعی',
- imageUrl: zist11Image,
- grade: 12,
- progress: 90,
- },
- {
- name: 'علوم تجربی',
- imageUrl: zist11Image,
- grade: 3,
- progress: 70,
- },
- {
- name: 'زیست شناسی',
- imageUrl: zist11Image,
- grade: 4,
- progress: 60,
- },
- {
- name: 'علوم اجتماعی',
- imageUrl: zist11Image,
- grade: 12,
- progress: 90,
- },
- ],
-};
diff --git a/src/screens/Home/components/MyVideos.js b/src/screens/Home/components/MyVideos.js
deleted file mode 100644
index e447075..0000000
--- a/src/screens/Home/components/MyVideos.js
+++ /dev/null
@@ -1,113 +0,0 @@
-import React from 'react';
-import {View, Text, ScrollView, Image, Dimensions} from 'react-native';
-import tw from 'tailwind-react-native-classnames';
-import arrowIcon from '../assets/arrow.png';
-import olum2Image from '../assets/olum2.png';
-import olum1Image from '../assets/olum1.png';
-import shoe from '../assets/shoe.png';
-
-const width = Dimensions.get('window').width;
-const height = Dimensions.get('window').height;
-export default function MyBooks({myBooks}) {
- return (
-
-
-
-
- دورههای ویدئویی شما
-
-
-
-
-
- {myBooks.map((book, index) => (
-
-
-
- {book.name}
-
-
- {book.grade}
-
-
-
-
-
- ))}
-
-
- );
-}
-
-MyBooks.defaultProps = {
- myBooks: [
- {
- name: 'علوم تجربی',
- imageUrl: shoe,
- grade: 3,
- progress: 70,
- },
- {
- name: 'زیست شناسی',
- imageUrl: shoe,
- grade: 4,
- progress: 60,
- },
- {
- name: 'علوم اجتماعی',
- imageUrl: shoe,
- grade: 12,
- progress: 90,
- },
- {
- name: 'علوم تجربی',
- imageUrl: shoe,
- grade: 3,
- progress: 70,
- },
- {
- name: 'زیست شناسی',
- imageUrl: shoe,
- grade: 4,
- progress: 60,
- },
- {
- name: 'علوم اجتماعی',
- imageUrl: shoe,
- grade: 12,
- progress: 90,
- },
- ],
-};
diff --git a/src/screens/Home/components/shop.js b/src/screens/Home/components/shop.js
deleted file mode 100644
index 8cf68ec..0000000
--- a/src/screens/Home/components/shop.js
+++ /dev/null
@@ -1,113 +0,0 @@
-import React from 'react';
-import {View, Text, ScrollView, Image, Dimensions} from 'react-native';
-import zist11Image from '../assets/zist11.png';
-import arrowIcon from '../assets/arrow.png';
-import tw from 'tailwind-react-native-classnames';
-
-const width = Dimensions.get('window').width;
-const height = Dimensions.get('window').height;
-export default function Shop({books}) {
- return (
-
-
-
- فروشگاه
-
-
-
-
-
-
- {books.map((book, index) => (
-
-
-
- ))}
-
-
-
- );
-}
-
-Shop.defaultProps = {
- books: [
- {
- name: 'علوم تجربی',
- imageUrl: zist11Image,
- grade: 3,
- progress: 70,
- },
- {
- name: 'زیست شناسی',
- imageUrl: zist11Image,
- grade: 4,
- progress: 60,
- },
- {
- name: 'علوم اجتماعی',
- imageUrl: zist11Image,
- grade: 12,
- progress: 90,
- },
- {
- name: 'علوم تجربی',
- imageUrl: zist11Image,
- grade: 3,
- progress: 70,
- },
- {
- name: 'زیست شناسی',
- imageUrl: zist11Image,
- grade: 4,
- progress: 60,
- },
- {
- name: 'علوم اجتماعی',
- imageUrl: zist11Image,
- grade: 12,
- progress: 90,
- },
- ],
-};
diff --git a/src/screens/Home/index.js b/src/screens/Home/index.js
index 6fe704a..f2f3943 100644
--- a/src/screens/Home/index.js
+++ b/src/screens/Home/index.js
@@ -1,18 +1,15 @@
import React from "react";
import { View, StyleSheet, Dimensions, ScrollView } from "react-native";
-import MyBooks from './components/MyBooks';
-import Shop from './components/Shop';
-import MyVideos from './components/MyVideos';
-import Blogs from './components/Blogs';
+import tw from 'tailwind-react-native-classnames';
+
// Within your render function
function Home(props) {
return (
-
-
-
-
+
+
+
);
}
@@ -27,7 +24,7 @@ const styles = StyleSheet.create({
backgroundColor: "white",
flexDirection: "column",
paddingVertical : 5,
- paddingHorizontal : 10
+ paddingHorizontal : 5
}
});
diff --git a/src/screens/OrderDetails/assets/b1.png b/src/screens/OrderDetails/assets/b1.png
new file mode 100644
index 0000000..409f943
Binary files /dev/null and b/src/screens/OrderDetails/assets/b1.png differ
diff --git a/src/screens/OrderDetails/components/Book.js b/src/screens/OrderDetails/components/Book.js
new file mode 100644
index 0000000..2d8f2bf
--- /dev/null
+++ b/src/screens/OrderDetails/components/Book.js
@@ -0,0 +1,70 @@
+import React from 'react';
+import {View, Text, Dimensions, Image} from 'react-native';
+import tw from 'tailwind-react-native-classnames';
+import _ from 'lodash';
+
+const width = Dimensions.get('window').width;
+const height = Dimensions.get('window').height;
+
+export default function Book({book}) {
+ return (
+
+
+
+
+
+ علوم اجتماعی
+
+
+ پایه دوم
+
+
+ نسخه دیجیتال
+
+
+
+
+
+ 1
+
+
+ 126.000 تومان
+
+
+
+ );
+}
diff --git a/src/screens/OrderDetails/index.js b/src/screens/OrderDetails/index.js
new file mode 100644
index 0000000..dedcf35
--- /dev/null
+++ b/src/screens/OrderDetails/index.js
@@ -0,0 +1,312 @@
+import React from 'react';
+import {View, Text, Dimensions, StyleSheet, ScrollView} from 'react-native';
+import Book from './components/Book';
+import {connect} from 'react-redux';
+import tw from 'tailwind-react-native-classnames';
+import b1Image from './assets/b1.png';
+import _ from 'lodash';
+
+const width = Dimensions.get('window').width;
+const height = Dimensions.get('window').height;
+
+const colors = {
+ 1: '#FFF700',
+ 4: '#FF0000',
+ 3: '#4CFF00',
+ 2: '#196EC0',
+};
+
+const status = {
+ 1: 'در حال پردازش',
+ 4: 'درخواست رد شد',
+ 3: 'تکمیل شد',
+ 2: 'ارسال شده',
+};
+
+function OrderDetails({order}) {
+ return (
+
+
+
+ {_.join(['شماره سفارش:', order.number], ' ')}
+
+
+
+ {status[order.status]}
+
+
+
+
+
+
+ آدرس تحویل:
+
+
+ {order.address}
+
+
+
+
+
+ مشخصات تحویل گیرنده:
+
+
+ {order.name}
+
+
+
+
+ شماره موبایل:
+
+
+ {order.cellphone}
+
+
+
+
+
+ {_.join(['کد تحویل', order.receiveCode], ' ')}
+
+
+ این کد را پس از دریافت کالا، به مامور ارسال دانوین اعلام فرمایید
+
+
+
+ {order.items.map((item, index) => (
+
+ ))}
+
+
+
+
+ مبلغ سبد خرید:
+
+
+ {_.join([order.shoppingCardPrice, 'تومان'], ' ')}
+
+
+
+
+ تخفیف:
+
+
+ {_.join([order.discountPrice, 'تومان'], ' ')}
+
+
+
+
+
+
+ هزینه ارسال کالا:
+
+
+ {_.join([order.sendPrice, 'تومان'], ' ')}
+
+
+
+
+ جمع هزینه پرداختی:
+
+
+ {_.join([order.totalPrice, 'تومان'], ' ')}
+
+
+
+
+
+
+ نحوه پرداخت:
+
+
+ {order.payMethod}
+
+
+
+
+ شماره تراکنش:
+
+
+ {order.transactionNumber}
+
+
+
+
+
+
+ تاریخ تحویل:
+
+
+ {order.date}
+
+
+
+
+ );
+}
+
+const styles = StyleSheet.create({
+ contentContainerStyle: {
+ paddingBottom: 50,
+ alignItems: 'flex-end',
+ },
+ container: {
+ width: width,
+ backgroundColor: 'white',
+ flexDirection: 'column',
+ paddingVertical: 5,
+ paddingHorizontal: 10,
+ },
+});
+
+export default OrderDetails;
+
+OrderDetails.defaultProps = {
+ order: {
+ number: '535353523653',
+ receiveCode: '300031',
+ status: 2,
+ items: [b1Image, b1Image],
+ date: '1400/1/11',
+ cost: '1.240.000',
+ address:
+ 'تهران خیابان انقلاب حدفاصل ابوریحان و فلسطین بن بست سروش پلاک 2 واحد 12 شرقی',
+ name: 'هومن عابدی',
+ cellphone: '09121234568',
+ shoppingCardPrice: '981.000',
+ discountPrice: '12.000',
+ sendPrice: '18.000',
+ totalPrice: '18.000',
+ payMethod: 'حضوری',
+ transactionNumber: ' BS3194DNB98312',
+ },
+};
diff --git a/src/screens/OrdersFollowUp/assets/b1.png b/src/screens/OrdersFollowUp/assets/b1.png
new file mode 100644
index 0000000..409f943
Binary files /dev/null and b/src/screens/OrdersFollowUp/assets/b1.png differ
diff --git a/src/screens/OrdersFollowUp/assets/b2.png b/src/screens/OrdersFollowUp/assets/b2.png
new file mode 100644
index 0000000..4d2fcfa
Binary files /dev/null and b/src/screens/OrdersFollowUp/assets/b2.png differ
diff --git a/src/screens/OrdersFollowUp/assets/b3.png b/src/screens/OrdersFollowUp/assets/b3.png
new file mode 100644
index 0000000..169c39f
Binary files /dev/null and b/src/screens/OrdersFollowUp/assets/b3.png differ
diff --git a/src/screens/OrdersFollowUp/assets/leftArrow.png b/src/screens/OrdersFollowUp/assets/leftArrow.png
new file mode 100644
index 0000000..1108ed5
Binary files /dev/null and b/src/screens/OrdersFollowUp/assets/leftArrow.png differ
diff --git a/src/screens/OrdersFollowUp/assets/plus.png b/src/screens/OrdersFollowUp/assets/plus.png
new file mode 100644
index 0000000..16ea095
Binary files /dev/null and b/src/screens/OrdersFollowUp/assets/plus.png differ
diff --git a/src/screens/OrdersFollowUp/components/Order.js b/src/screens/OrdersFollowUp/components/Order.js
new file mode 100644
index 0000000..6fae2e0
--- /dev/null
+++ b/src/screens/OrdersFollowUp/components/Order.js
@@ -0,0 +1,175 @@
+import React from 'react';
+import {
+ View,
+ Text,
+ Dimensions,
+ StyleSheet,
+ Image,
+ Pressable,
+} from 'react-native';
+import tw from 'tailwind-react-native-classnames';
+import leftArrowIcon from '../assets/leftArrow.png';
+import plusIcon from '../assets/plus.png';
+import _ from 'lodash';
+
+const width = Dimensions.get('window').width;
+const height = Dimensions.get('window').height;
+
+const colors = {
+ 1: '#FFF700',
+ 4: '#FF0000',
+ 3: '#4CFF00',
+ 2: '#196EC0',
+};
+
+const status = {
+ 1: 'در حال پردازش',
+ 4: 'درخواست رد شد',
+ 3: 'تکمیل شد',
+ 2: 'ارسال شده',
+};
+
+function Order({order}) {
+ return (
+
+
+
+ {_.join(['شماره سفارش:', order.number], ' ')}
+
+
+
+ {status[order.status]}
+
+
+
+
+
+
+
+ {order.items.length < 2
+ ? order?.items?.map(item => (
+
+ ))
+ : order.items
+ ?.slice(0, 1)
+ ?.map(item => (
+
+ ))}
+ {order.items.length >= 2 && (
+
+ {/* */}
+
+
+ )}
+
+
+
+ {_.join(['کد تحویل:', order.receiveCode], ' ')}
+
+
+
+
+
+ {_.join(['جمع فاکتور:', order.cost], ' ')}
+
+
+
+ جزئیات سفارش
+
+
+
+
+ {_.join(['تاریخ سفارش:', order.date], ' ')}
+
+
+
+
+ );
+}
+
+const styles = StyleSheet.create({
+ contentContainerStyle: {
+ paddingBottom: 50,
+ alignItems: 'flex-end',
+ },
+ container: {
+ width: width,
+ backgroundColor: 'white',
+ flexDirection: 'column',
+ paddingVertical: 5,
+ paddingHorizontal: 10,
+ },
+});
+
+export default Order;
diff --git a/src/screens/OrdersFollowUp/index.js b/src/screens/OrdersFollowUp/index.js
index c517fba..3503c4b 100644
--- a/src/screens/OrdersFollowUp/index.js
+++ b/src/screens/OrdersFollowUp/index.js
@@ -1,13 +1,66 @@
-import React from 'react'
-import { View, Text } from 'react-native';
+import React from 'react';
+import {View, Text, Dimensions, StyleSheet, ScrollView} from 'react-native';
+import Order from './components/Order';
import {connect} from 'react-redux';
+import b1Image from './assets/b1.png';
+import b2Image from './assets/b2.png';
+import b3Image from './assets/b3.png';
-function OrdersFollowUp({}) {
+const width = Dimensions.get('window').width;
+
+function OrdersFollowUp({orders}) {
return (
-
-
-
- )
+
+ {
+ orders.map((order, index) => )
+ }
+
+ );
}
+const styles = StyleSheet.create({
+ contentContainerStyle: {
+ paddingBottom: 50,
+ alignItems: 'flex-end',
+ },
+ container: {
+ width: width,
+ backgroundColor: 'white',
+ flexDirection: 'column',
+ paddingVertical: 5,
+ paddingHorizontal: 10,
+ },
+});
+
export default OrdersFollowUp;
+
+OrdersFollowUp.defaultProps = {
+ orders: [
+ {
+ number: '535353523653',
+ receiveCode: '300031',
+ status: 2,
+ items: [b1Image, b2Image, b3Image, b3Image],
+ date: '1400/1/12',
+ cost: '1.240.000',
+ },
+ {
+ number: '535353523653',
+ receiveCode: '300031',
+ status: 3,
+ items: [b1Image, b2Image, b3Image],
+ date: '1400/1/12',
+ cost: '1.240.000',
+ },
+ {
+ number: '535353523653',
+ receiveCode: '300031',
+ status: 4,
+ items: [b1Image, b2Image, b3Image],
+ date: '1400/1/12',
+ cost: '1.240.000',
+ },
+ ],
+};