muba-posting 7.0.0 → 7.0.2

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.
package/PostingEdit.js CHANGED
@@ -57,12 +57,16 @@ export default class PostingEdit extends React.Component {
57
57
  </View>
58
58
  <Text style={commonStyles.editIconText}>{strings('edit.transaction')}</Text>
59
59
  </TouchableOpacity>
60
- <TouchableOpacity style={[commonStyles.col, commonStyles.col4, commonStyles.homeLinkBox]} activeOpacity={0.5} onPress={() => this.navigateToPublish2()}>
61
- <View style={commonStyles.homeIcon} >
62
- <Image source={require('./assets/images/location.png')} style={commonStyles.homeIconImage} />
63
- </View>
64
- <Text style={commonStyles.editIconText}>{strings('edit.location')}</Text>
65
- </TouchableOpacity>
60
+ {this.props.postingAd.promotionId ?
61
+ null
62
+ :
63
+ <TouchableOpacity style={[commonStyles.col, commonStyles.col4, commonStyles.homeLinkBox]} activeOpacity={0.5} onPress={() => this.navigateToPublish2()}>
64
+ <View style={commonStyles.homeIcon} >
65
+ <Image source={require('./assets/images/location.png')} style={commonStyles.homeIconImage} />
66
+ </View>
67
+ <Text style={commonStyles.editIconText}>{strings('edit.location')}</Text>
68
+ </TouchableOpacity>
69
+ }
66
70
  <TouchableOpacity style={[commonStyles.col, commonStyles.col4, commonStyles.homeLinkBox]} activeOpacity={0.5} onPress={() => this.props.goToPage(Views.PUBLISH_3)}>
67
71
  <View style={commonStyles.homeIcon} >
68
72
  <Image source={require('./assets/images/caracter.png')} style={commonStyles.homeIconImage} />
package/Preview.js CHANGED
@@ -25,7 +25,7 @@ export default class Preview extends React.Component {
25
25
  }
26
26
 
27
27
  componentDidMount = async () => {
28
- const paymentOnlineActive = await this.props.request(this, PAYMENT_ONLINE_ACTIVE, { regionId: this.props.postingAd.region });
28
+ const paymentOnlineActive = await this.props.request(this, PAYMENT_ONLINE_ACTIVE, { regionId: this.props.postingAd.region, adId: this.props.postingAd.id });
29
29
  this.setState({ showPaymentOnline: paymentOnlineActive.value === 'true' });
30
30
  this.refreshData();
31
31
  }
package/Publish1.js CHANGED
@@ -114,7 +114,7 @@ export default class Publish1 extends React.Component {
114
114
  }
115
115
 
116
116
  if (this.props.postingAd.id == null || this.props.fullPosting) {
117
- if (this.props.postingAd.exactlyLocated) {
117
+ if (this.props.postingAd.exactlyLocated && this.props.postingAd.promotionId == null) {
118
118
  this.props.goToPage(Views.PUBLISH_2);
119
119
  } else {
120
120
  this.props.goToPage(Views.PUBLISH_2_B);
package/Publish2b.js CHANGED
@@ -212,6 +212,7 @@ export default class Publish2b extends React.Component {
212
212
  required={false}
213
213
  onChangeText={(text) => this.onChangeAddress(text)}
214
214
  textContainerStyle={commonStyles.inputContainer}
215
+ disabled={this.props.postingAd.promotionId != null}
215
216
  style={commonStyles.input} />
216
217
  <InputSelect
217
218
  label={strings('setup.region')}
@@ -222,6 +223,7 @@ export default class Publish2b extends React.Component {
222
223
  options={this.state.regionOptions}
223
224
  onChange={(value) => this.loadCities(value)}
224
225
  ref={(element) => this.inputSelectRegion = element}
226
+ disabled={this.props.postingAd.promotionId != null}
225
227
  selectStyle={commonStyles.inputSelect} />
226
228
  <InputSelect
227
229
  label={strings('setup.city')}
@@ -232,7 +234,7 @@ export default class Publish2b extends React.Component {
232
234
  options={this.state.cityOptions}
233
235
  onChange={(value) => this.loadDistricts(value)}
234
236
  ref={(element) => this.inputSelecCity = element}
235
- disabled={this.state.cityOptions.elements.length === 1}
237
+ disabled={this.state.cityOptions.elements.length === 1 || this.props.postingAd.promotionId != null}
236
238
  selectStyle={commonStyles.inputSelect} />
237
239
  <InputSelect
238
240
  label={strings('setup.district')}
@@ -243,7 +245,7 @@ export default class Publish2b extends React.Component {
243
245
  options={this.state.districtOptions}
244
246
  onChange={(value) => this.loadTowns(value)}
245
247
  ref={(element) => this.inputSelectDistrict = element}
246
- disabled={this.state.districtOptions.elements.length === 1}
248
+ disabled={this.state.districtOptions.elements.length === 1 || this.props.postingAd.promotionId != null}
247
249
  visible={this.state.districtOptions.elements.length !== 2}
248
250
  selectStyle={commonStyles.inputSelect} />
249
251
  <InputSelect
@@ -255,7 +257,7 @@ export default class Publish2b extends React.Component {
255
257
  options={this.state.townOptions}
256
258
  onChange={(value) => this.props.postingAd.town = value}
257
259
  ref={(element) => this.inputSelectTown = element}
258
- disabled={this.state.townOptions.elements.length === 1}
260
+ disabled={this.state.townOptions.elements.length === 1 || this.props.postingAd.promotionId != null}
259
261
  visible={this.state.townOptions.elements.length !== 2}
260
262
  selectStyle={commonStyles.inputSelect} />
261
263
  </View>
@@ -264,9 +266,13 @@ export default class Publish2b extends React.Component {
264
266
  <TouchableHighlight style={commonStyles.actionButton} underlayColor="#ff5d00" onPress={() => this.nextStep()}>
265
267
  <Text style={commonStyles.actionButtonText}>{this.props.postingAd.id == null || this.props.fullPosting ? strings('setup.next').toUpperCase() : strings('setup.enregistrer').toUpperCase()}</Text>
266
268
  </TouchableHighlight>
267
- <TouchableHighlight underlayColor="rgba(0,0,0,0)" onPress={() => { this.props.postingAd.exactlyLocated = true; this.props.replacePage(Views.PUBLISH_2) }}>
268
- <Text style={[commonStyles.carteNote, commonStyles.carteNoteMap]}>{strings('setup.useMap')}</Text>
269
- </TouchableHighlight>
269
+ {this.props.postingAd.promotionId ?
270
+ null
271
+ :
272
+ <TouchableHighlight underlayColor="rgba(0,0,0,0)" onPress={() => { this.props.postingAd.exactlyLocated = true; this.props.replacePage(Views.PUBLISH_2) }}>
273
+ <Text style={[commonStyles.carteNote, commonStyles.carteNoteMap]}>{strings('setup.useMap')}</Text>
274
+ </TouchableHighlight>
275
+ }
270
276
  </View>
271
277
  <PopupAdvice dialogStyle={commonStyles.popupBox} ref={(popupNoZone) => { this.popupNoZone = popupNoZone; }}
272
278
  title={strings('setup.ad_cant_post_zone')} icon={<FontAwesomeIcon name='block' />}>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "muba-posting",
3
- "version": "7.0.0",
3
+ "version": "7.0.2",
4
4
  "description": "Posting",
5
5
  "main": "Posting.js",
6
6
  "scripts": {