Clicking on activity working
This commit is contained in:
@@ -84,8 +84,8 @@ export class Home extends React.Component {
|
||||
}
|
||||
|
||||
@autobind
|
||||
handleItemSelect(item, index) {
|
||||
this.props.history.push("/activity")
|
||||
handleItemSelect(item) {
|
||||
this.props.history.push(`/activity?id=${item._id}`)
|
||||
}
|
||||
|
||||
@autobind
|
||||
@@ -207,12 +207,24 @@ export class Home extends React.Component {
|
||||
<View
|
||||
key={workItem._id}
|
||||
style={{
|
||||
flexDirection: "column",
|
||||
justifyContent: "center",
|
||||
flexDirection: "row",
|
||||
justifyContent: "flex-start",
|
||||
alignItems: "center",
|
||||
backgroundColor: "#F4F4F4",
|
||||
paddingLeft: 8,
|
||||
height: 45,
|
||||
}}>
|
||||
<Icon
|
||||
name={
|
||||
workItem.workItemType === "order"
|
||||
? "hardhat"
|
||||
: workItem.workItemType === "complaint"
|
||||
? "question"
|
||||
: "clipboard"
|
||||
}
|
||||
size={16}
|
||||
style={{ marginRight: 10 }}
|
||||
/>
|
||||
<Text style={{ fontSize: 16 }}>
|
||||
{workItemTypeText[workItem.workItemType].toUpperCase()}{" "}
|
||||
{pad(workItem.ticketNumber, 4)}
|
||||
@@ -230,7 +242,7 @@ export class Home extends React.Component {
|
||||
backgroundColor: "white",
|
||||
}}
|
||||
underlayColor="#EEEEEE"
|
||||
onPress={() => this.handleItemSelect(activity, index)}>
|
||||
onPress={() => this.handleItemSelect(activity)}>
|
||||
<View
|
||||
style={{
|
||||
height: "100%",
|
||||
|
||||
Reference in New Issue
Block a user