reza added some changes

master
Reza_ashrafi 3 years ago
parent 26c33c70ca
commit 388573268f
  1. 6
      App.js
  2. 11
      navigation/index.js
  3. 1
      src/components/BottomSheetComponents/ProductReview.js
  4. 2
      src/components/Drawer.js
  5. 29
      src/screens/AR/components/Book.js
  6. 6
      src/screens/AR/index.js
  7. 4
      src/screens/Address/index.js
  8. 4
      src/screens/Home/components/MyBooks.js
  9. 4
      src/screens/Home/components/Scroll.js
  10. 8
      src/screens/Home/index.js
  11. 105
      src/screens/OrderDetails/components/Book.js
  12. 163
      src/screens/OrderDetails/index.js
  13. BIN
      src/screens/OrdersFollowUp/assets/leftArrow.png
  14. 201
      src/screens/OrdersFollowUp/components/Order.js
  15. 4
      src/screens/OrdersFollowUp/index.js
  16. 8
      src/screens/OrdersFollowUp/left.svg
  17. 2
      src/screens/Products/components/Main.js
  18. 23
      src/screens/Profile/components/List.js
  19. 6
      src/screens/Profile/components/Trophy.js
  20. 14
      src/screens/Profile/components/User.js
  21. 22
      src/screens/QR/Scan/index.js
  22. 4
      src/screens/VideoDisplay/components/Season/index.js

@ -9,9 +9,9 @@ import store from './src/redux/store';
const App = () => {
let [fontsLoaded] = useFonts({
light : require("./assets/fonts/Farsi/Regular.ttf"),
regular: require("./assets/fonts/Farsi/Medium.ttf"),
bold: require("./assets/fonts/Farsi/DemiBold.ttf"),
light : require("./assets/fonts/Farsi/Light.ttf"),
regular: require("./assets/fonts/Farsi/Regular.ttf"),
bold: require("./assets/fonts/Farsi/Medium.ttf"),
});
if (!fontsLoaded) {

@ -345,9 +345,9 @@ const HomeStackScreen = () => {
initialRouteName="Home"
>
<HomeStack.Screen name="Home" component={Home} />
<VODStack.Screen name="VOD" component={Videos} />
<ProductsStack.Screen name="Products" component={Products} />
<VODStack.Screen name="Video" component={Video} />
<HomeStack.Screen name="VOD" component={Videos} />
<HomeStack.Screen name="Products" component={Products} />
<HomeStack.Screen name="Video" component={Video} />
<HomeStack.Screen name="Product" component={Product} />
</HomeStack.Navigator>
);
@ -356,7 +356,7 @@ const HomeStackScreen = () => {
const ProductsStack = createNativeStackNavigator();
const ProductsStackScreen = () => {
return (
<ProductsStack.Navigator screenOptions={{ headerShown: false }}>
<ProductsStack.Navigator screenOptions={{ headerShown: false }} initialRouteName="Products">
<ProductsStack.Screen name="Products" component={Products} />
<ProductsStack.Screen name="Product" component={Product} />
</ProductsStack.Navigator>
@ -380,7 +380,6 @@ const CARTStackScreen = () => {
<CARTStack.Navigator screenOptions={{ headerShown: false }}>
<CARTStack.Screen name="ShoppingCart" component={ShoppingCart} />
<CARTStack.Screen name="DeliveryForm" component={DeliveryForm} />
<CARTStack.Screen name="CreateAddress" component={Address} />
</CARTStack.Navigator>
);
}
@ -420,6 +419,8 @@ const Navigation = ({ getStatus, isLogin }) => {
<Stack.Screen name="QRContent" component={QRContent} />
<Stack.Screen name="Contact" component={Contact} />
<Stack.Screen name="AR" component={AR} />
<Stack.Screen name="CreateAddress" component={Address} />
</Stack.Navigator>
</NavigationContainer>
);

@ -50,6 +50,7 @@ const ProductReviews = ({ list }) => {
<View style={[tw("flex flex-row justify-between mt-4")]}>
{question.images.map((image, index) => (
<View
key={index}
style={[
tw("rounded-md flex flex-row justify-center items-center"),
{

@ -135,7 +135,7 @@ const Drawer = ({ position, setBoxPosition, user }) => {
),
]}
></Pressable>
<View style={[tw("w-4/5 bg-white h-full flex flex-col pt-8")]}>
<View style={[tw("w-4/5 bg-white h-full flex flex-col")]}>
<View
style={[
tw("flex flex-col items-end pt-3 pb-1 px-4"),

@ -1,24 +1,41 @@
import { View, Text, Image, Dimensions } from "react-native";
import { View, Text, Image, Dimensions, Appearance } from "react-native";
import React from "react";
//style
import tw from "tailwind-rn";
import fontSize from '../../../constants/fontSize';
import Colors from '../../../constants/Colors';
import fontSize from "../../../constants/fontSize";
import Colors from "../../../constants/Colors";
const { width } = Dimensions.get("window");
const Book = ({ book }) => {
const colorScheme = Appearance.getColorScheme();
return (
<View
style={[tw("w-full flex flex-row-reverse rounded-md p-2 my-2"), {backgroundColor : Colors.theme1.light.blue3}]}
style={[
tw("flex flex-col items-end rounded-md p-2 my-2"),
{ width: "48%" },
]}
>
<Image
source={{ uri: `https://dnvn.ir/api/v1/file/${book.fileId}` }}
style={[
tw("rounded-md"),
{ width: width / 5.5, height: ((width / 5.5) * 3) / 2 },
{ width: width / 2 - 36, height: ((width / 2 - 36) * 4) / 3 },
]}
/>
<Text style={[{fontFamily: "regular", fontSize: fontSize.base, marginRight : 10 }]}>{book.title}</Text>
<Text
style={[
{
fontFamily: "bold",
fontSize: fontSize.lg,
marginTop: 10,
color: Colors.theme1[colorScheme].green79,
},
]}
>
{book.title}
</Text>
</View>
);
};

@ -6,6 +6,7 @@ import {
LayoutAnimation,
Platform,
Dimensions,
View
} from "react-native";
import { connect } from "react-redux";
import { publicApi } from "../../redux/actions";
@ -14,6 +15,8 @@ import Navbar from "../../components/Navbar";
import Drawer from "../../components/Drawer";
import Book from "./components/Book";
import tw from "tailwind-rn";
const { height } = Dimensions.get("window");
function AR({ getArList, arList }) {
@ -33,7 +36,6 @@ function AR({ getArList, arList }) {
style={{
paddingTop: Platform.OS === "android" ? StatusBar.currentHeight : 0,
position: "relative",
// minHeight: height,
backgroundColor: "white",
}}
>
@ -58,8 +60,10 @@ function AR({ getArList, arList }) {
}}
contentContainerStyle={{ paddingBottom: 100 }}
>
<View style={tw("flex flex-row justify-between flex-wrap")}>
{arList.length > 0 &&
arList.map((book, index) => <Book book={book} key={index} />)}
</View>
</ScrollView>
</SafeAreaView>
);

@ -27,6 +27,8 @@ import tw from "tailwind-rn";
import Colors from "../../constants/Colors";
import fontSize from "../../constants/fontSize";
const ios = Platform.OS === "ios";
const Address = ({
city,
province,
@ -181,7 +183,7 @@ const Address = ({
style={styles.container}
>
<View style={tw("w-full flex flex-col pb-4")}>
<MapSelector />
{/* <MapSelector /> */}
<Header
title="اطلاعات هویتی"
text="( لطفا نام و نام خانوادگی خود را به طور کامل وارد نمایید )"

@ -29,7 +29,7 @@ function MyBooks({ books, grades }) {
return (
<TouchableOpacity
style={tw(`flex flex-col ml-3 ${ios ? "items-end" : ""}`)}
onPress={() => navigation.navigate("Product")}
onPress={() => {}}
>
<Image
source={{
@ -73,7 +73,7 @@ function MyBooks({ books, grades }) {
};
return (
<View style={[tw("w-full px-4 mb-5")]}>
<View style={[tw("flex w-full px-4 mb-5")]}>
<View
style={[
tw(`w-full flex flex-col rounded-md pt-3 px-2 overflow-hidden`),

@ -19,7 +19,9 @@ function Scroll({ books }) {
const navigation = useNavigation();
return (
<TouchableOpacity
onPress={() => navigation.navigate("Product")}
onPress={() =>
navigation.navigate("Product", { id: book?.id, type: "book" })
}
style={[
tw("rounded-md mx-1 overflow-hidden rounded-md"),
{

@ -20,8 +20,6 @@ import Blogs from "./components/Blogs";
import Drawer from "../../components/Drawer";
import Header from "./components/Header";
// import { SafeAreaView } from 'react-native-safe-area-context';
// Within your render function
const Home = ({
blogs,
@ -68,7 +66,7 @@ const Home = ({
<Drawer setBoxPosition={setBoxPosition} position={position} />
<ScrollView
contentContainerStyle={styles.contentContainerStyle}
style={[styles.container, tw("w-full flex flex-col")]}
style={[styles.container, tw("flex")]}
>
{userProducts.length > 0 && <MyBooks books={userProducts} />}
<View style={tw("px-4 w-full")}>
@ -85,12 +83,10 @@ const Home = ({
// Later on in your styles..
const styles = StyleSheet.create({
contentContainerStyle: {
paddingBottom: 60,
paddingBottom: 20,
},
container: {
width: Dimensions.get("window").width,
backgroundColor: "white",
flexDirection: "column",
paddingVertical: 0,
paddingHorizontal: 0,
},

@ -1,70 +1,111 @@
import React from 'react';
import {View, Text, Dimensions, Image} from 'react-native';
import tw from 'tailwind-rn';
import fontSize from '../../../constants/fontSize';
import _ from 'lodash';
import React from "react";
import { View, Text, Dimensions, Image, Appearance } from "react-native";
const width = Dimensions.get('window').width;
//style
import tw from "tailwind-rn";
import fontSize from "../../../constants/fontSize";
import Colors from "../../../constants/Colors";
export default function Book({book}) {
import _ from "lodash";
const width = Dimensions.get("window").width;
export default function Book({ book }) {
const colorScheme = Appearance.getColorScheme();
return (
<View
style={[
tw('w-full flex flex-row-reverse justify-between py-3'),
{borderBottomWidth: 1, borderColor: '#86A0B933'},
]}>
<View style={tw('flex flex-row-reverse items-center flex-1')}>
tw("w-full flex flex-row-reverse justify-between py-3"),
{
borderBottomWidth: 1,
borderColor: Colors.theme1[colorScheme].grayE3,
},
]}
>
<View style={tw("flex flex-row-reverse items-center flex-1")}>
<Image
source={book}
style={[
tw('rounded-md'),
{width: width / 5, height: width / 5 * (4 / 2.8)},
tw("rounded-md"),
{ width: width / 5, height: (width / 5) * (4 / 2.8) },
]}
/>
<View style={tw('flex flex-col items-end mr-2')}>
<View style={tw("flex flex-col items-end mr-2")}>
<Text
style={[
{fontSize: fontSize.base, color: '#05335F', fontFamily: 'regular'},
]}>
{
fontSize: fontSize.base,
color: Colors.theme1[colorScheme].green79,
fontFamily: "bold",
},
]}
>
علوم اجتماعی
</Text>
<Text
style={[
tw(' mt-2'),
{fontSize: fontSize.sm, color: '#707070', fontFamily: 'light'},
]}>
tw(" mt-2"),
{
fontSize: fontSize.sm,
color: Colors.theme1[colorScheme].gray20 + "aa",
fontFamily: "regular",
},
]}
>
پایه دوم
</Text>
<Text
style={[
tw(' mt-1'),
{fontSize: fontSize.sm, color: '#05335F', fontFamily: 'light'},
]}>
tw(" mt-1"),
{
fontSize: fontSize.sm,
color: Colors.theme1[colorScheme].greenBA,
fontFamily: "regular",
},
]}
>
نسخه دیجیتال
</Text>
</View>
</View>
<View style={tw('flex flex-row-reverse items-center')}>
<View style={tw("flex flex-row-reverse items-center")}>
<Text
style={[
tw(' py-1 px-3 rounded-sm'),
tw(" py-1 px-3 rounded-sm"),
{
color: '#132F52',
color: "#132F52",
fontSize: fontSize.xl,
backgroundColor: '#F1F1F1',
fontFamily: 'bold'
backgroundColor: "#F1F1F1",
fontFamily: "bold",
},
]}>
]}
>
1
</Text>
<View style={tw("flex flex-row items-center")}>
<Text
style={{
fontFamily: "regular",
fontSize: fontSize.sm,
color: Colors.theme1[colorScheme].green79,
}}
>
تومان
</Text>
<Text
style={[
tw(' mr-3'),
{color: '#132F52', fontSize: fontSize.base, fontFamily: 'regular'},
]}>
126.000 تومان
tw(" mr-3"),
{
color: Colors.theme1[colorScheme].green79,
fontSize: fontSize.xl,
fontFamily: "bold",
},
]}
>
126.000
</Text>
</View>
</View>
</View>
);
}

@ -9,15 +9,23 @@ import {
Platform,
StatusBar,
LayoutAnimation,
Appearance,
} from "react-native";
import { connect } from "react-redux";
import _ from "lodash";
//components
import Navbar from "../../components/Navbar";
import Drawer from "../../components/Drawer";
import Book from "./components/Book";
import { connect } from "react-redux";
//style
import tw from "tailwind-rn";
import fontSize from "../../constants/fontSize";
import Colors from "../../constants/Colors";
//assets
import b1Image from "./assets/b1.png";
import _ from "lodash";
const width = Dimensions.get("window").width;
@ -36,6 +44,7 @@ const status = {
};
function OrderDetails({ order }) {
const colorScheme = Appearance.getColorScheme();
const [position, setPosition] = useState("100%");
const setBoxPosition = () => {
@ -57,7 +66,7 @@ function OrderDetails({ order }) {
hamburgerMenu: false,
title: "",
bookmark: false,
qr: true,
qr: false,
back: true,
}}
/>
@ -69,15 +78,15 @@ function OrderDetails({ order }) {
<View
style={[
tw("flex flex-row-reverse w-full justify-between items-center p-3"),
{ backgroundColor: "#EEF7FF" },
{ backgroundColor: Colors.theme1[colorScheme].greenCF + "1a" },
]}
>
<Text
style={[
{
fontSize: fontSize.sm,
color: "#20297B",
fontFamily: "light",
color: Colors.theme1[colorScheme].green79,
fontFamily: "bold",
},
]}
>
@ -86,7 +95,11 @@ function OrderDetails({ order }) {
<View style={tw("flex flex-row-reverse items-center")}>
<Text
style={[
{ color: "#20297B", fontSize: fontSize.sm, fontFamily: "bold" },
{
color: Colors.theme1[colorScheme].green79,
fontSize: fontSize.sm,
fontFamily: "bold",
},
]}
>
{status[order.status]}
@ -102,12 +115,19 @@ function OrderDetails({ order }) {
<View
style={[
tw("w-full flex flex-row-reverse items-center py-4"),
{ borderBottomWidth: 1, borderColor: "#86A0B933" },
{
borderBottomWidth: 1,
borderColor: Colors.theme1[colorScheme].grayE3,
},
]}
>
<Text
style={[
{ fontSize: fontSize.sm, color: "#05335F", fontFamily: "bold" },
{
fontSize: fontSize.sm,
color: Colors.theme1[colorScheme].green79,
fontFamily: "bold",
},
]}
>
آدرس تحویل:
@ -118,8 +138,8 @@ function OrderDetails({ order }) {
{
fontSize: fontSize.sm,
lineHeight: 17,
color: "#05335F",
fontFamily: "light",
color: Colors.theme1[colorScheme].green79,
fontFamily: "regular",
},
]}
>
@ -129,13 +149,20 @@ function OrderDetails({ order }) {
<View
style={[
tw("w-full flex flex-row-reverse justify-between py-4"),
{ borderBottomWidth: 1, borderColor: "#86A0B933" },
{
borderBottomWidth: 1,
borderColor: Colors.theme1[colorScheme].grayE3,
},
]}
>
<View style={tw("flex flex-row-reverse items-center")}>
<Text
style={[
{ fontSize: fontSize.sm, color: "#05335F", fontFamily: "bold" },
{
fontSize: fontSize.sm,
color: Colors.theme1[colorScheme].green79,
fontFamily: "bold",
},
]}
>
مشخصات تحویل گیرنده:
@ -146,8 +173,8 @@ function OrderDetails({ order }) {
{
fontSize: fontSize.sm,
lineHeight: 17,
color: "#05335F",
fontFamily: "light",
color: Colors.theme1[colorScheme].green79,
fontFamily: "regular",
},
]}
>
@ -157,7 +184,11 @@ function OrderDetails({ order }) {
<View style={tw("flex flex-row-reverse items-center")}>
<Text
style={[
{ fontSize: fontSize.sm, color: "#05335F", fontFamily: "bold" },
{
fontSize: fontSize.sm,
color: Colors.theme1[colorScheme].green79,
fontFamily: "bold",
},
]}
>
شماره موبایل:
@ -168,8 +199,8 @@ function OrderDetails({ order }) {
{
fontSize: fontSize.sm,
lineHeight: 17,
color: "#05335F",
fontFamily: "light",
color: Colors.theme1[colorScheme].green79,
fontFamily: "regular",
},
]}
>
@ -180,12 +211,16 @@ function OrderDetails({ order }) {
<View
style={[
tw("w-full rounded-md flex flex-col p-4 items-end mt-2"),
{ backgroundColor: "#EEF6FF" },
{ backgroundColor: Colors.theme1[colorScheme].greenFF1 + 'aa' },
]}
>
<Text
style={[
{ fontSize: fontSize.sm, color: "#05335F", fontFamily: "bold" },
{
fontSize: fontSize.sm,
color: Colors.theme1[colorScheme].green79,
fontFamily: "bold",
},
]}
>
{_.join(["کد تحویل", order.receiveCode], " ")}
@ -195,8 +230,8 @@ function OrderDetails({ order }) {
tw("font-light text-right mt-1"),
{
fontSize: fontSize.sm,
color: "#05335F",
fontFamily: "light",
color: Colors.theme1[colorScheme].green79,
fontFamily: "regular",
},
]}
>
@ -212,7 +247,11 @@ function OrderDetails({ order }) {
<View style={tw("flex flex-row-reverse")}>
<Text
style={[
{ fontSize: fontSize.sm, color: "#05335F", fontFamily: "bold" },
{
fontSize: fontSize.sm,
color: Colors.theme1[colorScheme].green79,
fontFamily: "bold",
},
]}
>
مبلغ سبد خرید:
@ -222,8 +261,8 @@ function OrderDetails({ order }) {
tw("font-light text-right mr-1"),
{
fontSize: fontSize.sm,
color: "#05335F",
fontFamily: "light",
color: Colors.theme1[colorScheme].green79,
fontFamily: "regular",
},
]}
>
@ -233,7 +272,11 @@ function OrderDetails({ order }) {
<View style={tw("flex flex-row-reverse")}>
<Text
style={[
{ fontSize: fontSize.sm, color: "#05335F", fontFamily: "bold" },
{
fontSize: fontSize.sm,
color: Colors.theme1[colorScheme].green79,
fontFamily: "bold",
},
]}
>
تخفیف:
@ -243,8 +286,8 @@ function OrderDetails({ order }) {
tw("font-light text-right mr-1"),
{
fontSize: fontSize.sm,
color: "#05335F",
fontFamily: "light",
color: Colors.theme1[colorScheme].green79,
fontFamily: "regular",
},
]}
>
@ -255,13 +298,20 @@ function OrderDetails({ order }) {
<View
style={[
tw("w-full flex flex-row-reverse justify-between py-4"),
{ borderBottomWidth: 1, borderColor: "#86A0B933" },
{
borderBottomWidth: 1,
borderColor: Colors.theme1[colorScheme].grayE3,
},
]}
>
<View style={tw("flex flex-row-reverse")}>
<Text
style={[
{ fontSize: fontSize.sm, color: "#05335F", fontFamily: "bold" },
{
fontSize: fontSize.sm,
color: Colors.theme1[colorScheme].green79,
fontFamily: "bold",
},
]}
>
هزینه ارسال کالا:
@ -271,8 +321,8 @@ function OrderDetails({ order }) {
tw("font-light text-right mr-1"),
{
fontSize: fontSize.sm,
color: "#05335F",
fontFamily: "light",
color: Colors.theme1[colorScheme].green79,
fontFamily: "regular",
},
]}
>
@ -282,7 +332,11 @@ function OrderDetails({ order }) {
<View style={tw("flex flex-row-reverse")}>
<Text
style={[
{ fontSize: fontSize.sm, color: "#05335F", fontFamily: "bold" },
{
fontSize: fontSize.sm,
color: Colors.theme1[colorScheme].green79,
fontFamily: "bold",
},
]}
>
جمع هزینه پرداختی:
@ -292,8 +346,8 @@ function OrderDetails({ order }) {
tw("font-light text-right mr-1"),
{
fontSize: fontSize.sm,
color: "#05335F",
fontFamily: "light",
color: Colors.theme1[colorScheme].green79,
fontFamily: "regular",
},
]}
>
@ -304,13 +358,20 @@ function OrderDetails({ order }) {
<View
style={[
tw("w-full flex flex-row-reverse justify-between py-4"),
{ borderBottomWidth: 1, borderColor: "#86A0B933" },
{
borderBottomWidth: 1,
borderColor: Colors.theme1[colorScheme].grayE3,
},
]}
>
<View style={tw("flex flex-row-reverse")}>
<Text
style={[
{ fontSize: fontSize.sm, color: "#05335F", fontFamily: "bold" },
{
fontSize: fontSize.sm,
color: Colors.theme1[colorScheme].green79,
fontFamily: "bold",
},
]}
>
نحوه پرداخت:
@ -320,8 +381,8 @@ function OrderDetails({ order }) {
tw("font-light text-right mr-1"),
{
fontSize: fontSize.sm,
color: "#05335F",
fontFamily: "light",
color: Colors.theme1[colorScheme].green79,
fontFamily: "regular",
},
]}
>
@ -331,7 +392,11 @@ function OrderDetails({ order }) {
<View style={tw("flex flex-row-reverse items-center")}>
<Text
style={[
{ fontSize: fontSize.sm, color: "#05335F", fontFamily: "bold" },
{
fontSize: fontSize.sm,
color: Colors.theme1[colorScheme].green79,
fontFamily: "bold",
},
]}
>
شماره تراکنش:
@ -341,8 +406,8 @@ function OrderDetails({ order }) {
tw("font-light text-right mr-1"),
{
fontSize: fontSize.sm,
color: "#05335F",
fontFamily: "light",
color: Colors.theme1[colorScheme].green79,
fontFamily: "regular",
},
]}
>
@ -354,7 +419,11 @@ function OrderDetails({ order }) {
<View style={tw("flex flex-row-reverse items-center")}>
<Text
style={[
{ fontSize: fontSize.sm, color: "#05335F", fontFamily: "bold" },
{
fontSize: fontSize.sm,
color: Colors.theme1[colorScheme].green79,
fontFamily: "bold",
},
]}
>
تاریخ تحویل:
@ -364,8 +433,8 @@ function OrderDetails({ order }) {
tw("font-light text-right mr-1"),
{
fontSize: fontSize.sm,
color: "#05335F",
fontFamily: "light",
color: Colors.theme1[colorScheme].green79,
fontFamily: "regular",
},
]}
>
@ -387,8 +456,8 @@ const styles = StyleSheet.create({
width: width,
backgroundColor: "white",
flexDirection: "column",
paddingVertical: 5,
paddingHorizontal: 10,
paddingVertical: 0,
paddingHorizontal: 16,
},
});

Binary file not shown.

Before

Width:  |  Height:  |  Size: 241 B

@ -1,141 +1,192 @@
import React from 'react';
import React from "react";
import {
View,
Text,
Dimensions,
StyleSheet,
Image,
TouchableOpacity
} from 'react-native';
import { useNavigation } from '@react-navigation/native';
import tw from 'tailwind-rn';
import fontSize from '../../../constants/fontSize';
import leftArrowIcon from '../assets/leftArrow.png';
import _ from 'lodash';
TouchableOpacity,
Appearance,
} from "react-native";
import { useNavigation } from "@react-navigation/native";
import Svg, { Path } from "react-native-svg"
import _ from "lodash";
const width = Dimensions.get('window').width;
//style
import tw from "tailwind-rn";
import fontSize from "../../../constants/fontSize";
import Colors from "../../../constants/Colors";
const width = Dimensions.get("window").width;
const colors = {
1: '#FFF700',
4: '#FF0000',
3: '#4CFF00',
2: '#196EC0',
1: "#FFF700",
4: "#FF0000",
3: "#4CFF00",
2: "#196EC0",
};
const status = {
1: 'در حال پردازش',
4: 'درخواست رد شد',
3: 'تکمیل شد',
2: 'ارسال شده',
1: "در حال پردازش",
4: "درخواست رد شد",
3: "تکمیل شد",
2: "ارسال شده",
};
function Order({order}) {
function Order({ order }) {
const colorScheme = Appearance.getColorScheme();
const navigation = useNavigation();
return (
<View
style={[
tw('w-full flex flex-col rounded-md overflow-hidden my-3'),
{borderWidth: 1, borderColor: '#EEF7FF'},
]}>
tw("w-full flex flex-col rounded-md overflow-hidden my-3"),
{
borderWidth: 1,
borderColor: Colors.theme1[colorScheme].greenCF + "22",
},
]}
>
<View
style={[
tw(
'flex flex-row-reverse w-full justify-between items-center p-3',
),
{backgroundColor: '#EEF7FF'},
]}>
tw("flex flex-row-reverse w-full justify-between items-center p-3"),
{ backgroundColor: Colors.theme1[colorScheme].greenCF + "1a" },
]}
>
<Text
style={[
tw('font-medium'),
{fontSize: fontSize.base, color: '#20297B', fontFamily: 'regular'},
]}>
{_.join(['شماره سفارش:', order.number], ' ')}
tw("font-medium"),
{
fontSize: fontSize.base,
color: Colors.theme1[colorScheme].green79,
fontFamily: "regular",
},
]}
>
{_.join(["شماره سفارش:", order.number], " ")}
</Text>
<View style={tw('flex flex-row-reverse items-center')}>
<View style={tw("flex flex-row-reverse items-center")}>
<Text
style={[
tw('font-light'),
{color: '#20297B', fontSize: fontSize.sm, fontFamily: 'bold'},
]}>
tw("font-light"),
{
color: Colors.theme1[colorScheme].green79,
fontSize: fontSize.sm,
fontFamily: "bold",
},
]}
>
{status[order.status]}
</Text>
<View
style={[
tw('h-4 w-4 rounded-full mr-2'),
{backgroundColor: colors[order.status]},
]}></View>
tw("h-4 w-4 rounded-full mr-2"),
{ backgroundColor: colors[order.status] },
]}
></View>
</View>
</View>
<View
style={tw('w-full flex flex-row-reverse justify-between p-3')}>
<View style={tw('flex flex-col')}>
<View style={tw('flex flex-row-reverse mb-2')}>
<View style={tw("w-full flex flex-row-reverse justify-between p-3")}>
<View style={tw("flex flex-col")}>
<View style={tw("flex flex-row-reverse mb-2")}>
{order.items.length < 2
? order?.items?.map(item => (
? order?.items?.map((item, index) => (
<Image
key={index}
source={item}
style={[
tw('rounded-md ml-1.5'),
{width: width / 5, height: width / 5 * (4 / 3)},
tw("rounded-md ml-1.5"),
{ width: width / 5, height: (width / 5) * (4 / 3) },
]}
/>
))
: order.items
?.slice(0, 1)
?.map(item => (
?.map((item, index) => (
<Image
key={index}
source={item}
style={[
tw('rounded-md ml-1.5'),
{width: width / 5, height: width / 5 * (4 / 3)},
tw("rounded-md ml-1.5"),
{ width: width / 5, height: (width / 5) * (4 / 3) },
]}
/>
))}
</View>
<View style={[tw('')]}>
<View style={[tw("")]}>
<Text
style={[
tw('p-2 rounded-md text-center'),
tw("p-2 rounded-md text-center"),
{
fontSize: fontSize.sm,
fontFamily: 'bold',
backgroundColor: '#F0FFF1',
color: '#05335F',
fontFamily: "bold",
backgroundColor: "#F0FFF1",
color: Colors.theme1[colorScheme].green79,
},
]}>
{_.join(['کد تحویل:', order.receiveCode], ' ')}
]}
>
{_.join(["کد تحویل:", order.receiveCode], " ")}
</Text>
</View>
</View>
<View style={tw('flex flex-col items-center mr-4')}>
<View style={tw("flex flex-col items-center mr-4")}>
<Text
style={[
tw('my-3'),
{fontSize: width / 31, color: '#132F52', fontFamily: 'bold'},
]}>
{_.join(['جمع فاکتور:', order.cost], ' ')}
tw("my-3"),
{
fontSize: fontSize.tiny,
color: Colors.theme1[colorScheme].gray20,
fontFamily: "bold",
},
]}
>
{_.join(["جمع فاکتور:", order.cost], " ")}
</Text>
<TouchableOpacity
onPress={() => navigation.navigate('Order')}
onPress={() => navigation.navigate("Order")}
style={[
tw('rounded-md flex flex-row-reverse justify-center px-5 py-2'),
{borderWidth: 1, borderColor: '#1999C0'},
]}>
<Text style={{fontSize: fontSize.base, color: '#1999C0', fontFamily: 'regular'}}>
tw("rounded-md flex flex-row-reverse justify-center px-5 py-2"),
{
borderWidth: 1,
borderColor: Colors.theme1[colorScheme].greenCF,
},
]}
>
<Text
style={{
fontSize: fontSize.base,
color: Colors.theme1[colorScheme].greenCF,
fontFamily: "regular",
}}
>
جزئیات سفارش
</Text>
<Image
source={leftArrowIcon}
style={{width: 18, height: 18, marginRight: 10}}
<Svg
xmlns="http://www.w3.org/2000/svg"
width={14.381}
height={14.381}
style={{marginTop : 3, marginRight : 5}}
>
<Path
d="M8.988 11.936 5.081 8.03a1.19 1.19 0 0 1 0-1.678l3.907-3.907"
fill="none"
stroke={Colors.theme1[colorScheme].greenCF}
strokeLinecap="round"
strokeLinejoin="round"
data-name="vuesax/linear/arrow-left"
/>
</Svg>
</TouchableOpacity>
<Text
style={[
tw('my-5'),
{fontSize: fontSize.sm, color: '#132F52', fontFamily: 'light'},
]}>
{_.join(['تاریخ سفارش:', order.date], ' ')}
tw("my-5"),
{
fontSize: fontSize.sm,
color: Colors.theme1[colorScheme].gray20,
fontFamily: "light",
},
]}
>
{_.join(["تاریخ سفارش:", order.date], " ")}
</Text>
</View>
</View>
@ -146,12 +197,12 @@ function Order({order}) {
const styles = StyleSheet.create({
contentContainerStyle: {
paddingBottom: 50,
alignItems: 'flex-end',
alignItems: "flex-end",
},
container: {
width: width,
backgroundColor: 'white',
flexDirection: 'column',
backgroundColor: "white",
flexDirection: "column",
paddingVertical: 5,
paddingHorizontal: 10,
},

@ -63,8 +63,8 @@ const styles = StyleSheet.create({
width: width,
backgroundColor: "white",
flexDirection: "column",
paddingVertical: 5,
paddingHorizontal: 10,
paddingVertical: 0,
paddingHorizontal: 16,
},
});

@ -0,0 +1,8 @@
<svg xmlns="http://www.w3.org/2000/svg" width="14.381" height="14.381" viewBox="0 0 14.381 14.381">
<g id="vuesax_linear_arrow-left" data-name="vuesax/linear/arrow-left" transform="translate(-364 -252)">
<g id="arrow-left" transform="translate(364 252)">
<path id="Vector" d="M4.253,9.491.346,5.585a1.19,1.19,0,0,1,0-1.678L4.253,0" transform="translate(4.735 2.445)" fill="none" stroke="#1999c0" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
<path id="Vector-2" data-name="Vector" d="M0,0H14.381V14.381H0Z" transform="translate(14.381 14.381) rotate(180)" fill="none" opacity="0"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 643 B

@ -72,7 +72,7 @@ const Main = ({ books, filterOptions, grades }) => {
? bySearchFilter?.map((product, index) => (
<Pressable
style={[tw(`w-full flex flex-col mb-5`)]}
key={Math.random()}
key={index}
onPress={() => navigation.navigate("Product")}
>
<View style={[tw("relative w-full mb-1")]}>

@ -9,6 +9,7 @@ import {
import React from "react";
import { connect } from "react-redux";
import Svg, { Path, G } from "react-native-svg";
import { useNavigation } from "@react-navigation/native";
//style
import tw from "tailwind-rn";
@ -18,6 +19,7 @@ import Colors from "../../../constants/Colors";
const ios = Platform.OS === "ios";
const List = ({}) => {
const navigation = useNavigation();
const colorScheme = Appearance.getColorScheme();
const [dropdown, setDropdown] = React.useState(true);
const pages = [
@ -44,6 +46,7 @@ const List = ({}) => {
</Svg>
),
name: "اطلاعات حساب کاربری",
onPress: () => navigation.push("CreateAddress", { type: "profile" }),
},
{
icon: (
@ -77,6 +80,7 @@ const List = ({}) => {
</Svg>
),
name: "سفارشات",
onPress: () => navigation.push("Orders"),
},
{
icon: (
@ -101,6 +105,7 @@ const List = ({}) => {
</Svg>
),
name: "کتابهای من",
onPress: () => navigation.push("AR"),
},
{
icon: (
@ -128,6 +133,7 @@ const List = ({}) => {
</Svg>
),
name: "دورههای من",
onPress: () => {},
},
{
icon: (
@ -152,6 +158,7 @@ const List = ({}) => {
</Svg>
),
name: "لیست علاقهمندیها",
onPress: () => {},
},
{
icon: (
@ -185,6 +192,7 @@ const List = ({}) => {
</Svg>
),
name: "آدرسها",
onPress: () => {},
},
];
return (
@ -194,25 +202,24 @@ const List = ({}) => {
key={index}
style={[
tw(
`w-full flex items-center justify-between mb-4 pb-4 ${
ios ? "flex-row-reverse" : "flex-row"
}`
`w-full flex items-center justify-between mb-4 pb-4 flex-row-reverse`
),
{
borderBottomWidth: 1,
borderColor: Colors.theme1[colorScheme].grayE3 + "aa",
},
]}
onPress={() => page.onPress()}
>
<View
style={tw(
`flex items-center ${ios ? "flex-row-reverse" : "flex-row"}`
`flex items-center flex-row-reverse`
)}
>
{page.icon}
<Text
style={{
fontFamily: "light",
fontFamily: "regular",
marginTop: 5,
marginRight: 10,
color: Colors.theme1[colorScheme].gray20,
@ -221,11 +228,7 @@ const List = ({}) => {
{page.name}
</Text>
</View>
<Svg
xmlns="http://www.w3.org/2000/svg"
width={24}
height={24}
>
<Svg xmlns="http://www.w3.org/2000/svg" width={24} height={24}>
<Path
d="M15.002 19.92 8.479 13.4a1.986 1.986 0 0 1 0-2.8l6.523-6.52"
fill="none"

@ -17,14 +17,12 @@ const Trophy = ({}) => {
<View
style={[
tw(
`w-full flex py-4 px-3 justify-between ${
ios ? "flex-row-reverse" : "flex-row"
}`
`w-full flex py-4 px-3 justify-between flex-row-reverse`
),
{ backgroundColor: Colors.theme1[colorScheme].yellow2 },
]}
>
<View style={[tw(`flex ${ios ? "flex-row-reverse" : "flex-row"}`)]}>
<View style={[tw(`flex flex-row-reverse`)]}>
<Svg xmlns="http://www.w3.org/2000/svg" width={23.862} height={23.862}>
<G fill="none" stroke="#d6d020" data-name="vuesax/linear/cup">
<Path

@ -17,15 +17,13 @@ const User = ({ user }) => {
<View style={tw(`w-full flex-col ${ios ? "items-end" : ""}`)}>
<Pressable
style={tw(
`w-full mt-2 mb-2 flex justify-between items-center ${
ios ? "flex-row-reverse" : "flex-row"
}`
`w-full mt-2 mb-2 flex flex-row-reverse justify-between items-center`
)}
onPress={() => setDropdown(!dropdown)}
>
<View
style={tw(
`flex items-center ${ios ? "flex-row-reverse" : "flex-row"}`
`flex items-center flex-row-reverse`
)}
>
{user?.picFileId ? (
@ -82,9 +80,7 @@ const User = ({ user }) => {
<View
style={[
tw(
`flex items-center w-full pb-3 mb-4 ${
ios ? "flex-row-reverse" : "flex-row "
}`
`flex items-center w-full pb-3 mb-4 flex-row-reverse`
),
{
borderBottomWidth: 1,
@ -118,9 +114,7 @@ const User = ({ user }) => {
<View
style={[
tw(
`flex items-center w-full pb-3 mb-3 ${
ios ? "flex-row-reverse" : "flex-row "
}`
`flex items-center w-full pb-3 mb-3 flex-row-reverse`
),
{
borderBottomWidth: 1,

@ -6,19 +6,22 @@ import {
Dimensions,
ImageBackground,
StatusBar,
Appearance,
} from "react-native";
import { useNavigation } from "@react-navigation/native";
import tw from "tailwind-rn";
import { BarCodeScanner } from "expo-barcode-scanner";
import Colors from "../../../constants/Colors";
import { Entypo } from "@expo/vector-icons";
import tw from "tailwind-rn";
import Colors from "../../../constants/Colors";
const { width, height } = Dimensions.get("screen");
//assets
import laptopImage from "../assets/laptop.png";
export default function Scan({}) {
const colorScheme = Appearance.getColorScheme();
const navigation = useNavigation();
const [hasPermission, setHasPermission] = useState(null);
const [scanned, setScanned] = useState(false);
@ -68,19 +71,26 @@ export default function Scan({}) {
{
width: height / 3.5,
borderWidth: 1,
borderColor: Colors.theme1.light.blue8,
borderColor: Colors.theme1[colorScheme].greenCF,
},
]}
>
<Entypo name="back" size={width / 27} style={{marginRight : 5, color : 'white'}} />
<Entypo
name="back"
size={width / 27}
style={{ marginRight: 5, color: Colors.theme1[colorScheme].greenCF }}
/>
<Text
style={[
{ color: "white", fontSize: width / 27, fontFamily: "regular" },
{
color: Colors.theme1[colorScheme].greenCF,
fontSize: width / 27,
fontFamily: "regular",
},
]}
>
بازگشت
</Text>
</TouchableOpacity>
</View>
{/* )} */}

@ -64,7 +64,7 @@ const Season = ({ season, activeUnit, name, setVideoActive }) => {
style={[
{
fontFamily: "bold",
fontSize: fontSize.xl,
fontSize: fontSize.base,
color:
activeUnit === unit ? "white" : Colors.theme1[colorScheme].green79,
},
@ -99,7 +99,7 @@ const Season = ({ season, activeUnit, name, setVideoActive }) => {
width: "100%",
textAlign: "center",
fontFamily: "bold",
fontSize: fontSize.lg,
fontSize: fontSize.base,
color: activeUnit === unit ? "white" : Colors.theme1[colorScheme].green79,
}}
>

Loading…
Cancel
Save