|
|
@ -16,6 +16,7 @@ import { |
|
|
|
import Order from "./components/Order"; |
|
|
|
import Order from "./components/Order"; |
|
|
|
import Navbar from "../../components/Navbar"; |
|
|
|
import Navbar from "../../components/Navbar"; |
|
|
|
import Drawer from "../../components/Drawer"; |
|
|
|
import Drawer from "../../components/Drawer"; |
|
|
|
|
|
|
|
import Empty from "../../components/Empty"; |
|
|
|
|
|
|
|
|
|
|
|
//assets
|
|
|
|
//assets
|
|
|
|
import b1Image from "./assets/b1.png"; |
|
|
|
import b1Image from "./assets/b1.png"; |
|
|
@ -32,7 +33,7 @@ function OrdersFollowUp({ orders, getList }) { |
|
|
|
|
|
|
|
|
|
|
|
React.useEffect(() => { |
|
|
|
React.useEffect(() => { |
|
|
|
getList(); |
|
|
|
getList(); |
|
|
|
},[]); |
|
|
|
}, []); |
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<SafeAreaView |
|
|
|
<SafeAreaView |
|
|
@ -54,14 +55,22 @@ function OrdersFollowUp({ orders, getList }) { |
|
|
|
}} |
|
|
|
}} |
|
|
|
/> |
|
|
|
/> |
|
|
|
<Drawer setBoxPosition={setBoxPosition} position={position} /> |
|
|
|
<Drawer setBoxPosition={setBoxPosition} position={position} /> |
|
|
|
<ScrollView |
|
|
|
{orders?.length ? ( |
|
|
|
contentContainerStyle={styles.contentContainerStyle} |
|
|
|
<ScrollView |
|
|
|
style={styles.container} |
|
|
|
contentContainerStyle={styles.contentContainerStyle} |
|
|
|
> |
|
|
|
style={styles.container} |
|
|
|
{orders.map((order, index) => ( |
|
|
|
> |
|
|
|
<Order order={order} key={index} /> |
|
|
|
{orders.map((order, index) => ( |
|
|
|
))} |
|
|
|
<Order order={order} key={index} /> |
|
|
|
</ScrollView> |
|
|
|
))} |
|
|
|
|
|
|
|
</ScrollView> |
|
|
|
|
|
|
|
) : ( |
|
|
|
|
|
|
|
<Empty |
|
|
|
|
|
|
|
text="هیچ موردی برای شما وجود ندارد." |
|
|
|
|
|
|
|
buttonText={"رفتن به فروشگاه"} |
|
|
|
|
|
|
|
buttonAction={() => navigation.push("Products")} |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
)} |
|
|
|
</SafeAreaView> |
|
|
|
</SafeAreaView> |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
@ -79,12 +88,12 @@ const styles = StyleSheet.create({ |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
const mapStateToProps = (state) => ({ |
|
|
|
const mapStateToProps = (state) => ({ |
|
|
|
orders: state.userFactor.fullList |
|
|
|
orders: state.userFactor.fullList, |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
const mapDispatchToProps = { |
|
|
|
const mapDispatchToProps = { |
|
|
|
getList: userFactor.fullList, |
|
|
|
getList: userFactor.fullList, |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(OrdersFollowUp); |
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(OrdersFollowUp); |
|
|
|
|
|
|
|
|
|
|
|