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