|
|
@ -43,7 +43,7 @@ const status = { |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
function OrderDetails({ mobile, route, theme }) { |
|
|
|
function OrderDetails({ mobile, route, theme }) { |
|
|
|
const { order } = route.params; |
|
|
|
const { order } = route?.params; |
|
|
|
const [position, setPosition] = useState("100%"); |
|
|
|
const [position, setPosition] = useState("100%"); |
|
|
|
|
|
|
|
|
|
|
|
React.useEffect(() => { |
|
|
|
React.useEffect(() => { |
|
|
@ -112,12 +112,12 @@ function OrderDetails({ mobile, route, theme }) { |
|
|
|
}, |
|
|
|
}, |
|
|
|
]} |
|
|
|
]} |
|
|
|
> |
|
|
|
> |
|
|
|
{status[order.condition]} |
|
|
|
{status[order?.condition]} |
|
|
|
</Text> |
|
|
|
</Text> |
|
|
|
<View |
|
|
|
<View |
|
|
|
style={[ |
|
|
|
style={[ |
|
|
|
tw("h-4 w-4 rounded-full mr-2"), |
|
|
|
tw("h-4 w-4 rounded-full mr-2"), |
|
|
|
{ backgroundColor: colors[order.condition] }, |
|
|
|
{ backgroundColor: colors[order?.condition] }, |
|
|
|
]} |
|
|
|
]} |
|
|
|
></View> |
|
|
|
></View> |
|
|
|
</View> |
|
|
|
</View> |
|
|
@ -206,7 +206,7 @@ function OrderDetails({ mobile, route, theme }) { |
|
|
|
}, |
|
|
|
}, |
|
|
|
]} |
|
|
|
]} |
|
|
|
> |
|
|
|
> |
|
|
|
{order.recieverName || " "} |
|
|
|
{order?.recieverName || " "} |
|
|
|
</Text> |
|
|
|
</Text> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
<View style={tw("flex flex-row-reverse items-center")}> |
|
|
|
<View style={tw("flex flex-row-reverse items-center")}> |
|
|
@ -240,7 +240,7 @@ function OrderDetails({ mobile, route, theme }) { |
|
|
|
}, |
|
|
|
}, |
|
|
|
]} |
|
|
|
]} |
|
|
|
> |
|
|
|
> |
|
|
|
{order.recieverPhone || " "} |
|
|
|
{order?.recieverPhone || " "} |
|
|
|
</Text> |
|
|
|
</Text> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
</View> |
|
|
@ -272,7 +272,7 @@ function OrderDetails({ mobile, route, theme }) { |
|
|
|
}, |
|
|
|
}, |
|
|
|
]} |
|
|
|
]} |
|
|
|
> |
|
|
|
> |
|
|
|
{"کد تحویل" + " " + order.recieverPostalCode} |
|
|
|
{"کد تحویل" + " " + order?.recieverPostalCode} |
|
|
|
</Text> |
|
|
|
</Text> |
|
|
|
<Text |
|
|
|
<Text |
|
|
|
style={[ |
|
|
|
style={[ |
|
|
@ -296,7 +296,7 @@ function OrderDetails({ mobile, route, theme }) { |
|
|
|
</Text> |
|
|
|
</Text> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
<View style={tw("w-full flex items-end")}> |
|
|
|
<View style={tw("w-full flex items-end")}> |
|
|
|
{order.userProducts.map((item, index) => ( |
|
|
|
{order?.userProducts.map((item, index) => ( |
|
|
|
<Book book={item} key={index} /> |
|
|
|
<Book book={item} key={index} /> |
|
|
|
))} |
|
|
|
))} |
|
|
|
</View> |
|
|
|
</View> |
|
|
@ -331,7 +331,7 @@ function OrderDetails({ mobile, route, theme }) { |
|
|
|
}, |
|
|
|
}, |
|
|
|
]} |
|
|
|
]} |
|
|
|
> |
|
|
|
> |
|
|
|
{order.sumPrice + " " + "تومان"} |
|
|
|
{order?.sumPrice + " " + "تومان"} |
|
|
|
</Text> |
|
|
|
</Text> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
</View> |
|
|
@ -375,7 +375,7 @@ function OrderDetails({ mobile, route, theme }) { |
|
|
|
}, |
|
|
|
}, |
|
|
|
]} |
|
|
|
]} |
|
|
|
> |
|
|
|
> |
|
|
|
{order.transportPrice + " " + "تومان"} |
|
|
|
{order?.transportPrice + " " + "تومان"} |
|
|
|
</Text> |
|
|
|
</Text> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
<View style={tw("flex flex-row-reverse")}> |
|
|
|
<View style={tw("flex flex-row-reverse")}> |
|
|
@ -408,7 +408,7 @@ function OrderDetails({ mobile, route, theme }) { |
|
|
|
}, |
|
|
|
}, |
|
|
|
]} |
|
|
|
]} |
|
|
|
> |
|
|
|
> |
|
|
|
{order.payPrice + " " + "تومان"} |
|
|
|
{order?.payPrice + " " + "تومان"} |
|
|
|
</Text> |
|
|
|
</Text> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
</View> |
|
|
@ -452,7 +452,7 @@ function OrderDetails({ mobile, route, theme }) { |
|
|
|
}, |
|
|
|
}, |
|
|
|
]} |
|
|
|
]} |
|
|
|
> |
|
|
|
> |
|
|
|
{order.transactionId} |
|
|
|
{order?.transactionId} |
|
|
|
</Text> |
|
|
|
</Text> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
</View> |
|
|
@ -487,7 +487,7 @@ function OrderDetails({ mobile, route, theme }) { |
|
|
|
}, |
|
|
|
}, |
|
|
|
]} |
|
|
|
]} |
|
|
|
> |
|
|
|
> |
|
|
|
{moment(order.payedAt).format("jYYYY/jMM/jDD")} |
|
|
|
{moment(order?.payedAt)?.format("jYYYY/jMM/jDD")} |
|
|
|
</Text> |
|
|
|
</Text> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|