Pre release tweaks

This commit is contained in:
John Lyon-Smith
2018-05-14 18:50:08 -07:00
parent 82f2828441
commit 5d67cb69b0
6 changed files with 38 additions and 40 deletions

View File

@@ -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}