|
|
@ -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"; |
|
|
@ -54,6 +55,7 @@ function OrdersFollowUp({ orders, getList }) { |
|
|
|
}} |
|
|
|
}} |
|
|
|
/> |
|
|
|
/> |
|
|
|
<Drawer setBoxPosition={setBoxPosition} position={position} /> |
|
|
|
<Drawer setBoxPosition={setBoxPosition} position={position} /> |
|
|
|
|
|
|
|
{orders?.length ? ( |
|
|
|
<ScrollView |
|
|
|
<ScrollView |
|
|
|
contentContainerStyle={styles.contentContainerStyle} |
|
|
|
contentContainerStyle={styles.contentContainerStyle} |
|
|
|
style={styles.container} |
|
|
|
style={styles.container} |
|
|
@ -62,6 +64,13 @@ function OrdersFollowUp({ orders, getList }) { |
|
|
|
<Order order={order} key={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); |
|
|
|
|
|
|
|
|
|
|
|