muba-posting 6.0.8 → 6.0.9

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/Publish4.js +15 -11
  2. package/package.json +1 -1
package/Publish4.js CHANGED
@@ -29,20 +29,22 @@ export default class Publish4 extends React.Component {
29
29
  }
30
30
 
31
31
  nextStep() {
32
- this.props.postingAd.video = this.state.video;
33
- this.setState({ showErrorNoSelectedImages: false });
34
- if (this.props.postingAd.id == null || this.props.fullPosting) {
35
- if (this.props.postingAd.adTypeDetails.filter(function (detail) {
36
- return detail.value !== 'surface' && detail.value !== 'baths' && detail.value !== 'pax' && detail.value !== 'minNights' &&
37
- detail.value !== 'rooms' && detail.value !== 'pieces' && detail.value !== 'pricePeriod'
38
- }).length > 0) {
39
- this.props.goToPage(Views.PUBLISH_5);
32
+ if (this.pictureSelector.onSubmitValidate()) {
33
+ this.props.postingAd.video = this.state.video;
34
+ if (this.props.postingAd.id == null || this.props.fullPosting) {
35
+ if (this.props.postingAd.adTypeDetails.filter(function (detail) {
36
+ return detail.value !== 'surface' && detail.value !== 'baths' && detail.value !== 'pax' && detail.value !== 'minNights' &&
37
+ detail.value !== 'rooms' && detail.value !== 'pieces' && detail.value !== 'pricePeriod'
38
+ }).length > 0) {
39
+ this.props.goToPage(Views.PUBLISH_5);
40
+ } else {
41
+ this.props.goToPage(Views.PUBLISH_6);
42
+ }
40
43
  } else {
41
- this.props.goToPage(Views.PUBLISH_6);
44
+ this.props.saveEditAd();
42
45
  }
43
- } else {
44
- this.props.saveEditAd();
45
46
  }
47
+
46
48
  }
47
49
 
48
50
  render() {
@@ -50,11 +52,13 @@ export default class Publish4 extends React.Component {
50
52
  <View style={{ minHeight: this.state.minHeight }}>
51
53
  <View style={commonStyles.formFieldset}>
52
54
  <PictureSelector
55
+ ref={(pictureSelector) => this.pictureSelector = pictureSelector}
53
56
  context={this.props.context}
54
57
  request={this.props.request}
55
58
  title={strings('setup.publishPhotos')}
56
59
  referenceId={this.props.postingAd.id}
57
60
  referenceType='AD'
61
+ required={true}
58
62
  maxPictures={this.props.maxPictures}
59
63
  images={this.props.postingAd.images}
60
64
  video={this.state.video}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "muba-posting",
3
- "version": "6.0.8",
3
+ "version": "6.0.9",
4
4
  "description": "Posting",
5
5
  "main": "Posting.js",
6
6
  "scripts": {