Pre release tweaks
This commit is contained in:
@@ -80,6 +80,10 @@ export class WorkItem extends React.Component {
|
||||
isValid: (r, v) => v !== "",
|
||||
alwaysGet: true,
|
||||
},
|
||||
addActivity: {
|
||||
noValue: true,
|
||||
isDisabled: (r, v) => r.anyModified,
|
||||
},
|
||||
}
|
||||
|
||||
constructor(props) {
|
||||
@@ -277,8 +281,8 @@ export class WorkItem extends React.Component {
|
||||
|
||||
@autobind
|
||||
handleAddActivity() {
|
||||
if (this.history) {
|
||||
this.history.push(`/activity?workItemId=${this.binder._id}`)
|
||||
if (this.props.history) {
|
||||
this.props.history.push(`/activity?workItemId=${this.state.binder._id}`)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -375,21 +379,12 @@ export class WorkItem extends React.Component {
|
||||
{api.loggedInUser.administrator &&
|
||||
binder._id && (
|
||||
<View style={styles.panel}>
|
||||
<TouchableOpacity
|
||||
<BoundButton
|
||||
name="addActivity"
|
||||
title="Add Activity"
|
||||
binder={binder}
|
||||
onPress={this.handleAddActivity}
|
||||
style={{
|
||||
alignSelf: "center",
|
||||
backgroundColor: "blue",
|
||||
justifyContent: "center",
|
||||
paddingHorizontal: 10,
|
||||
height: 40,
|
||||
width: "100%",
|
||||
backgroundColor: "#3BB0FD",
|
||||
}}>
|
||||
<Text style={{ alignSelf: "center", color: "black" }}>
|
||||
Add Activity
|
||||
</Text>
|
||||
</TouchableOpacity>
|
||||
/>
|
||||
</View>
|
||||
)}
|
||||
{isIphoneX ? <View style={{ height: 30, width: "100%" }} /> : null}
|
||||
|
||||
Reference in New Issue
Block a user