muba-posting 5.1.0 → 5.1.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/Posting.js CHANGED
@@ -64,6 +64,7 @@ export default class Posting extends React.Component {
64
64
  maxPictures: 0,
65
65
  countryPhone: '',
66
66
  businessId: this.props.businessId,
67
+ realEstateDeveloper: this.props.realEstateDeveloper,
67
68
  picturesUploaded: 0,
68
69
  params: null,
69
70
  postingAd: {
@@ -476,6 +477,7 @@ export default class Posting extends React.Component {
476
477
  fullPosting={this.state.fullPosting}
477
478
  goToPage={(view, editingStepOne) => this._goToPage(view, editingStepOne)}
478
479
  saveEditAd={() => this._saveEditAd()}
480
+ realEstateDeveloper={this.state.realEstateDeveloper}
479
481
  progressBarHeight={this.state.progressBarHeight}
480
482
  headerHeight={this.state.headerHeight} />
481
483
  :
package/Publish1.js CHANGED
@@ -55,7 +55,9 @@ export default class Publish1 extends React.Component {
55
55
  this.setState({ minHeight: minHeight })
56
56
  }
57
57
 
58
- this.loadPromotions();
58
+ if (this.props.realEstateDeveloper) {
59
+ this.loadPromotions();
60
+ }
59
61
  }
60
62
 
61
63
  async loadPromotions() {
@@ -156,7 +158,7 @@ export default class Publish1 extends React.Component {
156
158
  }
157
159
 
158
160
  validateForm() {
159
- let validPromotions = this.state.promotionOptions.elements.length <= 1;
161
+ let validPromotions = !this.props.realEstateDeveloper;
160
162
  if (!validPromotions) {
161
163
  validPromotions = this.inputSelectPromotions.onSubmitValidate();
162
164
  }
@@ -175,7 +177,7 @@ export default class Publish1 extends React.Component {
175
177
  placeholder={strings('setup.select')}
176
178
  labelStyle={commonStyles.progressbarField}
177
179
  ref={(element) => this.inputSelectPromotions = element}
178
- visible={this.state.promotionOptions.elements.length > 1}
180
+ visible={this.props.realEstateDeveloper}
179
181
  required={true}
180
182
  scroll={(ref) => this.props.scroll(ref)}
181
183
  options={this.state.promotionOptions}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "muba-posting",
3
- "version": "5.1.0",
3
+ "version": "5.1.2",
4
4
  "description": "Posting",
5
5
  "main": "Posting.js",
6
6
  "scripts": {
@@ -28,7 +28,7 @@
28
28
  "muba-map": "5",
29
29
  "muba-output-text": "5",
30
30
  "muba-phone-group": "5",
31
- "muba-picture": "5.0.10",
31
+ "muba-picture": "5.1",
32
32
  "muba-payment-online": "5",
33
33
  "muba-popup-advice": "5",
34
34
  "muba-popup-permissions": "5",