|
|
|
@ -9,7 +9,6 @@ import { |
|
|
|
|
Platform, |
|
|
|
|
StatusBar, |
|
|
|
|
LayoutAnimation, |
|
|
|
|
Appearance, |
|
|
|
|
} from "react-native"; |
|
|
|
|
import { connect } from "react-redux"; |
|
|
|
|
import _ from "lodash"; |
|
|
|
@ -44,10 +43,9 @@ const status = { |
|
|
|
|
2: "ارسال شده", |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
function OrderDetails({ mobile, route }) { |
|
|
|
|
const { order } = route.params; |
|
|
|
|
function OrderDetails({ mobile, route, theme }) { |
|
|
|
|
|
|
|
|
|
const colorScheme = Appearance.getColorScheme(); |
|
|
|
|
const { order } = route.params; |
|
|
|
|
const [position, setPosition] = useState("100%"); |
|
|
|
|
|
|
|
|
|
const setBoxPosition = () => { |
|
|
|
@ -85,14 +83,14 @@ function OrderDetails({ mobile, route }) { |
|
|
|
|
mobile ? "p-3" : "p-4" |
|
|
|
|
}` |
|
|
|
|
), |
|
|
|
|
{ backgroundColor: Colors.theme1[colorScheme].greenCF + "1a" }, |
|
|
|
|
{ backgroundColor: Colors.theme1[theme].greenCF + "1a" }, |
|
|
|
|
]} |
|
|
|
|
> |
|
|
|
|
<View style={tw("flex flex-row-reverse items-center")}> |
|
|
|
|
<Text |
|
|
|
|
style={[ |
|
|
|
|
{ |
|
|
|
|
color: Colors.theme1[colorScheme].green79, |
|
|
|
|
color: Colors.theme1[theme].green79, |
|
|
|
|
fontSize: mobile |
|
|
|
|
? mobile |
|
|
|
|
? fontSize.sm |
|
|
|
@ -117,7 +115,7 @@ function OrderDetails({ mobile, route }) { |
|
|
|
|
tw("w-full flex flex-row-reverse items-center py-4"), |
|
|
|
|
{ |
|
|
|
|
borderBottomWidth: 1, |
|
|
|
|
borderColor: Colors.theme1[colorScheme].grayE3, |
|
|
|
|
borderColor: Colors.theme1[theme].grayE3, |
|
|
|
|
}, |
|
|
|
|
]} |
|
|
|
|
> |
|
|
|
@ -125,7 +123,7 @@ function OrderDetails({ mobile, route }) { |
|
|
|
|
style={[ |
|
|
|
|
{ |
|
|
|
|
fontSize: mobile ? fontSize.sm : fontSize.lg, |
|
|
|
|
color: Colors.theme1[colorScheme].green79, |
|
|
|
|
color: Colors.theme1[theme].green79, |
|
|
|
|
fontFamily: "bold", |
|
|
|
|
}, |
|
|
|
|
]} |
|
|
|
@ -138,7 +136,7 @@ function OrderDetails({ mobile, route }) { |
|
|
|
|
{ |
|
|
|
|
fontSize: mobile ? fontSize.sm : fontSize.lg, |
|
|
|
|
lineHeight: mobile ? 17 : "auto", |
|
|
|
|
color: Colors.theme1[colorScheme].green79, |
|
|
|
|
color: Colors.theme1[theme].green79, |
|
|
|
|
fontFamily: "regular", |
|
|
|
|
}, |
|
|
|
|
]} |
|
|
|
@ -151,7 +149,7 @@ function OrderDetails({ mobile, route }) { |
|
|
|
|
tw("w-full flex flex-row-reverse justify-between py-4"), |
|
|
|
|
{ |
|
|
|
|
borderBottomWidth: 1, |
|
|
|
|
borderColor: Colors.theme1[colorScheme].grayE3, |
|
|
|
|
borderColor: Colors.theme1[theme].grayE3, |
|
|
|
|
}, |
|
|
|
|
]} |
|
|
|
|
> |
|
|
|
@ -160,7 +158,7 @@ function OrderDetails({ mobile, route }) { |
|
|
|
|
style={[ |
|
|
|
|
{ |
|
|
|
|
fontSize: mobile ? fontSize.sm : fontSize.lg, |
|
|
|
|
color: Colors.theme1[colorScheme].green79, |
|
|
|
|
color: Colors.theme1[theme].green79, |
|
|
|
|
fontFamily: "bold", |
|
|
|
|
}, |
|
|
|
|
]} |
|
|
|
@ -173,7 +171,7 @@ function OrderDetails({ mobile, route }) { |
|
|
|
|
{ |
|
|
|
|
fontSize: mobile ? fontSize.sm : fontSize.lg, |
|
|
|
|
lineHeight: mobile ? 17 : "auto", |
|
|
|
|
color: Colors.theme1[colorScheme].green79, |
|
|
|
|
color: Colors.theme1[theme].green79, |
|
|
|
|
fontFamily: "regular", |
|
|
|
|
}, |
|
|
|
|
]} |
|
|
|
@ -186,7 +184,7 @@ function OrderDetails({ mobile, route }) { |
|
|
|
|
style={[ |
|
|
|
|
{ |
|
|
|
|
fontSize: mobile ? fontSize.sm : fontSize.lg, |
|
|
|
|
color: Colors.theme1[colorScheme].green79, |
|
|
|
|
color: Colors.theme1[theme].green79, |
|
|
|
|
fontFamily: "bold", |
|
|
|
|
}, |
|
|
|
|
]} |
|
|
|
@ -199,7 +197,7 @@ function OrderDetails({ mobile, route }) { |
|
|
|
|
{ |
|
|
|
|
fontSize: mobile ? fontSize.sm : fontSize.lg, |
|
|
|
|
lineHeight: mobile ? 17 : "auto", |
|
|
|
|
color: Colors.theme1[colorScheme].green79, |
|
|
|
|
color: Colors.theme1[theme].green79, |
|
|
|
|
fontFamily: "regular", |
|
|
|
|
}, |
|
|
|
|
]} |
|
|
|
@ -211,7 +209,7 @@ function OrderDetails({ mobile, route }) { |
|
|
|
|
<View |
|
|
|
|
style={[ |
|
|
|
|
tw("w-full rounded-md flex p-4 items-end mt-2"), |
|
|
|
|
{ backgroundColor: Colors.theme1[colorScheme].greenFF1 + "aa" }, |
|
|
|
|
{ backgroundColor: Colors.theme1[theme].greenFF1 + "aa" }, |
|
|
|
|
]} |
|
|
|
|
> |
|
|
|
|
<Text |
|
|
|
@ -222,7 +220,7 @@ function OrderDetails({ mobile, route }) { |
|
|
|
|
? fontSize.sm |
|
|
|
|
: fontSize.lg |
|
|
|
|
: fontSize.lg, |
|
|
|
|
color: Colors.theme1[colorScheme].green79, |
|
|
|
|
color: Colors.theme1[theme].green79, |
|
|
|
|
fontFamily: "bold", |
|
|
|
|
}, |
|
|
|
|
]} |
|
|
|
@ -238,7 +236,7 @@ function OrderDetails({ mobile, route }) { |
|
|
|
|
? fontSize.sm |
|
|
|
|
: fontSize.lg |
|
|
|
|
: fontSize.lg, |
|
|
|
|
color: Colors.theme1[colorScheme].green79, |
|
|
|
|
color: Colors.theme1[theme].green79, |
|
|
|
|
fontFamily: "regular", |
|
|
|
|
}, |
|
|
|
|
]} |
|
|
|
@ -257,7 +255,7 @@ function OrderDetails({ mobile, route }) { |
|
|
|
|
style={[ |
|
|
|
|
{ |
|
|
|
|
fontSize: mobile ? fontSize.sm : fontSize.lg, |
|
|
|
|
color: Colors.theme1[colorScheme].green79, |
|
|
|
|
color: Colors.theme1[theme].green79, |
|
|
|
|
fontFamily: "bold", |
|
|
|
|
}, |
|
|
|
|
]} |
|
|
|
@ -269,7 +267,7 @@ function OrderDetails({ mobile, route }) { |
|
|
|
|
tw("font-light text-right mr-1"), |
|
|
|
|
{ |
|
|
|
|
fontSize: mobile ? fontSize.sm : fontSize.lg, |
|
|
|
|
color: Colors.theme1[colorScheme].green79, |
|
|
|
|
color: Colors.theme1[theme].green79, |
|
|
|
|
fontFamily: "regular", |
|
|
|
|
}, |
|
|
|
|
]} |
|
|
|
@ -283,7 +281,7 @@ function OrderDetails({ mobile, route }) { |
|
|
|
|
tw("w-full flex flex-row-reverse justify-between py-4"), |
|
|
|
|
{ |
|
|
|
|
borderBottomWidth: 1, |
|
|
|
|
borderColor: Colors.theme1[colorScheme].grayE3, |
|
|
|
|
borderColor: Colors.theme1[theme].grayE3, |
|
|
|
|
}, |
|
|
|
|
]} |
|
|
|
|
> |
|
|
|
@ -292,7 +290,7 @@ function OrderDetails({ mobile, route }) { |
|
|
|
|
style={[ |
|
|
|
|
{ |
|
|
|
|
fontSize: mobile ? fontSize.sm : fontSize.lg, |
|
|
|
|
color: Colors.theme1[colorScheme].green79, |
|
|
|
|
color: Colors.theme1[theme].green79, |
|
|
|
|
fontFamily: "bold", |
|
|
|
|
}, |
|
|
|
|
]} |
|
|
|
@ -304,7 +302,7 @@ function OrderDetails({ mobile, route }) { |
|
|
|
|
tw("font-light text-right mr-1"), |
|
|
|
|
{ |
|
|
|
|
fontSize: mobile ? fontSize.sm : fontSize.lg, |
|
|
|
|
color: Colors.theme1[colorScheme].green79, |
|
|
|
|
color: Colors.theme1[theme].green79, |
|
|
|
|
fontFamily: "regular", |
|
|
|
|
}, |
|
|
|
|
]} |
|
|
|
@ -317,7 +315,7 @@ function OrderDetails({ mobile, route }) { |
|
|
|
|
style={[ |
|
|
|
|
{ |
|
|
|
|
fontSize: mobile ? fontSize.sm : fontSize.lg, |
|
|
|
|
color: Colors.theme1[colorScheme].green79, |
|
|
|
|
color: Colors.theme1[theme].green79, |
|
|
|
|
fontFamily: "bold", |
|
|
|
|
}, |
|
|
|
|
]} |
|
|
|
@ -329,7 +327,7 @@ function OrderDetails({ mobile, route }) { |
|
|
|
|
tw("font-light text-right mr-1"), |
|
|
|
|
{ |
|
|
|
|
fontSize: mobile ? fontSize.sm : fontSize.lg, |
|
|
|
|
color: Colors.theme1[colorScheme].green79, |
|
|
|
|
color: Colors.theme1[theme].green79, |
|
|
|
|
fontFamily: "regular", |
|
|
|
|
}, |
|
|
|
|
]} |
|
|
|
@ -343,7 +341,7 @@ function OrderDetails({ mobile, route }) { |
|
|
|
|
tw("w-full flex flex-row-reverse justify-between py-4"), |
|
|
|
|
{ |
|
|
|
|
borderBottomWidth: 1, |
|
|
|
|
borderColor: Colors.theme1[colorScheme].grayE3, |
|
|
|
|
borderColor: Colors.theme1[theme].grayE3, |
|
|
|
|
}, |
|
|
|
|
]} |
|
|
|
|
> |
|
|
|
@ -353,7 +351,7 @@ function OrderDetails({ mobile, route }) { |
|
|
|
|
style={[ |
|
|
|
|
{ |
|
|
|
|
fontSize: mobile ? fontSize.sm : fontSize.lg, |
|
|
|
|
color: Colors.theme1[colorScheme].green79, |
|
|
|
|
color: Colors.theme1[theme].green79, |
|
|
|
|
fontFamily: "bold", |
|
|
|
|
}, |
|
|
|
|
]} |
|
|
|
@ -365,7 +363,7 @@ function OrderDetails({ mobile, route }) { |
|
|
|
|
tw("font-light text-right mr-1"), |
|
|
|
|
{ |
|
|
|
|
fontSize: mobile ? fontSize.sm : fontSize.lg, |
|
|
|
|
color: Colors.theme1[colorScheme].green79, |
|
|
|
|
color: Colors.theme1[theme].green79, |
|
|
|
|
fontFamily: "regular", |
|
|
|
|
}, |
|
|
|
|
]} |
|
|
|
@ -380,7 +378,7 @@ function OrderDetails({ mobile, route }) { |
|
|
|
|
style={[ |
|
|
|
|
{ |
|
|
|
|
fontSize: mobile ? fontSize.sm : fontSize.lg, |
|
|
|
|
color: Colors.theme1[colorScheme].green79, |
|
|
|
|
color: Colors.theme1[theme].green79, |
|
|
|
|
fontFamily: "bold", |
|
|
|
|
}, |
|
|
|
|
]} |
|
|
|
@ -392,7 +390,7 @@ function OrderDetails({ mobile, route }) { |
|
|
|
|
tw("font-light text-right mr-1"), |
|
|
|
|
{ |
|
|
|
|
fontSize: mobile ? fontSize.sm : fontSize.lg, |
|
|
|
|
color: Colors.theme1[colorScheme].green79, |
|
|
|
|
color: Colors.theme1[theme].green79, |
|
|
|
|
fontFamily: "regular", |
|
|
|
|
}, |
|
|
|
|
]} |
|
|
|
@ -421,6 +419,7 @@ const styles = StyleSheet.create({ |
|
|
|
|
|
|
|
|
|
const mapStateToProps = (state) => ({ |
|
|
|
|
mobile: state.publicApi.mobile, |
|
|
|
|
theme: state.publicApi.theme |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
export default connect(mapStateToProps)(OrderDetails); |
|
|
|
|