muba-posting 8.0.12 → 8.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/Publish6.js +23 -15
  2. package/package.json +1 -1
package/Publish6.js CHANGED
@@ -137,7 +137,11 @@ export default class Publish6 extends React.Component {
137
137
 
138
138
  this.setState({ requiredPhoneError: !validate });
139
139
 
140
- return this.reference.onSubmitValidate() && validate;
140
+ if (this.reference) {
141
+ validate = this.reference.onSubmitValidate() && validate;
142
+ }
143
+
144
+ return validate;
141
145
  }
142
146
 
143
147
  setLanguages() {
@@ -179,21 +183,25 @@ export default class Publish6 extends React.Component {
179
183
  null
180
184
  }
181
185
 
182
- <View style={commonStyles.progressbarFieldContainer}>
183
- <View style={commonStyles.row}>
184
- <Text style={commonStyles.progressbarField}>{strings('setup.reference')}</Text>
185
- <Text style={commonStyles.subNote}> {strings('setup.uniqueReference')}</Text>
186
+ {this.props.businessId ?
187
+ <View style={commonStyles.progressbarFieldContainer}>
188
+ <View style={commonStyles.row}>
189
+ <Text style={commonStyles.progressbarField}>{strings('setup.reference')}</Text>
190
+ <Text style={commonStyles.subNote}> {strings('setup.uniqueReference')}</Text>
191
+ </View>
192
+ <InputText value={this.state.reference} ref={(element) => this.reference = element}
193
+ placeholder={strings('setup.reference')}
194
+ required={false} onChangeText={(text) => this.onChangeReference(text)}
195
+ style={commonStyles.input}
196
+ textContainerStyle={{ marginTop: 10 }}
197
+ returnKeyType={"next"}
198
+ maxLength={50}
199
+ disabled={!this.props.allowedToModify.clientRef}
200
+ onSubmitEditing={(event) => { this.phoneGroup.focus(); }} />
186
201
  </View>
187
- <InputText value={this.state.reference} ref={(element) => this.reference = element}
188
- placeholder={strings('setup.reference')}
189
- required={false} onChangeText={(text) => this.onChangeReference(text)}
190
- style={commonStyles.input}
191
- textContainerStyle={{ marginTop: 10 }}
192
- returnKeyType={"next"}
193
- maxLength={50}
194
- disabled={!this.props.allowedToModify.clientRef}
195
- onSubmitEditing={(event) => { this.phoneGroup.focus(); }} />
196
- </View>
202
+ :
203
+ null
204
+ }
197
205
 
198
206
  <View style={this.state.requiredPhoneError ? [commonStyles.progressbarFieldContainer, commonStyles.fieldError] : commonStyles.progressbarFieldContainer} ref={(element) => this.phoneView = element}>
199
207
  <View style={commonStyles.row}>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "muba-posting",
3
- "version": "8.0.12",
3
+ "version": "8.0.14",
4
4
  "description": "Posting",
5
5
  "main": "Posting.js",
6
6
  "scripts": {