reza added some change

master
Reza_ashrafi 3 years ago
parent 47a08eda39
commit ed0b096959
  1. 13
      navigation/index.js
  2. 5
      src/components/Drawer.js
  3. 20
      src/components/Header.js
  4. 4
      src/redux/store.js
  5. BIN
      src/screens/Activation/assets/bgQr.png
  6. BIN
      src/screens/Activation/assets/qr.png
  7. 11
      src/screens/Activation/index.js
  8. 6
      src/screens/Contact/Box.js
  9. 9
      src/screens/Faq/components/Instance.js
  10. 33
      src/screens/OrderDetails/components/Book.js
  11. 152
      src/screens/OrderDetails/index.js
  12. 52
      src/screens/OrdersFollowUp/components/Order.js

@ -6,8 +6,6 @@ import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
import { import {
Entypo, Entypo,
FontAwesome, FontAwesome,
Ionicons,
MaterialIcons,
} from "@expo/vector-icons"; } from "@expo/vector-icons";
import OrderDetails from "../src/screens/OrderDetails"; import OrderDetails from "../src/screens/OrderDetails";
import OrdersFollowUp from "../src/screens/OrdersFollowUp"; import OrdersFollowUp from "../src/screens/OrdersFollowUp";
@ -51,12 +49,12 @@ const BottomTabNavigator = () => {
<Tab.Navigator <Tab.Navigator
initialRouteName="HomeTab" initialRouteName="HomeTab"
screenOptions={{ screenOptions={{
tabBarHideOnKeyboard: true,
headerShown: false, headerShown: false,
tabBarActiveTintColor: "#06BACE", tabBarActiveTintColor: "#06BACE",
tabBarInactiveTintColor: "grey", tabBarInactiveTintColor: "grey",
tabBarStyle: { tabBarStyle: {
backgroundColor: "#CCE6FF", backgroundColor: "#CCE6FF",
zIndex: 10,
height: 70, height: 70,
}, },
tabBarLabelStyle: { tabBarLabelStyle: {
@ -72,16 +70,11 @@ const BottomTabNavigator = () => {
name="ShoppingCartTab" name="ShoppingCartTab"
component={ShoppingCart} component={ShoppingCart}
options={{ options={{
tabBarStyle: {
flex : 'flex-col',
display: 'flex',
},
title : 'سبد خرید', title : 'سبد خرید',
tabBarIcon: ({ focused, color }) => ( tabBarIcon: ({ focused, color }) => (
<FontAwesome <FontAwesome
name="shopping-cart" name="shopping-cart"
size={focused ? 32 : 32} size={32}
color={color} color={color}
/> />
), ),
@ -95,7 +88,7 @@ const BottomTabNavigator = () => {
tabBarIcon: ({ focused, color }) => ( focused ? tabBarIcon: ({ focused, color }) => ( focused ?
<FontAwesome <FontAwesome
name="map" name="map"
size={focused ? 27 : 23} size={27}
color={color} color={color}
/> : /> :
<Image <Image

@ -11,6 +11,7 @@ import {
import { useNavigation } from "@react-navigation/native"; import { useNavigation } from "@react-navigation/native";
import { Ionicons, AntDesign } from "@expo/vector-icons"; import { Ionicons, AntDesign } from "@expo/vector-icons";
import tw from "tailwind-rn"; import tw from "tailwind-rn";
import fontSize from "../constants/fontSize";
const width = Dimensions.get("window").width; const width = Dimensions.get("window").width;
const height = Dimensions.get("window").height; const height = Dimensions.get("window").height;
@ -62,7 +63,7 @@ const Drawer = ({ position, setBoxPosition }) => {
{ {
name: "سوالات متداول", name: "سوالات متداول",
route: "Faq", route: "Faq",
icon: <Ionicons name="reorder-four" size={23} color={"#555555"} />, icon: <Ionicons name="" size={23} color={"#555555"} />,
toast: "", toast: "",
message: "", message: "",
}, },
@ -86,7 +87,7 @@ const Drawer = ({ position, setBoxPosition }) => {
> >
{route.icon} {route.icon}
<Text <Text
style={[tw("mr-2"), { fontFamily: "regular", fontSize: width / 34 }]} style={[tw("mr-2"), { fontFamily: "regular", fontSize: fontSize.base }]}
> >
{route.name} {route.name}
</Text> </Text>

@ -1,8 +1,7 @@
import React, { useState, useEffect } from "react"; import { View, Text, Dimensions, ImageBackground } from "react-native";
import { View, Text, Dimensions, Image, ImageBackground } from "react-native";
import tw from "tailwind-rn"; import tw from "tailwind-rn";
import fontSize from "../constants/fontSize";
const width = Dimensions.get("window").width;
const height = Dimensions.get("window").height; const height = Dimensions.get("window").height;
export default function Header({ title, description, background }) { export default function Header({ title, description, background }) {
@ -16,25 +15,18 @@ export default function Header({ title, description, background }) {
<ImageBackground <ImageBackground
source={background} source={background}
resizeMode="contain" resizeMode="contain"
style={[ style={[tw("w-full"), { height: "80%" }]}
tw( ></ImageBackground>
"w-full"
),
{ height: "80%" },
]}
>
</ImageBackground>
<Text <Text
style={[ style={[
{ fontSize: width / 25, color: "#196EC0", fontFamily: "bold" }, { fontSize: fontSize.xl, color: "#196EC0", fontFamily: "bold" },
tw(" mb-1"),
]} ]}
> >
{title} {title}
</Text> </Text>
<Text <Text
style={[ style={[
{ color: "#86A0B9", fontSize: width / 36, fontFamily: "light" }, { color: "#86A0B9", fontSize: fontSize.sm, fontFamily: "light" },
]} ]}
> >
{description} {description}

@ -55,12 +55,12 @@ const persistor = persistStore(store);
const ReactNative = require("react-native"); const ReactNative = require("react-native");
try { try {
ReactNative.I18nManager.allowRTL(true); ReactNative.I18nManager.allowRTL(false);
// enableScreens(); // enableScreens();
} catch (e) { } catch (e) {
// console.log(e); // console.log(e);
} }
// console.disableYellowBox = true; console.disableYellowBox = true;
export default store; export default store;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

@ -1,7 +1,6 @@
import React, { useState, useEffect } from "react"; import React, { useState, useEffect } from "react";
import { import {
View, View,
StyleSheet,
Dimensions, Dimensions,
ScrollView, ScrollView,
Image, Image,
@ -9,11 +8,11 @@ import {
SafeAreaView, SafeAreaView,
StatusBar, StatusBar,
Platform, Platform,
LayoutAnimation,
KeyboardAvoidingView, KeyboardAvoidingView,
} from "react-native"; } from "react-native";
import { connect } from "react-redux"; import { connect } from "react-redux";
import tw from "tailwind-rn"; import tw from "tailwind-rn";
import fontSize from "../../constants/fontSize";
import Header from "../../components/Header"; import Header from "../../components/Header";
import Navbar from "../../components/Navbar"; import Navbar from "../../components/Navbar";
import CustomPressable from "../../components/Pressable"; import CustomPressable from "../../components/Pressable";
@ -21,12 +20,9 @@ import Or from "../../components/Or";
//assets //assets
import bgQr from "./assets/bgQr.png"; import bgQr from "./assets/bgQr.png";
import qrIcon from "./assets/qr.png";
import alertIcon from "./assets/alert.png";
import bookIcon from "./assets/book.png"; import bookIcon from "./assets/book.png";
const { width, height } = Dimensions.get("window"); const { height } = Dimensions.get("window");
function Activation({}) { function Activation({}) {
const [formData, setFormData] = useState({ const [formData, setFormData] = useState({
title: null, title: null,
@ -78,7 +74,6 @@ function Activation({}) {
background={bgQr} background={bgQr}
title={"فعالسازی کتاب دیجیتال"} title={"فعالسازی کتاب دیجیتال"}
description={""} description={""}
icon={qrIcon}
/> />
<View style={tw("w-full flex flex-row justify-center mb-7")}> <View style={tw("w-full flex flex-row justify-center mb-7")}>
<Image source={bookIcon} style={[{ width: 90, height: 90 }]} /> <Image source={bookIcon} style={[{ width: 90, height: 90 }]} />
@ -94,7 +89,7 @@ function Activation({}) {
backgroundColor: "#F9F9F9", backgroundColor: "#F9F9F9",
borderColor: "#DFDFDF", borderColor: "#DFDFDF",
borderWidth: 1, borderWidth: 1,
fontSize: width / 31, fontSize: fontSize.base,
fontFamily: "light", fontFamily: "light",
}, },
]} ]}

@ -20,7 +20,7 @@ const Box = ({ info }) => {
<Text <Text
style={{ style={{
fontFamily: "regular", fontFamily: "regular",
fontSize: fontSize.sm, fontSize: fontSize.base,
color: info.title.color, color: info.title.color,
}} }}
> >
@ -31,7 +31,7 @@ const Box = ({ info }) => {
tw("mt-1"), tw("mt-1"),
{ {
fontFamily: "light", fontFamily: "light",
fontSize: fontSize.xs, fontSize: fontSize.sm,
color: info.description.color, color: info.description.color,
}, },
]} ]}
@ -43,7 +43,7 @@ const Box = ({ info }) => {
tw("self-start mt-2"), tw("self-start mt-2"),
{ {
fontFamily: "light", fontFamily: "light",
fontSize: fontSize.xs, fontSize: fontSize.sm,
color: info?.link?.color, color: info?.link?.color,
}, },
]} ]}

@ -1,6 +1,7 @@
import { View, Text, Dimensions, TouchableOpacity } from "react-native"; import { View, Text, Dimensions, TouchableOpacity } from "react-native";
import { Entypo } from "@expo/vector-icons"; import { Entypo } from "@expo/vector-icons";
import tw from "tailwind-rn"; import tw from "tailwind-rn";
import fontSize from '../../../constants/fontSize';
const { width } = Dimensions.get("window"); const { width } = Dimensions.get("window");
@ -24,7 +25,7 @@ function Instance({ question, selectFaq }) {
width: "90%", width: "90%",
textAlign: "right", textAlign: "right",
color: "#196EC0", color: "#196EC0",
fontSize: width / 34, fontSize: fontSize.sm,
fontFamily: "bold", fontFamily: "bold",
}, },
]} ]}
@ -32,16 +33,16 @@ function Instance({ question, selectFaq }) {
{question.title} {question.title}
</Text> </Text>
{question.active ? ( {question.active ? (
<Entypo name="minus" size={20} color="#196EC0" /> <Entypo name="minus" size={18} color="#196EC0" />
) : ( ) : (
<Entypo name="plus" size={20} color="#196EC0" /> <Entypo name="plus" size={18} color="#196EC0" />
)} )}
</View> </View>
{question.active && ( {question.active && (
<View style={tw("w-full flex flex-row-reverse pt-2")}> <View style={tw("w-full flex flex-row-reverse pt-2")}>
<Text <Text
style={[ style={[
{ color: "#196EC0", fontSize: width / 36, fontFamily: "light" }, { color: "#196EC0", fontSize: fontSize.sm, fontFamily: "light" },
tw("text-right flex-1"), tw("text-right flex-1"),
]} ]}
> >

@ -1,6 +1,7 @@
import React from 'react'; import React from 'react';
import {View, Text, Dimensions, Image} from 'react-native'; import {View, Text, Dimensions, Image} from 'react-native';
import tw from 'tailwind-react-native-classnames'; import tw from 'tailwind-rn';
import fontSize from '../../../constants/fontSize';
import _ from 'lodash'; import _ from 'lodash';
const width = Dimensions.get('window').width; const width = Dimensions.get('window').width;
@ -9,47 +10,47 @@ export default function Book({book}) {
return ( return (
<View <View
style={[ style={[
tw.style('w-full flex flex-row-reverse justify-between py-3'), tw('w-full flex flex-row-reverse justify-between py-3'),
{borderBottomWidth: 1, borderColor: '#86A0B933'}, {borderBottomWidth: 1, borderColor: '#86A0B933'},
]}> ]}>
<View style={tw.style('flex flex-row-reverse items-center flex-1')}> <View style={tw('flex flex-row-reverse items-center flex-1')}>
<Image <Image
source={book} source={book}
style={[ style={[
tw.style('rounded-md'), tw('rounded-md'),
{width: 60, height: 90}, {width: width / 5, height: width / 5 * (4 / 2.8)},
]} ]}
/> />
<View style={tw.style('flex flex-col items-end mr-2')}> <View style={tw('flex flex-col items-end mr-2')}>
<Text <Text
style={[ style={[
{fontSize: width / 36, color: '#05335F', fontFamily: 'regular'}, {fontSize: fontSize.base, color: '#05335F', fontFamily: 'regular'},
]}> ]}>
علوم اجتماعی علوم اجتماعی
</Text> </Text>
<Text <Text
style={[ style={[
tw.style(' mt-2'), tw(' mt-2'),
{fontSize: width / 40, color: '#707070', fontFamily: 'light'}, {fontSize: fontSize.sm, color: '#707070', fontFamily: 'light'},
]}> ]}>
پایه دوم پایه دوم
</Text> </Text>
<Text <Text
style={[ style={[
tw.style(' mt-1'), tw(' mt-1'),
{fontSize: width / 40, color: '#05335F', fontFamily: 'light'}, {fontSize: fontSize.sm, color: '#05335F', fontFamily: 'light'},
]}> ]}>
نسخه دیجیتال نسخه دیجیتال
</Text> </Text>
</View> </View>
</View> </View>
<View style={tw.style('flex flex-row-reverse items-center')}> <View style={tw('flex flex-row-reverse items-center')}>
<Text <Text
style={[ style={[
tw.style(' py-1 px-2 rounded-sm'), tw(' py-1 px-3 rounded-sm'),
{ {
color: '#132F52', color: '#132F52',
fontSize: width / 31, fontSize: fontSize.xl,
backgroundColor: '#F1F1F1', backgroundColor: '#F1F1F1',
fontFamily: 'bold' fontFamily: 'bold'
}, },
@ -58,8 +59,8 @@ export default function Book({book}) {
</Text> </Text>
<Text <Text
style={[ style={[
tw.style(' mr-3'), tw(' mr-3'),
{color: '#132F52', fontSize: width / 36, fontFamily: 'light'}, {color: '#132F52', fontSize: fontSize.base, fontFamily: 'regular'},
]}> ]}>
126.000 تومان 126.000 تومان
</Text> </Text>

@ -14,12 +14,12 @@ import Navbar from "../../components/Navbar";
import Drawer from "../../components/Drawer"; import Drawer from "../../components/Drawer";
import Book from "./components/Book"; import Book from "./components/Book";
import { connect } from "react-redux"; import { connect } from "react-redux";
import tw from "tailwind-react-native-classnames"; import tw from "tailwind-rn";
import fontSize from "../../constants/fontSize";
import b1Image from "./assets/b1.png"; import b1Image from "./assets/b1.png";
import _ from "lodash"; import _ from "lodash";
const width = Dimensions.get("window").width; const width = Dimensions.get("window").width;
const height = Dimensions.get("window").height;
const colors = { const colors = {
1: "#FFF700", 1: "#FFF700",
@ -52,13 +52,13 @@ function OrderDetails({ order }) {
<Navbar <Navbar
setBoxPosition={setBoxPosition} setBoxPosition={setBoxPosition}
headerOptions={{ headerOptions={{
logo: true, logo: false,
menu: false, menu: false,
hamburgerMenu: true, hamburgerMenu: false,
title: "", title: "",
bookmark: false, bookmark: false,
qr: true, qr: true,
back: false, back: true,
}} }}
/> />
<Drawer setBoxPosition={setBoxPosition} position={position} /> <Drawer setBoxPosition={setBoxPosition} position={position} />
@ -68,30 +68,32 @@ function OrderDetails({ order }) {
> >
<View <View
style={[ style={[
tw.style( tw("flex flex-row-reverse w-full justify-between items-center p-3"),
"flex flex-row-reverse w-full justify-between items-center p-3"
),
{ backgroundColor: "#EEF7FF" }, { backgroundColor: "#EEF7FF" },
]} ]}
> >
<Text <Text
style={[ style={[
{ fontSize: width / 36, color: "#20297B", fontFamily: "regular" }, {
fontSize: fontSize.sm,
color: "#20297B",
fontFamily: "light",
},
]} ]}
> >
{_.join(["شماره سفارش:", order.number], " ")} {_.join(["شماره سفارش:", order.number], " ")}
</Text> </Text>
<View style={tw.style("flex flex-row-reverse items-center")}> <View style={tw("flex flex-row-reverse items-center")}>
<Text <Text
style={[ style={[
{ color: "#20297B", fontSize: width / 36, fontFamily: "bold" }, { color: "#20297B", fontSize: fontSize.sm, fontFamily: "bold" },
]} ]}
> >
{status[order.status]} {status[order.status]}
</Text> </Text>
<View <View
style={[ style={[
tw.style("h-4 w-4 rounded-full mr-2"), tw("h-4 w-4 rounded-full mr-2"),
{ backgroundColor: colors[order.status] }, { backgroundColor: colors[order.status] },
]} ]}
></View> ></View>
@ -99,22 +101,22 @@ function OrderDetails({ order }) {
</View> </View>
<View <View
style={[ style={[
tw.style("w-full flex flex-row-reverse py-4"), tw("w-full flex flex-row-reverse items-center py-4"),
{ borderBottomWidth: 1, borderColor: "#86A0B933" }, { borderBottomWidth: 1, borderColor: "#86A0B933" },
]} ]}
> >
<Text <Text
style={[ style={[
{ fontSize: width / 36, color: "#05335F", fontFamily: "bold" }, { fontSize: fontSize.sm, color: "#05335F", fontFamily: "bold" },
]} ]}
> >
آدرس تحویل: آدرس تحویل:
</Text> </Text>
<Text <Text
style={[ style={[
tw.style("flex-1 font-light text-right mr-2"), tw("flex-1 font-light text-right mr-2"),
{ {
fontSize: width / 40, fontSize: fontSize.sm,
lineHeight: 17, lineHeight: 17,
color: "#05335F", color: "#05335F",
fontFamily: "light", fontFamily: "light",
@ -126,23 +128,23 @@ function OrderDetails({ order }) {
</View> </View>
<View <View
style={[ style={[
tw.style("w-full flex flex-row-reverse justify-between py-4"), tw("w-full flex flex-row-reverse justify-between py-4"),
{ borderBottomWidth: 1, borderColor: "#86A0B933" }, { borderBottomWidth: 1, borderColor: "#86A0B933" },
]} ]}
> >
<View style={tw.style("flex flex-row-reverse")}> <View style={tw("flex flex-row-reverse items-center")}>
<Text <Text
style={[ style={[
{ fontSize: width / 36, color: "#05335F", fontFamily: "bold" }, { fontSize: fontSize.sm, color: "#05335F", fontFamily: "bold" },
]} ]}
> >
مشخصات تحویل گیرنده: مشخصات تحویل گیرنده:
</Text> </Text>
<Text <Text
style={[ style={[
tw.style("font-light text-right mr-1"), tw("font-light text-right mr-1"),
{ {
fontSize: width / 40, fontSize: fontSize.sm,
lineHeight: 17, lineHeight: 17,
color: "#05335F", color: "#05335F",
fontFamily: "light", fontFamily: "light",
@ -152,19 +154,19 @@ function OrderDetails({ order }) {
{order.name} {order.name}
</Text> </Text>
</View> </View>
<View style={tw.style("flex flex-row-reverse")}> <View style={tw("flex flex-row-reverse items-center")}>
<Text <Text
style={[ style={[
{ fontSize: width / 36, color: "#05335F", fontFamily: "bold" }, { fontSize: fontSize.sm, color: "#05335F", fontFamily: "bold" },
]} ]}
> >
شماره موبایل: شماره موبایل:
</Text> </Text>
<Text <Text
style={[ style={[
tw.style("font-light text-right mr-1"), tw("text-right mr-1"),
{ {
fontSize: width / 40, fontSize: fontSize.sm,
lineHeight: 17, lineHeight: 17,
color: "#05335F", color: "#05335F",
fontFamily: "light", fontFamily: "light",
@ -177,72 +179,72 @@ function OrderDetails({ order }) {
</View> </View>
<View <View
style={[ style={[
tw.style("w-full rounded-md flex flex-col p-4 items-end mt-2"), tw("w-full rounded-md flex flex-col p-4 items-end mt-2"),
{ backgroundColor: "#EEF6FF" }, { backgroundColor: "#EEF6FF" },
]} ]}
> >
<Text <Text
style={[ style={[
{ fontSize: width / 36, color: "#05335F", fontFamily: "bold" }, { fontSize: fontSize.sm, color: "#05335F", fontFamily: "bold" },
]} ]}
> >
{_.join(["کد تحویل", order.receiveCode], " ")} {_.join(["کد تحویل", order.receiveCode], " ")}
</Text> </Text>
<Text <Text
style={[ style={[
tw.style("font-light text-right mt-1"), tw("font-light text-right mt-1"),
{ fontSize: width / 40, color: "#05335F", fontFamily: "regular" }, {
fontSize: fontSize.sm,
color: "#05335F",
fontFamily: "light",
},
]} ]}
> >
این کد را پس از دریافت کالا، به مامور ارسال دانوین اعلام فرمایید این کد را پس از دریافت کالا، به مامور ارسال دانوین اعلام فرمایید
</Text> </Text>
</View> </View>
<View style={tw.style("w-full flex flex-col items-end")}> <View style={tw("w-full flex flex-col items-end")}>
{order.items.map((item, index) => ( {order.items.map((item, index) => (
<Book book={item} key={index} /> <Book book={item} key={index} />
))} ))}
</View> </View>
<View <View style={[tw("w-full flex flex-row-reverse justify-between py-4")]}>
style={[ <View style={tw("flex flex-row-reverse")}>
tw.style("w-full flex flex-row-reverse justify-between py-4"),
]}
>
<View style={tw.style("flex flex-row-reverse")}>
<Text <Text
style={[ style={[
{ fontSize: width / 36, color: "#05335F", fontFamily: "bold" }, { fontSize: fontSize.sm, color: "#05335F", fontFamily: "bold" },
]} ]}
> >
مبلغ سبد خرید: مبلغ سبد خرید:
</Text> </Text>
<Text <Text
style={[ style={[
tw.style("font-light text-right mr-1"), tw("font-light text-right mr-1"),
{ {
fontSize: width / 39, fontSize: fontSize.sm,
color: "#05335F", color: "#05335F",
fontFamily: "regular", fontFamily: "light",
}, },
]} ]}
> >
{_.join([order.shoppingCardPrice, "تومان"], " ")} {_.join([order.shoppingCardPrice, "تومان"], " ")}
</Text> </Text>
</View> </View>
<View style={tw.style("flex flex-row-reverse")}> <View style={tw("flex flex-row-reverse")}>
<Text <Text
style={[ style={[
{ fontSize: width / 36, color: "#05335F", fontFamily: "bold" }, { fontSize: fontSize.sm, color: "#05335F", fontFamily: "bold" },
]} ]}
> >
تخفیف: تخفیف:
</Text> </Text>
<Text <Text
style={[ style={[
tw.style("font-light text-right mr-1"), tw("font-light text-right mr-1"),
{ {
fontSize: width / 39, fontSize: fontSize.sm,
color: "#05335F", color: "#05335F",
fontFamily: "regular", fontFamily: "light",
}, },
]} ]}
> >
@ -252,46 +254,46 @@ function OrderDetails({ order }) {
</View> </View>
<View <View
style={[ style={[
tw.style("w-full flex flex-row-reverse justify-between py-4"), tw("w-full flex flex-row-reverse justify-between py-4"),
{ borderBottomWidth: 1, borderColor: "#86A0B933" }, { borderBottomWidth: 1, borderColor: "#86A0B933" },
]} ]}
> >
<View style={tw.style("flex flex-row-reverse")}> <View style={tw("flex flex-row-reverse")}>
<Text <Text
style={[ style={[
{ fontSize: width / 36, color: "#05335F", fontFamily: "bold" }, { fontSize: fontSize.sm, color: "#05335F", fontFamily: "bold" },
]} ]}
> >
هزینه ارسال کالا: هزینه ارسال کالا:
</Text> </Text>
<Text <Text
style={[ style={[
tw.style("font-light text-right mr-1"), tw("font-light text-right mr-1"),
{ {
fontSize: width / 39, fontSize: fontSize.sm,
color: "#05335F", color: "#05335F",
fontFamily: "regular", fontFamily: "light",
}, },
]} ]}
> >
{_.join([order.sendPrice, "تومان"], " ")} {_.join([order.sendPrice, "تومان"], " ")}
</Text> </Text>
</View> </View>
<View style={tw.style("flex flex-row-reverse")}> <View style={tw("flex flex-row-reverse")}>
<Text <Text
style={[ style={[
{ fontSize: width / 36, color: "#05335F", fontFamily: "bold" }, { fontSize: fontSize.sm, color: "#05335F", fontFamily: "bold" },
]} ]}
> >
جمع هزینه پرداختی: جمع هزینه پرداختی:
</Text> </Text>
<Text <Text
style={[ style={[
tw.style("font-light text-right mr-1"), tw("font-light text-right mr-1"),
{ {
fontSize: width / 39, fontSize: fontSize.sm,
color: "#05335F", color: "#05335F",
fontFamily: "regular", fontFamily: "light",
}, },
]} ]}
> >
@ -301,46 +303,46 @@ function OrderDetails({ order }) {
</View> </View>
<View <View
style={[ style={[
tw.style("w-full flex flex-row-reverse justify-between py-4"), tw("w-full flex flex-row-reverse justify-between py-4"),
{ borderBottomWidth: 1, borderColor: "#86A0B933" }, { borderBottomWidth: 1, borderColor: "#86A0B933" },
]} ]}
> >
<View style={tw.style("flex flex-row-reverse")}> <View style={tw("flex flex-row-reverse")}>
<Text <Text
style={[ style={[
{ fontSize: width / 36, color: "#05335F", fontFamily: "bold" }, { fontSize: fontSize.sm, color: "#05335F", fontFamily: "bold" },
]} ]}
> >
نحوه پرداخت: نحوه پرداخت:
</Text> </Text>
<Text <Text
style={[ style={[
tw.style("font-light text-right mr-1"), tw("font-light text-right mr-1"),
{ {
fontSize: width / 39, fontSize: fontSize.sm,
color: "#05335F", color: "#05335F",
fontFamily: "regular", fontFamily: "light",
}, },
]} ]}
> >
{order.payMethod} {order.payMethod}
</Text> </Text>
</View> </View>
<View style={tw.style("flex flex-row-reverse")}> <View style={tw("flex flex-row-reverse items-center")}>
<Text <Text
style={[ style={[
{ fontSize: width / 36, color: "#05335F", fontFamily: "bold" }, { fontSize: fontSize.sm, color: "#05335F", fontFamily: "bold" },
]} ]}
> >
شماره تراکنش: شماره تراکنش:
</Text> </Text>
<Text <Text
style={[ style={[
tw.style("font-light text-right mr-1"), tw("font-light text-right mr-1"),
{ {
fontSize: width / 39, fontSize: fontSize.sm,
color: "#05335F", color: "#05335F",
fontFamily: "regular", fontFamily: "light",
}, },
]} ]}
> >
@ -348,26 +350,22 @@ function OrderDetails({ order }) {
</Text> </Text>
</View> </View>
</View> </View>
<View <View style={[tw("w-full flex flex-row-reverse justify-between py-4")]}>
style={[ <View style={tw("flex flex-row-reverse items-center")}>
tw.style("w-full flex flex-row-reverse justify-between py-4"),
]}
>
<View style={tw.style("flex flex-row-reverse")}>
<Text <Text
style={[ style={[
{ fontSize: width / 36, color: "#05335F", fontFamily: "bold" }, { fontSize: fontSize.sm, color: "#05335F", fontFamily: "bold" },
]} ]}
> >
تاریخ تحویل: تاریخ تحویل:
</Text> </Text>
<Text <Text
style={[ style={[
tw.style("font-light text-right mr-1"), tw("font-light text-right mr-1"),
{ {
fontSize: width / 39, fontSize: fontSize.sm,
color: "#05335F", color: "#05335F",
fontFamily: "regular", fontFamily: "light",
}, },
]} ]}
> >

@ -8,9 +8,9 @@ import {
TouchableOpacity TouchableOpacity
} from 'react-native'; } from 'react-native';
import { useNavigation } from '@react-navigation/native'; import { useNavigation } from '@react-navigation/native';
import tw from 'tailwind-react-native-classnames'; import tw from 'tailwind-rn';
import fontSize from '../../../constants/fontSize';
import leftArrowIcon from '../assets/leftArrow.png'; import leftArrowIcon from '../assets/leftArrow.png';
import { AntDesign } from '@expo/vector-icons';
import _ from 'lodash'; import _ from 'lodash';
const width = Dimensions.get('window').width; const width = Dimensions.get('window').width;
@ -34,49 +34,49 @@ function Order({order}) {
return ( return (
<View <View
style={[ style={[
tw.style('w-full flex flex-col rounded-md overflow-hidden my-3'), tw('w-full flex flex-col rounded-md overflow-hidden my-3'),
{borderWidth: 1, borderColor: '#EEF7FF'}, {borderWidth: 1, borderColor: '#EEF7FF'},
]}> ]}>
<View <View
style={[ style={[
tw.style( tw(
'flex flex-row-reverse w-full justify-between items-center p-3', 'flex flex-row-reverse w-full justify-between items-center p-3',
), ),
{backgroundColor: '#EEF7FF'}, {backgroundColor: '#EEF7FF'},
]}> ]}>
<Text <Text
style={[ style={[
tw.style('font-medium'), tw('font-medium'),
{fontSize: width / 36, color: '#20297B', fontFamily: 'regular'}, {fontSize: fontSize.base, color: '#20297B', fontFamily: 'regular'},
]}> ]}>
{_.join(['شماره سفارش:', order.number], ' ')} {_.join(['شماره سفارش:', order.number], ' ')}
</Text> </Text>
<View style={tw.style('flex flex-row-reverse items-center')}> <View style={tw('flex flex-row-reverse items-center')}>
<Text <Text
style={[ style={[
tw.style('font-light'), tw('font-light'),
{color: '#20297B', fontSize: width / 36, fontFamily: 'bold'}, {color: '#20297B', fontSize: fontSize.sm, fontFamily: 'bold'},
]}> ]}>
{status[order.status]} {status[order.status]}
</Text> </Text>
<View <View
style={[ style={[
tw.style('h-4 w-4 rounded-full mr-2'), tw('h-4 w-4 rounded-full mr-2'),
{backgroundColor: colors[order.status]}, {backgroundColor: colors[order.status]},
]}></View> ]}></View>
</View> </View>
</View> </View>
<View <View
style={tw.style('w-full flex flex-row-reverse justify-between p-3')}> style={tw('w-full flex flex-row-reverse justify-between p-3')}>
<View style={tw.style('flex flex-col')}> <View style={tw('flex flex-col')}>
<View style={tw.style('flex flex-row-reverse mb-2')}> <View style={tw('flex flex-row-reverse mb-2')}>
{order.items.length < 2 {order.items.length < 2
? order?.items?.map(item => ( ? order?.items?.map(item => (
<Image <Image
source={item} source={item}
style={[ style={[
tw.style('rounded-md ml-1.5'), tw('rounded-md ml-1.5'),
{width: 60, height: 90}, {width: width / 5, height: width / 5 * (4 / 3)},
]} ]}
/> />
)) ))
@ -86,19 +86,19 @@ function Order({order}) {
<Image <Image
source={item} source={item}
style={[ style={[
tw.style('rounded-md ml-1.5'), tw('rounded-md ml-1.5'),
{width: 60, height: 90}, {width: width / 5, height: width / 5 * (4 / 3)},
]} ]}
/> />
))} ))}
</View> </View>
<View style={[tw.style('')]}> <View style={[tw('')]}>
<Text <Text
style={[ style={[
tw.style('p-2 rounded-md text-center'), tw('p-2 rounded-md text-center'),
{ {
fontSize: width / 40, fontSize: fontSize.sm,
fontFamily: 'bold', fontFamily: 'bold',
backgroundColor: '#F0FFF1', backgroundColor: '#F0FFF1',
color: '#05335F', color: '#05335F',
@ -108,10 +108,10 @@ function Order({order}) {
</Text> </Text>
</View> </View>
</View> </View>
<View style={tw.style('flex flex-col items-center mr-4')}> <View style={tw('flex flex-col items-center mr-4')}>
<Text <Text
style={[ style={[
tw.style('my-3'), tw('my-3'),
{fontSize: width / 31, color: '#132F52', fontFamily: 'bold'}, {fontSize: width / 31, color: '#132F52', fontFamily: 'bold'},
]}> ]}>
{_.join(['جمع فاکتور:', order.cost], ' ')} {_.join(['جمع فاکتور:', order.cost], ' ')}
@ -119,10 +119,10 @@ function Order({order}) {
<TouchableOpacity <TouchableOpacity
onPress={() => navigation.navigate('Order')} onPress={() => navigation.navigate('Order')}
style={[ style={[
tw.style('rounded-md flex flex-row-reverse justify-center px-5 py-2'), tw('rounded-md flex flex-row-reverse justify-center px-5 py-2'),
{borderWidth: 1, borderColor: '#1999C0'}, {borderWidth: 1, borderColor: '#1999C0'},
]}> ]}>
<Text style={{fontSize: width / 36, color: '#1999C0', fontFamily: 'regular'}}> <Text style={{fontSize: fontSize.base, color: '#1999C0', fontFamily: 'regular'}}>
جزئیات سفارش جزئیات سفارش
</Text> </Text>
<Image <Image
@ -132,8 +132,8 @@ function Order({order}) {
</TouchableOpacity> </TouchableOpacity>
<Text <Text
style={[ style={[
tw.style('my-5'), tw('my-5'),
{fontSize: width / 36, color: '#132F52', fontFamily: 'light'}, {fontSize: fontSize.sm, color: '#132F52', fontFamily: 'light'},
]}> ]}>
{_.join(['تاریخ سفارش:', order.date], ' ')} {_.join(['تاریخ سفارش:', order.date], ' ')}
</Text> </Text>

Loading…
Cancel
Save