muba-posting 8.0.15 → 8.0.16

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
@@ -74,6 +74,7 @@ export default class Posting extends React.Component {
74
74
  mainFeatures: [],
75
75
  insideFeatures: [],
76
76
  otherFeatures: [],
77
+ onlyShowCreateBusiness: false,
77
78
  postingAd: {
78
79
  transaction: null,
79
80
  adType: null,
@@ -361,14 +362,14 @@ export default class Posting extends React.Component {
361
362
  if (response[UPLOADED_FILES_KEY]) {
362
363
  images = response[UPLOADED_FILES_KEY];
363
364
  }
364
- await this.setState({
365
+ this.setState({
365
366
  postingAd: { ...this.state.postingAd, images: images, id: response.id },
366
367
  originalAd: { ...this.state.postingAd, images: images, id: response.id }
367
368
  })
368
369
  }
369
370
  }
370
371
 
371
- await this.setState({ prevViews: prevViews, editingStepOne: editingStepOne });
372
+ this.setState({ prevViews: prevViews, editingStepOne: editingStepOne });
372
373
  await this._updateCurrentScreen(view, params);
373
374
  }
374
375
 
@@ -400,12 +401,19 @@ export default class Posting extends React.Component {
400
401
  break;
401
402
  case Views.PREVIEW:
402
403
  if (params) {
403
- await this.setState({ params: params });
404
+ this.setState({ params: params });
404
405
  }
405
- await this.setState({ prevViews: [] })
406
+ this.setState({ prevViews: [] })
406
407
  break;
407
408
  case Views.EDIT_SELECTOR:
408
- await this.setState({ prevViews: [] })
409
+ this.setState({ prevViews: [] })
410
+ break;
411
+ case Views.PAYMENT_ONLINE:
412
+ if (params) {
413
+ this.setState({ onlyShowCreateBusiness: params.onlyShowCreateBusiness});
414
+ } else {
415
+ this.setState({ onlyShowCreateBusiness: false});
416
+ }
409
417
  }
410
418
  this.scroll.scrollTop();
411
419
  this.setState({ view: view });
@@ -577,7 +585,7 @@ export default class Posting extends React.Component {
577
585
  <Publish2 postingAd={this.state.postingAd}
578
586
  scroll={(ref) => this.scroll.scrollIntoView(ref)}
579
587
  saveEditAd={() => this._saveEditAd()}
580
- goToPage={(view) => this._goToPage(view)}
588
+ goToPage={(view, editingStepOne, params) => this._goToPage(view, editingStepOne, params)}
581
589
  replacePage={(view) => this._updateCurrentScreen(view)}
582
590
  baseUrl={this.props.baseUrl}
583
591
  request={this.props.request}
@@ -596,7 +604,7 @@ export default class Posting extends React.Component {
596
604
  <Publish2b postingAd={this.state.postingAd}
597
605
  scroll={(ref) => this.scroll.scrollIntoView(ref)}
598
606
  saveEditAd={() => this._saveEditAd()}
599
- goToPage={(view) => this._goToPage(view)}
607
+ goToPage={(view, editingStepOne, params) => this._goToPage(view, editingStepOne, params)}
600
608
  replacePage={(view) => this._updateCurrentScreen(view)}
601
609
  request={this.props.request}
602
610
  context={this.props.context}
@@ -708,6 +716,7 @@ export default class Posting extends React.Component {
708
716
  context={this.props.context}
709
717
  request={this.props.request}
710
718
  adId={this.state.postingAd.id}
719
+ onlyShowCreateBusiness={this.state.onlyShowCreateBusiness}
711
720
  country={this.props.country}
712
721
  goToPrivacy={this.props.goToPrivacy}
713
722
  changeView={this.props.changeView}
package/Publish2.js CHANGED
@@ -52,7 +52,12 @@ export default class Publish2 extends React.Component {
52
52
  this.setState({
53
53
  errorCity: !responseCheckZone.correctCity
54
54
  })
55
- this.popupNoZone.show();
55
+
56
+ if (!responseCheckZone.correctCity){
57
+ this.popupNoZone.show();
58
+ } else {
59
+ this.props.goToPage(Views.PAYMENT_ONLINE, false, {onlyShowCreateBusiness: true});
60
+ }
56
61
  }
57
62
  } else {
58
63
  this.popupNoLocation.show();
package/Publish2b.js CHANGED
@@ -172,7 +172,12 @@ export default class Publish2b extends React.Component {
172
172
  this.setState({
173
173
  errorCity: !responseCheckZone.correctCity
174
174
  })
175
- this.popupNoZone.show();
175
+
176
+ if (!responseCheckZone.correctCity){
177
+ this.popupNoZone.show();
178
+ } else {
179
+ this.props.goToPage(Views.PAYMENT_ONLINE, false, {onlyShowCreateBusiness: true});
180
+ }
176
181
  }
177
182
  }
178
183
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "muba-posting",
3
- "version": "8.0.15",
3
+ "version": "8.0.16",
4
4
  "description": "Posting",
5
5
  "main": "Posting.js",
6
6
  "scripts": {