|
|
|
@ -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, |
|
|
|
|
}, |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|