muba-posting 6.0.23 → 6.0.24
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 +4 -9
- package/Preview.js +6 -1
- package/package.json +1 -1
package/Posting.js
CHANGED
|
@@ -65,6 +65,7 @@ export default class Posting extends React.Component {
|
|
|
65
65
|
picturesUploaded: 0,
|
|
66
66
|
params: null,
|
|
67
67
|
locationList: [],
|
|
68
|
+
firstLoadPreview: true,
|
|
68
69
|
postingAd: {
|
|
69
70
|
transaction: null,
|
|
70
71
|
adType: null,
|
|
@@ -405,14 +406,6 @@ export default class Posting extends React.Component {
|
|
|
405
406
|
} else {
|
|
406
407
|
await this.setState({ postingAd: { ...this.state.postingAd, adId: response.id } });
|
|
407
408
|
this._goToPage(Views.PREVIEW, null, response);
|
|
408
|
-
|
|
409
|
-
const paymentOnlineActive = await this.props.request(this.props.context, PAYMENT_ONLINE_ACTIVE, { regionId: this.state.postingAd.region });
|
|
410
|
-
if (!this.state.businessId && paymentOnlineActive.value === 'true') {
|
|
411
|
-
this.setState({
|
|
412
|
-
prevViews: [this.state.view, Views.PAYMENT_ONLINE],
|
|
413
|
-
view: Views.PAYMENT_ONLINE
|
|
414
|
-
})
|
|
415
|
-
}
|
|
416
409
|
}
|
|
417
410
|
this._hideLoading();
|
|
418
411
|
|
|
@@ -596,7 +589,9 @@ export default class Posting extends React.Component {
|
|
|
596
589
|
businessId={this.state.businessId}
|
|
597
590
|
request={this.props.request}
|
|
598
591
|
highlight={() => this._goToPage(Views.PAYMENT_ONLINE)}
|
|
599
|
-
params={this.state.params}
|
|
592
|
+
params={this.state.params}
|
|
593
|
+
firstLoadPreview={this.state.firstLoadPreview}
|
|
594
|
+
loaded={() => this.setState({ firstLoadPreview: false })} />
|
|
600
595
|
:
|
|
601
596
|
null
|
|
602
597
|
}
|
package/Preview.js
CHANGED
|
@@ -26,7 +26,12 @@ export default class Preview extends React.Component {
|
|
|
26
26
|
|
|
27
27
|
componentDidMount = async () => {
|
|
28
28
|
const paymentOnlineActive = await this.props.request(this, PAYMENT_ONLINE_ACTIVE, { regionId: this.props.postingAd.region });
|
|
29
|
-
this.setState({ showPaymentOnline: paymentOnlineActive.value === 'true' })
|
|
29
|
+
this.setState({ showPaymentOnline: paymentOnlineActive.value === 'true' }, () => {
|
|
30
|
+
if (this.props.firstLoadPreview && this.state.showPaymentOnline) {
|
|
31
|
+
this.props.highlight();
|
|
32
|
+
this.props.loaded();
|
|
33
|
+
}
|
|
34
|
+
});
|
|
30
35
|
this.refreshData();
|
|
31
36
|
}
|
|
32
37
|
|